From d10b710602646692200320836d9ec617d3df283a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= Date: Thu, 13 Aug 2015 20:21:30 +0200 Subject: [PATCH 001/262] debugger: also exit when the repl emits 'exit' Exit the debug repl when repl emits 'exit' Refs: https://github.com/nodejs/node-v0.x-archive/issues/5637 Fixes: https://github.com/nodejs/node-v0.x-archive/issues/5631 PR-URL: https://github.com/nodejs/node/pull/2369 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- lib/_debugger.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index 9f8fa26f2189c3..cbf7f7a5ed5397 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1546,8 +1546,7 @@ Interface.prototype.repl = function() { var listeners = this.repl.rli.listeners('SIGINT').slice(0); this.repl.rli.removeAllListeners('SIGINT'); - // Exit debug repl on Ctrl + C - this.repl.rli.once('SIGINT', function() { + function exitDebugRepl() { // Restore all listeners process.nextTick(function() { listeners.forEach(function(listener) { @@ -1557,7 +1556,16 @@ Interface.prototype.repl = function() { // Exit debug repl self.exitRepl(); - }); + + self.repl.rli.removeListener('SIGINT', exitDebugRepl); + self.repl.removeListener('exit', exitDebugRepl); + } + + // Exit debug repl on SIGINT + this.repl.rli.on('SIGINT', exitDebugRepl); + + // Exit debug repl on repl exit + this.repl.on('exit', exitDebugRepl); // Set new this.repl.eval = this.debugEval.bind(this); From 82e76f15d2160b44af069f32808e4ab608684d14 Mon Sep 17 00:00:00 2001 From: Nelson Pecora Date: Tue, 8 Sep 2015 16:25:57 -0400 Subject: [PATCH 002/262] doc: update irc channels: #node.js and #node-dev IRC (general questions): irc.freenode.net #node.js IRC (node core development): irc.freenode.net #node-dev PR-URL: https://github.com/nodejs/node/pull/2743 Reviewed-By: Jeremiah Senkpiel --- CONTRIBUTING.md | 6 ++++-- README.md | 4 ++-- doc/node.1 | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8d56f2daa4cb7..42e2d574cfc52a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,9 +65,11 @@ projects. Do not send your patch to us, we cannot accept it. In case of doubt, open an issue in the [issue tracker](https://github.com/nodejs/node/issues/) or contact one of the [project Collaborators](https://github.com/nodejs/node/#current-project-team-members). -([IRC](http://webchat.freenode.net/?channels=io.js) is often the best medium.) Especially do so if you plan to work on something big. Nothing is more +Especially do so if you plan to work on something big. Nothing is more frustrating than seeing your hard work go to waste because your vision -does not align with the project team. +does not align with the project team. Node.js has two IRC channels, +[#Node.js](http://webchat.freenode.net/?channels=node.js) for general help and questions, and +[#Node-dev](http://webchat.freenode.net/?channels=node-dev) for development of node core specifically. ### Step 2: Branch diff --git a/README.md b/README.md index 633e44493d431a..9cea124ac6f46e 100644 --- a/README.md +++ b/README.md @@ -342,8 +342,8 @@ Instructions: * [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) * [CONTRIBUTING.md](./CONTRIBUTING.md) * [GOVERNANCE.md](./GOVERNANCE.md) -* IRC: - [#io.js on Freenode.net](http://webchat.freenode.net?channels=io.js&uio=d4) +* IRC (general questions): [#node.js on Freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4) +* IRC (node core development): [#node-dev on Freenode.net](http://webchat.freenode.net?channels=node-dev&uio=d4) * [nodejs/node on Gitter](https://gitter.im/nodejs/node) ## Security diff --git a/doc/node.1 b/doc/node.1 index a352a6821186d1..685f039e4ccc37 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -773,4 +773,6 @@ See the website for documentation https://nodejs.org/ Mailing list: http://groups.google.com/group/nodejs -IRC: irc.freenode.net #io.js +IRC (general questions): irc.freenode.net #node.js + +IRC (node core development): irc.freenode.net #node-dev From 5e25c82d7680ec3061791269279d5fae0d45a968 Mon Sep 17 00:00:00 2001 From: Tristian Flanagan Date: Mon, 14 Sep 2015 18:26:59 -0400 Subject: [PATCH 003/262] module: fix column offsets in errors Because Node modules are wrapped, errors on the first line of a file leak the wrapper to the user and report the wrong column number. This commit adds a line break to the module wrapper so that the first line is treated the same as all other lines. To compensate for the additional line, a line offset of -1 is also applied to errors. Fixes: https://github.com/nodejs/node/issues/2860 PR-URL: https://github.com/nodejs/node/pull/2867 Reviewed-By: Colin Ihrig --- doc/api/vm.markdown | 20 +++++++++- lib/module.js | 4 +- src/node.js | 2 +- src/node_contextify.cc | 37 ++++++++++++++++++- test/fixtures/test-error-first-line-offset.js | 1 + test/parallel/test-vm-context.js | 12 ++++++ test/sequential/test-module-loading.js | 8 ++++ 7 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 test/fixtures/test-error-first-line-offset.js diff --git a/doc/api/vm.markdown b/doc/api/vm.markdown index 870a9551215abf..10c8cbc4ce4fd2 100644 --- a/doc/api/vm.markdown +++ b/doc/api/vm.markdown @@ -26,10 +26,16 @@ The options when creating a script are: - `filename`: allows you to control the filename that shows up in any stack traces produced from this script. +- `lineOffset`: allows you to add an offset to the line number that is + displayed in stack traces +- `columnOffset`: allows you to add an offset to the column number that is + displayed in stack traces - `displayErrors`: whether or not to print any errors to stderr, with the line of code that caused them highlighted, before throwing an exception. Applies only to syntax errors compiling the code; errors while running the code are controlled by the options to the script's methods. +- `timeout`: a number of milliseconds to execute `code` before terminating + execution. If execution is terminated, an `Error` will be thrown. ### script.runInContext(contextifiedSandbox[, options]) @@ -124,8 +130,14 @@ multiple times: The options for running a script are: -- `displayErrors`: whether or not to print any runtime errors to stderr, with - the line of code that caused them highlighted, before throwing an exception. +- `filename`: allows you to control the filename that shows up in any stack + traces produced. +- `lineOffset`: allows you to add an offset to the line number that is + displayed in stack traces +- `columnOffset`: allows you to add an offset to the column number that is + displayed in stack traces +- `displayErrors`: whether or not to print any errors to stderr, with the + line of code that caused them highlighted, before throwing an exception. Applies only to runtime errors executing the code; it is impossible to create a `Script` instance with syntax errors, as the constructor will throw. - `timeout`: a number of milliseconds to execute the script before terminating @@ -252,6 +264,10 @@ e.g. `(0,eval)('code')`. However, it also has the following additional options: - `filename`: allows you to control the filename that shows up in any stack traces produced. +- `lineOffset`: allows you to add an offset to the line number that is + displayed in stack traces +- `columnOffset`: allows you to add an offset to the column number that is + displayed in stack traces - `displayErrors`: whether or not to print any errors to stderr, with the line of code that caused them highlighted, before throwing an exception. Will capture both syntax errors from compiling `code` and runtime errors diff --git a/lib/module.js b/lib/module.js index 2d660c4b23d1d0..b3d29ffbd1c653 100644 --- a/lib/module.js +++ b/lib/module.js @@ -47,7 +47,6 @@ Module.wrapper = NativeModule.wrapper; Module.wrap = NativeModule.wrap; Module._debug = util.debuglog('module'); - // We use this alias for the preprocessor that filters it out const debug = Module._debug; @@ -411,7 +410,8 @@ Module.prototype._compile = function(content, filename) { // create wrapper function var wrapper = Module.wrap(content); - var compiledWrapper = runInThisContext(wrapper, { filename: filename }); + var compiledWrapper = runInThisContext(wrapper, + { filename: filename, lineOffset: -1 }); if (global.v8debug) { if (!resolvedArgv) { // we enter the repl if we're not given a filename argument. diff --git a/src/node.js b/src/node.js index 5a4496e43350c5..adaa736ce15b4c 100644 --- a/src/node.js +++ b/src/node.js @@ -942,7 +942,7 @@ }; NativeModule.wrapper = [ - '(function (exports, require, module, __filename, __dirname) { ', + '(function (exports, require, module, __filename, __dirname) {\n', '\n});' ]; diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 8880439c8a7e3f..bfd45a22862a06 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -504,13 +504,15 @@ class ContextifyScript : public BaseObject { TryCatch try_catch; Local code = args[0]->ToString(env->isolate()); Local filename = GetFilenameArg(args, 1); + Local lineOffset = GetLineOffsetArg(args, 1); + Local columnOffset = GetColumnOffsetArg(args, 1); bool display_errors = GetDisplayErrorsArg(args, 1); if (try_catch.HasCaught()) { try_catch.ReThrow(); return; } - ScriptOrigin origin(filename); + ScriptOrigin origin(filename, lineOffset, columnOffset); ScriptCompiler::Source source(code, origin); Local v8_script = ScriptCompiler::CompileUnbound(env->isolate(), &source); @@ -675,6 +677,39 @@ class ContextifyScript : public BaseObject { } + static Local GetLineOffsetArg( + const FunctionCallbackInfo& args, + const int i) { + Local defaultLineOffset = Integer::New(args.GetIsolate(), 0); + + if (!args[i]->IsObject()) { + return defaultLineOffset; + } + + Local key = FIXED_ONE_BYTE_STRING(args.GetIsolate(), "lineOffset"); + Local value = args[i].As()->Get(key); + + return value->IsUndefined() ? defaultLineOffset : value->ToInteger(); + } + + + static Local GetColumnOffsetArg( + const FunctionCallbackInfo& args, + const int i) { + Local defaultColumnOffset = Integer::New(args.GetIsolate(), 0); + + if (!args[i]->IsObject()) { + return defaultColumnOffset; + } + + Local key = FIXED_ONE_BYTE_STRING(args.GetIsolate(), + "columnOffset"); + Local value = args[i].As()->Get(key); + + return value->IsUndefined() ? defaultColumnOffset : value->ToInteger(); + } + + static bool EvalMachine(Environment* env, const int64_t timeout, const bool display_errors, diff --git a/test/fixtures/test-error-first-line-offset.js b/test/fixtures/test-error-first-line-offset.js new file mode 100644 index 00000000000000..8276753746b12b --- /dev/null +++ b/test/fixtures/test-error-first-line-offset.js @@ -0,0 +1 @@ +error diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index 45e19e6638892e..e1cd2ef01e5176 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -60,3 +60,15 @@ var ctx = {}; Object.defineProperty(ctx, 'b', { configurable: false }); ctx = vm.createContext(ctx); assert.equal(script.runInContext(ctx), false); + +// Error on the first line of a module should +// have the correct line and column number +assert.throws(function() { + vm.runInContext('throw new Error()', context, { + filename: 'expected-filename.js', + lineOffset: 32, + columnOffset: 123 + }); +}, function(err) { + return /expected-filename.js:33:130/.test(err.stack); +}, 'Expected appearance of proper offset in Error stack'); diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 94aa36240b2faf..19ba398d960701 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -283,3 +283,11 @@ process.on('exit', function() { // #1440 Loading files with a byte order marker. assert.equal(42, require('../fixtures/utf8-bom.js')); assert.equal(42, require('../fixtures/utf8-bom.json')); + +// Error on the first line of a module should +// have the correct line and column number +assert.throws(function() { + require('../fixtures/test-error-first-line-offset.js'); +}, function(err) { + return /test-error-first-line-offset.js:1:1/.test(err.stack); +}, 'Expected appearance of proper offset in Error stack'); From 1006102c765686d7ac2eeeaab49c6717affa0679 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 29 Sep 2015 10:22:00 -0400 Subject: [PATCH 004/262] build: Updates for AIX npm support - part 1 This PR is the first step enabling support for native modules for AIX. The main issue is that unlike linux where all symbols within the Node executable are available to the shared library for a native module (npm), on AIX the symbols must be explicitly exported. In addition, when the shared library is built it must be linked using a list of the available symbols. This patch covers the changes need to: 1) Export the symbols when building the node executable 2) Generate the file listing the symbols that can be used when building the shared library. For AIX, it breaks the build process into 2 steps. The first builds a static library and then generates a node.exp file which contains the symbols from that library. The second builds the node executable and uses the node.exp file to specify which symbols should be exported. In addition, it save the node.exp file so that it can later be used in the creation of the shared library when building a native module. The following additional steps will be required in dependent projects to fully enable AIX for native modules and are being worked separately: - Updates to node-gyp to use node.exp when creating the shared library for a native module - Fixes to gyp related to copying files as covered in https://codereview.chromium.org/1368133002/patch/1/10001 - Pulling in updated gyp versions to Node and node-gyp - Pulling latest libuv These changes were done to minimize the change to other platforms by working within the existing structure to add the 2 step process for AIX without changing the process for other platforms. PR-URL: https://github.com/nodejs/node/pull/3114 Reviewed-By: Ben Noordhuis --- configure | 4 ++++ node.gyp | 53 +++++++++++++++++++++++++++++++++++++++-- tools/create_expfile.sh | 48 +++++++++++++++++++++++++++++++++++++ tools/install.py | 4 ++++ 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100755 tools/create_expfile.sh diff --git a/configure b/configure index 0e83d8a8d7cdc5..56a0376e0ef903 100755 --- a/configure +++ b/configure @@ -670,6 +670,10 @@ def configure_node(o): elif target_arch in ('mips', 'mipsel'): configure_mips(o) + if flavor == 'aix': + o['variables']['node_core_target_name'] = 'node_base' + o['variables']['node_target_type'] = 'static_library' + if flavor in ('solaris', 'mac', 'linux', 'freebsd'): use_dtrace = not options.without_dtrace # Don't enable by default on linux and freebsd diff --git a/node.gyp b/node.gyp index a587edc926945e..778162119a0006 100644 --- a/node.gyp +++ b/node.gyp @@ -13,6 +13,7 @@ 'node_shared_openssl%': 'false', 'node_v8_options%': '', 'node_target_type%': 'executable', + 'node_core_target_name%': 'node', 'library_files': [ 'src/node.js', 'lib/_debug_agent.js', @@ -81,7 +82,7 @@ 'targets': [ { - 'target_name': 'node', + 'target_name': '<(node_core_target_name)', 'type': '<(node_target_type)', 'dependencies': [ @@ -673,5 +674,53 @@ 'test/cctest/util.cc', ], } - ] # end targets + ], # end targets + + 'conditions': [ + ['OS=="aix"', { + 'targets': [ + { + 'target_name': 'node', + 'type': 'executable', + 'dependencies': ['<(node_core_target_name)', 'node_exp'], + + 'include_dirs': [ + 'src', + 'deps/v8/include', + ], + + 'sources': [ + 'src/node_main.cc', + '<@(library_files)', + # node.gyp is added to the project by default. + 'common.gypi', + ], + + 'ldflags': ['-Wl,-bbigtoc,-bE:<(PRODUCT_DIR)/node.exp'], + }, + { + 'target_name': 'node_exp', + 'type': 'none', + 'dependencies': [ + '<(node_core_target_name)', + ], + 'actions': [ + { + 'action_name': 'expfile', + 'inputs': [ + '<(OBJ_DIR)' + ], + 'outputs': [ + '<(PRODUCT_DIR)/node.exp' + ], + 'action': [ + 'sh', 'tools/create_expfile.sh', + '<@(_inputs)', '<@(_outputs)' + ], + } + ] + } + ], # end targets + }], # end aix section + ], # end conditions block } diff --git a/tools/create_expfile.sh b/tools/create_expfile.sh new file mode 100755 index 00000000000000..ff4420a9e87218 --- /dev/null +++ b/tools/create_expfile.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# This script writes out all the exported symbols to a file +# AIX needs this as sybmols are not exported by an +# executable by default and we need to list +# them specifically in order to export them +# so that they can be used by native add-ons +# +# The raw symbol data is objtained by using nm on +# the .a files which make up the node executable +# +# -Xany makes sure we get symbols on both +# 32 bit and 64 bit as by default we'd only get those +# for 32 bit +# +# -g selects only exported symbols +# +# -C, -B and -p ensure the output is in a format we +# can easily parse and convert into the symbol we need +# +# -C suppresses the demangling of C++ names +# -B gives us output in BSD format +# -p displays the info in a standard portable output format +# +# We only include symbols if they are of the +# following types and don't start with a dot. +# +# T - Global text symbol +# D - Global data symbol +# B - Gobal bss symbol. +# +# the final sort allows us to remove any duplicates +# +# We need to exclude gtest libraries as they are not +# linked into the node executable +# +echo "Searching $1 to write out expfile to $2" + +# this special sequence must be at the start of the exp file +echo "#!." > $2 + +# pull the symbols from the .a files +find $1 -name "*.a" | grep -v gtest \ + | xargs nm -Xany -BCpg \ + | awk '{ + if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && + (substr($3,1,1) != ".")) { print $3 } + }' \ + | sort -u >> $2 diff --git a/tools/install.py b/tools/install.py index ff460bbc0f8306..cb86c65699df88 100755 --- a/tools/install.py +++ b/tools/install.py @@ -160,6 +160,10 @@ def headers(action): 'src/node_version.h', ], 'include/node/') + # Add the expfile that is created on AIX + if sys.platform.startswith('aix'): + action(['out/Release/node.exp'], 'include/node/') + subdir_files('deps/cares/include', 'include/node/', action) subdir_files('deps/v8/include', 'include/node/', action) From 930b483e8e057ad529af5335b78818940d48e3b9 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Thu, 8 Oct 2015 23:11:29 +0530 Subject: [PATCH 005/262] lib,test: update let to const where applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per the `prefer-const` eslint rule, few instances of `let` have been identified to be better with `const`. This patch updates all those instances. Refer: https://github.com/nodejs/node/issues/3118 PR-URL: https://github.com/nodejs/node/pull/3152 Reviewed-By: Colin Ihrig Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Roman Reiss Reviewed-By: Michaël Zasso --- lib/cluster.js | 2 +- lib/util.js | 2 +- test/parallel/test-async-wrap-check-providers.js | 13 +++++++------ test/parallel/test-buffer-zero-fill-reset.js | 2 +- test/parallel/test-http-flush-headers.js | 2 +- test/parallel/test-tls-socket-default-options.js | 2 +- test/parallel/test-util-inspect.js | 2 +- .../test-child-process-fork-getconnections.js | 4 ++-- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/cluster.js b/lib/cluster.js index c4c2c0d9ac4c93..f202f25cdd522a 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -291,7 +291,7 @@ function masterInit() { var match = execArgv[i].match(/^(--debug|--debug-(brk|port))(=\d+)?$/); if (match) { - let debugPort = process.debugPort + debugPortOffset; + const debugPort = process.debugPort + debugPortOffset; ++debugPortOffset; execArgv[i] = match[1] + '=' + debugPort; } diff --git a/lib/util.js b/lib/util.js index a6231c8acf56da..ff95b4871dd159 100644 --- a/lib/util.js +++ b/lib/util.js @@ -517,7 +517,7 @@ function formatCollectionIterator(ctx, value, recurseTimes, visibleKeys, keys) { var nextRecurseTimes = recurseTimes === null ? null : recurseTimes - 1; var vals = mirror.preview(); var output = []; - for (let o of vals) { + for (const o of vals) { output.push(formatValue(ctx, o, nextRecurseTimes)); } return output; diff --git a/test/parallel/test-async-wrap-check-providers.js b/test/parallel/test-async-wrap-check-providers.js index 2d7d318885eb16..45dd8d4f24048b 100644 --- a/test/parallel/test-async-wrap-check-providers.js +++ b/test/parallel/test-async-wrap-check-providers.js @@ -73,16 +73,17 @@ process.on('SIGINT', () => process.exit()); // Run from closed net server above. function checkTLS() { - let options = { + const options = { key: fs.readFileSync(common.fixturesDir + '/keys/ec-key.pem'), cert: fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem') }; - let server = tls.createServer(options, noop).listen(common.PORT, function() { - tls.connect(common.PORT, { rejectUnauthorized: false }, function() { - this.destroy(); - server.close(); + const server = tls.createServer(options, noop) + .listen(common.PORT, function() { + tls.connect(common.PORT, { rejectUnauthorized: false }, function() { + this.destroy(); + server.close(); + }); }); - }); } zlib.createGzip(); diff --git a/test/parallel/test-buffer-zero-fill-reset.js b/test/parallel/test-buffer-zero-fill-reset.js index 52203a997e89f5..56fb77818a1284 100644 --- a/test/parallel/test-buffer-zero-fill-reset.js +++ b/test/parallel/test-buffer-zero-fill-reset.js @@ -14,6 +14,6 @@ function testUint8Array(ui) { for (let i = 0; i < 100; i++) { new Buffer(0); - let ui = new Uint8Array(65); + const ui = new Uint8Array(65); assert.ok(testUint8Array(ui), 'Uint8Array is not zero-filled'); } diff --git a/test/parallel/test-http-flush-headers.js b/test/parallel/test-http-flush-headers.js index e3c9761cff5d34..5e91a4643a9019 100644 --- a/test/parallel/test-http-flush-headers.js +++ b/test/parallel/test-http-flush-headers.js @@ -10,7 +10,7 @@ server.on('request', function(req, res) { server.close(); }); server.listen(common.PORT, '127.0.0.1', function() { - let req = http.request({ + const req = http.request({ method: 'GET', host: '127.0.0.1', port: common.PORT, diff --git a/test/parallel/test-tls-socket-default-options.js b/test/parallel/test-tls-socket-default-options.js index 3af03a0ba9269a..7b41d0f5a9ec23 100644 --- a/test/parallel/test-tls-socket-default-options.js +++ b/test/parallel/test-tls-socket-default-options.js @@ -33,7 +33,7 @@ function testSocketOptions(socket, socketOptions) { setImmediate(runTests); }); }).listen(common.PORT, function() { - let c = new tls.TLSSocket(socket, socketOptions); + const c = new tls.TLSSocket(socket, socketOptions); c.connect(common.PORT, function() { c.end(sent); }); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 444c0168a42fa7..320d5e444ad80a 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -135,7 +135,7 @@ map.set(1, 2); var mirror = Debug.MakeMirror(map.entries(), true); var vals = mirror.preview(); var valsOutput = []; -for (let o of vals) { +for (const o of vals) { valsOutput.push(o); } diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js index 934df28d7988b7..a7521f1635fb39 100644 --- a/test/sequential/test-child-process-fork-getconnections.js +++ b/test/sequential/test-child-process-fork-getconnections.js @@ -6,7 +6,7 @@ const net = require('net'); const count = 12; if (process.argv[2] === 'child') { - let sockets = []; + const sockets = []; process.on('message', function(m, socket) { function sendClosed(id) { @@ -42,7 +42,7 @@ if (process.argv[2] === 'child') { }); const server = net.createServer(); - let sockets = []; + const sockets = []; let sent = 0; server.on('connection', function(socket) { From 3127666d032606055d4926292d44454748dacf94 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Thu, 8 Oct 2015 23:10:10 +0530 Subject: [PATCH 006/262] tools: enable prefer-const eslint rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description from: http://eslint.org/docs/rules/prefer-const.html If a variable is never modified, using the `const` declaration is better. `const` declaration tells readers, "this variable is never modified," reducing cognitive load and improving maintainability. Refer: https://github.com/nodejs/node/issues/3118 PR-URL: https://github.com/nodejs/node/pull/3152 Reviewed-By: Colin Ihrig Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Roman Reiss Reviewed-By: Michaël Zasso --- .eslintrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.eslintrc b/.eslintrc index cf1f7682cdcf91..1d14b72abb2bf3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -70,6 +70,11 @@ rules: # require space after keywords, eg 'for (..)' space-after-keywords: 2 + # ECMAScript 6 + # list: http://eslint.org/docs/rules/#ecmascript-6 + ## Suggest using 'const' wherever possible + prefer-const: 2 + # Strict Mode # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode ## 'use strict' on top From a4bcf030c66a47240587b913541bb2d7d5f05c5f Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 7 Oct 2015 22:18:56 +1100 Subject: [PATCH 007/262] doc: add TSC meeting minutes 2015-09-30 PR-URL: https://github.com/nodejs/node/pull/3235 Reviewed-By: Sakthipriyan Vairamani --- doc/tsc-meetings/2015-09-30.md | 161 +++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 doc/tsc-meetings/2015-09-30.md diff --git a/doc/tsc-meetings/2015-09-30.md b/doc/tsc-meetings/2015-09-30.md new file mode 100644 index 00000000000000..c10b9e75bc2ad9 --- /dev/null +++ b/doc/tsc-meetings/2015-09-30.md @@ -0,0 +1,161 @@ +# Node Foundation TSC Meeting 2015-09-30 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-09-30 +* **GitHub Issue**: https://github.com/nodejs/node/issues/3126 +* **Minutes Google Doc**: https://docs.google.com/document/d/1RkLAWTIrhD3BTB2rs9_FahWI0C7lt9F8xnQXaueJPIE +* _Previous Minutes Google Doc: _ + +## Present + +* Rod Vagg (TSC) +* Brian White (TSC) +* Chris Dickinson (TSC) +* James Snell (TSC) +* Michael Dawson +* Ben Noordhuis (TSC) +* Steven R Loomis +* Bert Belder (TSC) +* Alexis Campailla (TSC) +* Domenic Denicola +* Seth Thompson + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) + +### nodejs/TSC + +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +## Minutes + +### Standup + +* Rod Vagg (TSC) - Lots! Pass. +* Brian White (TSC) - DNS PR (querying NSS modules like mDNS works now, continuing work on other getnameinfo/getaddrinfo compat issues) +* Chris Dickinson (TSC) - Static Analysis +* James Snell (TSC) - Review of the HTTP module, going in depth with spec compliance +* Michael Dawson - AIX, contributing changes from IBM repos, node-gyp, all related to getting native modules working on AIX, submitted PR to core, benchmarking — bare metal machine for benchmarking group, backporting test fix to 0.12, FIPS-compat work on the test suite, getting hooked into v8 security reporting +* Ben Noordhuis (TSC) - Review PRs, bug reports, fixed 1-2 bugs, sent a few patches upstream to V8 and gyp, fixed a few bugs in node-gyp. +* Steven R Loomis - Review PRs, bug reports. Looking into alternatives to packaging full ICU data. Might be able to `npm install` ICU data. +* Bert Belder (TSC) - +* Alexis Campailla (TSC) - working on Node-serialport on Windows in Jenkins, looking into native module build service +* Domenic Denicola - v8-extras are starting to appear in Chrome, maybe use them in Node for startup performance. + +### Review of previous meeting + +* Deprecate Array#values() in 0.12.x [#25877](https://github.com/nodejs/node-v0.x-archive/issues/25877) +* Deprecate smalloc in v0.12 [#25784](https://github.com/nodejs/node-v0.x-archive/issues/25784) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) +* util: Remove p, has been deprecated for years [#2529](https://github.com/nodejs/node/pull/2529) + +### Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) + +(Chris: apologies, I did a bad job here.) + +Ben: Plan is to ship the first LTS release with v8 4.5, not 4.6 + +Rod: Yes. + +Ben: Is there a pressing reason to do so? + +Rod: LTS comes off the v4.x branch, we committed to not bump V8 in stable releases. + +Ben: It basically means that the first LTS release is going to ship with an outdated release. + +James: Yes, we knew this was a strong possibility. + +Michael: The model is that we give the community time to catch up. In the future that’s 6 months, so we’re never going to be on a supported version. + +Ben: V8 moves quickly. If we stick with 4.5, we’re going to have to manage a bigger delta between our copy and upstream. + +James: Yes, this was always going to be the case. We’re committed to supporting the V8 for 36 months. + +Ben: Yes, my point is that we could be starting with a smaller delta. + +Rod: One of the reasons we had this LTS delay on 4 is to shake out some of these concerns, like the buffer changes. Normally this shakeout will be 6 months, but this time it’s only been a month. + +Alexis: Is v5 going to be LTS also? + +Rod: We are having discussions about the overlap between v5 and v6, whether there’ll be a strict cutoff or some overlap. No decision yet. That’ll happen in April. It sounds like most folks are leaning towards +making the two releases (v4 LTS + v5) independent — option 1 [here](https://github.com/nodejs/node/issues/3000#issuecomment-144026295). + +Ben: We still haven’t come up with a way to maintain V8 going forward. + +James: We do need a good process there, you are absolutely right about that. + +Rod: I vote for IBM to hire someone dedicated to this. (Laughter) + +Michael: I can’t promise that at this point. + +Rod: As the delta increases between versions this becomes more concerning. + +James: make sure this is on the LTS WG agenda for next week. + +Rod: We tried to tackle this once before, came up with job description but nothing concrete. + +Michael: We stopped short of telling the foundation that this is a position that we need to staff. + +James: I would agree. We’re at the point where bringing someone in at the foundation level is probably a good idea. + +Rod: Noted. OK. We’ve got resolution there. + +Michael: James: Make sure it’s on the LTS agenda for going back to the foundation for resources. + +Rod: LTS is meeting this Monday (issue 43 on the repo). There’s some discussion around codenames and how to expose LTS info. We’ve committed to first week of October for LTS releases, so timing is going to be a little awkward with 4.1.2 coming out monday. Version 5 will be shipping when we have a stable V8, presumably mid-to-late october (1-3 weeks with no stable release line.) + +Rod: We’ll be pulling in semver minor and patch changes, we’ll continue to have bugfix releases for version 4, + +### Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) + +Rod: Trevor is lead on this, but isn’t present. Does anyone else have any updates? + +Ben: Wasn’t the last contentious issue putting WS in core? I think we agreed that if it’s not exposed to user-land, it's fine. + +Alexis: (discussion of another WS issue) + +Bert: we decided on this + +Ben: We agreed that if it was internal, non-exposed to core, + +(Talk about native deps for WS, buffer-util can be ) + +Ben: if this is a private dependency, we don’t need it to be fast, so we don’t necessarily need the native deps. + +Chris: (Hopped into discussion from minute-taking, hence the bad minutes) +https://github.com/nodejs/node/pull/1202 - add mask/unmask +https://github.com/nodejs/node/pull/1319 - add utf8 validator + +### Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +Ben: it’s basically a template for describing projects that are under the umbrella of the node foundation. It doesn’t look that controversial to me. + +Rod: it also doesn’t look that complete. + +Ben: Indeed. I suggest we discuss next week when mikeal is on the call. Seems like a rubber-stamp LGTM to me. + +Rod: We should think about what projects we want to introduce to the organization, including what happens to competition in the ecosystem when we pull in things (like build tools) +Domenic: This is for things like libuv, yes? + +Rod: There are already npm projects knocking on the door. One such project is request. It has its own org right now, but could work under the auspices of the node foundation. However it exists in an ecosystem where there is competition — is it okay for us to bless one project over others? NAN is sort of in the same position, it _could_ have competition. Another example is the npm client possibly. If the foundation were in a position to take npm would we even want it? + +### renaming of “language groups” from iojs-\* to nodejs-\* [#2525](https://github.com/nodejs/node/issues/2525) + +Steven: Looking for buyoff on this. + +Ben: Seen the approach and it looks good. + +Rod: You should take this as “you have authority to move ahead”. + +Steven: Will do. + +### Next Meeting + +October 7th From e6cc7323f510e903ac6a99abbe151676a65fc435 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 14 Oct 2015 22:51:47 +1100 Subject: [PATCH 008/262] doc: add TSC meeting minutes 2015-10-07 Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/3364 --- doc/tsc-meetings/2015-10-07.md | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 doc/tsc-meetings/2015-10-07.md diff --git a/doc/tsc-meetings/2015-10-07.md b/doc/tsc-meetings/2015-10-07.md new file mode 100644 index 00000000000000..6cb8813a5cac02 --- /dev/null +++ b/doc/tsc-meetings/2015-10-07.md @@ -0,0 +1,102 @@ +# Node Foundation TSC Meeting 2015-10-07 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-10-07 +* **GitHub Issue**: https://github.com/nodejs/node/issues/3126 +* **Minutes Google Doc**: https://docs.google.com/document/d/1LIrTCdTUjKtb_GGecrJ3Es0rPOpVdpkV5kefJ_p5FGU +* _Previous Minutes Google Doc: _ + +## Present + +* Rod Vagg (TSC) +* Brian White (TSC) +* Steven Loomis (observer) +* Trevor Norris (TSC) +* Shigeki Ohtsu (TSC) +* Ben Noordhuis (TSC) +* Mikeal Rogers (observer) +* Michael Dawson (observer) +* Seth Thompson (observer) +* Jeremiah Senkpiel (TSC) + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* lib,test: deprecate _linklist [#3078](https://github.com/nodejs/node/pull/3078) +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) + +### nodejs/TSC + +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +## Minutes + +### Standup + +* Rod Vagg: 4.1.2 release, security procedures surrounding that +* Brian White: Working on javascript dns resolver, regular PR + Issue work. +* Steven Loomis: Working on ICU 56 Release. TC 39 & emca spec work for Intl WG. Working on Intl build issues. +* Trevor Norris: Focused on fixing async_wrap, writing tests and preparing for it to become more official +* Shigeki Ohtsu: No works for node project, I spent all time to my internal works. +* Ben Noordhuis: Nothing to report—the usual +* Mikeal Rogers: Looking into stalled Wgs and seeing how to help out. Working on the umbrella program. Lots of conference things. +* Michael Dawson: Added a benchmarking machine to the CI, working on some tests issues. Working on PPC for the CI. +* Seth Thompson: Working on v8 4.7, scheduled soon +* Jeremiah Senkpiel: vacation, some issue catch-up + +### Review of previous meeting + +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) +* renaming of “language groups” from iojs-\* to nodejs-\* [#2525](https://github.com/nodejs/node/issues/2525) + + +### WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) + +* Discussed the HTTP WG based on James’ comments @ https://github.com/nodejs/node/issues/3234#issuecomment-146293038 +* Generally positive, only concerns are regarding decision making power—TSC may not want to hand that off as this is not quite like Streams (in that few people grok the code!) and there are philosophical questions to be resolved about HTTP that the TSC should be involved in. + +### lib,test: deprecate _linklist [#3078](https://github.com/nodejs/node/pull/3078) + +* Userland modules exist that could be used instead +* Ben suggested straight removal, Jeramiah raised the matter of process that we have committed to adding a warning before removal, so we could remove in v6 but probably shouldn’t in v5 +* No disagreement with moving forward for deprecation + +### Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) + +* Recap of the latest LTS meeting [LTS#43](https://github.com/nodejs/LTS/issues/43) +* Aim to have LTS / v4.2.0 out tomorrow, backup date of Monday if we miss that. LTS starts then for v4.x, v5.x has to wait until V8 4.6 to be stable mid to late October. + +### Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) + +* Shigeki, Ben: It would be quite hard to support 1.0.1 since we are using 1.0.2 APIs. + +* Discussion on the possible difficulty of using 1.0.2 on varied Linux distros + +* ubuntu wily (not released) seems to use 1.0.2 - work has been done to package. 1.0.2 is only in Wily - https://launchpad.net/ubuntu/+source/openssl/1.0.2d-0ubuntu1 - https://answers.launchpad.net/ubuntu/+source/openssl/+question/263725 - “My guess is that we will see openssl 1.0.2 from Ubuntu 15.10 onwards (or eventually only starting with 16.04)” + +* Concern that allowing 1.0.1 would result in a substandard (insecure?) & untested binary. + +* Some discussion about the fact that we don’t test building with shared / static dependencies + +* feedback to issue: No appetite to do the work from the TSC, maybe someone could do it but we wouldn’t support. + +### Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) + +_skipped discussion_ + +### Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +_skipped discussion_ + +## Next Meeting + +October 14th, 2015 From e42abf807cbe441b5c3375739484442b51eee6a5 Mon Sep 17 00:00:00 2001 From: Brian White Date: Thu, 15 Oct 2015 15:55:42 -0400 Subject: [PATCH 009/262] util: fix constructor/instanceof checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These new checks are similar to the one introduced in 089d68861, but for other types of objects. Specifically, if an object was created in a different context, the constructor object will not be the same as the constructor object in the current context, so we have to compare constructor names instead. PR-URL: https://github.com/nodejs/node/pull/3385 Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Michaël Zasso --- lib/util.js | 20 ++++++++++++-------- test/parallel/test-util-inspect.js | 10 ++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/util.js b/lib/util.js index ff95b4871dd159..25d470fb743dae 100644 --- a/lib/util.js +++ b/lib/util.js @@ -195,6 +195,7 @@ function ensureDebugIsInitialized() { function inspectPromise(p) { ensureDebugIsInitialized(); + // Only create a mirror if the object is a Promise. if (!binding.isPromise(p)) return null; const mirror = Debug.MakeMirror(p, true); @@ -289,16 +290,19 @@ function formatValue(ctx, value, recurseTimes) { var constructor = getConstructorOf(value); var base = '', empty = false, braces, formatter; + // We can't compare constructors for various objects using a comparison like + // `constructor === Array` because the object could have come from a different + // context and thus the constructor won't match. Instead we check the + // constructor names (including those up the prototype chain where needed) to + // determine object types. if (Array.isArray(value)) { - // We can't use `constructor === Array` because this could - // have come from a Debug context. - // Otherwise, an Array will print "Array [...]". + // Unset the constructor to prevent "Array [...]" for ordinary arrays. if (constructor && constructor.name === 'Array') constructor = null; braces = ['[', ']']; empty = value.length === 0; formatter = formatArray; - } else if (value instanceof Set) { + } else if (objectToString(value) === '[object Set]') { braces = ['{', '}']; // With `showHidden`, `length` will display as a hidden property for // arrays. For consistency's sake, do the same for `size`, even though this @@ -307,7 +311,7 @@ function formatValue(ctx, value, recurseTimes) { keys.unshift('size'); empty = value.size === 0; formatter = formatSet; - } else if (value instanceof Map) { + } else if (objectToString(value) === '[object Map]') { braces = ['{', '}']; // Ditto. if (ctx.showHidden) @@ -315,8 +319,7 @@ function formatValue(ctx, value, recurseTimes) { empty = value.size === 0; formatter = formatMap; } else { - // Only create a mirror if the object superficially looks like a Promise. - var promiseInternals = value instanceof Promise && inspectPromise(value); + var promiseInternals = inspectPromise(value); if (promiseInternals) { braces = ['{', '}']; formatter = formatPromise; @@ -332,7 +335,8 @@ function formatValue(ctx, value, recurseTimes) { empty = false; formatter = formatCollectionIterator; } else { - if (constructor === Object) + // Unset the constructor to prevent "Object {...}" for ordinary objects. + if (constructor && constructor.name === 'Object') constructor = null; braces = ['{', '}']; empty = true; // No other data than keys. diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 320d5e444ad80a..5831c40e77e930 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -141,6 +141,16 @@ for (const o of vals) { assert.strictEqual(util.inspect(valsOutput), '[ [ 1, 2 ] ]'); +// test for other constructors in different context +var obj = require('vm').runInNewContext('(function(){return {}})()', {}); +assert.strictEqual(util.inspect(obj), '{}'); +obj = require('vm').runInNewContext('var m=new Map();m.set(1,2);m', {}); +assert.strictEqual(util.inspect(obj), 'Map { 1 => 2 }'); +obj = require('vm').runInNewContext('var s=new Set();s.add(1);s.add(2);s', {}); +assert.strictEqual(util.inspect(obj), 'Set { 1, 2 }'); +obj = require('vm').runInNewContext('fn=function(){};new Promise(fn,fn)', {}); +assert.strictEqual(util.inspect(obj), 'Promise { }'); + // test for property descriptors var getter = Object.create(null, { a: { From ae46a230c18d2f0dac5b7d605371487da793ee50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 20 Oct 2015 21:24:53 +1100 Subject: [PATCH 010/262] tools: add tap output to cpplint Implement a crude TAP13 writer for cpplint. Does its job and not much else. Only supports writing TAP output to file, not vs7 or emacs formats. PR-URL: https://github.com/nodejs/node/pull/3448 Reviewed-By: Ben Noordhuis Reviewed-By: Sakthipriyan Vairamani --- tools/cpplint.py | 59 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/tools/cpplint.py b/tools/cpplint.py index 4c4f577b34c9d7..3019395d62df84 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # @@ -88,7 +88,8 @@ import string import sys import unicodedata - +import logging +logger = logging.getLogger('testrunner') _USAGE = """ Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] @@ -139,6 +140,9 @@ the top-level categories like 'build' and 'whitespace' will also be printed. If 'detailed' is provided, then a count is provided for each category like 'build/class'. + + logfile=filename + Write TAP output to a logfile. """ # We categorize each error message we print. Here are the categories. @@ -541,6 +545,11 @@ def SetFilters(self, filters): raise ValueError('Every filter in --filters must start with + or -' ' (%s does not)' % filt) + def setOutputFile(self, filename): + """attempts to create a file which we write output to.""" + fh = logging.FileHandler(filename, mode='wb') + logger.addHandler(fh) + def ResetErrorCounts(self): """Sets the module's error statistic back to zero.""" self.error_count = 0 @@ -558,10 +567,11 @@ def IncrementErrorCount(self, category): def PrintErrorCounts(self): """Print a summary of errors by category, and the total.""" - for category, count in self.errors_by_category.iteritems(): - sys.stderr.write('Category \'%s\' errors found: %d\n' % - (category, count)) - sys.stderr.write('Total errors found: %d\n' % self.error_count) + if not _cpplint_state.output_format == 'tap': + for category, count in self.errors_by_category.iteritems(): + sys.stderr.write('Category \'%s\' errors found: %d\n' % + (category, count)) + sys.stderr.write('Total errors found: %d\n' % self.error_count) _cpplint_state = _CppLintState() @@ -608,6 +618,9 @@ def _SetFilters(filters): """ _cpplint_state.SetFilters(filters) +def _setOutputFile(filename): + _cpplint_state.setOutputFile(filename) + class _FunctionState(object): """Tracks current function name and the number of lines in its body.""" @@ -786,6 +799,15 @@ def Error(filename, linenum, category, confidence, message): if _cpplint_state.output_format == 'vs7': sys.stderr.write('%s(%s): %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) + elif _cpplint_state.output_format == 'tap': + template = ('not ok %s\n' + ' ---\n' + ' message: %s\n' + ' data:\n' + ' line: %d\n' + ' ruleId: %s\n' + ' ...') + logger.info(template % (filename, message, linenum, category)) else: sys.stderr.write('%s:%s: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) @@ -2069,7 +2091,7 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, error): initial_spaces += 1 if line and line[-1].isspace(): error(filename, linenum, 'whitespace/end_of_line', 4, - 'Line ends in whitespace. Consider deleting these extra spaces.') + 'Line ends in whitespace. Consider deleting these extra spaces.') # There are certain situations we allow one space, notably for labels elif ((initial_spaces == 1 or initial_spaces == 3) and not Match(r'\s*\w+\s*:\s*$', cleansed_line)): @@ -3002,7 +3024,8 @@ def ProcessFile(filename, vlevel): 'One or more unexpected \\r (^M) found;' 'better to use only a \\n') - sys.stderr.write('Done processing %s\n' % filename) + if not _cpplint_state.output_format == 'tap': + sys.stderr.write('Done processing %s\n' % filename) def PrintUsage(message): @@ -3041,7 +3064,8 @@ def ParseArguments(args): try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=', 'counting=', - 'filter=']) + 'filter=', + 'logfile=']) except getopt.GetoptError: PrintUsage('Invalid arguments.') @@ -3049,13 +3073,14 @@ def ParseArguments(args): output_format = _OutputFormat() filters = '' counting_style = '' + output_filename = '' for (opt, val) in opts: if opt == '--help': PrintUsage(None) elif opt == '--output': - if not val in ('emacs', 'vs7'): - PrintUsage('The only allowed output formats are emacs and vs7.') + if not val in ('emacs', 'vs7', 'tap'): + PrintUsage('The only allowed output formats are emacs, vs7 and tap.') output_format = val elif opt == '--verbose': verbosity = int(val) @@ -3067,6 +3092,8 @@ def ParseArguments(args): if val not in ('total', 'toplevel', 'detailed'): PrintUsage('Valid counting options are total, toplevel, and detailed') counting_style = val + elif opt == '--logfile': + output_filename = val if not filenames: PrintUsage('No files were specified.') @@ -3075,6 +3102,8 @@ def ParseArguments(args): _SetVerboseLevel(verbosity) _SetFilters(filters) _SetCountingStyle(counting_style) + if output_filename: + _setOutputFile(output_filename) return filenames @@ -3089,6 +3118,14 @@ def main(): codecs.getwriter('utf8'), 'replace') + + ch = logging.StreamHandler(sys.stdout) + logger.addHandler(ch) + logger.setLevel(logging.INFO) + + if _cpplint_state.output_format == 'tap': + logger.info('TAP version 13') + _cpplint_state.ResetErrorCounts() for filename in filenames: ProcessFile(filename, _cpplint_state.verbose_level) From e6b511932555baf1a485891cacb939d4cd3379a4 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 20 Oct 2015 12:18:15 -0600 Subject: [PATCH 011/262] async_wrap: allow some hooks to be optional Only enforce that the init callback is passed to setupHooks(). The remaining hooks can be optionally passed. Throw if async_wrap.enable() runs before setting the init callback or if setupHooks() is called while async wrap is enabled. Add test to verify calls throw appropriately. PR-URL: https://github.com/nodejs/node/pull/3461 Reviewed-By: Fedor Indutny --- src/async-wrap.cc | 18 ++++++++++----- .../parallel/test-async-wrap-throw-no-init.js | 22 +++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 test/parallel/test-async-wrap-throw-no-init.js diff --git a/src/async-wrap.cc b/src/async-wrap.cc index 4f27e5116dca8d..767e76831c3d04 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -103,6 +103,9 @@ RetainedObjectInfo* WrapperInfo(uint16_t class_id, Local wrapper) { static void EnableHooksJS(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + Local init_fn = env->async_hooks_init_function(); + if (init_fn.IsEmpty() || !init_fn->IsFunction()) + return env->ThrowTypeError("init callback is not assigned to a function"); env->async_hooks()->set_enable_callbacks(1); } @@ -116,13 +119,18 @@ static void DisableHooksJS(const FunctionCallbackInfo& args) { static void SetupHooks(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - CHECK(args[0]->IsFunction()); - CHECK(args[1]->IsFunction()); - CHECK(args[2]->IsFunction()); + if (env->async_hooks()->callbacks_enabled()) + return env->ThrowError("hooks should not be set while also enabled"); + + if (!args[0]->IsFunction()) + return env->ThrowTypeError("init callback must be a function"); env->set_async_hooks_init_function(args[0].As()); - env->set_async_hooks_pre_function(args[1].As()); - env->set_async_hooks_post_function(args[2].As()); + + if (args[1]->IsFunction()) + env->set_async_hooks_pre_function(args[1].As()); + if (args[2]->IsFunction()) + env->set_async_hooks_post_function(args[2].As()); } diff --git a/test/parallel/test-async-wrap-throw-no-init.js b/test/parallel/test-async-wrap-throw-no-init.js new file mode 100644 index 00000000000000..b2f60f3215e850 --- /dev/null +++ b/test/parallel/test-async-wrap-throw-no-init.js @@ -0,0 +1,22 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const async_wrap = process.binding('async_wrap'); + + +assert.throws(function() { + async_wrap.setupHooks(null); +}, /init callback must be a function/); + +assert.throws(function() { + async_wrap.enable(); +}, /init callback is not assigned to a function/); + +// Should not throw +async_wrap.setupHooks(() => {}); +async_wrap.enable(); + +assert.throws(function() { + async_wrap.setupHooks(() => {}); +}, /hooks should not be set while also enabled/); From ca8b47856003a83c75d6fabb79afd0f10d69145b Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Mon, 19 Oct 2015 17:14:05 -0600 Subject: [PATCH 012/262] async_wrap: new instances get uid New instances of AsyncWrap are automatically assigned a unique id. The value will be used in future commits to communicate additional information via the async hooks. While the largest value we can reliably communicate to JS is 2^53, even if a new AsyncWrap is created every 100ns the uid won't reach its end for 28.5 years. PR-URL: https://github.com/nodejs/node/pull/3461 Reviewed-By: Fedor Indutny --- src/async-wrap-inl.h | 8 +++++++- src/async-wrap.h | 3 +++ src/env-inl.h | 5 +++++ src/env.h | 3 +++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index cac8175889dfbf..9aaf67d3a8c518 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -17,7 +17,8 @@ inline AsyncWrap::AsyncWrap(Environment* env, v8::Local object, ProviderType provider, AsyncWrap* parent) - : BaseObject(env, object), bits_(static_cast(provider) << 1) { + : BaseObject(env, object), bits_(static_cast(provider) << 1), + uid_(env->get_async_wrap_uid()) { CHECK_NE(provider, PROVIDER_NONE); CHECK_GE(object->InternalFieldCount(), 1); @@ -66,6 +67,11 @@ inline AsyncWrap::ProviderType AsyncWrap::provider_type() const { } +inline int64_t AsyncWrap::get_uid() const { + return uid_; +} + + inline v8::Local AsyncWrap::MakeCallback( const v8::Local symbol, int argc, diff --git a/src/async-wrap.h b/src/async-wrap.h index 330f3454f42d2c..5fbd2309383d87 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -55,6 +55,8 @@ class AsyncWrap : public BaseObject { inline ProviderType provider_type() const; + inline int64_t get_uid() const; + // Only call these within a valid HandleScope. v8::Local MakeCallback(const v8::Local cb, int argc, @@ -76,6 +78,7 @@ class AsyncWrap : public BaseObject { // expected the context object will receive a _asyncQueue object property // that will be used to call pre/post in MakeCallback. uint32_t bits_; + const int64_t uid_; }; void LoadAsyncWrapperInfo(Environment* env); diff --git a/src/env-inl.h b/src/env-inl.h index 2d965f9a519232..f73e9c6ba2000a 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -210,6 +210,7 @@ inline Environment::Environment(v8::Local context, using_domains_(false), printed_error_(false), trace_sync_io_(false), + async_wrap_uid_(0), debugger_agent_(this), http_parser_buffer_(nullptr), context_(context->GetIsolate(), context) { @@ -359,6 +360,10 @@ inline void Environment::set_trace_sync_io(bool value) { trace_sync_io_ = value; } +inline int64_t Environment::get_async_wrap_uid() { + return ++async_wrap_uid_; +} + inline uint32_t* Environment::heap_statistics_buffer() const { CHECK_NE(heap_statistics_buffer_, nullptr); return heap_statistics_buffer_; diff --git a/src/env.h b/src/env.h index 185cc17294ec05..e41863ac74a698 100644 --- a/src/env.h +++ b/src/env.h @@ -442,6 +442,8 @@ class Environment { void PrintSyncTrace() const; inline void set_trace_sync_io(bool value); + inline int64_t get_async_wrap_uid(); + bool KickNextTick(); inline uint32_t* heap_statistics_buffer() const; @@ -537,6 +539,7 @@ class Environment { bool using_domains_; bool printed_error_; bool trace_sync_io_; + int64_t async_wrap_uid_; debugger::Agent debugger_agent_; HandleWrapQueue handle_wrap_queue_; From dab862ff671a6561f119b9e84b01b59bd6dfc887 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 20 Oct 2015 12:20:10 -0600 Subject: [PATCH 013/262] async_wrap: call callback in destructor Call a user's callback to notify that the handle has been destroyed. Only pass the id of the AsyncWrap instance since the object no longer exists. The object that's being destructed should never be inspected within the callback or any time afterward. This commit make a breaking change. The init callback will now be passed arguments in the order of provider, id, parent. PR-URL: https://github.com/nodejs/node/pull/3461 Reviewed-By: Fedor Indutny --- src/async-wrap-inl.h | 19 ++++++++++++++++++- src/async-wrap.cc | 3 +++ src/async-wrap.h | 2 +- src/env.h | 1 + ...st-async-wrap-disabled-propagate-parent.js | 2 +- .../test-async-wrap-propagate-parent.js | 2 +- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 9aaf67d3a8c518..1d9ebe27e45bef 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -41,11 +41,12 @@ inline AsyncWrap::AsyncWrap(Environment* env, v8::Local argv[] = { v8::Int32::New(env->isolate(), provider), + v8::Integer::New(env->isolate(), get_uid()), Null(env->isolate()) }; if (parent != nullptr) - argv[1] = parent->object(); + argv[2] = parent->object(); v8::MaybeLocal ret = init_fn->Call(env->context(), object, ARRAY_SIZE(argv), argv); @@ -57,6 +58,22 @@ inline AsyncWrap::AsyncWrap(Environment* env, } +inline AsyncWrap::~AsyncWrap() { + if (!ran_init_callback()) + return; + + v8::Local fn = env()->async_hooks_destroy_function(); + if (!fn.IsEmpty()) { + v8::HandleScope scope(env()->isolate()); + v8::Local uid = v8::Integer::New(env()->isolate(), get_uid()); + v8::MaybeLocal ret = + fn->Call(env()->context(), v8::Null(env()->isolate()), 1, &uid); + if (ret.IsEmpty()) + FatalError("node::AsyncWrap::~AsyncWrap", "destroy hook threw"); + } +} + + inline bool AsyncWrap::ran_init_callback() const { return static_cast(bits_ & 1); } diff --git a/src/async-wrap.cc b/src/async-wrap.cc index 767e76831c3d04..c9f5caad1e4ea8 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -131,6 +131,8 @@ static void SetupHooks(const FunctionCallbackInfo& args) { env->set_async_hooks_pre_function(args[1].As()); if (args[2]->IsFunction()) env->set_async_hooks_post_function(args[2].As()); + if (args[3]->IsFunction()) + env->set_async_hooks_destroy_function(args[3].As()); } @@ -156,6 +158,7 @@ static void Initialize(Local target, env->set_async_hooks_init_function(Local()); env->set_async_hooks_pre_function(Local()); env->set_async_hooks_post_function(Local()); + env->set_async_hooks_destroy_function(Local()); } diff --git a/src/async-wrap.h b/src/async-wrap.h index 5fbd2309383d87..5db29600bcd180 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -51,7 +51,7 @@ class AsyncWrap : public BaseObject { ProviderType provider, AsyncWrap* parent = nullptr); - inline virtual ~AsyncWrap() override = default; + inline virtual ~AsyncWrap(); inline ProviderType provider_type() const; diff --git a/src/env.h b/src/env.h index e41863ac74a698..ea5e8fea6edf62 100644 --- a/src/env.h +++ b/src/env.h @@ -231,6 +231,7 @@ namespace node { V(async_hooks_init_function, v8::Function) \ V(async_hooks_pre_function, v8::Function) \ V(async_hooks_post_function, v8::Function) \ + V(async_hooks_destroy_function, v8::Function) \ V(binding_cache_object, v8::Object) \ V(buffer_constructor_function, v8::Function) \ V(buffer_prototype_object, v8::Object) \ diff --git a/test/parallel/test-async-wrap-disabled-propagate-parent.js b/test/parallel/test-async-wrap-disabled-propagate-parent.js index de36071524c4fe..70d82befe72a63 100644 --- a/test/parallel/test-async-wrap-disabled-propagate-parent.js +++ b/test/parallel/test-async-wrap-disabled-propagate-parent.js @@ -10,7 +10,7 @@ let cntr = 0; let server; let client; -function init(type, parent) { +function init(type, id, parent) { if (parent) { cntr++; // Cannot assert in init callback or will abort. diff --git a/test/parallel/test-async-wrap-propagate-parent.js b/test/parallel/test-async-wrap-propagate-parent.js index 8074b0062e0db2..beeb27ba7866a9 100644 --- a/test/parallel/test-async-wrap-propagate-parent.js +++ b/test/parallel/test-async-wrap-propagate-parent.js @@ -9,7 +9,7 @@ let cntr = 0; let server; let client; -function init(type, parent) { +function init(type, id, parent) { if (parent) { cntr++; // Cannot assert in init callback or will abort. From 33474b752926b52b4fe642783357a24f8e4d3474 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 20 Oct 2015 22:43:47 -0400 Subject: [PATCH 014/262] doc: add TSC meeting minutes 2015-10-14 Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/3463 --- doc/tsc-meetings/2015-10-14.md | 121 +++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 doc/tsc-meetings/2015-10-14.md diff --git a/doc/tsc-meetings/2015-10-14.md b/doc/tsc-meetings/2015-10-14.md new file mode 100644 index 00000000000000..65a0f467cdffb3 --- /dev/null +++ b/doc/tsc-meetings/2015-10-14.md @@ -0,0 +1,121 @@ +# Node Foundation TSC Meeting 2015-10-14 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-10-14 +* **GitHub Issue**: https://github.com/nodejs/node/issues/3363 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Rod Vagg (TSC) +* Domenic Denicola (observer) +* Brian White (TSC) +* Steven Loomis (observer) +* James Snell (TSC) +* Michael Dawson (observer) +* Ben Noordhuis (TSC) +* Jeremiah Senkpiel (TSC) +* Trevor Norris (TSC) +* Alexis Campailla (TSC) +* Mikeal Rogers (observer) + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* V8 security reporting [#3348](https://github.com/nodejs/node/issues/3348) +* doc: add information about Assert behavior and maintenance [#3330](https://github.com/nodejs/node/pull/3330) +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) + +### nodejs/TSC + +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + + +## Minutes + +### Standup + +* Rod Vagg: Not quite as involved, took a bit of time off. Getting back up to speed on build +* Domenic: Nothing this week +* Brian: PRs & Issues +* Steven: Worked on getting ICU 56.1 out and into v4.2.0 LTS, working on making the ICU [install better](https://github.com/nodejs/node-v0.x-archive/issues/8996#issuecomment-89411193). Also shepherding iojs-* rename to nodejs-* [#2525](https://github.com/nodejs/node/issues/2525) +* James: Worked on the 4.2.0 and 4.2.1 releases. Working on the cgitm smoke-testing tool and http WG. +* Michael: Worked on adding pLinux to the CI. Looking into running the tests on fips-compliant mode. Investigated some AIX issues. +* Ben: PRs & Issues, doing some work on the debugger and memory bugs in libuv +* Jeremiah: PRs & Issues, working on resolving the timers in beforeExit bug: https://github.com/nodejs/node/pull/2795 +* Trevor: Helped Jeremiah with the beforeExit thing, worked on PRs and Issues. Looking into AsyncWrap improvements. +* Alexis: Looking into a native module build service. Worked on the Ci a bit. +* Mikeal: Worked on the Umbrella Program proposal. Helping set up the Node.js Interactive conference. + + +### Review of previous meeting + +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* lib,test: deprecate _linklist [#3078](https://github.com/nodejs/node/pull/3078) +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + + +### V8 security reporting [#3348](https://github.com/nodejs/node/issues/3348) + +Michael: Proposal is to add one or more TSC members to the V8 security list. Not all issues will actually be V8 issues, but there shouldn’t be too many. + +* Concerns about too many issues + +Michael: Let’s go back and ask if a handfull means only 4-5 a week. + +Mikeal: Part of the Umbrella Program is to make a top-level security group that all security issues are funneled through. This group may not need to be TSC members. + +Ben: How would this group know an issue is relevant to us? + +Rod: We are talking about a Chromium security list, so we would probably need someone with enough knowledge to filter out which issues affect us. + +Mikeal: They would only be an initial filter. + +Rod: Some chromium issues will not be recognizable as V8 issues without prior understanding. + +Rod & others: Suggest to add Ben and Fedor to add to the Chromium/V8 security list. + +Discussion about the current Security repo / group, and current mailing lists + +### doc: add information about Assert behavior and maintenance [#3330](https://github.com/nodejs/node/pull/3330) + +Discussion about what assert is intended to do, and how we want to deal with additions and breaking changes in the future. + +Discussion about the stability index in the docs. + +Resolution: Lock the assert module. Possibly re-evaluate in the future. Close existing open PRs/issues against it after landing doc change. + + +### WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) + +James: having scheduling problems for an initial hangout but are getting a lot of interest from outside of core, including Doug Wilson and Eran Hammer. + +Discussion about the WG’s goals and how we should possibly think about handing over authority of the http module to this WG in the future. (At charter time or later on) + +### Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) + +James: recommended that we adopt a general rule that commits must go through at least one stable release before going into an LTS. Exceptions to this are security problems and changes that can’t go on to stable. + +### Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) + +Conclusion was that this would be difficult and would result in a build that had some features disabled. The TSC is not going to undertake this work and would have reservations officially supporting a build that cripples some crypto features. However, pull requests for this work are welcome and would be considered. + +### Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +Mikeal sought a vote from the TSC to adopt the Project Lifecycle document and the Core TLP document. + +Resolution: there were no abstentions from voting and no disagreement amongst TSC members present, additional TSC members have registered their +1 on the PR so the motion is passed. + +## Next Meeting + +October 21st, 2015 From fcb67d706b1b636d288bfb6bea217b165e3a7e7e Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 21 Oct 2015 23:42:27 -0400 Subject: [PATCH 015/262] doc: add TSC meeting minutes 2015-10-21 Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/3480 --- doc/tsc-meetings/2015-10-21.md | 214 +++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 doc/tsc-meetings/2015-10-21.md diff --git a/doc/tsc-meetings/2015-10-21.md b/doc/tsc-meetings/2015-10-21.md new file mode 100644 index 00000000000000..5aad511600bb88 --- /dev/null +++ b/doc/tsc-meetings/2015-10-21.md @@ -0,0 +1,214 @@ +# Node Foundation Core Technical Committee (CTC) Meeting 2015-10-21 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-10-21 +* **GitHub Issue**: https://github.com/nodejs/node/issues/3464 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Rod Vagg (CTC) +* Brian White (CTC) +* Steven R. Loomis (observer) +* James Snell (CTC) +* Michael Dawson (observer) +* Chris Dickinson (CTC) +* Ben Noordhuis (CTC) +* Jeremiah Senkpiel (CTC) +* Trevor Norris (CTC) +* Alexis Campailla (CTC) +* Mikeal Rogers (observer) +* Shigeki Ohtsu (CTC) +* Seth Thompson (observer) +* Bert Belder (CTC) +* Fedor Indutny (CTC) +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* governance: add new collaborators #VIII [#3472](https://github.com/nodejs/node/issues/3472) +* detect "full-icu" module [#3460](https://github.com/nodejs/node/issues/3460) +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* node: deprecate public access to `process.binding` [#2768](https://github.com/nodejs/node/pull/2768) + +## Minutes + +### Review of previous meeting + +* V8 security reporting [#3348](https://github.com/nodejs/node/issues/3348) +* doc: add information about Assert behavior and maintenance [#3330](https://github.com/nodejs/node/pull/3330) +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* Discussion: LTS & v5 release planning [#3000](https://github.com/nodejs/node/issues/3000) +* Compiling node v4.0.0 with OpenSSL 1.0.1 fails [#2783](https://github.com/nodejs/node/issues/2783) +* Umbrella Program [#2](https://github.com/nodejs/TSC/pull/2) + +### Standup + +* Rod Vagg: index.tab and index.json updates (nodejs.org/dist/index.*) including an “lts” field, also made consistent directories for ancient Node tarballs with shasums files so nvm and other tools can simplify their access. v5 and other build yak shaving. +* Brian White: usual triaging and PR and Issues commenting, not much else +* Steven R. Loomis: Intl meeting, "full-icu" npm module [will be away until Nov 11 meeting, Unicode conf/Unicode-TC] +* James Snell: Working on localization for the node runtime [#3413](https://github.com/nodejs/node/pull/3413) +* Michael Dawson: Working through PPC and AIX PRs and issues, LTS WG discussions, Benchmarking WG, working with Stefan on agenda items for API WG meeting. +* Chris Dickinson: was busy with vacation and conferences, but looking into the WhatWG Streams spec, next up is static analysis server +* Ben Noordhuis: The usual. Looking into make the debugger better. The test suite is in bad shape +* Jeremiah Senkpiel: issue and PR work — going back through the backlog now, helping with v5 release + npm@3 +* Trevor Norris: flurry of AsyncWrap PRs, trying to get it to a point where people could more reliably use it, it can’t be hidden forever. +* Alexis Campailla: Sick, traveling; CI progress on flakiness, some progress on native module build service +* Mikeal Rogers: Foundation resources for v5 release: PR folks wrote a blog post, expectation setting, make sure enterprises are still using LTS, if you’re a dev here’s what to be excited about, etc. +* Shigeki Ohtsu: Worked semver-major fix to limit DH key size [#1831] (https://github.com/nodejs/node/pull/1831) and some works for root certs. +* Seth Thompson: Security mailing list stuff went through this week, working on v8 side of things to create a new version of the octane benchmark, excited about the benchmarking WG +* Bert Belder: nothing +* Fedor Indutny: reviewing PRs, helped fix a beforeExit bug, fixing yet another V8’s ArrayBuffer issue + - Discussed the ArrayBuffer issue in detail + +* (Aside: Shigeki and Fedor were asked to look at [#3406](https://github.com/nodejs/node/issues/3406) - “p1/p2” issue ) + +### governance: add new collaborators #VIII [#3472](https://github.com/nodejs/node/issues/3472) + +- Discussed onboarding. + +- Action: Jeremiah to schedule and run another onaboarding, Chris to tune in. + +### detect "full-icu" module [#3460](https://github.com/nodejs/node/issues/3460) + +Stems from conversation from the 0.X days about whether Node should ship other languages separately. + +This is a module published on npm as an alternative to shipping with Node proper. + +Whether node can detect a full-icu install in a special place (node_modules/full-icu, global/node_modules/full-icu) + +Nathan7 commented with a concern about coupling npm to node + +Currently have to start node with ICU_DATA_PATH=some/path/to/file + +Rod: Couple it to `execPath` + +James: globally installed could install into a well known global location + +Rod: Does this have to be done at startup? + +Stephen: Yes. V8 has to have the data available before starting. + +James: Happens right after parsing args + +Rod: Could use HOME? + +Stephen: Could use NODE_PATH? + +Rod: Trying to move away from NODE_PATH + +Ben: Might just bite the bullet and include ICU? + +Stephen: I would like that, but I am sympathetic to folks running on OpenWRT + +Ben: I can see that, but all this installing in special paths leaves a lot of margin for error. + +James: Full ICU will double the size of the Node binary. Hard pill to swallow. + +Rod: We could offer alternative downloads? + +Stephen: Two downloads would work as well. We could do this all from build infra. + +Bert: I would not be in favor of that. We end up with “oh my module doesn’t work” “oh you didn’t download the right flavor of Node” + +Jeremiah: It’s going to make it confusing no matter what + +... [I missed this] + +Chris: could we offer better error messages? + +Rod: it peeks through in a lot of places — the ICU object, strings, etc. Maybe best to leave to module authors? Include a process.versions.icu object? + +James: small-icu is the default build running locally — CI doesn’t run with ICU enabled? + +Trevor: even if small-icu is there, it means less data, but not less build time. I would like to see how that affects the raspberry pi’s build time. + +Ben: we could avoid rebuilding ICU on rasppis + +Stephen: or use a precompiled ICU + +Jeremiah: Assumes an internet connected machine + +Rod: If we go with small-icu we should make it available + +Ben: should we add it to the repo? + +Alexis: I think so, it’s causing problems + +[???]: It’s about 80mb + +Rod: How big is it? + +Stephen: The source size & binary size was comparable to Node. +We could have a non-standard source checked in. + +Mikeal: we could use the large file storage stuff GH just added. +Stephen: 25mb uncompressed, 130mb for source tree + +Mikeal: if we say “you need ICU to build” we need to make it available + +Trevor: How’s this going to work with bouncing between branches? + +Alexis: What about keeping it as text? + +Ben: + +Steven: We have a 25mb compressed zip of source, that itself contains a 25mb compressed zip. We could strip that down — what would it take to delete the tests, etc — a subset + +Mikeal: so could we just install this 25mb file? + +Rod: This adds a dep on Git LFS + +Mikeal: Let’s try to solve one problem at a time — fix downloading, not making the default + +Rod: I’m happy with how the CI does it + +… + +Stephen: The first time you hit something ICU-based it loads it. + +Rod: I’m just wondering if this could be turned into a proper npm module. + +Stephen: I’m not sure — it looks pretty deeply enmeshed into V8 + +Seth: I don’t have answers off the top of my head on that one, I responded on the thread; we don’t currently have a priority to mess +around with localization. If there’s a design doc that proposes cleaning things up we’d be interested + +James: Resource bundle mechanism — [Note: didn’t get all of this] “using the same startup sequence as Intl.. so needs to be configured at start time” (https://github.com/nodejs/node/pull/3413 uses ICU’s resource bundle mechanism, which uses the same init path as the core data. ICU does not allow multiple initializations. + +Alexis: If the only reason we’re trying to package it is to use npm to install it, maybe we’re complicating this unnecessarily + +Rod: On the iojs side we decided not to go with ICU. It’s in core because it has to be initialized before v8 is started, my question is this something that could be changed upstream in v8? Ideally this should not be in core. + +Steven: It didn’t look like it could be split off easily. + +Chris: JS proxies + +Steven: Possible, but _very_ tricky + +[Moving conversation to GH] + + +### WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) + +HTTP WG first meeting is tomorrow at 1pm Pacific, nothing to discuss yet + +### node: deprecate public access to `process.binding` [#2768](https://github.com/nodejs/node/pull/2768) + +Lots of discussion, focused on `process.binding('natives')`. Summary: We should at least try to make it read-only first. Ben said he would follow up with a PR. + +### node: make listen address configurable [#3316](https://github.com/nodejs/node/pull/3316) + +Fedor: Ben suggested commandline argument to submit hostname and port. Fedor concerned about the amout of code required to parse and separate the two parts of the option. Would be better to have a separate argument for hostname. + +Discussion about usability vs simplicity of code. + +Quick vote on whether to move forward with the PR in its current form, no objections. + +## Next Meeting + +October 28th, 2015 From 15ae55ea83647e6adf381689f0e3d08b0aa870f0 Mon Sep 17 00:00:00 2001 From: Michael Cornacchia Date: Tue, 27 Oct 2015 12:55:09 -0400 Subject: [PATCH 016/262] test: fix race condition in unrefd interval test Rely more on timers implementation rather than arbitrary timeouts. Refs: https://github.com/nodejs/node/issues/1781 PR-URL: https://github.com/nodejs/node/pull/3550 Reviewed-By: Jeremiah Senkpiel --- ...test-timers-unrefd-interval-still-fires.js | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-timers-unrefd-interval-still-fires.js b/test/parallel/test-timers-unrefd-interval-still-fires.js index 98bd278b451613..a716c6ed645cbd 100644 --- a/test/parallel/test-timers-unrefd-interval-still-fires.js +++ b/test/parallel/test-timers-unrefd-interval-still-fires.js @@ -2,19 +2,27 @@ /* * This test is a regression test for joyent/node#8900. */ -require('../common'); -var assert = require('assert'); +const common = require('../common'); +const assert = require('assert'); -var N = 5; +const TEST_DURATION = common.platformTimeout(100); +const N = 5; var nbIntervalFired = 0; -var timer = setInterval(function() { + +const keepOpen = setTimeout(() => { + console.error('[FAIL] Interval fired %d/%d times.', nbIntervalFired, N); + throw new Error('Test timed out. keepOpen was not canceled.'); +}, TEST_DURATION); + +const timer = setInterval(() => { ++nbIntervalFired; - if (nbIntervalFired === N) + if (nbIntervalFired === N) { clearInterval(timer); + timer._onTimeout = () => { + throw new Error('Unrefd interval fired after being cleared.'); + }; + setImmediate(() => clearTimeout(keepOpen)); + } }, 1); timer.unref(); - -setTimeout(function onTimeout() { - assert.strictEqual(nbIntervalFired, N); -}, 100); From 39056e2426ff40c3133cbeba1dc3fd59b964c020 Mon Sep 17 00:00:00 2001 From: Emily Aviva Kapor-Mater Date: Thu, 29 Oct 2015 14:52:36 -0700 Subject: [PATCH 017/262] doc: add final full stop in CONTRIBUTING.md PR-URL: https://github.com/nodejs/node/pull/3576 Reviewed-By: Rich Trott Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Roman Reiss Reviewed-By: Sakthipriyan Vairamani --- CONTRIBUTING.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42e2d574cfc52a..20b012697e6629 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,20 +51,21 @@ and built upon. The rules for the master branch are less strict; consult the [stability index](./doc/api/documentation.markdown#stability-index) for details. -In a nutshell, modules are at varying levels of API stability. Bug fixes are +In a nutshell, modules are at varying levels of API stability. Bug fixes are always welcome but API or behavioral changes to modules at stability level 3 (Locked) are off-limits. #### Dependencies Node.js has several bundled dependencies in the *deps/* and the *tools/* -directories that are not part of the project proper. Any changes to files +directories that are not part of the project proper. Any changes to files in those directories or its subdirectories should be sent to their respective -projects. Do not send your patch to us, we cannot accept it. +projects. Do not send your patch to us, we cannot accept it. In case of doubt, open an issue in the [issue tracker](https://github.com/nodejs/node/issues/) or contact one of the [project Collaborators](https://github.com/nodejs/node/#current-project-team-members). + Especially do so if you plan to work on something big. Nothing is more frustrating than seeing your hard work go to waste because your vision does not align with the project team. Node.js has two IRC channels, @@ -89,8 +90,8 @@ $ git config --global user.name "J. Random User" $ git config --global user.email "j.random.user@example.com" ``` -Writing good commit logs is important. A commit log should describe what -changed and why. Follow these guidelines when writing one: +Writing good commit logs is important. A commit log should describe what +changed and why. Follow these guidelines when writing one: 1. The first line should be 50 characters or less and contain a short description of the change prefixed with the name of the changed @@ -132,15 +133,15 @@ $ git rebase upstream/master ### Step 5: Test -Bug fixes and features **should come with tests**. Add your tests in the -test/parallel/ directory. Look at other tests to see how they should be +Bug fixes and features **should come with tests**. Add your tests in the +test/parallel/ directory. Look at other tests to see how they should be structured (license boilerplate, common includes, etc.). ```text $ ./configure && make -j8 test ``` -Make sure the linter is happy and that all tests pass. Please, do not submit +Make sure the linter is happy and that all tests pass. Please, do not submit patches that fail either check. If you are updating tests and just want to run a single test to check it, you @@ -168,9 +169,9 @@ $ git push origin my-feature-branch Go to https://github.com/yourusername/node and select your feature branch. Click the 'Pull Request' button and fill out the form. -Pull requests are usually reviewed within a few days. If there are comments +Pull requests are usually reviewed within a few days. If there are comments to address, apply your changes in a separate commit and push that to your -feature branch. Post a comment in the pull request afterwards; GitHub does +feature branch. Post a comment in the pull request afterwards; GitHub does not send out notifications when you add commits. From cf4a8d5125e01490b7edab541e13756e38e95154 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 4 Nov 2015 22:56:17 +1100 Subject: [PATCH 018/262] doc: add CTC meeting minutes 2015-10-28 PR-URL: https://github.com/nodejs/node/pull/3661 Reviewed-By: James M Snell --- doc/ctc-meetings/2015-10-28.md | 276 +++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 doc/ctc-meetings/2015-10-28.md diff --git a/doc/ctc-meetings/2015-10-28.md b/doc/ctc-meetings/2015-10-28.md new file mode 100644 index 00000000000000..5efe94454ad3f8 --- /dev/null +++ b/doc/ctc-meetings/2015-10-28.md @@ -0,0 +1,276 @@ +# Node Foundation CTC Meeting 2015-10-28 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/ctc-meeting-2015-10-28 +* **GitHub Issue**: https://github.com/nodejs/node/issues/3561 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Rod Vagg (CTC) +* Brian White (CTC) +* James Snell (CTC) +* Chris Dickinson (CTC) +* Ben Noordhuis (CTC) +* Jeremiah Senkpiel (CTC) +* Trevor Norris (CTC) +* Alexis Campailla (CTC) +* Mikeal Rogers (observer) +* Shigeki Ohtsu (CTC) +* Seth Thompson (observer) +* Bert Belder (CTC) +* Fedor Indutny (CTC) +* Ben Noordhuis (CTC) +* Colin Ihrig (CTC) + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* Load JSON-LD in the same way as JSON [#3502](https://github.com/nodejs/node/pull/3502) +* fs: decode filenames using UTF-8 in fs.watch [#3401](https://github.com/nodejs/node/pull/3401) +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) + +## Minutes + +### Review of previous meeting + +* governance: add new collaborators #VIII [#3472](https://github.com/nodejs/node/issues/3472) +* detect "full-icu" module [#3460](https://github.com/nodejs/node/issues/3460) +* WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) +* node: deprecate public access to `process.binding` [#2768](https://github.com/nodejs/node/pull/2768) +* node: make listen address configurable [#3316](https://github.com/nodejs/node/pull/3316) + +### Standup + +* Rod Vagg (CTC): Traveling, rc for v5.x, going to put another rc out today, comfortable with it getting released tomorrow. If it slips we’ll put it off until next week. Just need to do more smoke testing on this. +* Brian White (CTC): Not a whole lot this week — triaging, responding to issues. +* James Snell (CTC): Getting HTTP parser up to v2.6; getting 4.2.2 LTS update ready to go. open issue on LTS repo, would love eyes on it, to verify that the commits going into 4.2.2 look good. (https://github.com/nodejs/LTS/issues/50) working with Miles on getting CITGM updated. +* Chris Dickinson (CTC): Some silly build stuff +* Jeremiah Senkpiel (CTC): Not much — computer was dead since last Friday, ): but repaired now. +* Trevor Norris (CTC): Bugs and issues — couple of outstanding PRs around asyncwrap, one done at Fedor’s request to make AsyncWrap public, in order to make JSStream class public +* Alexis Campailla (CTC): Meetings; first API WG meeting, defining scope of the work for the WG, we want to address engine abstraction and native module API and some performance issues; small work in CI to add diagnostics; progress on module build service, going to post finding soon to get feedback +* Mikeal Rogers (observer): getting a lot of interest on a certification program for node, for alternative implementations, looking at notes for API WG (thanks for taking great notes! that was awesome) I reached out to a few people that may contribute as well +* Seth Thompson (observer): No updates this week. +* Bert Belder (CTC): nothing noteworthy +* Ben Noordhuis (CTC): Fixed debugger bugs, reviewed a lot of pull requests. +* Colin Ihrig (CTC): Trying to help out with issue tracker, anticipate in another week ½ I should have significantly more time to work on core. + +### Load JSON-LD in the same way as JSON [#3502](https://github.com/nodejs/node/pull/3502) + +* adds .jsonld files to require.extensions so that they’d load using json loader + +Rod: I raised this to CTC. I see this as a slippery slope, adding anything more to require.extensions. I don’t see how this won’t turn into XML — turns into bloat in formats that folks want to support. My preference would be to let the ecosystem figure this out and let folks write their own JSON loaders. + +Jeremiah: also probably belongs in npm + +James: .jsonld is just a json file with a special syntax internally. I have a module that loads it. It’s very easy to work around. Rename the file to use a json extension. I don’t see the harm in landing it, but if we don’t want to go that route, + +Mikeal: is the patch to add the extension or to give you your own serializer (extension) + +Bert: It seems harmless, but 6 months from now what if someone shows up and says “hey you’re not validating it properly” and then we have to add a validator … I’m very sensitive to slippery slope argument + +Alexis: Is it a different syntax? + +Bert: is every json document a valid jsonld document? + +James: no. + +Mikeal: we’re using a parser from npm, are we going to get a war between parsers, swapping them out? + +James: this doesn’t do any special parsing for jsonld, it just aliases json and uses the existing process. + +Trevor: the problem is what it opens us up to. invariably this leads to more PRs. this patch I don’t have a problem with, but I have a problem with this kind of patch in the future + +Bert: I think we’re reaching consensus here, which is: reject this patch. is anyone here strongly in favor. + +Ben: not in favor. one argument is jsonld is now a standard. but I too am sensitive to the slippery slope argument, so I’m perfectly fine with rejecting it. + +James: when rejecting it, it would be worthwhile to note how to work around it. I can do this. + +Jeremiah: require.extensions is not going to change anytime soon, so folks can write their own. + +Bert: I think we can go to the next issue. + +### fs: decode filenames using UTF-8 in fs.watch [#3401](https://github.com/nodejs/node/pull/3401) + +See also [#3519](https://github.com/nodejs/node/issues/3519) + +Bert: this is Ben’s issue. + +Ben: I wouldn’t say it’s my issue, but I’ve been involved +the thing is that filenames are frequently (but not always) utf8, the problem is now that node in one or two places it doesn’t encode utf8 [Ben, post meeting addition: For background: I thought we had some file logic baked into node::Environment and the dtrace/etw/lttng/systemtap subsystems but turns out that's not the case.] + +Bert: where else are we encoding differently? + +Ben: I can answer this in a few seconds. At least, I think there are more places. Maybe I’m mistaken, also a possibility! + +Jeremiah: I think someone else said it was only fs.watch too. + +Bert: I’ve seen the discussion but I haven’t commented. I think there’s a problem with assuming that all files are all utf8, but it seems inconsequential to assume this everywhere but this one place + +Ben: this is not the best issue to link to, I agree it’s inconsistent to do utf8 in most places and latin1 in only one place. There’s a link to another issue 3519. my beef with the PR is not that it’s a terrible fix, it’s more that decoding to utf8 is not always the right thing to do because not all fs are utf-8. If we’re going to do this it has to be a semver major, and if we’re going to do a semver major, then it may as well be a full fix, which I’ve outlined in 3519. + +Bert: there’s actually some discussions we need to have around these things. Your suggestion is to not land this PR, and instead fix this the right way. Do you think it’s likely that 3519 will see attention any time soon? + +Ben: It’s on my todo list. I should mention that the way node deals with file names has been a thorn in my side for a long time now, I’ve been planning to do something about it for a long time, so take this as you will. + +Bert: my question is: do we take this PR now, ahead of + +Bert: customizable decoding + +Mikeal: is the other one going to be a breaking change? + +Ben: yes + +Bert: or it could be a bugfix? + +Mikeal: so it would make sense to buffer as many changes around that as possible. + +Jeremiah: we could land the semver-major fix on master which would go into 6.x, then if we have time before 6.x we could do the proper fix. maybe that keeps us from fixing it entirely though? + +Ben: that’s my problem, it’s a bandaid that lets us truck on for a another couple of years. + +James?: I don’t really like quick fixes, but … + +Trevor: on the fs doc page, a lot of those calls reference the system level call, on unix do those use utf8 + +Ben: how do you mean? + +Trevor: for example, stat, first arg is char* pathname, if i were to take a utf8 string and read that in… what encoding does it use? + +Ben: syscall is agnostic. kernel treats as string of bytes. in node, we call fs.stat in javascript, string is decoded to utf8, then passed on to the kernel. + +Trevor: if i have a file that’s latin1, I’d have to turn that into a buffer as a binary buffer then tostring it to a utf8 string in order for the file to be open? + +[multiple people are talking] + +Ben: yes. + +Ben: sometimes it’s not possible to open files with funny characters in their names. + +Trevor: if there were a file with invalid utf8 characters it’d be impossible to open those, right? + +Ben: yep. + +James: I’m not a fan of the quick fix. I am okay with incremental so long as the larger task gets done, but … + +Bert: I am in favor of the quick fix, it restores consistency in the way node does things. practically speaking, almost all fs are going to be utf-8. it fixes the problem where fs.watch tells you “hey a file changed” but you go to look and the file’s not there due to the encoding scheme. I’d like to make a little improvement. the problem has been known since at least 2011, and we’ve never gotten around to it. I would not be surprised if it takes another 4 years for someone to take a stab at it. + +Brian: is it possible to get the user’s LOCALE and convert to that before sending it off? + +Ben: that’s worse than what we have now. + +James: the LOCALE often lies. + +Bert: are we going to land the patch to fs.watch? I’d like to have a quick references. + +Trevor: it’s not going to land in 5, we could leave it open until near v6 and land it then if no one is able to get around to the full fix. there’s 5-6 months between 5 and 6… + +Rod: that sounds like a nice compromise. + +### WG: Considering a new HTTP WG [#3214](https://github.com/nodejs/node/issues/3214) + +Rod: I left this on because I thought it’d be nice to get a report from the WG on how it went. + +James: [cd: I am missing folk here]: Jeremiah, Eran Hammer, Doug Wilson, Myles Borins Brian White, Patrick Mueller, and myself. + +We talked about the charter. Looking into what improvements can be made to better support the ecosystem. Making existing impl hookable so that modules could swap out parts of the implementation with their own. Like replacing the parser, or header specific handling. The charter covers that aspect of it, but emphasizes that existing systems are not broken. We have a number of issues that we’ve created to start discussing these. I’ll get these into the doc. + +That’s the short version. Still really early to tell what all will come of it and what kind of schedule it’ll be on. 5th, at [cd: TIME?] +We’ll be drawing up a charter and bringing it back to this group. + +Any other questions? + +Rod: could we get a report on the API WG? + +Trevor: the discussion was mainly around the native api. it went in a direction I wasn’t expecting. I explained my JS API proposal, then it went into a module discussion. ABI compat is straight out, it went in the direction of NAN (API compat, but occasional recompiles). Some discussion arose around abstracting node, like v8 completely. to replace with another VM. How do you handle specific difference like features that are available in one vm or another? or JS features that are/aren’t available between VMs. To target all vms, you end up having to use ES5. I was kind of losing where they were going with it. there are a lot of smart people. We’ll just have to have a discussion about feasibility. + +Ben: Was there any talk about who’s going to do the actual work? + +Trevor: No — it was more theoretical. It was more like the ES committee — develop features then say “go make these.” IF I bring it up I’m sure I can get some solid answers. + +Alexis: I’m trying to push for the Chakra folks to do some of this work. + +Mikeal: [cd: sorry, I missed this.] + +Rod: What companies are involved? Did MS show up? + +Trevor: Yes, I think so. JXCore, IBM was there, can’t remember offhand. + +Bert: JXCore is also secretly MS? + +Alexis: Not a secret! They’re on contract for an industrial IoT project. + +Alexis: IBM was there, Nodesource. + +Mikeal: Looking for someone from samsung’s jerryscript team to join. + +Trevor: My initial proposal was to get something usable. I’ll be out of there if it turns into WASM — if it blows up in size. + +Mikeal: The whole point is to be smaller than the current API, right? + +Bert: Well, not smaller, but … let’s not talk about technical issues + +Alexis: We’ve discussed multiple approaches, and we can tackle the problem from multiple sides. Trevor is tackling it by reducing the size of core. The approach I want to take is FFI interface into native modules. All of these approaches can help us tackle this huge beast into a manageable problem. They’re not competing solutions. + +Bert: We want to avoid scope creep. If the WG comes up with a HUGE proposal with 20 points of view, then no one will ever go do it. + +Trevor: I want to simplify the JS API, and get it to a point where all of the existing api can sit on top of it. If someone wants to do the work of replacing V8, they’ll have a clean entry point into the JS. And then write a set of compliance tests that specify what every entry point does. Writing a bunch for native code without JS tests to back it up would be futile. + +Bert: Restricting it to API design, that in theory, the sort of design goal, is for the API to be sufficient for Node to use. + +Alexis: This would include the native module api? + +Rod: It sounds like HTTP attacked charter first, maybe the API WG needs to do the same, to combat growth of scope. Maybe anyone else on this call that wants to could join and try to define scope? Is there another call scheduled, Trevor? + +Trevor: we’re still collecting times. I’ll mention the ctc in the issue. + +Rod: we should make a new @ctc GH group. + +Bert: which is going to be more fun? + +Rod: The CTC + +Bert: when are we going to split up? + +Rod: Mikeal is organizing another meeting. + +Mikeal: It’s tomorrow at this time slot. + +### node-gyp: Windows users are not happy. [node-gyp#629](https://github.com/nodejs/node-gyp/issues/629) + + +Jeremiah: Do we want to talk about the windows issue? + +Rod?: it kind of contains all of the windows problems. + +Alexis: I was asking about guidance on this. + +Rod: there’s a strategy of giving folks a place to vent, keeping it from spilling over elsewhere. Without this issue, it might explode into a bunch more issues. + +Alexis: We’re working on a module build service. The other thing is that MS is going to release a smaller SKU of the compiler, that might be able to be included with node-gyp. + +Rod: Next visual studio is going to be shipping with clang. + +Trevor: Yes for AST stuff. [cd: might have gotten this wrong] + +Rod: Alexis, you should post in there, but I think it’s going to always catch folks googling for the problem. I’m not sure you can resolve it by closing or locking it. Folks will go there and not see a proper resolution. + +Mikeal: make sure there are issues for everything in the thread, then close and lock. Make sure there are resolutions (even if it’s “move hte conversation”). + +Rod: I’m happy for Alexis to take the lead on this. + +Rod: Maybe change the title to “Windows users are happy?” + +Alexis: Maybe change to “Unix users are unhappy.” + +Rod: that’d be an epic troll. + +## Next Meeting + +November 4, 2015 From 6d9d37f300d5f37c60c6224d9185854326bfc2da Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 5 Nov 2015 18:16:18 +0100 Subject: [PATCH 019/262] build: omit -gline-tables-only for --enable-asan `-gline-tables-only` is a clang-only flag. Drop it, it's not needed for address sanitizer-enabled builds and it makes it impossible to build with gcc. Fixes: https://github.com/nodejs/node/issues/3656 PR-URL: https://github.com/nodejs/node/pull/3680 Reviewed-By: Fedor Indutny --- common.gypi | 1 - 1 file changed, 1 deletion(-) diff --git a/common.gypi b/common.gypi index dc7f9b67577d03..5b8b2c09d6b4a9 100644 --- a/common.gypi +++ b/common.gypi @@ -183,7 +183,6 @@ '-fsanitize=address', '-DLEAK_SANITIZER' ], - 'cflags_cc+': [ '-gline-tables-only' ], 'cflags!': [ '-fomit-frame-pointer' ], 'ldflags': [ '-fsanitize=address' ], }], From 595320a55a75aee86f3bae892b1688be7a8d1eff Mon Sep 17 00:00:00 2001 From: Roman Klauke Date: Thu, 5 Nov 2015 20:08:34 +0100 Subject: [PATCH 020/262] doc: add warning about Windows process groups This commit adds a warning for Windows platforms. `process.kill` wont kill a process group on Windows and instead it throws an error. Refs: https://github.com/nodejs/node/issues/3617 PR-URL: https://github.com/nodejs/node/pull/3681 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- doc/api/process.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index 444a4c703ccd3d..7e70a79151083e 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -547,7 +547,8 @@ string describing the signal to send. Signal names are strings like See [Signal Events][] and kill(2) for more information. Will throw an error if target does not exist, and as a special case, a signal -of `0` can be used to test for the existence of a process. +of `0` can be used to test for the existence of a process. Windows platforms +will throw an error if the `pid` is used to kill a process group. Note that even though the name of this function is `process.kill`, it is really just a signal sender, like the `kill` system call. The signal sent may do From 45df9f7628d070950c8cbe3d5a6b51012d05eee3 Mon Sep 17 00:00:00 2001 From: Michael Cornacchia Date: Fri, 6 Nov 2015 12:51:48 -0500 Subject: [PATCH 021/262] test: skip instead of fail when mem constrained MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current implementation of tests for strings with length at or exceeding kStringMaxLength allocate a temporary buffer inside a try block to skip the test if there is insufficient memory. This commit adds an invocation of the garbage collector after the temporary buffer is allocated so that memory is freed for later allocations. Change the corresponding catch block to rethrow the original exception instead of asserting the exception message to provide more information about the exception. Add an additional check before trying to allocate memory to immediately skip the test on machines with insufficient total memory. PR-URL: https://github.com/nodejs/node/pull/3697 Reviewed-By: Trevor Norris Reviewed-By: Ben Noordhuis Reviewed-By: Michaël Zasso Reviewed-By: Jeremiah Senkpiel --- test/common.js | 2 ++ .../test-stringbytes-external-at-max.js | 24 ++++++++++++----- ...ingbytes-external-exceed-max-by-1-ascii.js | 24 ++++++++++++----- ...ngbytes-external-exceed-max-by-1-base64.js | 24 ++++++++++++----- ...ngbytes-external-exceed-max-by-1-binary.js | 24 ++++++++++++----- ...tringbytes-external-exceed-max-by-1-hex.js | 24 ++++++++++++----- ...ringbytes-external-exceed-max-by-1-utf8.js | 24 ++++++++++++----- ...st-stringbytes-external-exceed-max-by-2.js | 26 +++++++++++++------ .../test-stringbytes-external-exceed-max.js | 26 +++++++++++++------ 9 files changed, 140 insertions(+), 58 deletions(-) diff --git a/test/common.js b/test/common.js index b5e3c2a13b331d..3f940789d796b6 100644 --- a/test/common.js +++ b/test/common.js @@ -20,6 +20,8 @@ exports.isLinuxPPCBE = (process.platform === 'linux') && exports.isSunOS = process.platform === 'sunos'; exports.isFreeBSD = process.platform === 'freebsd'; +exports.enoughTestMem = os.totalmem() > 0x20000000; /* 512MB */ + function rimrafSync(p) { try { var st = fs.lstatSync(p); diff --git a/test/parallel/test-stringbytes-external-at-max.js b/test/parallel/test-stringbytes-external-at-max.js index 6678e5355224b3..31f476d66b18ba 100644 --- a/test/parallel/test-stringbytes-external-at-max.js +++ b/test/parallel/test-stringbytes-external-at-max.js @@ -1,22 +1,32 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength); - const maxString = buf.toString('binary'); assert.equal(maxString.length, kStringMaxLength); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js index e982cf9eb092fd..4789089d5e0040 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 1); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength + 1); - assert.throws(function() { buf.toString('ascii'); }, /toString failed/); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js index 43a3358759e249..8f52d6ac30dd9f 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 1); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength + 1); - assert.throws(function() { buf.toString('base64'); }, /toString failed/); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js index 9d0d2c3e897057..79dac9cc41dcf0 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 1); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength + 1); - assert.throws(function() { buf.toString('binary'); }, /toString failed/); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js index 2937b4aab85813..50d0dad5829160 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 1); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength + 1); - assert.throws(function() { buf.toString('hex'); }, /toString failed/); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js index ee297a880dacbd..ecd6eaf954e191 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 1); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf = new Buffer(kStringMaxLength + 1); - assert.throws(function() { buf.toString(); }, /toString failed|Invalid array buffer length/); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-2.js b/test/parallel/test-stringbytes-external-exceed-max-by-2.js index 879e4ae91dfb60..8350c4532eafdc 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-2.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-2.js @@ -1,22 +1,32 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength + 2); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf2 = new Buffer(kStringMaxLength + 2); - -const maxString = buf2.toString('utf16le'); +const maxString = buf.toString('utf16le'); assert.equal(maxString.length, (kStringMaxLength + 2) / 2); diff --git a/test/parallel/test-stringbytes-external-exceed-max.js b/test/parallel/test-stringbytes-external-exceed-max.js index 0a6f585b66f3ad..fd19cfb9e20697 100644 --- a/test/parallel/test-stringbytes-external-exceed-max.js +++ b/test/parallel/test-stringbytes-external-exceed-max.js @@ -1,23 +1,33 @@ 'use strict'; +// Flags: --expose-gc -require('../common'); +const common = require('../common'); const assert = require('assert'); +const skipMessage = + '1..0 # Skipped: intensive toString tests due to memory confinements'; +if (!common.enoughTestMem) { + console.log(skipMessage); + return; +} +assert(typeof gc === 'function', 'Run this test with --expose-gc'); + // v8 fails silently if string length > v8::String::kMaxLength // v8::String::kMaxLength defined in v8.h const kStringMaxLength = process.binding('buffer').kStringMaxLength; try { - new Buffer(kStringMaxLength * 3); + var buf = new Buffer(kStringMaxLength * 2 + 2); + // Try to allocate memory first then force gc so future allocations succeed. + new Buffer(2 * kStringMaxLength); + gc(); } catch(e) { - assert.equal(e.message, 'Invalid array buffer length'); - console.log( - '1..0 # Skipped: intensive toString tests due to memory confinements'); + // If the exception is not due to memory confinement then rethrow it. + if (e.message !== 'Invalid array buffer length') throw (e); + console.log(skipMessage); return; } -const buf0 = new Buffer(kStringMaxLength * 2 + 2); - assert.throws(function() { - buf0.toString('utf16le'); + buf.toString('utf16le'); }, /toString failed/); From 327b746f089fcd99ad9b52e8b02a1d5ed3ff4a6b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 8 Nov 2015 09:51:29 -0800 Subject: [PATCH 022/262] tools: Use `throw new Error()` consistently In preparation for a lint rule that will enforce `throw new Error()` over `throw Error()`, fix the handful of instances in the code that use `throw Error()`. PR-URL: https://github.com/nodejs/node/pull/3714 Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- test/addons/make-callback/test.js | 4 ++-- test/parallel/test-assert.js | 2 +- test/parallel/test-http-mutable-headers.js | 2 +- test/pummel/test-regress-GH-814.js | 2 +- test/pummel/test-regress-GH-814_2.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/addons/make-callback/test.js b/test/addons/make-callback/test.js index 80ea0db796ab30..f3c98770ef335a 100644 --- a/test/addons/make-callback/test.js +++ b/test/addons/make-callback/test.js @@ -40,7 +40,7 @@ assert.strictEqual(42, makeCallback(recv, 'two', 1337)); const target = vm.runInNewContext(` (function($Object) { if (Object === $Object) - throw Error('bad'); + throw new Error('bad'); return Object; }) `); @@ -55,7 +55,7 @@ const forward = vm.runInNewContext(` // Runs in outer context. const endpoint = function($Object) { if (Object === $Object) - throw Error('bad'); + throw new Error('bad'); return Object; }; assert.strictEqual(Object, makeCallback(process, forward, endpoint)); diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index db36abc184b024..7e40ecb78b80c4 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -465,6 +465,6 @@ testBlockTypeError(assert.doesNotThrow, undefined); // https://github.com/nodejs/node/issues/3275 assert.throws(() => { throw 'error'; }, err => err === 'error'); -assert.throws(() => { throw Error(); }, err => err instanceof Error); +assert.throws(() => { throw new Error(); }, err => err instanceof Error); console.log('All OK'); diff --git a/test/parallel/test-http-mutable-headers.js b/test/parallel/test-http-mutable-headers.js index 2a60117328c580..af8fd6d7e8f938 100644 --- a/test/parallel/test-http-mutable-headers.js +++ b/test/parallel/test-http-mutable-headers.js @@ -110,7 +110,7 @@ function nextTest() { break; default: - throw Error('?'); + throw new Error('?'); } response.setEncoding('utf8'); diff --git a/test/pummel/test-regress-GH-814.js b/test/pummel/test-regress-GH-814.js index 4ed4b31ae28143..820903d68873e7 100644 --- a/test/pummel/test-regress-GH-814.js +++ b/test/pummel/test-regress-GH-814.js @@ -46,7 +46,7 @@ var timeToQuit = Date.now() + 8e3; //Test during no more than this seconds. } } else { - throw Error("Buffer GC'ed test -> FAIL"); + throw new Error("Buffer GC'ed test -> FAIL"); } if (Date.now() < timeToQuit) { diff --git a/test/pummel/test-regress-GH-814_2.js b/test/pummel/test-regress-GH-814_2.js index 9de1a2c3f3b86b..d7c6d947919d59 100644 --- a/test/pummel/test-regress-GH-814_2.js +++ b/test/pummel/test-regress-GH-814_2.js @@ -21,7 +21,7 @@ function tailCB(data) { console.error('[FAIL]\n DATA -> '); console.error(data); console.error('\n'); - throw Error('Buffers GC test -> FAIL'); + throw new Error('Buffers GC test -> FAIL'); } } From d96d07d9f11d7fa21d7d6a8da9242f113939e076 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 8 Nov 2015 09:53:50 -0800 Subject: [PATCH 023/262] tools: enforce `throw new Error()` with lint rule Add linting rule requiring `throw new Error()` over `throw Error()`. PR-URL: https://github.com/nodejs/node/pull/3714 Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- .eslintrc | 2 ++ tools/eslint-rules/new-with-error.js | 36 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tools/eslint-rules/new-with-error.js diff --git a/.eslintrc b/.eslintrc index 1d14b72abb2bf3..bf3fc3378f2d92 100644 --- a/.eslintrc +++ b/.eslintrc @@ -87,6 +87,8 @@ rules: # Custom rules in tools/eslint-rules require-buffer: 2 + new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"] + # Global scoped method and vars globals: diff --git a/tools/eslint-rules/new-with-error.js b/tools/eslint-rules/new-with-error.js new file mode 100644 index 00000000000000..b0f550db2ffa2c --- /dev/null +++ b/tools/eslint-rules/new-with-error.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Require `throw new Error()` rather than `throw Error()` + * @author Rich Trott + */ +'use strict'; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + var errorList = context.options.length !== 0 ? context.options : ['Error']; + + return { + 'ThrowStatement': function(node) { + if (node.argument.type === 'CallExpression' && + errorList.indexOf(node.argument.callee.name) !== -1) { + context.report(node, 'Use new keyword when throwing.'); + } + } + }; +}; + +module.exports.schema = { + 'type': 'array', + 'items': [ + { + 'enum': [0, 1, 2] + } + ], + 'additionalItems': { + 'type': 'string' + }, + 'uniqueItems': true +}; From 92e59e19de2d820d72bb0a13d02efb4cb4de4bd5 Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Fri, 6 Nov 2015 14:50:57 -0500 Subject: [PATCH 024/262] doc: Describe FIPSDIR environment variable As per the OpenSSL User Guide, it is possible to use the FIPSDIR environment variable to specify a custom install path for the validated cryptographic module. PR-URL: https://github.com/nodejs/node/pull/3752 Reviewed-By: Michael Dawsson Reviewed-By: Shigeki Ohtsu Reviewed-By: Fedor Indutny --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cea124ac6f46e..c34312b8995b29 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,9 @@ Instructions: Appendix A in the [security policy] (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf). The only exception is that `./config no-asm` can be - used in place of `./config` ) + used in place of `./config`, and the FIPSDIR environment variable + may be used to specify a non-standard install folder for the + validated module, as per User Guide sections 4.2.1, 4.2.2, and 4.2.3. 6. Get into Node.js checkout folder 7. `./configure --openssl-fips=/path/to/openssl-fips/installdir` For example on ubuntu 12 the installation directory was From 00f43121c2129a2bad3f4d794946d6552740faf5 Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Mon, 9 Nov 2015 00:00:56 -0500 Subject: [PATCH 025/262] crypto: disable crypto.createCipher in FIPS mode FIPS 140-2 disallows use of MD5, which is used to derive the initialization vector and key for createCipher(). Modify all tests to expect exceptions in FIPS mode when disallowed API is used, or to avoid testing such API in FIPS Mode. PR-URL: https://github.com/nodejs/node/pull/3754 Reviewed-By: Michael Dawson Reviewed-By: Shigeki Ohtsu Reviewed-By: James M Snell --- src/node_crypto.cc | 5 ++ test/parallel/test-crypto-authenticated.js | 52 +++++++++------ test/parallel/test-crypto-binary-default.js | 11 ++-- test/parallel/test-crypto-cipher-decipher.js | 63 ++---------------- .../test-crypto-cipheriv-decipheriv.js | 65 +++++++++++++++++++ test/parallel/test-crypto-dh.js | 4 +- test/parallel/test-crypto.js | 4 +- 7 files changed, 116 insertions(+), 88 deletions(-) create mode 100644 test/parallel/test-crypto-cipheriv-decipheriv.js diff --git a/src/node_crypto.cc b/src/node_crypto.cc index b03e6444ff8a3b..77ccbfcbbd3759 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2866,6 +2866,11 @@ void CipherBase::Init(const char* cipher_type, int key_buf_len) { HandleScope scope(env()->isolate()); +#ifdef NODE_FIPS_MODE + return env()->ThrowError( + "crypto.createCipher() is not supported in FIPS mode."); +#endif // NODE_FIPS_MODE + CHECK_EQ(cipher_, nullptr); cipher_ = EVP_get_cipherbyname(cipher_type); if (cipher_ == nullptr) { diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 2cc36278332c9b..fa9a78c26e5b59 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -93,32 +93,44 @@ for (var i in TEST_CASES) { (function() { if (!test.password) return; - var encrypt = crypto.createCipher(test.algo, test.password); - if (test.aad) - encrypt.setAAD(new Buffer(test.aad, 'hex')); - var hex = encrypt.update(test.plain, 'ascii', 'hex'); - hex += encrypt.final('hex'); - var auth_tag = encrypt.getAuthTag(); - // only test basic encryption run if output is marked as tampered. - if (!test.tampered) { - assert.equal(hex.toUpperCase(), test.ct); - assert.equal(auth_tag.toString('hex').toUpperCase(), test.tag); + if (common.hasFipsCrypto) { + assert.throws(function() + { crypto.createCipher(test.algo, test.password); }, + /not supported in FIPS mode/); + } else { + var encrypt = crypto.createCipher(test.algo, test.password); + if (test.aad) + encrypt.setAAD(new Buffer(test.aad, 'hex')); + var hex = encrypt.update(test.plain, 'ascii', 'hex'); + hex += encrypt.final('hex'); + var auth_tag = encrypt.getAuthTag(); + // only test basic encryption run if output is marked as tampered. + if (!test.tampered) { + assert.equal(hex.toUpperCase(), test.ct); + assert.equal(auth_tag.toString('hex').toUpperCase(), test.tag); + } } })(); (function() { if (!test.password) return; - var decrypt = crypto.createDecipher(test.algo, test.password); - decrypt.setAuthTag(new Buffer(test.tag, 'hex')); - if (test.aad) - decrypt.setAAD(new Buffer(test.aad, 'hex')); - var msg = decrypt.update(test.ct, 'hex', 'ascii'); - if (!test.tampered) { - msg += decrypt.final('ascii'); - assert.equal(msg, test.plain); + if (common.hasFipsCrypto) { + assert.throws(function() + { crypto.createDecipher(test.algo, test.password); }, + /not supported in FIPS mode/); } else { - // assert that final throws if input data could not be verified! - assert.throws(function() { decrypt.final('ascii'); }, / auth/); + var decrypt = crypto.createDecipher(test.algo, test.password); + decrypt.setAuthTag(new Buffer(test.tag, 'hex')); + if (test.aad) + decrypt.setAAD(new Buffer(test.aad, 'hex')); + var msg = decrypt.update(test.ct, 'hex', 'ascii'); + if (!test.tampered) { + msg += decrypt.final('ascii'); + assert.equal(msg, test.plain); + } else { + // assert that final throws if input data could not be verified! + assert.throws(function() { decrypt.final('ascii'); }, / auth/); + } } })(); diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 6299c869087a6e..806f5de18bbb1f 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -496,12 +496,13 @@ function testCipher4(key, iv) { assert.equal(txt, plaintext, 'encryption and decryption with key and iv'); } +if (!common.hasFipsCrypto) { + testCipher1('MySecretKey123'); + testCipher1(new Buffer('MySecretKey123')); -testCipher1('MySecretKey123'); -testCipher1(new Buffer('MySecretKey123')); - -testCipher2('0123456789abcdef'); -testCipher2(new Buffer('0123456789abcdef')); + testCipher2('0123456789abcdef'); + testCipher2(new Buffer('0123456789abcdef')); +} testCipher3('0123456789abcd0123456789', '12345678'); testCipher3('0123456789abcd0123456789', new Buffer('12345678')); diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js index f33ea5482c8c3a..5f867739abe7ed 100644 --- a/test/parallel/test-crypto-cipher-decipher.js +++ b/test/parallel/test-crypto-cipher-decipher.js @@ -6,6 +6,10 @@ if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); return; } +if (common.hasFipsCrypto) { + console.log('1..0 # Skipped: not supported in FIPS mode'); + return; +} var crypto = require('crypto'); function testCipher1(key) { @@ -62,71 +66,12 @@ function testCipher2(key) { assert.equal(txt, plaintext, 'encryption and decryption with Base64'); } - -function testCipher3(key, iv) { - // Test encyrption and decryption with explicit key and iv - var plaintext = - '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + - 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + - 'jAfaFg**'; - var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv); - var ciph = cipher.update(plaintext, 'utf8', 'hex'); - ciph += cipher.final('hex'); - - var decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv); - var txt = decipher.update(ciph, 'hex', 'utf8'); - txt += decipher.final('utf8'); - - assert.equal(txt, plaintext, 'encryption and decryption with key and iv'); - - // streaming cipher interface - // NB: In real life, it's not guaranteed that you can get all of it - // in a single read() like this. But in this case, we know it's - // quite small, so there's no harm. - var cStream = crypto.createCipheriv('des-ede3-cbc', key, iv); - cStream.end(plaintext); - ciph = cStream.read(); - - var dStream = crypto.createDecipheriv('des-ede3-cbc', key, iv); - dStream.end(ciph); - txt = dStream.read().toString('utf8'); - - assert.equal(txt, plaintext, 'streaming cipher iv'); -} - - -function testCipher4(key, iv) { - // Test encyrption and decryption with explicit key and iv - var plaintext = - '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + - 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + - 'jAfaFg**'; - var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv); - var ciph = cipher.update(plaintext, 'utf8', 'buffer'); - ciph = Buffer.concat([ciph, cipher.final('buffer')]); - - var decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv); - var txt = decipher.update(ciph, 'buffer', 'utf8'); - txt += decipher.final('utf8'); - - assert.equal(txt, plaintext, 'encryption and decryption with key and iv'); -} - - testCipher1('MySecretKey123'); testCipher1(new Buffer('MySecretKey123')); testCipher2('0123456789abcdef'); testCipher2(new Buffer('0123456789abcdef')); -testCipher3('0123456789abcd0123456789', '12345678'); -testCipher3('0123456789abcd0123456789', new Buffer('12345678')); -testCipher3(new Buffer('0123456789abcd0123456789'), '12345678'); -testCipher3(new Buffer('0123456789abcd0123456789'), new Buffer('12345678')); - -testCipher4(new Buffer('0123456789abcd0123456789'), new Buffer('12345678')); - - // Base64 padding regression test, see #4837. (function() { var c = crypto.createCipher('aes-256-cbc', 'secret'); diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js new file mode 100644 index 00000000000000..d325c0facf7e54 --- /dev/null +++ b/test/parallel/test-crypto-cipheriv-decipheriv.js @@ -0,0 +1,65 @@ +'use strict'; +var common = require('../common'); +var assert = require('assert'); + +if (!common.hasCrypto) { + console.log('1..0 # Skipped: missing crypto'); + return; +} +var crypto = require('crypto'); + +function testCipher1(key, iv) { + // Test encyrption and decryption with explicit key and iv + var plaintext = + '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + + 'jAfaFg**'; + var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv); + var ciph = cipher.update(plaintext, 'utf8', 'hex'); + ciph += cipher.final('hex'); + + var decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv); + var txt = decipher.update(ciph, 'hex', 'utf8'); + txt += decipher.final('utf8'); + + assert.equal(txt, plaintext, 'encryption and decryption with key and iv'); + + // streaming cipher interface + // NB: In real life, it's not guaranteed that you can get all of it + // in a single read() like this. But in this case, we know it's + // quite small, so there's no harm. + var cStream = crypto.createCipheriv('des-ede3-cbc', key, iv); + cStream.end(plaintext); + ciph = cStream.read(); + + var dStream = crypto.createDecipheriv('des-ede3-cbc', key, iv); + dStream.end(ciph); + txt = dStream.read().toString('utf8'); + + assert.equal(txt, plaintext, 'streaming cipher iv'); +} + + +function testCipher2(key, iv) { + // Test encyrption and decryption with explicit key and iv + var plaintext = + '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + + 'jAfaFg**'; + var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv); + var ciph = cipher.update(plaintext, 'utf8', 'buffer'); + ciph = Buffer.concat([ciph, cipher.final('buffer')]); + + var decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv); + var txt = decipher.update(ciph, 'buffer', 'utf8'); + txt += decipher.final('utf8'); + + assert.equal(txt, plaintext, 'encryption and decryption with key and iv'); +} + +testCipher1('0123456789abcd0123456789', '12345678'); +testCipher1('0123456789abcd0123456789', new Buffer('12345678')); +testCipher1(new Buffer('0123456789abcd0123456789'), '12345678'); +testCipher1(new Buffer('0123456789abcd0123456789'), new Buffer('12345678')); + +testCipher2(new Buffer('0123456789abcd0123456789'), new Buffer('12345678')); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index 322b5d1c70a073..f3e54c46a8e16b 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -58,7 +58,7 @@ assert.equal(secret1, secret3); // Run this one twice to make sure that the dh3 clears its error properly (function() { - var c = crypto.createDecipher('aes-128-ecb', ''); + var c = crypto.createDecipheriv('aes-128-ecb', crypto.randomBytes(16), ''); assert.throws(function() { c.final('utf8'); }, /wrong final block length/); })(); @@ -67,7 +67,7 @@ assert.throws(function() { }, /key is too small/i); (function() { - var c = crypto.createDecipher('aes-128-ecb', ''); + var c = crypto.createDecipheriv('aes-128-ecb', crypto.randomBytes(16), ''); assert.throws(function() { c.final('utf8'); }, /wrong final block length/); })(); diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index e5fe8db58c132e..df59fd9bded726 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -93,11 +93,11 @@ assertSorted(crypto.getCurves()); // throw, not assert in C++ land. assert.throws(function() { crypto.createCipher('aes192', 'test').update('0', 'hex'); -}, /Bad input string/); +}, common.hasFipsCrypto ? /not supported in FIPS mode/ : /Bad input string/); assert.throws(function() { crypto.createDecipher('aes192', 'test').update('0', 'hex'); -}, /Bad input string/); +}, common.hasFipsCrypto ? /not supported in FIPS mode/ : /Bad input string/); assert.throws(function() { crypto.createHash('sha1').update('0', 'hex'); From e1f2810db06e792eaccff3ab811167108b882859 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 18 Nov 2015 08:07:15 -0600 Subject: [PATCH 026/262] test: add OS X to module loading error test Previously, this test was not supported on OS X. This change makes sure that it is no longer skipped. PR-URL: https://github.com/nodejs/node/pull/3901 Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig --- test/parallel/test-module-loading-error.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js index 5f9195d7736549..e67c53fc3b076a 100644 --- a/test/parallel/test-module-loading-error.js +++ b/test/parallel/test-module-loading-error.js @@ -7,7 +7,8 @@ console.error('load test-module-loading-error.js'); var error_desc = { win32: ['%1 is not a valid Win32 application'], linux: ['file too short', 'Exec format error'], - sunos: ['unknown file type', 'not an ELF file'] + sunos: ['unknown file type', 'not an ELF file'], + darwin: ['file too short'] }; var dlerror_msg = error_desc[process.platform]; From a2213081e0a3edef37b2dc9276fbb9f1ad081783 Mon Sep 17 00:00:00 2001 From: yorkie Date: Wed, 25 Nov 2015 12:40:42 +0800 Subject: [PATCH 027/262] fs,doc: use `target` instead of `destination` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/3912 Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Michaël Zasso Reviewed-By: Bert Belder Reviewed-By: Colin Ihrig --- doc/api/fs.markdown | 12 +++++++++--- lib/fs.js | 12 ++++++------ src/node_file.cc | 10 +++++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 97903dbd469dae..ed114ed094c575 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -664,16 +664,22 @@ information. Synchronous stat(2). Returns an instance of `fs.Stats`. -## fs.symlink(destination, path[, type], callback) +## fs.symlink(target, path[, type], callback) Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. The `type` argument can be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using -`'junction'`, the `destination` argument will automatically be normalized to absolute path. +`'junction'`, the `target` argument will automatically be normalized to absolute path. -## fs.symlinkSync(destination, path[, type]) +Here is an example below: + + fs.symlink('./foo', './new-port'); + +It would create a symlic link named with "new-port" that points to "foo". + +## fs.symlinkSync(target, path[, type]) Synchronous symlink(2). Returns `undefined`. diff --git a/lib/fs.js b/lib/fs.js index cd39cc9d83fcc1..57e9220a149f28 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -872,29 +872,29 @@ function preprocessSymlinkDestination(path, type, linkPath) { } } -fs.symlink = function(destination, path, type_, callback_) { +fs.symlink = function(target, path, type_, callback_) { var type = (typeof type_ === 'string' ? type_ : null); var callback = makeCallback(arguments[arguments.length - 1]); - if (!nullCheck(destination, callback)) return; + if (!nullCheck(target, callback)) return; if (!nullCheck(path, callback)) return; var req = new FSReqWrap(); req.oncomplete = callback; - binding.symlink(preprocessSymlinkDestination(destination, type, path), + binding.symlink(preprocessSymlinkDestination(target, type, path), pathModule._makeLong(path), type, req); }; -fs.symlinkSync = function(destination, path, type) { +fs.symlinkSync = function(target, path, type) { type = (typeof type === 'string' ? type : null); - nullCheck(destination); + nullCheck(target); nullCheck(path); - return binding.symlink(preprocessSymlinkDestination(destination, type, path), + return binding.symlink(preprocessSymlinkDestination(target, type, path), pathModule._makeLong(path), type); }; diff --git a/src/node_file.cc b/src/node_file.cc index b84e0e44c442b0..b6ef7d5b78f70e 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -580,15 +580,15 @@ static void Symlink(const FunctionCallbackInfo& args) { int len = args.Length(); if (len < 1) - return TYPE_ERROR("dest path required"); + return TYPE_ERROR("target path required"); if (len < 2) return TYPE_ERROR("src path required"); if (!args[0]->IsString()) - return TYPE_ERROR("dest path must be a string"); + return TYPE_ERROR("target path must be a string"); if (!args[1]->IsString()) return TYPE_ERROR("src path must be a string"); - node::Utf8Value dest(env->isolate(), args[0]); + node::Utf8Value target(env->isolate(), args[0]); node::Utf8Value path(env->isolate(), args[1]); int flags = 0; @@ -604,9 +604,9 @@ static void Symlink(const FunctionCallbackInfo& args) { } if (args[3]->IsObject()) { - ASYNC_DEST_CALL(symlink, args[3], *path, *dest, *path, flags) + ASYNC_DEST_CALL(symlink, args[3], *path, *target, *path, flags) } else { - SYNC_DEST_CALL(symlink, *dest, *path, *dest, *path, flags) + SYNC_DEST_CALL(symlink, *target, *path, *target, *path, flags) } } From 14c6f8450c741b9ef25a0e5ef26d087898725a94 Mon Sep 17 00:00:00 2001 From: Martin Forsberg Date: Fri, 20 Nov 2015 18:36:59 +0100 Subject: [PATCH 028/262] doc: move fs.existsSync() deprecation message This commit moves the deprecation message for fs.existsSync() above the function description, making message placement uniform across the documentation. PR-URL: https://github.com/nodejs/node/pull/3942 Reviewed-By: Colin Ihrig --- doc/api/fs.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index ed114ed094c575..dc657a476aca97 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -367,11 +367,11 @@ non-existent. ## fs.existsSync(path) + Stability: 0 - Deprecated: Use [fs.statSync][] or [fs.accessSync][] instead. + Synchronous version of [`fs.exists`][]. Returns `true` if the file exists, `false` otherwise. - Stability: 0 - Deprecated: Use [fs.statSync][] or [fs.accessSync][] instead. - ## fs.fchmod(fd, mode, callback) Asynchronous fchmod(2). No arguments other than a possible exception From 80d852919151af924b372db4f7b40fbbd31a3b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Fri, 20 Nov 2015 20:23:25 +0100 Subject: [PATCH 029/262] net: small code cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `options` is already a param of the function. PR-URL: https://github.com/nodejs/node/pull/3943 Reviewed-By: Evan Lucas Reviewed-By: Michaël Zasso Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig --- lib/net.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/net.js b/lib/net.js index 58c9a3bc34c737..f778043572362e 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1081,7 +1081,6 @@ function Server(options, connectionListener) { EventEmitter.call(this); var self = this; - var options; if (typeof options === 'function') { connectionListener = options; From 50564b50ca569623ff8b63764729b7ecfa86442e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 21 Nov 2015 12:37:49 -0800 Subject: [PATCH 030/262] test: add TAP diagnostic message for retried tests Tests on SmartOS are sometimes retried due to a SmartOS issue on CI. When this happens, a TAP diagnostic message is written. PR-URL: https://github.com/nodejs/node/pull/3960 Reviewed-By: Fedor Indutny --- tools/test.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/test.py b/tools/test.py index 49db74727aea38..4baca769c25ee5 100755 --- a/tools/test.py +++ b/tools/test.py @@ -145,6 +145,7 @@ def RunSingle(self, parallel, thread_id): sys.platform == 'sunos5' and 'ECONNREFUSED' in output.output.stderr): output = case.Run() + output.diagnostic.append('ECONNREFUSED received, test retried') case.duration = (datetime.now() - start) except IOError, e: return @@ -255,6 +256,10 @@ def HasRun(self, output): class TapProgressIndicator(SimpleProgressIndicator): + def _printDiagnostic(self, messages): + for l in messages.splitlines(): + logger.info('# ' + l) + def Starting(self): logger.info('1..%i' % len(self.cases)) self._done = 0 @@ -270,14 +275,13 @@ def HasRun(self, output): if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: status_line = status_line + ' # TODO : Fix flaky test' logger.info(status_line) + self._printDiagnostic("\n".join(output.diagnostic)) if output.HasTimedOut(): - logger.info('# TIMEOUT') + self._printDiagnostic('TIMEOUT') - for l in output.output.stderr.splitlines(): - logger.info('#' + l) - for l in output.output.stdout.splitlines(): - logger.info('#' + l) + self._printDiagnostic(output.output.stderr) + self._printDiagnostic(output.output.stdout) else: skip = skip_regex.search(output.output.stdout) if skip: @@ -288,6 +292,7 @@ def HasRun(self, output): if FLAKY in output.test.outcomes: status_line = status_line + ' # TODO : Fix flaky test' logger.info(status_line) + self._printDiagnostic("\n".join(output.diagnostic)) duration = output.test.duration @@ -490,6 +495,7 @@ def __init__(self, test, command, output, store_unexpected_output): self.command = command self.output = output self.store_unexpected_output = store_unexpected_output + self.diagnostic = [] def UnexpectedOutput(self): if self.HasCrashed(): From 3f042618a0e0359eaf7f68315fde26640be88493 Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Mon, 23 Nov 2015 04:28:13 -0500 Subject: [PATCH 031/262] test: fix time resolution constraint The modification time of a file is assumed to happen at the exact time when it was requested. As the utime API specification delcares that the resolution of the result is 1 second, relax the constrain to 1 second helps the test case to be robust and consistent under different load conditions in the system PR-URL: https://github.com/nodejs/node/pull/3981 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Minwoo Jung --- test/parallel/test-fs-utimes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 49746bfbfb8bb5..2ad6cea4379b2e 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -23,7 +23,7 @@ function check_mtime(resource, mtime) { var real_mtime = fs._toUnixTimestamp(stats.mtime); // check up to single-second precision // sub-second precision is OS and fs dependant - return Math.floor(mtime) == Math.floor(real_mtime); + return mtime - real_mtime < 2; } function expect_errno(syscall, resource, err, errno) { From 42908232b63042ed721b6adc94147b7a39a2935d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 24 Nov 2015 14:07:29 +1100 Subject: [PATCH 032/262] doc: s/node.js/Node.js in readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/3998 Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Minwoo Jung --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c34312b8995b29..a1931ad1a6d19c 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ $ man doc/node.1 To test if Node.js was built correctly: ``` -$ node -e "console.log('Hello from node.js ' + process.version)" +$ node -e "console.log('Hello from Node.js ' + process.version)" ``` ### Windows @@ -174,7 +174,7 @@ To run the tests: To test if Node.js was built correctly: ``` -$ node -e "console.log('Hello from node.js ' + process.version)" +$ node -e "console.log('Hello from Node.js ' + process.version)" ``` ### Android / Android based devices, aka. Firefox OS @@ -350,7 +350,7 @@ Instructions: ## Security -All security bugs in node.js are taken seriously and should be reported by +All security bugs in Node.js are taken seriously and should be reported by emailing security@nodejs.org. This will be delivered to a subset of the project team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. From 30b306ced6e9a45c70fe5848d86da9734b92a99e Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Tue, 24 Nov 2015 21:48:03 +0000 Subject: [PATCH 033/262] buffer: default to UTF8 in byteLength() If an undefined encoding is passed to byteLength(), assume that it is UTF8 immediately. This yields a small speedup, as it prevents string operations on the encoding argument. PR-URL: https://github.com/nodejs/node/pull/4010 Reviewed-By: Colin Ihrig Reviewed-By: Trevor Norris --- lib/buffer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/buffer.js b/lib/buffer.js index f6f28294e3c3c7..3d5e96e52f3042 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -276,6 +276,7 @@ function byteLength(string, encoding) { case 'utf8': case 'utf-8': + case undefined: return binding.byteLengthUtf8(string); case 'ucs2': From 0f591e6a3464e0695827cfb8c91177ad70cb5119 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 24 Nov 2015 20:59:49 -0800 Subject: [PATCH 034/262] test: use platform-based timeout for reliability test-http-client-timeout-with-data fails on Raspberry Pi in CI from time to time. Use a platform-based timeout to improve reliability. PR-URL: https://github.com/nodejs/node/pull/4015 Reviewed-By: Ben Noordhuis Reviewed-By: Roman Reiss --- .../parallel/test-http-client-timeout-with-data.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-http-client-timeout-with-data.js b/test/parallel/test-http-client-timeout-with-data.js index 0aefe62ef45055..673908fe6d465f 100644 --- a/test/parallel/test-http-client-timeout-with-data.js +++ b/test/parallel/test-http-client-timeout-with-data.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); var ntimeouts = 0; var nchunks = 0; @@ -11,21 +11,21 @@ process.on('exit', function() { assert.equal(nchunks, 2); }); -var options = { +const options = { method: 'GET', port: common.PORT, host: '127.0.0.1', path: '/' }; -var server = http.createServer(function(req, res) { +const server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Length':'2'}); res.write('*'); - setTimeout(function() { res.end('*'); }, 100); + setTimeout(function() { res.end('*'); }, common.platformTimeout(100)); }); server.listen(options.port, options.host, function() { - var req = http.request(options, onresponse); + const req = http.request(options, onresponse); req.end(); function onresponse(res) { From 89c84505ff51812befce6657dade3c38173fe119 Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Tue, 24 Nov 2015 19:17:49 -0500 Subject: [PATCH 035/262] crypto: fix native module compilation with FIPS Prevent OpenSSL's fipsld from being used to link native modules because this requires the original OpenSSL source to be available after Node's installation. Fixes: https://github.com/nodejs/node/issues/3815 PR-URL: https://github.com/nodejs/node/pull/4023 Reviewed-By: Fedor Indutny Reviewed-By: Michael Dawson Reviewed-By: Shigeki Ohtsu --- .gitignore | 1 + Makefile | 2 +- configure | 11 ++++++++++- tools/gyp_node.py | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a3e3a28b07dc96..5cf2cd0a71cbdf 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ ipch/ /config.mk /config.gypi +/config_fips.gypi *-nodegyp* /gyp-mac-tool /dist-osx diff --git a/Makefile b/Makefile index 02619fac98ddd7..a99b112508c448 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ clean: distclean: -rm -rf out - -rm -f config.gypi icu_config.gypi + -rm -f config.gypi icu_config.gypi config_fips.gypi -rm -f config.mk -rm -rf $(NODE_EXE) $(NODE_G_EXE) -rm -rf node_modules diff --git a/configure b/configure index 56a0376e0ef903..e30ce5f0d52dcc 100755 --- a/configure +++ b/configure @@ -782,7 +782,7 @@ def configure_openssl(o): o['variables']['openssl_fips'] = options.openssl_fips fips_dir = os.path.join(root_dir, 'deps', 'openssl', 'fips') fips_ld = os.path.abspath(os.path.join(fips_dir, 'fipsld')) - o['make_global_settings'] = [ + o['make_fips_settings'] = [ ['LINK', fips_ld + ' <(openssl_fips)/bin/fipsld'], ] else: @@ -1104,6 +1104,15 @@ configure_fullystatic(output) variables = output['variables'] del output['variables'] +# make_global_settings for special FIPS linking +# should not be used to compile modules in node-gyp +config_fips = { 'make_global_settings' : [] } +if 'make_fips_settings' in output: + config_fips['make_global_settings'] = output['make_fips_settings'] + del output['make_fips_settings'] + write('config_fips.gypi', do_not_edit + + pprint.pformat(config_fips, indent=2) + '\n') + # make_global_settings should be a root level element too if 'make_global_settings' in output: make_global_settings = output['make_global_settings'] diff --git a/tools/gyp_node.py b/tools/gyp_node.py index 7b495055c180c8..064abe30aa209c 100755 --- a/tools/gyp_node.py +++ b/tools/gyp_node.py @@ -30,10 +30,12 @@ def run_gyp(args): args.append(os.path.join(node_root, 'node.gyp')) common_fn = os.path.join(node_root, 'common.gypi') options_fn = os.path.join(node_root, 'config.gypi') + options_fips_fn = os.path.join(node_root, 'config_fips.gypi') else: args.append(os.path.join(os.path.abspath(node_root), 'node.gyp')) common_fn = os.path.join(os.path.abspath(node_root), 'common.gypi') options_fn = os.path.join(os.path.abspath(node_root), 'config.gypi') + options_fips_fn = os.path.join(os.path.abspath(node_root), 'config_fips.gypi') if os.path.exists(common_fn): args.extend(['-I', common_fn]) @@ -41,6 +43,9 @@ def run_gyp(args): if os.path.exists(options_fn): args.extend(['-I', options_fn]) + if os.path.exists(options_fips_fn): + args.extend(['-I', options_fips_fn]) + args.append('--depth=' + node_root) # There's a bug with windows which doesn't allow this feature. From 24117ee7604265e3fde0c3662198a076c15c2c45 Mon Sep 17 00:00:00 2001 From: jpersson Date: Fri, 27 Nov 2015 18:30:32 -0500 Subject: [PATCH 036/262] doc: add links and backticks around names * add backticks around names * add single quotes around event names * add parenthesis after function names * add internal links between different sections * add external links to MDN for some JavaScript references * sort the link definitions alphabetically PR-URL: https://github.com/nodejs/node/pull/4054 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- doc/api/assert.markdown | 21 ++-- doc/api/buffer.markdown | 25 ++-- doc/api/child_process.markdown | 68 ++++++----- doc/api/cluster.markdown | 41 +++---- doc/api/console.markdown | 27 +++-- doc/api/crypto.markdown | 59 +++++----- doc/api/dgram.markdown | 56 +++++---- doc/api/dns.markdown | 34 +++--- doc/api/domain.markdown | 52 +++++---- doc/api/errors.markdown | 82 ++++++------- doc/api/fs.markdown | 117 +++++++++++-------- doc/api/globals.markdown | 16 +-- doc/api/http.markdown | 200 ++++++++++++++++---------------- doc/api/https.markdown | 66 ++++++----- doc/api/modules.markdown | 5 +- doc/api/net.markdown | 138 ++++++++++++---------- doc/api/process.markdown | 82 ++++++------- doc/api/readline.markdown | 34 +++--- doc/api/repl.markdown | 16 +-- doc/api/stream.markdown | 142 +++++++++++------------ doc/api/string_decoder.markdown | 2 +- doc/api/synopsis.markdown | 2 +- doc/api/timers.markdown | 7 +- doc/api/tls.markdown | 28 ++--- doc/api/tty.markdown | 4 +- doc/api/util.markdown | 6 +- doc/api/vm.markdown | 7 +- 27 files changed, 712 insertions(+), 625 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index 6ea4071b79cc14..c35fc1ad0832a0 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -19,7 +19,7 @@ comparison operator ( `==` ). This only considers enumerable properties. It does not test object prototypes, attached symbols, or non-enumerable properties. This can lead to some potentially surprising results. For example, this does not throw an -`AssertionError` because the properties on the `Error` object are +`AssertionError` because the properties on the [`Error`][] object are non-enumerable: // WARNING: This does not throw an AssertionError! @@ -32,11 +32,11 @@ operator ( `===` ). ## assert.doesNotThrow(block[, error][, message]) -Expects `block` not to throw an error. See [assert.throws()][] for more details. +Expects `block` not to throw an error. See [`assert.throws()`][] for more details. If `block` throws an error and if it is of a different type from `error`, the thrown error will get propagated back to the caller. The following call will -throw the `TypeError`, since we're not matching the error types in the +throw the [`TypeError`][], since we're not matching the error types in the assertion. assert.doesNotThrow( @@ -72,11 +72,11 @@ argument in callbacks. ## assert.notDeepEqual(actual, expected[, message]) -Tests for any deep inequality. Opposite of `assert.deepEqual`. +Tests for any deep inequality. Opposite of [`assert.deepEqual`][]. ## assert.notDeepStrictEqual(actual, expected[, message]) -Tests for deep inequality. Opposite of `assert.deepStrictEqual`. +Tests for deep inequality. Opposite of [`assert.deepStrictEqual`][]. ## assert.notEqual(actual, expected[, message]) @@ -94,7 +94,7 @@ Tests strict equality as determined by the strict equality operator ( `===` ). ## assert.throws(block[, error][, message]) -Expects `block` to throw an error. `error` can be a constructor, `RegExp`, or +Expects `block` to throw an error. `error` can be a constructor, [`RegExp`][], or validation function. Validate instanceof using constructor: @@ -106,7 +106,7 @@ Validate instanceof using constructor: Error ); -Validate error message using RegExp: +Validate error message using [`RegExp`][]: assert.throws( function() { @@ -129,4 +129,9 @@ Custom error validation: "unexpected error" ); -[assert.throws()]: #assert_assert_throws_block_error_message +[`assert.deepEqual`]: #assert_assert_deepequal_actual_expected_message +[`assert.deepStrictEqual`]: #assert_assert_deepstrictequal_actual_expected_message +[`assert.throws()`]: #assert_assert_throws_block_error_message +[`Error`]: errors.html#errors_class_error +[`RegExp`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions +[`TypeError`]: errors.html#errors_class_typeerror \ No newline at end of file diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 52c57010e5ba71..ae0c145abb3c7d 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -50,7 +50,7 @@ instead of cloning it. While more efficient, it introduces subtle incompatibilities with the typed arrays specification. `ArrayBuffer#slice()` makes a copy of the slice while -`Buffer#slice()` creates a view. +[`Buffer#slice()`][] creates a view. ## Class: Buffer @@ -76,11 +76,11 @@ Copies the passed `buffer` data onto a new `Buffer` instance. Allocates a new buffer of `size` bytes. `size` must be less than 1,073,741,824 bytes (1 GB) on 32 bits architectures or 2,147,483,648 bytes (2 GB) on 64 bits architectures, -otherwise a `RangeError` is thrown. +otherwise a [`RangeError`][] is thrown. Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So the contents of a newly created `Buffer` are unknown and could contain -sensitive data. Use `buf.fill(0)` to initialize a buffer to zeroes. +sensitive data. Use [`buf.fill(0)`][] to initialize a buffer to zeroes. ### new Buffer(str[, encoding]) @@ -97,7 +97,7 @@ Allocates a new buffer containing the given `str`. * Return: Number Gives the actual byte length of a string. `encoding` defaults to `'utf8'`. -This is not the same as `String.prototype.length` since that returns the +This is not the same as [`String.prototype.length`][] since that returns the number of *characters* in a string. Example: @@ -286,9 +286,9 @@ buffer. * `byteOffset` Number, Optional, Default: 0 * Return: Number -Operates similar to [Array#indexOf()][]. Accepts a String, Buffer or Number. +Operates similar to [`Array#indexOf()`][]. Accepts a String, Buffer or Number. Strings are interpreted as UTF8. Buffers will use the entire buffer. So in order -to compare a partial Buffer use `Buffer#slice()`. Numbers can range from 0 to +to compare a partial Buffer use [`Buffer#slice()`][]. Numbers can range from 0 to 255. ### buf.length @@ -311,7 +311,7 @@ buffer object. It does not change when the contents of the buffer are changed. While the `length` property is not immutable, changing the value of `length` can result in undefined and inconsistent behavior. Applications that wish to modify the length of a buffer should therefore treat `length` as read-only and -use `buf.slice` to create a new buffer. +use [`buf.slice`][] to create a new buffer. buf = new Buffer(10); buf.write("abcdefghj", 0, "ascii"); @@ -882,7 +882,7 @@ to `false`. * Number, Default: 50 How many bytes will be returned when `buffer.inspect()` is called. This can -be overridden by user modules. See [util.inspect()][] for more details on +be overridden by user modules. See [`util.inspect()`][] for more details on `buffer.inspect()` behavior. Note that this is a property on the buffer module returned by @@ -932,6 +932,11 @@ un-pooled Buffer instance using SlowBuffer and copy out the relevant bits. Though this should be used sparingly and only be a last resort *after* a developer has actively observed undue memory retention in their applications. +[`Array#indexOf()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf +[`buf.fill(0)`]: #buffer_buf_fill_value_offset_end +[`buf.slice`]: #buffer_buf_slice_start_end [`buf1.compare(buf2)`]: #buffer_buf_compare_otherbuffer -[Array#indexOf()]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf -[util.inspect()]: util.html#util_util_inspect_object_options +[`Buffer#slice()`]: #buffer_buf_slice_start_end +[`RangeError`]: errors.html#errors_class_rangeerror +[`String.prototype.length`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length +[`util.inspect()`]: util.html#util_util_inspect_object_options diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index d52d974f74c41f..84c8a90f456bdf 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -19,7 +19,7 @@ convenient. ## Class: ChildProcess -`ChildProcess` is an [EventEmitter][]. +`ChildProcess` is an [`EventEmitter`][]. Child processes always have three streams associated with them. `child.stdin`, `child.stdout`, and `child.stderr`. These may be shared with the stdio @@ -27,7 +27,7 @@ streams of the parent process, or they may be separate stream objects which can be piped to and from. The ChildProcess class is not intended to be used directly. Use the -`spawn()`, `exec()`, `execFile()`, or `fork()` methods to create a Child +[`spawn()`][], [`exec()`][], [`execFile()`][], or [`fork()`][] methods to create a Child Process instance. ### Event: 'close' @@ -37,7 +37,7 @@ Process instance. was killed by the parent. This event is emitted when the stdio streams of a child process have all -terminated. This is distinct from 'exit', since multiple processes +terminated. This is distinct from `'exit'`, since multiple processes might share the same stdio streams. ### Event: 'disconnect' @@ -56,7 +56,7 @@ Emitted when: 2. The process could not be killed, or 3. Sending a message to the child process failed for whatever reason. -Note that the `exit`-event may or may not fire after an error has occurred. If +Note that the `'exit'` event may or may not fire after an error has occurred. If you are listening on both events to fire a function, remember to guard against calling your function twice. @@ -75,8 +75,8 @@ of the signal, otherwise `null`. Note that the child process stdio streams might still be open. -Also, note that Node.js establishes signal handlers for `'SIGINT'` and -`'SIGTERM`', so it will not terminate due to receipt of those signals, +Also, note that Node.js establishes signal handlers for `SIGINT` and +`SIGTERM`, so it will not terminate due to receipt of those signals, it will exit. See `waitpid(2)`. @@ -84,11 +84,11 @@ See `waitpid(2)`. ### Event: 'message' * `message` {Object} a parsed JSON object or primitive value. -* `sendHandle` {Handle object} a [net.Socket][] or [net.Server][] object, or +* `sendHandle` {Handle object} a [`net.Socket`][] or [`net.Server`][] object, or undefined. Messages sent by `.send(message, [sendHandle])` are obtained using the -`message` event. +`'message'` event. ### child.connected @@ -103,11 +103,11 @@ gracefully once there are no other connections keeping it alive. After calling this method the `.connected` flag will be set to `false` in both the parent and child, and it is no longer possible to send messages. -The 'disconnect' event will be emitted when there are no messages in the process +The `'disconnect'` event will be emitted when there are no messages in the process of being received, most likely immediately. Note that you can also call `process.disconnect()` in the child process when the -child process has any open IPC channels with the parent (i.e `fork()`). +child process has any open IPC channels with the parent (i.e [`fork()`][]). ### child.kill([signal]) @@ -188,17 +188,17 @@ will emit objects each time it receives a message on its channel. There is a special case when sending a `{cmd: 'NODE_foo'}` message. All messages containing a `NODE_` prefix in its `cmd` property will not be emitted in -the `message` event, since they are internal messages used by Node.js core. -Messages containing the prefix are emitted in the `internalMessage` event. +the `'message'` event, since they are internal messages used by Node.js core. +Messages containing the prefix are emitted in the `'internalMessage'` event. Avoid using this feature; it is subject to change without notice. The `sendHandle` option to `child.send()` is for sending a TCP server or socket object to another process. The child will receive the object as its -second argument to the `message` event. +second argument to the `'message'` event. The `callback` option is a function that is invoked after the message is sent but before the target may have received it. It is called with a single -argument: `null` on success, or an `Error` object on failure. +argument: `null` on success, or an [`Error`][] object on failure. `child.send()` emits an `'error'` event if no callback was given and the message cannot be sent, for example because the child process has already exited. @@ -236,7 +236,7 @@ Note that the server is now shared between the parent and child, this means that some connections will be handled by the parent and some by the child. For `dgram` servers the workflow is exactly the same. Here you listen on -a `message` event instead of `connection` and use `server.bind` instead of +a `'message'` event instead of `'connection'` and use `server.bind` instead of `server.listen`. (Currently only supported on UNIX platforms.) #### Example: sending socket object @@ -307,7 +307,7 @@ to the same object, or null. * {Array} A sparse array of pipes to the child process, corresponding with positions in -the [stdio][] option to [spawn][] that have been set to `'pipe'`. +the [`stdio`][] option to [`spawn()`][] that have been set to `'pipe'`. Note that streams 0-2 are also available as ChildProcess.stdin, ChildProcess.stdout, and ChildProcess.stderr, respectively. @@ -391,7 +391,7 @@ Runs a command in a shell and buffers the output. }); The callback gets the arguments `(error, stdout, stderr)`. On success, `error` -will be `null`. On error, `error` will be an instance of `Error` and `error.code` +will be `null`. On error, `error` will be an instance of [`Error`][] and `error.code` will be the exit code of the child process, and `error.signal` will be set to the signal that terminated the process. @@ -451,7 +451,7 @@ leaner than [`child_process.exec()`][]. It has the same options. (Default: `process.execArgv`) * `silent` {Boolean} If true, stdin, stdout, and stderr of the child will be piped to the parent, otherwise they will be inherited from the parent, see - the "pipe" and "inherit" options for `spawn()`'s `stdio` for more details + the `'pipe'` and `'inherit'` options for [`spawn()`][]'s [`stdio`][] for more details (default is false) * `uid` {Number} Sets the user identity of the process. (See setuid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).) @@ -472,7 +472,7 @@ done with care and by default will talk over the fd represented an environmental variable `NODE_CHANNEL_FD` on the child process. The input and output on this fd is expected to be line delimited JSON objects. -*Note: Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the +*Note: Unlike the `fork()` POSIX system call, [`child_process.fork()`][] does not clone the current process.* ### child_process.spawn(command[, args][, options]) @@ -613,7 +613,7 @@ As a shorthand, the `stdio` argument may be one of the following strings: * `'ignore'` - `['ignore', 'ignore', 'ignore']` * `'inherit'` - `[process.stdin, process.stdout, process.stderr]` or `[0,1,2]` -Otherwise, the 'stdio' option to `child_process.spawn()` is an array where each +Otherwise, the `'stdio'` option to [`child_process.spawn()`][] is an array where each index corresponds to a fd in the child. The value is one of the following: 1. `'pipe'` - Create a pipe between the child process and the parent process. @@ -697,7 +697,7 @@ the `SIGTERM` signal and doesn't exit, your process will wait until the child process has exited. If the process times out, or has a non-zero exit code, this method ***will*** -throw. The `Error` object will contain the entire result from +throw. The [`Error`][] object will contain the entire result from [`child_process.spawnSync()`][] ### child_process.execSync(command[, options]) @@ -731,7 +731,7 @@ the `SIGTERM` signal and doesn't exit, your process will wait until the child process has exited. If the process times out, or has a non-zero exit code, this method ***will*** -throw. The `Error` object will contain the entire result from +throw. The [`Error`][] object will contain the entire result from [`child_process.spawnSync()`][] ### child_process.spawnSync(command[, args][, options]) @@ -766,16 +766,20 @@ until the process has completely exited. That is to say, if the process handles the `SIGTERM` signal and doesn't exit, your process will wait until the child process has exited. -[below]: #child_process_asynchronous_process_creation -[synchronous counterparts]: #child_process_synchronous_process_creation -[EventEmitter]: events.html#events_class_events_eventemitter -[`ChildProcess#kill()`]: #child_process_child_kill_signal -[`ChildProcess#send()`]: #child_process_child_send_message_sendhandle_callback -[net.Server]: net.html#net_class_net_server -[net.Socket]: net.html#net_class_net_socket -[`child_process.fork()`]: #child_process_child_process_fork_modulepath_args_options -[stdio]: #child_process_options_stdio -[spawn]: #child_process_child_process_spawn_command_args_options [`child_process.exec()`]: #child_process_child_process_exec_command_options_callback +[`child_process.fork()`]: #child_process_child_process_fork_modulepath_args_options [`child_process.spawn()`]: #child_process_child_process_spawn_command_args_options [`child_process.spawnSync()`]: #child_process_child_process_spawnsync_command_args_options +[`ChildProcess#kill()`]: #child_process_child_kill_signal +[`ChildProcess#send()`]: #child_process_child_send_message_sendhandle_callback +[`Error`]: errors.html#errors_class_error +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`exec()`]: #child_process_child_process_exec_command_options_callback +[`execFile()`]: #child_process_child_process_execfile_file_args_options_callback +[`fork()`]: #child_process_child_process_fork_modulepath_args_options +[`net.Server`]: net.html#net_class_net_server +[`net.Socket`]: net.html#net_class_net_socket +[`spawn()`]: #child_process_child_process_spawn_command_args_options +[`stdio`]: #child_process_options_stdio +[below]: #child_process_asynchronous_process_creation +[synchronous counterparts]: #child_process_synchronous_process_creation diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 702ef4ede79b3a..d300b274a1627e 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -46,7 +46,7 @@ server in a worker. -The worker processes are spawned using the `child_process.fork` method, +The worker processes are spawned using the [`child_process.fork`][] method, so that they can communicate with the parent via IPC and pass server handles back and forth. @@ -119,7 +119,7 @@ Similar to the `cluster.on('disconnect')` event, but specific to this worker. ### Event: 'error' -This event is the same as the one provided by `child_process.fork()`. +This event is the same as the one provided by [`child_process.fork()`][]. In a worker you can also use `process.on('error')`. @@ -160,7 +160,7 @@ It is not emitted in the worker. Similar to the `cluster.on('message')` event, but specific to this worker. -This event is the same as the one provided by `child_process.fork()`. +This event is the same as the one provided by [`child_process.fork()`][]. In a worker you can also use `process.on('message')`. @@ -219,7 +219,7 @@ It is not emitted in the worker. ### worker.disconnect() -In a worker, this function will close all servers, wait for the 'close' event on +In a worker, this function will close all servers, wait for the `'close'` event on those servers, and then disconnect the IPC channel. In the master, an internal message is sent to the worker causing it to call @@ -238,12 +238,12 @@ automatically closed by workers, and disconnect does not wait for them to close before exiting. Note that in a worker, `process.disconnect` exists, but it is not this function, -it is [disconnect][]. +it is [`disconnect`][]. Because long living server connections may block workers from disconnecting, it may be useful to send a message, so application specific actions may be taken to close them. It also may be useful to implement a timeout, killing a worker if -the `disconnect` event has not been emitted after some time. +the `'disconnect'` event has not been emitted after some time. if (cluster.isMaster) { var worker = cluster.fork(); @@ -290,7 +290,7 @@ cluster.workers This function returns `true` if the worker is connected to its master via its IPC channel, `false` otherwise. A worker is connected to its master after it's been -created. It is disconnected after the `disconnect` event is emitted. +created. It is disconnected after the `'disconnect'` event is emitted. ### worker.isDead() @@ -311,13 +311,13 @@ Causes `.suicide` to be set. This method is aliased as `worker.destroy()` for backwards compatibility. Note that in a worker, `process.kill()` exists, but it is not this function, -it is [kill][]. +it is [`kill`][]. ### worker.process * {ChildProcess object} -All workers are created using `child_process.fork()`, the returned object +All workers are created using [`child_process.fork()`][], the returned object from this function is stored as `.process`. In a worker, the global `process` is stored. @@ -337,7 +337,7 @@ disconnection. Send a message to a worker or master, optionally with a handle. In the master this sends a message to a specific worker. It is identical to -[ChildProcess.send()][]. +[`ChildProcess.send()`][]. In a worker this sends a message to the master. It is identical to `process.send()`. @@ -380,7 +380,7 @@ Emitted after the worker IPC channel has disconnected. This can occur when a worker exits gracefully, is killed, or is disconnected manually (such as with worker.disconnect()). -There may be a delay between the `disconnect` and `exit` events. These events +There may be a delay between the `'disconnect'` and `'exit'` events. These events can be used to detect if the process is stuck in a cleanup or if there are long-living connections. @@ -395,7 +395,7 @@ long-living connections. * `signal` {String} the name of the signal (eg. `'SIGHUP'`) that caused the process to be killed. -When any of the workers die the cluster module will emit the 'exit' event. +When any of the workers die the cluster module will emit the `'exit'` event. This can be used to restart the worker by calling `.fork()` again. @@ -411,7 +411,7 @@ See [child_process event: 'exit'][]. * `worker` {Worker object} -When a new worker is forked the cluster module will emit a 'fork' event. +When a new worker is forked the cluster module will emit a `'fork'` event. This can be used to log worker activity, and create your own timeout. var timeouts = []; @@ -435,8 +435,8 @@ This can be used to log worker activity, and create your own timeout. * `worker` {Worker object} * `address` {Object} -After calling `listen()` from a worker, when the 'listening' event is emitted on -the server, a listening event will also be emitted on `cluster` in the master. +After calling `listen()` from a worker, when the `'listening'` event is emitted on +the server, a `'listening'` event will also be emitted on `cluster` in the master. The event handler is executed with two arguments, the `worker` contains the worker object and the `address` object contains the following connection properties: @@ -469,7 +469,7 @@ See [child_process event: 'message'][]. After forking a new worker, the worker should respond with an online message. When the master receives an online message it will emit this event. -The difference between 'fork' and 'online' is that fork is emitted when the +The difference between `'fork'` and `'online'` is that fork is emitted when the master forks a worker, and 'online' is emitted when the worker is running. cluster.on('online', function(worker) { @@ -644,10 +644,11 @@ the worker's unique id is the easiest way to find the worker. var worker = cluster.workers[id]; }); -[server.close()]: net.html#net_event_close -[disconnect]: child_process.html#child_process_child_disconnect -[kill]: process.html#process_process_kill_pid_signal +[`child_process.fork()`]: child_process.html#child_process_child_process_fork_modulepath_args_options +[`ChildProcess.send()`]: child_process.html#child_process_child_send_message_sendhandle_callback +[`disconnect`]: child_process.html#child_process_child_disconnect +[`kill`]: process.html#process_process_kill_pid_signal +[`server.close()`]: net.html#net_event_close [Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options -[ChildProcess.send()]: child_process.html#child_process_child_send_message_sendhandle_callback [child_process event: 'exit']: child_process.html#child_process_event_exit [child_process event: 'message']: child_process.html#child_process_event_message diff --git a/doc/api/console.markdown b/doc/api/console.markdown index 824b1947996f1f..6694402f5818c6 100644 --- a/doc/api/console.markdown +++ b/doc/api/console.markdown @@ -66,12 +66,12 @@ should worry about unless you log huge amounts of data. ### console.assert(value[, message][, ...]) -Similar to [assert.ok()][], but the error message is formatted as +Similar to [`assert.ok()`][], but the error message is formatted as `util.format(message...)`. ### console.dir(obj[, options]) -Uses `util.inspect` on `obj` and prints resulting string to stdout. This function +Uses [`util.inspect()`][] on `obj` and prints resulting string to stdout. This function bypasses any custom `inspect()` function on `obj`. An optional *options* object may be passed that alters certain aspects of the formatted string: @@ -83,15 +83,15 @@ object. This is useful for inspecting large complicated objects. Defaults to `2`. To make it recurse indefinitely pass `null`. - `colors` - if `true`, then the output will be styled with ANSI color codes. -Defaults to `false`. Colors are customizable, see [customizing util.inspect colors][]. +Defaults to `false`. Colors are customizable, see [customizing `util.inspect()` colors][]. ### console.error([data][, ...]) -Same as `console.log` but prints to stderr. +Same as [`console.log()`][] but prints to stderr. ### console.info([data][, ...]) -Same as `console.log`. +Same as [`console.log()`][]. ### console.log([data][, ...]) @@ -102,8 +102,8 @@ Prints to stdout with newline. This function can take multiple arguments in a console.log('count: %d', count); // prints 'count: 5' -If formatting elements are not found in the first string then `util.inspect` -is used on each argument. See [util.format()][] for more information. +If formatting elements are not found in the first string then [`util.inspect()`][] +is used on each argument. See [`util.format()`][] for more information. ### console.time(label) @@ -135,10 +135,13 @@ to the current position. ### console.warn([data][, ...]) -Same as `console.error`. +Same as [`console.error()`][]. -[assert.ok()]: assert.html#assert_assert_value_message_assert_ok_value_message -[customizing util.inspect colors]: util.html#util_customizing_util_inspect_colors -[util.format()]: util.html#util_util_format_format -[`console.timeEnd()`]: #console_console_timeend_label +[`assert.ok()`]: assert.html#assert_assert_value_message_assert_ok_value_message +[`console.error()`]: #console_console_error_data +[`console.log()`]: #console_console_log_data [`console.time()`]: #console_console_time_label +[`console.timeEnd()`]: #console_console_timeend_label +[`util.format()`]: util.html#util_util_format_format +[`util.inspect()`]: util.html#util_util_inspect_object_options +[customizing `util.inspect()` colors]: util.html#util_customizing_util_inspect_colors diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 60231b17072692..5e733efab7428c 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -89,7 +89,7 @@ data as it is streamed. Class for decrypting data. -Returned by `crypto.createDecipher` and `crypto.createDecipheriv`. +Returned by [`crypto.createDecipher`][] and [`crypto.createDecipheriv`][]. Decipher objects are [streams][] that are both readable and writable. The written enciphered data is used to produce the plain-text data on @@ -125,7 +125,7 @@ You can disable auto padding if the data has been encrypted without standard block padding to prevent `decipher.final` from checking and removing it. This will only work if the input data's length is a multiple of the ciphers block size. You must call this before streaming data to -`decipher.update`. +[`decipher.update`][]. ### decipher.update(data[, input_encoding][, output_encoding]) @@ -426,15 +426,15 @@ is used to compute the hash. Once the writable side of the stream is ended, use the `read()` method to get the enciphered contents. The legacy `update` and `final` methods are also supported. -Note: `createCipher` derives keys with the OpenSSL function [EVP_BytesToKey][] +Note: `createCipher` derives keys with the OpenSSL function [`EVP_BytesToKey`][] with the digest algorithm set to MD5, one iteration, and no salt. The lack of salt allows dictionary attacks as the same password always creates the same key. The low iteration count and non-cryptographically secure hash algorithm allow passwords to be tested very rapidly. -In line with OpenSSL's recommendation to use pbkdf2 instead of EVP_BytesToKey it -is recommended you derive a key and iv yourself with [crypto.pbkdf2][] and to -then use [createCipheriv()][] to create the cipher stream. +In line with OpenSSL's recommendation to use pbkdf2 instead of [`EVP_BytesToKey`][] it +is recommended you derive a key and iv yourself with [`crypto.pbkdf2`][] and to +then use [`createCipheriv()`][] to create the cipher stream. ## crypto.createCipheriv(algorithm, key, iv) @@ -448,7 +448,7 @@ the raw key used by the algorithm. `iv` is an [initialization vector][]. ## crypto.createCredentials(details) - Stability: 0 - Deprecated: Use [tls.createSecureContext][] instead. + Stability: 0 - Deprecated: Use [`tls.createSecureContext`][] instead. Creates a credentials object, with the optional details being a dictionary with keys: @@ -474,12 +474,12 @@ publicly trusted list of CAs as given in ## crypto.createDecipher(algorithm, password) Creates and returns a decipher object, with the given algorithm and -key. This is the mirror of the [createCipher()][] above. +key. This is the mirror of the [`createCipher()`][] above. ## crypto.createDecipheriv(algorithm, key, iv) Creates and returns a decipher object, with the given algorithm, key -and iv. This is the mirror of the [createCipheriv()][] above. +and iv. This is the mirror of the [`createCipheriv()`][] above. ## crypto.createDiffieHellman(prime[, prime_encoding][, generator][, generator_encoding]) @@ -500,7 +500,7 @@ If no `generator` is specified, then `2` is used. ## crypto.createECDH(curve_name) Creates an Elliptic Curve (EC) Diffie-Hellman key exchange object using a -predefined curve specified by the `curve_name` string. Use [getCurves()][] to +predefined curve specified by the `curve_name` string. Use [`getCurves()`][] to obtain a list of available curve names. On recent releases, `openssl ecparam -list_curves` will also display the name and description of each available elliptic curve. @@ -583,8 +583,8 @@ supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412][], but see [Caveats][]) and `'modp14'`, `'modp15'`, `'modp16'`, `'modp17'`, `'modp18'` (defined in [RFC 3526][]). The returned object mimics the interface of objects created by -[crypto.createDiffieHellman()][] above, but will not allow changing -the keys (with [diffieHellman.setPublicKey()][] for example). The +[`crypto.createDiffieHellman()`][] above, but will not allow changing +the keys (with [`diffieHellman.setPublicKey()`][] for example). The advantage of using this routine is that the parties do not have to generate nor exchange group modulus beforehand, saving both processor and communication time. @@ -635,7 +635,7 @@ Example: console.log(key.toString('hex')); // 'c5e478d...1469e50' }); -You can get a list of supported digest functions with [crypto.getHashes()][]. +You can get a list of supported digest functions with [`crypto.getHashes()`][]. ## crypto.pbkdf2Sync(password, salt, iterations, keylen[, digest]) @@ -782,22 +782,25 @@ Based on the recommendations of [NIST SP 800-131A]: See the reference for other recommendations and details. -[stream]: stream.html -[streams]: stream.html +[`createCipher()`]: #crypto_crypto_createcipher_algorithm_password +[`createCipheriv()`]: #crypto_crypto_createcipheriv_algorithm_key_iv +[`crypto.createDecipher`]: #crypto_crypto_createdecipher_algorithm_password +[`crypto.createDecipheriv`]: #crypto_crypto_createdecipheriv_algorithm_key_iv +[`crypto.createDiffieHellman()`]: #crypto_crypto_creatediffiehellman_prime_prime_encoding_generator_generator_encoding +[`crypto.getHashes()`]: #crypto_crypto_gethashes +[`crypto.pbkdf2`]: #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback +[`decipher.update`]: #crypto_decipher_update_data_input_encoding_output_encoding +[`diffieHellman.setPublicKey()`]: #crypto_diffiehellman_setpublickey_public_key_encoding +[`EVP_BytesToKey`]: https://www.openssl.org/docs/crypto/EVP_BytesToKey.html +[`getCurves()`]: #crypto_crypto_getcurves +[`tls.createSecureContext`]: tls.html#tls_tls_createsecurecontext_details [buffer]: buffer.html [buffers]: buffer.html -[createCipher()]: #crypto_crypto_createcipher_algorithm_password -[createCipheriv()]: #crypto_crypto_createcipheriv_algorithm_key_iv -[getCurves()]: #crypto_crypto_getcurves -[crypto.createDiffieHellman()]: #crypto_crypto_creatediffiehellman_prime_prime_encoding_generator_generator_encoding -[tls.createSecureContext]: tls.html#tls_tls_createsecurecontext_details -[diffieHellman.setPublicKey()]: #crypto_diffiehellman_setpublickey_public_key_encoding +[Caveats]: #crypto_caveats +[initialization vector]: http://en.wikipedia.org/wiki/Initialization_vector +[NIST SP 800-131A]: http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf +[NIST SP 800-132]: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf [RFC 2412]: http://www.rfc-editor.org/rfc/rfc2412.txt [RFC 3526]: http://www.rfc-editor.org/rfc/rfc3526.txt -[crypto.pbkdf2]: #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback -[EVP_BytesToKey]: https://www.openssl.org/docs/crypto/EVP_BytesToKey.html -[NIST SP 800-132]: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf -[NIST SP 800-131A]: http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf -[initialization vector]: http://en.wikipedia.org/wiki/Initialization_vector -[Caveats]: #crypto_caveats -[crypto.getHashes()]: #crypto_crypto_gethashes +[stream]: stream.html +[streams]: stream.html diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 3db13305281f5a..71c59db3bf747c 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -6,7 +6,7 @@ Datagram sockets are available through `require('dgram')`. -Important note: the behavior of `dgram.Socket#bind()` has changed in v0.10 +Important note: the behavior of [`dgram.Socket#bind()`][] has changed in v0.10 and is always asynchronous now. If you have code that looks like this: var s = dgram.createSocket('udp4'); @@ -23,11 +23,11 @@ You have to change it to this: ## Class: dgram.Socket The dgram Socket class encapsulates the datagram functionality. It -should be created via `dgram.createSocket(...)` +should be created via [`dgram.createSocket(...)`][] ### Event: 'close' -Emitted after a socket is closed with `close()`. No new `message` events will be emitted +Emitted after a socket is closed with [`close()`][]. No new `'message'` events will be emitted on this socket. ### Event: 'error' @@ -79,16 +79,16 @@ this object will contain `address` , `family` and `port`. For UDP sockets, listen for datagrams on a named `port` and optional `address`. If `port` is not specified, the OS will try to bind to a random port. If `address` is not specified, the OS will try to listen on -all addresses. After binding is done, a "listening" event is emitted +all addresses. After binding is done, a `'listening'` event is emitted and the `callback`(if specified) is called. Specifying both a -"listening" event listener and `callback` is not harmful but not very +`'listening'` event listener and `callback` is not harmful but not very useful. A bound datagram socket keeps the Node.js process running to receive datagrams. -If binding fails, an "error" event is generated. In rare case (e.g. -binding a closed socket), an `Error` may be thrown by this method. +If binding fails, an `'error'` event is generated. In rare case (e.g. +binding a closed socket), an [`Error`][] may be thrown by this method. Example of a UDP server listening on port 41234: @@ -125,8 +125,7 @@ Example of a UDP server listening on port 41234: The `port` and `address` properties of `options`, as well as the optional callback function, behave as they do on a call to -[socket.bind(port, \[address\], \[callback\]) -](#dgram_socket_bind_port_address_callback). +[`socket.bind(port, \[address\], \[callback\])`][]. If `exclusive` is `false` (default), then cluster workers will use the same underlying handle, allowing connection handling duties to be shared. When @@ -143,14 +142,14 @@ shown below. ### socket.close([callback]) Close the underlying socket and stop listening for data on it. If a callback is -provided, it is added as a listener for the ['close'][] event. +provided, it is added as a listener for the [`'close'`][] event. ### socket.dropMembership(multicastAddress[, multicastInterface]) * `multicastAddress` String * `multicastInterface` String, Optional -Opposite of `addMembership` - tells the kernel to leave a multicast group with +Opposite of [`addMembership()`][] - tells the kernel to leave a multicast group with `IP_DROP_MEMBERSHIP` socket option. This is automatically called by the kernel when the socket is closed or process terminates, so most apps will never need to call this. @@ -241,7 +240,7 @@ packets will also be received on the local interface. * `ttl` Integer -Sets the `IP_MULTICAST_TTL` socket option. TTL stands for "Time to Live," but in this +Sets the `IP_MULTICAST_TTL` socket option. TTL stands for "Time to Live", but in this context it specifies the number of IP hops that a packet is allowed to go through, specifically for multicast traffic. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. @@ -253,7 +252,7 @@ systems is 1. * `ttl` Integer -Sets the `IP_TTL` socket option. TTL stands for "Time to Live," but in this context it +Sets the `IP_TTL` socket option. TTL stands for "Time to Live", but in this context it specifies the number of IP hops that a packet is allowed to go through. Each router or gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. Changing TTL values is typically done for network @@ -280,39 +279,48 @@ Returns `socket`. ## dgram.createSocket(options[, callback]) * `options` Object -* `callback` Function. Attached as a listener to `message` events. +* `callback` Function. Attached as a listener to `'message'` events. * Returns: Socket object The `options` object should contain a `type` field of either `udp4` or `udp6` and an optional boolean `reuseAddr` field. -When `reuseAddr` is `true` `socket.bind()` will reuse the address, even if +When `reuseAddr` is `true` [`socket.bind()`][] will reuse the address, even if another process has already bound a socket on it. `reuseAddr` defaults to `false`. -Takes an optional callback which is added as a listener for `message` events. +Takes an optional callback which is added as a listener for `'message'` events. -Call `socket.bind()` if you want to receive datagrams. `socket.bind()` will +Call [`socket.bind()`][] if you want to receive datagrams. [`socket.bind()`][] will bind to the "all interfaces" address on a random port (it does the right thing for both `udp4` and `udp6` sockets). You can then retrieve the address and port -with `socket.address().address` and `socket.address().port`. +with [`socket.address().address`][] and [`socket.address().port`][]. ## dgram.createSocket(type[, callback]) * `type` String. Either 'udp4' or 'udp6' -* `callback` Function. Attached as a listener to `message` events. +* `callback` Function. Attached as a listener to `'message'` events. Optional * Returns: Socket object Creates a datagram Socket of the specified types. Valid types are `udp4` and `udp6`. -Takes an optional callback which is added as a listener for `message` events. +Takes an optional callback which is added as a listener for `'message'` events. -Call `socket.bind()` if you want to receive datagrams. `socket.bind()` will +Call [`socket.bind()`][] if you want to receive datagrams. [`socket.bind()`][] will bind to the "all interfaces" address on a random port (it does the right thing for both `udp4` and `udp6` sockets). You can then retrieve the address and port -with `socket.address().address` and `socket.address().port`. - -['close']: #dgram_event_close +with [`socket.address().address`][] and [`socket.address().port`][]. + +[`'close'`]: #dgram_event_close +[`addMembership()`]: #dgram_socket_addmembership_multicastaddress_multicastinterface +[`close()`]: #dgram_socket_close_callback +[`dgram.createSocket(...)`]: #dgram_dgram_createsocket_options_callback +[`dgram.Socket#bind()`]: #dgram_socket_bind_options_callback +[`Error`]: errors.html#errors_class_error +[`socket.address().address`]: #dgram_socket_address +[`socket.address().port`]: #dgram_socket_address +[`socket.bind()`]: #dgram_socket_bind_port_address_callback +[`socket.bind(port, \[address\], \[callback\])`]: #dgram_socket_bind_port_address_callback [byte length]: buffer.html#buffer_class_method_buffer_bytelength_string_encoding diff --git a/doc/api/dns.markdown b/doc/api/dns.markdown index e7b9fbb7987b93..ef68b93b8afabf 100644 --- a/doc/api/dns.markdown +++ b/doc/api/dns.markdown @@ -8,7 +8,7 @@ This module contains functions that belong to two different categories: 1) Functions that use the underlying operating system facilities to perform name resolution, and that do not necessarily do any network communication. -This category contains only one function: `dns.lookup()`. __Developers looking +This category contains only one function: [`dns.lookup()`][]. __Developers looking to perform name resolution in the same way that other applications on the same operating system behave should use [`dns.lookup()`][].__ @@ -97,7 +97,7 @@ With the `all` option set, the arguments change to `(err, addresses)`, with `addresses` being an array of objects with the properties `address` and `family`. -On error, `err` is an `Error` object, where `err.code` is the error code. +On error, `err` is an [`Error`][] object, where `err.code` is the error code. Keep in mind that `err.code` will be set to `'ENOENT'` not only when the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. @@ -118,7 +118,7 @@ Resolves the given address and port into a hostname and service using The callback has arguments `(err, hostname, service)`. The `hostname` and `service` arguments are strings (e.g. `'localhost'` and `'http'` respectively). -On error, `err` is an `Error` object, where `err.code` is the error code. +On error, `err` is an [`Error`][] object, where `err.code` is the error code. ## dns.resolve(hostname[, rrtype], callback) @@ -142,7 +142,7 @@ The callback has arguments `(err, addresses)`. The type of each item in `addresses` is determined by the record type, and described in the documentation for the corresponding lookup methods below. -On error, `err` is an `Error` object, where `err.code` is +On error, `err` is an [`Error`][] object, where `err.code` is one of the error codes listed below. @@ -215,7 +215,7 @@ Reverse resolves an ip address to an array of hostnames. The callback has arguments `(err, hostnames)`. -On error, `err` is an `Error` object, where `err.code` is +On error, `err` is an [`Error`][] object, where `err.code` is one of the error codes listed below. ## dns.setServers(servers) @@ -259,7 +259,7 @@ Each DNS query can return one of the following error codes: ## Supported getaddrinfo flags -The following flags can be passed as hints to `dns.lookup()`. +The following flags can be passed as hints to [`dns.lookup()`][]. - `dns.ADDRCONFIG`: Returned address types are determined by the types of addresses supported by the current system. For example, IPv4 addresses @@ -271,17 +271,17 @@ on some operating systems (e.g FreeBSD 10.1). ## Implementation considerations -Although `dns.lookup()` and `dns.resolve*()/dns.reverse()` functions have the same +Although [`dns.lookup()`][] and `dns.resolve*()/dns.reverse()` functions have the same goal of associating a network name with a network address (or vice versa), their behavior is quite different. These differences can have subtle but significant consequences on the behavior of Node.js programs. ### dns.lookup -Under the hood, `dns.lookup()` uses the same operating system facilities as most -other programs. For instance, `dns.lookup()` will almost always resolve a given +Under the hood, [`dns.lookup()`][] uses the same operating system facilities as most +other programs. For instance, [`dns.lookup()`][] will almost always resolve a given name the same way as the `ping` command. On most POSIX-like operating systems, -the behavior of the `dns.lookup()` function can be tweaked by changing settings +the behavior of the [`dns.lookup()`][] function can be tweaked by changing settings in `nsswitch.conf(5)` and/or `resolv.conf(5)`, but be careful that changing these files will change the behavior of all other programs running on the same operating system. @@ -299,21 +299,21 @@ setting the 'UV_THREADPOOL_SIZE' environment variable to a value greater than ### dns.resolve, functions starting with dns.resolve and dns.reverse -These functions are implemented quite differently than `dns.lookup()`. They do +These functions are implemented quite differently than [`dns.lookup()`][]. They do not use `getaddrinfo(3)` and they _always_ perform a DNS query on the network. This network communication is always done asynchronously, and does not use libuv's threadpool. As a result, these functions cannot have the same negative impact on other -processing that happens on libuv's threadpool that `dns.lookup()` can have. +processing that happens on libuv's threadpool that [`dns.lookup()`][] can have. -They do not use the same set of configuration files than what `dns.lookup()` +They do not use the same set of configuration files than what [`dns.lookup()`][] uses. For instance, _they do not use the configuration from `/etc/hosts`_. -[Implementation considerations section]: #dns_implementation_considerations -[supported `getaddrinfo` flags]: #dns_supported_getaddrinfo_flags +[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback [`dns.resolve()`]: #dns_dns_resolve_hostname_rrtype_callback [`dns.resolve4()`]: #dns_dns_resolve4_hostname_callback +[`Error`]: errors.html#errors_class_error +[Implementation considerations section]: #dns_implementation_considerations +[supported `getaddrinfo` flags]: #dns_supported_getaddrinfo_flags [the official libuv documentation]: http://docs.libuv.org/en/latest/threadpool.html -[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback - diff --git a/doc/api/domain.markdown b/doc/api/domain.markdown index c62b8555f035c4..16854d46acce6c 100644 --- a/doc/api/domain.markdown +++ b/doc/api/domain.markdown @@ -11,7 +11,7 @@ in the future. Domains provide a way to handle multiple different IO operations as a single group. If any of the event emitters or callbacks registered to a -domain emit an `error` event, or throw an error, then the domain object +domain emit an `'error'` event, or throw an error, then the domain object will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to exit immediately with an error code. @@ -23,7 +23,7 @@ exit immediately with an error code. Domain error handlers are not a substitute for closing down your process when an error occurs. -By the very nature of how `throw` works in JavaScript, there is almost +By the very nature of how [`throw`][] works in JavaScript, there is almost never any way to safely "pick up where you left off", without leaking references, or creating some other sort of undefined brittle state. @@ -174,11 +174,11 @@ function handleRequest(req, res) { -Any time an Error object is routed through a domain, a few extra fields +Any time an `Error` object is routed through a domain, a few extra fields are added to it. * `error.domain` The domain that first handled the error. -* `error.domainEmitter` The event emitter that emitted an 'error' event +* `error.domainEmitter` The event emitter that emitted an `'error'` event with the error object. * `error.domainBound` The callback function which was bound to the domain, and passed an error as its first argument. @@ -207,8 +207,8 @@ If you *want* to nest Domain objects as children of a parent Domain, then you must explicitly add them. Implicit binding routes thrown errors and `'error'` events to the -Domain's `error` event, but does not register the EventEmitter on the -Domain, so `domain.dispose()` will not shut down the EventEmitter. +Domain's `'error'` event, but does not register the EventEmitter on the +Domain, so [`domain.dispose()`][] will not shut down the EventEmitter. Implicit binding only takes care of thrown errors and `'error'` events. ## Explicit Binding @@ -264,8 +264,8 @@ Returns a new Domain object. The Domain class encapsulates the functionality of routing errors and uncaught exceptions to the active Domain object. -Domain is a child class of [EventEmitter][]. To handle the errors that it -catches, listen to its `error` event. +Domain is a child class of [`EventEmitter`][]. To handle the errors that it +catches, listen to its `'error'` event. ### domain.run(fn[, arg][, ...]) @@ -312,12 +312,12 @@ to the domain. * `emitter` {EventEmitter | Timer} emitter or timer to be added to the domain Explicitly adds an emitter to the domain. If any event handlers called by -the emitter throw an error, or if the emitter emits an `error` event, it -will be routed to the domain's `error` event, just like with implicit +the emitter throw an error, or if the emitter emits an `'error'` event, it +will be routed to the domain's `'error'` event, just like with implicit binding. -This also works with timers that are returned from `setInterval` and -`setTimeout`. If their callback function throws, it will be caught by +This also works with timers that are returned from [`setInterval()`][] and +[`setTimeout()`][]. If their callback function throws, it will be caught by the domain 'error' handler. If the Timer or EventEmitter was already bound to a domain, it is removed @@ -327,7 +327,7 @@ from that one, and bound to this one instead. * `emitter` {EventEmitter | Timer} emitter or timer to be removed from the domain -The opposite of `domain.add(emitter)`. Removes domain handling from the +The opposite of [`domain.add(emitter)`][]. Removes domain handling from the specified emitter. ### domain.bind(callback) @@ -337,7 +337,7 @@ specified emitter. The returned function will be a wrapper around the supplied callback function. When the returned function is called, any errors that are -thrown will be routed to the domain's `error` event. +thrown will be routed to the domain's `'error'` event. #### Example @@ -361,11 +361,11 @@ thrown will be routed to the domain's `error` event. * `callback` {Function} The callback function * return: {Function} The intercepted function -This method is almost identical to `domain.bind(callback)`. However, in -addition to catching thrown errors, it will also intercept `Error` +This method is almost identical to [`domain.bind(callback)`][]. However, in +addition to catching thrown errors, it will also intercept [`Error`][] objects sent as the first argument to the function. -In this way, the common `if (er) return callback(er);` pattern can be replaced +In this way, the common `if (err) return callback(err);` pattern can be replaced with a single error handler in a single place. #### Example @@ -397,12 +397,12 @@ with a single error handler in a single place. The `enter` method is plumbing used by the `run`, `bind`, and `intercept` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly pushes the domain onto the domain stack managed -by the domain module (see `domain.exit()` for details on the domain stack). The +by the domain module (see [`domain.exit()`][] for details on the domain stack). The call to `enter` delimits the beginning of a chain of asynchronous calls and I/O operations bound to a domain. Calling `enter` changes only the active domain, and does not alter the domain -itself. `Enter` and `exit` can be called an arbitrary number of times on a +itself. `enter` and `exit` can be called an arbitrary number of times on a single domain. If the domain on which `enter` is called has been disposed, `enter` will return @@ -420,7 +420,7 @@ If there are multiple, nested domains bound to the current execution context, `exit` will exit any domains nested within this domain. Calling `exit` changes only the active domain, and does not alter the domain -itself. `Enter` and `exit` can be called an arbitrary number of times on a +itself. `enter` and `exit` can be called an arbitrary number of times on a single domain. If the domain on which `exit` is called has been disposed, `exit` will return @@ -432,7 +432,15 @@ without exiting the domain. explicitly via error event handlers set on the domain. Once `dispose` has been called, the domain will no longer be used by callbacks -bound into the domain via `run`, `bind`, or `intercept`, and a `dispose` event +bound into the domain via `run`, `bind`, or `intercept`, and a `'dispose'` event is emitted. -[EventEmitter]: events.html#events_class_events_eventemitter +[`domain.add(emitter)`]: #domain_domain_add_emitter +[`domain.bind(callback)`]: #domain_domain_bind_callback +[`domain.dispose()`]: #domain_domain_dispose +[`domain.exit()`]: #domain_domain_exit +[`Error`]: errors.html#errors_class_error +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`setInterval()`]: timers.html#timers_setinterval_callback_delay_arg +[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_arg +[`throw`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throw diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index d2c09f2e6b7788..799a8141af43e1 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -3,7 +3,7 @@ Errors generated by Node.js fall into two categories: JavaScript errors and system -errors. All errors inherit from or are instances of JavaScript's [Error][] +errors. All errors inherit from or are instances of JavaScript's [`Error`][] class and are guaranteed to provide *at least* the attributes available on that class. @@ -15,7 +15,7 @@ opportunity to **intercept** this error based on how the API **propagates** it. The style of API called determines how generated errors are handed back, or **propagated**, to client code, which in turn informs how the client may **intercept** -the error. Exceptions can be intercepted using the `try / catch` construct; +the error. Exceptions can be intercepted using the [`try / catch` construct][]; other propagation strategies are covered [below][]. ## Error Propagation and Interception @@ -26,9 +26,9 @@ All Node.js APIs will treat invalid arguments as exceptional -- that is, if pass invalid arguments, they will *immediately* generate and throw the error as an exception, even if they are an otherwise asynchronous API. -Synchronous APIs (like [fs.readFileSync][]) will throw the error. The act of +Synchronous APIs (like [`fs.readFileSync`][]) will throw the error. The act of *throwing* a value (in this case, the error) turns the value into an **exception**. -Exceptions may be caught using the `try { } catch(err) { }` construct. +Exceptions may be caught using the [`try { } catch(err) { }`][] construct. Asynchronous APIs have **two** mechanisms for error propagation; one mechanism for APIs that represent a single operation, and one for APIs that represent @@ -38,20 +38,20 @@ multiple operations over time. -The other mechanism for providing errors is the "error" event. This is +The other mechanism for providing errors is the `'error'` event. This is typically used by [stream-based][] and [event emitter-based][] APIs, which themselves represent a series of asynchronous operations over time (versus a -single operation that may pass or fail). If no "error" event handler is +single operation that may pass or fail). If no `'error'` event handler is attached to the source of the error, the error will be thrown. At this point, it will crash the process as an unhandled exception unless [domains][] are -employed appropriately or [process.on('uncaughtException')][] has a handler. +employed appropriately or [`process.on('uncaughtException')`][] has a handler. ```javascript var net = require('net'); var connection = net.connect('localhost'); -// adding an "error" event handler to a stream: +// adding an 'error' event handler to a stream: connection.on('error', function(err) { // if the connection is reset by the server, or if it can't // connect at all, or on any sort of error encountered by @@ -72,7 +72,7 @@ var EventEmitter = require('events'); var ee = new EventEmitter(); setImmediate(function() { - // this will crash the process because no "error" event + // this will crash the process because no 'error' event // handler has been added. ee.emit('error', new Error('This will crash')); }); @@ -154,7 +154,7 @@ errors as well as plain JavaScript errors. #### new Error(message) -Instantiates a new Error object and sets its `.message` property to the provided +Instantiates a new `Error` object and sets its `.message` property to the provided message. Its `.stack` will represent the point in the program at which `new Error` was called. Stack traces are subject to [V8's stack trace API][]. Stack traces only extend to the beginning of synchronous code execution, *or* a number of frames given by @@ -279,12 +279,12 @@ The number of frames captured by the stack trace is bounded by the smaller of `Error.stackTraceLimit` or the number of available frames on the current event loop tick. -System-level errors are generated as augmented Error instances, which are detailed +System-level errors are generated as augmented `Error` instances, which are detailed [below](#errors_system_errors). ### Class: RangeError -A subclass of Error that indicates that a provided argument was not within the +A subclass of `Error` that indicates that a provided argument was not within the set or range of acceptable values for a function; whether that be a numeric range, or outside the set of options for a given function parameter. An example: @@ -292,12 +292,12 @@ range, or outside the set of options for a given function parameter. An example: require('net').connect(-1); // throws RangeError, port should be > 0 && < 65536 ``` -Node.js will generate and throw RangeError instances *immediately* -- they are a form +Node.js will generate and throw `RangeError` instances *immediately* -- they are a form of argument validation. ### Class: ReferenceError -A subclass of Error that indicates that an attempt is being made to access a variable +A subclass of `Error` that indicates that an attempt is being made to access a variable that is not defined. Most commonly it indicates a typo, or an otherwise broken program. While client code may generate and propagate these errors, in practice only V8 will do so. @@ -306,7 +306,7 @@ so. doesNotExist; // throws ReferenceError, doesNotExist is not a variable in this program. ``` -ReferenceError instances will have an `.arguments` member that is an array containing +`ReferenceError` instances will have an `.arguments` member that is an array containing one element -- a string representing the variable that was not defined. ```javascript @@ -323,7 +323,7 @@ dependencies. ### Class: SyntaxError -A subclass of Error that indicates that a program is not valid JavaScript. +A subclass of `Error` that indicates that a program is not valid JavaScript. These errors may only be generated and propagated as a result of code evaluation. Code evaluation may happen as a result of `eval`, `Function`, `require`, or [vm][]. These errors are almost always indicative of a broken @@ -342,7 +342,7 @@ by other contexts. ### Class: TypeError -A subclass of Error that indicates that a provided argument is not an allowable +A subclass of `Error` that indicates that a provided argument is not an allowable type. For example, passing a function to a parameter which expects a string would be considered a TypeError. @@ -350,7 +350,7 @@ be considered a TypeError. require('url').parse(function() { }); // throws TypeError, since it expected a string ``` -Node.js will generate and throw TypeError instances *immediately* -- they are a form +Node.js will generate and throw `TypeError` instances *immediately* -- they are a form of argument validation. ### Exceptions vs. Errors @@ -373,7 +373,7 @@ react to. They are generated at the syscall level: an exhaustive list of error codes and their meanings is available by running `man 2 intro` or `man 3 errno` on most Unices; or [online][]. -In Node.js, system errors are represented as augmented Error objects -- not full +In Node.js, system errors are represented as augmented `Error` objects -- not full subclasses, but instead an error instance with added members. ### Class: System Error @@ -400,7 +400,7 @@ permissions. #### EADDRINUSE: Address already in use -An attempt to bind a server ([net][], [http][], or [https][]) to a local +An attempt to bind a server ([`net`][], [`http`][], or [`https`][]) to a local address failed due to another server on the local system already occupying that address. @@ -414,7 +414,7 @@ on the foreign host. A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout -or reboot. Commonly encountered via the [http][] and [net][] modules. +or reboot. Commonly encountered via the [`http`][] and [`net`][] modules. #### EEXIST: File exists @@ -438,18 +438,18 @@ that will run the Node.js process. #### ENOENT: No such file or directory -Commonly raised by [fs][] operations; a component of the specified pathname +Commonly raised by [`fs`][] operations; a component of the specified pathname does not exist -- no entity (file or directory) could be found by the given path. #### ENOTDIR: Not a directory A component of the given pathname existed, but was not a directory as expected. -Commonly raised by [fs.readdir][]. +Commonly raised by [`fs.readdir`][]. #### ENOTEMPTY: Directory not empty A directory with entries was the target of an operation that requires -an empty directory -- usually [fs.unlink][]. +an empty directory -- usually [`fs.unlink`][]. #### EPERM: Operation not permitted @@ -459,30 +459,32 @@ privileges. #### EPIPE: Broken pipe A write on a pipe, socket, or FIFO for which there is no process to read the -data. Commonly encountered at the [net][] and [http][] layers, indicative that +data. Commonly encountered at the [`net`][] and [`http`][] layers, indicative that the remote side of the stream being written to has been closed. #### ETIMEDOUT: Operation timed out A connect or send request failed because the connected party did not properly -respond after a period of time. Usually encountered by [http][] or [net][] -- +respond after a period of time. Usually encountered by [`http`][] or [`net`][] -- often a sign that a connected socket was not `.end()`'d appropriately. -[Error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error +[`Error`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error +[`fs.readdir`]: fs.html#fs_fs_readdir_path_callback +[`fs.readFileSync`]: fs.html#fs_fs_readfilesync_file_options +[`fs.unlink`]: fs.html#fs_fs_unlink_path_callback +[`fs`]: fs.html +[`http`]: http.html +[`https`]: https.html +[`net`]: net.html +[`process.on('uncaughtException')`]: process.html#process_event_uncaughtexception +[`try / catch` construct]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch +[`try { } catch(err) { }`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch [below]: #errors_error_propagation_and_interception -[fs.readFileSync]: fs.html#fs_fs_readfilesync_file_options -[stream-based]: stream.html -[event emitter-based]: events.html#events_class_events_eventemitter [domains]: domain.html -[process.on('uncaughtException')]: process.html#process_event_uncaughtexception -[V8's stack trace API]: https://code.google.com/p/v8-wiki/wiki/JavaScriptStackTraceApi -[vm]: vm.html +[event emitter-based]: events.html#events_class_events_eventemitter +[file descriptors]: http://en.wikipedia.org/wiki/File_descriptor [online]: http://man7.org/linux/man-pages/man3/errno.3.html +[stream-based]: stream.html [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html -[net]: net.html -[http]: http.html -[https]: https.html -[file descriptors]: http://en.wikipedia.org/wiki/File_descriptor -[fs]: fs.html -[fs.readdir]: fs.html#fs_fs_readdir_path_callback -[fs.unlink]: fs.html#fs_fs_unlink_path_callback +[V8's stack trace API]: https://code.google.com/p/v8-wiki/wiki/JavaScriptStackTraceApi +[vm]: vm.html diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index dc657a476aca97..7c06803b3ee72a 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -64,7 +64,7 @@ will be relative to `process.cwd()`. Most fs functions let you omit the callback argument. If you do, a default callback is used that rethrows errors. To get a trace to the original call -site, set the NODE_DEBUG environment variable: +site, set the `NODE_DEBUG` environment variable: $ cat script.js function bad() { @@ -94,7 +94,7 @@ Objects returned from `fs.watch()` are of this type. * `filename` {String} The filename that changed (if relevant/available) Emitted when something changes in a watched directory or file. -See more details in [fs.watch][]. +See more details in [`fs.watch()`][]. ### Event: 'error' @@ -118,18 +118,18 @@ Emitted when the ReadStream's file is opened. ## Class: fs.Stats -Objects returned from `fs.stat()`, `fs.lstat()` and `fs.fstat()` and their +Objects returned from [`fs.stat()`][], [`fs.lstat()`][] and [`fs.fstat()`][] and their synchronous counterparts are of this type. - `stats.isFile()` - `stats.isDirectory()` - `stats.isBlockDevice()` - `stats.isCharacterDevice()` - - `stats.isSymbolicLink()` (only valid with `fs.lstat()`) + - `stats.isSymbolicLink()` (only valid with [`fs.lstat()`][]) - `stats.isFIFO()` - `stats.isSocket()` -For a regular file `util.inspect(stats)` would return a string very +For a regular file [`util.inspect(stats)`][] would return a string very similar to this: { dev: 2114, @@ -148,9 +148,9 @@ similar to this: birthtime: Mon, 10 Oct 2011 23:24:11 GMT } Please note that `atime`, `mtime`, `birthtime`, and `ctime` are -instances of [Date][MDN-Date] object and to compare the values of +instances of [`Date`][MDN-Date] object and to compare the values of these objects you should use appropriate methods. For most general -uses [getTime()][MDN-Date-getTime] will return the number of +uses [`getTime()`][MDN-Date-getTime] will return the number of milliseconds elapsed since _1 January 1970 00:00:00 UTC_ and this integer should be sufficient for any comparison, however there are additional methods which can be used for displaying fuzzy information. @@ -222,7 +222,7 @@ argument will be populated. The following example checks if the file ## fs.accessSync(path[, mode]) -Synchronous version of `fs.access`. This throws if any accessibility checks +Synchronous version of [`fs.access()`][]. This throws if any accessibility checks fail, and does nothing otherwise. ## fs.appendFile(file, data[, options], callback) @@ -255,7 +255,7 @@ _Note: Specified file descriptors will not be closed automatically._ ## fs.appendFileSync(file, data[, options]) -The synchronous version of `fs.appendFile`. Returns `undefined`. +The synchronous version of [`fs.appendFile()`][]. Returns `undefined`. ## fs.chmod(path, mode, callback) @@ -286,7 +286,7 @@ Synchronous close(2). Returns `undefined`. ## fs.createReadStream(path[, options]) -Returns a new ReadStream object (See `Readable Stream`). +Returns a new [`ReadStream`][] object. (See [Readable Stream][]). Be aware that, unlike the default value set for `highWaterMark` on a readable stream (16 kb), the stream returned by this method has a @@ -303,12 +303,12 @@ default value of 64 kb for the same parameter. `options` can include `start` and `end` values to read a range of bytes from the file instead of the entire file. Both `start` and `end` are inclusive and -start at 0. The `encoding` can be any one of those accepted by [Buffer][]. +start at 0. The `encoding` can be any one of those accepted by [`Buffer`][]. If `fd` is specified, `ReadStream` will ignore the `path` argument and will use -the specified file descriptor. This means that no `open` event will be emitted. +the specified file descriptor. This means that no `'open'` event will be emitted. Note that `fd` should be blocking; non-blocking `fd`s should be passed to -`net.Socket`. +[`net.Socket`][]. If `autoClose` is false, then the file descriptor won't be closed, even if there's an error. It is your responsibility to close it and make sure @@ -327,7 +327,7 @@ If `options` is a string, then it specifies the encoding. ## fs.createWriteStream(path[, options]) -Returns a new WriteStream object (See `Writable Stream`). +Returns a new [`WriteStream`][] object. (See [Writable Stream][]). `options` is an object or string with the following defaults: @@ -339,18 +339,18 @@ Returns a new WriteStream object (See `Writable Stream`). `options` may also include a `start` option to allow writing data at some position past the beginning of the file. Modifying a file rather than replacing it may require a `flags` mode of `r+` rather than the -default mode `w`. The `defaultEncoding` can be any one of those accepted by [Buffer][]. +default mode `w`. The `defaultEncoding` can be any one of those accepted by [`Buffer`][]. -Like `ReadStream` above, if `fd` is specified, `WriteStream` will ignore the +Like [`ReadStream`][], if `fd` is specified, `WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no -`open` event will be emitted. Note that `fd` should be blocking; non-blocking -`fd`s should be passed to `net.Socket`. +`'open'` event will be emitted. Note that `fd` should be blocking; non-blocking +`fd`s should be passed to [`net.Socket`][]. If `options` is a string, then it specifies the encoding. ## fs.exists(path, callback) - Stability: 0 - Deprecated: Use [fs.stat][] or [fs.access][] instead. + Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. Test whether or not the given path exists by checking with the file system. Then call the `callback` argument with either true or false. Example: @@ -367,9 +367,9 @@ non-existent. ## fs.existsSync(path) - Stability: 0 - Deprecated: Use [fs.statSync][] or [fs.accessSync][] instead. + Stability: 0 - Deprecated: Use [`fs.statSync()`][] or [`fs.accessSync()`][] instead. -Synchronous version of [`fs.exists`][]. +Synchronous version of [`fs.exists()`][]. Returns `true` if the file exists, `false` otherwise. ## fs.fchmod(fd, mode, callback) @@ -393,7 +393,7 @@ Synchronous fchown(2). Returns `undefined`. ## fs.fstat(fd, callback) Asynchronous fstat(2). The callback gets two arguments `(err, stats)` where -`stats` is a `fs.Stats` object. `fstat()` is identical to `stat()`, except that +`stats` is a `fs.Stats` object. `fstat()` is identical to [`stat()`][], except that the file to be stat-ed is specified by the file descriptor `fd`. ## fs.fstatSync(fd) @@ -425,7 +425,7 @@ descriptor. ## fs.futimesSync(fd, atime, mtime) -Synchronous version of `fs.futimes()`. Returns `undefined`. +Synchronous version of [`fs.futimes()`][]. Returns `undefined`. ## fs.lchmod(path, mode, callback) @@ -540,7 +540,7 @@ the end of the file. ## fs.openSync(path, flags[, mode]) -Synchronous version of `fs.open()`. Returns an integer representing the file +Synchronous version of [`fs.open()`][]. Returns an integer representing the file descriptor. ## fs.read(fd, buffer, offset, length, position, callback) @@ -599,7 +599,7 @@ _Note: Specified file descriptors will not be closed automatically._ ## fs.readFileSync(file[, options]) -Synchronous version of `fs.readFile`. Returns the contents of the `file`. +Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`. If the `encoding` option is specified then this function returns a string. Otherwise it returns a buffer. @@ -630,7 +630,7 @@ Example: ## fs.readSync(fd, buffer, offset, length, position) -Synchronous version of `fs.read`. Returns the number of `bytesRead`. +Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`. ## fs.realpathSync(path[, cache]) @@ -657,12 +657,12 @@ Synchronous rmdir(2). Returns `undefined`. ## fs.stat(path, callback) Asynchronous stat(2). The callback gets two arguments `(err, stats)` where -`stats` is a [fs.Stats][] object. See the [fs.Stats][] section below for more +`stats` is a [`fs.Stats`][] object. See the [`fs.Stats`][] section below for more information. ## fs.statSync(path) -Synchronous stat(2). Returns an instance of `fs.Stats`. +Synchronous stat(2). Returns an instance of [`fs.Stats`][]. ## fs.symlink(target, path[, type], callback) @@ -711,8 +711,8 @@ have effectively stopped watching `filename`. Calling `fs.unwatchFile()` with a filename that is not being watched is a no-op, not an error. -_Note: `fs.watch` is more efficient than `fs.watchFile` and `fs.unwatchFile`. -`fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` +_Note: [`fs.watch()`][] is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. +`fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible._ ## fs.utimes(path, atime, mtime, callback) @@ -722,19 +722,19 @@ Change file timestamps of the file referenced by the supplied path. Note: the arguments `atime` and `mtime` of the following related functions does follow the below rules: -- If the value is a numberable string like "123456789", the value would get +- If the value is a numberable string like `'123456789'`, the value would get converted to corresponding number. - If the value is `NaN` or `Infinity`, the value would get converted to `Date.now()`. ## fs.utimesSync(path, atime, mtime) -Synchronous version of `fs.utimes()`. Returns `undefined`. +Synchronous version of [`fs.utimes()`][]. Returns `undefined`. ## fs.watch(filename[, options][, listener]) Watch for changes on `filename`, where `filename` is either a file or a -directory. The returned object is a [fs.FSWatcher][]. +directory. The returned object is a [`fs.FSWatcher`][]. The second argument is optional. The `options` if provided should be an object. The supported boolean members are `persistent` and `recursive`. `persistent` @@ -746,7 +746,7 @@ on supported platforms (See Caveats below). The default is `{ persistent: true, recursive: false }`. The listener callback gets two arguments `(event, filename)`. `event` is either -'rename' or 'change', and `filename` is the name of the file which triggered +`'rename'` or `'change'`, and `filename` is the name of the file which triggered the event. ### Caveats @@ -828,7 +828,7 @@ _Note: when an `fs.watchFile` operation results in an `ENOENT` error, it will of zero. If the file is created later on, the listener will be called again, with the latest stat objects. This is a change in functionality since v0.10._ -_Note: `fs.watch` is more efficient than `fs.watchFile` and `fs.unwatchFile`. +_Note: [`fs.watch()`][] is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible._ @@ -866,7 +866,7 @@ the current position. See pwrite(2). The callback will receive the arguments `(err, written, string)` where `written` specifies how many _bytes_ the passed string required to be written. Note that -bytes written is not the same as string characters. See [Buffer.byteLength][]. +bytes written is not the same as string characters. See [`Buffer.byteLength`][]. Unlike when writing `buffer`, the entire string must be written. No substring may be specified. This is because the byte offset of the resulting data may not @@ -917,25 +917,40 @@ _Note: Specified file descriptors will not be closed automatically._ ## fs.writeFileSync(file, data[, options]) -The synchronous version of `fs.writeFile`. Returns `undefined`. +The synchronous version of [`fs.writeFile()`][]. Returns `undefined`. ## fs.writeSync(fd, buffer, offset, length[, position]) ## fs.writeSync(fd, data[, position[, encoding]]) -Synchronous versions of `fs.write()`. Returns the number of bytes written. - -[fs.watch]: #fs_fs_watch_filename_options_listener -[Readable Stream]: stream.html#stream_class_stream_readable -[MDN-Date]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date +Synchronous versions of [`fs.write()`][]. Returns the number of bytes written. + +[`Buffer.byteLength`]: buffer.html#buffer_class_method_buffer_bytelength_string_encoding +[`Buffer`]: buffer.html#buffer_buffer +[`fs.access()`]: #fs_fs_access_path_mode_callback +[`fs.accessSync()`]: #fs_fs_accesssync_path_mode +[`fs.appendFile()`]: fs.html#fs_fs_appendfile_file_data_options_callback +[`fs.exists()`]: fs.html#fs_fs_exists_path_callback +[`fs.fstat()`]: #fs_fs_fstat_fd_callback +[`fs.FSWatcher`]: #fs_class_fs_fswatcher +[`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback +[`fs.lstat()`]: #fs_fs_lstat_path_callback +[`fs.open()`]: #fs_fs_open_path_flags_mode_callback +[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback +[`fs.readFile`]: #fs_fs_readfile_file_options_callback +[`fs.stat()`]: #fs_fs_stat_path_callback +[`fs.Stats`]: #fs_class_fs_stats +[`fs.statSync()`]: #fs_fs_statsync_path +[`fs.utimes()`]: #fs_fs_futimes_fd_atime_mtime_callback +[`fs.watch()`]: #fs_fs_watch_filename_options_listener +[`fs.write()`]: #fs_fs_write_fd_buffer_offset_length_position_callback +[`fs.writeFile()`]: #fs_fs_writefile_file_data_options_callback +[`net.Socket`]: net.html#net_class_net_socket +[`ReadStream`]: #fs_class_fs_readstream +[`stat()`]: fs.html#fs_fs_stat_path_callback +[`util.inspect(stats)`]: util.html#util_util_inspect_object_options +[`WriteStream`]: #fs_class_fs_writestream [MDN-Date-getTime]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime +[MDN-Date]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date +[Readable Stream]: stream.html#stream_class_stream_readable [Writable Stream]: stream.html#stream_class_stream_writable -[fs.stat]: #fs_fs_stat_path_callback -[`fs.exists`]: fs.html#fs_fs_exists_path_callback -[fs.access]: #fs_fs_access_path_mode_callback -[fs.statSync]: #fs_fs_statsync_path -[fs.accessSync]: #fs_fs_accesssync_path_mode -[fs.Stats]: #fs_class_fs_stats -[Buffer]: buffer.html#buffer_buffer -[fs.FSWatcher]: #fs_class_fs_fswatcher -[Buffer.byteLength]: buffer.html#buffer_class_method_buffer_bytelength_string_encoding diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index dd675c90664c49..5ac7bd9a0c3aa9 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -11,7 +11,7 @@ actually in the global scope but in the module scope - this will be noted. * {Function} -Used to handle binary data. See the [buffer section][] +Used to handle binary data. See the [buffer section][]. ## __dirname @@ -48,7 +48,7 @@ Example: running `node example.js` from `/Users/mjr` ## clearInterval(t) -Stop a timer that was previously created with `setInterval()`. The callback +Stop a timer that was previously created with [`setInterval()`][]. The callback will not execute. @@ -57,7 +57,7 @@ The timer functions are global variables. See the [timers][] section. ## clearTimeout(t) -Stop a timer that was previously created with `setTimeout()`. The callback will +Stop a timer that was previously created with [`setTimeout()`][]. The callback will not execute. ## console @@ -66,7 +66,7 @@ not execute. * {Object} -Used to print to stdout and stderr. See the [console][] section. +Used to print to stdout and stderr. See the [`console`][] section. ## exports @@ -111,7 +111,7 @@ See the [module system documentation][] for more information. * {Object} -The process object. See the [process object][] section. +The process object. See the [`process` object][] section. ## require() @@ -179,9 +179,11 @@ cannot span more than 24.8 days. Returns an opaque value that represents the timer. +[`console`]: console.html +[`process` object]: process.html#process_process +[`setInterval()`]: #globals_setinterval_cb_ms +[`setTimeout()`]: #globals_settimeout_cb_ms [buffer section]: buffer.html [module system documentation]: modules.html [Modules]: modules.html#modules_modules -[process object]: process.html#process_process -[console]: console.html [timers]: timers.html diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 154580a8946b2b..091f738be6b2fa 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -25,7 +25,7 @@ HTTP API is very low-level. It deals with stream handling and message parsing only. It parses a message into headers and body but it does not parse the actual headers or the body. -See [message.headers][] for details on how duplicate headers are handled. +See [`message.headers`][] for details on how duplicate headers are handled. The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For @@ -60,7 +60,7 @@ agents when they are no longer in use, so that the Sockets will be shut down. Sockets are removed from the agent's pool when the socket emits either -a "close" event or a special "agentRemove" event. This means that if +a `'close'` event or a special `'agentRemove'` event. This means that if you intend to keep one HTTP request open for a long time and don't want it to stay in the pool you can do something along the lines of: @@ -97,10 +97,10 @@ Alternatively, you could just opt out of pooling entirely using in a free state. Only relevant if `keepAlive` is set to `true`. Default = `256`. -The default `http.globalAgent` that is used by `http.request` has all +The default [`http.globalAgent`][] that is used by [`http.request()`][] has all of these values set to their respective defaults. -To configure any of them, you must create your own `Agent` object. +To configure any of them, you must create your own [`http.Agent`][] object. ```javascript var http = require('http'); @@ -156,7 +156,7 @@ Agent. Do not modify. ## Class: http.ClientRequest -This object is created internally and returned from `http.request()`. It +This object is created internally and returned from [`http.request()`][]. It represents an _in-progress_ request whose header has already been queued. The header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will be sent along with the first @@ -165,7 +165,7 @@ data chunk or when closing the connection. To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response headers have been received. The `'response'` event is executed with one -argument which is an instance of [http.IncomingMessage][]. +argument which is an instance of [`http.IncomingMessage`][]. During the `'response'` event, one can add listeners to the response object; particularly to listen for the `'data'` event. @@ -183,7 +183,7 @@ Note: Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. The request implements the [Writable Stream][] interface. This is an -[EventEmitter][] with the following events: +[`EventEmitter`][] with the following events: ### Event: 'abort' @@ -196,11 +196,11 @@ emitted on the first call to `abort()`. `function (response, socket, head) { }` -Emitted each time a server responds to a request with a CONNECT method. If this -event isn't being listened for, clients receiving a CONNECT method will have +Emitted each time a server responds to a request with a `CONNECT` method. If this +event isn't being listened for, clients receiving a `CONNECT` method will have their connections closed. -A client server pair that show you how to listen for the `connect` event. +A client server pair that show you how to listen for the `'connect'` event. var http = require('http'); var net = require('net'); @@ -268,7 +268,7 @@ the client should send the request body. `function (response) { }` Emitted when a response is received to this request. This event is emitted only -once. The `response` argument will be an instance of [http.IncomingMessage][]. +once. The `response` argument will be an instance of [`http.IncomingMessage`][]. Options: @@ -290,7 +290,7 @@ Emitted each time a server responds to a request with an upgrade. If this event isn't being listened for, clients receiving an upgrade header will have their connections closed. -A client server pair that show you how to listen for the `upgrade` event. +A client server pair that show you how to listen for the `'upgrade'` event. var http = require('http'); @@ -343,7 +343,7 @@ unsent, it will flush them to the stream. If the request is chunked, this will send the terminating `'0\r\n\r\n'`. If `data` is specified, it is equivalent to calling -`request.write(data, encoding)` followed by `request.end(callback)`. +[`response.write(data, encoding)`][] followed by `request.end(callback)`. If `callback` is specified, it will be called when the request stream is finished. @@ -363,17 +363,17 @@ the optimization and kickstart the request. ### request.setNoDelay([noDelay]) Once a socket is assigned to this request and is connected -[socket.setNoDelay()][] will be called. +[`socket.setNoDelay()`][] will be called. ### request.setSocketKeepAlive([enable][, initialDelay]) Once a socket is assigned to this request and is connected -[socket.setKeepAlive()][] will be called. +[`socket.setKeepAlive()`][] will be called. ### request.setTimeout(timeout[, callback]) Once a socket is assigned to this request and is connected -[socket.setTimeout()][] will be called. +[`socket.setTimeout()`][] will be called. ### request.write(chunk[, encoding][, callback]) @@ -383,7 +383,7 @@ server--in that case it is suggested to use the `['Transfer-Encoding', 'chunked']` header line when creating the request. -The `chunk` argument should be a [Buffer][] or a string. +The `chunk` argument should be a [`Buffer`][] or a string. The `encoding` argument is optional and only applies when `chunk` is a string. Defaults to `'utf8'`. @@ -395,7 +395,7 @@ Returns `request`. ## Class: http.Server -This is an [EventEmitter][] with the following events: +This is an [`EventEmitter`][] with the following events: ### Event: 'checkContinue' @@ -405,21 +405,21 @@ Emitted each time a request with an http Expect: 100-continue is received. If this event isn't listened for, the server will automatically respond with a 100 Continue as appropriate. -Handling this event involves calling [response.writeContinue()][] if the client +Handling this event involves calling [`response.writeContinue()`][] if the client should continue to send the request body, or generating an appropriate HTTP response (e.g., 400 Bad Request) if the client should not continue to send the request body. -Note that when this event is emitted and handled, the `request` event will +Note that when this event is emitted and handled, the `'request'` event will not be emitted. ### Event: 'clientError' `function (exception, socket) { }` -If a client connection emits an 'error' event, it will be forwarded here. +If a client connection emits an `'error'` event, it will be forwarded here. -`socket` is the `net.Socket` object that the error originated from. +`socket` is the [`net.Socket`][] object that the error originated from. ### Event: 'close' @@ -431,8 +431,8 @@ Emitted when the server closes. `function (request, socket, head) { }` -Emitted each time a client requests a http CONNECT method. If this event isn't -listened for, then clients requesting a CONNECT method will have their +Emitted each time a client requests a http `CONNECT` method. If this event isn't +listened for, then clients requesting a `CONNECT` method will have their connections closed. * `request` is the arguments for the http request, as it is in the request @@ -441,7 +441,7 @@ connections closed. * `head` is an instance of Buffer, the first packet of the tunneling stream, this may be empty. -After this event is emitted, the request's socket will not have a `data` +After this event is emitted, the request's socket will not have a `'data'` event listener, meaning you will need to bind to it in order to handle data sent to the server on that socket. @@ -450,8 +450,8 @@ sent to the server on that socket. `function (socket) { }` When a new TCP stream is established. `socket` is an object of type -`net.Socket`. Usually users will not want to access this event. In -particular, the socket will not emit `readable` events because of how +[`net.Socket`][]. Usually users will not want to access this event. In +particular, the socket will not emit `'readable'` events because of how the protocol parser attaches to the socket. The `socket` can also be accessed at `request.connection`. @@ -461,8 +461,8 @@ accessed at `request.connection`. Emitted each time there is a request. Note that there may be multiple requests per connection (in the case of keep-alive connections). - `request` is an instance of [http.IncomingMessage][] and `response` is -an instance of [http.ServerResponse][]. + `request` is an instance of [`http.IncomingMessage`][] and `response` is +an instance of [`http.ServerResponse`][]. ### Event: 'upgrade' @@ -478,13 +478,13 @@ closed. * `head` is an instance of Buffer, the first packet of the upgraded stream, this may be empty. -After this event is emitted, the request's socket will not have a `data` +After this event is emitted, the request's socket will not have a `'data'` event listener, meaning you will need to bind to it in order to handle data sent to the server on that socket. ### server.close([callback]) -Stops the server from accepting new connections. See [net.Server.close()][]. +Stops the server from accepting new connections. See [`net.Server.close()`][]. ### server.listen(handle[, callback]) @@ -501,14 +501,14 @@ already been bound to a port or domain socket. Listening on a file descriptor is not supported on Windows. This function is asynchronous. The last parameter `callback` will be added as -a listener for the ['listening'][] event. See also [net.Server.listen()][]. +a listener for the `'listening'` event. See also [`net.Server.listen()`][]. ### server.listen(path[, callback]) Start a UNIX socket server listening for connections on the given `path`. This function is asynchronous. The last parameter `callback` will be added as -a listener for the ['listening'][] event. See also [net.Server.listen(path)][]. +a listener for the `'listening'` event. See also [`net.Server.listen(path)`][]. ### server.listen(port[, hostname][, backlog][, callback]) @@ -525,7 +525,7 @@ The actual length will be determined by your OS through sysctl settings such as parameter is 511 (not 512). This function is asynchronous. The last parameter `callback` will be added as -a listener for the ['listening'][] event. See also [net.Server.listen(port)][]. +a listener for the `'listening'` event. See also [`net.Server.listen(port)`][]. ### server.maxHeadersCount @@ -571,14 +571,14 @@ This object is created internally by a HTTP server--not by the user. It is passed as the second parameter to the `'request'` event. The response implements the [Writable Stream][] interface. This is an -[EventEmitter][] with the following events: +[`EventEmitter`][] with the following events: ### Event: 'close' `function () { }` Indicates that the underlying connection was terminated before -[response.end()][] was called or able to flush. +[`response.end()`][] was called or able to flush. ### Event: 'finish' @@ -610,17 +610,16 @@ emit trailers, with a list of the header fields in its value. E.g., response.end(); Attempting to set a trailer field name that contains invalid characters will -result in a `TypeError` being thrown. +result in a [`TypeError`][] being thrown. ### response.end([data][, encoding][, callback]) This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. -The method, `response.end()`, MUST be called on each -response. +The method, `response.end()`, MUST be called on each response. If `data` is specified, it is equivalent to calling -`response.write(data, encoding)` followed by `response.end(callback)`. +[`response.write(data, encoding)`][] followed by `response.end(callback)`. If `callback` is specified, it will be called when the response stream is finished. @@ -628,7 +627,7 @@ is finished. ### response.finished Boolean value that indicates whether the response has completed. Starts -as `false`. After `response.end()` executes, the value will be `true`. +as `false`. After [`response.end()`][] executes, the value will be `true`. ### response.getHeader(name) @@ -675,7 +674,7 @@ or response.setHeader("Set-Cookie", ["type=ninja", "language=javascript"]); Attempting to set a header field name that contains invalid characters will -result in a `TypeError` being thrown. +result in a [`TypeError`][] being thrown. ### response.setTimeout(msecs, callback) @@ -696,7 +695,7 @@ Returns `response`. ### response.statusCode -When using implicit headers (not calling [response.writeHead()][] explicitly), +When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status code that will be sent to the client when the headers get flushed. @@ -709,7 +708,7 @@ status code which was sent out. ### response.statusMessage -When using implicit headers (not calling `response.writeHead()` explicitly), this property +When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status message that will be sent to the client when the headers get flushed. If this is left as `undefined` then the standard message for the status code will be used. @@ -723,7 +722,7 @@ status message which was sent out. ### response.write(chunk[, encoding][, callback]) -If this method is called and [response.writeHead()][] has not been called, +If this method is called and [`response.writeHead()`][] has not been called, it will switch to implicit header mode and flush the implicit headers. This sends a chunk of the response body. This method may @@ -737,9 +736,9 @@ will be called when this chunk of data is flushed. **Note**: This is the raw HTTP body and has nothing to do with higher-level multi-part body encodings that may be used. -The first time `response.write()` is called, it will send the buffered +The first time [`response.write()`][] is called, it will send the buffered header information and the first body to the client. The second time -`response.write()` is called, Node.js assumes you're going to be streaming +[`response.write()`][] is called, Node.js assumes you're going to be streaming data, and sends that separately. That is, the response is buffered up to the first chunk of body. @@ -750,7 +749,7 @@ buffer. Returns `false` if all or part of the data was queued in user memory. ### response.writeContinue() Sends a HTTP/1.1 100 Continue message to the client, indicating that -the request body should be sent. See the ['checkContinue'][] event on `Server`. +the request body should be sent. See the [`'checkContinue'`][] event on `Server`. ### response.writeHead(statusCode[, statusMessage][, headers]) @@ -767,9 +766,9 @@ Example: 'Content-Type': 'text/plain' }); This method must only be called once on a message and it must -be called before [response.end()][] is called. +be called before [`response.end()`][] is called. -If you call [response.write()][] or [response.end()][] before calling this, the +If you call [`response.write()`][] or [`response.end()`][] before calling this, the implicit/mutable headers will be calculated and call this function for you. Note that Content-Length is given in bytes not characters. The above example @@ -781,8 +780,8 @@ which has been transmitted are equal or not. ## http.IncomingMessage -An `IncomingMessage` object is created by [http.Server][] or -[http.ClientRequest][] and passed as the first argument to the `'request'` +An `IncomingMessage` object is created by [`http.Server`][] or +[`http.ClientRequest`][] and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to access response status, headers and data. @@ -831,7 +830,7 @@ Also `response.httpVersionMajor` is the first integer and ### message.method -**Only valid for request obtained from [http.Server][].** +**Only valid for request obtained from [`http.Server`][].** The request method as a string. Read only. Example: `'GET'`, `'DELETE'`. @@ -861,7 +860,7 @@ Header names are not lowercased, and duplicates are not merged. ### message.rawTrailers The raw request/response trailer keys and values exactly as they were -received. Only populated at the 'end' event. +received. Only populated at the `'end'` event. ### message.setTimeout(msecs, callback) @@ -874,30 +873,30 @@ Returns `message`. ### message.statusCode -**Only valid for response obtained from `http.ClientRequest`.** +**Only valid for response obtained from [`http.ClientRequest`][].** The 3-digit HTTP response status code. E.G. `404`. ### message.statusMessage -**Only valid for response obtained from `http.ClientRequest`.** +**Only valid for response obtained from [`http.ClientRequest`][].** ### message.socket -The `net.Socket` object associated with the connection. +The [`net.Socket`][] object associated with the connection. -With HTTPS support, use [request.socket.getPeerCertificate()][] to obtain the +With HTTPS support, use [`request.socket.getPeerCertificate()`][] to obtain the client's authentication details. The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. ### message.trailers -The request/response trailers object. Only populated at the 'end' event. +The request/response trailers object. Only populated at the `'end'` event. ### message.url -**Only valid for request obtained from [http.Server][].** +**Only valid for request obtained from [`http.Server`][].** Request URL string. This contains only the URL that is present in the actual HTTP request. If the request is: @@ -945,14 +944,14 @@ Found'`. ## http.createClient([port][, host]) - Stability: 0 - Deprecated: Use [http.request][] instead. + Stability: 0 - Deprecated: Use [`http.request()`][] instead. Constructs a new HTTP client. `port` and `host` refer to the server to be connected to. ## http.createServer([requestListener]) -Returns a new instance of [http.Server][]. +Returns a new instance of [`http.Server`][]. The `requestListener` is a function which is automatically added to the `'request'` event. @@ -960,7 +959,7 @@ added to the `'request'` event. ## http.get(options[, callback]) Since most requests are GET requests without bodies, Node.js provides this -convenience method. The only difference between this method and `http.request()` +convenience method. The only difference between this method and [`http.request()`][] is that it sets the method to GET and calls `req.end()` automatically. Example: @@ -982,14 +981,14 @@ Node.js maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests. `options` can be an object or a string. If `options` is a string, it is -automatically parsed with [url.parse()][]. +automatically parsed with [`url.parse()`][]. Options: - `protocol`: Protocol to use. Defaults to `'http'`. - `host`: A domain name or IP address of the server to issue the request to. Defaults to `'localhost'`. -- `hostname`: Alias for `host`. To support `url.parse()` `hostname` is +- `hostname`: Alias for `host`. To support [`url.parse()`][] `hostname` is preferred over `host`. - `family`: IP address family to use when resolving `host` and `hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be @@ -1005,17 +1004,17 @@ Options: - `headers`: An object containing request headers. - `auth`: Basic authentication i.e. `'user:password'` to compute an Authorization header. -- `agent`: Controls [Agent][] behavior. When an Agent is used request will +- `agent`: Controls [`Agent`][] behavior. When an Agent is used request will default to `Connection: keep-alive`. Possible values: - - `undefined` (default): use [globalAgent][] for this host and port. + - `undefined` (default): use [`http.globalAgent`][] for this host and port. - `Agent` object: explicitly use the passed in `Agent`. - `false`: opts out of connection pooling with an Agent, defaults request to `Connection: close`. The optional `callback` parameter will be added as a one time listener for -the ['response'][] event. +the `'response'` event. -`http.request()` returns an instance of the [http.ClientRequest][] +`http.request()` returns an instance of the [`http.ClientRequest`][] class. The `ClientRequest` instance is a writable stream. If one needs to upload a file with a POST request, then write to the `ClientRequest` object. @@ -1073,41 +1072,44 @@ There are a few special headers that should be noted. * Sending an 'Expect' header will immediately send the request headers. Usually, when sending 'Expect: 100-continue', you should both set a timeout - and listen for the `continue` event. See RFC2616 Section 8.2.3 for more + and listen for the `'continue'` event. See RFC2616 Section 8.2.3 for more information. * Sending an Authorization header will override using the `auth` option to compute basic authentication. -[message.headers][]: #http_message_headers -[constructor options]: #http_new_agent_options +[`'checkContinue'`]: #http_event_checkcontinue +[`'listening'`]: net.html#net_event_listening +[`'response'`]: #http_event_response +[`Agent`]: #http_class_http_agent +[`Buffer`]: buffer.html#buffer_buffer [`destroy()`]: #http_agent_destroy -['checkContinue']: #http_event_checkcontinue -['listening']: net.html#net_event_listening -['response']: #http_event_response -[Agent]: #http_class_http_agent -[Buffer]: buffer.html#buffer_buffer -[EventEmitter]: events.html#events_class_events_eventemitter +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`http.Agent`]: #http_class_http_agent +[`http.ClientRequest`]: #http_class_http_clientrequest +[`http.globalAgent`]: #http_http_globalagent +[`http.IncomingMessage`]: #http_http_incomingmessage +[`http.request()`]: #http_http_request_options_callback +[`http.Server`]: #http_class_http_server +[`http.ServerResponse`]: #http_class_http_serverresponse +[`message.headers`]: #http_message_headers +[`net.Server.close()`]: net.html#net_server_close_callback +[`net.Server.listen()`]: net.html#net_server_listen_handle_callback +[`net.Server.listen(path)`]: net.html#net_server_listen_path_callback +[`net.Server.listen(port)`]: net.html#net_server_listen_port_hostname_backlog_callback +[`net.Socket`]: net.html#net_class_net_socket +[`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed +[`response.end()`]: #http_response_end_data_encoding_callback +[`response.write()`]: #http_response_write_chunk_encoding_callback +[`response.write(data, encoding)`]: #http_response_write_chunk_encoding_callback +[`response.writeContinue()`]: #http_response_writecontinue +[`response.writeHead()`]: #http_response_writehead_statuscode_statusmessage_headers +[`socket.setKeepAlive()`]: net.html#net_socket_setkeepalive_enable_initialdelay +[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_nodelay +[`socket.setTimeout()`]: net.html#net_socket_settimeout_timeout_callback +[`stream.setEncoding()`]: stream.html#stream_stream_setencoding_encoding +[`TypeError`]: errors.html#errors_class_typeerror +[`url.parse()`]: url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost +[constructor options]: #http_new_agent_options [Readable Stream]: stream.html#stream_class_stream_readable [Writable Stream]: stream.html#stream_class_stream_writable -[globalAgent]: #http_http_globalagent -[http.ClientRequest]: #http_class_http_clientrequest -[http.IncomingMessage]: #http_http_incomingmessage -[http.ServerResponse]: #http_class_http_serverresponse -[http.Server]: #http_class_http_server -[http.request]: #http_http_request_options_callback -[net.Server.close()]: net.html#net_server_close_callback -['listening']: net.html#net_event_listening -[net.Server.listen(path)]: net.html#net_server_listen_path_callback -[net.Server.listen(port)]: net.html#net_server_listen_port_hostname_backlog_callback -[net.Server.listen()]: net.html#net_server_listen_handle_callback -[response.end()]: #http_response_end_data_encoding_callback -[response.write()]: #http_response_write_chunk_encoding_callback -[response.writeContinue()]: #http_response_writecontinue -[response.writeHead()]: #http_response_writehead_statuscode_statusmessage_headers -[socket.setKeepAlive()]: net.html#net_socket_setkeepalive_enable_initialdelay -[socket.setNoDelay()]: net.html#net_socket_setnodelay_nodelay -[socket.setTimeout()]: net.html#net_socket_settimeout_timeout_callback -[request.socket.getPeerCertificate()]: tls.html#tls_tlssocket_getpeercertificate_detailed -[stream.setEncoding()]: stream.html#stream_stream_setencoding_encoding -[url.parse()]: url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 8a916311fc664f..6b688668f7f47e 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -7,26 +7,26 @@ separate module. ## Class: https.Agent -An Agent object for HTTPS similar to [http.Agent][]. See [https.request()][] +An Agent object for HTTPS similar to [`http.Agent`][]. See [`https.request()`][] for more information. ## Class: https.Server This class is a subclass of `tls.Server` and emits events same as -`http.Server`. See `http.Server` for more information. +[`http.Server`][]. See [`http.Server`][] for more information. ### server.setTimeout(msecs, callback) -See [http.Server#setTimeout()][]. +See [`http.Server#setTimeout()`][]. ### server.timeout -See [http.Server#timeout][]. +See [`http.Server#timeout`][]. ## https.createServer(options[, requestListener]) Returns a new HTTPS web server object. The `options` is similar to -[tls.createServer()][]. The `requestListener` is a function which is +[`tls.createServer()`][]. The `requestListener` is a function which is automatically added to the `'request'` event. Example: @@ -61,20 +61,20 @@ Or ### server.close([callback]) -See [http.close()][] for details. +See [`http.close()`][] for details. ### server.listen(handle[, callback]) ### server.listen(path[, callback]) ### server.listen(port[, host][, backlog][, callback]) -See [http.listen()][] for details. +See [`http.listen()`][] for details. ## https.get(options, callback) -Like `http.get()` but for HTTPS. +Like [`http.get()`][] but for HTTPS. `options` can be an object or a string. If `options` is a string, it is -automatically parsed with [url.parse()][]. +automatically parsed with [`url.parse()`][]. Example: @@ -94,16 +94,16 @@ Example: ## https.globalAgent -Global instance of [https.Agent][] for all HTTPS client requests. +Global instance of [`https.Agent`][] for all HTTPS client requests. ## https.request(options, callback) Makes a request to a secure web server. `options` can be an object or a string. If `options` is a string, it is -automatically parsed with [url.parse()][]. +automatically parsed with [`url.parse()`][]. -All options from [http.request()][] are valid. +All options from [`http.request()`][] are valid. Example: @@ -150,15 +150,15 @@ The options argument has the following options - `headers`: An object containing request headers. - `auth`: Basic authentication i.e. `'user:password'` to compute an Authorization header. -- `agent`: Controls [Agent][] behavior. When an Agent is used request will +- `agent`: Controls [`Agent`][] behavior. When an Agent is used request will default to `Connection: keep-alive`. Possible values: - - `undefined` (default): use [globalAgent][] for this host and port. + - `undefined` (default): use [`globalAgent`][] for this host and port. - `Agent` object: explicitly use the passed in `Agent`. - `false`: opts out of connection pooling with an Agent, defaults request to `Connection: close`. -The following options from [tls.connect()][] can also be specified. However, a -[globalAgent][] silently ignores these. +The following options from [`tls.connect()`][] can also be specified. However, a +[`globalAgent`][] silently ignores these. - `pfx`: Certificate, Private key and CA certificates to use for SSL. Default `null`. - `key`: Private key to use for SSL. Default `null`. @@ -175,9 +175,9 @@ The following options from [tls.connect()][] can also be specified. However, a request is sent. Default `true`. - `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force SSL version 3. The possible values depend on your installation of - OpenSSL and are defined in the constant [SSL_METHODS][]. + OpenSSL and are defined in the constant [`SSL_METHODS`][]. -In order to specify these options, use a custom `Agent`. +In order to specify these options, use a custom [`Agent`][]. Example: @@ -213,17 +213,19 @@ Example: ... } -[http.Server#setTimeout()]: http.html#http_server_settimeout_msecs_callback -[http.Server#timeout]: http.html#http_server_timeout -[Agent]: #https_class_https_agent -[globalAgent]: #https_https_globalagent -[http.listen()]: http.html#http_server_listen_port_hostname_backlog_callback -[url.parse()]: url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost -[http.close()]: http.html#http_server_close_callback -[http.Agent]: http.html#http_class_http_agent -[http.request()]: http.html#http_http_request_options_callback -[https.Agent]: #https_class_https_agent -[https.request()]: #https_https_request_options_callback -[tls.connect()]: tls.html#tls_tls_connect_options_callback -[tls.createServer()]: tls.html#tls_tls_createserver_options_secureconnectionlistener -[SSL_METHODS]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS +[`Agent`]: #https_class_https_agent +[`globalAgent`]: #https_https_globalagent +[`http.Agent`]: http.html#http_class_http_agent +[`http.close()`]: http.html#http_server_close_callback +[`http.get()`]: http.html#http_http_get_options_callback +[`http.listen()`]: http.html#http_server_listen_port_hostname_backlog_callback +[`http.request()`]: http.html#http_http_request_options_callback +[`http.Server#setTimeout()`]: http.html#http_server_settimeout_msecs_callback +[`http.Server#timeout`]: http.html#http_server_timeout +[`http.Server`]: http.html#http_class_http_server +[`https.Agent`]: #https_class_https_agent +[`https.request()`]: #https_https_request_options_callback +[`SSL_METHODS`]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS +[`tls.connect()`]: tls.html#tls_tls_connect_options_callback +[`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener +[`url.parse()`]: url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index ceab37d536ca3a..00c1c77915c93f 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -299,7 +299,7 @@ A required module prefixed with `'./'` is relative to the file calling Without a leading '/', './', or '../' to indicate a file, the module must either be a core module or is loaded from a `node_modules` folder. -If the given path does not exist, `require()` will throw an Error with its +If the given path does not exist, `require()` will throw an [`Error`][] with its `code` property set to `'MODULE_NOT_FOUND'`. ## Folders as Modules @@ -519,4 +519,5 @@ object. Since `require()` returns the `module.exports`, and the `module` is typically *only* available within a specific module's code, it must be explicitly exported in order to be used. -[module resolution]: https://nodejs.org/api/modules.html#modules_all_together +[`Error`]: errors.html#errors_class_error +[module resolution]: #modules_all_together diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 0a44c6535b3dec..85bf6a7497d81c 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -10,7 +10,7 @@ this module with `require('net');`. This class is used to create a TCP or local server. -`net.Server` is an [EventEmitter][] with the following events: +`net.Server` is an [`EventEmitter`][] with the following events: ### Event: 'close' @@ -28,7 +28,7 @@ Emitted when a new connection is made. `socket` is an instance of * {Error Object} -Emitted when an error occurs. The ['close'][] event will be called directly +Emitted when an error occurs. The [`'close'`][] event will be called directly following this event. See example in discussion of `server.listen`. ### Event: 'listening' @@ -61,19 +61,19 @@ Don't call `server.address()` until the `'listening'` event has been emitted. Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally -closed when all connections are ended and the server emits a ['close'][] event. +closed when all connections are ended and the server emits a [`'close'`][] event. The optional `callback` will be called once the `'close'` event occurs. Unlike that event, it will be called with an Error as its only argument if the server was not open when it was closed. ### server.connections - Stability: 0 - Deprecated: Use [server.getConnections][] instead. + Stability: 0 - Deprecated: Use [`server.getConnections`][] instead. The number of concurrent connections on the server. This becomes `null` when sending a socket to a child with -`child_process.fork()`. To poll forks and get current number of active +[`child_process.fork()`][]. To poll forks and get current number of active connections use asynchronous `server.getConnections` instead. ### server.getConnections(callback) @@ -98,9 +98,9 @@ already been bound to a port or domain socket. Listening on a file descriptor is not supported on Windows. This function is asynchronous. When the server has been bound, -['listening'][] event will be emitted. +[`'listening'`][] event will be emitted. The last parameter `callback` will be added as a listener for the -['listening'][] event. +[`'listening'`][] event. ### server.listen(options[, callback]) @@ -138,8 +138,8 @@ shown below. Start a local socket server listening for connections on the given `path`. This function is asynchronous. When the server has been bound, -['listening'][] event will be emitted. The last parameter `callback` -will be added as a listener for the ['listening'][] event. +[`'listening'`][] event will be emitted. The last parameter `callback` +will be added as a listener for the [`'listening'`][] event. On UNIX, the local domain is usually known as the UNIX domain. The path is a filesystem path name. It is subject to the same naming conventions and @@ -170,8 +170,8 @@ The actual length will be determined by your OS through sysctl settings such as parameter is 511 (not 512). This function is asynchronous. When the server has been bound, -['listening'][] event will be emitted. The last parameter `callback` -will be added as a listener for the ['listening'][] event. +[`'listening'`][] event will be emitted. The last parameter `callback` +will be added as a listener for the [`'listening'`][] event. One issue some users run into is getting `EADDRINUSE` errors. This means that another server is already running on the requested port. One way of handling this @@ -195,7 +195,7 @@ Set this property to reject connections when the server's connection count gets high. It is not recommended to use this option once a socket has been sent to a child -with `child_process.fork()`. +with [`child_process.fork()`][]. ### server.ref() @@ -217,7 +217,7 @@ Returns `server`. This object is an abstraction of a TCP or local socket. `net.Socket` instances implement a duplex Stream interface. They can be created by the -user and used as a client (with `connect()`) or they can be created by Node.js +user and used as a client (with [`connect()`][]) or they can be created by Node.js and passed to the user through the `'connection'` event of a server. ### new net.Socket([options]) @@ -237,7 +237,7 @@ Set `readable` and/or `writable` to `true` to allow reads and/or writes on this socket (NOTE: Works only when `fd` is passed). About `allowHalfOpen`, refer to `createServer()` and `'end'` event. -`net.Socket` instances are [EventEmitter][] with the following events: +`net.Socket` instances are [`EventEmitter`][] with the following events: ### Event: 'close' @@ -249,7 +249,7 @@ which says if the socket was closed due to a transmission error. ### Event: 'connect' Emitted when a socket connection is successfully established. -See `connect()`. +See [`connect()`][]. ### Event: 'data' @@ -290,16 +290,16 @@ following this event. Emitted after resolving the hostname but before connecting. Not applicable to UNIX sockets. -* `err` {Error | Null} The error object. See [dns.lookup()][]. +* `err` {Error | Null} The error object. See [`dns.lookup()`][]. * `address` {String} The IP address. -* `family` {String | Null} The address type. See [dns.lookup()][]. +* `family` {String | Null} The address type. See [`dns.lookup()`][]. ### Event: 'timeout' Emitted if the socket times out from inactivity. This is only to notify that the socket has been idle. The user must manually close the connection. -See also: `socket.setTimeout()` +See also: [`socket.setTimeout()`][] ### socket.address() @@ -324,7 +324,7 @@ written, but the buffer may contain strings, and the strings are lazily encoded, so the exact number of bytes is not known.) Users who experience large or growing `bufferSize` should attempt to -"throttle" the data flows in their program with `pause()` and `resume()`. +"throttle" the data flows in their program with [`pause()`][] and [`resume()`][]. ### socket.bytesRead @@ -360,17 +360,17 @@ specifies: Normally this method is not needed, as `net.createConnection` opens the socket. Use this only if you are implementing a custom Socket. -This function is asynchronous. When the ['connect'][] event is emitted the +This function is asynchronous. When the [`'connect'`][] event is emitted the socket is established. If there is a problem connecting, the `'connect'` event -will not be emitted, the `'error'` event will be emitted with the exception. +will not be emitted, the [`'error'`][] event will be emitted with the exception. The `connectListener` parameter will be added as a listener for the -['connect'][] event. +[`'connect'`][] event. ### socket.connect(path[, connectListener]) ### socket.connect(port[, host][, connectListener]) -As [socket.connect(options[, connectListener])](#net_socket_connect_options_connectlistener), +As [`socket.connect(options\[, connectListener\])`][], with options either as either `{port: port, host: host}` or `{path: path}`. ### socket.destroy() @@ -399,7 +399,7 @@ The numeric representation of the local port. For example, ### socket.pause() -Pauses the reading of data. That is, `'data'` events will not be emitted. +Pauses the reading of data. That is, [`'data'`][] events will not be emitted. Useful to throttle back an upload. ### socket.ref() @@ -426,12 +426,12 @@ The numeric representation of the remote port. For example, ### socket.resume() -Resumes reading after a call to `pause()`. +Resumes reading after a call to [`pause()`][]. ### socket.setEncoding([encoding]) -Set the encoding for the socket as a Readable Stream. See -[stream.setEncoding()][] for more information. +Set the encoding for the socket as a [Readable Stream][]. See +[`stream.setEncoding()`][] for more information. ### socket.setKeepAlive([enable][, initialDelay]) @@ -460,14 +460,14 @@ Returns `socket`. Sets the socket to timeout after `timeout` milliseconds of inactivity on the socket. By default `net.Socket` do not have a timeout. -When an idle timeout is triggered the socket will receive a `'timeout'` -event but the connection will not be severed. The user must manually `end()` -or `destroy()` the socket. +When an idle timeout is triggered the socket will receive a [`'timeout'`][] +event but the connection will not be severed. The user must manually [`end()`][] +or [`destroy()`][] the socket. If `timeout` is 0, then the existing idle timeout is disabled. The optional `callback` parameter will be added as a one time listener for the -`'timeout'` event. +[`'timeout'`][] event. Returns `socket`. @@ -486,21 +486,21 @@ case of a string--it defaults to UTF8 encoding. 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 again free. +[`'drain'`][] will be emitted when the buffer is again free. The optional `callback` parameter will be executed when the data is finally written out - this may not be immediately. ## net.connect(options[, connectListener]) -A factory function, which returns a new ['net.Socket'][] and automatically +A factory function, which returns a new [`net.Socket`][] and automatically connects with the supplied `options`. -The options are passed to both the ['net.Socket'][] constructor and the -['socket.connect'][] method. +The options are passed to both the [`net.Socket`][] constructor and the +[`socket.connect`][] method. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. Here is an example of a client of the previously described echo server: @@ -525,32 +525,32 @@ changed to ## net.connect(path[, connectListener]) -A factory function, which returns a new unix ['net.Socket'][] and automatically +A factory function, which returns a new unix [`net.Socket`][] and automatically connects to the supplied `path`. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. ## net.connect(port[, host][, connectListener]) -A factory function, which returns a new ['net.Socket'][] and automatically +A factory function, which returns a new [`net.Socket`][] and automatically connects to the supplied `port` and `host`. If `host` is omitted, `'localhost'` will be assumed. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. ## net.createConnection(options[, connectListener]) -A factory function, which returns a new ['net.Socket'][] and automatically +A factory function, which returns a new [`net.Socket`][] and automatically connects with the supplied `options`. -The options are passed to both the ['net.Socket'][] constructor and the -['socket.connect'][] method. +The options are passed to both the [`net.Socket`][] constructor and the +[`socket.connect`][] method. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. Here is an example of a client of the previously described echo server: @@ -575,26 +575,26 @@ changed to ## net.createConnection(path[, connectListener]) -A factory function, which returns a new unix ['net.Socket'][] and automatically +A factory function, which returns a new unix [`net.Socket`][] and automatically connects to the supplied `path`. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. ## net.createConnection(port[, host][, connectListener]) -A factory function, which returns a new ['net.Socket'][] and automatically +A factory function, which returns a new [`net.Socket`][] and automatically connects to the supplied `port` and `host`. If `host` is omitted, `'localhost'` will be assumed. The `connectListener` parameter will be added as a listener for the -['connect'][] event once. +[`'connect'`][] event once. ## net.createServer([options][, connectionListener]) Creates a new server. The `connectionListener` argument is -automatically set as a listener for the ['connection'][] event. +automatically set as a listener for the [`'connection'`][] event. `options` is an object with the following defaults: @@ -605,13 +605,13 @@ automatically set as a listener for the ['connection'][] event. If `allowHalfOpen` is `true`, then the socket won't automatically send a FIN packet when the other end of the socket sends a FIN packet. The socket becomes -non-readable, but still writable. You should call the `end()` method explicitly. -See ['end'][] event for more information. +non-readable, but still writable. You should call the [`end()`][] method explicitly. +See [`'end'`][] event for more information. If `pauseOnConnect` is `true`, then the socket associated with each incoming connection will be paused, and no data will be read from its handle. This allows connections to be passed between processes without any data being read by the -original process. To begin reading data from a paused socket, call `resume()`. +original process. To begin reading data from a paused socket, call [`resume()`][]. Here is an example of an echo server which listens for connections on port 8124: @@ -657,15 +657,27 @@ Returns true if input is a version 4 IP address, otherwise returns false. Returns true if input is a version 6 IP address, otherwise returns false. -['close']: #net_event_close -['connect']: #net_event_connect -['connection']: #net_event_connection -['end']: #net_event_end -[EventEmitter]: events.html#events_class_events_eventemitter -['listening']: #net_event_listening -[server.getConnections]: #net_server_getconnections_callback +[`'close'`]: #net_event_close +[`'connect'`]: #net_event_connect +[`'connection'`]: #net_event_connection +[`'data'`]: #net_event_data +[`'drain'`]: #net_event_drain +[`'end'`]: #net_event_end +[`'error'`]: #net_event_error_1 +[`'listening'`]: #net_event_listening +[`'timeout'`]: #net_event_timeout +[`child_process.fork()`]: child_process.html#child_process_child_process_fork_modulepath_args_options +[`connect()`]: #net_socket_connect_options_connectlistener +[`destroy()`]: #net_socket_destroy +[`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback +[`end()`]: #net_socket_end_data_encoding +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`net.Socket`]: #net_class_net_socket +[`pause()`]: #net_socket_pause +[`resume()`]: #net_socket_resume +[`server.getConnections`]: #net_server_getconnections_callback +[`socket.connect(options\[, connectListener\])`]: #net_socket_connect_options_connectlistener +[`socket.connect`]: #net_socket_connect_options_connectlistener +[`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback +[`stream.setEncoding()`]: stream.html#stream_readable_setencoding_encoding [Readable Stream]: stream.html#stream_class_stream_readable -[stream.setEncoding()]: stream.html#stream_readable_setencoding_encoding -['net.Socket']: #net_class_net_socket -[dns.lookup()]: dns.html#dns_dns_lookup_hostname_options_callback -['socket.connect']: #net_socket_connect_options_connectlistener diff --git a/doc/api/process.markdown b/doc/api/process.markdown index 7e70a79151083e..73724b39b96ff2 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -3,22 +3,22 @@ The `process` object is a global object and can be accessed from anywhere. -It is an instance of [EventEmitter][]. +It is an instance of [`EventEmitter`][]. ## Event: 'beforeExit' This event is emitted when Node.js empties its event loop and has nothing else to schedule. Normally, Node.js exits when there is no work scheduled, but a listener -for 'beforeExit' can make asynchronous calls, and cause Node.js to continue. +for `'beforeExit'` can make asynchronous calls, and cause Node.js to continue. -'beforeExit' is not emitted for conditions causing explicit termination, such as -`process.exit()` or uncaught exceptions, and should not be used as an -alternative to the 'exit' event unless the intention is to schedule more work. +`'beforeExit'` is not emitted for conditions causing explicit termination, such as +[`process.exit()`][] or uncaught exceptions, and should not be used as an +alternative to the `'exit'` event unless the intention is to schedule more work. ## Event: 'exit' Emitted when the process is about to exit. There is no way to prevent the -exiting of the event loop at this point, and once all `exit` listeners have +exiting of the event loop at this point, and once all `'exit'` listeners have finished running the process will exit. Therefore you **must** only perform **synchronous** operations in this handler. This is a good hook to perform checks on the module's state (like for unit tests). The callback takes one @@ -27,7 +27,7 @@ argument, the code the process is exiting with. This event is only emitted when Node.js exits explicitly by process.exit() or implicitly by the event loop draining. -Example of listening for `exit`: +Example of listening for `'exit'`: process.on('exit', function(code) { // do *NOT* do this @@ -40,10 +40,10 @@ Example of listening for `exit`: ## Event: 'message' * `message` {Object} a parsed JSON object or primitive value -* `sendHandle` {Handle object} a [net.Socket][] or [net.Server][] object, or +* `sendHandle` {Handle object} a [`net.Socket`][] or [`net.Server`][] object, or undefined. -Messages sent by [ChildProcess.send()][] are obtained using the `'message'` +Messages sent by [`ChildProcess.send()`][] are obtained using the `'message'` event on the child's process object. ## Event: 'rejectionHandled' @@ -63,9 +63,9 @@ event loop turn it takes for the `'unhandledRejection'` event to be emitted. Another way of stating this is that, unlike in synchronous code where there is an ever-growing list of unhandled exceptions, with promises there is a growing-and-shrinking list of unhandled rejections. In synchronous code, the -'uncaughtException' event tells you when the list of unhandled exceptions +`'uncaughtException'` event tells you when the list of unhandled exceptions grows. And in asynchronous code, the `'unhandledRejection'` event tells you -when the list of unhandled rejections grows, while the 'rejectionHandled' +when the list of unhandled rejections grows, while the `'rejectionHandled'` event tells you when the list of unhandled rejections shrinks. For example using the rejection detection hooks in order to keep a map of all @@ -91,7 +91,7 @@ Emitted when an exception bubbles all the way back to the event loop. If a listener is added for this exception, the default action (which is to print a stack trace and exit) will not occur. -Example of listening for `uncaughtException`: +Example of listening for `'uncaughtException'`: process.on('uncaughtException', function(err) { console.log('Caught exception: ' + err); @@ -105,7 +105,7 @@ Example of listening for `uncaughtException`: nonexistentFunc(); console.log('This will not run.'); -Note that `uncaughtException` is a very crude mechanism for exception +Note that `'uncaughtException'` is a very crude mechanism for exception handling. Do *not* use it as the Node.js equivalent of `On Error Resume Next`. An @@ -115,9 +115,9 @@ is in an undefined state. Blindly resuming means *anything* could happen. Think of resuming as pulling the power cord when you are upgrading your system. Nine out of ten times nothing happens - but the 10th time, your system is bust. -`uncaughtException` should be used to perform synchronous cleanup before +`'uncaughtException'` should be used to perform synchronous cleanup before shutting down the process. It is not safe to resume normal operation after -`uncaughtException`. If you do use it, restart your application after every +`'uncaughtException'`. If you do use it, restart your application after every unhandled exception! You have been warned. @@ -127,12 +127,12 @@ You have been warned. Emitted whenever a `Promise` is rejected and no error handler is attached to the promise within a turn of the event loop. When programming with promises exceptions are encapsulated as rejected promises. Such promises can be caught -and handled using `promise.catch(...)` and rejections are propagated through +and handled using [`promise.catch(...)`][] and rejections are propagated through a promise chain. This event is useful for detecting and keeping track of promises that were rejected whose rejections were not handled yet. This event is emitted with the following arguments: - - `reason` the object with which the promise was rejected (usually an `Error` + - `reason` the object with which the promise was rejected (usually an [`Error`][] instance). - `p` the promise that was rejected. @@ -175,7 +175,7 @@ operations are pending. The following status codes are used in other cases: * `1` **Uncaught Fatal Exception** - There was an uncaught exception, - and it was not handled by a domain or an `uncaughtException` event + and it was not handled by a domain or an `'uncaughtException'` event handler. * `2` - Unused (reserved by Bash for builtin misuse) * `3` **Internal JavaScript Parse Error** - The JavaScript source code @@ -219,7 +219,7 @@ cases: Emitted when the processes receives a signal. See sigaction(2) for a list of -standard POSIX signal names such as SIGINT, SIGHUP, etc. +standard POSIX signal names such as `SIGINT`, `SIGHUP`, etc. Example of listening for `SIGINT`: @@ -315,7 +315,7 @@ Changes the current working directory of the process or throws an exception if t An Object containing the JavaScript representation of the configure options that were used to compile the current Node.js executable. This is the same as -the "config.gypi" file that was produced when running the `./configure` script. +the `config.gypi` file that was produced when running the `./configure` script. An example of the possible output looks like: @@ -350,14 +350,14 @@ If `process.connected` is false, it is no longer possible to send messages. Returns the current working directory of the process. - console.log('Current directory: ' + process.cwd()); + console.log('Current directory: ' + process.cwd()); ## process.disconnect() Close the IPC channel to the parent process, allowing this child to exit gracefully once there are no other connections keeping it alive. -Identical to the parent process's [ChildProcess.disconnect()][]. +Identical to the parent process's [`ChildProcess.disconnect()`][]. If Node.js was not spawned with an IPC channel, `process.disconnect()` will be undefined. @@ -434,7 +434,7 @@ The shell that executed Node.js should see the exit code as 1. ## process.exitCode A number which will be the process exit code, when the process either -exits gracefully, or is exited via `process.exit()` without specifying +exits gracefully, or is exited via [`process.exit()`][] without specifying a code. Specifying a code to `process.exit(code)` will override any previous @@ -527,7 +527,7 @@ Android) Reads /etc/group and initializes the group access list, using all groups of which the user is a member. This is a privileged operation, meaning you need -to be root or have the CAP_SETGID capability. +to be root or have the `CAP_SETGID` capability. `user` is a user name or user ID. `extra_group` is a group name or group ID. @@ -543,7 +543,7 @@ Some care needs to be taken when dropping privileges. Example: Send a signal to a process. `pid` is the process id and `signal` is the string describing the signal to send. Signal names are strings like -'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'. +`SIGINT` or `SIGHUP`. If omitted, the signal will be `SIGTERM`. See [Signal Events][] and kill(2) for more information. Will throw an error if target does not exist, and as a special case, a signal @@ -604,7 +604,7 @@ This will generate: Once the current event loop turn runs to completion, call the callback function. -This is *not* a simple alias to `setTimeout(fn, 0)`, it's much more +This is *not* a simple alias to [`setTimeout(fn, 0)`][], it's much more efficient. It runs before any additional I/O events (including timers) fire in subsequent ticks of the event loop. @@ -693,8 +693,8 @@ for the source tarball and headers-only tarball. `process.release` contains the following properties: -* `name`: a string with a value that will always be `"node"` for Node.js. For - legacy io.js releases, this will be `"io.js"`. +* `name`: a string with a value that will always be `'node'` for Node.js. For + legacy io.js releases, this will be `'io.js'`. * `sourceUrl`: a complete URL pointing to a _.tar.gz_ file containing the source of the current release. * `headersUrl`: a complete URL pointing to a _.tar.gz_ file containing only @@ -724,7 +724,7 @@ relied upon to exist. When Node.js is spawned with an IPC channel attached, it can send messages to its parent process using `process.send()`. Each will be received as a -['message'][] event on the parent's `ChildProcess` object. +[`'message'`][] event on the parent's `ChildProcess` object. If Node.js was not spawned with an IPC channel, `process.send()` will be undefined. @@ -794,7 +794,7 @@ Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Sets the supplementary group IDs. This is a privileged operation, meaning you -need to be root or have the CAP_SETGID capability. +need to be root or have the `CAP_SETGID` capability. The list can contain group IDs, group names or both. @@ -869,7 +869,7 @@ For example, a `console.log` equivalent could look like this: }; `process.stderr` and `process.stdout` are unlike other streams in Node.js in -that they cannot be closed (`end()` will throw), they never emit the `finish` +that they cannot be closed (`end()` will throw), they never emit the `'finish'` event and that writes can block when output is redirected to a file (although disks are fast and operating systems normally employ write-back caching so it should be a very rare occurrence indeed.) @@ -891,7 +891,7 @@ See [the tty docs][] for more information. ## process.title -Getter/setter to set what is displayed in 'ps'. +Getter/setter to set what is displayed in `ps. When used as a setter, the maximum length is platform-specific and probably short. @@ -944,13 +944,17 @@ Will print something like: icu: '55.1', openssl: '1.0.1k' } -[ChildProcess.disconnect()]: child_process.html#child_process_child_disconnect -[ChildProcess.send()]: child_process.html#child_process_child_send_message_sendhandle_callback -[Signal Events]: #process_signal_events -[EventEmitter]: events.html#events_class_events_eventemitter -[net.Server]: net.html#net_class_net_server -[net.Socket]: net.html#net_class_net_socket +[`'message'`]: child_process.html#child_process_event_message +[`ChildProcess.disconnect()`]: child_process.html#child_process_child_disconnect +[`ChildProcess.send()`]: child_process.html#child_process_child_send_message_sendhandle_callback +[`Error`]: errors.html#errors_class_error +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`net.Server`]: net.html#net_class_net_server +[`net.Socket`]: net.html#net_class_net_socket +[`process.exit()`]: #process_process_exit_code +[`promise.catch(...)`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch [`require.main`]: modules.html#modules_accessing_the_main_module -['message']: child_process.html#child_process_event_message +[`setTimeout(fn, 0)`]: timers.html#timers_settimeout_callback_delay_arg +[Signal Events]: #process_signal_events [Stream compatibility]: stream.html#stream_compatibility_with_older_node_js_versions [the tty docs]: tty.html#tty_tty diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index ac5c61fa1cc9cf..112206993b2449 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -3,7 +3,7 @@ Stability: 2 - Stable To use this module, do `require('readline')`. Readline allows reading of a -stream (such as `process.stdin`) on a line-by-line basis. +stream (such as [`process.stdin`][]) on a line-by-line basis. Note that once you've invoked this module, your Node.js program will not terminate until you've closed the interface. Here's how to allow your @@ -31,13 +31,14 @@ stream. ### rl.close() Closes the `Interface` instance, relinquishing control on the `input` and -`output` streams. The "close" event will also be emitted. +`output` streams. The `'close'` event will also be emitted. ### rl.pause() Pauses the readline `input` stream, allowing it to be resumed later if needed. -Note that this doesn't immediately pause the stream of events. Several events may be emitted after calling `pause`, including `line`. +Note that this doesn't immediately pause the stream of events. Several events may +be emitted after calling `pause`, including `line`. ### rl.prompt([preserveCursor]) @@ -100,7 +101,7 @@ Example: Emitted when `close()` is called. -Also emitted when the `input` stream receives its "end" event. The `Interface` +Also emitted when the `input` stream receives its `'end'` event. The `Interface` instance should be considered "finished" once this is emitted. For example, when the `input` stream receives `^D`, respectively known as `EOT`. @@ -114,7 +115,7 @@ the `input` stream receives a `^C`, respectively known as `SIGINT`. Emitted whenever the `input` stream receives a `\n`, usually received when the user hits enter, or return. This is a good hook to listen for user input. -Example of listening for `line`: +Example of listening for `'line'`: rl.on('line', function (cmd) { console.log('You just typed: '+cmd); @@ -129,7 +130,7 @@ Emitted whenever the `input` stream is paused. Also emitted whenever the `input` stream is not paused and receives the `SIGCONT` event. (See events `SIGTSTP` and `SIGCONT`) -Example of listening for `pause`: +Example of listening for `'pause'`: rl.on('pause', function() { console.log('Readline paused.'); @@ -141,7 +142,7 @@ Example of listening for `pause`: Emitted whenever the `input` stream is resumed. -Example of listening for `resume`: +Example of listening for `'resume'`: rl.on('resume', function() { console.log('Readline resumed.'); @@ -191,10 +192,10 @@ Emitted whenever the `input` stream receives a `^Z`, respectively known as `SIGTSTP`. If there is no `SIGTSTP` event listener present when the `input` stream receives a `SIGTSTP`, the program will be sent to the background. -When the program is resumed with `fg`, the `pause` and `SIGCONT` events will be +When the program is resumed with `fg`, the `'pause'` and `SIGCONT` events will be emitted. You can use either to resume the stream. -The `pause` and `SIGCONT` events will not be triggered if the stream was paused +The `'pause'` and `SIGCONT` events will not be triggered if the stream was paused before the program was sent to the background. Example of listening for `SIGTSTP`: @@ -246,7 +247,7 @@ Clears the screen from the current position of the cursor down. ## readline.createInterface(options) -Creates a readline `Interface` instance. Accepts an "options" Object that takes +Creates a readline `Interface` instance. Accepts an `options Object that takes the following values: - `input` - the readable stream to listen to (Required). @@ -287,8 +288,8 @@ Also `completer` can be run in async mode if it accepts two arguments: callback(null, [['123'], linePartial]); } -`createInterface` is commonly used with `process.stdin` and -`process.stdout` in order to accept user input: +`createInterface` is commonly used with [`process.stdin`][] and +[`process.stdout`][] in order to accept user input: var readline = require('readline'); var rl = readline.createInterface({ @@ -297,12 +298,12 @@ Also `completer` can be run in async mode if it accepts two arguments: }); Once you have a readline instance, you most commonly listen for the -`"line"` event. +`'line'` event. If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property, and fires -a `"resize"` event on the `output` if/when the columns ever change -(`process.stdout` does this automatically when it is a TTY). +a `'resize'` event on the `output` if/when the columns ever change +([`process.stdout`][] does this automatically when it is a TTY). ## readline.cursorTo(stream, x, y) @@ -311,3 +312,6 @@ Move cursor to the specified position in a given TTY stream. ## readline.moveCursor(stream, dx, dy) Move cursor relative to it's current position in a given TTY stream. + +[`process.stdin`]: process.html#process_process_stdin +[`process.stdout`]: process.html#process_process_stdout diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 8961bb3fb54215..d5d4ec62ec7549 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -120,7 +120,7 @@ The following key combinations in the REPL have these special effects: ### Customizing Object displays in the REPL The REPL module internally uses -[util.inspect()][], when printing values. However, `util.inspect` delegates the +[`util.inspect()`][], when printing values. However, `util.inspect` delegates the call to the object's `inspect()` function, if it has one. You can read more about this delegation [here][]. @@ -147,8 +147,8 @@ This inherits from [Readline Interface][] with the following events: `function () {}` Emitted when the user exits the REPL in any of the defined ways. Namely, typing -`.exit` at the repl, pressing Ctrl+C twice to signal SIGINT, or pressing Ctrl+D -to signal "end" on the `input` stream. +`.exit` at the repl, pressing Ctrl+C twice to signal `SIGINT`, or pressing Ctrl+D +to signal `'end'` on the `input` stream. Example of listening for `exit`: @@ -216,8 +216,8 @@ Example of invoking that command from the REPL: * `preserveCursor` {Boolean} -Like [readline.prompt][] except also adding indents with ellipses when inside -blocks. The `preserveCursor` argument is passed to [readline.prompt][]. This is +Like [`readline.prompt`][] except also adding indents with ellipses when inside +blocks. The `preserveCursor` argument is passed to [`readline.prompt`][]. This is used primarily with `defineCommand`. It's also used internally to render each prompt line. @@ -323,7 +323,7 @@ a `net.Server` and `net.Socket` instance, see: https://gist.github.com/2209310 For an example of running a REPL instance over `curl(1)`, see: https://gist.github.com/2053342 -[Readline Interface]: readline.html#readline_class_interface -[readline.prompt]: readline.html#readline_rl_prompt_preservecursor -[util.inspect()]: util.html#util_util_inspect_object_options +[`readline.prompt`]: readline.html#readline_rl_prompt_preservecursor +[`util.inspect()`]: util.html#util_util_inspect_object_options [here]: util.html#util_custom_inspect_function_on_objects +[Readline Interface]: readline.html#readline_class_interface diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index caf9daeaf21362..b76ef0093e1847 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -4,8 +4,8 @@ A stream is an abstract interface implemented by various objects in Node.js. For example a [request to an HTTP server][] is a stream, as is -[stdout][]. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] +[`stdout`][]. Streams are readable, writable, or both. All streams are +instances of [`EventEmitter`][]. You can load the Stream base classes by doing `require('stream')`. There are base classes provided for [Readable][] streams, [Writable][] @@ -126,7 +126,7 @@ mode, then data will be lost. You can switch to flowing mode by doing any of the following: -* Adding a [`'data'` event][] handler to listen for data. +* Adding a [`'data'`][] event handler to listen for data. * Calling the [`resume()`][] method to explicitly open the flow. * Calling the [`pipe()`][] method to send the data to a [Writable][]. @@ -134,7 +134,7 @@ You can switch back to paused mode by doing either of the following: * If there are no pipe destinations, by calling the [`pause()`][] method. -* If there are pipe destinations, by removing any [`'data'` event][] +* If there are pipe destinations, by removing any [`'data'`][] event handlers, and removing all pipe destinations by calling the [`unpipe()`][] method. @@ -153,7 +153,7 @@ Examples of readable streams include: * [crypto streams][] * [tcp sockets][] * [child process stdout and stderr][] -* [process.stdin][] +* [`process.stdin`][] #### Event: 'close' @@ -161,13 +161,13 @@ Emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur. -Not all streams will emit the 'close' event. +Not all streams will emit the `'close'` event. #### Event: 'data' * `chunk` {Buffer | String} The chunk of data. -Attaching a `data` event listener to a stream that has not been +Attaching a `'data'` event listener to a stream that has not been explicitly paused will switch the stream into flowing mode. Data will then be passed as soon as it is available. @@ -185,7 +185,7 @@ readable.on('data', function(chunk) { This event fires when there will be no more data to read. -Note that the `end` event **will not fire** unless the data is +Note that the `'end'` event **will not fire** unless the data is completely consumed. This can be done by switching into flowing mode, or by calling `read()` repeatedly until you get to the end. @@ -221,13 +221,13 @@ readable.on('readable', function() { }); ``` -Once the internal buffer is drained, a `readable` event will fire +Once the internal buffer is drained, a `'readable'` event will fire again when more data is available. -The `readable` event is not emitted in the "flowing" mode with the +The `'readable'` event is not emitted in the "flowing" mode with the sole exception of the last one, on end-of-stream. -The 'readable' event indicates that the stream has new information: +The `'readable'` event indicates that the stream has new information: either new data is available or the end of the stream has been reached. In the former case, `.read()` will return that data. In the latter case, `.read()` will return null. For instance, in the following example, `foo.txt` @@ -275,7 +275,7 @@ readable.isPaused() // === false * Return: `this` This method will cause a stream in flowing mode to stop emitting -`data` events, switching out of flowing mode. Any data that becomes +`'data'` events, switching out of flowing mode. Any data that becomes available will remain in the internal buffer. ```javascript @@ -375,9 +375,9 @@ readable.on('readable', function() { ``` If this method returns a data chunk, then it will also trigger the -emission of a [`'data'` event][]. +emission of a [`'data'`][] event. -Note that calling `readable.read([size])` after the `end` event has been +Note that calling `readable.read([size])` after the `'end'` event has been triggered will return `null`. No runtime error will be raised. #### readable.resume() @@ -389,7 +389,7 @@ events. This method will switch the stream into flowing mode. If you do *not* want to consume the data from a stream, but you *do* want to get to -its `end` event, you can call [`readable.resume()`][] to open the flow of +its `'end'` event, you can call [`readable.resume()`][] to open the flow of data. ```javascript @@ -460,7 +460,7 @@ parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party. -Note that `stream.unshift(chunk)` cannot be called after the `end` event +Note that `stream.unshift(chunk)` cannot be called after the `'end'` event has been triggered; a runtime error will be raised. If you find that you must often call `stream.unshift(chunk)` in your @@ -565,11 +565,11 @@ Examples of writable streams include: * [crypto streams][] * [tcp sockets][] * [child process stdin][] -* [process.stdout][], [process.stderr][] +* [`process.stdout`][], [`process.stderr`][] #### Event: 'drain' -If a [`writable.write(chunk)`][] call returns false, then the `drain` +If a [`writable.write(chunk)`][] call returns false, then the `'drain'` event will indicate when it is appropriate to begin writing more data to the stream. @@ -671,7 +671,7 @@ Buffered data will be flushed either at `.uncork()` or at `.end()` call. * `callback` {Function} Optional callback for when the stream is finished Call this method when no more data will be written to the stream. If -supplied, the callback is attached as a listener on the `finish` event. +supplied, the callback is attached as a listener on the `'finish'` event. Calling [`write()`][] after calling [`end()`][] will raise an error. @@ -710,7 +710,7 @@ If the data had to be buffered internally, then it will return This return value is strictly advisory. You MAY continue to write, even if it returns `false`. However, writes will be buffered in memory, so it is best not to do this excessively. Instead, wait for -the `drain` event before writing more data. +the `'drain'` event before writing more data. ## API for Stream Implementors @@ -907,7 +907,7 @@ passed, it signals the end of the stream (EOF), after which no more data can be written. The data added with `push` can be pulled out by calling the `read()` method -when the `'readable'`event fires. +when the `'readable'` event fires. This API is designed to be as flexible as possible. For example, you may be wrapping a lower-level source which has some sort of @@ -1118,8 +1118,8 @@ initialized. #### Events: 'finish' and 'end' -The [`finish`][] and [`end`][] events are from the parent Writable -and Readable classes respectively. The `finish` event is fired after +The [`'finish'`][] and [`'end'`][] events are from the parent Writable +and Readable classes respectively. The `'finish'` event is fired after `.end()` is called and all chunks have been processed by `_transform`, `end` is fired after all data has been output which is after the callback in `_flush` has been called. @@ -1467,7 +1467,7 @@ var writable = new stream.Writable({ Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or +object which can be retrieved from `_writableState.getBuffer()` or `_readableState.buffer`, respectively. The amount of data that will potentially be buffered depends on the @@ -1510,7 +1510,7 @@ no longer have to worry about losing `'data'` chunks. Most programs will continue to function normally. However, this introduces an edge case in the following conditions: -* No [`'data'` event][] handler is added. +* No [`'data'`][] event handler is added. * The [`resume()`][] method is never called. * The stream is not piped to any writable destination. @@ -1671,60 +1671,60 @@ code) will know when to check again, by calling `stream.read(0)`. In those cases, you *may* call `stream.push('')`. So far, the only use case for this functionality is in the -[tls.CryptoStream][] class, which is deprecated in Node.js/io.js v1.0. If you +[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you find that you have to use `stream.push('')`, please consider another approach, because it almost certainly indicates that something is horribly wrong. -[request to an HTTP server]: http.html#http_http_incomingmessage -[EventEmitter]: events.html#events_class_events_eventemitter -[Object mode]: #stream_object_mode +[_read]: #stream_readable_read_size_1 +[_write]: #stream_writable_write_chunk_encoding_callback_1 +[`'data'`]: #stream_event_data +[`'end'`]: #stream_event_end +[`'finish'`]: #stream_event_finish +[`_read()`]: #stream_readable_read_size_1 +[`_read(size)`]: #stream_readable_read_size_1 +[`_write()`]: #stream_writable_write_chunk_encoding_callback_1 +[`_write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback_1 +[`end()`]: #stream_writable_end_chunk_encoding_callback +[`EventEmitter`]: events.html#events_class_events_eventemitter +[`pause()`]: #stream_readable_pause +[`pipe()`]: #stream_readable_pipe_destination_options +[`process.stderr`]: process.html#process_process_stderr +[`process.stdin`]: process.html#process_process_stdin +[`process.stdout`]: process.html#process_process_stdout +[`readable.resume()`]: #stream_readable_resume +[`resume()`]: #stream_readable_resume +[`stdout`]: process.html#process_process_stdout +[`stream.push()`]: #stream_readable_push_chunk_encoding [`stream.push(chunk)`]: #stream_readable_push_chunk_encoding [`stream.push(null)`]: #stream_readable_push_chunk_encoding -[`stream.push()`]: #stream_readable_push_chunk_encoding +[`stream.write(chunk)`]: #stream_writable_write_chunk_encoding_callback +[`tls.CryptoStream`]: tls.html#tls_class_cryptostream [`unpipe()`]: #stream_readable_unpipe_destination -[unpiped]: #stream_readable_unpipe_destination -[tcp sockets]: net.html#net_class_net_socket -[http responses, on the client]: http.html#http_http_incomingmessage -[http requests, on the server]: http.html#http_http_incomingmessage -[http requests, on the client]: http.html#http_class_http_clientrequest -[http responses, on the server]: http.html#http_class_http_serverresponse -[fs read streams]: fs.html#fs_class_fs_readstream -[fs write streams]: fs.html#fs_class_fs_writestream -[zlib streams]: zlib.html -[zlib]: zlib.html -[crypto streams]: crypto.html -[crypto]: crypto.html -[tls.CryptoStream]: tls.html#tls_class_cryptostream -[process.stdin]: process.html#process_process_stdin -[stdout]: process.html#process_process_stdout -[process.stdout]: process.html#process_process_stdout -[process.stderr]: process.html#process_process_stderr -[child process stdout and stderr]: child_process.html#child_process_child_stdout -[child process stdin]: child_process.html#child_process_child_stdin +[`unpipe()`]: #stream_readable_unpipe_destination +[`util.inherits`]: util.html#util_util_inherits_constructor_superconstructor +[`writable.write(chunk)`]: #stream_writable_write_chunk_encoding_callback +[`write()`]: #stream_writable_write_chunk_encoding_callback +[`write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback [API for Stream Consumers]: #stream_api_for_stream_consumers [API for Stream Implementors]: #stream_api_for_stream_implementors -[Readable]: #stream_class_stream_readable -[Writable]: #stream_class_stream_writable +[child process stdin]: child_process.html#child_process_child_stdin +[child process stdout and stderr]: child_process.html#child_process_child_stdout +[crypto streams]: crypto.html +[crypto]: crypto.html [Duplex]: #stream_class_stream_duplex +[fs read streams]: fs.html#fs_class_fs_readstream +[fs write streams]: fs.html#fs_class_fs_writestream +[http requests, on the client]: http.html#http_class_http_clientrequest +[http requests, on the server]: http.html#http_http_incomingmessage +[http responses, on the client]: http.html#http_http_incomingmessage +[http responses, on the server]: http.html#http_class_http_serverresponse +[Object mode]: #stream_object_mode +[Readable]: #stream_class_stream_readable +[request to an HTTP server]: http.html#http_http_incomingmessage +[tcp sockets]: net.html#net_class_net_socket [Transform]: #stream_class_stream_transform -[`end`]: #stream_event_end -[`finish`]: #stream_event_finish -[`_read(size)`]: #stream_readable_read_size_1 -[`_read()`]: #stream_readable_read_size_1 -[_read]: #stream_readable_read_size_1 -[`writable.write(chunk)`]: #stream_writable_write_chunk_encoding_callback -[`write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback -[`write()`]: #stream_writable_write_chunk_encoding_callback -[`stream.write(chunk)`]: #stream_writable_write_chunk_encoding_callback -[`_write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback_1 -[`_write()`]: #stream_writable_write_chunk_encoding_callback_1 -[_write]: #stream_writable_write_chunk_encoding_callback_1 -[`util.inherits`]: util.html#util_util_inherits_constructor_superconstructor -[`end()`]: #stream_writable_end_chunk_encoding_callback -[`'data'` event]: #stream_event_data -[`resume()`]: #stream_readable_resume -[`readable.resume()`]: #stream_readable_resume -[`pause()`]: #stream_readable_pause -[`unpipe()`]: #stream_readable_unpipe_destination -[`pipe()`]: #stream_readable_pipe_destination_options +[unpiped]: #stream_readable_unpipe_destination +[Writable]: #stream_class_stream_writable +[zlib streams]: zlib.html +[zlib]: zlib.html diff --git a/doc/api/string_decoder.markdown b/doc/api/string_decoder.markdown index 885af7745a23a0..b58bcd2cf422c9 100644 --- a/doc/api/string_decoder.markdown +++ b/doc/api/string_decoder.markdown @@ -17,7 +17,7 @@ additional support for utf8. ## Class: StringDecoder -Accepts a single argument, `encoding` which defaults to `utf8`. +Accepts a single argument, `encoding` which defaults to `'utf8'`. ### decoder.end() diff --git a/doc/api/synopsis.markdown b/doc/api/synopsis.markdown index f9e8b19ed6fcfe..347b22e3cad284 100644 --- a/doc/api/synopsis.markdown +++ b/doc/api/synopsis.markdown @@ -3,7 +3,7 @@ An example of a [web server][] written with Node.js which responds with -'Hello World': +`'Hello World'`: var http = require('http'); diff --git a/doc/api/timers.markdown b/doc/api/timers.markdown index 3a087be76a5cf2..4d5caf2e0ee0e5 100644 --- a/doc/api/timers.markdown +++ b/doc/api/timers.markdown @@ -28,7 +28,7 @@ Returns the timer. ## setImmediate(callback[, arg][, ...]) To schedule the "immediate" execution of `callback` after I/O events -callbacks and before `setTimeout` and `setInterval` . Returns an +callbacks and before [`setTimeout`][] and [`setInterval`][]. Returns an `immediateObject` for possible use with `clearImmediate()`. Optionally you can also pass arguments to the callback. @@ -64,7 +64,7 @@ immediately, as if the `delay` was set to 1. ## unref() -The opaque value returned by `setTimeout` and `setInterval` also has the method +The opaque value returned by [`setTimeout`][] and [`setInterval`][] also has the method `timer.unref()` which will allow you to create a timer that is active but if it is the only item left in the event loop, it won't keep the program running. If the timer is already `unref`d calling `unref` again will have no effect. @@ -74,3 +74,6 @@ will wakeup the event loop, creating too many of these may adversely effect event loop performance -- use wisely. Returns the timer. + +[`setInterval`]: timers.html#timers_setinterval_callback_delay_arg +[`setTimeout`]: timers.html#timers_settimeout_callback_delay_arg diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index a0261bf1e59539..618a3574715fa1 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -164,7 +164,7 @@ Returned by tls.createSecurePair. The event is emitted from the SecurePair once the pair has successfully established a secure connection. -Similarly to the checking for the server 'secureConnection' event, +Similarly to the checking for the server `'secureConnection'` event, pair.cleartext.authorized should be checked to confirm whether the certificate used properly authorized. @@ -179,7 +179,7 @@ connections using TLS or SSL. `function (exception, tlsSocket) { }` -When a client connection emits an 'error' event before secure connection is +When a client connection emits an `'error'` event before secure connection is established - it will be forwarded here. `tlsSocket` is the [tls.TLSSocket][] that the error originated from. @@ -213,9 +213,9 @@ Calling `callback(err)` will result in a `socket.destroy(err)` call. Typical flow: -1. Client connects to server and sends `OCSPRequest` to it (via status info +1. Client connects to server and sends `'OCSPRequest'` to it (via status info extension in ClientHello.) -2. Server receives request and invokes `OCSPRequest` event listener if present +2. Server receives request and invokes `'OCSPRequest'` event listener if present 3. Server grabs OCSP url from either `certificate` or `issuer` and performs an [OCSP request] to the CA 4. Server receives `OCSPResponse` from CA and sends it back to client via @@ -333,7 +333,7 @@ or currently pending server connections will use previous keys. ## Class: tls.TLSSocket -This is a wrapped version of [net.Socket][] that does transparent encryption +This is a wrapped version of [`net.Socket`][] that does transparent encryption of written data and all required TLS negotiation. This instance implements a duplex [Stream][] interfaces. It has all the @@ -346,7 +346,7 @@ only return data while the connection is open. Construct a new TLSSocket object from existing TCP socket. -`socket` is an instance of [net.Socket][] +`socket` is an instance of [`net.Socket`][] `options` is an optional object that might contain following properties: @@ -356,7 +356,7 @@ Construct a new TLSSocket object from existing TCP socket. - `isServer`: If `true` - TLS socket will be instantiated in server-mode. Default: `false` - - `server`: An optional [net.Server][] instance + - `server`: An optional [`net.Server`][] instance - `requestCert`: Optional, see [tls.createSecurePair][] @@ -369,7 +369,7 @@ Construct a new TLSSocket object from existing TCP socket. - `session`: Optional, a `Buffer` instance, containing TLS session - `requestOCSP`: Optional, if `true` - OCSP status request extension would - be added to client hello, and `OCSPResponse` event will be emitted on socket + be added to client hello, and `'OCSPResponse'` event will be emitted on socket before establishing secure communication ### Event: 'OCSPResponse' @@ -575,7 +575,7 @@ Creates a new client connection to the given `port` and `host` (old API) or - `session`: A `Buffer` instance, containing TLS session. The `callback` parameter will be added as a listener for the -['secureConnect'][] event. +[`'secureConnect'`][] event. `tls.connect()` returns a [tls.TLSSocket][] object. @@ -687,7 +687,7 @@ NOTE: `cleartext` has the same APIs as [tls.TLSSocket][] ## tls.createServer(options[, secureConnectionListener]) Creates a new [tls.Server][]. The `connectionListener` argument is -automatically set as a listener for the [secureConnection][] event. The +automatically set as a listener for the [`'secureConnection'`][] event. The `options` object has these possibilities: - `pfx`: A string or `Buffer` containing the private key, certificate and @@ -883,11 +883,11 @@ Example: [tls.createServer]: #tls_tls_createserver_options_secureconnectionlistener [tls.createSecurePair]: #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options [tls.TLSSocket]: #tls_class_tls_tlssocket -[net.Server]: net.html#net_class_net_server -[net.Socket]: net.html#net_class_net_socket +[`net.Server`]: net.html#net_class_net_server +[`net.Socket`]: net.html#net_class_net_socket [net.Server.address()]: net.html#net_server_address -['secureConnect']: #tls_event_secureconnect -[secureConnection]: #tls_event_secureconnection +[`'secureConnect'`]: #tls_event_secureconnect +[`'secureConnection'`]: #tls_event_secureconnection [Stream]: stream.html#stream_stream [SSL_METHODS]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS [tls.Server]: #tls_class_tls_server diff --git a/doc/api/tty.markdown b/doc/api/tty.markdown index 279a1dd0b9440e..251742a0e1b89b 100644 --- a/doc/api/tty.markdown +++ b/doc/api/tty.markdown @@ -53,12 +53,12 @@ has changed. ### ws.columns A `Number` that gives the number of columns the TTY currently has. This property -gets updated on "resize" events. +gets updated on `'resize'` events. ### ws.rows A `Number` that gives the number of rows the TTY currently has. This property -gets updated on "resize" events. +gets updated on `'resize'` events. ## tty.isatty(fd) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index e4a85cafba3854..0b649d521d9dad 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -233,7 +233,7 @@ formatted according to the returned Object. This is similar to how Stability: 0 - Deprecated -Internal alias for Array.isArray. +Internal alias for [`Array.isArray`][]. Returns `true` if the given "object" is an `Array`. `false` otherwise. @@ -297,7 +297,7 @@ Returns `true` if the given "object" is a `Date`. `false` otherwise. Stability: 0 - Deprecated -Returns `true` if the given "object" is an `Error`. `false` otherwise. +Returns `true` if the given "object" is an [`Error`][]. `false` otherwise. var util = require('util'); @@ -505,4 +505,6 @@ Deprecated predecessor of `stream.pipe()`. Deprecated predecessor of `console.log`. +[`Array.isArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray [constructor]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor +[`Error`]: errors.html#errors_class_error diff --git a/doc/api/vm.markdown b/doc/api/vm.markdown index 10c8cbc4ce4fd2..592d42d9151874 100644 --- a/doc/api/vm.markdown +++ b/doc/api/vm.markdown @@ -35,7 +35,7 @@ The options when creating a script are: Applies only to syntax errors compiling the code; errors while running the code are controlled by the options to the script's methods. - `timeout`: a number of milliseconds to execute `code` before terminating - execution. If execution is terminated, an `Error` will be thrown. + execution. If execution is terminated, an [`Error`][] will be thrown. ### script.runInContext(contextifiedSandbox[, options]) @@ -141,7 +141,7 @@ The options for running a script are: Applies only to runtime errors executing the code; it is impossible to create a `Script` instance with syntax errors, as the constructor will throw. - `timeout`: a number of milliseconds to execute the script before terminating - execution. If execution is terminated, an `Error` will be thrown. + execution. If execution is terminated, an [`Error`][] will be thrown. ## vm.createContext([sandbox]) @@ -273,7 +273,8 @@ e.g. `(0,eval)('code')`. However, it also has the following additional options: Will capture both syntax errors from compiling `code` and runtime errors thrown by executing the compiled code. Defaults to `true`. - `timeout`: a number of milliseconds to execute `code` before terminating - execution. If execution is terminated, an `Error` will be thrown. + execution. If execution is terminated, an [`Error`][] will be thrown. [indirect `eval` call]: http://es5.github.io/#x10.4.2 [global object]: http://es5.github.io/#x15.1 +[`Error`]: errors.html#errors_class_error From aa1034aec907b0d683ed7b41925abaa3874caf6b Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Tue, 8 Dec 2015 16:55:45 +0000 Subject: [PATCH 037/262] doc: fixup socket.remoteAddress remoteAddress may be undefined under certain conditions Signed-off-by: Arthur Gautier PR-URL: https://github.com/nodejs/node/pull/4198 Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Rod Vagg --- doc/api/net.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 85bf6a7497d81c..9767c4ffd633ce 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -413,7 +413,8 @@ Returns `socket`. ### socket.remoteAddress The string representation of the remote IP address. For example, -`'74.125.127.100'` or `'2001:4860:a005::68'`. +`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if +the socket is destroyed (for example, if the client disconnected). ### socket.remoteFamily From 6d6e63ce650d9aa13db7a0080fac619c72341818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Wed, 25 Nov 2015 21:56:11 +0100 Subject: [PATCH 038/262] doc: document backlog for server.listen() variants The backlog parameter is supported by all variations of net.Server.listen(), but wasn't consistently documented. This commit brings the documentation into a more consistent state. Refs: https://github.com/nodejs/node/pull/4056 PR-URL: https://github.com/nodejs/node/pull/4025 Reviewed-By: Colin Ihrig Reviewed-By: Fedor Indutny --- doc/api/net.markdown | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 9767c4ffd633ce..32d2218982db35 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -83,9 +83,10 @@ when sockets were sent to forks. Callback should take two arguments `err` and `count`. -### server.listen(handle[, callback]) +### server.listen(handle[, backlog][, callback]) * `handle` {Object} +* `backlog` {Number} * `callback` {Function} The `handle` object can be set to either a server or socket (anything @@ -102,6 +103,9 @@ This function is asynchronous. When the server has been bound, The last parameter `callback` will be added as a listener for the [`'listening'`][] event. +The parameter `backlog` behaves the same as in +[`server.listen(port, \[host\], \[backlog\], \[callback\])`][]. + ### server.listen(options[, callback]) * `options` {Object} - Required. Supports the following properties: @@ -114,9 +118,8 @@ The last parameter `callback` will be added as a listener for the The `port`, `host`, and `backlog` properties of `options`, as well as the optional callback function, behave as they do on a call to -[server.listen(port, \[host\], \[backlog\], \[callback\]) -](#net_server_listen_port_hostname_backlog_callback). Alternatively, the `path` -option can be used to specify a UNIX socket. +[`server.listen(port, \[host\], \[backlog\], \[callback\])`][]. Alternatively, +the `path` option can be used to specify a UNIX socket. If `exclusive` is `false` (default), then cluster workers will use the same underlying handle, allowing connection handling duties to be shared. When @@ -130,9 +133,10 @@ shown below. exclusive: true }); -### server.listen(path[, callback]) +### server.listen(path[, backlog][, callback]) * `path` {String} +* `backlog` {Number} * `callback` {Function} Start a local socket server listening for connections on the given `path`. @@ -157,6 +161,9 @@ double-backslashes, such as: net.createServer().listen( path.join('\\\\?\\pipe', process.cwd(), 'myctl')) +The parameter `backlog` behaves the same as in +[`server.listen(port, \[host\], \[backlog\], \[callback\])`][]. + ### server.listen(port[, hostname][, backlog][, callback]) Begin accepting connections on the specified `port` and `hostname`. If the @@ -677,6 +684,7 @@ Returns true if input is a version 6 IP address, otherwise returns false. [`pause()`]: #net_socket_pause [`resume()`]: #net_socket_resume [`server.getConnections`]: #net_server_getconnections_callback +[`server.listen(port, \[host\], \[backlog\], \[callback\])`]: #net_server_listen_port_hostname_backlog_callback [`socket.connect(options\[, connectListener\])`]: #net_socket_connect_options_connectlistener [`socket.connect`]: #net_socket_connect_options_connectlistener [`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback From f0cf7d8c5b3da4fd678e8309998f373502e64402 Mon Sep 17 00:00:00 2001 From: Andrei Sedoi Date: Thu, 26 Nov 2015 15:55:05 +0000 Subject: [PATCH 039/262] timers: optimize callback call: bind -> arrow ES6 arrow functions are much more efficient than `.bind()` functions. PR-URL: https://github.com/nodejs/node/pull/4038 Reviewed-By: Rich Trott Reviewed-By: Jeremiah Senkpiel --- lib/timers.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/timers.js b/lib/timers.js index e4b27fdc54adb6..8cfd1cb42e1af2 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -192,21 +192,21 @@ exports.setTimeout = function(callback, after) { case 2: break; case 3: - ontimeout = callback.bind(timer, arguments[2]); + ontimeout = () => callback.call(timer, arguments[2]); break; case 4: - ontimeout = callback.bind(timer, arguments[2], arguments[3]); + ontimeout = () => callback.call(timer, arguments[2], arguments[3]); break; case 5: ontimeout = - callback.bind(timer, arguments[2], arguments[3], arguments[4]); + () => callback.call(timer, arguments[2], arguments[3], arguments[4]); break; // slow case default: var args = new Array(length - 2); for (var i = 2; i < length; i++) args[i - 2] = arguments[i]; - ontimeout = callback.apply.bind(callback, timer, args); + ontimeout = () => callback.apply(timer, args); break; } timer._onTimeout = ontimeout; @@ -247,20 +247,20 @@ exports.setInterval = function(callback, repeat) { case 2: break; case 3: - ontimeout = callback.bind(timer, arguments[2]); + ontimeout = () => callback.call(timer, arguments[2]); break; case 4: - ontimeout = callback.bind(timer, arguments[2], arguments[3]); + ontimeout = () => callback.call(timer, arguments[2], arguments[3]); break; case 5: ontimeout = - callback.bind(timer, arguments[2], arguments[3], arguments[4]); + () => callback.call(timer, arguments[2], arguments[3], arguments[4]); break; default: var args = new Array(length - 2); for (var i = 2; i < length; i += 1) args[i - 2] = arguments[i]; - ontimeout = callback.apply.bind(callback, timer, args); + ontimeout = () => callback.apply(timer, args); break; } timer._onTimeout = wrapper; @@ -272,7 +272,7 @@ exports.setInterval = function(callback, repeat) { return timer; function wrapper() { - timer._repeat.call(this); + timer._repeat(); // Timer might be closed - no point in restarting it if (!timer._repeat) From a3394fc7ee3f05cba12b3b56bb206643e1e16680 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Thu, 26 Nov 2015 22:34:11 +0100 Subject: [PATCH 040/262] test: fix http-many-ended-pipelines flakiness It can happen that the HTTP connection is closed before the server has received all the requests, thus the server close condition is never reached. To solve this, close the server when the socket is fully closed. PR-URL: https://github.com/nodejs/node/pull/4041 Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung Reviewed-By: Evan Lucas --- test/parallel/test-http-many-ended-pipelines.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-many-ended-pipelines.js b/test/parallel/test-http-many-ended-pipelines.js index 4e0bc7e8ff736f..604dab7cc2c1d2 100644 --- a/test/parallel/test-http-many-ended-pipelines.js +++ b/test/parallel/test-http-many-ended-pipelines.js @@ -13,15 +13,19 @@ var http = require('http'); var net = require('net'); var numRequests = 20; -var done = 0; +var first = false; var server = http.createServer(function(req, res) { - res.end('ok'); + if (!first) { + first = true; + req.socket.on('close', function() { + server.close(); + }); + } + res.end('ok'); // Oh no! The connection died! req.socket.destroy(); - if (++done == numRequests) - server.close(); }); server.listen(common.PORT); From 24b65967f7495fa8cffacb101f94c81a29d361dc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 25 Nov 2015 19:41:09 -0800 Subject: [PATCH 041/262] test: eliminate multicast test FreeBSD flakiness test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: https://github.com/nodejs/node/issues/2474 PR-URL: https://github.com/nodejs/node/pull/4042 Reviewed-By: Ben Noordhuis --- .../test-dgram-multicast-multi-process.js | 301 +++++++++--------- 1 file changed, 150 insertions(+), 151 deletions(-) diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js index 0bef2e1dc028c1..f72402eef64147 100644 --- a/test/internet/test-dgram-multicast-multi-process.js +++ b/test/internet/test-dgram-multicast-multi-process.js @@ -1,30 +1,122 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - dgram = require('dgram'), - util = require('util'), - Buffer = require('buffer').Buffer, - fork = require('child_process').fork, - LOCAL_BROADCAST_HOST = '224.0.0.114', - TIMEOUT = common.platformTimeout(5000), - messages = [ - new Buffer('First message to send'), - new Buffer('Second message to send'), - new Buffer('Third message to send'), - new Buffer('Fourth message to send') - ]; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const fork = require('child_process').fork; +const LOCAL_BROADCAST_HOST = '224.0.0.114'; +const TIMEOUT = common.platformTimeout(5000); +const messages = [ + new Buffer('First message to send'), + new Buffer('Second message to send'), + new Buffer('Third message to send'), + new Buffer('Fourth message to send') +]; +const workers = {}; +const listeners = 3; + + +// Skip test in FreeBSD jails. +if (common.inFreeBSDJail) { + console.log('1..0 # Skipped: In a FreeBSD jail'); + return; +} + +function launchChildProcess(index) { + const worker = fork(__filename, ['child']); + workers[worker.pid] = worker; + + worker.messagesReceived = []; + + // Handle the death of workers. + worker.on('exit', function(code, signal) { + // Don't consider this the true death if the worker has finished + // successfully or if the exit code is 0. + if (worker.isDone || code === 0) { + return; + } + + dead += 1; + console.error('[PARENT] Worker %d died. %d dead of %d', + worker.pid, + dead, + listeners); + + if (dead === listeners) { + console.error('[PARENT] All workers have died.'); + console.error('[PARENT] Fail'); + process.exit(1); + } + }); + + worker.on('message', function(msg) { + if (msg.listening) { + listening += 1; + + if (listening === listeners) { + // All child process are listening, so start sending. + sendSocket.sendNext(); + } + return; + } + if (msg.message) { + worker.messagesReceived.push(msg.message); + + if (worker.messagesReceived.length === messages.length) { + done += 1; + worker.isDone = true; + console.error('[PARENT] %d received %d messages total.', + worker.pid, + worker.messagesReceived.length); + } + + if (done === listeners) { + console.error('[PARENT] All workers have received the ' + + 'required number of messages. Will now compare.'); + + Object.keys(workers).forEach(function(pid) { + const worker = workers[pid]; + + var count = 0; + + worker.messagesReceived.forEach(function(buf) { + for (var i = 0; i < messages.length; ++i) { + if (buf.toString() === messages[i].toString()) { + count++; + break; + } + } + }); + + console.error('[PARENT] %d received %d matching messages.', + worker.pid, count); + + assert.strictEqual(count, messages.length, + 'A worker received an invalid multicast message'); + }); + + clearTimeout(timer); + console.error('[PARENT] Success'); + killChildren(workers); + } + } + }); +} + +function killChildren(children) { + Object.keys(children).forEach(function(key) { + const child = children[key]; + child.kill(); + }); +} if (process.argv[2] !== 'child') { - var workers = {}, - listeners = 3, - listening = 0, - dead = 0, - i = 0, - done = 0, - timer = null; - - //exit the test if it doesn't succeed within TIMEOUT - timer = setTimeout(function() { + var listening = 0; + var dead = 0; + var i = 0; + var done = 0; + + // Exit the test if it doesn't succeed within TIMEOUT. + var timer = setTimeout(function() { console.error('[PARENT] Responses were not received within %d ms.', TIMEOUT); console.error('[PARENT] Fail'); @@ -34,101 +126,18 @@ if (process.argv[2] !== 'child') { process.exit(1); }, TIMEOUT); - //launch child processes + // Launch child processes. for (var x = 0; x < listeners; x++) { - (function() { - var worker = fork(process.argv[1], ['child']); - workers[worker.pid] = worker; - - worker.messagesReceived = []; - - //handle the death of workers - worker.on('exit', function(code, signal) { - // don't consider this the true death if the - // worker has finished successfully - - // or if the exit code is 0 - if (worker.isDone || code === 0) { - return; - } - - dead += 1; - console.error('[PARENT] Worker %d died. %d dead of %d', - worker.pid, - dead, - listeners); - - if (dead === listeners) { - console.error('[PARENT] All workers have died.'); - console.error('[PARENT] Fail'); - - killChildren(workers); - - process.exit(1); - } - }); - - worker.on('message', function(msg) { - if (msg.listening) { - listening += 1; - - if (listening === listeners) { - //all child process are listening, so start sending - sendSocket.sendNext(); - } - } - else if (msg.message) { - worker.messagesReceived.push(msg.message); - - if (worker.messagesReceived.length === messages.length) { - done += 1; - worker.isDone = true; - console.error('[PARENT] %d received %d messages total.', - worker.pid, - worker.messagesReceived.length); - } - - if (done === listeners) { - console.error('[PARENT] All workers have received the ' + - 'required number of messages. Will now compare.'); - - Object.keys(workers).forEach(function(pid) { - var worker = workers[pid]; - - var count = 0; - - worker.messagesReceived.forEach(function(buf) { - for (var i = 0; i < messages.length; ++i) { - if (buf.toString() === messages[i].toString()) { - count++; - break; - } - } - }); - - console.error('[PARENT] %d received %d matching messages.', - worker.pid, count); - - assert.equal(count, messages.length, - 'A worker received an invalid multicast message'); - }); - - clearTimeout(timer); - console.error('[PARENT] Success'); - killChildren(workers); - } - } - }); - })(x); + launchChildProcess(x); } var sendSocket = dgram.createSocket('udp4'); - // FIXME a libuv limitation makes it necessary to bind() - // before calling any of the set*() functions - the bind() - // call is what creates the actual socket... + // FIXME: a libuv limitation makes it necessary to bind() + // before calling any of the set*() functions. The bind() + // call is what creates the actual socket. sendSocket.bind(); - // The socket is actually created async now + // The socket is actually created async now. sendSocket.on('listening', function() { sendSocket.setTTL(1); sendSocket.setBroadcast(true); @@ -141,7 +150,7 @@ if (process.argv[2] !== 'child') { }); sendSocket.sendNext = function() { - var buf = messages[i++]; + const buf = messages[i++]; if (!buf) { try { sendSocket.close(); } catch (e) {} @@ -151,61 +160,51 @@ if (process.argv[2] !== 'child') { sendSocket.send(buf, 0, buf.length, common.PORT, LOCAL_BROADCAST_HOST, function(err) { if (err) throw err; - console.error('[PARENT] sent %s to %s:%s', - util.inspect(buf.toString()), + console.error('[PARENT] sent "%s" to %s:%s', + buf.toString(), LOCAL_BROADCAST_HOST, common.PORT); process.nextTick(sendSocket.sendNext); }); }; - - function killChildren(children) { - Object.keys(children).forEach(function(key) { - var child = children[key]; - child.kill(); - }); - } } if (process.argv[2] === 'child') { - var receivedMessages = []; - var listenSocket = dgram.createSocket({ + const receivedMessages = []; + const listenSocket = dgram.createSocket({ type: 'udp4', reuseAddr: true }); - listenSocket.on('message', function(buf, rinfo) { - console.error('[CHILD] %s received %s from %j', process.pid, - util.inspect(buf.toString()), rinfo); + listenSocket.on('listening', function() { + listenSocket.addMembership(LOCAL_BROADCAST_HOST); - receivedMessages.push(buf); + listenSocket.on('message', function(buf, rinfo) { + console.error('[CHILD] %s received "%s" from %j', process.pid, + buf.toString(), rinfo); - process.send({ message: buf.toString() }); + receivedMessages.push(buf); - if (receivedMessages.length == messages.length) { - // .dropMembership() not strictly needed but here as a sanity check - listenSocket.dropMembership(LOCAL_BROADCAST_HOST); - process.nextTick(function() { - listenSocket.close(); - }); - } - }); + process.send({ message: buf.toString() }); - listenSocket.on('close', function() { - //HACK: Wait to exit the process to ensure that the parent - //process has had time to receive all messages via process.send() - //This may be indicitave of some other issue. - setTimeout(function() { - process.exit(); - }, 1000); - }); + if (receivedMessages.length == messages.length) { + // .dropMembership() not strictly needed but here as a sanity check. + listenSocket.dropMembership(LOCAL_BROADCAST_HOST); + process.nextTick(function() { + listenSocket.close(); + }); + } + }); - listenSocket.on('listening', function() { + listenSocket.on('close', function() { + // HACK: Wait to exit the process to ensure that the parent + // process has had time to receive all messages via process.send() + // This may be indicative of some other issue. + setTimeout(function() { + process.exit(); + }, common.platformTimeout(1000)); + }); process.send({ listening: true }); }); listenSocket.bind(common.PORT); - - listenSocket.on('listening', function() { - listenSocket.addMembership(LOCAL_BROADCAST_HOST); - }); } From ebfbf55453a95d9065e4655e397a1e6582c0058b Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 30 Nov 2015 23:56:35 -0500 Subject: [PATCH 042/262] test: improve cluster-disconnect-handles test This commit fixes two issues in test-cluster-disconnect-handles: 1. If the master's TCP connection to the worker fails, the worker process stays alive and causes many other tests that use the same common port number to also fail (with EADDRINUSE). 2. One particular problem that can cause the master's TCP connection to fail is attempting an IPv6 connection to the worker when no IPv6 network interfaces are available. PR-URL: https://github.com/nodejs/node/pull/4084 Reviewed-By: Colin Ihrig --- .../test-cluster-disconnect-handles.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-cluster-disconnect-handles.js b/test/parallel/test-cluster-disconnect-handles.js index a6a79ef6a2ae45..f35f101dbd1879 100644 --- a/test/parallel/test-cluster-disconnect-handles.js +++ b/test/parallel/test-cluster-disconnect-handles.js @@ -23,6 +23,7 @@ cluster.schedulingPolicy = cluster.SCHED_RR; // is to make sure the connection is still sitting in the master's // pending handle queue. if (cluster.isMaster) { + let isKilling = false; const handles = require('internal/cluster').handles; // FIXME(bnoordhuis) lib/cluster.js scans the execArgv arguments for // debugger flags and renumbers any port numbers it sees starting @@ -68,11 +69,30 @@ if (cluster.isMaster) { })); })); process.on('exit', () => assert.deepStrictEqual(handles, {})); + process.on('uncaughtException', function(ex) { + // Make sure we clean up so as not to leave a stray worker process running + // if we encounter a connection or other error + if (!worker.isDead()) { + if (!isKilling) { + isKilling = true; + worker.once('exit', function() { + throw ex; + }); + worker.process.kill(); + } + return; + } + throw ex; + }); } else { const server = net.createServer(socket => socket.pipe(socket)); - server.listen(() => { + const cb = () => { process.send(['listening', server.address()]); debugger; - }); + }; + if (common.hasIPv6) + server.listen(cb); + else + server.listen(0, common.localhostIPv4, cb); process.on('disconnect', process.exit); } From f634ab60c7578047d4a3676e4267262f51a608d6 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 1 Dec 2015 13:13:40 -0800 Subject: [PATCH 043/262] test: fix flaky test-net-socket-local-address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test-net-socket-local-address had a race condition that resulted in unreliability on FreeBSD and Windows. This changes fixes the issue. Fixes: https://github.com/nodejs/node/issues/2475 PR-URL: https://github.com/nodejs/node/pull/4109 Reviewed-By: Ben Noordhuis Reviewed-By: Evan Lucas Reviewed-By: Johan Bergström --- test/parallel/parallel.status | 1 - test/parallel/test-net-socket-local-address.js | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 56a0ab21b0a0b7..d4879b3a6cdc0b 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -22,4 +22,3 @@ test-child-process-exit-code : PASS,FLAKY test-debug-signal-cluster : PASS,FLAKY [$system==freebsd] -test-net-socket-local-address : PASS,FLAKY diff --git a/test/parallel/test-net-socket-local-address.js b/test/parallel/test-net-socket-local-address.js index 502c2d226d54b8..7e90bd2f79ba47 100644 --- a/test/parallel/test-net-socket-local-address.js +++ b/test/parallel/test-net-socket-local-address.js @@ -15,7 +15,7 @@ var serverRemotePorts = []; const server = net.createServer(function(socket) { serverRemotePorts.push(socket.remotePort); - conns++; + testConnect(); }); const client = new net.Socket(); @@ -29,7 +29,12 @@ server.on('close', common.mustCall(function() { server.listen(common.PORT, common.localhostIPv4, testConnect); function testConnect() { - if (conns == 2) { + if (conns > serverRemotePorts.length || conns > clientLocalPorts.length) { + // We're waiting for a callback to fire. + return; + } + + if (conns === 2) { return server.close(); } client.connect(common.PORT, common.localhostIPv4, function() { @@ -37,4 +42,5 @@ function testConnect() { this.once('close', testConnect); this.destroy(); }); + conns++; } From 6c2cb45fe8c533bb01589e4877d4fcafe77d2978 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 1 Dec 2015 20:34:45 -0500 Subject: [PATCH 044/262] src: don't print garbage errors If JS throws an object whose toString() method throws, then Node attempts to print an empty message, but actually prints garbage. This commit checks for this case, and prints a message instead. Fixes: https://github.com/nodejs/node/issues/4079 PR-URL: https://github.com/nodejs/node/pull/4112 Reviewed-By: Ben Noordhuis Reviewed-By: Chris Dickinson Reviewed-By: James M Snell Reviewed-By: Minwoo Jung --- src/node.cc | 6 ++++-- test/fixtures/throws_error7.js | 5 +++++ test/parallel/test-error-reporting.js | 9 ++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/throws_error7.js diff --git a/src/node.cc b/src/node.cc index cdbcc8b9f471d1..b4d8221e77320e 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1548,8 +1548,10 @@ static void ReportException(Environment* env, name.IsEmpty() || name->IsUndefined()) { // Not an error object. Just print as-is. - node::Utf8Value message(env->isolate(), er); - PrintErrorString("%s\n", *message); + String::Utf8Value message(er); + + PrintErrorString("%s\n", *message ? *message : + ""); } else { node::Utf8Value name_string(env->isolate(), name); node::Utf8Value message_string(env->isolate(), message); diff --git a/test/fixtures/throws_error7.js b/test/fixtures/throws_error7.js new file mode 100644 index 00000000000000..f730bc6def1ba9 --- /dev/null +++ b/test/fixtures/throws_error7.js @@ -0,0 +1,5 @@ +throw { + toString: function() { + throw this; + } +}; diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index 88ef5d306e3e37..b5b70eeb3b2add 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -24,8 +24,6 @@ function errExec(script, callback) { // Count the tests exits++; - - console.log('.'); }); } @@ -64,6 +62,11 @@ errExec('throws_error6.js', function(err, stdout, stderr) { assert.ok(/SyntaxError/.test(stderr)); }); +// Object that throws in toString() doesn't print garbage +errExec('throws_error7.js', function(err, stdout, stderr) { + assert.ok(/ Date: Wed, 2 Dec 2015 18:13:27 +0100 Subject: [PATCH 045/262] test: skip long path tests on non-Windows If not running on Windows it skips the long path tests in: * test-fs-long-path.js * test-require-long-path.js Fixes: https://github.com/nodejs/node/issues/2255 PR-URL: https://github.com/nodejs/node/pull/4116 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Minwoo Jung --- test/parallel/test-fs-long-path.js | 5 +++++ test/parallel/test-require-long-path.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/parallel/test-fs-long-path.js b/test/parallel/test-fs-long-path.js index 6ecf54902964fa..eadbcd1f78df98 100644 --- a/test/parallel/test-fs-long-path.js +++ b/test/parallel/test-fs-long-path.js @@ -4,6 +4,11 @@ var fs = require('fs'); var path = require('path'); var assert = require('assert'); +if (!common.isWindows) { + console.log('1..0 # Skipped: this test is Windows-specific.'); + return; +} + var successes = 0; // make a path that will be at least 260 chars long. diff --git a/test/parallel/test-require-long-path.js b/test/parallel/test-require-long-path.js index 1f7e28cba2960c..c30a76a5a9e099 100644 --- a/test/parallel/test-require-long-path.js +++ b/test/parallel/test-require-long-path.js @@ -3,6 +3,11 @@ const common = require('../common'); const fs = require('fs'); const path = require('path'); +if (!common.isWindows) { + console.log('1..0 # Skipped: this test is Windows-specific.'); + return; +} + // make a path that is more than 260 chars long. const dirNameLen = Math.max(260 - common.tmpDir.length, 1); const dirName = path.join(common.tmpDir, 'x'.repeat(dirNameLen)); From e7a423f618343dfced9582dcfa9a3a92cd9c319f Mon Sep 17 00:00:00 2001 From: fansworld-claudio Date: Wed, 2 Dec 2015 14:58:50 -0300 Subject: [PATCH 046/262] doc: url.format - true slash postfix behaviour Change url.format's references to slash postfixing to reflect true behaviour (it only automatically postfixes slashes to the slashedProtocols when host is present). Fixes: #3361 PR-URL: https://github.com/nodejs/node/pull/4119 Reviewed-By: James M Snell Reviewed-By: Roman Reiss Reviewed-By: Minwoo Jung --- doc/api/url.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/url.markdown b/doc/api/url.markdown index 8c8cd5bf1b85bf..c6a4b2351b0227 100644 --- a/doc/api/url.markdown +++ b/doc/api/url.markdown @@ -87,12 +87,12 @@ Here's how the formatting process works: * `path` will be ignored. * `protocol` is treated the same with or without the trailing `:` (colon). * The protocols `http`, `https`, `ftp`, `gopher`, `file` will be - postfixed with `://` (colon-slash-slash). + postfixed with `://` (colon-slash-slash) as long as `host`/`hostname` are present. * All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will be postfixed with `:` (colon). * `slashes` set to `true` if the protocol requires `://` (colon-slash-slash) * Only needs to be set for protocols not previously listed as requiring - slashes, such as `mongodb://localhost:8000/`. + slashes, such as `mongodb://localhost:8000/`, or if `host`/`hostname` are absent. * `auth` will be used if present. * `hostname` will only be used if `host` is absent. * `port` will only be used if `host` is absent. From f52607107232bb91185479364a00fe4a78c5e7dc Mon Sep 17 00:00:00 2001 From: yorkie Date: Fri, 4 Dec 2015 06:07:01 +0800 Subject: [PATCH 047/262] doc: improve child_process.markdown wording PR-URL: https://github.com/nodejs/node/pull/4138 Reviewed-By: Colin Ihrig Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- doc/api/child_process.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 84c8a90f456bdf..00b6ff3b950eb1 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -26,9 +26,9 @@ Child processes always have three streams associated with them. `child.stdin`, streams of the parent process, or they may be separate stream objects which can be piped to and from. -The ChildProcess class is not intended to be used directly. Use the -[`spawn()`][], [`exec()`][], [`execFile()`][], or [`fork()`][] methods to create a Child -Process instance. +The `ChildProcess` class is not intended to be used directly. Use the +[`spawn()`][], [`exec()`][], [`execFile()`][], or [`fork()`][] methods to create +an instance of `ChildProcess`. ### Event: 'close' From 2d42b410576504181809966a402accf57eb953b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Thu, 3 Dec 2015 15:45:39 -0800 Subject: [PATCH 048/262] doc: add zkat to collaborators PR-URL: https://github.com/nodejs/node/pull/4142 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Rebecca Turner Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a1931ad1a6d19c..09de6c4b813257 100644 --- a/README.md +++ b/README.md @@ -419,6 +419,7 @@ information about the governance of the Node.js project, see * [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe** <m.j.tunnicliffe@gmail.com> * [vkurchatkin](https://github.com/vkurchatkin) - **Vladimir Kurchatkin** <vladimir.kurchatkin@gmail.com> * [yosuke-furukawa](https://github.com/yosuke-furukawa) - **Yosuke Furukawa** <yosuke.furukawa@gmail.com> +* [zkat](https://github.com/zkat) - **Kat Marchán** <kzm@sykosomatic.org> Collaborators & TSC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in maintaining the Node.js project. From 18ac78dacc5a9bdec26a538a2d96b01bfa9ed048 Mon Sep 17 00:00:00 2001 From: Minwoo Jung Date: Fri, 4 Dec 2015 08:49:56 +0900 Subject: [PATCH 049/262] doc: add JungMinu to collaborators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4143 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Kat Marchán Reviewed-By: James M Snell --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 09de6c4b813257..de6a1903839c60 100644 --- a/README.md +++ b/README.md @@ -393,6 +393,7 @@ information about the governance of the Node.js project, see * [jbergstroem](https://github.com/jbergstroem) - **Johan Bergström** <bugs@bergstroem.nu> * [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com> * [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com> +* [JungMinu](https://github.com/JungMinu) - **Minwoo Jung** <jmwsoft@gmail.com> * [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co> * [mhdawson](https://github.com/mhdawson) - **Michael Dawson** <michael_dawson@ca.ibm.com> * [micnic](https://github.com/micnic) - **Nicu Micleușanu** <micnic90@gmail.com> From 184d10879627766633daa52d025d9ce4defe01bd Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 3 Dec 2015 15:48:00 -0800 Subject: [PATCH 050/262] doc: add iarna to collaborators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4144 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Minwoo Jung Reviewed-By: Kat Marchán Reviewed-By: James M Snell --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index de6a1903839c60..d8a4967565a490 100644 --- a/README.md +++ b/README.md @@ -389,6 +389,7 @@ information about the governance of the Node.js project, see * [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me> * [evanlucas](https://github.com/evanlucas) - **Evan Lucas** <evanlucas@me.com> * [geek](https://github.com/geek) - **Wyatt Preul** <wpreul@gmail.com> +* [iarna](https://github.com/iarna) - **Rebecca Turner** <me@re-becca.org> * [isaacs](https://github.com/isaacs) - **Isaac Z. Schlueter** <i@izs.me> * [jbergstroem](https://github.com/jbergstroem) - **Johan Bergström** <bugs@bergstroem.nu> * [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com> From 66d3ab4bf98cb94b0467e88c6dfafb4fae70c4dc Mon Sep 17 00:00:00 2001 From: Bryan English Date: Thu, 3 Dec 2015 22:58:18 -0800 Subject: [PATCH 051/262] doc, test: symbols as event names * Document that Symbol can used as event names. * Add test for using Symbol as event names PR-URL: https://github.com/nodejs/node/pull/4151 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/events.markdown | 7 ++++--- test/parallel/test-event-emitter-symbols.js | 23 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-event-emitter-symbols.js diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 2d17ca2f83b6b8..92bec13632683a 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -10,7 +10,8 @@ is opened. All objects which emit events are instances of `events.EventEmitter`. You can access this module by doing: `require("events");` Typically, event names are represented by a camel-cased string, however, -there aren't any strict restrictions on that, as any string will be accepted. +there aren't any strict restrictions on that, as any valid property key will be +accepted. Functions can then be attached to objects, to be executed when an event is emitted. These functions are called _listeners_. Inside a listener @@ -59,7 +60,7 @@ Returns the number of listeners for a given event. ### Event: 'newListener' -* `event` {String} The event name +* `event` {String|Symbol} The event name * `listener` {Function} The event handler function This event is emitted *before* a listener is added. When this event is @@ -70,7 +71,7 @@ added. ### Event: 'removeListener' -* `event` {String} The event name +* `event` {String|Symbol} The event name * `listener` {Function} The event handler function This event is emitted *after* a listener is removed. When this event is diff --git a/test/parallel/test-event-emitter-symbols.js b/test/parallel/test-event-emitter-symbols.js new file mode 100644 index 00000000000000..d34938da3c8ad6 --- /dev/null +++ b/test/parallel/test-event-emitter-symbols.js @@ -0,0 +1,23 @@ +'use strict'; + +const common = require('../common'); +const EventEmitter = require('events'); +const assert = require('assert'); + +const ee = new EventEmitter(); +const foo = Symbol('foo'); +const listener = common.mustCall(function() {}); + +ee.on(foo, listener); +assert.deepEqual(ee.listeners(foo), [listener]); + +ee.emit(foo); + +ee.removeAllListeners(); +assert.deepEqual(ee.listeners(foo), []); + +ee.on(foo, listener); +assert.deepEqual(ee.listeners(foo), [listener]); + +ee.removeListener(foo, listener); +assert.deepEqual(ee.listeners(foo), []); From c3df462f356e95e32b810bf05a8a664bc44824a6 Mon Sep 17 00:00:00 2001 From: Super Zheng Date: Fri, 4 Dec 2015 16:14:24 +0800 Subject: [PATCH 052/262] build: add "--partly-static" build options A lot of machines don't upgrade libstdc++.so library for a long time, but the new version of node requires the latest GLIBCXX. Using "--fully-static" configurable options may resolve this problem, but the side effect is that the size of the executable file will be increased. Adding "--partly-static" configurable options it will only build libgcc and libstdc++ libraries into executable file, resolve the problem and control the size of file. PR-URL: https://github.com/nodejs/node/pull/4152 Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung --- configure | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/configure b/configure index e30ce5f0d52dcc..0d0db48c860abb 100755 --- a/configure +++ b/configure @@ -84,7 +84,13 @@ parser.add_option("--fully-static", action="store_true", dest="fully_static", help="Generate an executable without external dynamic libraries. This " - "will not work on OSX when using default compilation environment") + "will not work on OSX when using the default compilation environment") + +parser.add_option("--partly-static", + action="store_true", + dest="partly_static", + help="Generate an executable with libgcc and libstdc++ libraries. This " + "will not work on OSX when using the default compilation environment") parser.add_option("--link-module", action="append", @@ -794,12 +800,19 @@ def configure_openssl(o): configure_library('openssl', o) -def configure_fullystatic(o): - if options.fully_static: - o['libraries'] += ['-static'] +def configure_static(o): + if options.fully_static or options.partly_static: if flavor == 'mac': print("Generation of static executable will not work on OSX " - "when using default compilation environment") + "when using the default compilation environment") + return + + if options.fully_static: + o['libraries'] += ['-static'] + elif options.partly_static: + o['libraries'] += ['-static-libgcc', '-static-libstdc++'] + if options.enable_asan: + o['libraries'] += ['-static-libasan'] def configure_winsdk(o): @@ -1097,7 +1110,7 @@ configure_v8(output) configure_openssl(output) configure_winsdk(output) configure_intl(output) -configure_fullystatic(output) +configure_static(output) # variables should be a root level element, # move everything else to target_defaults From 771aaa60ac832c8da6e122bbfb3576babae1d064 Mon Sep 17 00:00:00 2001 From: Bryce Baril Date: Fri, 4 Dec 2015 10:08:51 -0800 Subject: [PATCH 053/262] buffer: Prevent Buffer constructor deopt The Buffer constructor will generally get inlined, but any call to the Buffer constructor for a string without encoding will cause an eager deoptimization of any function that inlined the Buffer constructor. This is due to a an out-of-bounds read on `arguments[1]`. This change prevents that deopt. PR-URL: https://github.com/nodejs/node/pull/4158 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Trevor Norris Reviewed-By: Minwoo Jung --- lib/buffer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 3d5e96e52f3042..378dde79a1c085 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -40,7 +40,7 @@ function alignPool() { } -function Buffer(arg) { +function Buffer(arg, encoding) { // Common case. if (typeof arg === 'number') { // If less than zero, or NaN. @@ -51,7 +51,7 @@ function Buffer(arg) { // Slightly less common case. if (typeof arg === 'string') { - return fromString(arg, arguments[1]); + return fromString(arg, encoding); } // Unusual. From 78dc27b7f3be4b703812487521a339418f416780 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 4 Dec 2015 22:40:14 -0800 Subject: [PATCH 054/262] test: mark test-cluster-shared-leak flaky test-cluster-shared-leak is flaky on Windows. Refs: https://github.com/nodejs/node/issues/3956 PR-URL: https://github.com/nodejs/node/pull/4162 Reviewed-By: Ben Noordhuis Reviewed-By: Roman Klauke Reviewed-By: Minwoo Jung --- test/parallel/parallel.status | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index d4879b3a6cdc0b..fb301e0bfd8e4e 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,9 +7,10 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] +test-child-process-fork-regr-gh-2847 : PASS,FLAKY test-cluster-net-send : PASS,FLAKY +test-cluster-shared-leak : PASS,FLAKY test-tls-ticket-cluster : PASS,FLAKY -test-child-process-fork-regr-gh-2847 : PASS,FLAKY [$system==linux] test-http-client-timeout-event : PASS,FLAKY From 640838c03b29f244cf7a0a511b8df80a66cbca54 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 5 Dec 2015 00:31:49 +0100 Subject: [PATCH 055/262] src: use GetCurrentProcessId() for process.pid Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: https://github.com/nodejs/node/pull/4163 Reviewed-By: Brian White Reviewed-By: Colin Ihrig Reviewed-By: Rod Vagg --- src/node.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index b4d8221e77320e..1e38c811cdebfc 100644 --- a/src/node.cc +++ b/src/node.cc @@ -64,9 +64,8 @@ #if defined(_MSC_VER) #include #include -#include #define strcasecmp _stricmp -#define getpid _getpid +#define getpid GetCurrentProcessId #define umask _umask typedef int mode_t; #else From 1eb5887990673752482acd9c00ca068fdad637b5 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sun, 6 Dec 2015 13:28:15 +1100 Subject: [PATCH 056/262] node: s/doNTCallbackX/nextTickCallbackWithXArgs/ Rename doNTCallback functions for clarity when profiling, these make sense internally but the "NT" in particular is a bit obtuse to be immediately understandable by non-core developers. PR-URL: https://github.com/nodejs/node/pull/4167 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung --- src/node.js | 30 +++++++++++++++--------------- test/message/eval_messages.out | 8 ++++---- test/message/nexttick_throw.out | 2 +- test/message/stdin_messages.out | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/node.js b/src/node.js index adaa736ce15b4c..736559eaed011b 100644 --- a/src/node.js +++ b/src/node.js @@ -345,20 +345,20 @@ // callback invocation with small numbers of arguments to avoid the // performance hit associated with using `fn.apply()` if (args === undefined) { - doNTCallback0(callback); + nextTickCallbackWith0Args(callback); } else { switch (args.length) { case 1: - doNTCallback1(callback, args[0]); + nextTickCallbackWith1Arg(callback, args[0]); break; case 2: - doNTCallback2(callback, args[0], args[1]); + nextTickCallbackWith2Args(callback, args[0], args[1]); break; case 3: - doNTCallback3(callback, args[0], args[1], args[2]); + nextTickCallbackWith3Args(callback, args[0], args[1], args[2]); break; default: - doNTCallbackMany(callback, args); + nextTickCallbackWithManyArgs(callback, args); } } if (1e4 < tickInfo[kIndex]) @@ -386,20 +386,20 @@ // callback invocation with small numbers of arguments to avoid the // performance hit associated with using `fn.apply()` if (args === undefined) { - doNTCallback0(callback); + nextTickCallbackWith0Args(callback); } else { switch (args.length) { case 1: - doNTCallback1(callback, args[0]); + nextTickCallbackWith1Arg(callback, args[0]); break; case 2: - doNTCallback2(callback, args[0], args[1]); + nextTickCallbackWith2Args(callback, args[0], args[1]); break; case 3: - doNTCallback3(callback, args[0], args[1], args[2]); + nextTickCallbackWith3Args(callback, args[0], args[1], args[2]); break; default: - doNTCallbackMany(callback, args); + nextTickCallbackWithManyArgs(callback, args); } } if (1e4 < tickInfo[kIndex]) @@ -413,7 +413,7 @@ } while (tickInfo[kLength] !== 0); } - function doNTCallback0(callback) { + function nextTickCallbackWith0Args(callback) { var threw = true; try { callback(); @@ -424,7 +424,7 @@ } } - function doNTCallback1(callback, arg1) { + function nextTickCallbackWith1Arg(callback, arg1) { var threw = true; try { callback(arg1); @@ -435,7 +435,7 @@ } } - function doNTCallback2(callback, arg1, arg2) { + function nextTickCallbackWith2Args(callback, arg1, arg2) { var threw = true; try { callback(arg1, arg2); @@ -446,7 +446,7 @@ } } - function doNTCallback3(callback, arg1, arg2, arg3) { + function nextTickCallbackWith3Args(callback, arg1, arg2, arg3) { var threw = true; try { callback(arg1, arg2, arg3); @@ -457,7 +457,7 @@ } } - function doNTCallbackMany(callback, args) { + function nextTickCallbackWithManyArgs(callback, args) { var threw = true; try { callback.apply(null, args); diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out index b02da9b2808087..4fb3c7f56d5859 100644 --- a/test/message/eval_messages.out +++ b/test/message/eval_messages.out @@ -7,7 +7,7 @@ SyntaxError: Strict mode code may not include a with statement at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) 42 42 @@ -20,7 +20,7 @@ Error: hello at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) [eval]:1 throw new Error("hello") @@ -31,7 +31,7 @@ Error: hello at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) 100 [eval]:1 @@ -43,7 +43,7 @@ ReferenceError: y is not defined at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) [eval]:1 var ______________________________________________; throw 10 diff --git a/test/message/nexttick_throw.out b/test/message/nexttick_throw.out index 1dd60694a892b8..1e03f6de84b90a 100644 --- a/test/message/nexttick_throw.out +++ b/test/message/nexttick_throw.out @@ -4,7 +4,7 @@ ^ ReferenceError: undefined_reference_error_maker is not defined at *test*message*nexttick_throw.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) at Function.Module.runMain (module.js:*:*) at startup (node.js:*:*) diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index 94a55c79aba043..57908426079e15 100644 --- a/test/message/stdin_messages.out +++ b/test/message/stdin_messages.out @@ -8,7 +8,7 @@ SyntaxError: Strict mode code may not include a with statement at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) 42 42 @@ -22,7 +22,7 @@ Error: hello at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) [stdin]:1 @@ -34,7 +34,7 @@ Error: hello at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) 100 @@ -47,7 +47,7 @@ ReferenceError: y is not defined at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) at node.js:*:* - at doNTCallback0 (node.js:*:*) + at nextTickCallbackWith0Args (node.js:*:*) at process._tickCallback (node.js:*:*) [stdin]:1 From 805e8c417d3cb01935468f414900f232c2b6af9e Mon Sep 17 00:00:00 2001 From: Prince J Wesley Date: Sun, 6 Dec 2015 14:46:52 +0530 Subject: [PATCH 057/262] repl: display error message when loading directory When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: https://github.com/nodejs/node/pull/4170 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung --- lib/repl.js | 3 +++ test/parallel/test-repl-.save.load.js | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/repl.js b/lib/repl.js index ef641a89c4012e..4fe50f3979e68f 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1059,6 +1059,9 @@ function defineDefaultCommands(repl) { self.write(line + '\n'); } }); + } else { + this.outputStream.write('Failed to load:' + file + + ' is not a valid file\n'); } } catch (e) { this.outputStream.write('Failed to load:' + file + '\n'); diff --git a/test/parallel/test-repl-.save.load.js b/test/parallel/test-repl-.save.load.js index f63b61bf41e15b..56566719926519 100644 --- a/test/parallel/test-repl-.save.load.js +++ b/test/parallel/test-repl-.save.load.js @@ -76,6 +76,14 @@ putIn.write = function(data) { }; putIn.run(['.load ' + loadFile]); +// throw error on loading directory +loadFile = common.tmpDir; +putIn.write = function(data) { + assert.equal(data, 'Failed to load:' + loadFile + ' is not a valid file\n'); + putIn.write = function() {}; +}; +putIn.run(['.load ' + loadFile]); + // clear the REPL putIn.run(['.clear']); From 458b06b4beb72e253aff127a9c732bc768ddf1ce Mon Sep 17 00:00:00 2001 From: wurde Date: Sun, 6 Dec 2015 23:29:24 -0600 Subject: [PATCH 058/262] doc: add brief Node.js overview to README Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott PR-URL: https://github.com/nodejs/node/pull/4174 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d8a4967565a490..fc67346383739d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@ Node.js [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js +uses an event-driven, non-blocking I/O model that makes it lightweight and +efficient. The Node.js package ecosystem, npm, is the largest ecosystem of open +source libraries in the world. + The Node.js project is supported by the [Node.js Foundation](https://nodejs.org/en/foundation/). Contributions, policies and releases are managed under an From 85b624e8961f95c48a0c5f50edf7b7da1979aaad Mon Sep 17 00:00:00 2001 From: Roman Klauke Date: Mon, 7 Dec 2015 20:20:50 +0100 Subject: [PATCH 059/262] doc: change references from node to Node.js Some API doc referenced Node.js with "node" or "node.js". This commit replaces these references. PR-URL:https://github.com/nodejs/node/pull/4177 Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: Minwoo Jung --- doc/api/readline.markdown | 2 +- doc/api/util.markdown | 4 ++-- doc/api/v8.markdown | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index 112206993b2449..cdf424339ed06a 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -77,7 +77,7 @@ Resumes the readline `input` stream. ### rl.setPrompt(prompt) Sets the prompt, for example when you run `node` on the command line, you see -`> `, which is node.js's prompt. +`> `, which is Node.js's prompt. ### rl.write(data[, key]) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 0b649d521d9dad..03386aefb5b78d 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -5,12 +5,12 @@ These functions are in the module `'util'`. Use `require('util')` to access them. -The `util` module is primarily designed to support the needs of node.js's +The `util` module is primarily designed to support the needs of Node.js's internal APIs. Many of these utilities are useful for your own programs. If you find that these functions are lacking for your purposes, however, you are encouraged to write your own utilities. We are not interested in any future additions to the `util` module that -are unnecessary for node.js's internal functionality. +are unnecessary for Node.js's internal functionality. ## util.debug(string) diff --git a/doc/api/v8.markdown b/doc/api/v8.markdown index ea0d04d25b7efd..1cee348ba1ca9d 100644 --- a/doc/api/v8.markdown +++ b/doc/api/v8.markdown @@ -3,7 +3,7 @@ Stability: 2 - Stable This module exposes events and interfaces specific to the version of [V8][] -built with node.js. These interfaces are subject to change by upstream and are +built with Node.js. These interfaces are subject to change by upstream and are therefore not covered under the stability index. ## getHeapStatistics() @@ -27,7 +27,7 @@ Set additional V8 command line flags. Use with care; changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss. Or it may simply do nothing. -The V8 options available for a version of node.js may be determined by running +The V8 options available for a version of Node.js may be determined by running `node --v8-options`. An unofficial, community-maintained list of options and their effects is available [here][]. From 21aa749281fe0c5d2207f459098fb089afa53552 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 8 Dec 2015 12:46:33 +1100 Subject: [PATCH 060/262] doc: update AUTHORS list Update AUTHORS list using tools/update-authors.sh PR-URL: https://github.com/nodejs/node/pull/4183 Reviewed-By: James M Snell --- .mailmap | 20 ++++++++++++++++ AUTHORS | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 85 insertions(+), 7 deletions(-) diff --git a/.mailmap b/.mailmap index 8400b36a6c90d6..78da54872c0f9c 100644 --- a/.mailmap +++ b/.mailmap @@ -6,6 +6,7 @@ Alexey Kupershtokh Alexis Campailla Alexis Sellier Alexis Sellier +Andy Bettisworth Aria Stewart Arlo Breault Artem Zaytsev @@ -19,15 +20,20 @@ Bert Belder Brandon Benvie Brian White Brian White +Caleb Boyd +Charles Chew Choon Keat Charles Rudolph +Claudio Rodriguez Colin Ihrig Christopher Lenz +Dan Kaplun Daniel Berger Daniel Chcouri <333222@gmail.com> Daniel Gröber Daniel Gröber Daniel Pihlström +Danny Nemer Dave Pacheco David Siegel Domenic Denicola @@ -37,6 +43,8 @@ Einar Otto Stangvik Elliott Cable EungJun Yi Evan Larkin +Evan Lucas +Evan Lucas Farid Neshat Fedor Indutny Felix Böhm @@ -48,23 +56,29 @@ Gabriel de Perthuis Gil Pedersen Henry Chin Herbert Vojčík +Icer Liang Igor Soarez Igor Zinkovsky Isaac Z. Schlueter Isaac Z. Schlueter Jake Verbaten James Hartig +Jan Krems Jered Schmidt Jeremiah Senkpiel +Jerry Chin Joe Shaw Johan Bergström Johan Dahlberg Johann Hofmann Jonas Pfenniger Jonathan Ong +Jonathan Persson Jonathan Rentzsch Josh Erickson Joshua S. Weinstein +Junliang Yan +Junliang Yan Jérémy Lal Jérémy Lal Kai Sasaki Lewuathe @@ -81,6 +95,8 @@ Malte-Thorben Bruns Malte-Thorben Bruns Marcin Cieślak Marcin Cieślak +Marti Martz +Martial James Jefferson Mathias Pettersson Matthew Lye Michael Bernstein @@ -95,16 +111,20 @@ Nicholas Kinsey Nikolai Vavilov Onne Gorter Paul Querna +Peter Flannery +Phillip Johnsen Ray Morgan Ray Solomon Raymond Feng Rick Olson Roman Klauke Roman Reiss +Ron Korving Ryan Dahl Ryan Emery Sakthipriyan Vairamani Sam Mikes +Sam P Gallagher-Bishop Sam Shull Sam Shull Sambasiva Suda diff --git a/AUTHORS b/AUTHORS index 3e80bf26e550ca..5ab61aebf20966 100644 --- a/AUTHORS +++ b/AUTHORS @@ -517,7 +517,7 @@ Cam Swords Paul Loyd Benjamin Waters Lev Gimelfarb -pflannery +Peter Flannery Tuğrul Topuz Lorenz Leutgeb ayanamist @@ -565,7 +565,7 @@ Feross Aboukhadijeh Refael Ackermann Taojie Greg Sabia Tucker -Dan Kaplun +Dan Kaplun Colin Ihrig Greg Sabia Tucker Mark Stosberg @@ -580,7 +580,7 @@ Roman Klauke Xavi Magrinyà Euan Ed Morley -Charles +Charles Jan Krems Fred K. Schott Chris Dickinson @@ -648,7 +648,7 @@ Bryce Kahle The Gitter Badger Brendan Ashworth Jose Luis Rivas -Evan Lucas +Evan Lucas Vincent Weevers Tyler Kellen Evan Torrie @@ -669,7 +669,6 @@ Calvin Metcalf Eric Mill pkcs James M Snell -Evan Lucas Cydox Steven Rockarts Vladimir Guguiev @@ -690,7 +689,7 @@ Glen Keane Xiaowei Li <446240525@qq.com> toastynerd Todd Kennedy -Icer Liang +Icer Liang Stephen Belanger Jeremiah Senkpiel Brendan Ashworth @@ -794,7 +793,7 @@ Oleksandr Chekhovskyi Tristian Flanagan Mike Tunnicliffe Ionică Bizău -Danny Nemer +Danny Nemer Sven Slootweg Dmitry Vasilyev Malcolm Ahoy @@ -810,5 +809,64 @@ Michał Gołębiowski Johann Hofmann Charles Rudolph Dave Eddy +Justin Chase +Jeremy Whitlock +Rod Machen +Martial James Jefferson +Doug Shamoo +Junliang Yan +Dave Hodder +Jason Karns +Balázs Galambosi +David Boivin +Liang-Chi Hsieh +Timothy Gu +Fábio Santos +Myles Borins +Jonas Dohse +Коренберг Марк +Caleb Boyd +Yuval Brik +Claudio Rodriguez +Ido Ben-Yair +Kyle Smith +Marti Martz +Stefan Budeanu +Emily Aviva Kapor-Mater +Sam P Gallagher-Bishop +David Woods +Ashok Suthar +Ömer Fadıl Usta +Jerry Chin +Hemanth.HM +Hugues Malphettes +Tyler Henkel +Zheng Chaoping +Ashley Williams +Bryan English +Devin Nakamura +Vladimir Varankin +Manuel B +Jesse McCarthy +Craig Cavalier +Michael Cornacchia +Markus Tzoe +Martin Forsberg +Carl Lei +Lewis Cowper +Bryon Leung +Chunyang Dai +Jonathan Persson +Dave +Luigi Pinca +Peter A. Bigot +Zirak +Scott Buchanan +Rebecca Turner +Bryce Baril +Super Zheng +Rafał Pocztarski +Michael Ruddy +Andy Bettisworth # Generated by tools/update-authors.sh From 3b5084264b1c3395393b4c566c19263946c9db99 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 7 Dec 2015 18:50:25 -0800 Subject: [PATCH 061/262] doc: copyedit addons doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4185 Reviewed-By: Roman Reiss Reviewed-By: Michaël Zasso --- doc/api/addons.markdown | 56 +++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 28a5457cca7c72..2eeb73194e5410 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -1,6 +1,6 @@ # Addons -Addons are dynamically linked shared objects. They can provide glue to C and +Addons are dynamically-linked shared objects. They can provide glue to C and C++ libraries. The API (at the moment) is rather complex, involving knowledge of several libraries: @@ -11,11 +11,11 @@ knowledge of several libraries: - [libuv][], C event loop library. Anytime one needs to wait for a file descriptor to become readable, wait for a timer, or wait for a signal - to be received one will need to interface with libuv. That is, if you + to be received, one will need to interface with libuv. That is, if you perform any I/O, libuv will need to be used. - - Internal Node.js libraries. Most importantly is the `node::ObjectWrap` - class which you will likely want to derive from. + - Internal Node.js libraries. The most important class is `node::ObjectWrap` + which you will likely want to derive from. - Others. Look in `deps/` for what else is available. @@ -28,7 +28,7 @@ be used as a starting-point for your own Addon. ## Hello world -To get started let's make a small Addon which is the C++ equivalent of +To get started, let's make a small Addon which is the C++ equivalent of the following JavaScript code: module.exports.hello = function() { return 'world'; }; @@ -68,11 +68,11 @@ Note that all Node.js addons must export an initialization function: There is no semi-colon after `NODE_MODULE` as it's not a function (see `node.h`). -The `module_name` needs to match the filename of the final binary (minus the -.node suffix). +The `module_name` needs to match the filename of the final binary (excluding +the .node suffix). The source code needs to be built into `addon.node`, the binary Addon. To -do this we create a file called `binding.gyp` which describes the configuration +do this, we create a file called `binding.gyp` which describes the configuration to build your module in a JSON-like format. This file gets compiled by [node-gyp][]. @@ -89,13 +89,13 @@ The next step is to generate the appropriate project build files for the current platform. Use `node-gyp configure` for that. Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file -(on Windows) in the `build/` directory. Next invoke the `node-gyp build` +(on Windows) in the `build/` directory. Next, invoke the `node-gyp build` command. Now you have your compiled `.node` bindings file! The compiled bindings end up in `build/Release/`. -You can now use the binary addon in an Node.js project `hello.js` by pointing +You can now use the binary addon in a Node.js project `hello.js` by pointing `require` to the recently built `hello.node` module: // hello.js @@ -114,7 +114,7 @@ Below are some addon patterns to help you get started. Consult the online [Embedder's Guide][] for an explanation of several concepts used such as handles, scopes, function templates, etc. -In order to use these examples you need to compile them using `node-gyp`. +In order to use these examples, you need to compile them using `node-gyp`. Create the following `binding.gyp` file: { @@ -127,7 +127,7 @@ Create the following `binding.gyp` file: } In cases where there is more than one `.cc` file, simply add the file name to -the `sources` array, e.g.: +the `sources` array. For example: "sources": ["addon.cc", "myexample.cc"] @@ -234,7 +234,7 @@ the full `module` object as the second argument. This allows the addon to completely overwrite `exports` with a single function instead of adding the function as a property of `exports`. -To test it run the following JavaScript snippet: +To test it, run the following JavaScript snippet: // test.js var addon = require('./build/Release/addon'); @@ -344,8 +344,8 @@ To test: ### Wrapping C++ objects -Here we will create a wrapper for a C++ object/class `MyObject` that can be -instantiated in JavaScript through the `new` operator. First prepare the main +Here, we will create a wrapper for a C++ object/class `MyObject` that can be +instantiated in JavaScript through the `new` operator. First, prepare the main module `addon.cc`: // addon.cc @@ -365,7 +365,7 @@ module `addon.cc`: } // namespace demo -Then in `myobject.h` make your wrapper inherit from `node::ObjectWrap`: +Then, in `myobject.h`, make your wrapper inherit from `node::ObjectWrap`: // myobject.h #ifndef MYOBJECT_H @@ -394,7 +394,7 @@ Then in `myobject.h` make your wrapper inherit from `node::ObjectWrap`: #endif -And in `myobject.cc` implement the various methods that you want to expose. +And in `myobject.cc`, implement the various methods that you want to expose. Here we expose the method `plusOne` by adding it to the constructor's prototype: @@ -480,7 +480,8 @@ Test it with: ### Factory of wrapped objects This is useful when you want to be able to create native objects without -explicitly instantiating them with the `new` operator in JavaScript, e.g. +explicitly instantiating them with the `new` operator in JavaScript. For +example: var obj = addon.createObject(); // instead of: @@ -515,8 +516,9 @@ Let's register our `createObject` method in `addon.cc`: } // namespace demo -In `myobject.h` we now introduce the static method `NewInstance` that takes -care of instantiating the object (i.e. it does the job of `new` in JavaScript): +In `myobject.h`, we now introduce the static method `NewInstance` that takes +care of instantiating the object. In other words, it does the job of `new` in +JavaScript: // myobject.h #ifndef MYOBJECT_H @@ -644,9 +646,9 @@ Test it with: ### Passing wrapped objects around In addition to wrapping and returning C++ objects, you can pass them around -by unwrapping them with Node.js's `node::ObjectWrap::Unwrap` helper function. -In the following `addon.cc` we introduce a function `add()` that can take on two -`MyObject` objects: +by unwrapping them with the Node.js helper function `node::ObjectWrap::Unwrap`. +In the following `addon.cc`, we introduce a function `add()` that can take on +two `MyObject` objects: // addon.cc #include @@ -690,7 +692,7 @@ In the following `addon.cc` we introduce a function `add()` that can take on two } // namespace demo -To make things interesting we introduce a public method in `myobject.h` so we +To make things interesting, we introduce a public method in `myobject.h` so we can probe private values after unwrapping the object: // myobject.h @@ -721,7 +723,7 @@ can probe private values after unwrapping the object: #endif -The implementation of `myobject.cc` is similar as before: +The implementation of `myobject.cc` is similar to before: // myobject.cc #include @@ -804,10 +806,10 @@ Test it with: * `callback`: `void (*)(void*)` - A pointer to the function to call at exit. * `args`: `void*` - A pointer to pass to the callback at exit. -Registers exit hooks that run after the event loop has ended, but before the VM +Registers exit hooks that run after the event loop has ended but before the VM is killed. -Callbacks are run in last-in, first-out order. AtExit takes two parameters: +Callbacks are run in last-in first-out order. AtExit takes two parameters: a pointer to a callback function to run at exit, and a pointer to untyped context data to be passed to that callback. From 31a9a65928600f45c01eaccd89fa775b404062ec Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 7 Dec 2015 19:03:21 -0800 Subject: [PATCH 062/262] doc: clarify assert.fail doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4186 Reviewed-By: Michaël Zasso Reviewed-By: Roman Klauke Reviewed-By: Minwoo Jung --- doc/api/assert.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index c35fc1ad0832a0..a3fb229161b31e 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -62,8 +62,9 @@ Tests shallow, coercive equality with the equal comparison operator ( `==` ). ## assert.fail(actual, expected, message, operator) -Throws an exception that displays the values for `actual` and `expected` -separated by the provided operator. +Throws an `AssertionError`. If `message` is falsy, it displays the values for +`actual` and `expected` separated by the provided `operator`. Otherwise, it +displays `message` (and does not use `actual`, `expected`, and `operator`). ## assert.ifError(value) From 9a646b940d02a7813f4f1260437518f106c9d63a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 7 Dec 2015 19:21:24 -0800 Subject: [PATCH 063/262] doc: copyedit buffer doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4187 Reviewed-By: Michaël Zasso Reviewed-By: Roman Reiss --- doc/api/buffer.markdown | 76 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index ae0c145abb3c7d..5f52acd85c83fe 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -2,7 +2,7 @@ Stability: 2 - Stable -Pure JavaScript is Unicode friendly but not nice to binary data. When +Pure JavaScript is Unicode-friendly but not nice to binary data. When dealing with TCP streams or the file system, it's necessary to handle octet streams. Node.js has several strategies for manipulating, creating, and consuming octet streams. @@ -15,23 +15,23 @@ The `Buffer` class is a global, making it very rare that one would need to ever `require('buffer')`. Converting between Buffers and JavaScript string objects requires an explicit -encoding method. Here are the different string encodings. +encoding method. The different string encodings are: -* `'ascii'` - for 7 bit ASCII data only. This encoding method is very fast, and +* `'ascii'` - for 7-bit ASCII data only. This encoding method is very fast and will strip the high bit if set. * `'utf8'` - Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. -* `'utf16le'` - 2 or 4 bytes, little endian encoded Unicode characters. +* `'utf16le'` - 2 or 4 bytes, little-endian encoded Unicode characters. Surrogate pairs (U+10000 to U+10FFFF) are supported. * `'ucs2'` - Alias of `'utf16le'`. * `'base64'` - Base64 string encoding. -* `'binary'` - A way of encoding the buffer into a one-byte (i.e. `latin-1`) - encoded string. The string `'latin-1'` is not supported. Instead simply pass +* `'binary'` - A way of encoding the buffer into a one-byte (`latin-1`) + encoded string. The string `'latin-1'` is not supported. Instead, pass `'binary'` to use `'latin-1'` encoding. * `'hex'` - Encode each byte as two hexadecimal characters. @@ -45,8 +45,8 @@ Creating a typed array from a `Buffer` works with the following caveats: with elements `[1,2,3,4]`, not a `Uint32Array` with a single element `[0x1020304]` or `[0x4030201]`. -NOTE: Node.js v0.8 simply retained a reference to the buffer in `array.buffer` -instead of cloning it. +NOTE: Node.js v0.8 retained a reference to the buffer in `array.buffer` instead +of cloning it. While more efficient, it introduces subtle incompatibilities with the typed arrays specification. `ArrayBuffer#slice()` makes a copy of the slice while @@ -74,9 +74,9 @@ Copies the passed `buffer` data onto a new `Buffer` instance. * `size` Number Allocates a new buffer of `size` bytes. `size` must be less than -1,073,741,824 bytes (1 GB) on 32 bits architectures or -2,147,483,648 bytes (2 GB) on 64 bits architectures, -otherwise a [`RangeError`][] is thrown. +1,073,741,824 bytes (1 GB) on 32-bit architectures or +2,147,483,648 bytes (2 GB) on 64-bit architectures. +Otherwise, a [`RangeError`][] is thrown. Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So the contents of a newly created `Buffer` are unknown and could contain @@ -208,14 +208,14 @@ Example: copy an ASCII string into a buffer, one byte at a time: // Node.js -Returns a boolean of whether `this` and `otherBuffer` have the same +Returns a boolean indicating whether `this` and `otherBuffer` have the same bytes. ### buf.compare(otherBuffer) * `otherBuffer` {Buffer} -Returns a number indicating whether `this` comes before or after or is +Returns a number indicating whether `this` comes before, after, or is the same as the `otherBuffer` in sort order. @@ -227,7 +227,7 @@ the same as the `otherBuffer` in sort order. * `sourceEnd` Number, Optional, Default: `buffer.length` Copies data from a region of this buffer to a region in the target buffer even -if the target memory region overlaps with the source. If `undefined` the +if the target memory region overlaps with the source. If `undefined`, the `targetStart` and `sourceStart` parameters default to `0` while `sourceEnd` defaults to `buffer.length`. @@ -326,7 +326,7 @@ use [`buf.slice`][] to create a new buffer. * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads a 64 bit double from the buffer at the specified offset with specified +Reads a 64-bit double from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -356,7 +356,7 @@ Example: * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads a 32 bit float from the buffer at the specified offset with specified +Reads a 32-bit float from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -381,7 +381,7 @@ Example: * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads a signed 8 bit integer from the buffer at the specified offset. +Reads a signed 8-bit integer from the buffer at the specified offset. Set `noAssert` to true to skip validation of `offset`. This means that `offset` may be beyond the end of the buffer. Defaults to `false`. @@ -396,7 +396,7 @@ complement signed values. * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads a signed 16 bit integer from the buffer at the specified offset with +Reads a signed 16-bit integer from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -412,7 +412,7 @@ complement signed values. * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads a signed 32 bit integer from the buffer at the specified offset with +Reads a signed 32-bit integer from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -447,7 +447,7 @@ may be beyond the end of the buffer. Defaults to `false`. * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads an unsigned 8 bit integer from the buffer at the specified offset. +Reads an unsigned 8-bit integer from the buffer at the specified offset. Set `noAssert` to true to skip validation of `offset`. This means that `offset` may be beyond the end of the buffer. Defaults to `false`. @@ -477,7 +477,7 @@ Example: * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads an unsigned 16 bit integer from the buffer at the specified offset with +Reads an unsigned 16-bit integer from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -513,7 +513,7 @@ Example: * `noAssert` Boolean, Optional, Default: false * Return: Number -Reads an unsigned 32 bit integer from the buffer at the specified offset with +Reads an unsigned 32-bit integer from the buffer at the specified offset with specified endian format. Set `noAssert` to true to skip validation of `offset`. This means that `offset` @@ -604,7 +604,7 @@ See `buffer.write()` example, above. ### buf.toJSON() -Returns a JSON-representation of the Buffer instance. `JSON.stringify` +Returns a JSON representation of the Buffer instance. `JSON.stringify` implicitly calls this function when stringifying a Buffer instance. Example: @@ -650,7 +650,7 @@ The method will not write partial characters. * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, `value` must be a valid 64 bit double. +format. `value` must be a valid 64-bit double. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -679,7 +679,7 @@ Example: * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, behavior is unspecified if `value` is not a 32 bit float. +format. Behavior is unspecified if `value` is not a 32-bit float. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -706,8 +706,8 @@ Example: * `offset` Number * `noAssert` Boolean, Optional, Default: false -Writes `value` to the buffer at the specified offset. Note, `value` must be a -valid signed 8 bit integer. +Writes `value` to the buffer at the specified offset. `value` must be a +valid signed 8-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -725,7 +725,7 @@ signed integer into `buffer`. * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, `value` must be a valid signed 16 bit integer. +format. `value` must be a valid signed 16-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -743,7 +743,7 @@ complement signed integer into `buffer`. * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, `value` must be a valid signed 32 bit integer. +format. `value` must be a valid signed 32-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -778,8 +778,8 @@ to `false`. * `offset` Number * `noAssert` Boolean, Optional, Default: false -Writes `value` to the buffer at the specified offset. Note, `value` must be a -valid unsigned 8 bit integer. +Writes `value` to the buffer at the specified offset. `value` must be a +valid unsigned 8-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -806,7 +806,7 @@ Example: * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, `value` must be a valid unsigned 16 bit integer. +format. `value` must be a valid unsigned 16-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -837,7 +837,7 @@ Example: * `noAssert` Boolean, Optional, Default: false Writes `value` to the buffer at the specified offset with specified endian -format. Note, `value` must be a valid unsigned 32 bit integer. +format. `value` must be a valid unsigned 32-bit integer. Set `noAssert` to true to skip validation of `value` and `offset`. This means that `value` may be too large for the specific function and `offset` may be @@ -886,7 +886,7 @@ be overridden by user modules. See [`util.inspect()`][] for more details on `buffer.inspect()` behavior. Note that this is a property on the buffer module returned by -`require('buffer')`, not on the Buffer global, or a buffer instance. +`require('buffer')`, not on the Buffer global or a buffer instance. ## ES6 iteration @@ -901,7 +901,7 @@ Buffers can be iterated over using `for..of` syntax: // 2 // 3 -Additionally, `buffer.values()`, `buffer.keys()` and `buffer.entries()` +Additionally, the `buffer.values()`, `buffer.keys()`, and `buffer.entries()` methods can be used to create iterators. ## Class: SlowBuffer @@ -914,7 +914,7 @@ larger allocated object. This approach improves both performance and memory usage since v8 does not need to track and cleanup as many `Persistent` objects. In the case where a developer may need to retain a small chunk of memory from a -pool for an indeterminate amount of time it may be appropriate to create an +pool for an indeterminate amount of time, it may be appropriate to create an un-pooled Buffer instance using SlowBuffer and copy out the relevant bits. // need to keep around a few small chunks of memory @@ -929,8 +929,8 @@ un-pooled Buffer instance using SlowBuffer and copy out the relevant bits. store.push(sb); }); -Though this should be used sparingly and only be a last resort *after* a developer -has actively observed undue memory retention in their applications. +This should be used only as a last resort *after* a developer has observed +undue memory retention in their applications. [`Array#indexOf()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf [`buf.fill(0)`]: #buffer_buf_fill_value_offset_end From 435271ac7867fa01d444bb6fc5bd05a86663377c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 7 Dec 2015 19:31:38 -0800 Subject: [PATCH 064/262] doc: copyedit child_process doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4188 Reviewed-By: Michaël Zasso Reviewed-By: Minwoo Jung --- doc/api/child_process.markdown | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 00b6ff3b950eb1..1b32bb70f69c66 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -10,9 +10,9 @@ It is possible to stream data through a child's `stdin`, `stdout`, and line-buffered I/O internally. That doesn't affect Node.js but it means data you send to the child process may not be immediately consumed.) -To create a child process use `require('child_process').spawn()` or +To create a child process, use `require('child_process').spawn()` or `require('child_process').fork()`. The semantics of each are slightly -different, and explained [below][]. +different as explained [below][]. For scripting purposes you may find the [synchronous counterparts][] more convenient. @@ -54,11 +54,11 @@ Emitted when: 1. The process could not be spawned, or 2. The process could not be killed, or -3. Sending a message to the child process failed for whatever reason. +3. Sending a message to the child process failed. -Note that the `'exit'` event may or may not fire after an error has occurred. If -you are listening on both events to fire a function, remember to guard against -calling your function twice. +Note that the `'exit'` event may or may not fire after an error has occurred. +If you are listening on both events to fire a function, remember to guard +against calling your function twice. See also [`ChildProcess#kill()`][] and [`ChildProcess#send()`][]. @@ -76,8 +76,7 @@ of the signal, otherwise `null`. Note that the child process stdio streams might still be open. Also, note that Node.js establishes signal handlers for `SIGINT` and -`SIGTERM`, so it will not terminate due to receipt of those signals, -it will exit. +`SIGTERM`. It will not terminate due to receipt of those signals. It will exit. See `waitpid(2)`. @@ -103,8 +102,8 @@ gracefully once there are no other connections keeping it alive. After calling this method the `.connected` flag will be set to `false` in both the parent and child, and it is no longer possible to send messages. -The `'disconnect'` event will be emitted when there are no messages in the process -of being received, most likely immediately. +The `'disconnect'` event will be emitted when there are no messages in the +process of being received, most likely immediately. Note that you can also call `process.disconnect()` in the child process when the child process has any open IPC channels with the parent (i.e [`fork()`][]). @@ -128,9 +127,9 @@ be sent `'SIGTERM'`. See `signal(7)` for a list of available signals. May emit an `'error'` event when the signal cannot be delivered. Sending a signal to a child process that has already exited is not an error but may -have unforeseen consequences: if the PID (the process ID) has been reassigned -to another process, the signal will be delivered to that process instead. -What happens next is anyone's guess. +have unforeseen consequences. Specifically, if the process identifier (PID) has +been reassigned to another process, the signal will be delivered to that +process instead. What happens next is anyone's guess. Note that while the function is called `kill`, the signal delivered to the child process may not actually kill it. `kill` really just sends a signal @@ -142,7 +141,7 @@ See `kill(2)` * {Integer} -The PID of the child process. +The process identifier (PID) of the child process. Example: @@ -183,7 +182,7 @@ And then the child script, `'sub.js'` might look like this: process.send({ foo: 'bar' }); -In the child the `process` object will have a `send()` method, and `process` +In the child, the `process` object will have a `send()` method, and `process` will emit objects each time it receives a message on its channel. There is a special case when sending a `{cmd: 'NODE_foo'}` message. All messages From 10a75c3d41eedd4a10603eb0016cb672ef584771 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 7 Dec 2015 22:15:43 -0500 Subject: [PATCH 065/262] tls_wrap: slice buffer properly in `ClearOut` Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`. Fix: https://github.com/nodejs/node/issues/4161 PR-URL: https://github.com/nodejs/node/pull/4184 Reviewed-By: Brian White --- src/tls_wrap.cc | 4 +++- test/parallel/test-tls-inception.js | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index fc00893b77f84f..7d83c79894b877 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -409,6 +409,7 @@ void TLSWrap::ClearOut() { if (read <= 0) break; + char* current = out; while (read > 0) { int avail = read; @@ -416,10 +417,11 @@ void TLSWrap::ClearOut() { OnAlloc(avail, &buf); if (static_cast(buf.len) < avail) avail = buf.len; - memcpy(buf.base, out, avail); + memcpy(buf.base, current, avail); OnRead(avail, &buf); read -= avail; + current += avail; } } diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index df03cf934fcef6..12b9f95facc686 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -15,6 +15,8 @@ var net = require('net'); var options, a, b, portA, portB; var gotHello = false; +var body = new Buffer(4000).fill('A'); + options = { key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')), cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')) @@ -38,7 +40,7 @@ a = tls.createServer(options, function(socket) { // the "target" server b = tls.createServer(options, function(socket) { - socket.end('hello'); + socket.end(body); }); process.on('exit', function() { @@ -59,11 +61,13 @@ a.listen(common.PORT, function() { rejectUnauthorized: false }); ssl.setEncoding('utf8'); + var buf = ''; ssl.once('data', function(data) { - assert.equal('hello', data); + buf += data; gotHello = true; }); ssl.on('end', function() { + assert.equal(buf, body); ssl.end(); a.close(); b.close(); From a1f7bc72671f076503b462f522805beb21f45d47 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 8 Dec 2015 13:36:38 +0100 Subject: [PATCH 066/262] test: fix tls-inception Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: https://github.com/nodejs/node/pull/4195 Reviewed-By: Brian White Reviewed-By: Fedor Indutny --- test/parallel/test-tls-inception.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index 12b9f95facc686..bf8688fdd29418 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -12,8 +12,7 @@ var fs = require('fs'); var path = require('path'); var net = require('net'); -var options, a, b, portA, portB; -var gotHello = false; +var options, a, b; var body = new Buffer(4000).fill('A'); @@ -43,10 +42,6 @@ b = tls.createServer(options, function(socket) { socket.end(body); }); -process.on('exit', function() { - assert(gotHello); -}); - a.listen(common.PORT, function() { b.listen(common.PORT + 1, function() { options = { @@ -62,15 +57,14 @@ a.listen(common.PORT, function() { }); ssl.setEncoding('utf8'); var buf = ''; - ssl.once('data', function(data) { + ssl.on('data', function(data) { buf += data; - gotHello = true; }); - ssl.on('end', function() { + ssl.on('end', common.mustCall(function() { assert.equal(buf, body); ssl.end(); a.close(); b.close(); - }); + })); }); }); From 76f5a91a6f131071929fa710f9952a188c8988ac Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 8 Dec 2015 14:57:22 +0100 Subject: [PATCH 067/262] test: fix tls-inception flakiness When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: https://github.com/nodejs/node/pull/4195 Reviewed-By: Brian White Reviewed-By: Fedor Indutny --- test/parallel/test-tls-inception.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index bf8688fdd29418..8946f52bdd63d4 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -14,7 +14,7 @@ var net = require('net'); var options, a, b; -var body = new Buffer(4000).fill('A'); +var body = new Buffer(400000).fill('A'); options = { key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')), @@ -32,7 +32,7 @@ a = tls.createServer(options, function(socket) { dest.pipe(socket); socket.pipe(dest); - dest.on('close', function() { + dest.on('end', function() { socket.destroy(); }); }); From db15157962d86e73332dc29ac7dec2ceac6d6808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krause?= Date: Tue, 8 Dec 2015 21:53:06 +0100 Subject: [PATCH 068/262] configure: fix arm vfpv2 The gcc -mfpu flag for VFPv2 is vfp, not vfpv2 (there is no vfpv2) [1]. [1] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html PR-URL: https://github.com/nodejs/node/pull/4203 Reviewed-By: Ben Noordhuis --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0d0db48c860abb..a3730bc438ef1a 100755 --- a/configure +++ b/configure @@ -30,7 +30,7 @@ valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32', 'x64', 'x86') valid_arm_float_abi = ('soft', 'softfp', 'hard') -valid_arm_fpu = ('vfp', 'vfpv2', 'vfpv3', 'vfpv3-d16', 'neon') +valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon') valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx') valid_mips_fpu = ('fp32', 'fp64', 'fpxx') valid_mips_float_abi = ('soft', 'hard') @@ -623,7 +623,7 @@ def configure_arm(o): else: arm_float_abi = 'default' - arm_fpu = 'vfpv2' + arm_fpu = 'vfp' if is_arch_armv7(): arm_fpu = 'vfpv3' From 6a0ec143dfc46f629a301360a4bbed78d96a77b0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 8 Dec 2015 23:46:07 +0100 Subject: [PATCH 069/262] test: don't assume openssl s_client supports -ssl3 Scan the child process's stderr for an 'unknown flag' error message and mark the test as skipped if found. Fixes: https://github.com/nodejs/node/issues/3927 PR-URL: https://github.com/nodejs/node/pull/4204 Reviewed-By: Rich Trott --- test/parallel/test-tls-no-sslv3.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js index ce5a9d395d6a47..442fc3b91c25af 100644 --- a/test/parallel/test-tls-no-sslv3.js +++ b/test/parallel/test-tls-no-sslv3.js @@ -19,6 +19,8 @@ if (common.opensslCli === false) { var cert = fs.readFileSync(common.fixturesDir + '/test_cert.pem'); var key = fs.readFileSync(common.fixturesDir + '/test_key.pem'); var server = tls.createServer({ cert: cert, key: key }, common.fail); +var errors = []; +var stderr = ''; server.listen(common.PORT, '127.0.0.1', function() { var address = this.address().address + ':' + this.address().port; @@ -34,13 +36,25 @@ server.listen(common.PORT, '127.0.0.1', function() { if (common.isWindows) args.push('-no_rand_screen'); - var client = spawn(common.opensslCli, args, { stdio: 'inherit' }); + var client = spawn(common.opensslCli, args, { stdio: 'pipe' }); + client.stdout.pipe(process.stdout); + client.stderr.pipe(process.stderr); + client.stderr.setEncoding('utf8'); + client.stderr.on('data', data => stderr += data); + client.once('exit', common.mustCall(function(exitCode) { assert.equal(exitCode, 1); server.close(); })); }); -server.once('clientError', common.mustCall(function(err, conn) { - assert(/:wrong version number/.test(err.message)); -})); +server.on('clientError', err => errors.push(err)); + +process.on('exit', function() { + if (/unknown option -ssl3/.test(stderr)) { + console.log('1..0 # Skipped: `openssl s_client -ssl3` not supported.'); + } else { + assert.equal(errors.length, 1); + assert(/:wrong version number/.test(errors[0].message)); + } +}); From 3f77e7b742d98d3186ece031951d12684085d555 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 20 Dec 2015 13:21:35 +0100 Subject: [PATCH 070/262] test: fix domain-top-level-error-handler-throw Check the stderr output in the `close` event as it's not guaranteed to be fully available when the `exit` event is fired. PR: #4364 PR-URL: https://github.com/nodejs/node/pull/4364 Reviewed-By: Julien Gilli --- test/parallel/test-domain-top-level-error-handler-throw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-domain-top-level-error-handler-throw.js b/test/parallel/test-domain-top-level-error-handler-throw.js index 2b9e704e43c32b..8f63c94295a845 100644 --- a/test/parallel/test-domain-top-level-error-handler-throw.js +++ b/test/parallel/test-domain-top-level-error-handler-throw.js @@ -36,10 +36,12 @@ if (process.argv[2] === 'child') { stderrOutput += data.toString(); }); - child.on('exit', function onChildExited(exitCode, signal) { + child.on('close', function onChildClosed() { assert(stderrOutput.indexOf(domainErrHandlerExMessage) !== -1); assert(stderrOutput.indexOf(internalExMessage) === -1); + }); + child.on('exit', function onChildExited(exitCode, signal) { var expectedExitCode = 7; var expectedSignal = null; From b85ac630b4c55ba2d4c8bb00fa475738de1817c6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 9 Dec 2015 20:20:32 +0100 Subject: [PATCH 071/262] doc: harmonize description of `ca` argument Different sections said different things about what the `ca` argument should look like. This commit harmonizes them. Ref: https://github.com/nodejs/node/pull/4099 PR-URL: https://github.com/nodejs/node/pull/4213 Reviewed-By: Roman Reiss --- doc/api/https.markdown | 5 +++-- doc/api/tls.markdown | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 6b688668f7f47e..5aa061e45938fd 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -164,8 +164,9 @@ The following options from [`tls.connect()`][] can also be specified. However, a - `key`: Private key to use for SSL. Default `null`. - `passphrase`: A string of passphrase for the private key or pfx. Default `null`. - `cert`: Public x509 certificate to use. Default `null`. -- `ca`: An authority certificate or array of authority certificates to check - the remote host against. +- `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted + certificates in PEM format. If this is omitted several well known "root" + CAs will be used, like VeriSign. These are used to authorize connections. - `ciphers`: A string describing the ciphers to use or exclude. Consult for details on the format. diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 618a3574715fa1..4c5d868685d3d9 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -546,9 +546,9 @@ Creates a new client connection to the given `port` and `host` (old API) or - `cert`: A string or `Buffer` containing the certificate key of the client in PEM format. (Could be an array of certs). - - `ca`: An array of strings or `Buffer`s of trusted certificates in PEM - format. If this is omitted several well known "root" CAs will be used, - like VeriSign. These are used to authorize connections. + - `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted + certificates in PEM format. If this is omitted several well known "root" + CAs will be used, like VeriSign. These are used to authorize connections. - `ciphers`: A string describing the ciphers to use or exclude, separated by `:`. Uses the same default cipher suite as `tls.createServer`. @@ -643,8 +643,9 @@ dictionary with keys: objects in the format `{pem: key, passphrase: passphrase}`. (Required) * `passphrase` : A string of passphrase for the private key or pfx * `cert` : A string holding the PEM encoded certificate -* `ca` : Either a string or list of strings of PEM encoded CA - certificates to trust. +* `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted + certificates in PEM format. If this is omitted several well known "root" + CAs will be used, like VeriSign. These are used to authorize connections. * `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate Revocation List) * `ciphers`: A string describing the ciphers to use or exclude. @@ -704,9 +705,9 @@ automatically set as a listener for the [`'secureConnection'`][] event. The - `cert`: A string or `Buffer` containing the certificate key of the server in PEM format. (Could be an array of certs). (Required) - - `ca`: An array of strings or `Buffer`s of trusted certificates in PEM - format. If this is omitted several well known "root" CAs will be used, - like VeriSign. These are used to authorize connections. + - `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted + certificates in PEM format. If this is omitted several well known "root" + CAs will be used, like VeriSign. These are used to authorize connections. - `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate Revocation List) From 21b2f61f7130c32f2910705546f3aa09afdfc3f9 Mon Sep 17 00:00:00 2001 From: Calvin Metcalf Date: Wed, 9 Dec 2015 13:55:09 -0800 Subject: [PATCH 072/262] doc: add calvinmetcalf to collaborators PR-URL: https://github.com/nodejs/node/pull/4218 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Ryan Graham Reviewed-By: Matteo Collina --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fc67346383739d..72353914d09dc0 100644 --- a/README.md +++ b/README.md @@ -390,6 +390,7 @@ information about the governance of the Node.js project, see ### Collaborators * [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com> +* [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com> * [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <chalkerx@gmail.com> * [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me> * [evanlucas](https://github.com/evanlucas) - **Evan Lucas** <evanlucas@me.com> From 4b4581de37f2b4343ae3bac97e5b45ff2ad954aa Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Wed, 9 Dec 2015 13:54:06 -0800 Subject: [PATCH 073/262] doc: add rmg to collaborators PR-URL: https://github.com/nodejs/node/pull/4219 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Calvin Metcalf --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 72353914d09dc0..29a7839c3deea7 100644 --- a/README.md +++ b/README.md @@ -411,6 +411,7 @@ information about the governance of the Node.js project, see * [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** <petka_antonov@hotmail.com> * [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> * [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** <alex@kocharin.ru> +* [rmg](https://github.com/rmg) - **Ryan Graham** <r.m.graham@gmail.com> * [robertkowalski](https://github.com/robertkowalski) - **Robert Kowalski** <rok@kowalski.gd> * [romankl](https://github.com/romankl) - **Roman Klauke** <romaaan.git@gmail.com> * [saghul](https://github.com/saghul) - **Saúl Ibarra Corretgé** <saghul@gmail.com> From e674c953a73341bb1515bd0de8be5efc861c688a Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 9 Dec 2015 13:54:48 -0800 Subject: [PATCH 074/262] doc: add mcollina to collaborators Hello everyone! PR-URL: https://github.com/nodejs/node/pull/4220 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Ryan Graham Reviewed-By: Calvin Metcalf --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 29a7839c3deea7..3df9b93dd39d66 100644 --- a/README.md +++ b/README.md @@ -402,6 +402,7 @@ information about the governance of the Node.js project, see * [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com> * [JungMinu](https://github.com/JungMinu) - **Minwoo Jung** <jmwsoft@gmail.com> * [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co> +* [mcollina](https://github.com/mcollina) - **Matteo Collina** <matteo.collina@gmail.com> * [mhdawson](https://github.com/mhdawson) - **Michael Dawson** <michael_dawson@ca.ibm.com> * [micnic](https://github.com/micnic) - **Nicu Micleușanu** <micnic90@gmail.com> * [mikeal](https://github.com/mikeal) - **Mikeal Rogers** <mikeal.rogers@gmail.com> From fa57262fc4e3774956ed697fb9ae3076c26ed81a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 9 Dec 2015 20:19:30 -0800 Subject: [PATCH 075/262] doc: copyedit console doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4225 Reviewed-By: Brian White Reviewed-By: Michaël Zasso Reviewed-By: James M Snell --- doc/api/console.markdown | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/api/console.markdown b/doc/api/console.markdown index 6694402f5818c6..169ed21840c28d 100644 --- a/doc/api/console.markdown +++ b/doc/api/console.markdown @@ -19,8 +19,8 @@ Use `require('console').Console` or `console.Console` to access this class. var Console = require('console').Console; var Console = console.Console; -You can use `Console` class to custom simple logger like `console`, but with -different output streams. +You can use the `Console` class to create a simple logger like `console` but +with different output streams. ### new Console(stdout[, stderr]) @@ -61,8 +61,8 @@ is blocking: $ node script.js 2> error.log | tee info.log -In daily use, the blocking/non-blocking dichotomy is not something you -should worry about unless you log huge amounts of data. +Typically, the blocking/non-blocking dichotomy is not something you should +worry about unless you log huge amounts of data. ### console.assert(value[, message][, ...]) @@ -71,19 +71,21 @@ Similar to [`assert.ok()`][], but the error message is formatted as ### console.dir(obj[, options]) -Uses [`util.inspect()`][] on `obj` and prints resulting string to stdout. This function -bypasses any custom `inspect()` function on `obj`. An optional *options* object -may be passed that alters certain aspects of the formatted string: +Uses [`util.inspect()`][] on `obj` and prints the resulting string to stdout. +This function bypasses any custom `inspect()` function on `obj`. An optional +`options` object may be passed that alters certain aspects of the formatted +string: - `showHidden` - if `true` then the object's non-enumerable and symbol properties will be shown too. Defaults to `false`. - `depth` - tells `inspect` how many times to recurse while formatting the object. This is useful for inspecting large complicated objects. Defaults to -`2`. To make it recurse indefinitely pass `null`. +`2`. To make it recurse indefinitely, pass `null`. - `colors` - if `true`, then the output will be styled with ANSI color codes. -Defaults to `false`. Colors are customizable, see [customizing `util.inspect()` colors][]. +Defaults to `false`. Colors are customizable; see +[customizing `util.inspect()` colors][]. ### console.error([data][, ...]) @@ -96,14 +98,15 @@ Same as [`console.log()`][]. ### console.log([data][, ...]) Prints to stdout with newline. This function can take multiple arguments in a -`printf()`-like way. Example: +`printf()`-like way: var count = 5; console.log('count: %d', count); // prints 'count: 5' -If formatting elements are not found in the first string then [`util.inspect()`][] -is used on each argument. See [`util.format()`][] for more information. +If formatting elements are not found in the first string then +[`util.inspect()`][] is used on each argument. See [`util.format()`][] for more +information. ### console.time(label) @@ -115,11 +118,8 @@ timer's name as the parameter. ### console.timeEnd(label) -Stops a timer that was previously started by calling -[`console.time()`][] and prints the result to the -console. - -Example: +Stops a timer that was previously started by calling [`console.time()`][] and +prints the result to the console: console.time('100-elements'); for (var i = 0; i < 100; i++) { From cc0710b7537415d7d82a3b69a2d1cb8ec7c6ed1f Mon Sep 17 00:00:00 2001 From: janriemer Date: Thu, 10 Dec 2015 10:12:15 +0100 Subject: [PATCH 076/262] doc: move description of 'equals' method to right place the description of buffer.equals(otherBuffer) was at the wrong place; move it underneath the method signature PR-URL: https://github.com/nodejs/node/pull/4227 Reviewed-By: Brian White Reviewed-By: James M Snell --- doc/api/buffer.markdown | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 5f52acd85c83fe..618ec7bdd75d8c 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -208,9 +208,6 @@ Example: copy an ASCII string into a buffer, one byte at a time: // Node.js -Returns a boolean indicating whether `this` and `otherBuffer` have the same -bytes. - ### buf.compare(otherBuffer) * `otherBuffer` {Buffer} @@ -267,6 +264,8 @@ region in the same buffer * `otherBuffer` {Buffer} +Returns a boolean indicating whether `this` and `otherBuffer` have the same bytes. + ### buf.fill(value[, offset][, end]) * `value` From d8f82ce5f26848d7e44e7edb8a4697318ae8c88f Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Fri, 11 Dec 2015 13:45:12 +0000 Subject: [PATCH 077/262] doc: Fixing broken links to the v8 wiki PR-URL: https://github.com/nodejs/node/pull/4241 Reviewed-By: Evan Lucas Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung --- doc/api/debugger.markdown | 2 +- doc/api/errors.markdown | 2 +- lib/_debugger.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/debugger.markdown b/doc/api/debugger.markdown index 224f53eb45e2ba..46c4d0dfd12617 100644 --- a/doc/api/debugger.markdown +++ b/doc/api/debugger.markdown @@ -168,4 +168,4 @@ debugger. The syntax is: * `node debug -p ` - Connects to the process via the `pid` * `node debug ` - Connects to the process via the URI such as localhost:5858 -[TCP protocol]: http://code.google.com/p/v8/wiki/DebuggerProtocol +[TCP protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index 799a8141af43e1..fa5b8e7cf1a32d 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -486,5 +486,5 @@ often a sign that a connected socket was not `.end()`'d appropriately. [online]: http://man7.org/linux/man-pages/man3/errno.3.html [stream-based]: stream.html [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html -[V8's stack trace API]: https://code.google.com/p/v8-wiki/wiki/JavaScriptStackTraceApi +[V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API [vm]: vm.html diff --git a/lib/_debugger.js b/lib/_debugger.js index cbf7f7a5ed5397..dd47cbff285149 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -45,7 +45,7 @@ exports.port = 5858; // // Parser/Serializer for V8 debugger protocol -// http://code.google.com/p/v8/wiki/DebuggerProtocol +// https://github.com/v8/v8/wiki/Debugging-Protocol // // Usage: // p = new Protocol(); From 8256457f66c5935d2202f25cce9dc61e1dcea4e3 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 11 Dec 2015 17:45:53 -0500 Subject: [PATCH 078/262] test: parallelize test-repl-persistent-history Refs: https://github.com/nodejs/node/pull/2224#issuecomment-127356413 PR-URL: https://github.com/nodejs/node/pull/4247 Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/{sequential => parallel}/test-repl-persistent-history.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{sequential => parallel}/test-repl-persistent-history.js (100%) diff --git a/test/sequential/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js similarity index 100% rename from test/sequential/test-repl-persistent-history.js rename to test/parallel/test-repl-persistent-history.js From 387707931f6c125d55183ac4062f5d7db4ace744 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Thu, 10 Dec 2015 15:03:59 -0500 Subject: [PATCH 079/262] test: use regular timeout times for ARMv8 ARMv8 machines are typically quite fast and likely may not need extended timeout times. PR-URL: https://github.com/nodejs/node/pull/4248 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Rod Vagg Reviewed-By: Colin Ihrig --- test/common.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/common.js b/test/common.js index 3f940789d796b6..adf4247706f4cb 100644 --- a/test/common.js +++ b/test/common.js @@ -243,10 +243,15 @@ exports.platformTimeout = function(ms) { if (process.arch !== 'arm') return ms; - if (process.config.variables.arm_version === '6') + const armv = process.config.variables.arm_version; + + if (armv === '6') return 7 * ms; // ARMv6 - return 2 * ms; // ARMv7 and up. + if (armv === '7') + return 2 * ms; // ARMv7 + + return ms; // ARMv8+ }; var knownGlobals = [setTimeout, From a1bd3455fce037fad5dfd26145d30b527856c86f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 11 Dec 2015 14:57:45 -0500 Subject: [PATCH 080/262] src: fix line numbers on core errors In dfee4e3712ac4673b5fc472a8f77ac65bdc65f87, the module wrapper and line offset used when wrapping module code was changed to better report errors on the first line of modules. However, that commit did not update the runInThisContext() call used to execute the core modules, so their error line numbers have been off by one. This commit provides the correct lineOffset for core modules. Refs: https://github.com/nodejs/node/pull/2867 PR-URL: https://github.com/nodejs/node/pull/4254 Reviewed-By: Brian White Reviewed-By: James M Snell Reviewed-By: Minwoo Jung Reviewed-By: Ben Noordhuis --- src/node.js | 5 ++++- test/message/core_line_numbers.js | 11 +++++++++++ test/message/core_line_numbers.out | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test/message/core_line_numbers.js create mode 100644 test/message/core_line_numbers.out diff --git a/src/node.js b/src/node.js index 736559eaed011b..a9a85809096a6e 100644 --- a/src/node.js +++ b/src/node.js @@ -950,7 +950,10 @@ var source = NativeModule.getSource(this.id); source = NativeModule.wrap(source); - var fn = runInThisContext(source, { filename: this.filename }); + var fn = runInThisContext(source, { + filename: this.filename, + lineOffset: -1 + }); fn(this.exports, NativeModule.require, this, this.filename); this.loaded = true; diff --git a/test/message/core_line_numbers.js b/test/message/core_line_numbers.js new file mode 100644 index 00000000000000..ab86eb1e38f7f4 --- /dev/null +++ b/test/message/core_line_numbers.js @@ -0,0 +1,11 @@ +'use strict'; +const common = require('../common'); +const punycode = require('punycode'); + +// This test verifies that line numbers in core modules are reported correctly. +// The punycode module was chosen for testing because it changes infrequently. +// If this test begins failing, it is likely due to a punycode update, and the +// test's assertions simply need to be updated to reflect the changes. If a +// punycode update was not made, and this test begins failing, then line numbers +// are probably actually broken. +punycode.decode('x'); diff --git a/test/message/core_line_numbers.out b/test/message/core_line_numbers.out new file mode 100644 index 00000000000000..c4909774a0e6ec --- /dev/null +++ b/test/message/core_line_numbers.out @@ -0,0 +1,15 @@ +punycode.js:67 + throw new RangeError(errors[type]); + ^ + +RangeError: Invalid input + at error (punycode.js:67:*) + at Object.decode (punycode.js:*:*) + at Object. (*test*message*core_line_numbers.js:*:*) + at Module._compile (module.js:*:*) + at Object.Module._extensions..js (module.js:*:*) + at Module.load (module.js:*:*) + at Function.Module._load (module.js:*:*) + at Function.Module.runMain (module.js:*:*) + at startup (node.js:*:*) + at node.js:*:* From 032a8f0438043500e35efcc6925749451c953b44 Mon Sep 17 00:00:00 2001 From: Hideki Yamamura Date: Sun, 13 Dec 2015 13:25:44 +0900 Subject: [PATCH 081/262] doc: fix improper http.get sample code Refs: https://github.com/nodejs/node-v0.x-archive/pull/25471 Refs: https://github.com/nodejs/node-v0.x-archive/issues/8443 PR-URL: https://github.com/nodejs/node/pull/4263 Reviewed-By: Rod Vagg Reviewed-By: Myles Borins Reviewed-By: James M Snell --- doc/api/http.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 091f738be6b2fa..518dae063c52b8 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -966,6 +966,8 @@ Example: http.get("http://www.google.com/index.html", function(res) { console.log("Got response: " + res.statusCode); + // consume response body + res.resume(); }).on('error', function(e) { console.log("Got error: " + e.message); }); From e5e23b1f1e444c5a5c73c427555ad079a8e02c76 Mon Sep 17 00:00:00 2001 From: Yazhong Liu Date: Sun, 13 Dec 2015 23:37:27 +0800 Subject: [PATCH 082/262] node: remove unused variables in AppendExceptionLine PR-URL: https://github.com/nodejs/node/pull/4264 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- src/node.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index 1e38c811cdebfc..65afc8c1fe02f2 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1481,8 +1481,6 @@ void AppendExceptionLine(Environment* env, arrow[off + 1] = '\0'; Local arrow_str = String::NewFromUtf8(env->isolate(), arrow); - Local msg; - Local stack; // Allocation failed, just print it out if (arrow_str.IsEmpty() || err_obj.IsEmpty() || !err_obj->IsNativeError()) From d1679fd10bb5184e377ed3c722c60d0184a67218 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 14 Dec 2015 00:58:37 -0500 Subject: [PATCH 083/262] tls_wrap: inherit from the `AsyncWrap` first `WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: https://github.com/nodejs/node/issues/4250 PR-URL: https://github.com/nodejs/node/pull/4268 Reviewed-By: James M Snell --- src/tls_wrap.cc | 6 +++--- src/tls_wrap.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 7d83c79894b877..1dca69f07a341c 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -36,11 +36,11 @@ TLSWrap::TLSWrap(Environment* env, Kind kind, StreamBase* stream, SecureContext* sc) - : SSLWrap(env, sc, kind), - StreamBase(env), - AsyncWrap(env, + : AsyncWrap(env, env->tls_wrap_constructor_function()->NewInstance(), AsyncWrap::PROVIDER_TLSWRAP), + SSLWrap(env, sc, kind), + StreamBase(env), sc_(sc), stream_(stream), enc_in_(nullptr), diff --git a/src/tls_wrap.h b/src/tls_wrap.h index 47cbf27fe288e5..31d19523a62d08 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -21,9 +21,9 @@ namespace crypto { class SecureContext; } -class TLSWrap : public crypto::SSLWrap, - public StreamBase, - public AsyncWrap { +class TLSWrap : public AsyncWrap, + public crypto::SSLWrap, + public StreamBase { public: ~TLSWrap() override; From b88d1dd938c7ffa9a10a8febf132afbeedc43e67 Mon Sep 17 00:00:00 2001 From: Martin von Gagern Date: Mon, 14 Dec 2015 10:50:37 +0100 Subject: [PATCH 084/262] src: fix deprecation message for ErrnoException Fix copy paste error in deprecation message PR-URL: https://github.com/nodejs/node/pull/4269 Reviewed-By: Colin Ihrig Reviewed-By: Fedor Indutny Reviewed-By: Rod Vagg --- src/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.h b/src/node.h index b5941ff06b27bd..ef1f629d20aa0e 100644 --- a/src/node.h +++ b/src/node.h @@ -96,7 +96,7 @@ NODE_EXTERN v8::Local UVException(v8::Isolate* isolate, const char* path, const char* dest); -NODE_DEPRECATED("Use UVException(isolate, ...)", +NODE_DEPRECATED("Use ErrnoException(isolate, ...)", inline v8::Local ErrnoException( int errorno, const char* syscall = NULL, From dd9c529220d9d5a8e4cf0ac8ce1e113c1c634103 Mon Sep 17 00:00:00 2001 From: Lenny Markus Date: Mon, 14 Dec 2015 10:25:10 -0800 Subject: [PATCH 085/262] doc: clarify error events in HTTP module documentation Make it clear that error with throw if error listener is not registered. PR-URL: https://github.com/nodejs/node/pull/4275 Reviewed-By: Brian White Reviewed-By: James M Snell --- doc/api/http.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 518dae063c52b8..fb2cbae8914ee6 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -1063,7 +1063,8 @@ even if there is no data being written to the request body. If any error is encountered during the request (be that with DNS resolution, TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted -on the returned request object. +on the returned request object. As with all `'error'` events, if no listeners +are registered the error will be thrown. There are a few special headers that should be noted. From 01da04e4f689c8116bfa7513028e7229479223a8 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 14 Dec 2015 15:20:25 -0800 Subject: [PATCH 086/262] doc: fix, modernize examples in docs * Use single quotes consistently * Modernize examples to use template strings and arrow funcs * Fix a few typos * Example edits for consistency PR-URL: https://github.com/nodejs/node/pull/4282 Reviewed-By: Chris Dickinson Reviewed-By: Colin Ihrig --- doc/api/addons.markdown | 18 ++--- doc/api/assert.markdown | 14 ++-- doc/api/buffer.markdown | 12 +-- doc/api/child_process.markdown | 132 ++++++++++++++++---------------- doc/api/cluster.markdown | 95 +++++++++++------------ doc/api/console.markdown | 10 +-- doc/api/crypto.markdown | 44 +++++------ doc/api/debugger.markdown | 14 ++-- doc/api/dgram.markdown | 34 ++++---- doc/api/dns.markdown | 70 ++++++++--------- doc/api/domain.markdown | 56 +++++++------- doc/api/errors.markdown | 24 +++--- doc/api/events.markdown | 10 +-- doc/api/fs.markdown | 42 +++++----- doc/api/http.markdown | 74 +++++++++--------- doc/api/https.markdown | 48 ++++++------ doc/api/modules.markdown | 33 ++++---- doc/api/net.markdown | 45 ++++++----- doc/api/process.markdown | 104 ++++++++++++------------- doc/api/readline.markdown | 42 +++++----- doc/api/repl.markdown | 26 +++---- doc/api/stream.markdown | 88 ++++++++++----------- doc/api/string_decoder.markdown | 8 +- doc/api/synopsis.markdown | 4 +- doc/api/tls.markdown | 52 ++++++------- doc/api/tty.markdown | 4 +- doc/api/util.markdown | 50 ++++++------ doc/api/v8.markdown | 2 +- doc/api/vm.markdown | 40 +++++----- doc/api/zlib.markdown | 32 ++++---- 30 files changed, 613 insertions(+), 614 deletions(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 2eeb73194e5410..c97129d4398660 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -99,7 +99,7 @@ You can now use the binary addon in a Node.js project `hello.js` by pointing `require` to the recently built `hello.node` module: // hello.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); console.log(addon.hello()); // 'world' @@ -189,7 +189,7 @@ function calls and return a result. This is the main and only needed source You can test it with the following JavaScript snippet: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); console.log( 'This should be eight:', addon.add(3,5) ); @@ -237,7 +237,7 @@ adding the function as a property of `exports`. To test it, run the following JavaScript snippet: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); addon(function(msg){ console.log(msg); // 'hello world' @@ -282,7 +282,7 @@ the string passed to `createObject()`: To test it in JavaScript: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); var obj1 = addon('hello'); var obj2 = addon('world'); @@ -336,7 +336,7 @@ wraps a C++ function: To test: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); var fn = addon(); console.log(fn()); // 'hello world' @@ -470,7 +470,7 @@ prototype: Test it with: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); var obj = new addon.MyObject(10); console.log( obj.plusOne() ); // 11 @@ -630,7 +630,7 @@ The implementation is similar to the above in `myobject.cc`: Test it with: // test.js - var createObject = require('./build/Release/addon'); + const createObject = require('./build/Release/addon'); var obj = createObject(10); console.log( obj.plusOne() ); // 11 @@ -792,7 +792,7 @@ The implementation of `myobject.cc` is similar to before: Test it with: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); var obj1 = addon.createObject(10); var obj2 = addon.createObject(20); @@ -866,7 +866,7 @@ The file `addon.cc` implements AtExit below: Test in JavaScript by running: // test.js - var addon = require('./build/Release/addon'); + const addon = require('./build/Release/addon'); [online]: https://v8docs.nodesource.com/ [libuv]: https://github.com/libuv/libuv diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index a3fb229161b31e..eb334696805298 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -41,7 +41,7 @@ assertion. assert.doesNotThrow( function() { - throw new TypeError("Wrong value"); + throw new TypeError('Wrong value'); }, SyntaxError ); @@ -51,7 +51,7 @@ is thrown instead. assert.doesNotThrow( function() { - throw new TypeError("Wrong value"); + throw new TypeError('Wrong value'); }, TypeError ); @@ -102,7 +102,7 @@ Validate instanceof using constructor: assert.throws( function() { - throw new Error("Wrong value"); + throw new Error('Wrong value'); }, Error ); @@ -111,7 +111,7 @@ Validate error message using [`RegExp`][]: assert.throws( function() { - throw new Error("Wrong value"); + throw new Error('Wrong value'); }, /value/ ); @@ -120,14 +120,14 @@ Custom error validation: assert.throws( function() { - throw new Error("Wrong value"); + throw new Error('Wrong value'); }, function(err) { if ( (err instanceof Error) && /value/.test(err) ) { return true; } }, - "unexpected error" + 'unexpected error' ); [`assert.deepEqual`]: #assert_assert_deepequal_actual_expected_message @@ -135,4 +135,4 @@ Custom error validation: [`assert.throws()`]: #assert_assert_throws_block_error_message [`Error`]: errors.html#errors_class_error [`RegExp`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions -[`TypeError`]: errors.html#errors_class_typeerror \ No newline at end of file +[`TypeError`]: errors.html#errors_class_typeerror diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 618ec7bdd75d8c..afef2fc4978992 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -104,8 +104,8 @@ Example: str = '\u00bd + \u00bc = \u00be'; - console.log(str + ": " + str.length + " characters, " + - Buffer.byteLength(str, 'utf8') + " bytes"); + console.log(`${str}: ${str.length} characters, ` + + `${Buffer.byteLength(str, 'utf8')} bytes`); // ½ + ¼ = ¾: 9 characters, 12 bytes @@ -277,7 +277,7 @@ and `end` (defaults to `buffer.length`) are not given it will fill the entire buffer. var b = new Buffer(50); - b.fill("h"); + b.fill('h'); ### buf.indexOf(value[, byteOffset]) @@ -301,7 +301,7 @@ buffer object. It does not change when the contents of the buffer are changed. buf = new Buffer(1234); console.log(buf.length); - buf.write("some string", 0, "ascii"); + buf.write('some string', 0, 'ascii'); console.log(buf.length); // 1234 @@ -313,7 +313,7 @@ modify the length of a buffer should therefore treat `length` as read-only and use [`buf.slice`][] to create a new buffer. buf = new Buffer(10); - buf.write("abcdefghj", 0, "ascii"); + buf.write('abcdefghj', 0, 'ascii'); console.log(buf.length); // 10 buf = buf.slice(0,5); console.log(buf.length); // 5 @@ -639,7 +639,7 @@ The method will not write partial characters. buf = new Buffer(256); len = buf.write('\u00bd + \u00bc = \u00be', 0); - console.log(len + " bytes: " + buf.toString('utf8', 0, len)); + console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); ### buf.writeDoubleBE(value, offset[, noAssert]) ### buf.writeDoubleLE(value, offset[, noAssert]) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 1b32bb70f69c66..1ab53227fdc1ee 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -115,11 +115,12 @@ child process has any open IPC channels with the parent (i.e [`fork()`][]). Send a signal to the child process. If no argument is given, the process will be sent `'SIGTERM'`. See `signal(7)` for a list of available signals. - var spawn = require('child_process').spawn, - grep = spawn('grep', ['ssh']); + const spawn = require('child_process').spawn; + const grep = spawn('grep', ['ssh']); - grep.on('close', function (code, signal) { - console.log('child process terminated due to receipt of signal ' + signal); + grep.on('close', (code, signal) => { + console.log( + `child process terminated due to receipt of signal ${signal}`); }); // send SIGHUP to process @@ -145,10 +146,10 @@ The process identifier (PID) of the child process. Example: - var spawn = require('child_process').spawn, - grep = spawn('grep', ['ssh']); + const spawn = require('child_process').spawn; + const grep = spawn('grep', ['ssh']); - console.log('Spawned child pid: ' + grep.pid); + console.log(`Spawned child pid: ${grep.pid}`); grep.stdin.end(); ### child.send(message[, sendHandle][, callback]) @@ -164,11 +165,10 @@ a `'message'` event on the child. For example: - var cp = require('child_process'); + const cp = require('child_process'); + const n = cp.fork(`${__dirname}/sub.js`); - var n = cp.fork(__dirname + '/sub.js'); - - n.on('message', function(m) { + n.on('message', (m) => { console.log('PARENT got message:', m); }); @@ -176,7 +176,7 @@ For example: And then the child script, `'sub.js'` might look like this: - process.on('message', function(m) { + process.on('message', (m) => { console.log('CHILD got message:', m); }); @@ -210,22 +210,22 @@ Use the callback mechanism to implement flow control. Here is an example of sending a server: - var child = require('child_process').fork('child.js'); + const child = require('child_process').fork('child.js'); // Open up the server object and send the handle. - var server = require('net').createServer(); - server.on('connection', function (socket) { + const server = require('net').createServer(); + server.on('connection', (socket) => { socket.end('handled by parent'); }); - server.listen(1337, function() { + server.listen(1337, () => { child.send('server', server); }); And the child would then receive the server object as: - process.on('message', function(m, server) { + process.on('message', (m, server) => { if (m === 'server') { - server.on('connection', function (socket) { + server.on('connection', (socket) => { socket.end('handled by child'); }); } @@ -245,12 +245,12 @@ connections with the remote address `74.125.127.100` as VIP by sending the socket to a "special" child process. Other sockets will go to a "normal" process. - var normal = require('child_process').fork('child.js', ['normal']); - var special = require('child_process').fork('child.js', ['special']); + const normal = require('child_process').fork('child.js', ['normal']); + const special = require('child_process').fork('child.js', ['special']); // Open up the server and send sockets to child - var server = require('net').createServer(); - server.on('connection', function (socket) { + const server = require('net').createServer(); + server.on('connection', (socket) => { // if this is a VIP if (socket.remoteAddress === '74.125.127.100') { @@ -264,9 +264,9 @@ process. The `child.js` could look like this: - process.on('message', function(m, socket) { + process.on('message', (m, socket) => { if (m === 'socket') { - socket.end('You were handled as a ' + process.argv[2] + ' person'); + socket.end(`You were handled as a ${process.argv[2]} person`); } }); @@ -314,11 +314,11 @@ In the following example, only the child's fd `1` is setup as a pipe, so only the parent's `child.stdio[1]` is a stream, all other values in the array are `null`. - var assert = require('assert'); - var fs = require('fs'); - var child_process = require('child_process'); + const assert = require('assert'); + const fs = require('fs'); + const child_process = require('child_process'); - child = child_process.spawn('ls', { + const child = child_process.spawn('ls', { stdio: [ 0, // use parents stdin for child 'pipe', // pipe child's stdout to parent @@ -377,15 +377,13 @@ callback or returning an EventEmitter). Runs a command in a shell and buffers the output. - var exec = require('child_process').exec, - child; - - child = exec('cat *.js bad_file | wc -l', - function (error, stdout, stderr) { - console.log('stdout: ' + stdout); - console.log('stderr: ' + stderr); + const exec = require('child_process').exec; + const child = exec('cat *.js bad_file | wc -l', + (error, stdout, stderr) => { + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); if (error !== null) { - console.log('exec error: ' + error); + console.log(`exec error: ${error}`); } }); @@ -507,64 +505,64 @@ process, the default is `process.env`. Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the exit code: - var spawn = require('child_process').spawn, - ls = spawn('ls', ['-lh', '/usr']); + const spawn = require('child_process').spawn; + const ls = spawn('ls', ['-lh', '/usr']); - ls.stdout.on('data', function (data) { - console.log('stdout: ' + data); + ls.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); }); - ls.stderr.on('data', function (data) { - console.log('stderr: ' + data); + ls.stderr.on('data', (data) => { + console.log(`stderr: ${data}`); }); - ls.on('close', function (code) { - console.log('child process exited with code ' + code); + ls.on('close', (code) => { + console.log(`child process exited with code ${code}`); }); Example: A very elaborate way to run 'ps ax | grep ssh' - var spawn = require('child_process').spawn, - ps = spawn('ps', ['ax']), - grep = spawn('grep', ['ssh']); + const spawn = require('child_process').spawn; + const ps = spawn('ps', ['ax']); + const grep = spawn('grep', ['ssh']); - ps.stdout.on('data', function (data) { + ps.stdout.on('data', (data) => { grep.stdin.write(data); }); - ps.stderr.on('data', function (data) { - console.log('ps stderr: ' + data); + ps.stderr.on('data', (data) => { + console.log(`ps stderr: ${data}`); }); - ps.on('close', function (code) { + ps.on('close', (code) => { if (code !== 0) { - console.log('ps process exited with code ' + code); + console.log(`ps process exited with code ${code}`); } grep.stdin.end(); }); - grep.stdout.on('data', function (data) { - console.log('' + data); + grep.stdout.on('data', (data) => { + console.log(`${data}`); }); - grep.stderr.on('data', function (data) { - console.log('grep stderr: ' + data); + grep.stderr.on('data', (data) => { + console.log(`grep stderr: ${data}`); }); - grep.on('close', function (code) { + grep.on('close', (code) => { if (code !== 0) { - console.log('grep process exited with code ' + code); + console.log(`grep process exited with code ${code}`); } }); Example of checking for failed exec: - var spawn = require('child_process').spawn, - child = spawn('bad_command'); + const spawn = require('child_process').spawn; + const child = spawn('bad_command'); - child.on('error', function (err) { + child.on('error', (err) => { console.log('Failed to start child process.'); }); @@ -586,12 +584,12 @@ and the parent's event loop will not include the child in its reference count. Example of detaching a long-running process and redirecting its output to a file: - var fs = require('fs'), - spawn = require('child_process').spawn, - out = fs.openSync('./out.log', 'a'), - err = fs.openSync('./out.log', 'a'); + const fs = require('fs'); + const spawn = require('child_process').spawn; + const out = fs.openSync('./out.log', 'a'); + const err = fs.openSync('./out.log', 'a'); - var child = spawn('prg', [], { + const child = spawn('prg', [], { detached: true, stdio: [ 'ignore', out, err ] }); @@ -645,7 +643,7 @@ index corresponds to a fd in the child. The value is one of the following: Example: - var spawn = require('child_process').spawn; + const spawn = require('child_process').spawn; // Child will use parent's stdios spawn('prg', [], { stdio: 'inherit' }); diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index d300b274a1627e..b29c13694b00fd 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -9,9 +9,9 @@ processes to handle the load. The cluster module allows you to easily create child processes that all share server ports. - var cluster = require('cluster'); - var http = require('http'); - var numCPUs = require('os').cpus().length; + const cluster = require('cluster'); + const http = require('http'); + const numCPUs = require('os').cpus().length; if (cluster.isMaster) { // Fork workers. @@ -19,15 +19,15 @@ all share server ports. cluster.fork(); } - cluster.on('exit', function(worker, code, signal) { - console.log('worker ' + worker.process.pid + ' died'); + cluster.on('exit', (worker, code, signal) => { + console.log(`worker ${worker.process.pid} died`); }); } else { // Workers can share any TCP connection // In this case it is an HTTP server - http.createServer(function(req, res) { + http.createServer((req, res) => { res.writeHead(200); - res.end("hello world\n"); + res.end('hello world\n'); }).listen(8000); } @@ -113,7 +113,7 @@ it can be obtained using `cluster.worker`. Similar to the `cluster.on('disconnect')` event, but specific to this worker. - cluster.fork().on('disconnect', function() { + cluster.fork().on('disconnect', () => { // Worker has disconnected }); @@ -131,14 +131,14 @@ In a worker you can also use `process.on('error')`. Similar to the `cluster.on('exit')` event, but specific to this worker. - var worker = cluster.fork(); - worker.on('exit', function(code, signal) { + const worker = cluster.fork(); + worker.on('exit', (code, signal) => { if( signal ) { - console.log("worker was killed by signal: "+signal); + console.log(`worker was killed by signal: ${signal}`); } else if( code !== 0 ) { - console.log("worker exited with error code: "+code); + console.log(`worker exited with error code: ${code}`); } else { - console.log("worker success!"); + console.log('worker success!'); } }); @@ -148,7 +148,7 @@ Similar to the `cluster.on('exit')` event, but specific to this worker. Similar to the `cluster.on('listening')` event, but specific to this worker. - cluster.fork().on('listening', function(address) { + cluster.fork().on('listening', (address) => { // Worker is listening }); @@ -167,15 +167,15 @@ In a worker you can also use `process.on('message')`. As an example, here is a cluster that keeps count of the number of requests in the master process using the message system: - var cluster = require('cluster'); - var http = require('http'); + const cluster = require('cluster'); + const http = require('http'); if (cluster.isMaster) { // Keep track of http requests var numReqs = 0; - setInterval(function() { - console.log("numReqs =", numReqs); + setInterval(() => { + console.log('numReqs =', numReqs); }, 1000); // Count requests @@ -186,21 +186,21 @@ in the master process using the message system: } // Start workers and listen for messages containing notifyRequest - var numCPUs = require('os').cpus().length; + const numCPUs = require('os').cpus().length; for (var i = 0; i < numCPUs; i++) { cluster.fork(); } - Object.keys(cluster.workers).forEach(function(id) { + Object.keys(cluster.workers).forEach((id) => { cluster.workers[id].on('message', messageHandler); }); } else { // Worker processes have a http server. - http.Server(function(req, res) { + http.Server((req, res) => { res.writeHead(200); - res.end("hello world\n"); + res.end('hello world\n'); // notify master about the request process.send({ cmd: 'notifyRequest' }); @@ -211,7 +211,7 @@ in the master process using the message system: Similar to the `cluster.on('online')` event, but specific to this worker. - cluster.fork().on('online', function() { + cluster.fork().on('online', () => { // Worker is online }); @@ -249,27 +249,27 @@ the `'disconnect'` event has not been emitted after some time. var worker = cluster.fork(); var timeout; - worker.on('listening', function(address) { + worker.on('listening', (address) => { worker.send('shutdown'); worker.disconnect(); - timeout = setTimeout(function() { + timeout = setTimeout(() => { worker.kill(); }, 2000); }); - worker.on('disconnect', function() { + worker.on('disconnect', () => { clearTimeout(timeout); }); } else if (cluster.isWorker) { - var net = require('net'); - var server = net.createServer(function(socket) { + const net = require('net'); + var server = net.createServer((socket) => { // connections never end }); server.listen(8000); - process.on('message', function(msg) { + process.on('message', (msg) => { if(msg === 'shutdown') { // initiate graceful close of any connections to server } @@ -349,7 +349,7 @@ This example will echo back all messages from the master: worker.send('hi there'); } else if (cluster.isWorker) { - process.on('message', function(msg) { + process.on('message', (msg) => { process.send(msg); }); } @@ -363,7 +363,7 @@ Set by calling `.kill()` or `.disconnect()`, until then it is `undefined`. The boolean `worker.suicide` lets you distinguish between voluntary and accidental exit, the master may choose not to respawn a worker based on this value. - cluster.on('exit', function(worker, code, signal) { + cluster.on('exit', (worker, code, signal) => { if (worker.suicide === true) { console.log('Oh, it was just suicide\' – no need to worry'). } @@ -384,8 +384,8 @@ There may be a delay between the `'disconnect'` and `'exit'` events. These even can be used to detect if the process is stuck in a cleanup or if there are long-living connections. - cluster.on('disconnect', function(worker) { - console.log('The worker #' + worker.id + ' has disconnected'); + cluster.on('disconnect', (worker) => { + console.log(`The worker #${worker.id} has disconnected`); }); ## Event: 'exit' @@ -399,7 +399,7 @@ When any of the workers die the cluster module will emit the `'exit'` event. This can be used to restart the worker by calling `.fork()` again. - cluster.on('exit', function(worker, code, signal) { + cluster.on('exit', (worker, code, signal) => { console.log('worker %d died (%s). restarting...', worker.process.pid, signal || code); cluster.fork(); @@ -416,16 +416,16 @@ This can be used to log worker activity, and create your own timeout. var timeouts = []; function errorMsg() { - console.error("Something must be wrong with the connection ..."); + console.error('Something must be wrong with the connection ...'); } - cluster.on('fork', function(worker) { + cluster.on('fork', (worker) => { timeouts[worker.id] = setTimeout(errorMsg, 2000); }); - cluster.on('listening', function(worker, address) { + cluster.on('listening', (worker, address) => { clearTimeout(timeouts[worker.id]); }); - cluster.on('exit', function(worker, code, signal) { + cluster.on('exit', (worker, code, signal) => { clearTimeout(timeouts[worker.id]); errorMsg(); }); @@ -443,8 +443,9 @@ object and the `address` object contains the following connection properties: `address`, `port` and `addressType`. This is very useful if the worker is listening on more than one address. - cluster.on('listening', function(worker, address) { - console.log("A worker is now connected to " + address.address + ":" + address.port); + cluster.on('listening', (worker, address) => { + console.log( + `A worker is now connected to ${address.address}:${address.port}`); }); The `addressType` is one of: @@ -472,8 +473,8 @@ When the master receives an online message it will emit this event. The difference between `'fork'` and `'online'` is that fork is emitted when the master forks a worker, and 'online' is emitted when the worker is running. - cluster.on('online', function(worker) { - console.log("Yay, the worker responded after it was forked"); + cluster.on('online', (worker) => { + console.log('Yay, the worker responded after it was forked'); }); ## Event: 'setup' @@ -584,7 +585,7 @@ Note that: Example: - var cluster = require('cluster'); + const cluster = require('cluster'); cluster.setupMaster({ exec: 'worker.js', args: ['--use', 'https'], @@ -604,14 +605,14 @@ This can only be called from the master process. A reference to the current worker object. Not available in the master process. - var cluster = require('cluster'); + const cluster = require('cluster'); if (cluster.isMaster) { console.log('I am master'); cluster.fork(); cluster.fork(); } else if (cluster.isWorker) { - console.log('I am worker #' + cluster.worker.id); + console.log(`I am worker #${cluster.worker.id}`); } ## cluster.workers @@ -633,14 +634,14 @@ before last `'disconnect'` or `'exit'` event is emitted. callback(cluster.workers[id]); } } - eachWorker(function(worker) { + eachWorker((worker) => { worker.send('big announcement to all workers'); }); Should you wish to reference a worker over a communication channel, using the worker's unique id is the easiest way to find the worker. - socket.on('data', function(id) { + socket.on('data', (id) => { var worker = cluster.workers[id]; }); diff --git a/doc/api/console.markdown b/doc/api/console.markdown index 169ed21840c28d..85df0ab98fa57e 100644 --- a/doc/api/console.markdown +++ b/doc/api/console.markdown @@ -16,8 +16,8 @@ directly without `require`. Use `require('console').Console` or `console.Console` to access this class. - var Console = require('console').Console; - var Console = console.Console; + const Console = require('console').Console; + const Console = console.Console; You can use the `Console` class to create a simple logger like `console` but with different output streams. @@ -29,10 +29,10 @@ Create a new `Console` by passing one or two writable stream instances. is used for warning or error output. If `stderr` isn't passed, the warning and error output will be sent to the `stdout`. - var output = fs.createWriteStream('./stdout.log'); - var errorOutput = fs.createWriteStream('./stderr.log'); + const output = fs.createWriteStream('./stdout.log'); + const errorOutput = fs.createWriteStream('./stderr.log'); // custom simple logger - var logger = new Console(output, errorOutput); + const logger = new Console(output, errorOutput); // use it like console var count = 5; logger.log('count: %d', count); diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 5e733efab7428c..773d05e9f1749c 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -264,15 +264,15 @@ expected. Example (obtaining a shared secret): - var crypto = require('crypto'); - var alice = crypto.createECDH('secp256k1'); - var bob = crypto.createECDH('secp256k1'); + const crypto = require('crypto'); + const alice = crypto.createECDH('secp256k1'); + const bob = crypto.createECDH('secp256k1'); alice.generateKeys(); bob.generateKeys(); - var alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - var bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + const alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + const bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); /* alice_secret and bob_secret should be the same */ console.log(alice_secret == bob_secret); @@ -518,20 +518,20 @@ algorithms. Example: this program that takes the sha256 sum of a file - var filename = process.argv[2]; - var crypto = require('crypto'); - var fs = require('fs'); + const filename = process.argv[2]; + const crypto = require('crypto'); + const fs = require('fs'); - var shasum = crypto.createHash('sha256'); + const shasum = crypto.createHash('sha256'); - var s = fs.ReadStream(filename); - s.on('data', function(d) { + const s = fs.ReadStream(filename); + s.on('data', (d) => { shasum.update(d); }); - s.on('end', function() { + s.on('end', () => { var d = shasum.digest('hex'); - console.log(d + ' ' + filename); + console.log(`${d} ${filename}`); }); ## crypto.createHmac(algorithm, key) @@ -564,7 +564,7 @@ Returns an array with the names of the supported ciphers. Example: - var ciphers = crypto.getCiphers(); + const ciphers = crypto.getCiphers(); console.log(ciphers); // ['aes-128-cbc', 'aes-128-ccm', ...] ## crypto.getCurves() @@ -573,7 +573,7 @@ Returns an array with the names of the supported elliptic curves. Example: - var curves = crypto.getCurves(); + const curves = crypto.getCurves(); console.log(curves); // ['secp256k1', 'secp384r1', ...] ## crypto.getDiffieHellman(group_name) @@ -591,15 +591,15 @@ and communication time. Example (obtaining a shared secret): - var crypto = require('crypto'); - var alice = crypto.getDiffieHellman('modp14'); - var bob = crypto.getDiffieHellman('modp14'); + const crypto = require('crypto'); + const alice = crypto.getDiffieHellman('modp14'); + const bob = crypto.getDiffieHellman('modp14'); alice.generateKeys(); bob.generateKeys(); - var alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - var bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + const alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + const bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); /* alice_secret and bob_secret should be the same */ console.log(alice_secret == bob_secret); @@ -610,7 +610,7 @@ Returns an array with the names of the supported hash algorithms. Example: - var hashes = crypto.getHashes(); + const hashes = crypto.getHashes(); console.log(hashes); // ['sha', 'sha1', 'sha1WithRSAEncryption', ...] ## crypto.pbkdf2(password, salt, iterations, keylen[, digest], callback) @@ -694,7 +694,7 @@ NOTE: All paddings are defined in `constants` module. Generates cryptographically strong pseudo-random data. Usage: // async - crypto.randomBytes(256, function(ex, buf) { + crypto.randomBytes(256, (ex, buf) => { if (ex) throw ex; console.log('Have %d bytes of random data: %s', buf.length, buf); }); diff --git a/doc/api/debugger.markdown b/doc/api/debugger.markdown index 46c4d0dfd12617..256fcf57dd8a23 100644 --- a/doc/api/debugger.markdown +++ b/doc/api/debugger.markdown @@ -27,9 +27,9 @@ For example, suppose `myscript.js` looked like this: x = 5; setTimeout(function () { debugger; - console.log("world"); + console.log('world'); }, 1000); - console.log("hello"); + console.log('hello'); Then once the debugger is run, it will break on line 4. @@ -46,15 +46,15 @@ Then once the debugger is run, it will break on line 4. 1 x = 5; 2 setTimeout(function () { 3 debugger; - 4 console.log("world"); + 4 console.log('world'); 5 }, 1000); debug> next break in /home/indutny/Code/git/indutny/myscript.js:4 2 setTimeout(function () { 3 debugger; - 4 console.log("world"); + 4 console.log('world'); 5 }, 1000); - 6 console.log("hello"); + 6 console.log('hello'); debug> repl Press Ctrl + C to leave debug repl > x @@ -65,9 +65,9 @@ Then once the debugger is run, it will break on line 4. < world break in /home/indutny/Code/git/indutny/myscript.js:5 3 debugger; - 4 console.log("world"); + 4 console.log('world'); 5 }, 1000); - 6 console.log("hello"); + 6 console.log('hello'); 7 debug> quit % diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 71c59db3bf747c..996379a04283f3 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -9,14 +9,14 @@ Datagram sockets are available through `require('dgram')`. Important note: the behavior of [`dgram.Socket#bind()`][] has changed in v0.10 and is always asynchronous now. If you have code that looks like this: - var s = dgram.createSocket('udp4'); + const s = dgram.createSocket('udp4'); s.bind(1234); s.addMembership('224.0.0.114'); You have to change it to this: - var s = dgram.createSocket('udp4'); - s.bind(1234, function() { + const s = dgram.createSocket('udp4'); + s.bind(1234, () => { s.addMembership('224.0.0.114'); }); @@ -49,7 +49,7 @@ are created. Emitted when a new datagram is available on a socket. `msg` is a `Buffer` and `rinfo` is an object with the sender's address information: - socket.on('message', function(msg, rinfo) { + socket.on('message', (msg, rinfo) => { console.log('Received %d bytes from %s:%d\n', msg.length, rinfo.address, rinfo.port); }); @@ -92,24 +92,22 @@ binding a closed socket), an [`Error`][] may be thrown by this method. Example of a UDP server listening on port 41234: - var dgram = require("dgram"); + const dgram = require('dgram'); - var server = dgram.createSocket("udp4"); + const server = dgram.createSocket('udp4'); - server.on("error", function (err) { - console.log("server error:\n" + err.stack); + server.on('error', (err) => { + console.log(`server error:\n${err.stack}`); server.close(); }); - server.on("message", function (msg, rinfo) { - console.log("server got: " + msg + " from " + - rinfo.address + ":" + rinfo.port); + server.on('message', (msg, rinfo) => { + console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); }); - server.on("listening", function () { + server.on('listening', () => { var address = server.address(); - console.log("server listening " + - address.address + ":" + address.port); + console.log(`server listening ${address.address}:${address.port}`); }); server.bind(41234); @@ -189,10 +187,10 @@ be calculated with respect to [byte length][] and not the character position. Example of sending a UDP packet to a random port on `localhost`; - var dgram = require('dgram'); - var message = new Buffer("Some bytes"); - var client = dgram.createSocket("udp4"); - client.send(message, 0, message.length, 41234, "localhost", function(err) { + const dgram = require('dgram'); + const message = new Buffer('Some bytes'); + const client = dgram.createSocket('udp4'); + client.send(message, 0, message.length, 41234, 'localhost', (err) => { client.close(); }); diff --git a/doc/api/dns.markdown b/doc/api/dns.markdown index ef68b93b8afabf..1b01f0ee1cead7 100644 --- a/doc/api/dns.markdown +++ b/doc/api/dns.markdown @@ -8,13 +8,13 @@ This module contains functions that belong to two different categories: 1) Functions that use the underlying operating system facilities to perform name resolution, and that do not necessarily do any network communication. -This category contains only one function: [`dns.lookup()`][]. __Developers looking -to perform name resolution in the same way that other applications on the same -operating system behave should use [`dns.lookup()`][].__ +This category contains only one function: [`dns.lookup()`][]. __Developers +looking to perform name resolution in the same way that other applications on +the same operating system behave should use [`dns.lookup()`][].__ Here is an example that does a lookup of `www.google.com`. - var dns = require('dns'); + const dns = require('dns'); dns.lookup('www.google.com', function onLookup(err, addresses, family) { console.log('addresses:', addresses); @@ -22,30 +22,29 @@ Here is an example that does a lookup of `www.google.com`. 2) Functions that connect to an actual DNS server to perform name resolution, and that _always_ use the network to perform DNS queries. This category -contains all functions in the `dns` module but [`dns.lookup()`][]. These functions -do not use the same set of configuration files than what [`dns.lookup()`][] uses. -For instance, _they do not use the configuration from `/etc/hosts`_. These -functions should be used by developers who do not want to use the underlying -operating system's facilities for name resolution, and instead want to -_always_ perform DNS queries. +contains all functions in the `dns` module but [`dns.lookup()`][]. These +functions do not use the same set of configuration files than what +[`dns.lookup()`][] uses. For instance, _they do not use the configuration from +`/etc/hosts`_. These functions should be used by developers who do not want to +use the underlying operating system's facilities for name resolution, and +instead want to _always_ perform DNS queries. Here is an example which resolves `'www.google.com'` then reverse resolves the IP addresses which are returned. - var dns = require('dns'); + const dns = require('dns'); - dns.resolve4('www.google.com', function (err, addresses) { + dns.resolve4('www.google.com', (err, addresses) => { if (err) throw err; - console.log('addresses: ' + JSON.stringify(addresses)); + console.log(`addresses: ${JSON.stringify(addresses)}`); - addresses.forEach(function (a) { - dns.reverse(a, function (err, hostnames) { + addresses.forEach((a) => { + dns.reverse(a, (err, hostnames) => { if (err) { throw err; } - - console.log('reverse for ' + a + ': ' + JSON.stringify(hostnames)); + console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); }); }); }); @@ -164,16 +163,17 @@ records). `addresses` is an array of the canonical name records available for ## dns.resolveMx(hostname, callback) -The same as [`dns.resolve()`][], but only for mail exchange queries (`MX` records). +The same as [`dns.resolve()`][], but only for mail exchange queries +(`MX` records). `addresses` is an array of MX records, each with a priority and an exchange attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`). ## dns.resolveNs(hostname, callback) -The same as [`dns.resolve()`][], but only for name server records (`NS` records). -`addresses` is an array of the name server records available for `hostname` -(e.g., `['ns1.example.com', 'ns2.example.com']`). +The same as [`dns.resolve()`][], but only for name server records +(`NS` records). `addresses` is an array of the name server records available +for `hostname` (e.g., `['ns1.example.com', 'ns2.example.com']`). ## dns.resolveSoa(hostname, callback) @@ -271,20 +271,20 @@ on some operating systems (e.g FreeBSD 10.1). ## Implementation considerations -Although [`dns.lookup()`][] and `dns.resolve*()/dns.reverse()` functions have the same -goal of associating a network name with a network address (or vice versa), -their behavior is quite different. These differences can have subtle but +Although [`dns.lookup()`][] and `dns.resolve*()/dns.reverse()` functions have +the same goal of associating a network name with a network address (or vice +versa), their behavior is quite different. These differences can have subtle but significant consequences on the behavior of Node.js programs. ### dns.lookup -Under the hood, [`dns.lookup()`][] uses the same operating system facilities as most -other programs. For instance, [`dns.lookup()`][] will almost always resolve a given -name the same way as the `ping` command. On most POSIX-like operating systems, -the behavior of the [`dns.lookup()`][] function can be tweaked by changing settings -in `nsswitch.conf(5)` and/or `resolv.conf(5)`, but be careful that changing -these files will change the behavior of all other programs running on the same -operating system. +Under the hood, [`dns.lookup()`][] uses the same operating system facilities +as most other programs. For instance, [`dns.lookup()`][] will almost always +resolve a given name the same way as the `ping` command. On most POSIX-like +operating systems, the behavior of the [`dns.lookup()`][] function can be +tweaked by changing settings in `nsswitch.conf(5)` and/or `resolv.conf(5)`, but +be careful that changing these files will change the behavior of all other +programs running on the same operating system. Though the call will be asynchronous from JavaScript's perspective, it is implemented as a synchronous call to `getaddrinfo(3)` that runs on libuv's @@ -299,10 +299,10 @@ setting the 'UV_THREADPOOL_SIZE' environment variable to a value greater than ### dns.resolve, functions starting with dns.resolve and dns.reverse -These functions are implemented quite differently than [`dns.lookup()`][]. They do -not use `getaddrinfo(3)` and they _always_ perform a DNS query on the network. -This network communication is always done asynchronously, and does not use -libuv's threadpool. +These functions are implemented quite differently than [`dns.lookup()`][]. They +do not use `getaddrinfo(3)` and they _always_ perform a DNS query on the +network. This network communication is always done asynchronously, and does not +use libuv's threadpool. As a result, these functions cannot have the same negative impact on other processing that happens on libuv's threadpool that [`dns.lookup()`][] can have. diff --git a/doc/api/domain.markdown b/doc/api/domain.markdown index 16854d46acce6c..410a74498ddeaa 100644 --- a/doc/api/domain.markdown +++ b/doc/api/domain.markdown @@ -48,15 +48,15 @@ For example, this is not a good idea: // XXX WARNING! BAD IDEA! var d = require('domain').create(); -d.on('error', function(er) { +d.on('error', (er) => { // The error won't crash the process, but what it does is worse! // Though we've prevented abrupt process restarting, we are leaking // resources like crazy if this ever happens. // This is no better than process.on('uncaughtException')! console.log('error, but oh well', er.message); }); -d.run(function() { - require('http').createServer(function(req, res) { +d.run(() => { + require('http').createServer((req, res) => { handleRequest(req, res); }).listen(PORT); }); @@ -69,8 +69,8 @@ appropriately, and handle errors with much greater safety. ```javascript // Much better! -var cluster = require('cluster'); -var PORT = +process.env.PORT || 1337; +const cluster = require('cluster'); +const PORT = +process.env.PORT || 1337; if (cluster.isMaster) { // In real life, you'd probably use more than just 2 workers, @@ -88,7 +88,7 @@ if (cluster.isMaster) { cluster.fork(); cluster.fork(); - cluster.on('disconnect', function(worker) { + cluster.on('disconnect', (worker) => { console.error('disconnect!'); cluster.fork(); }); @@ -98,14 +98,14 @@ if (cluster.isMaster) { // // This is where we put our bugs! - var domain = require('domain'); + const domain = require('domain'); // See the cluster documentation for more details about using // worker processes to serve requests. How it works, caveats, etc. - var server = require('http').createServer(function(req, res) { + const server = require('http').createServer((req, res) => { var d = domain.create(); - d.on('error', function(er) { + d.on('error', (er) => { console.error('error', er.stack); // Note: we're in dangerous territory! @@ -115,7 +115,7 @@ if (cluster.isMaster) { try { // make sure we close down within 30 seconds - var killtimer = setTimeout(function() { + var killtimer = setTimeout(() => { process.exit(1); }, 30000); // But don't keep the process open just for that! @@ -146,7 +146,7 @@ if (cluster.isMaster) { d.add(res); // Now run the handler function in the domain. - d.run(function() { + d.run(() => { handleRequest(req, res); }); }); @@ -159,7 +159,7 @@ function handleRequest(req, res) { switch(req.url) { case '/error': // We do some async stuff, and then... - setTimeout(function() { + setTimeout(() => { // Whoops! flerb.bark(); }); @@ -229,18 +229,20 @@ For example: ``` // create a top-level domain for the server -var serverDomain = domain.create(); +const domain = require('domain'); +const http = require('http'); +const serverDomain = domain.create(); -serverDomain.run(function() { +serverDomain.run(() => { // server is created in the scope of serverDomain - http.createServer(function(req, res) { + http.createServer((req, res) => { // req and res are also created in the scope of serverDomain // however, we'd prefer to have a separate domain for each request. // create it first thing, and add req and res to it. var reqd = domain.create(); reqd.add(req); reqd.add(res); - reqd.on('error', function(er) { + reqd.on('error', (er) => { console.error('Error', er, req.url); try { res.writeHead(500); @@ -281,14 +283,16 @@ This is the most basic way to use a domain. Example: ``` -var d = domain.create(); -d.on('error', function(er) { +const domain = require('domain'); +const fs = require('fs'); +const d = domain.create(); +d.on('error', (er) => { console.error('Caught error!', er); }); -d.run(function() { - process.nextTick(function() { - setTimeout(function() { // simulating some various async stuff - fs.open('non-existent file', 'r', function(er, fd) { +d.run(() => { + process.nextTick(() => { + setTimeout(() => { // simulating some various async stuff + fs.open('non-existent file', 'r', (er, fd) => { if (er) throw er; // proceed... }); @@ -341,7 +345,7 @@ thrown will be routed to the domain's `'error'` event. #### Example - var d = domain.create(); + const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.bind(function(er, data) { @@ -350,7 +354,7 @@ thrown will be routed to the domain's `'error'` event. })); } - d.on('error', function(er) { + d.on('error', (er) => { // an error occurred somewhere. // if we throw it now, it will crash the program // with the normal line number and stack message. @@ -370,7 +374,7 @@ with a single error handler in a single place. #### Example - var d = domain.create(); + const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.intercept(function(data) { @@ -386,7 +390,7 @@ with a single error handler in a single place. })); } - d.on('error', function(er) { + d.on('error', (er) => { // an error occurred somewhere. // if we throw it now, it will crash the program // with the normal line number and stack message. diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index fa5b8e7cf1a32d..8269e19c39cd03 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -47,12 +47,12 @@ it will crash the process as an unhandled exception unless [domains][] are employed appropriately or [`process.on('uncaughtException')`][] has a handler. ```javascript -var net = require('net'); +const net = require('net'); -var connection = net.connect('localhost'); +const connection = net.connect('localhost'); // adding an 'error' event handler to a stream: -connection.on('error', function(err) { +connection.on('error', (err) => { // if the connection is reset by the server, or if it can't // connect at all, or on any sort of error encountered by // the connection, the error will be sent here. @@ -67,11 +67,11 @@ provided by Node.js -- even user created event emitters and streams will throw errors when no error handlers are attached. An example: ```javascript -var EventEmitter = require('events'); +const EventEmitter = require('events'); -var ee = new EventEmitter(); +const ee = new EventEmitter(); -setImmediate(function() { +setImmediate(() => { // this will crash the process because no 'error' event // handler has been added. ee.emit('error', new Error('This will crash')); @@ -92,14 +92,14 @@ at least **one** argument -- `error` -- that will either be `null` (if no error was encountered) or an `Error` instance. For instance: ```javascript -var fs = require('fs'); +const fs = require('fs'); fs.readFile('/some/file/that/does-not-exist', function nodeStyleCallback(err, data) { console.log(err) // Error: ENOENT console.log(data) // undefined / null }); -fs.readFile('/some/file/that/does-exist', function(err, data) { +fs.readFile('/some/file/that/does-exist', (err, data) => { console.log(err) // null console.log(data) // }) @@ -111,10 +111,10 @@ inside their node style callback: ```javascript // THIS WILL NOT WORK: -var fs = require('fs'); +const fs = require('fs'); try { - fs.readFile('/some/file/that/does-not-exist', function(err, data) { + fs.readFile('/some/file/that/does-not-exist', (err, data) => { // mistaken assumption: throwing here... if (err) { throw err; @@ -240,7 +240,7 @@ calls a JavaScript function, the frame representing the `cheetahify` call will * be present in stacktraces: ```javascript -var cheetahify = require('./native-binding.node'); +const cheetahify = require('./native-binding.node'); function makeFaster() { // cheetahify *synchronously* calls speedy. @@ -331,7 +331,7 @@ program. ```javascript try { - require("vm").runInThisContext("binary ! isNotOk"); + require('vm').runInThisContext('binary ! isNotOk'); } catch(err) { // err will be a SyntaxError } diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 92bec13632683a..02617b10e8dc5c 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -24,7 +24,7 @@ attached to. Use `require('events')` to access the EventEmitter class. ```javascript -var EventEmitter = require('events'); +const EventEmitter = require('events'); ``` When an `EventEmitter` instance experiences an error, the typical action is @@ -107,7 +107,7 @@ This can be useful to increment/decrement max listeners to avoid the warning while not being irresponsible and setting a too big number. emitter.setMaxListeners(emitter.getMaxListeners() + 1); - emitter.once('event', function () { + emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); @@ -122,7 +122,7 @@ Returns the number of listeners listening to the `type` of event. Returns a copy of the array of listeners for the specified event. - server.on('connection', function (stream) { + server.on('connection', (stream) => { console.log('someone connected!'); }); console.log(util.inspect(server.listeners('connection'))); // [ [Function] ] @@ -134,7 +134,7 @@ No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `event` and `listener` will result in the `listener` being added multiple times. - server.on('connection', function (stream) { + server.on('connection', (stream) => { console.log('someone connected!'); }); @@ -146,7 +146,7 @@ Adds a **one time** listener for the event. This listener is invoked only the next time the event is fired, after which it is removed. - server.once('connection', function (stream) { + server.once('connection', (stream) => { console.log('Ah, we have our first user!'); }); diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 7c06803b3ee72a..8a84d6f1e82c7b 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -18,16 +18,16 @@ You can use try/catch to handle exceptions or allow them to bubble up. Here is an example of the asynchronous version: - var fs = require('fs'); + const fs = require('fs'); - fs.unlink('/tmp/hello', function (err) { + fs.unlink('/tmp/hello', (err) => { if (err) throw err; console.log('successfully deleted /tmp/hello'); }); Here is the synchronous version: - var fs = require('fs'); + const fs = require('fs'); fs.unlinkSync('/tmp/hello'); console.log('successfully deleted /tmp/hello'); @@ -35,23 +35,23 @@ Here is the synchronous version: With the asynchronous methods there is no guaranteed ordering. So the following is prone to error: - fs.rename('/tmp/hello', '/tmp/world', function (err) { + fs.rename('/tmp/hello', '/tmp/world', (err) => { if (err) throw err; console.log('renamed complete'); }); - fs.stat('/tmp/world', function (err, stats) { + fs.stat('/tmp/world', (err, stats) => { if (err) throw err; - console.log('stats: ' + JSON.stringify(stats)); + console.log(`stats: ${JSON.stringify(stats)}`); }); It could be that `fs.stat` is executed before `fs.rename`. The correct way to do this is to chain the callbacks. - fs.rename('/tmp/hello', '/tmp/world', function (err) { + fs.rename('/tmp/hello', '/tmp/world', (err) => { if (err) throw err; - fs.stat('/tmp/world', function (err, stats) { + fs.stat('/tmp/world', (err, stats) => { if (err) throw err; - console.log('stats: ' + JSON.stringify(stats)); + console.log(`stats: ${JSON.stringify(stats)}`); }); }); @@ -240,7 +240,7 @@ Asynchronously append data to a file, creating the file if it does not yet exist Example: - fs.appendFile('message.txt', 'data to append', function (err) { + fs.appendFile('message.txt', 'data to append', (err) => { if (err) throw err; console.log('The "data to append" was appended to file!'); }); @@ -355,8 +355,8 @@ If `options` is a string, then it specifies the encoding. Test whether or not the given path exists by checking with the file system. Then call the `callback` argument with either true or false. Example: - fs.exists('/etc/passwd', function (exists) { - console.log(exists ? "it's there" : 'no passwd!'); + fs.exists('/etc/passwd', (exists) => { + console.log(exists ? 'it\'s there' : 'no passwd!'); }); `fs.exists()` should not be used to check if a file exists before calling @@ -579,7 +579,7 @@ Synchronous readdir(3). Returns an array of filenames excluding `'.'` and Asynchronously reads the entire contents of a file. Example: - fs.readFile('/etc/passwd', function (err, data) { + fs.readFile('/etc/passwd', (err, data) => { if (err) throw err; console.log(data); }); @@ -623,7 +623,7 @@ resolution or avoid additional `fs.stat` calls for known real paths. Example: var cache = {'/etc':'/private/etc'}; - fs.realpath('/etc/passwd', cache, function (err, resolvedPath) { + fs.realpath('/etc/passwd', cache, (err, resolvedPath) => { if (err) throw err; console.log(resolvedPath); }); @@ -788,10 +788,10 @@ Windows. Even on supported platforms, `filename` is not always guaranteed to be provided. Therefore, don't assume that `filename` argument is always provided in the callback, and have some fallback logic if it is null. - fs.watch('somedir', function (event, filename) { - console.log('event is: ' + event); + fs.watch('somedir', (event, filename) => { + console.log(`event is: ${event}`); if (filename) { - console.log('filename provided: ' + filename); + console.log(`filename provided: ${filename}`); } else { console.log('filename not provided'); } @@ -812,9 +812,9 @@ target should be polled in milliseconds. The default is The `listener` gets two arguments the current stat object and the previous stat object: - fs.watchFile('message.text', function (curr, prev) { - console.log('the current mtime is: ' + curr.mtime); - console.log('the previous mtime was: ' + prev.mtime); + fs.watchFile('message.text', (curr, prev) => { + console.log(`the current mtime is: ${curr.mtime}`); + console.log(`the previous mtime was: ${prev.mtime}`); }); These stat objects are instances of `fs.Stat`. @@ -898,7 +898,7 @@ to `'utf8'`. Example: - fs.writeFile('message.txt', 'Hello Node.js', function (err) { + fs.writeFile('message.txt', 'Hello Node.js', (err) => { if (err) throw err; console.log('It\'s saved!'); }); diff --git a/doc/api/http.markdown b/doc/api/http.markdown index fb2cbae8914ee6..6562a469a73bdb 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -64,10 +64,10 @@ a `'close'` event or a special `'agentRemove'` event. This means that if you intend to keep one HTTP request open for a long time and don't want it to stay in the pool you can do something along the lines of: - http.get(options, function(res) { + http.get(options, (res) => { // Do stuff - }).on("socket", function (socket) { - socket.emit("agentRemove"); + }).on('socket', (socket) => { + socket.emit('agentRemove'); }); Alternatively, you could just opt out of pooling entirely using @@ -78,7 +78,7 @@ Alternatively, you could just opt out of pooling entirely using port: 80, path: '/', agent: false // create a new agent just for this one request - }, function (res) { + }, (res) => { // Do stuff with response }) @@ -103,7 +103,7 @@ of these values set to their respective defaults. To configure any of them, you must create your own [`http.Agent`][] object. ```javascript -var http = require('http'); +const http = require('http'); var keepAliveAgent = new http.Agent({ keepAlive: true }); options.agent = keepAliveAgent; http.request(options, onResponseCallback); @@ -202,19 +202,19 @@ their connections closed. A client server pair that show you how to listen for the `'connect'` event. - var http = require('http'); - var net = require('net'); - var url = require('url'); + const http = require('http'); + const net = require('net'); + const url = require('url'); // Create an HTTP tunneling proxy - var proxy = http.createServer(function (req, res) { + var proxy = http.createServer( (req, res) => { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('okay'); }); - proxy.on('connect', function(req, cltSocket, head) { + proxy.on('connect', (req, cltSocket, head) => { // connect to an origin server - var srvUrl = url.parse('http://' + req.url); - var srvSocket = net.connect(srvUrl.port, srvUrl.hostname, function() { + var srvUrl = url.parse(`http://${req.url}`); + var srvSocket = net.connect(srvUrl.port, srvUrl.hostname, () => { cltSocket.write('HTTP/1.1 200 Connection Established\r\n' + 'Proxy-agent: Node.js-Proxy\r\n' + '\r\n'); @@ -225,7 +225,7 @@ A client server pair that show you how to listen for the `'connect'` event. }); // now that proxy is running - proxy.listen(1337, '127.0.0.1', function() { + proxy.listen(1337, '127.0.0.1', () => { // make a request to a tunneling proxy var options = { @@ -238,7 +238,7 @@ A client server pair that show you how to listen for the `'connect'` event. var req = http.request(options); req.end(); - req.on('connect', function(res, socket, head) { + req.on('connect', (res, socket, head) => { console.log('got connected!'); // make a request over an HTTP tunnel @@ -246,10 +246,10 @@ A client server pair that show you how to listen for the `'connect'` event. 'Host: www.google.com:80\r\n' + 'Connection: close\r\n' + '\r\n'); - socket.on('data', function(chunk) { + socket.on('data', (chunk) => { console.log(chunk.toString()); }); - socket.on('end', function() { + socket.on('end', () => { proxy.close(); }); }); @@ -292,14 +292,14 @@ their connections closed. A client server pair that show you how to listen for the `'upgrade'` event. - var http = require('http'); + const http = require('http'); // Create an HTTP server - var srv = http.createServer(function (req, res) { + var srv = http.createServer( (req, res) => { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('okay'); }); - srv.on('upgrade', function(req, socket, head) { + srv.on('upgrade', (req, socket, head) => { socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\r\n' + 'Upgrade: WebSocket\r\n' + 'Connection: Upgrade\r\n' + @@ -309,7 +309,7 @@ A client server pair that show you how to listen for the `'upgrade'` event. }); // now that server is running - srv.listen(1337, '127.0.0.1', function() { + srv.listen(1337, '127.0.0.1', () => { // make a request var options = { @@ -324,7 +324,7 @@ A client server pair that show you how to listen for the `'upgrade'` event. var req = http.request(options); req.end(); - req.on('upgrade', function(res, socket, upgradeHead) { + req.on('upgrade', (res, socket, upgradeHead) => { console.log('got upgraded!'); socket.end(); process.exit(0); @@ -606,7 +606,7 @@ emit trailers, with a list of the header fields in its value. E.g., response.writeHead(200, { 'Content-Type': 'text/plain', 'Trailer': 'Content-MD5' }); response.write(fileData); - response.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"}); + response.addTrailers({'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667'}); response.end(); Attempting to set a trailer field name that contains invalid characters will @@ -649,7 +649,7 @@ Removes a header that's queued for implicit sending. Example: - response.removeHeader("Content-Encoding"); + response.removeHeader('Content-Encoding'); ### response.sendDate @@ -667,11 +667,11 @@ here if you need to send multiple headers with the same name. Example: - response.setHeader("Content-Type", "text/html"); + response.setHeader('Content-Type', 'text/html'); or - response.setHeader("Set-Cookie", ["type=ninja", "language=javascript"]); + response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); Attempting to set a header field name that contains invalid characters will result in a [`TypeError`][] being thrown. @@ -964,12 +964,12 @@ is that it sets the method to GET and calls `req.end()` automatically. Example: - http.get("http://www.google.com/index.html", function(res) { - console.log("Got response: " + res.statusCode); + http.get('http://www.google.com/index.html', (res) => { + console.log(`Got response: ${res.statusCode}`); // consume response body res.resume(); - }).on('error', function(e) { - console.log("Got error: " + e.message); + }).on('error', (e) => { + console.log(`Got error: ${e.message}`); }); ## http.globalAgent @@ -1037,20 +1037,20 @@ Example: } }; - var req = http.request(options, function(res) { - console.log('STATUS: ' + res.statusCode); - console.log('HEADERS: ' + JSON.stringify(res.headers)); + var req = http.request(options, (res) => { + console.log(`STATUS: ${res.statusCode}`); + console.log(`HEADERS: ${JSON.stringify(res.headers)}`); res.setEncoding('utf8'); - res.on('data', function (chunk) { - console.log('BODY: ' + chunk); + res.on('data', (chunk) => { + console.log(`BODY: ${chunk}`); }); - res.on('end', function() { + res.on('end', () => { console.log('No more data in response.') }) }); - req.on('error', function(e) { - console.log('problem with request: ' + e.message); + req.on('error', (e) => { + console.log(`problem with request: ${e.message}`); }); // write data to request body diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 5aa061e45938fd..1d079333489abe 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -32,31 +32,31 @@ automatically added to the `'request'` event. Example: // curl -k https://localhost:8000/ - var https = require('https'); - var fs = require('fs'); + const https = require('https'); + const fs = require('fs'); - var options = { + const options = { key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') }; - https.createServer(options, function (req, res) { + https.createServer(options, (req, res) => { res.writeHead(200); - res.end("hello world\n"); + res.end('hello world\n'); }).listen(8000); Or - var https = require('https'); - var fs = require('fs'); + const https = require('https'); + const fs = require('fs'); - var options = { + const options = { pfx: fs.readFileSync('server.pfx') }; - https.createServer(options, function (req, res) { + https.createServer(options, (req, res) => { res.writeHead(200); - res.end("hello world\n"); + res.end('hello world\n'); }).listen(8000); ### server.close([callback]) @@ -78,17 +78,17 @@ automatically parsed with [`url.parse()`][]. Example: - var https = require('https'); + const https = require('https'); - https.get('https://encrypted.google.com/', function(res) { - console.log("statusCode: ", res.statusCode); - console.log("headers: ", res.headers); + https.get('https://encrypted.google.com/', (res) => { + console.log('statusCode: ', res.statusCode); + console.log('headers: ', res.headers); - res.on('data', function(d) { + res.on('data', (d) => { process.stdout.write(d); }); - }).on('error', function(e) { + }).on('error', (e) => { console.error(e); }); @@ -107,7 +107,7 @@ All options from [`http.request()`][] are valid. Example: - var https = require('https'); + const https = require('https'); var options = { hostname: 'encrypted.google.com', @@ -116,17 +116,17 @@ Example: method: 'GET' }; - var req = https.request(options, function(res) { - console.log("statusCode: ", res.statusCode); - console.log("headers: ", res.headers); + var req = https.request(options, (res) => { + console.log('statusCode: ', res.statusCode); + console.log('headers: ', res.headers); - res.on('data', function(d) { + res.on('data', (d) => { process.stdout.write(d); }); }); req.end(); - req.on('error', function(e) { + req.on('error', (e) => { console.error(e); }); @@ -192,7 +192,7 @@ Example: }; options.agent = new https.Agent(options); - var req = https.request(options, function(res) { + var req = https.request(options, (res) => { ... } @@ -210,7 +210,7 @@ Example: agent: false }; - var req = https.request(options, function(res) { + var req = https.request(options, (res) => { ... } diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index 00c1c77915c93f..aa1f0b074e5043 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -10,13 +10,12 @@ in one-to-one correspondence. As an example, `foo.js` loads the module The contents of `foo.js`: - var circle = require('./circle.js'); - console.log( 'The area of a circle of radius 4 is ' - + circle.area(4)); + const circle = require('./circle.js'); + console.log( `The area of a circle of radius 4 is ${circle.area(4)}`); The contents of `circle.js`: - var PI = Math.PI; + const PI = Math.PI; exports.area = function (r) { return PI * r * r; @@ -40,9 +39,9 @@ instead of `exports`. Below, `bar.js` makes use of the `square` module, which exports a constructor: - var square = require('./square.js'); + const square = require('./square.js'); var mySquare = square(2); - console.log('The area of my square is ' + mySquare.area()); + console.log(`The area of my square is ${mySquare.area()}`); The `square` module is defined in `square.js`: @@ -233,7 +232,7 @@ Consider this situation: console.log('a starting'); exports.done = false; - var b = require('./b.js'); + const b = require('./b.js'); console.log('in a, b.done = %j', b.done); exports.done = true; console.log('a done'); @@ -242,7 +241,7 @@ Consider this situation: console.log('b starting'); exports.done = false; - var a = require('./a.js'); + const a = require('./a.js'); console.log('in b, a.done = %j', a.done); exports.done = true; console.log('b done'); @@ -250,8 +249,8 @@ Consider this situation: `main.js`: console.log('main starting'); - var a = require('./a.js'); - var b = require('./b.js'); + const a = require('./a.js'); + const b = require('./b.js'); console.log('in main, a.done=%j, b.done=%j', a.done, b.done); When `main.js` loads `a.js`, then `a.js` in turn loads `b.js`. At that @@ -425,20 +424,20 @@ which is probably not what you want to do. For example suppose we were making a module called `a.js` - var EventEmitter = require('events'); + const EventEmitter = require('events'); module.exports = new EventEmitter(); // Do some work, and after some time emit // the 'ready' event from the module itself. - setTimeout(function() { + setTimeout(() => { module.exports.emit('ready'); }, 1000); Then in another file we could do - var a = require('./a'); - a.on('ready', function() { + const a = require('./a'); + a.on('ready', () => { console.log('module a is ready'); }); @@ -448,13 +447,13 @@ done in any callbacks. This does not work: x.js: - setTimeout(function() { - module.exports = { a: "hello" }; + setTimeout(() => { + module.exports = { a: 'hello' }; }, 0); y.js: - var x = require('./x'); + const x = require('./x'); console.log(x.a); #### exports alias diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 32d2218982db35..7e898596f5a18e 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -45,14 +45,14 @@ Returns an object with three properties, e.g. Example: - var server = net.createServer(function (socket) { - socket.end("goodbye\n"); + var server = net.createServer((socket) => { + socket.end('goodbye\n'); }); // grab a random port. - server.listen(function() { + server.listen(() => { address = server.address(); - console.log("opened server on %j", address); + console.log('opened server on %j', address); }); Don't call `server.address()` until the `'listening'` event has been emitted. @@ -184,10 +184,10 @@ One issue some users run into is getting `EADDRINUSE` errors. This means that another server is already running on the requested port. One way of handling this would be to wait a second and then try again. This can be done with - server.on('error', function (e) { + server.on('error', (e) => { if (e.code == 'EADDRINUSE') { console.log('Address in use, retrying...'); - setTimeout(function () { + setTimeout(() => { server.close(); server.listen(PORT, HOST); }, 1000); @@ -512,24 +512,23 @@ The `connectListener` parameter will be added as a listener for the Here is an example of a client of the previously described echo server: - var net = require('net'); - var client = net.connect({port: 8124}, - function() { //'connect' listener + const net = require('net'); + const client = net.connect({port: 8124}, () => { //'connect' listener console.log('connected to server!'); client.write('world!\r\n'); }); - client.on('data', function(data) { + client.on('data', (data) => { console.log(data.toString()); client.end(); }); - client.on('end', function() { + client.on('end', () => { console.log('disconnected from server'); }); To connect on the socket `/tmp/echo.sock` the second line would just be changed to - var client = net.connect({path: '/tmp/echo.sock'}); + const client = net.connect({path: '/tmp/echo.sock'}); ## net.connect(path[, connectListener]) @@ -562,24 +561,24 @@ The `connectListener` parameter will be added as a listener for the Here is an example of a client of the previously described echo server: - var net = require('net'); - var client = net.connect({port: 8124}, - function() { //'connect' listener + const net = require('net'); + const client = net.connect({port: 8124}, + () => { //'connect' listener console.log('connected to server!'); client.write('world!\r\n'); }); - client.on('data', function(data) { + client.on('data', (data) => { console.log(data.toString()); client.end(); }); - client.on('end', function() { + client.on('end', () => { console.log('disconnected from server'); }); To connect on the socket `/tmp/echo.sock` the second line would just be changed to - var client = net.connect({path: '/tmp/echo.sock'}); + const client = net.connect({path: '/tmp/echo.sock'}); ## net.createConnection(path[, connectListener]) @@ -624,16 +623,16 @@ original process. To begin reading data from a paused socket, call [`resume()`][ Here is an example of an echo server which listens for connections on port 8124: - var net = require('net'); - var server = net.createServer(function(c) { //'connection' listener + const net = require('net'); + const server = net.createServer((c) => { //'connection' listener console.log('client connected'); - c.on('end', function() { + c.on('end', () => { console.log('client disconnected'); }); c.write('hello\r\n'); c.pipe(c); }); - server.listen(8124, function() { //'listening' listener + server.listen(8124, () => { //'listening' listener console.log('server bound'); }); @@ -644,7 +643,7 @@ Test this by using `telnet`: To listen on the socket `/tmp/echo.sock` the third line from the last would just be changed to - server.listen('/tmp/echo.sock', function() { //'listening' listener + server.listen('/tmp/echo.sock', () => { //'listening' listener Use `nc` to connect to a UNIX domain socket server: diff --git a/doc/api/process.markdown b/doc/api/process.markdown index 73724b39b96ff2..987bca9f657a23 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -29,9 +29,9 @@ implicitly by the event loop draining. Example of listening for `'exit'`: - process.on('exit', function(code) { + process.on('exit', (code) => { // do *NOT* do this - setTimeout(function() { + setTimeout(() => { console.log('This will not run'); }, 0); console.log('About to exit with code:', code); @@ -71,11 +71,11 @@ event tells you when the list of unhandled rejections shrinks. For example using the rejection detection hooks in order to keep a map of all the rejected promise reasons at a given time: - var unhandledRejections = new Map(); - process.on('unhandledRejection', function(reason, p) { + const unhandledRejections = new Map(); + process.on('unhandledRejection', (reason, p) => { unhandledRejections.set(p, reason); }); - process.on('rejectionHandled', function(p) { + process.on('rejectionHandled', (p) => { unhandledRejections.delete(p); }); @@ -93,11 +93,11 @@ a stack trace and exit) will not occur. Example of listening for `'uncaughtException'`: - process.on('uncaughtException', function(err) { - console.log('Caught exception: ' + err); + process.on('uncaughtException', (err) => { + console.log(`Caught exception: ${err}`); }); - setTimeout(function() { + setTimeout(() => { console.log('This will still run.'); }, 500); @@ -138,7 +138,7 @@ instance). Here is an example that logs every unhandled rejection to the console - process.on('unhandledRejection', function(reason, p) { + process.on('unhandledRejection', (reason, p) => { console.log("Unhandled Rejection at: Promise ", p, " reason: ", reason); // application specific logging, throwing an error, or other logic here }); @@ -146,8 +146,8 @@ Here is an example that logs every unhandled rejection to the console For example, here is a rejection that will trigger the `'unhandledRejection'` event: - somePromise.then(function(res) { - return reportToUser(JSON.pasre(res)); // note the typo + somePromise.then((res) => { + return reportToUser(JSON.parse(res)); // note the typo }); // no `.catch` or `.then` Here is an example of a coding pattern that will also trigger @@ -226,7 +226,7 @@ Example of listening for `SIGINT`: // Start reading from stdin so we don't exit. process.stdin.resume(); - process.on('SIGINT', function() { + process.on('SIGINT', () => { console.log('Got SIGINT. Press Control-D to exit.'); }); @@ -285,8 +285,8 @@ An array containing the command line arguments. The first element will be next elements will be any additional command line arguments. // print process.argv - process.argv.forEach(function(val, index, array) { - console.log(index + ': ' + val); + process.argv.forEach((val, index, array) => { + console.log(`${index}: ${val}`); }); This will generate: @@ -302,13 +302,13 @@ This will generate: Changes the current working directory of the process or throws an exception if that fails. - console.log('Starting directory: ' + process.cwd()); + console.log(`Starting directory: ${process.cwd()}`); try { process.chdir('/tmp'); - console.log('New directory: ' + process.cwd()); + console.log(`New directory: ${process.cwd()}`); } catch (err) { - console.log('chdir: ' + err); + console.log(`chdir: ${err}`); } ## process.config @@ -350,7 +350,7 @@ If `process.connected` is false, it is no longer possible to send messages. Returns the current working directory of the process. - console.log('Current directory: ' + process.cwd()); + console.log(`Current directory: ${process.cwd()}`); ## process.disconnect() @@ -450,7 +450,7 @@ Gets the effective group identity of the process. (See getegid(2).) This is the numerical group id, not the group name. if (process.getegid) { - console.log('Current gid: ' + process.getegid()); + console.log(`Current gid: ${process.getegid()}`); } @@ -463,7 +463,7 @@ Gets the effective user identity of the process. (See geteuid(2).) This is the numerical userid, not the username. if (process.geteuid) { - console.log('Current uid: ' + process.geteuid()); + console.log(`Current uid: ${process.geteuid()}`); } ## process.getgid() @@ -475,7 +475,7 @@ Gets the group identity of the process. (See getgid(2).) This is the numerical group id, not the group name. if (process.getgid) { - console.log('Current gid: ' + process.getgid()); + console.log(`Current gid: ${process.getgid()}`); } ## process.getgroups() @@ -495,7 +495,7 @@ Gets the user identity of the process. (See getuid(2).) This is the numerical userid, not the username. if (process.getuid) { - console.log('Current uid: ' + process.getuid()); + console.log(`Current uid: ${process.getuid()}`); } ## process.hrtime() @@ -511,7 +511,7 @@ a diff reading, useful for benchmarks and measuring intervals: var time = process.hrtime(); // [ 1800216, 25 ] - setTimeout(function() { + setTimeout(() => { var diff = process.hrtime(time); // [ 1, 552 ] @@ -556,11 +556,11 @@ something other than kill the target process. Example of sending a signal to yourself: - process.on('SIGHUP', function() { + process.on('SIGHUP', () => { console.log('Got SIGHUP signal.'); }); - setTimeout(function() { + setTimeout(() => { console.log('Exiting.'); process.exit(0); }, 100); @@ -584,7 +584,7 @@ As with `require.main`, it will be `undefined` if there was no entry script. Returns an object describing the memory usage of the Node.js process measured in bytes. - var util = require('util'); + const util = require('util'); console.log(util.inspect(process.memoryUsage())); @@ -609,7 +609,7 @@ efficient. It runs before any additional I/O events (including timers) fire in subsequent ticks of the event loop. console.log('start'); - process.nextTick(function() { + process.nextTick(() => { console.log('nextTick callback'); }); console.log('scheduled'); @@ -625,7 +625,7 @@ but before any I/O has occurred. function MyThing(options) { this.setupOptions(options); - process.nextTick(function() { + process.nextTick(() => { this.startDoingStuff(); }.bind(this)); } @@ -677,14 +677,14 @@ happening, just like a `while(true);` loop. The PID of the process. - console.log('This process is pid ' + process.pid); + console.log(`This process is pid ${process.pid}`); ## process.platform What platform you're running on: `'darwin'`, `'freebsd'`, `'linux'`, `'sunos'` or `'win32'` - console.log('This platform is ' + process.platform); + console.log(`This platform is ${process.platform}`); ## process.release @@ -738,13 +738,13 @@ This accepts either a numerical ID or a groupname string. If a groupname is specified, this method blocks while resolving it to a numerical ID. if (process.getegid && process.setegid) { - console.log('Current gid: ' + process.getegid()); + console.log(`Current gid: ${process.getegid()}`); try { process.setegid(501); - console.log('New gid: ' + process.getegid()); + console.log(`New gid: ${process.getegid()}`); } catch (err) { - console.log('Failed to set gid: ' + err); + console.log(`Failed to set gid: ${err}`); } } @@ -758,13 +758,13 @@ This accepts either a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID. if (process.geteuid && process.seteuid) { - console.log('Current uid: ' + process.geteuid()); + console.log(`Current uid: ${process.geteuid()}`); try { process.seteuid(501); - console.log('New uid: ' + process.geteuid()); + console.log(`New uid: ${process.geteuid()}`); } catch (err) { - console.log('Failed to set uid: ' + err); + console.log(`Failed to set uid: ${err}`); } } @@ -778,13 +778,13 @@ a numerical ID or a groupname string. If a groupname is specified, this method blocks while resolving it to a numerical ID. if (process.getgid && process.setgid) { - console.log('Current gid: ' + process.getgid()); + console.log(`Current gid: ${process.getgid()}`); try { process.setgid(501); - console.log('New gid: ' + process.getgid()); + console.log(`New gid: ${process.getgid()}`); } catch (err) { - console.log('Failed to set gid: ' + err); + console.log(`Failed to set gid: ${err}`); } } @@ -808,13 +808,13 @@ a numerical ID or a username string. If a username is specified, this method blocks while resolving it to a numerical ID. if (process.getuid && process.setuid) { - console.log('Current uid: ' + process.getuid()); + console.log(`Current uid: ${process.getuid()}`); try { process.setuid(501); - console.log('New uid: ' + process.getuid()); + console.log(`New uid: ${process.getuid()}`); } catch (err) { - console.log('Failed to set uid: ' + err); + console.log(`Failed to set uid: ${err}`); } } @@ -836,14 +836,14 @@ Example of opening standard input and listening for both events: process.stdin.setEncoding('utf8'); - process.stdin.on('readable', function() { + process.stdin.on('readable', () => { var chunk = process.stdin.read(); if (chunk !== null) { - process.stdout.write('data: ' + chunk); + process.stdout.write(`data: ${chunk}`); } }); - process.stdin.on('end', function() { + process.stdin.on('end', () => { process.stdout.write('end'); }); @@ -865,7 +865,7 @@ A `Writable Stream` to `stdout` (on fd `1`). For example, a `console.log` equivalent could look like this: console.log = function(msg) { - process.stdout.write(msg + '\n'); + process.stdout.write(`${msg}\n`); }; `process.stderr` and `process.stdout` are unlike other streams in Node.js in @@ -909,11 +909,11 @@ Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if `mask` argument is given, otherwise returns the current mask. - var oldmask, newmask = 0022; - - oldmask = process.umask(newmask); - console.log('Changed umask from: ' + oldmask.toString(8) + - ' to ' + newmask.toString(8)); + const newmask = 0o022; + const oldmask = process.umask(newmask); + console.log( + `Changed umask from ${oldmask.toString(8)} to ${newmask.toString(8)}` + ); ## process.uptime() @@ -924,7 +924,7 @@ Number of seconds Node.js has been running. A compiled-in property that exposes `NODE_VERSION`. - console.log('Version: ' + process.version); + console.log(`Version: ${process.version}`); ## process.versions diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index cdf424339ed06a..5d98f501f68c65 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -9,16 +9,16 @@ Note that once you've invoked this module, your Node.js program will not terminate until you've closed the interface. Here's how to allow your program to gracefully exit: - var readline = require('readline'); + const readline = require('readline'); - var rl = readline.createInterface({ + const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); - rl.question("What do you think of Node.js? ", function(answer) { + rl.question('What do you think of Node.js? ', (answer) => { // TODO: Log the answer in a database - console.log("Thank you for your valuable feedback:", answer); + console.log('Thank you for your valuable feedback:', answer); rl.close(); }); @@ -66,8 +66,8 @@ nothing is displayed. Example usage: - interface.question('What is your favorite food?', function(answer) { - console.log('Oh, so your favorite food is ' + answer); + interface.question('What is your favorite food?', (answer) => { + console.log(`Oh, so your favorite food is ${answer}`); }); ### rl.resume() @@ -117,8 +117,8 @@ user hits enter, or return. This is a good hook to listen for user input. Example of listening for `'line'`: - rl.on('line', function (cmd) { - console.log('You just typed: '+cmd); + rl.on('line', (cmd) => { + console.log(`You just typed: ${cmd}`); }); ### Event: 'pause' @@ -132,7 +132,7 @@ Also emitted whenever the `input` stream is not paused and receives the Example of listening for `'pause'`: - rl.on('pause', function() { + rl.on('pause', () => { console.log('Readline paused.'); }); @@ -144,7 +144,7 @@ Emitted whenever the `input` stream is resumed. Example of listening for `'resume'`: - rl.on('resume', function() { + rl.on('resume', () => { console.log('Readline resumed.'); }); @@ -161,7 +161,7 @@ background. Example of listening for `SIGCONT`: - rl.on('SIGCONT', function() { + rl.on('SIGCONT', () => { // `prompt` will automatically resume the stream rl.prompt(); }); @@ -176,8 +176,8 @@ stream receives a `SIGINT`, `pause` will be triggered. Example of listening for `SIGINT`: - rl.on('SIGINT', function() { - rl.question('Are you sure you want to exit?', function(answer) { + rl.on('SIGINT', () => { + rl.question('Are you sure you want to exit?', (answer) => { if (answer.match(/^y(es)?$/i)) rl.pause(); }); }); @@ -200,7 +200,7 @@ before the program was sent to the background. Example of listening for `SIGTSTP`: - rl.on('SIGTSTP', function() { + rl.on('SIGTSTP', () => { // This will override SIGTSTP and prevent the program from going to the // background. console.log('Caught SIGTSTP.'); @@ -211,13 +211,13 @@ Example of listening for `SIGTSTP`: Here's an example of how to use all these together to craft a tiny command line interface: - var readline = require('readline'), - rl = readline.createInterface(process.stdin, process.stdout); + const readline = require('readline'); + const rl = readline.createInterface(process.stdin, process.stdout); rl.setPrompt('OHAI> '); rl.prompt(); - rl.on('line', function(line) { + rl.on('line', (line) => { switch(line.trim()) { case 'hello': console.log('world!'); @@ -227,7 +227,7 @@ line interface: break; } rl.prompt(); - }).on('close', function() { + }).on('close', () => { console.log('Have a great day!'); process.exit(0); }); @@ -277,7 +277,7 @@ Example: function completer(line) { var completions = '.help .error .exit .quit .q'.split(' ') - var hits = completions.filter(function(c) { return c.indexOf(line) == 0 }) + var hits = completions.filter((c) => { return c.indexOf(line) == 0 }) // show all completions if none found return [hits.length ? hits : completions, line] } @@ -291,8 +291,8 @@ Also `completer` can be run in async mode if it accepts two arguments: `createInterface` is commonly used with [`process.stdin`][] and [`process.stdout`][] in order to accept user input: - var readline = require('readline'); - var rl = readline.createInterface({ + const readline = require('readline'); + const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index d5d4ec62ec7549..99e9d0e26d8720 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -85,8 +85,8 @@ a variable to the REPL explicitly by assigning it to the `context` object associated with each `REPLServer`. For example: // repl_test.js - var repl = require('repl'), - msg = 'message'; + const repl = require('repl'); + var msg = 'message'; repl.start('> ').context.m = msg; @@ -152,7 +152,7 @@ to signal `'end'` on the `input` stream. Example of listening for `exit`: - replServer.on('exit', function () { + replServer.on('exit', () => { console.log('Got "exit" event from repl!'); process.exit(); }); @@ -173,7 +173,7 @@ Example of listening for `reset`: someExtension.extend(r.context); // When a new context is created extend it as well. - replServer.on('reset', function (context) { + replServer.on('reset', (context) => { console.log('repl has a new context'); someExtension.extend(context); }); @@ -196,13 +196,13 @@ If a function is provided instead of an object for `cmd`, it is treated as the Example of defining a command: // repl_test.js - var repl = require('repl'); + const repl = require('repl'); var replServer = repl.start(); replServer.defineCommand('sayhello', { help: 'Say hello', action: function(name) { - this.write('Hello, ' + name + '!\n'); + this.write(`Hello, ${name}!\n'); this.displayPrompt(); } }); @@ -277,9 +277,9 @@ will share the same global object but will have unique I/O. Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: - var net = require('net'), - repl = require('repl'), - connections = 0; + const net = require('net'); + const repl = require('repl'); + var connections = 0; repl.start({ prompt: 'Node.js via stdin> ', @@ -287,24 +287,24 @@ Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: output: process.stdout }); - net.createServer(function (socket) { + net.createServer((socket) => { connections += 1; repl.start({ prompt: 'Node.js via Unix socket> ', input: socket, output: socket - }).on('exit', function() { + }).on('exit', () => { socket.end(); }) }).listen('/tmp/node-repl-sock'); - net.createServer(function (socket) { + net.createServer((socket) => { connections += 1; repl.start({ prompt: 'Node.js via TCP socket> ', input: socket, output: socket - }).on('exit', function() { + }).on('exit', () => { socket.end(); }); }).listen(5001); diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index b76ef0093e1847..e874b6f8b8d129 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -50,9 +50,9 @@ Almost all Node.js programs, no matter how simple, use Streams in some way. Here is an example of using Streams in an Node.js program: ```javascript -var http = require('http'); +const http = require('http'); -var server = http.createServer(function (req, res) { +var 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 @@ -62,18 +62,18 @@ var server = http.createServer(function (req, res) { req.setEncoding('utf8'); // Readable streams emit 'data' events once a listener is added - req.on('data', function (chunk) { + req.on('data', (chunk) => { body += chunk; }); // the end event tells you that you have entire body - req.on('end', function () { + req.on('end', () => { try { var data = JSON.parse(body); } catch (er) { // uh oh! bad json! res.statusCode = 400; - return res.end('error: ' + er.message); + return res.end(`error: ${er.message}`); } // write back something interesting to the user: @@ -176,7 +176,7 @@ possible, this is the best way to do so. ```javascript var readable = getReadableStreamSomehow(); -readable.on('data', function(chunk) { +readable.on('data', (chunk) => { console.log('got %d bytes of data', chunk.length); }); ``` @@ -191,10 +191,10 @@ or by calling `read()` repeatedly until you get to the end. ```javascript var readable = getReadableStreamSomehow(); -readable.on('data', function(chunk) { +readable.on('data', (chunk) => { console.log('got %d bytes of data', chunk.length); }); -readable.on('end', function() { +readable.on('end', () => { console.log('there will be no more data.'); }); ``` @@ -216,7 +216,7 @@ hadn't already. ```javascript var readable = getReadableStreamSomehow(); -readable.on('readable', function() { +readable.on('readable', () => { // there is some data to read now }); ``` @@ -234,12 +234,12 @@ In the former case, `.read()` will return that data. In the latter case, is an empty file: ```javascript -var fs = require('fs'); +const fs = require('fs'); var rr = fs.createReadStream('foo.txt'); -rr.on('readable', function() { +rr.on('readable', () => { console.log('readable:', rr.read()); }); -rr.on('end', function() { +rr.on('end', () => { console.log('end'); }); ``` @@ -280,11 +280,11 @@ available will remain in the internal buffer. ```javascript var readable = getReadableStreamSomehow(); -readable.on('data', function(chunk) { +readable.on('data', (chunk) => { console.log('got %d bytes of data', chunk.length); readable.pause(); console.log('there will be no more data for 1 second'); - setTimeout(function() { + setTimeout(() => { console.log('now data will start flowing again'); readable.resume(); }, 1000); @@ -335,7 +335,7 @@ end. ```javascript reader.pipe(writer, { end: false }); -reader.on('end', function() { +reader.on('end', () => { writer.end('Goodbye\n'); }); ``` @@ -366,7 +366,7 @@ drained. ```javascript var readable = getReadableStreamSomehow(); -readable.on('readable', function() { +readable.on('readable', () => { var chunk; while (null !== (chunk = readable.read())) { console.log('got %d bytes of data', chunk.length); @@ -395,7 +395,7 @@ data. ```javascript var readable = getReadableStreamSomehow(); readable.resume(); -readable.on('end', function() { +readable.on('end', () => { console.log('got to the end, but did not read anything'); }); ``` @@ -420,7 +420,7 @@ as strings, always use this method. ```javascript var readable = getReadableStreamSomehow(); readable.setEncoding('utf8'); -readable.on('data', function(chunk) { +readable.on('data', (chunk) => { assert.equal(typeof chunk, 'string'); console.log('got %d characters of string data', chunk.length); }); @@ -443,7 +443,7 @@ var writable = fs.createWriteStream('file.txt'); // All the data from readable goes into 'file.txt', // but only for the first second readable.pipe(writable); -setTimeout(function() { +setTimeout(() => { console.log('stop writing to file.txt'); readable.unpipe(writable); console.log('manually close the file stream'); @@ -471,7 +471,7 @@ for Stream Implementors, below.) // Pull off a header delimited by \n\n // use unshift() if we get too much // Call the callback with (error, header, stream) -var StringDecoder = require('string_decoder').StringDecoder; +const StringDecoder = require('string_decoder').StringDecoder; function parseHeader(stream, callback) { stream.on('error', callback); stream.on('readable', onReadable); @@ -528,12 +528,12 @@ as a convenience for interacting with old Node.js programs and libraries. For example: ```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); +const OldReader = require('./old-api-module.js').OldReader; +const Readable = require('stream').Readable; +const oreader = new OldReader; +const myReader = new Readable().wrap(oreader); -myReader.on('readable', function() { +myReader.on('readable', () => { myReader.read(); // etc. }); ``` @@ -615,10 +615,10 @@ to the underlying system, this event is emitted. ```javascript var writer = getWritableStreamSomehow(); for (var i = 0; i < 100; i ++) { - writer.write('hello, #' + i + '!\n'); + writer.write('hello, #${i}!\n'); } writer.end('this is the end\n'); -writer.on('finish', function() { +writer.on('finish', () => { console.error('all writes are now complete.'); }); ``` @@ -633,7 +633,7 @@ stream, adding this writable to its set of destinations. ```javascript var writer = getWritableStreamSomehow(); var reader = getReadableStreamSomehow(); -writer.on('pipe', function(src) { +writer.on('pipe', (src) => { console.error('something is piping into the writer'); assert.equal(src, reader); }); @@ -650,7 +650,7 @@ readable stream, removing this writable from its set of destinations. ```javascript var writer = getWritableStreamSomehow(); var reader = getReadableStreamSomehow(); -writer.on('unpipe', function(src) { +writer.on('unpipe', (src) => { console.error('something has stopped piping into the writer'); assert.equal(src, reader); }); @@ -955,8 +955,8 @@ This is a basic example of a Readable stream. It emits the numerals from 1 to 1,000,000 in ascending order, and then ends. ```javascript -var Readable = require('stream').Readable; -var util = require('util'); +const Readable = require('stream').Readable; +const util = require('util'); util.inherits(Counter, Readable); function Counter(opt) { @@ -995,8 +995,8 @@ below for a better implementation. // Using Readable directly for this is sub-optimal. See the // alternative example below under the Transform section. -var Readable = require('stream').Readable; -var util = require('util'); +const Readable = require('stream').Readable; +const util = require('util'); util.inherits(SimpleProtocol, Readable); @@ -1012,13 +1012,13 @@ function SimpleProtocol(source, options) { this._source = source; var self = this; - source.on('end', function() { + source.on('end', () => { self.push(null); }); // give it a kick whenever the source is readable // read(0) will not consume any bytes - source.on('readable', function() { + source.on('readable', () => { self.read(0); }); @@ -1210,8 +1210,8 @@ would be piped into the parser, which is a more idiomatic Node.js stream approach. ```javascript -var util = require('util'); -var Transform = require('stream').Transform; +const util = require('util'); +const Transform = require('stream').Transform; util.inherits(SimpleProtocol, Transform); function SimpleProtocol(options) { @@ -1518,10 +1518,10 @@ For example, consider the following code: ```javascript // WARNING! BROKEN! -net.createServer(function(socket) { +net.createServer((socket) => { // we add an 'end' method, but never consume the data - socket.on('end', function() { + socket.on('end', () => { // It will never get here. socket.end('I got your message (but didnt read it)\n'); }); @@ -1538,9 +1538,9 @@ start the flow of data: ```javascript // Workaround -net.createServer(function(socket) { +net.createServer((socket) => { - socket.on('end', function() { + socket.on('end', () => { socket.end('I got your message (but didnt read it)\n'); }); @@ -1589,9 +1589,9 @@ respectively. These options can be used to implement parsers and serializers with Transform streams. ```javascript -var util = require('util'); -var StringDecoder = require('string_decoder').StringDecoder; -var Transform = require('stream').Transform; +const util = require('util'); +const StringDecoder = require('string_decoder').StringDecoder; +const Transform = require('stream').Transform; util.inherits(JSONParseStream, Transform); // Gets \n-delimited JSON string data, and emits the parsed objects diff --git a/doc/api/string_decoder.markdown b/doc/api/string_decoder.markdown index b58bcd2cf422c9..8bcba2cfbd51e9 100644 --- a/doc/api/string_decoder.markdown +++ b/doc/api/string_decoder.markdown @@ -6,13 +6,13 @@ To use this module, do `require('string_decoder')`. StringDecoder decodes a buffer to a string. It is a simple interface to `buffer.toString()` but provides additional support for utf8. - var StringDecoder = require('string_decoder').StringDecoder; - var decoder = new StringDecoder('utf8'); + const StringDecoder = require('string_decoder').StringDecoder; + const decoder = new StringDecoder('utf8'); - var cent = new Buffer([0xC2, 0xA2]); + const cent = new Buffer([0xC2, 0xA2]); console.log(decoder.write(cent)); - var euro = new Buffer([0xE2, 0x82, 0xAC]); + const euro = new Buffer([0xE2, 0x82, 0xAC]); console.log(decoder.write(euro)); ## Class: StringDecoder diff --git a/doc/api/synopsis.markdown b/doc/api/synopsis.markdown index 347b22e3cad284..4a051013c4a6e1 100644 --- a/doc/api/synopsis.markdown +++ b/doc/api/synopsis.markdown @@ -5,9 +5,9 @@ An example of a [web server][] written with Node.js which responds with `'Hello World'`: - var http = require('http'); + const http = require('http'); - http.createServer(function (request, response) { + http.createServer( (request, response) => { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello World\n'); }).listen(8124); diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 4c5d868685d3d9..7fb0a39961b406 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -249,11 +249,11 @@ established after addition of event listener. Here's an example for using TLS session resumption: var tlsSessionStore = {}; - server.on('newSession', function(id, data, cb) { + server.on('newSession', (id, data, cb) => { tlsSessionStore[id.toString('hex')] = data; cb(); }); - server.on('resumeSession', function(id, cb) { + server.on('resumeSession', (id, cb) => { cb(null, tlsSessionStore[id.toString('hex')] || null); }); @@ -581,10 +581,10 @@ The `callback` parameter will be added as a listener for the Here is an example of a client of echo server as described previously: - var tls = require('tls'); - var fs = require('fs'); + const tls = require('tls'); + const fs = require('fs'); - var options = { + const options = { // These are necessary only if using the client certificate authentication key: fs.readFileSync('client-key.pem'), cert: fs.readFileSync('client-cert.pem'), @@ -593,40 +593,40 @@ Here is an example of a client of echo server as described previously: ca: [ fs.readFileSync('server-cert.pem') ] }; - var socket = tls.connect(8000, options, function() { + var socket = tls.connect(8000, options, () => { console.log('client connected', socket.authorized ? 'authorized' : 'unauthorized'); process.stdin.pipe(socket); process.stdin.resume(); }); socket.setEncoding('utf8'); - socket.on('data', function(data) { + socket.on('data', (data) => { console.log(data); }); - socket.on('end', function() { + socket.on('end', () => { server.close(); }); Or - var tls = require('tls'); - var fs = require('fs'); + const tls = require('tls'); + const fs = require('fs'); - var options = { + const options = { pfx: fs.readFileSync('client.pfx') }; - var socket = tls.connect(8000, options, function() { + var socket = tls.connect(8000, options, () => { console.log('client connected', socket.authorized ? 'authorized' : 'unauthorized'); process.stdin.pipe(socket); process.stdin.resume(); }); socket.setEncoding('utf8'); - socket.on('data', function(data) { + socket.on('data', (data) => { console.log(data); }); - socket.on('end', function() { + socket.on('end', () => { server.close(); }); @@ -814,10 +814,10 @@ automatically set as a listener for the [`'secureConnection'`][] event. The Here is a simple example echo server: - var tls = require('tls'); - var fs = require('fs'); + const tls = require('tls'); + const fs = require('fs'); - var options = { + const options = { key: fs.readFileSync('server-key.pem'), cert: fs.readFileSync('server-cert.pem'), @@ -828,23 +828,23 @@ Here is a simple example echo server: ca: [ fs.readFileSync('client-cert.pem') ] }; - var server = tls.createServer(options, function(socket) { + var server = tls.createServer(options, (socket) => { console.log('server connected', socket.authorized ? 'authorized' : 'unauthorized'); - socket.write("welcome!\n"); + socket.write('welcome!\n'); socket.setEncoding('utf8'); socket.pipe(socket); }); - server.listen(8000, function() { + server.listen(8000, () => { console.log('server bound'); }); Or - var tls = require('tls'); - var fs = require('fs'); + const tls = require('tls'); + const fs = require('fs'); - var options = { + const options = { pfx: fs.readFileSync('server.pfx'), // This is necessary only if using the client certificate authentication. @@ -852,14 +852,14 @@ Or }; - var server = tls.createServer(options, function(socket) { + var server = tls.createServer(options, (socket) => { console.log('server connected', socket.authorized ? 'authorized' : 'unauthorized'); - socket.write("welcome!\n"); + socket.write('welcome!\n'); socket.setEncoding('utf8'); socket.pipe(socket); }); - server.listen(8000, function() { + server.listen(8000, () => { console.log('server bound'); }); You can test this server by connecting to it with `openssl s_client`: diff --git a/doc/api/tty.markdown b/doc/api/tty.markdown index 251742a0e1b89b..f01cedd702da9a 100644 --- a/doc/api/tty.markdown +++ b/doc/api/tty.markdown @@ -45,9 +45,9 @@ ever created (and only when `isatty(1)` is true). Emitted by `refreshSize()` when either of the `columns` or `rows` properties has changed. - process.stdout.on('resize', function() { + process.stdout.on('resize', () => { console.log('screen size has changed!'); - console.log(process.stdout.columns + 'x' + process.stdout.rows); + console.log(`${process.stdout.columns}x${process.stdout.rows}`); }); ### ws.columns diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 03386aefb5b78d..4574ae452b231b 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -53,7 +53,7 @@ comma. For example, `NODE_DEBUG=fs,net,tls`. Marks that a method should not be used any more. - var util = require('util'); + const util = require('util'); exports.puts = util.deprecate(function() { for (var i = 0, len = arguments.length; i < len; ++i) { @@ -123,8 +123,8 @@ prototype of `constructor` will be set to a new object created from As an additional convenience, `superConstructor` will be accessible through the `constructor.super_` property. - var util = require("util"); - var EventEmitter = require("events"); + const util = require('util'); + const EventEmitter = require('events'); function MyStream() { EventEmitter.call(this); @@ -133,7 +133,7 @@ through the `constructor.super_` property. util.inherits(MyStream, EventEmitter); MyStream.prototype.write = function(data) { - this.emit("data", data); + this.emit('data', data); } var stream = new MyStream(); @@ -141,10 +141,10 @@ through the `constructor.super_` property. console.log(stream instanceof EventEmitter); // true console.log(MyStream.super_ === EventEmitter); // true - stream.on("data", function(data) { - console.log('Received data: "' + data + '"'); + stream.on('data', (data) => { + console.log(`Received data: "${data}"`); }) - stream.write("It works!"); // Received data: "It works!" + stream.write('It works!'); // Received data: "It works!" ## util.inspect(object[, options]) @@ -168,7 +168,7 @@ formatted string: Example of inspecting all properties of the `util` object: - var util = require('util'); + const util = require('util'); console.log(util.inspect(util, { showHidden: true, depth: null })); @@ -207,11 +207,11 @@ There are also `bold`, `italic`, `underline` and `inverse` codes. Objects also may define their own `inspect(depth)` function which `util.inspect()` will invoke and use the result of when inspecting the object: - var util = require('util'); + const util = require('util'); var obj = { name: 'nate' }; obj.inspect = function(depth) { - return '{' + this.name + '}'; + return `{${this.name}}`; }; util.inspect(obj); @@ -237,7 +237,7 @@ Internal alias for [`Array.isArray`][]. Returns `true` if the given "object" is an `Array`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isArray([]) // true @@ -252,7 +252,7 @@ Returns `true` if the given "object" is an `Array`. `false` otherwise. Returns `true` if the given "object" is a `Boolean`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isBoolean(1) // false @@ -269,7 +269,7 @@ Use `Buffer.isBuffer()` instead. Returns `true` if the given "object" is a `Buffer`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isBuffer({ length: 0 }) // false @@ -284,7 +284,7 @@ Returns `true` if the given "object" is a `Buffer`. `false` otherwise. Returns `true` if the given "object" is a `Date`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isDate(new Date()) // true @@ -299,7 +299,7 @@ Returns `true` if the given "object" is a `Date`. `false` otherwise. Returns `true` if the given "object" is an [`Error`][]. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isError(new Error()) // true @@ -314,7 +314,7 @@ Returns `true` if the given "object" is an [`Error`][]. `false` otherwise. Returns `true` if the given "object" is a `Function`. `false` otherwise. - var util = require('util'); + const util = require('util'); function Foo() {} var Bar = function() {}; @@ -332,7 +332,7 @@ Returns `true` if the given "object" is a `Function`. `false` otherwise. Returns `true` if the given "object" is strictly `null`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isNull(0) // false @@ -347,7 +347,7 @@ Returns `true` if the given "object" is strictly `null`. `false` otherwise. Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isNullOrUndefined(0) // false @@ -362,7 +362,7 @@ Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise Returns `true` if the given "object" is a `Number`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isNumber(false) // false @@ -380,7 +380,7 @@ Returns `true` if the given "object" is a `Number`. `false` otherwise. Returns `true` if the given "object" is strictly an `Object` __and__ not a `Function`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isObject(5) // false @@ -397,7 +397,7 @@ Returns `true` if the given "object" is strictly an `Object` __and__ not a Returns `true` if the given "object" is a primitive type. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isPrimitive(5) // true @@ -424,7 +424,7 @@ Returns `true` if the given "object" is a primitive type. `false` otherwise. Returns `true` if the given "object" is a `RegExp`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isRegExp(/some regexp/) // true @@ -439,7 +439,7 @@ Returns `true` if the given "object" is a `RegExp`. `false` otherwise. Returns `true` if the given "object" is a `String`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isString('') // true @@ -456,7 +456,7 @@ Returns `true` if the given "object" is a `String`. `false` otherwise. Returns `true` if the given "object" is a `Symbol`. `false` otherwise. - var util = require('util'); + const util = require('util'); util.isSymbol(5) // false @@ -471,7 +471,7 @@ Returns `true` if the given "object" is a `Symbol`. `false` otherwise. Returns `true` if the given "object" is `undefined`. `false` otherwise. - var util = require('util'); + const util = require('util'); var foo; util.isUndefined(5) diff --git a/doc/api/v8.markdown b/doc/api/v8.markdown index 1cee348ba1ca9d..70abd6c6473f24 100644 --- a/doc/api/v8.markdown +++ b/doc/api/v8.markdown @@ -35,7 +35,7 @@ Usage: ``` // Print GC events to stdout for one minute. -var v8 = require('v8'); +const v8 = require('v8'); v8.setFlagsFromString('--trace_gc'); setTimeout(function() { v8.setFlagsFromString('--notrace_gc'); }, 60e3); ``` diff --git a/doc/api/vm.markdown b/doc/api/vm.markdown index 592d42d9151874..8fbcc045193e10 100644 --- a/doc/api/vm.markdown +++ b/doc/api/vm.markdown @@ -6,7 +6,7 @@ You can access this module with: - var vm = require('vm'); + const vm = require('vm'); JavaScript code can be compiled and run immediately or compiled, saved, and run later. @@ -48,8 +48,8 @@ and returns the result. Running code does not have access to local scope. Example: compile code that increments a global variable and sets one, then execute the code multiple times. These globals are contained in the sandbox. - var util = require('util'); - var vm = require('vm'); + const util = require('util'); + const vm = require('vm'); var sandbox = { animal: 'cat', @@ -85,14 +85,14 @@ Example: compile code that sets a global variable, then execute the code multiple times in different contexts. These globals are set on and contained in the sandboxes. - var util = require('util'); - var vm = require('vm'); + const util = require('util'); + const vm = require('vm'); - var sandboxes = [{}, {}, {}]; + const sandboxes = [{}, {}, {}]; - var script = new vm.Script('globalVar = "set"'); + const script = new vm.Script('globalVar = "set"'); - sandboxes.forEach(function (sandbox) { + sandboxes.forEach((sandbox) => { script.runInNewContext(sandbox); }); @@ -114,11 +114,11 @@ current `global` object. Example of using `script.runInThisContext` to compile code once and run it multiple times: - var vm = require('vm'); + const vm = require('vm'); global.globalVar = 0; - var script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); + const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); for (var i = 0; i < 1000; ++i) { script.runInThisContext(); @@ -176,10 +176,10 @@ returns the result. Running code does not have access to local scope. The Example: compile and execute different scripts in a single existing context. - var util = require('util'); - var vm = require('vm'); + const util = require('util'); + const vm = require('vm'); - var sandbox = { globalVar: 1 }; + const sandbox = { globalVar: 1 }; vm.createContext(sandbox); for (var i = 0; i < 10; ++i) { @@ -198,7 +198,7 @@ separate process. `vm.runInDebugContext` compiles and executes `code` inside the V8 debug context. The primary use case is to get access to the V8 debug object: - var Debug = vm.runInDebugContext('Debug'); + const Debug = vm.runInDebugContext('Debug'); Debug.scripts().forEach(function(script) { console.log(script.name); }); Note that the debug context and object are intrinsically tied to V8's debugger @@ -217,10 +217,10 @@ the sandbox as the global object and returns the result. Example: compile and execute code that increments a global variable and sets a new one. These globals are contained in the sandbox. - var util = require('util'); - var vm = require('vm'); + const util = require('util'); + const vm = require('vm'); - var sandbox = { + const sandbox = { animal: 'cat', count: 2 }; @@ -242,14 +242,14 @@ code does not have access to local scope, but does have access to the current Example of using `vm.runInThisContext` and `eval` to run the same code: - var vm = require('vm'); + const vm = require('vm'); var localVar = 'initial value'; - var vmResult = vm.runInThisContext('localVar = "vm";'); + const vmResult = vm.runInThisContext('localVar = "vm";'); console.log('vmResult: ', vmResult); console.log('localVar: ', localVar); - var evalResult = eval('localVar = "eval";'); + const evalResult = eval('localVar = "eval";'); console.log('evalResult: ', evalResult); console.log('localVar: ', localVar); diff --git a/doc/api/zlib.markdown b/doc/api/zlib.markdown index 8d4d7e87e3918f..31d61a0c759ee6 100644 --- a/doc/api/zlib.markdown +++ b/doc/api/zlib.markdown @@ -4,7 +4,7 @@ You can access this module with: - var zlib = require('zlib'); + const zlib = require('zlib'); This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and @@ -15,24 +15,24 @@ is a readable/writable Stream. Compressing or decompressing a file can be done by piping an fs.ReadStream into a zlib stream, then into an fs.WriteStream. - var gzip = zlib.createGzip(); - var fs = require('fs'); - var inp = fs.createReadStream('input.txt'); - var out = fs.createWriteStream('input.txt.gz'); + const gzip = zlib.createGzip(); + const fs = require('fs'); + const inp = fs.createReadStream('input.txt'); + const out = fs.createWriteStream('input.txt.gz'); inp.pipe(gzip).pipe(out); Compressing or decompressing data in one step can be done by using the convenience methods. - var input = '.................................'; + const input = '.................................'; zlib.deflate(input, function(err, buffer) { if (!err) { console.log(buffer.toString('base64')); } }); - var buffer = new Buffer('eJzT0yMAAGTvBe8=', 'base64'); + const buffer = new Buffer('eJzT0yMAAGTvBe8=', 'base64'); zlib.unzip(buffer, function(err, buffer) { if (!err) { console.log(buffer.toString()); @@ -48,14 +48,14 @@ ought to be cached. See [Memory Usage Tuning][] below for more information on the speed/memory/compression tradeoffs involved in zlib usage. // client request example - var zlib = require('zlib'); - var http = require('http'); - var fs = require('fs'); - var request = http.get({ host: 'izs.me', + const zlib = require('zlib'); + const http = require('http'); + const fs = require('fs'); + const request = http.get({ host: 'izs.me', path: '/', port: 80, headers: { 'accept-encoding': 'gzip,deflate' } }); - request.on('response', function(response) { + request.on('response', (response) => { var output = fs.createWriteStream('izs.me_index.html'); switch (response.headers['content-encoding']) { @@ -75,10 +75,10 @@ on the speed/memory/compression tradeoffs involved in zlib usage. // server example // Running a gzip operation on every request is quite expensive. // It would be much more efficient to cache the compressed buffer. - var zlib = require('zlib'); - var http = require('http'); - var fs = require('fs'); - http.createServer(function(request, response) { + const zlib = require('zlib'); + const http = require('http'); + const fs = require('fs'); + http.createServer((request, response) => { var raw = fs.createReadStream('index.html'); var acceptEncoding = request.headers['accept-encoding']; if (!acceptEncoding) { From 9bbad89ce8a5c4d1eb14bcab1bd326f41d58da7b Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Mon, 14 Dec 2015 18:33:47 -0600 Subject: [PATCH 087/262] test: add test for tls.parseCertString It does not currently have any explicit tests to verify the behavior. PR-URL: https://github.com/nodejs/node/pull/4283 Reviewed-By: Ben Noordhuis --- test/parallel/test-tls-parse-cert-string.js | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/parallel/test-tls-parse-cert-string.js diff --git a/test/parallel/test-tls-parse-cert-string.js b/test/parallel/test-tls-parse-cert-string.js new file mode 100644 index 00000000000000..57180c9ce9df56 --- /dev/null +++ b/test/parallel/test-tls-parse-cert-string.js @@ -0,0 +1,26 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const tls = require('tls'); + +const singles = 'C=US\nST=CA\nL=SF\nO=Node.js Foundation\nOU=Node.js\nCN=ca1\n' + + 'emailAddress=ry@clouds.org'; +const singlesOut = tls.parseCertString(singles); +assert.deepEqual(singlesOut, { + C: 'US', + ST: 'CA', + L: 'SF', + O: 'Node.js Foundation', + OU: 'Node.js', + CN: 'ca1', + emailAddress: 'ry@clouds.org' +}); + +const doubles = 'OU=Domain Control Validated\nOU=PositiveSSL Wildcard\n' + + 'CN=*.nodejs.org'; +const doublesOut = tls.parseCertString(doubles); +assert.deepEqual(doublesOut, { + OU: [ 'Domain Control Validated', 'PositiveSSL Wildcard' ], + CN: '*.nodejs.org' +}); From c765db1c364a51bd0c8b7e80f313f3cfbf825c8e Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Tue, 15 Dec 2015 11:12:21 +0800 Subject: [PATCH 088/262] doc: document the cache parameter for fs.realpathSync PR-URL: https://github.com/nodejs/node/pull/4285 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/fs.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 8a84d6f1e82c7b..6b505dcadfa313 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -634,7 +634,9 @@ Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`. ## fs.realpathSync(path[, cache]) -Synchronous realpath(2). Returns the resolved path. +Synchronous realpath(2). Returns the resolved path. `cache` is an +object literal of mapped paths that can be used to force a specific path +resolution or avoid additional `fs.stat` calls for known real paths. ## fs.rename(oldPath, newPath, callback) From acad4152a2b4dbf12b0c16038c74ee5045b4d702 Mon Sep 17 00:00:00 2001 From: ronkorving Date: Wed, 16 Dec 2015 11:09:13 +0900 Subject: [PATCH 089/262] udp: remove a needless instanceof Buffer check When a string is passed to udpsock.send, it is automatically converted to a Buffer. In that case, it is no longer needed to test whether or not the argument is a Buffer or not. PR-URL: https://github.com/nodejs/node/pull/4301 Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: Roman Reiss --- lib/dgram.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dgram.js b/lib/dgram.js index eaf84272d16284..161f908eae547e 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -252,8 +252,7 @@ Socket.prototype.send = function(buffer, if (typeof buffer === 'string') buffer = new Buffer(buffer); - - if (!(buffer instanceof Buffer)) + else if (!(buffer instanceof Buffer)) throw new TypeError('First argument must be a buffer or string.'); offset = offset | 0; From d45dfb4fe63d2ec224e2755a27de27c072ade096 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 16 Dec 2015 15:20:46 +0100 Subject: [PATCH 090/262] test: fix debug-port-cluster flakiness Rewrite the test so that stderr reordering of the child processes won't confuse the test's expectations. PR-URL: https://github.com/nodejs/node/pull/4310 Reviewed-By: Colin Ihrig --- test/parallel/test-debug-port-cluster.js | 48 +++++++----------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/test/parallel/test-debug-port-cluster.js b/test/parallel/test-debug-port-cluster.js index 5bec9dc720599e..912f06d6dc6dd5 100644 --- a/test/parallel/test-debug-port-cluster.js +++ b/test/parallel/test-debug-port-cluster.js @@ -3,47 +3,25 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var port = common.PORT + 1337; +const PORT_MIN = common.PORT + 1337; +const PORT_MAX = PORT_MIN + 2; var args = [ - '--debug=' + port, + '--debug=' + PORT_MIN, common.fixturesDir + '/clustered-server/app.js' ]; -var child = spawn(process.execPath, args); -var outputLines = []; +const child = spawn(process.execPath, args); +child.stderr.setEncoding('utf8'); -child.stderr.on('data', function(data) { - var lines = data.toString().replace(/\r/g, '').trim().split('\n'); - var line = lines[0]; - - lines.forEach(function(ln) { console.log('> ' + ln); } ); - - if (line === 'all workers are running') { - assertOutputLines(); - process.exit(); - } else { - outputLines = outputLines.concat(lines); - } -}); - -process.on('exit', function onExit() { - child.kill(); +let stderr = ''; +child.stderr.on('data', data => { + stderr += data; + if (child.killed !== true && stderr.includes('all workers are running')) + child.kill(); }); -var assertOutputLines = common.mustCall(function() { - var expectedLines = [ - 'Debugger listening on port ' + port, - 'Debugger listening on port ' + (port + 1), - 'Debugger listening on port ' + (port + 2), - ]; - - // Do not assume any particular order of output messages, - // since workers can take different amout of time to - // start up - outputLines.sort(); - - assert.equal(outputLines.length, expectedLines.length); - for (var i = 0; i < expectedLines.length; i++) - assert.equal(outputLines[i], expectedLines[i]); +process.on('exit', () => { + for (let port = PORT_MIN; port <= PORT_MAX; port += 1) + assert(stderr.includes(`Debugger listening on port ${port}`)); }); From 6f35feff0a342e59f529539f1bf4543e6d72aea0 Mon Sep 17 00:00:00 2001 From: chrisjohn404 Date: Thu, 17 Dec 2015 01:11:48 -0700 Subject: [PATCH 091/262] doc: Typo in buffer.markdown referencing buf.write() The buffer's write function is documented below the buf.toString function and all of the docs reference "buf" instead of "buffer". PR-URL: https://github.com/nodejs/node/pull/4324 Reviewed-By: James M Snell --- doc/api/buffer.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index afef2fc4978992..6fa7f7c9946965 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -598,7 +598,7 @@ defaults to `'utf8'`. The `start` and `end` parameters default to `0` and buf.toString('utf8',0,5); // outputs: abcde buf.toString(undefined,0,5); // encoding defaults to 'utf8', outputs abcde -See `buffer.write()` example, above. +See `buf.write()` example, below. ### buf.toJSON() From ff5b4a421d4dfbf6b0ff60efecfbff995481c11c Mon Sep 17 00:00:00 2001 From: Nicholas Young Date: Thu, 17 Dec 2015 09:38:44 -0600 Subject: [PATCH 092/262] doc: fix link in addons.markdown Update link from github.com/rvagg to github.com/nodejs PR-URL: https://github.com/nodejs/node/pull/4331 Reviewed-By: James M Snell --- doc/api/addons.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index c97129d4398660..1d93b16599936a 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -870,7 +870,7 @@ Test in JavaScript by running: [online]: https://v8docs.nodesource.com/ [libuv]: https://github.com/libuv/libuv -[download]: https://github.com/rvagg/node-addon-examples +[download]: https://github.com/nodejs/node-addon-examples [node-gyp]: https://github.com/nodejs/node-gyp [v8 reference]: http://izs.me/v8-docs/main.html [Embedder's Guide]: http://code.google.com/apis/v8/embed.html From 01752ce829553868d2bd1979180cf2d3e99bd981 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 20 Dec 2015 09:02:08 -0800 Subject: [PATCH 093/262] doc: catch the WORKING_GROUPS.md bootstrap docs up to date * Link to the separate CODE_OF_CONDUCT.md file in nodejs/node * Link to the ModerationPolicy.md file in nodejs/TSC PR-URL: https://github.com/nodejs/node/pull/4367 Reviewed-By: Trevor Norris --- WORKING_GROUPS.md | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/WORKING_GROUPS.md b/WORKING_GROUPS.md index aa573844b790a9..9d518db1351acc 100644 --- a/WORKING_GROUPS.md +++ b/WORKING_GROUPS.md @@ -452,40 +452,13 @@ By making a contribution to this project, I certify that: * (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. +### Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. ### Code of Conduct -This Code of Conduct is adapted from [Rust's wonderful -CoC](https://github.com/rust-lang/rust/wiki/Note-development-policy#conduct). - -* We are committed to providing a friendly, safe and welcoming - environment for all, regardless of gender, sexual orientation, - disability, ethnicity, religion, or similar personal characteristic. -* Please avoid using overtly sexual nicknames or other nicknames that - might detract from a friendly, safe and welcoming environment for - all. -* Please be kind and courteous. There's no need to be mean or rude. -* Respect that people have differences of opinion and that every - design or implementation choice carries a trade-off and numerous - costs. There is seldom a right answer. -* Please keep unstructured critique to a minimum. If you have solid - ideas you want to experiment with, make a fork and see how it works. -* We will exclude you from interaction if you insult, demean or harass - anyone. That is not welcome behaviour. We interpret the term - "harassment" as including the definition in the [Citizen Code of - Conduct](http://citizencodeofconduct.org/); if you have any lack of - clarity about what might be included in that concept, please read - their definition. In particular, we don't tolerate behavior that - excludes people in socially marginalized groups. -* Private harassment is also unacceptable. No matter who you are, if - you feel you have been or are being harassed or made uncomfortable - by a community member, please contact one of the channel ops or any - of the TC members immediately with a capture (log, photo, email) of - the harassment if possible. Whether you're a regular contributor or - a newcomer, we care about making this community a safe place for you - and we've got your back. -* Likewise any spamming, trolling, flaming, baiting or other - attention-stealing behaviour is not welcome. -* Avoid the use of personal pronouns in code comments or - documentation. There is no need to address persons when explaining - code (e.g. "When the developer") +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 From 956facb231dc67fdc08fce40a97e1d853c8c3036 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 21 Dec 2015 13:52:39 -0800 Subject: [PATCH 094/262] doc: copyedit releases.md PR-URL: https://github.com/nodejs/node/pull/4384 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Rod Vagg Reviewed-By: Colin Ihrig --- doc/releases.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/releases.md b/doc/releases.md index 2adbdcbcd2d77f..57e95c266f4ff6 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -1,11 +1,11 @@ Node.js Release Process ===================== -This document describes the technical aspects of the node.js release process. The intended audience is those who have been authorized by the Node.js Foundation Technical Steering Committee (TSC) to create, promote and sign official release builds for node.js, hosted on . +This document describes the technical aspects of the Node.js release process. The intended audience is those who have been authorized by the Node.js Foundation Technical Steering Committee (TSC) to create, promote, and sign official release builds for Node.js, hosted on . ## Who can make a release? -Release authorization is given by the node.js TSC. Once authorized, an individual must be have the following: +Release authorization is given by the Node.js TSC. Once authorized, an individual must be have the following: ### 1. Jenkins Release Access @@ -17,23 +17,23 @@ There are three relevant Jenkins jobs that should be used for a release flow: **c.** **Release builds:** **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** does all of the work to build all required release assets. Promotion of the release files is a manual step once they are ready (see below). -The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. +The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TSC. ### 2. Access -The _dist_ user on nodejs.org controls the assets available in (note that is an alias for ). +The _dist_ user on nodejs.org controls the assets available in . is an alias for . -The Jenkins release build slaves upload their artifacts to the web server as the _staging_ user, the _dist_ user has access to move these assets to public access (the _staging_ user does not, for security purposes). +The Jenkins release build slaves upload their artifacts to the web server as the _staging_ user. The _dist_ user has access to move these assets to public access while, for security, the _staging_ user does not. Nightly builds are promoted automatically on the server by a cron task for the _dist_ user. -Release builds require manual promotion by an individual with SSH access to the server as the _dist_ user. The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. +Release builds require manual promotion by an individual with SSH access to the server as the _dist_ user. The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TSC. ### 3. A Publicly Listed GPG Key -A SHASUMS256.txt file is produced for every promoted build, nightly and releases. Additionally for releases, this file is signed by the individual responsible for that release. In order to be able to verify downloaded binaries, the public should be able to check that the SHASUMS256.txt file has been signed by someone who has been authorized to create a release. +A SHASUMS256.txt file is produced for every promoted build, nightly, and releases. Additionally for releases, this file is signed by the individual responsible for that release. In order to be able to verify downloaded binaries, the public should be able to check that the SHASUMS256.txt file has been signed by someone who has been authorized to create a release. -The GPG keys should be fetchable from a known third-party keyserver, currently the SKS Keyservers at are recommended. Use the [submission](https://sks-keyservers.net/i/#submit) form to submit a new GPG key. Keys should be fetchable via: +The GPG keys should be fetchable from a known third-party keyserver. The SKS Keyservers at are recommended. Use the [submission](https://sks-keyservers.net/i/#submit) form to submit a new GPG key. Keys should be fetchable via: ``` gpg --keyserver pool.sks-keyservers.net --recv-keys @@ -48,7 +48,7 @@ Additionally, full GPG key fingerprints for individuals authorized to release sh Notes: - Dates listed below as _"YYYY-MM-DD"_ should be the date of the release **as UTC**. Use `date -u +'%Y-%m-%d'` to find out what this is. - - Version strings are listed below as _"vx.y.z"_, substitute for the release version. + - Version strings are listed below as _"vx.y.z"_. Substitute for the release version. ### 1. Ensure that HEAD Is Stable @@ -56,7 +56,7 @@ Run a **[node-test-pull-request](https://ci.nodejs.org/job/node-test-pull-reques ### 2. Produce a Nightly Build _(optional)_ -If there is a reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** and wait for it to drop in . Follow the directions and enter a proper length commit sha, a date string and select "nightly" for "disttype". +If there is a reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** and wait for it to drop in . Follow the directions and enter a proper length commit SHA, enter a date string, and select "nightly" for "disttype". This is particularly recommended if there has been recent work relating to the OS X or Windows installers as they are not tested in any way by CI. @@ -123,7 +123,7 @@ This macro is used to signal an ABI version for native addons. It currently has The general rule is to bump this version when there are _breaking ABI_ changes and also if there are non-trivial API changes. The rules are not yet strictly defined, so if in doubt, please confer with someone that will have a more informed perspective, such as a member of the NAN team. -**Note** that it is current TSC policy to bump major version when ABI changes. If you see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC, commits may need to be reverted or a major version bump may need to happen. +**Note** that it is current TSC policy to bump major version when ABI changes. If you see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC. Commits may need to be reverted or a major version bump may need to happen. ### 5. Create Release Commit @@ -141,7 +141,7 @@ Notable changes: ### 6. Push to GitHub -Note that it is not essential that the release builds be created from the Node.js repository, they may be created from your own fork if you desire. It is preferable, but not essential that the commits remain the same between that used to build and the tagged commit in the Node.js repository. +Note that it is not essential that the release builds be created from the Node.js repository. They may be created from your own fork if you desire. It is preferable, but not essential, that the commits remain the same between that used to build and the tagged commit in the Node.js repository. ### 7. Produce Release Builds @@ -149,11 +149,11 @@ Use **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** to produce relea Artifacts from each slave are uploaded to Jenkins and are available if further testing is required. Use this opportunity particularly to test OS X and Windows installers if there are any concerns. Click through to the individual slaves for a run to find the artifacts. -All release slaves should achieve "SUCCESS" (and be green, not red). A release with failures should not be promoted, there are likely problems to be investigated. +All release slaves should achieve "SUCCESS" (and be green, not red). A release with failures should not be promoted as there are likely problems to be investigated. You can rebuild the release as many times as you need prior to promoting them if you encounter problems. -Note that you do not have to wait for the ARM builds if they are take longer than the others. It is only necessary to have the main Linux (x64 and x86), OS X .pkg and .tar.gz, Windows (x64 and x86) .msi and .exe, source, headers and docs (both produced currently by an OS X slave). i.e. the slaves with "arm" in their name don't need to have finished to progress to the next step. However, **if you promote builds _before_ ARM builds have finished, you must repeat the promotion step for the ARM builds when they are ready**. +Note that you do not have to wait for the ARM builds if they take longer than the others. It is only necessary to have the main Linux (x64 and x86), OS X .pkg and .tar.gz, Windows (x64 and x86) .msi and .exe, source, headers and docs (both produced currently by an OS X slave). That is, the slaves with "arm" in their name don't need to have finished to progress to the next step. However, **if you promote builds _before_ ARM builds have finished, you must repeat the promotion step for the ARM builds when they are ready**. ### 8. Tag and Sign the Release Commit @@ -188,29 +188,29 @@ This sets up the branch so that nightly builds are produced with the next versio **It is important that the same individual who signed the release tag be the one to promote the builds as the SHASUMS256.txt file needs to be signed with the same GPG key!** -When you are confident that the build slaves have properly produced usable artifacts and uploaded them to the web server you can promote them to release status. This is done by interacting with the web server via the _dist_ user. +When you are confident that the build slaves have properly produced usable artifacts and uploaded them to the web server, you can promote them to release status. This is done by interacting with the web server via the _dist_ user. The _tools/release.sh_ script should be used to promote and sign the build. When run, it will perform the following actions: -**a.** Select a GPG key from your private keys, it will use a command similar to: `gpg --list-secret-keys` to list your keys. If you don't have any keys, it will bail (why are you releasing? Your tag should be signed!). If you have only one key, it will use that. If you have more than one key it will ask you to select one from the list. Be sure to use the same key that you signed your git tag with. +**a.** Select a GPG key from your private keys. It will use a command similar to: `gpg --list-secret-keys` to list your keys. If you don't have any keys, it will bail. (Why are you releasing? Your tag should be signed!) If you have only one key, it will use that. If you have more than one key it will ask you to select one from the list. Be sure to use the same key that you signed your git tag with. **b.** Log in to the server via SSH and check for releases that can be promoted, along with the list of artifacts. It will use the `dist-promotable` command on the server to find these. You will be asked, for each promotable release, whether you want to proceed. If there is more than one release to promote (there shouldn't be), be sure to only promote the release you are responsible for. **c.** Log in to the server via SSH and run the promote script for the given release. The command on the server will be similar to: `dist-promote vx.y.z`. After this step, the release artifacts will be available for download and a SHASUMS256.txt file will be present. The release will still be unsigned, however. -**d.** Download SHASUMS256.txt to your computer using SCP into a temporary directory. +**d.** Use `scp` to download SHASUMS256.txt to a temporary directory on your computer. -**e.** Sign the SHASUMS256.txt file using a command similar to: `gpg --default-key YOURKEY --clearsign /path/to/SHASUMS256.txt`. You will be prompted by GPG for your password for this to work. The signed file will be named SHASUMS256.txt.asc. +**e.** Sign the SHASUMS256.txt file using a command similar to: `gpg --default-key YOURKEY --clearsign /path/to/SHASUMS256.txt`. You will be prompted by GPG for your password. The signed file will be named SHASUMS256.txt.asc. -**f.** Output an ASCII armored version of your public GPG key, using a command similar to: `gpg --default-key YOURKEY --armor --export --output /path/to/SHASUMS256.txt.gpg`. This does not require your password and is mainly a convenience for users although not the recommended way to get a copy of your key. +**f.** Output an ASCII armored version of your public GPG key using a command similar to: `gpg --default-key YOURKEY --armor --export --output /path/to/SHASUMS256.txt.gpg`. This does not require your password and is mainly a convenience for users, although not the recommended way to get a copy of your key. **g.** Upload the SHASUMS256.txt\* files back to the server into the release directory. -If you didn't wait for ARM builds in the previous step before promoting the release, you should re-run _tools/release.sh_ after the ARM builds have finished and it will move the ARM artifacts into the correct location and you will be prompted to re-sign SHASUMS256.txt. +If you didn't wait for ARM builds in the previous step before promoting the release, you should re-run _tools/release.sh_ after the ARM builds have finished. That will move the ARM artifacts into the correct location. You will be prompted to re-sign SHASUMS256.txt. ### 11. Check the Release -Your release should be available at and also . Check that the appropriate files are in place, you may also want to check that the binaries are working as appropriate and have the right internal version strings. Check that the API docs are available at . Check that the release catalog files are correct at and . +Your release should be available at and . Check that the appropriate files are in place. You may want to check that the binaries are working as appropriate and have the right internal version strings. Check that the API docs are available at . Check that the release catalog files are correct at and . ### 12. Announce From 093bdcb8e1415c0caffa3c7783f8ade6385bff2d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 16 Oct 2015 22:32:06 +1100 Subject: [PATCH 095/262] src: refactor vcbuild configure args creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove a bunch of variables and rely on %configure_flags% where possible, also allow for an external %config_flags% variable to supply additional arguments to configure to match the behaviour of the Makefile PR-URL: https://github.com/nodejs/node/pull/3399 Reviewed-By: Johan Bergström Reviewed-By: James M Snell Reviewed-By: João Reis --- vcbuild.bat | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index a9b8774a6c4dc0..4311dfdee01b23 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -15,8 +15,6 @@ if /i "%1"=="/?" goto help set config=Release set target=Build set target_arch=x86 -set debug_arg= -set snapshot_arg= set noprojgen= set nobuild= set nosign= @@ -28,15 +26,14 @@ set licensertf= set jslint= set buildnodeweak= set noetw= -set noetw_arg= set noetw_msi_arg= set noperfctr= -set noperfctr_arg= set noperfctr_msi_arg= set i18n_arg= set download_arg= set release_urls_arg= set build_release= +set configure_flags= :next-arg if "%1"=="" goto args-done @@ -62,7 +59,6 @@ if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc internet pummel&set buildnodeweak=1&set jslint=1&goto arg-ok if /i "%1"=="jslint" set jslint=1&goto arg-ok -@rem Include small-icu support with MSI installer if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok if /i "%1"=="build-release" set build_release=1&goto arg-ok if /i "%1"=="upload" set upload=1&goto arg-ok @@ -89,15 +85,18 @@ if defined build_release ( set i18n_arg=small-icu ) -if "%config%"=="Debug" set debug_arg=--debug -if defined nosnapshot set snapshot_arg=--without-snapshot -if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1 -if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1 -if defined RELEASE_URLBASE set release_urlbase_arg=--release-urlbase=%RELEASE_URLBASE% +if "%config%"=="Debug" set configure_flags=%configure_flags% --debug +if defined nosnapshot set configure_flags=%configure_flags% --without-snapshot +if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_msi_arg=/p:NoETW=1 +if defined noperfctr set configure_flags=%configure_flags% --without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1 +if defined release_urlbase set release_urlbase_arg=--release-urlbase=%release_urlbase% +if defined download_arg set configure_flags=%configure_flags% %download_arg% -if "%i18n_arg%"=="full-icu" set i18n_arg=--with-intl=full-icu -if "%i18n_arg%"=="small-icu" set i18n_arg=--with-intl=small-icu -if "%i18n_arg%"=="intl-none" set i18n_arg=--with-intl=none +if "%i18n_arg%"=="full-icu" set configure_flags=%configure_flags% --with-intl=full-icu +if "%i18n_arg%"=="small-icu" set configure_flags=%configure_flags% --with-intl=small-icu +if "%i18n_arg%"=="intl-none" set configure_flags=%configure_flags% --with-intl=none + +if defined config_flags set configure_flags=%configure_flags% %config_flags% if not exist "%~dp0deps\icu" goto no-depsicu if "%target%"=="Clean" echo deleting %~dp0deps\icu @@ -168,7 +167,8 @@ goto run if defined noprojgen goto msbuild @rem Generate the VS project. -python configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG% +echo configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% +python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% if errorlevel 1 goto create-msvs-files-failed if not exist node.sln goto create-msvs-files-failed echo Project files generated. From c23dea8a32c38e30a516508ddca8b8482b575f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Sun, 13 Dec 2015 12:07:04 +0100 Subject: [PATCH 096/262] deps: upgrade libuv to 1.8.0 Fixes: https://github.com/nodejs/node/issues/3718 PR-URL: https://github.com/nodejs/node/pull/4276 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- deps/uv/AUTHORS | 15 ++ deps/uv/ChangeLog | 99 ++++++++ deps/uv/Makefile.am | 1 + deps/uv/README.md | 2 +- deps/uv/appveyor.yml | 2 +- deps/uv/common.gypi | 1 - deps/uv/configure.ac | 2 +- deps/uv/docs/src/fs.rst | 10 + deps/uv/docs/src/misc.rst | 38 +++ deps/uv/docs/src/tcp.rst | 2 +- deps/uv/gyp_uv.py | 3 - deps/uv/include/uv-version.h | 4 +- deps/uv/include/uv.h | 14 +- deps/uv/src/inet.c | 4 - deps/uv/src/queue.h | 14 ++ deps/uv/src/threadpool.c | 7 +- deps/uv/src/unix/android-ifaddrs.c | 2 +- deps/uv/src/unix/async.c | 8 +- deps/uv/src/unix/atomic-ops.h | 5 + deps/uv/src/unix/core.c | 39 ++- deps/uv/src/unix/darwin.c | 4 +- deps/uv/src/unix/dl.c | 9 +- deps/uv/src/unix/freebsd.c | 6 +- deps/uv/src/unix/fs.c | 83 +++++-- deps/uv/src/unix/fsevents.c | 43 ++-- deps/uv/src/unix/linux-core.c | 4 +- deps/uv/src/unix/linux-inotify.c | 42 +++- deps/uv/src/unix/linux-syscalls.c | 8 +- deps/uv/src/unix/linux-syscalls.h | 4 +- deps/uv/src/unix/loop-watcher.c | 7 +- deps/uv/src/unix/netbsd.c | 4 +- deps/uv/src/unix/openbsd.c | 6 +- deps/uv/src/unix/process.c | 11 + deps/uv/src/unix/signal.c | 2 + deps/uv/src/unix/stream.c | 4 +- deps/uv/src/unix/sunos.c | 4 +- deps/uv/src/unix/tty.c | 9 + deps/uv/src/unix/udp.c | 4 +- deps/uv/src/uv-common.c | 27 ++- deps/uv/src/uv-common.h | 4 + deps/uv/src/win/error.c | 1 + deps/uv/src/win/fs-event.c | 23 +- deps/uv/src/win/fs.c | 215 +++++++++++++---- deps/uv/src/win/getaddrinfo.c | 13 +- deps/uv/src/win/internal.h | 1 + deps/uv/src/win/pipe.c | 8 +- deps/uv/src/win/snprintf.c | 42 ++++ deps/uv/src/win/tty.c | 2 +- deps/uv/src/win/util.c | 12 + deps/uv/src/win/winapi.c | 4 + deps/uv/src/win/winapi.h | 7 + deps/uv/test/runner-win.h | 10 +- deps/uv/test/runner.c | 2 + deps/uv/test/task.h | 38 +-- deps/uv/test/test-emfile.c | 15 +- deps/uv/test/test-fs-event.c | 28 ++- deps/uv/test/test-fs.c | 142 ++++++++++- deps/uv/test/test-get-loadavg.c | 3 +- deps/uv/test/test-getaddrinfo.c | 6 +- deps/uv/test/test-getnameinfo.c | 4 +- deps/uv/test/test-ipc-send-recv.c | 291 ++++++++++++++++++----- deps/uv/test/test-list.h | 10 + deps/uv/test/test-mutexes.c | 104 +++++--- deps/uv/test/test-process-title.c | 2 +- deps/uv/test/test-queue-foreach-delete.c | 200 ++++++++++++++++ deps/uv/test/test-spawn.c | 10 +- deps/uv/test/test-tcp-try-write.c | 5 + deps/uv/test/test-tcp-write-fail.c | 2 +- deps/uv/test/test-threadpool-cancel.c | 3 +- deps/uv/test/test-tty.c | 3 + deps/uv/test/test-udp-ipv6.c | 21 ++ deps/uv/test/test-udp-multicast-join6.c | 2 +- deps/uv/uv.gyp | 8 + 73 files changed, 1449 insertions(+), 345 deletions(-) create mode 100644 deps/uv/src/win/snprintf.c create mode 100644 deps/uv/test/test-queue-foreach-delete.c diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index b2397e2df6de5f..8dc3955cad5bf3 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -225,3 +225,18 @@ Colin Snover Sakthipriyan Vairamani Eli Skeggs nmushell +Gireesh Punathil +Ryan Johnston +Adam Stylinski +Nathan Corvino +Wink Saville +Angel Leon +Louis DeJardin +Imran Iqbal +Petka Antonov +Ian Kronquist +kkdaemon +Yuval Brik +Joran Dirk Greef +Andrey Mazo +sztomi diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index 42f10352b1cb35..af0743af72c8db 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,3 +1,102 @@ +2015.12.15, Version 1.8.0 (Stable), 5467299450ecf61635657557b6e01aaaf6c3fdf4 + +Changes since version 1.7.5: + +* unix: fix memory leak in uv_interface_addresses (Jianghua Yang) + +* unix: make uv_guess_handle work properly for AIX (Gireesh Punathil) + +* fs: undo uv__req_init when uv__malloc failed (Jianghua Yang) + +* build: remove unused 'component' GYP option (Saúl Ibarra Corretgé) + +* include: remove duplicate extern declaration (Jianghua Yang) + +* win: use the MSVC provided snprintf where possible (Jason Williams) + +* win, test: fix compilation warning (Saúl Ibarra Corretgé) + +* win: fix compilation with VS < 2012 (Ryan Johnston) + +* stream: support empty uv_try_write on unix (Fedor Indutny) + +* unix: fix request handle leak in uv__udp_send (Jianghua Yang) + +* src: replace QUEUE_SPLIT with QUEUE_MOVE (Ben Noordhuis) + +* unix: use QUEUE_MOVE when iterating over lists (Ben Noordhuis) + +* unix: squelch harmless valgrind warning (Ben Noordhuis) + +* test: don't abort on setrlimit() failure (Ben Noordhuis) + +* unix: only undo fs req registration in async mode (Ben Noordhuis) + +* unix: fix uv__getiovmax return value (HungMingWu) + +* unix: make work with Solaris Studio. (Adam Stylinski) + +* test: fix fs_event_watch_file_currentdir flakiness (Santiago Gimeno) + +* unix: skip prohibited syscalls on tvOS and watchOS (Nathan Corvino) + +* test: use FQDN in getaddrinfo_fail test (Wink Saville) + +* docs: clarify documentation of uv_tcp_init_ex (Andrius Bentkus) + +* win: fix comment (Miodrag Milanovic) + +* doc: fix typo in README (Angel Leon) + +* darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis) + +* pipe: enable inprocess uv_write2 on Windows (Louis DeJardin) + +* win: properly return UV_EBADF when _close() fails (Nicholas Vavilov) + +* test: skip process_title for AIX (Imran Iqbal) + +* misc: expose handle print APIs (Petka Antonov) + +* include: add stdio.h to uv.h (Saúl Ibarra Corretgé) + +* misc: remove unnecessary null pointer checks (Ian Kronquist) + +* test,freebsd: skip udp_dual_stack if not supported (Santiago Gimeno) + +* linux: don't retry dup2/dup3 on EINTR (Ben Noordhuis) + +* unix: don't retry dup2/dup3 on EINTR (Ben Noordhuis) + +* test: fix -Wtautological-pointer-compare warnings (Saúl Ibarra Corretgé) + +* win: map ERROR_BAD_PATHNAME to UV_ENOENT (Tony Kelman) + +* test: fix test/test-tty.c for AIX (Imran Iqbal) + +* android: support api level less than 21 (kkdaemon) + +* fsevents: fix race on simultaneous init+close (Fedor Indutny) + +* linux,fs: fix p{read,write}v with a 64bit offset (Saúl Ibarra Corretgé) + +* fs: add uv_fs_realpath() (Yuval Brik) + +* win: fix path for removed and renamed fs events (Joran Dirk Greef) + +* win: do not read more from stream than available (Jeremy Whitlock) + +* test: test that uv_close() doesn't corrupt QUEUE (Andrey Mazo) + +* unix: fix uv_fs_event_stop() from fs_event_cb (Andrey Mazo) + +* test: fix self-deadlocks in thread_rwlock_trylock (Ben Noordhuis) + +* src: remove non ascii character (sztomi) + +* test: fix test udp_multicast_join6 for AIX (Imran Iqbal) + + 2015.09.23, Version 1.7.5 (Stable), a8c1136de2cabf25b143021488cbaab05834daa8 Changes since version 1.7.4: diff --git a/deps/uv/Makefile.am b/deps/uv/Makefile.am index fbf9527ae93a70..0ef781ff198804 100644 --- a/deps/uv/Makefile.am +++ b/deps/uv/Makefile.am @@ -200,6 +200,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \ test/test-poll-closesocket.c \ test/test-poll.c \ test/test-process-title.c \ + test/test-queue-foreach-delete.c \ test/test-ref.c \ test/test-run-nowait.c \ test/test-run-once.c \ diff --git a/deps/uv/README.md b/deps/uv/README.md index 0ce26699716a1a..dfd24ba79d1850 100644 --- a/deps/uv/README.md +++ b/deps/uv/README.md @@ -119,7 +119,7 @@ Git tags are signed with the developer's key, they can be verified as follows: $ git verify-tag v1.6.1 Starting with libuv 1.7.0, the tarballs stored in the -[downloads site](http://dist.libuv.org/dist/) are signed and an accomanying +[downloads site](http://dist.libuv.org/dist/) are signed and an accompanying signature file sit alongside each. Once both the release tarball and the signature file are downloaded, the file can be verified as follows: diff --git a/deps/uv/appveyor.yml b/deps/uv/appveyor.yml index c9f55134e583dd..9aa63c5a5d2e73 100644 --- a/deps/uv/appveyor.yml +++ b/deps/uv/appveyor.yml @@ -1,4 +1,4 @@ -version: v1.7.5.build{build} +version: v1.8.0.build{build} install: - cinst -y nsis diff --git a/deps/uv/common.gypi b/deps/uv/common.gypi index 392c85951e1ebd..7cebcde5f89137 100644 --- a/deps/uv/common.gypi +++ b/deps/uv/common.gypi @@ -4,7 +4,6 @@ 'target_arch%': 'ia32', # set v8's target architecture 'host_arch%': 'ia32', # set v8's host architecture 'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds - 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way }, diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index c55a11847e255e..011bee2a891e73 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.7.5], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.8.0], [https://github.com/libuv/libuv/issues]) AC_CONFIG_MACRO_DIR([m4]) m4_include([m4/libuv-extra-automake-flags.m4]) m4_include([m4/as_case.m4]) diff --git a/deps/uv/docs/src/fs.rst b/deps/uv/docs/src/fs.rst index 33c04406f14d9e..69e283f4c67fc6 100644 --- a/deps/uv/docs/src/fs.rst +++ b/deps/uv/docs/src/fs.rst @@ -279,6 +279,16 @@ API Equivalent to :man:`readlink(2)`. +.. c:function:: int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) + + Equivalent to :man:`realpath(3)` on Unix. Windows uses ``GetFinalPathNameByHandle()``. + + .. note:: + This function is not implemented on Windows XP and Windows Server 2003. + On these systems, UV_ENOSYS is returned. + + .. versionadded:: 1.8.0 + .. c:function:: int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb) .. c:function:: int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb) diff --git a/deps/uv/docs/src/misc.rst b/deps/uv/docs/src/misc.rst index e9ddba3db6a953..2ce0887db0c278 100644 --- a/deps/uv/docs/src/misc.rst +++ b/deps/uv/docs/src/misc.rst @@ -288,3 +288,41 @@ API .. note:: Not every platform can support nanosecond resolution; however, this value will always be in nanoseconds. + +.. c:function:: void uv_print_all_handles(uv_loop_t* loop, FILE* stream) + + Prints all handles associated with the given `loop` to the given `stream`. + + Example: + + :: + + uv_print_all_handles(uv_default_loop(), stderr); + /* + [--I] signal 0x1a25ea8 + [-AI] async 0x1a25cf0 + [R--] idle 0x1a7a8c8 + */ + + The format is `[flags] handle-type handle-address`. For `flags`: + + - `R` is printed for a handle that is referenced + - `A` is printed for a handle that is active + - `I` is printed for a handle that is internal + + .. warning:: + This function is meant for ad hoc debugging, there is no API/ABI + stability guarantees. + + .. versionadded:: 1.8.0 + +.. c:function:: void uv_print_active_handles(uv_loop_t* loop, FILE* stream) + + This is the same as :c:func:`uv_print_all_handles` except only active handles + are printed. + + .. warning:: + This function is meant for ad hoc debugging, there is no API/ABI + stability guarantees. + + .. versionadded:: 1.8.0 diff --git a/deps/uv/docs/src/tcp.rst b/deps/uv/docs/src/tcp.rst index dd18522d91d4eb..ca0c9b4ac5af4c 100644 --- a/deps/uv/docs/src/tcp.rst +++ b/deps/uv/docs/src/tcp.rst @@ -34,7 +34,7 @@ API .. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) - Initialize the handle with the specified flags. At the moment the lower 8 bits + Initialize the handle with the specified flags. At the moment only the lower 8 bits of the `flags` parameter are used as the socket domain. A socket will be created for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, just like :c:func:`uv_tcp_init`. diff --git a/deps/uv/gyp_uv.py b/deps/uv/gyp_uv.py index 0491ff873f1af1..39933f624d5c40 100755 --- a/deps/uv/gyp_uv.py +++ b/deps/uv/gyp_uv.py @@ -83,9 +83,6 @@ def run_gyp(args): if not any(a.startswith('-Duv_library=') for a in args): args.append('-Duv_library=static_library') - if not any(a.startswith('-Dcomponent=') for a in args): - args.append('-Dcomponent=static_library') - # Some platforms (OpenBSD for example) don't have multiprocessing.synchronize # so gyp must be run with --no-parallel if not gyp_parallel_support: diff --git a/deps/uv/include/uv-version.h b/deps/uv/include/uv-version.h index e1f26601a156c2..6e61f55ed20d85 100644 --- a/deps/uv/include/uv-version.h +++ b/deps/uv/include/uv-version.h @@ -31,8 +31,8 @@ */ #define UV_VERSION_MAJOR 1 -#define UV_VERSION_MINOR 7 -#define UV_VERSION_PATCH 5 +#define UV_VERSION_MINOR 8 +#define UV_VERSION_PATCH 0 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index f96026b603d34e..dd3111a960e69b 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -48,6 +48,7 @@ extern "C" { #include "uv-errno.h" #include "uv-version.h" #include +#include #if defined(_MSC_VER) && _MSC_VER < 1600 # include "stdint-msvc2008.h" @@ -424,6 +425,10 @@ UV_EXTERN int uv_is_active(const uv_handle_t* handle); UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg); +/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */ +UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream); +UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream); + UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb); UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value); @@ -1083,7 +1088,8 @@ typedef enum { UV_FS_SYMLINK, UV_FS_READLINK, UV_FS_CHOWN, - UV_FS_FCHOWN + UV_FS_FCHOWN, + UV_FS_REALPATH } uv_fs_type; /* uv_fs_t is a subclass of uv_req_t. */ @@ -1235,6 +1241,10 @@ UV_EXTERN int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); +UV_EXTERN int uv_fs_realpath(uv_loop_t* loop, + uv_fs_t* req, + const char* path, + uv_fs_cb cb); UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, @@ -1363,7 +1373,7 @@ UV_EXTERN int uv_chdir(const char* dir); UV_EXTERN uint64_t uv_get_free_memory(void); UV_EXTERN uint64_t uv_get_total_memory(void); -UV_EXTERN extern uint64_t uv_hrtime(void); +UV_EXTERN uint64_t uv_hrtime(void); UV_EXTERN void uv_disable_stdio_inheritance(void); diff --git a/deps/uv/src/inet.c b/deps/uv/src/inet.c index c948b2e7cfaf01..da63a688c4e424 100644 --- a/deps/uv/src/inet.c +++ b/deps/uv/src/inet.c @@ -55,11 +55,7 @@ static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { char tmp[UV__INET_ADDRSTRLEN]; int l; -#ifndef _WIN32 l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); -#else - l = _snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); -#endif if (l <= 0 || (size_t) l >= size) { return UV_ENOSPC; } diff --git a/deps/uv/src/queue.h b/deps/uv/src/queue.h index 60c80000385be5..ff3540a0a51c84 100644 --- a/deps/uv/src/queue.h +++ b/deps/uv/src/queue.h @@ -30,6 +30,9 @@ typedef void *QUEUE[2]; #define QUEUE_DATA(ptr, type, field) \ ((type *) ((char *) (ptr) - offsetof(type, field))) +/* Important note: mutating the list while QUEUE_FOREACH is + * iterating over its elements results in undefined behavior. + */ #define QUEUE_FOREACH(q, h) \ for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q)) @@ -66,6 +69,17 @@ typedef void *QUEUE[2]; } \ while (0) +#define QUEUE_MOVE(h, n) \ + do { \ + if (QUEUE_EMPTY(h)) \ + QUEUE_INIT(n); \ + else { \ + QUEUE* q = QUEUE_HEAD(h); \ + QUEUE_SPLIT(h, q, n); \ + } \ + } \ + while (0) + #define QUEUE_INSERT_HEAD(h, q) \ do { \ QUEUE_NEXT(q) = QUEUE_NEXT(h); \ diff --git a/deps/uv/src/threadpool.c b/deps/uv/src/threadpool.c index 15d719944f1d0c..2c5152b4200875 100644 --- a/deps/uv/src/threadpool.c +++ b/deps/uv/src/threadpool.c @@ -223,13 +223,8 @@ void uv__work_done(uv_async_t* handle) { int err; loop = container_of(handle, uv_loop_t, wq_async); - QUEUE_INIT(&wq); - uv_mutex_lock(&loop->wq_mutex); - if (!QUEUE_EMPTY(&loop->wq)) { - q = QUEUE_HEAD(&loop->wq); - QUEUE_SPLIT(&loop->wq, q, &wq); - } + QUEUE_MOVE(&loop->wq, &wq); uv_mutex_unlock(&loop->wq_mutex); while (!QUEUE_EMPTY(&wq)) { diff --git a/deps/uv/src/unix/android-ifaddrs.c b/deps/uv/src/unix/android-ifaddrs.c index 71f7290b3263e0..30f681b7d04a41 100644 --- a/deps/uv/src/unix/android-ifaddrs.c +++ b/deps/uv/src/unix/android-ifaddrs.c @@ -1,6 +1,6 @@ /* Copyright (c) 2013, Kenneth MacKay -Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement n° 289016) +Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement #289016) All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/deps/uv/src/unix/async.c b/deps/uv/src/unix/async.c index 9ff24aeb3d7d87..184b598126eb2c 100644 --- a/deps/uv/src/unix/async.c +++ b/deps/uv/src/unix/async.c @@ -78,12 +78,18 @@ void uv__async_close(uv_async_t* handle) { static void uv__async_event(uv_loop_t* loop, struct uv__async* w, unsigned int nevents) { + QUEUE queue; QUEUE* q; uv_async_t* h; - QUEUE_FOREACH(q, &loop->async_handles) { + QUEUE_MOVE(&loop->async_handles, &queue); + while (!QUEUE_EMPTY(&queue)) { + q = QUEUE_HEAD(&queue); h = QUEUE_DATA(q, uv_async_t, queue); + QUEUE_REMOVE(q); + QUEUE_INSERT_TAIL(&loop->async_handles, q); + if (cmpxchgi(&h->pending, 1, 0) == 0) continue; diff --git a/deps/uv/src/unix/atomic-ops.h b/deps/uv/src/unix/atomic-ops.h index 8fb157dcc61eb4..84e471838bede7 100644 --- a/deps/uv/src/unix/atomic-ops.h +++ b/deps/uv/src/unix/atomic-ops.h @@ -18,6 +18,11 @@ #include "internal.h" /* UV_UNUSED */ +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#include +#define __sync_val_compare_and_swap(p, o, n) atomic_cas_ptr(p, o, n) +#endif + UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)); UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)); UV_UNUSED(static void cpu_relax(void)); diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c index e149357e076eb2..cedd86ed34a128 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -75,6 +75,10 @@ #include #endif +#if defined(__ANDROID_API__) && __ANDROID_API__ < 21 +# include /* for dlsym */ +#endif + static int uv__run_pending(uv_loop_t* loop); /* Verify that uv_buf_t is ABI-compatible with struct iovec. */ @@ -204,8 +208,14 @@ int uv__getiovmax(void) { return IOV_MAX; #elif defined(_SC_IOV_MAX) static int iovmax = -1; - if (iovmax == -1) + if (iovmax == -1) { iovmax = sysconf(_SC_IOV_MAX); + /* On some embedded devices (arm-linux-uclibc based ip camera), + * sysconf(_SC_IOV_MAX) can not get the correct value. The return + * value is -1 and the errno is EINPROGRESS. Degrade the value to 1. + */ + if (iovmax == -1) iovmax = 1; + } return iovmax; #else return 1024; @@ -721,9 +731,7 @@ static int uv__run_pending(uv_loop_t* loop) { if (QUEUE_EMPTY(&loop->pending_queue)) return 0; - QUEUE_INIT(&pq); - q = QUEUE_HEAD(&loop->pending_queue); - QUEUE_SPLIT(&loop->pending_queue, q, &pq); + QUEUE_MOVE(&loop->pending_queue, &pq); while (!QUEUE_EMPTY(&pq)) { q = QUEUE_HEAD(&pq); @@ -956,16 +964,12 @@ int uv__open_cloexec(const char* path, int flags) { int uv__dup2_cloexec(int oldfd, int newfd) { int r; #if defined(__FreeBSD__) && __FreeBSD__ >= 10 - do - r = dup3(oldfd, newfd, O_CLOEXEC); - while (r == -1 && errno == EINTR); + r = dup3(oldfd, newfd, O_CLOEXEC); if (r == -1) return -errno; return r; #elif defined(__FreeBSD__) && defined(F_DUP2FD_CLOEXEC) - do - r = fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd); - while (r == -1 && errno == EINTR); + r = fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd); if (r != -1) return r; if (errno != EINVAL) @@ -976,7 +980,7 @@ int uv__dup2_cloexec(int oldfd, int newfd) { if (!no_dup3) { do r = uv__dup3(oldfd, newfd, UV__O_CLOEXEC); - while (r == -1 && (errno == EINTR || errno == EBUSY)); + while (r == -1 && errno == EBUSY); if (r != -1) return r; if (errno != ENOSYS) @@ -990,9 +994,9 @@ int uv__dup2_cloexec(int oldfd, int newfd) { do r = dup2(oldfd, newfd); #if defined(__linux__) - while (r == -1 && (errno == EINTR || errno == EBUSY)); + while (r == -1 && errno == EBUSY); #else - while (r == -1 && errno == EINTR); + while (0); /* Never retry. */ #endif if (r == -1) @@ -1018,6 +1022,9 @@ int uv_os_homedir(char* buffer, size_t* size) { size_t len; long initsize; int r; +#if defined(__ANDROID_API__) && __ANDROID_API__ < 21 + int (*getpwuid_r)(uid_t, struct passwd*, char*, size_t, struct passwd**); +#endif if (buffer == NULL || size == NULL || *size == 0) return -EINVAL; @@ -1039,6 +1046,12 @@ int uv_os_homedir(char* buffer, size_t* size) { return 0; } +#if defined(__ANDROID_API__) && __ANDROID_API__ < 21 + getpwuid_r = dlsym(RTLD_DEFAULT, "getpwuid_r"); + if (getpwuid_r == NULL) + return -ENOSYS; +#endif + /* HOME is not set, so call getpwuid() */ initsize = sysconf(_SC_GETPW_R_SIZE_MAX); diff --git a/deps/uv/src/unix/darwin.c b/deps/uv/src/unix/darwin.c index dab6ca999d05f6..cf95da21693b9a 100644 --- a/deps/uv/src/unix/darwin.c +++ b/deps/uv/src/unix/darwin.c @@ -258,8 +258,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { } *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/dl.c b/deps/uv/src/unix/dl.c index 7c6d41c969b25f..fc1c052bb8122e 100644 --- a/deps/uv/src/unix/dl.c +++ b/deps/uv/src/unix/dl.c @@ -39,10 +39,8 @@ int uv_dlopen(const char* filename, uv_lib_t* lib) { void uv_dlclose(uv_lib_t* lib) { - if (lib->errmsg) { - uv__free(lib->errmsg); - lib->errmsg = NULL; - } + uv__free(lib->errmsg); + lib->errmsg = NULL; if (lib->handle) { /* Ignore errors. No good way to signal them without leaking memory. */ @@ -67,8 +65,7 @@ const char* uv_dlerror(const uv_lib_t* lib) { static int uv__dlerror(uv_lib_t* lib) { const char* errmsg; - if (lib->errmsg) - uv__free(lib->errmsg); + uv__free(lib->errmsg); errmsg = dlerror(); diff --git a/deps/uv/src/unix/freebsd.c b/deps/uv/src/unix/freebsd.c index c69608b139973b..b747abdf5bc46e 100644 --- a/deps/uv/src/unix/freebsd.c +++ b/deps/uv/src/unix/freebsd.c @@ -176,7 +176,7 @@ char** uv_setup_args(int argc, char** argv) { int uv_set_process_title(const char* title) { int oid[4]; - if (process_title) uv__free(process_title); + uv__free(process_title); process_title = uv__strdup(title); oid[0] = CTL_KERN; @@ -373,8 +373,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { } *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index d739c282585f71..57b65be25a85ea 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -80,8 +80,10 @@ req->path = path; \ } else { \ req->path = uv__strdup(path); \ - if (req->path == NULL) \ + if (req->path == NULL) { \ + uv__req_unregister(loop, req); \ return -ENOMEM; \ + } \ } \ } \ while (0) @@ -97,8 +99,10 @@ path_len = strlen(path) + 1; \ new_path_len = strlen(new_path) + 1; \ req->path = uv__malloc(path_len + new_path_len); \ - if (req->path == NULL) \ + if (req->path == NULL) { \ + uv__req_unregister(loop, req); \ return -ENOMEM; \ + } \ req->new_path = req->path + path_len; \ memcpy((void*) req->path, path, path_len); \ memcpy((void*) req->new_path, new_path, new_path_len); \ @@ -370,20 +374,27 @@ static ssize_t uv__fs_scandir(uv_fs_t* req) { } -static ssize_t uv__fs_readlink(uv_fs_t* req) { - ssize_t len; - char* buf; +static ssize_t uv__fs_pathmax_size(const char* path) { + ssize_t pathmax; - len = pathconf(req->path, _PC_PATH_MAX); + pathmax = pathconf(path, _PC_PATH_MAX); - if (len == -1) { + if (pathmax == -1) { #if defined(PATH_MAX) - len = PATH_MAX; + return PATH_MAX; #else - len = 4096; + return 4096; #endif } + return pathmax; +} + +static ssize_t uv__fs_readlink(uv_fs_t* req) { + ssize_t len; + char* buf; + + len = uv__fs_pathmax_size(req->path); buf = uv__malloc(len + 1); if (buf == NULL) { @@ -404,6 +415,27 @@ static ssize_t uv__fs_readlink(uv_fs_t* req) { return 0; } +static ssize_t uv__fs_realpath(uv_fs_t* req) { + ssize_t len; + char* buf; + + len = uv__fs_pathmax_size(req->path); + buf = uv__malloc(len + 1); + + if (buf == NULL) { + errno = ENOMEM; + return -1; + } + + if (realpath(req->path, buf) == NULL) { + uv__free(buf); + return -1; + } + + req->ptr = buf; + + return 0; +} static ssize_t uv__fs_sendfile_emul(uv_fs_t* req) { struct pollfd pfd; @@ -626,7 +658,9 @@ static ssize_t uv__fs_write(uv_fs_t* req) { */ #if defined(__APPLE__) static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&lock); + + if (pthread_mutex_lock(&lock)) + abort(); #endif if (req->off < 0) { @@ -683,7 +717,8 @@ static ssize_t uv__fs_write(uv_fs_t* req) { done: #if defined(__APPLE__) - pthread_mutex_unlock(&lock); + if (pthread_mutex_unlock(&lock)) + abort(); #endif return r; @@ -867,6 +902,7 @@ static void uv__fs_work(struct uv__work* w) { X(READ, uv__fs_buf_iter(req, uv__fs_read)); X(SCANDIR, uv__fs_scandir(req)); X(READLINK, uv__fs_readlink(req)); + X(REALPATH, uv__fs_realpath(req)); X(RENAME, rename(req->path, req->new_path)); X(RMDIR, rmdir(req->path)); X(SENDFILE, uv__fs_sendfile(req)); @@ -1062,8 +1098,11 @@ int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_cb cb) { INIT(MKDTEMP); req->path = uv__strdup(tpl); - if (req->path == NULL) + if (req->path == NULL) { + if (cb != NULL) + uv__req_unregister(loop, req); return -ENOMEM; + } POST; } @@ -1099,8 +1138,11 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, if (nbufs > ARRAY_SIZE(req->bufsml)) req->bufs = uv__malloc(nbufs * sizeof(*bufs)); - if (req->bufs == NULL) + if (req->bufs == NULL) { + if (cb != NULL) + uv__req_unregister(loop, req); return -ENOMEM; + } memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); @@ -1131,6 +1173,16 @@ int uv_fs_readlink(uv_loop_t* loop, } +int uv_fs_realpath(uv_loop_t* loop, + uv_fs_t* req, + const char * path, + uv_fs_cb cb) { + INIT(REALPATH); + PATH; + POST; +} + + int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, @@ -1224,8 +1276,11 @@ int uv_fs_write(uv_loop_t* loop, if (nbufs > ARRAY_SIZE(req->bufsml)) req->bufs = uv__malloc(nbufs * sizeof(*bufs)); - if (req->bufs == NULL) + if (req->bufs == NULL) { + if (cb != NULL) + uv__req_unregister(loop, req); return -ENOMEM; + } memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); diff --git a/deps/uv/src/unix/fsevents.c b/deps/uv/src/unix/fsevents.c index 8143f7c1f018db..d331a13172675e 100644 --- a/deps/uv/src/unix/fsevents.c +++ b/deps/uv/src/unix/fsevents.c @@ -73,9 +73,16 @@ typedef struct uv__fsevents_event_s uv__fsevents_event_t; typedef struct uv__cf_loop_signal_s uv__cf_loop_signal_t; typedef struct uv__cf_loop_state_s uv__cf_loop_state_t; +enum uv__cf_loop_signal_type_e { + kUVCFLoopSignalRegular, + kUVCFLoopSignalClosing +}; +typedef enum uv__cf_loop_signal_type_e uv__cf_loop_signal_type_t; + struct uv__cf_loop_signal_s { QUEUE member; uv_fs_event_t* handle; + uv__cf_loop_signal_type_t type; }; struct uv__fsevents_event_s { @@ -98,7 +105,9 @@ struct uv__cf_loop_state_s { /* Forward declarations */ static void uv__cf_loop_cb(void* arg); static void* uv__cf_loop_runner(void* arg); -static int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle); +static int uv__cf_loop_signal(uv_loop_t* loop, + uv_fs_event_t* handle, + uv__cf_loop_signal_type_t type); /* Lazy-loaded by uv__fsevents_global_init(). */ static CFArrayRef (*pCFArrayCreate)(CFAllocatorRef, @@ -149,11 +158,7 @@ static void (*pFSEventStreamStop)(FSEventStreamRef); int err; \ uv_mutex_lock(&(handle)->cf_mutex); \ /* Split-off all events and empty original queue */ \ - QUEUE_INIT(&events); \ - if (!QUEUE_EMPTY(&(handle)->cf_events)) { \ - q = QUEUE_HEAD(&(handle)->cf_events); \ - QUEUE_SPLIT(&(handle)->cf_events, q, &events); \ - } \ + QUEUE_MOVE(&(handle)->cf_events, &events); \ /* Get error (if any) and zero original one */ \ err = (handle)->cf_error; \ (handle)->cf_error = 0; \ @@ -387,7 +392,8 @@ static void uv__fsevents_destroy_stream(uv_loop_t* loop) { /* Runs in CF thread, when there're new fsevent handles to add to stream */ -static void uv__fsevents_reschedule(uv_fs_event_t* handle) { +static void uv__fsevents_reschedule(uv_fs_event_t* handle, + uv__cf_loop_signal_type_t type) { uv__cf_loop_state_t* state; QUEUE* q; uv_fs_event_t* curr; @@ -486,7 +492,7 @@ static void uv__fsevents_reschedule(uv_fs_event_t* handle) { * * NOTE: This is coupled with `uv_sem_wait()` in `uv__fsevents_close` */ - if (!uv__is_active(handle)) + if (type == kUVCFLoopSignalClosing) uv_sem_post(&state->fsevent_sem); } @@ -676,7 +682,7 @@ void uv__fsevents_loop_delete(uv_loop_t* loop) { if (loop->cf_state == NULL) return; - if (uv__cf_loop_signal(loop, NULL) != 0) + if (uv__cf_loop_signal(loop, NULL, kUVCFLoopSignalRegular) != 0) abort(); uv_thread_join(&loop->cf_thread); @@ -735,17 +741,14 @@ static void uv__cf_loop_cb(void* arg) { loop = arg; state = loop->cf_state; - QUEUE_INIT(&split_head); uv_mutex_lock(&loop->cf_mutex); - if (!QUEUE_EMPTY(&loop->cf_signals)) { - QUEUE* split_pos = QUEUE_HEAD(&loop->cf_signals); - QUEUE_SPLIT(&loop->cf_signals, split_pos, &split_head); - } + QUEUE_MOVE(&loop->cf_signals, &split_head); uv_mutex_unlock(&loop->cf_mutex); while (!QUEUE_EMPTY(&split_head)) { item = QUEUE_HEAD(&split_head); + QUEUE_REMOVE(item); s = QUEUE_DATA(item, uv__cf_loop_signal_t, member); @@ -753,16 +756,17 @@ static void uv__cf_loop_cb(void* arg) { if (s->handle == NULL) pCFRunLoopStop(state->loop); else - uv__fsevents_reschedule(s->handle); + uv__fsevents_reschedule(s->handle, s->type); - QUEUE_REMOVE(item); uv__free(s); } } /* Runs in UV loop to notify CF thread */ -int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle) { +int uv__cf_loop_signal(uv_loop_t* loop, + uv_fs_event_t* handle, + uv__cf_loop_signal_type_t type) { uv__cf_loop_signal_t* item; uv__cf_loop_state_t* state; @@ -771,6 +775,7 @@ int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle) { return -ENOMEM; item->handle = handle; + item->type = type; uv_mutex_lock(&loop->cf_mutex); QUEUE_INSERT_TAIL(&loop->cf_signals, &item->member); @@ -833,7 +838,7 @@ int uv__fsevents_init(uv_fs_event_t* handle) { /* Reschedule FSEventStream */ assert(handle != NULL); - err = uv__cf_loop_signal(handle->loop, handle); + err = uv__cf_loop_signal(handle->loop, handle, kUVCFLoopSignalRegular); if (err) goto fail_loop_signal; @@ -873,7 +878,7 @@ int uv__fsevents_close(uv_fs_event_t* handle) { /* Reschedule FSEventStream */ assert(handle != NULL); - err = uv__cf_loop_signal(handle->loop, handle); + err = uv__cf_loop_signal(handle->loop, handle, kUVCFLoopSignalClosing); if (err) return -err; diff --git a/deps/uv/src/unix/linux-core.c b/deps/uv/src/unix/linux-core.c index e6e68283d58d07..3ff6fb15e93557 100644 --- a/deps/uv/src/unix/linux-core.c +++ b/deps/uv/src/unix/linux-core.c @@ -814,8 +814,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, return 0; *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/linux-inotify.c b/deps/uv/src/unix/linux-inotify.c index d9ed9f4b24512b..282912115d8120 100644 --- a/deps/uv/src/unix/linux-inotify.c +++ b/deps/uv/src/unix/linux-inotify.c @@ -35,6 +35,7 @@ struct watcher_list { RB_ENTRY(watcher_list) entry; QUEUE watchers; + int iterating; char* path; int wd; }; @@ -113,6 +114,15 @@ static struct watcher_list* find_watcher(uv_loop_t* loop, int wd) { return RB_FIND(watcher_root, CAST(&loop->inotify_watchers), &w); } +static void maybe_free_watcher_list(struct watcher_list* w, uv_loop_t* loop) { + /* if the watcher_list->watchers is being iterated over, we can't free it. */ + if ((!w->iterating) && QUEUE_EMPTY(&w->watchers)) { + /* No watchers left for this path. Clean up. */ + RB_REMOVE(watcher_root, CAST(&loop->inotify_watchers), w); + uv__inotify_rm_watch(loop->inotify_fd, w->wd); + uv__free(w); + } +} static void uv__inotify_read(uv_loop_t* loop, uv__io_t* dummy, @@ -120,6 +130,7 @@ static void uv__inotify_read(uv_loop_t* loop, const struct uv__inotify_event* e; struct watcher_list* w; uv_fs_event_t* h; + QUEUE queue; QUEUE* q; const char* path; ssize_t size; @@ -159,10 +170,31 @@ static void uv__inotify_read(uv_loop_t* loop, */ path = e->len ? (const char*) (e + 1) : uv__basename_r(w->path); - QUEUE_FOREACH(q, &w->watchers) { + /* We're about to iterate over the queue and call user's callbacks. + * What can go wrong? + * A callback could call uv_fs_event_stop() + * and the queue can change under our feet. + * So, we use QUEUE_MOVE() trick to safely iterate over the queue. + * And we don't free the watcher_list until we're done iterating. + * + * First, + * tell uv_fs_event_stop() (that could be called from a user's callback) + * not to free watcher_list. + */ + w->iterating = 1; + QUEUE_MOVE(&w->watchers, &queue); + while (!QUEUE_EMPTY(&queue)) { + q = QUEUE_HEAD(&queue); h = QUEUE_DATA(q, uv_fs_event_t, watchers); + + QUEUE_REMOVE(q); + QUEUE_INSERT_TAIL(&w->watchers, q); + h->cb(h, path, events, 0); } + /* done iterating, time to (maybe) free empty watcher_list */ + w->iterating = 0; + maybe_free_watcher_list(w, loop); } } } @@ -214,6 +246,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, w->wd = wd; w->path = strcpy((char*)(w + 1), path); QUEUE_INIT(&w->watchers); + w->iterating = 0; RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w); no_insert: @@ -241,12 +274,7 @@ int uv_fs_event_stop(uv_fs_event_t* handle) { uv__handle_stop(handle); QUEUE_REMOVE(&handle->watchers); - if (QUEUE_EMPTY(&w->watchers)) { - /* No watchers left for this path. Clean up. */ - RB_REMOVE(watcher_root, CAST(&handle->loop->inotify_watchers), w); - uv__inotify_rm_watch(handle->loop->inotify_fd, w->wd); - uv__free(w); - } + maybe_free_watcher_list(w, handle->loop); return 0; } diff --git a/deps/uv/src/unix/linux-syscalls.c b/deps/uv/src/unix/linux-syscalls.c index 566e1f37cfed12..89998ded26b17c 100644 --- a/deps/uv/src/unix/linux-syscalls.c +++ b/deps/uv/src/unix/linux-syscalls.c @@ -444,18 +444,18 @@ int uv__utimesat(int dirfd, } -ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) { +ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset) { #if defined(__NR_preadv) - return syscall(__NR_preadv, fd, iov, iovcnt, offset); + return syscall(__NR_preadv, fd, iov, iovcnt, (long)offset, (long)(offset >> 32)); #else return errno = ENOSYS, -1; #endif } -ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset) { +ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset) { #if defined(__NR_pwritev) - return syscall(__NR_pwritev, fd, iov, iovcnt, offset); + return syscall(__NR_pwritev, fd, iov, iovcnt, (long)offset, (long)(offset >> 32)); #else return errno = ENOSYS, -1; #endif diff --git a/deps/uv/src/unix/linux-syscalls.h b/deps/uv/src/unix/linux-syscalls.h index 6f249b72453675..96e79439cf07ab 100644 --- a/deps/uv/src/unix/linux-syscalls.h +++ b/deps/uv/src/unix/linux-syscalls.h @@ -151,8 +151,8 @@ int uv__utimesat(int dirfd, const char* path, const struct timespec times[2], int flags); -ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset); -ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset); +ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset); +ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset); int uv__dup3(int oldfd, int newfd, int flags); #endif /* UV_LINUX_SYSCALL_H_ */ diff --git a/deps/uv/src/unix/loop-watcher.c b/deps/uv/src/unix/loop-watcher.c index dc25760bd5344c..340bb0dfa11350 100644 --- a/deps/uv/src/unix/loop-watcher.c +++ b/deps/uv/src/unix/loop-watcher.c @@ -47,9 +47,14 @@ \ void uv__run_##name(uv_loop_t* loop) { \ uv_##name##_t* h; \ + QUEUE queue; \ QUEUE* q; \ - QUEUE_FOREACH(q, &loop->name##_handles) { \ + QUEUE_MOVE(&loop->name##_handles, &queue); \ + while (!QUEUE_EMPTY(&queue)) { \ + q = QUEUE_HEAD(&queue); \ h = QUEUE_DATA(q, uv_##name##_t, queue); \ + QUEUE_REMOVE(q); \ + QUEUE_INSERT_TAIL(&loop->name##_handles, q); \ h->name##_cb(h); \ } \ } \ diff --git a/deps/uv/src/unix/netbsd.c b/deps/uv/src/unix/netbsd.c index 29f2a4dec63831..ca48550f9d99d4 100644 --- a/deps/uv/src/unix/netbsd.c +++ b/deps/uv/src/unix/netbsd.c @@ -298,8 +298,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/openbsd.c b/deps/uv/src/unix/openbsd.c index c8d54599386efe..6a3909a666c1d0 100644 --- a/deps/uv/src/unix/openbsd.c +++ b/deps/uv/src/unix/openbsd.c @@ -161,7 +161,7 @@ char** uv_setup_args(int argc, char** argv) { int uv_set_process_title(const char* title) { - if (process_title) uv__free(process_title); + uv__free(process_title); process_title = uv__strdup(title); setproctitle(title); return 0; @@ -313,8 +313,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c index 9fa061e6bc99b6..571f8cd778c74f 100644 --- a/deps/uv/src/unix/process.c +++ b/deps/uv/src/unix/process.c @@ -270,6 +270,11 @@ static void uv__write_int(int fd, int val) { } +#if !(defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH)) +/* execvp is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED, so must be + * avoided. Since this isn't called on those targets, the function + * doesn't even need to be defined for them. + */ static void uv__process_child_init(const uv_process_options_t* options, int stdio_count, int (*pipes)[2], @@ -375,11 +380,16 @@ static void uv__process_child_init(const uv_process_options_t* options, uv__write_int(error_fd, -errno); _exit(127); } +#endif int uv_spawn(uv_loop_t* loop, uv_process_t* process, const uv_process_options_t* options) { +#if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) + /* fork is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED. */ + return -ENOSYS; +#else int signal_pipe[2] = { -1, -1 }; int (*pipes)[2]; int stdio_count; @@ -528,6 +538,7 @@ int uv_spawn(uv_loop_t* loop, } return err; +#endif } diff --git a/deps/uv/src/unix/signal.c b/deps/uv/src/unix/signal.c index 0b7a405c15da65..edd9085d3f352f 100644 --- a/deps/uv/src/unix/signal.c +++ b/deps/uv/src/unix/signal.c @@ -234,6 +234,8 @@ void uv__signal_loop_cleanup(uv_loop_t* loop) { /* Stop all the signal watchers that are still attached to this loop. This * ensures that the (shared) signal tree doesn't contain any invalid entries * entries, and that signal handlers are removed when appropriate. + * It's safe to use QUEUE_FOREACH here because the handles and the handle + * queue are not modified by uv__signal_stop(). */ QUEUE_FOREACH(q, &loop->handle_queue) { uv_handle_t* handle = QUEUE_DATA(q, uv_handle_t, handle_queue); diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 183b68cf7165b0..7d7ab2633b6f2d 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -779,9 +779,9 @@ static void uv__write(uv_stream_t* stream) { if (req->send_handle) { struct msghdr msg; - char scratch[64]; struct cmsghdr *cmsg; int fd_to_send = uv__handle_fd((uv_handle_t*) req->send_handle); + char scratch[64] = {0}; assert(fd_to_send >= 0); @@ -1471,7 +1471,7 @@ int uv_try_write(uv_stream_t* stream, uv__stream_osx_interrupt_select(stream); } - if (written == 0) + if (written == 0 && req_size != 0) return -EAGAIN; else return written; diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c index 05b7a114031178..0c46817b446e61 100644 --- a/deps/uv/src/unix/sunos.c +++ b/deps/uv/src/unix/sunos.c @@ -693,8 +693,10 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { } *addresses = uv__malloc(*count * sizeof(**addresses)); - if (!(*addresses)) + if (!(*addresses)) { + freeifaddrs(addrs); return -ENOMEM; + } address = *addresses; diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c index 54c9055a08ae12..7cc5b714ed302c 100644 --- a/deps/uv/src/unix/tty.c +++ b/deps/uv/src/unix/tty.c @@ -236,6 +236,15 @@ uv_handle_type uv_guess_handle(uv_file file) { return UV_UDP; if (type == SOCK_STREAM) { +#if defined(_AIX) + /* on AIX the getsockname call returns an empty sa structure + * for sockets of type AF_UNIX. For all other types it will + * return a properly filled in structure. + */ + if (len == 0) + return UV_NAMED_PIPE; +#endif /* defined(_AIX) */ + if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6) return UV_TCP; if (sa.sa_family == AF_UNIX) diff --git a/deps/uv/src/unix/udp.c b/deps/uv/src/unix/udp.c index 66ecc4e341b913..39ade8de338afc 100644 --- a/deps/uv/src/unix/udp.c +++ b/deps/uv/src/unix/udp.c @@ -410,8 +410,10 @@ int uv__udp_send(uv_udp_send_t* req, if (nbufs > ARRAY_SIZE(req->bufsml)) req->bufs = uv__malloc(nbufs * sizeof(bufs[0])); - if (req->bufs == NULL) + if (req->bufs == NULL) { + uv__req_unregister(handle->loop, req); return -ENOMEM; + } memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0])); handle->send_queue_size += uv__count_bufs(req->bufs, req->nbufs); diff --git a/deps/uv/src/uv-common.c b/deps/uv/src/uv-common.c index 675a776bf4ae1e..40ed28fec5a662 100644 --- a/deps/uv/src/uv-common.c +++ b/deps/uv/src/uv-common.c @@ -141,11 +141,7 @@ static const char* uv__unknown_err_code(int err) { char buf[32]; char* copy; -#ifndef _WIN32 snprintf(buf, sizeof(buf), "Unknown system error %d", err); -#else - _snprintf(buf, sizeof(buf), "Unknown system error %d", err); -#endif copy = uv__strdup(buf); return copy != NULL ? copy : "Unknown system error"; @@ -341,19 +337,25 @@ int uv_udp_recv_stop(uv_udp_t* handle) { void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) { + QUEUE queue; QUEUE* q; uv_handle_t* h; - QUEUE_FOREACH(q, &loop->handle_queue) { + QUEUE_MOVE(&loop->handle_queue, &queue); + while (!QUEUE_EMPTY(&queue)) { + q = QUEUE_HEAD(&queue); h = QUEUE_DATA(q, uv_handle_t, handle_queue); + + QUEUE_REMOVE(q); + QUEUE_INSERT_TAIL(&loop->handle_queue, q); + if (h->flags & UV__HANDLE_INTERNAL) continue; walk_cb(h, arg); } } -#ifndef NDEBUG -static void uv__print_handles(uv_loop_t* loop, int only_active) { +static void uv__print_handles(uv_loop_t* loop, int only_active, FILE* stream) { const char* type; QUEUE* q; uv_handle_t* h; @@ -374,7 +376,7 @@ static void uv__print_handles(uv_loop_t* loop, int only_active) { default: type = ""; } - fprintf(stderr, + fprintf(stream, "[%c%c%c] %-8s %p\n", "R-"[!(h->flags & UV__HANDLE_REF)], "A-"[!(h->flags & UV__HANDLE_ACTIVE)], @@ -385,15 +387,14 @@ static void uv__print_handles(uv_loop_t* loop, int only_active) { } -void uv_print_all_handles(uv_loop_t* loop) { - uv__print_handles(loop, 0); +void uv_print_all_handles(uv_loop_t* loop, FILE* stream) { + uv__print_handles(loop, 0, stream); } -void uv_print_active_handles(uv_loop_t* loop) { - uv__print_handles(loop, 1); +void uv_print_active_handles(uv_loop_t* loop, FILE* stream) { + uv__print_handles(loop, 1, stream); } -#endif void uv_ref(uv_handle_t* handle) { diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h index b348ec76bd50bd..27902fdf8645f7 100644 --- a/deps/uv/src/uv-common.h +++ b/deps/uv/src/uv-common.h @@ -41,6 +41,10 @@ #include "tree.h" #include "queue.h" +#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900 +extern int snprintf(char*, size_t, const char*, ...); +#endif + #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define container_of(ptr, type, member) \ diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c index a265a272dced19..c512f35af979a3 100644 --- a/deps/uv/src/win/error.c +++ b/deps/uv/src/win/error.c @@ -129,6 +129,7 @@ int uv_translate_sys_error(int sys_errno) { case ERROR_NETWORK_UNREACHABLE: return UV_ENETUNREACH; case WSAENETUNREACH: return UV_ENETUNREACH; case WSAENOBUFS: return UV_ENOBUFS; + case ERROR_BAD_PATHNAME: return UV_ENOENT; case ERROR_DIRECTORY: return UV_ENOENT; case ERROR_FILE_NOT_FOUND: return UV_ENOENT; case ERROR_INVALID_NAME: return UV_ENOENT; diff --git a/deps/uv/src/win/fs-event.c b/deps/uv/src/win/fs-event.c index ba68f78c82a610..76ecfebaa24c39 100644 --- a/deps/uv/src/win/fs-event.c +++ b/deps/uv/src/win/fs-event.c @@ -381,9 +381,10 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, if (handle->dirw) { /* - * We attempt to convert the file name to its long form for - * events that still point to valid files on disk. - * For removed and renamed events, we do not provide the file name. + * We attempt to resolve the long form of the file name explicitly. + * We only do this for file names that might still exist on disk. + * If this fails, we use the name given by ReadDirectoryChangesW. + * This may be the long form or the 8.3 short name in some cases. */ if (file_info->Action != FILE_ACTION_REMOVED && file_info->Action != FILE_ACTION_RENAMED_OLD_NAME) { @@ -438,16 +439,24 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, } /* - * If we couldn't get the long name - just use the name - * provided by ReadDirectoryChangesW. + * We could not resolve the long form explicitly. + * We therefore use the name given by ReadDirectoryChangesW. + * This may be the long form or the 8.3 short name in some cases. */ if (!long_filenamew) { filenamew = file_info->FileName; sizew = file_info->FileNameLength / sizeof(WCHAR); } } else { - /* Removed or renamed callbacks don't provide filename. */ - filenamew = NULL; + /* + * Removed or renamed events cannot be resolved to the long form. + * We therefore use the name given by ReadDirectoryChangesW. + * This may be the long form or the 8.3 short name in some cases. + */ + if (!long_filenamew) { + filenamew = file_info->FileName; + sizew = file_info->FileNameLength / sizeof(WCHAR); + } } } else { /* We already have the long name of the file, so just use it. */ diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index 4a17573113ff9b..a32b0127f7e1e9 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -110,6 +110,9 @@ const WCHAR JUNCTION_PREFIX_LEN = 4; const WCHAR LONG_PATH_PREFIX[] = L"\\\\?\\"; const WCHAR LONG_PATH_PREFIX_LEN = 4; +const WCHAR UNC_PATH_PREFIX[] = L"\\\\?\\UNC\\"; +const WCHAR UNC_PATH_PREFIX_LEN = 8; + void uv_fs_init() { _fmode = _O_BINARY; @@ -233,14 +236,61 @@ INLINE static void uv_fs_req_init(uv_loop_t* loop, uv_fs_t* req, } +static int fs__wide_to_utf8(WCHAR* w_source_ptr, + DWORD w_source_len, + char** target_ptr, + uint64_t* target_len_ptr) { + int r; + int target_len; + char* target; + target_len = WideCharToMultiByte(CP_UTF8, + 0, + w_source_ptr, + w_source_len, + NULL, + 0, + NULL, + NULL); + + if (target_len == 0) { + return -1; + } + + if (target_len_ptr != NULL) { + *target_len_ptr = target_len; + } + + if (target_ptr == NULL) { + return 0; + } + + target = uv__malloc(target_len + 1); + if (target == NULL) { + SetLastError(ERROR_OUTOFMEMORY); + return -1; + } + + r = WideCharToMultiByte(CP_UTF8, + 0, + w_source_ptr, + w_source_len, + target, + target_len, + NULL, + NULL); + assert(r == target_len); + target[target_len] = '\0'; + *target_ptr = target; + return 0; +} + + INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr, uint64_t* target_len_ptr) { char buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; REPARSE_DATA_BUFFER* reparse_data = (REPARSE_DATA_BUFFER*) buffer; - WCHAR *w_target; + WCHAR* w_target; DWORD w_target_len; - char* target; - int target_len; DWORD bytes; if (!DeviceIoControl(handle, @@ -333,50 +383,7 @@ INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr, return -1; } - /* If needed, compute the length of the target. */ - if (target_ptr != NULL || target_len_ptr != NULL) { - /* Compute the length of the target. */ - target_len = WideCharToMultiByte(CP_UTF8, - 0, - w_target, - w_target_len, - NULL, - 0, - NULL, - NULL); - if (target_len == 0) { - return -1; - } - } - - /* If requested, allocate memory and convert to UTF8. */ - if (target_ptr != NULL) { - int r; - target = (char*) uv__malloc(target_len + 1); - if (target == NULL) { - SetLastError(ERROR_OUTOFMEMORY); - return -1; - } - - r = WideCharToMultiByte(CP_UTF8, - 0, - w_target, - w_target_len, - target, - target_len, - NULL, - NULL); - assert(r == target_len); - target[target_len] = '\0'; - - *target_ptr = target; - } - - if (target_len_ptr != NULL) { - *target_len_ptr = target_len; - } - - return 0; + return fs__wide_to_utf8(w_target, w_target_len, target_ptr, target_len_ptr); } @@ -533,7 +540,15 @@ void fs__close(uv_fs_t* req) { else result = 0; - SET_REQ_RESULT(req, result); + /* _close doesn't set _doserrno on failure, but it does always set errno + * to EBADF on failure. + */ + if (result == -1) { + assert(errno == EBADF); + SET_REQ_UV_ERROR(req, UV_EBADF, ERROR_INVALID_HANDLE); + } else { + req->result = 0; + } } @@ -1699,6 +1714,84 @@ static void fs__readlink(uv_fs_t* req) { } +static size_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) { + int r; + DWORD w_realpath_len; + WCHAR* w_realpath_ptr; + WCHAR* w_finalpath_ptr = NULL; + + w_realpath_len = pGetFinalPathNameByHandleW(handle, NULL, 0, VOLUME_NAME_DOS); + if (w_realpath_len == 0) { + return -1; + } + + w_realpath_ptr = uv__malloc((w_realpath_len + 1) * sizeof(WCHAR)); + if (w_realpath_ptr == NULL) { + SetLastError(ERROR_OUTOFMEMORY); + return -1; + } + + if (pGetFinalPathNameByHandleW(handle, + w_realpath_ptr, + w_realpath_len, + VOLUME_NAME_DOS) == 0) { + uv__free(w_realpath_ptr); + SetLastError(ERROR_INVALID_HANDLE); + return -1; + } + + /* convert UNC path to long path */ + if (wcsncmp(w_realpath_ptr, + UNC_PATH_PREFIX, + UNC_PATH_PREFIX_LEN) == 0) { + w_finalpath_ptr = w_realpath_ptr + 6; + *w_finalpath_ptr = L'\\'; + } else if (wcsncmp(w_realpath_ptr, + LONG_PATH_PREFIX, + LONG_PATH_PREFIX_LEN) == 0) { + w_finalpath_ptr = w_realpath_ptr + 4; + } else { + uv__free(w_realpath_ptr); + SetLastError(ERROR_INVALID_HANDLE); + return -1; + } + + r = fs__wide_to_utf8(w_finalpath_ptr, w_realpath_len, realpath_ptr, NULL); + uv__free(w_realpath_ptr); + return r; +} + +static void fs__realpath(uv_fs_t* req) { + HANDLE handle; + + if (!pGetFinalPathNameByHandleW) { + SET_REQ_UV_ERROR(req, UV_ENOSYS, ERROR_NOT_SUPPORTED); + return; + } + + handle = CreateFileW(req->file.pathw, + 0, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, + NULL); + if (handle == INVALID_HANDLE_VALUE) { + SET_REQ_WIN32_ERROR(req, GetLastError()); + return; + } + + if (fs__realpath_handle(handle, (char**) &req->ptr) == -1) { + CloseHandle(handle); + SET_REQ_WIN32_ERROR(req, GetLastError()); + return; + } + + CloseHandle(handle); + req->flags |= UV_FS_FREE_PTR; + SET_REQ_RESULT(req, 0); +} + static void fs__chown(uv_fs_t* req) { req->result = 0; @@ -1743,6 +1836,7 @@ static void uv__fs_work(struct uv__work* w) { XX(LINK, link) XX(SYMLINK, symlink) XX(READLINK, readlink) + XX(REALPATH, realpath) XX(CHOWN, chown) XX(FCHOWN, fchown); default: @@ -2067,6 +2161,31 @@ int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, } +int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, + uv_fs_cb cb) { + int err; + + if (!req || !path) { + return UV_EINVAL; + } + + uv_fs_req_init(loop, req, UV_FS_REALPATH, cb); + + err = fs__capture_path(req, path, NULL, cb != NULL); + if (err) { + return uv_translate_sys_error(err); + } + + if (cb) { + QUEUE_FS_TP_JOB(loop, req); + return 0; + } else { + fs__realpath(req); + return req->result; + } +} + + int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb) { int err; diff --git a/deps/uv/src/win/getaddrinfo.c b/deps/uv/src/win/getaddrinfo.c index 3d23660e884c5d..ceed3b7638b457 100644 --- a/deps/uv/src/win/getaddrinfo.c +++ b/deps/uv/src/win/getaddrinfo.c @@ -109,10 +109,8 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) { req = container_of(w, uv_getaddrinfo_t, work_req); /* release input parameter memory */ - if (req->alloc != NULL) { - uv__free(req->alloc); - req->alloc = NULL; - } + uv__free(req->alloc); + req->alloc = NULL; if (status == UV_ECANCELED) { assert(req->retcode == 0); @@ -219,9 +217,7 @@ void uv_freeaddrinfo(struct addrinfo* ai) { char* alloc_ptr = (char*)ai; /* release copied result memory */ - if (alloc_ptr != NULL) { - uv__free(alloc_ptr); - } + uv__free(alloc_ptr); } @@ -354,8 +350,9 @@ int uv_getaddrinfo(uv_loop_t* loop, } error: - if (req != NULL && req->alloc != NULL) { + if (req != NULL) { uv__free(req->alloc); + req->alloc = NULL; } return uv_translate_sys_error(err); } diff --git a/deps/uv/src/win/internal.h b/deps/uv/src/win/internal.h index 8d4081bdb51ccf..783f21af0fe9f1 100644 --- a/deps/uv/src/win/internal.h +++ b/deps/uv/src/win/internal.h @@ -327,6 +327,7 @@ void uv__util_init(); uint64_t uv__hrtime(double scale); int uv_parent_pid(); +int uv_current_pid(); __declspec(noreturn) void uv_fatal_error(const int errorno, const char* syscall); diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c index 8312b1ceb958c3..bcce80c77e5d57 100644 --- a/deps/uv/src/win/pipe.c +++ b/deps/uv/src/win/pipe.c @@ -85,7 +85,7 @@ static void eof_timer_close_cb(uv_handle_t* handle); static void uv_unique_pipe_name(char* ptr, char* name, size_t size) { - _snprintf(name, size, "\\\\?\\pipe\\uv\\%p-%u", ptr, GetCurrentProcessId()); + snprintf(name, size, "\\\\?\\pipe\\uv\\%p-%u", ptr, GetCurrentProcessId()); } @@ -1246,6 +1246,10 @@ static int uv_pipe_write_impl(uv_loop_t* loop, if (send_handle) { tcp_send_handle = (uv_tcp_t*)send_handle; + if (handle->pipe.conn.ipc_pid == 0) { + handle->pipe.conn.ipc_pid = uv_current_pid(); + } + err = uv_tcp_duplicate_socket(tcp_send_handle, handle->pipe.conn.ipc_pid, &ipc_frame.socket_info_ex.socket_info); if (err) { @@ -1629,7 +1633,7 @@ void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle, if (ReadFile(handle->handle, buf.base, - buf.len, + min(buf.len, avail), &bytes, NULL)) { /* Successful read */ diff --git a/deps/uv/src/win/snprintf.c b/deps/uv/src/win/snprintf.c new file mode 100644 index 00000000000000..776c0e39217585 --- /dev/null +++ b/deps/uv/src/win/snprintf.c @@ -0,0 +1,42 @@ +/* Copyright the libuv project contributors. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#if defined(_MSC_VER) && _MSC_VER < 1900 + +#include +#include + +/* Emulate snprintf() on MSVC<2015, _snprintf() doesn't zero-terminate the buffer + * on overflow... + */ +int snprintf(char* buf, size_t len, const char* fmt, ...) { + int n; + va_list ap; + va_start(ap, fmt); + + n = _vscprintf(fmt, ap); + vsnprintf_s(buf, len, _TRUNCATE, fmt, ap); + + va_end(ap); + return n; +} + +#endif diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index b40bb42710ae7b..d87cc699097cf7 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -208,7 +208,7 @@ static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info) { static int style_captured = 0; /* Only do this once. - /* Assumption: Caller has acquired uv_tty_output_lock. */ + Assumption: Caller has acquired uv_tty_output_lock. */ if (style_captured) return; diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c index a0d1307f8a2590..cb247513046351 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -59,6 +59,10 @@ static char *process_title; static CRITICAL_SECTION process_title_lock; +/* Cached copy of the process id, written once. */ +static DWORD current_pid = 0; + + /* Interval (in seconds) of the high-resolution clock. */ static double hrtime_interval_ = 0; @@ -359,6 +363,14 @@ int uv_parent_pid() { } +int uv_current_pid() { + if (current_pid == 0) { + current_pid = GetCurrentProcessId(); + } + return current_pid; +} + + char** uv_setup_args(int argc, char** argv) { return argv; } diff --git a/deps/uv/src/win/winapi.c b/deps/uv/src/win/winapi.c index b0b7fd825fb64e..26bd0648668742 100644 --- a/deps/uv/src/win/winapi.c +++ b/deps/uv/src/win/winapi.c @@ -46,6 +46,7 @@ sSleepConditionVariableSRW pSleepConditionVariableSRW; sWakeAllConditionVariable pWakeAllConditionVariable; sWakeConditionVariable pWakeConditionVariable; sCancelSynchronousIo pCancelSynchronousIo; +sGetFinalPathNameByHandleW pGetFinalPathNameByHandleW; void uv_winapi_init() { @@ -139,4 +140,7 @@ void uv_winapi_init() { pCancelSynchronousIo = (sCancelSynchronousIo) GetProcAddress(kernel32_module, "CancelSynchronousIo"); + + pGetFinalPathNameByHandleW = (sGetFinalPathNameByHandleW) + GetProcAddress(kernel32_module, "GetFinalPathNameByHandleW"); } diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index 5bc79bcab27dbb..122198a6d481ac 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4678,6 +4678,12 @@ typedef VOID (WINAPI* sWakeConditionVariable) typedef BOOL (WINAPI* sCancelSynchronousIo) (HANDLE hThread); +typedef DWORD (WINAPI* sGetFinalPathNameByHandleW) + (HANDLE hFile, + LPWSTR lpszFilePath, + DWORD cchFilePath, + DWORD dwFlags); + /* Ntdll function pointers */ extern sRtlNtStatusToDosError pRtlNtStatusToDosError; extern sNtDeviceIoControlFile pNtDeviceIoControlFile; @@ -4699,5 +4705,6 @@ extern sSleepConditionVariableSRW pSleepConditionVariableSRW; extern sWakeAllConditionVariable pWakeAllConditionVariable; extern sWakeConditionVariable pWakeConditionVariable; extern sCancelSynchronousIo pCancelSynchronousIo; +extern sGetFinalPathNameByHandleW pGetFinalPathNameByHandleW; #endif /* UV_WIN_WINAPI_H_ */ diff --git a/deps/uv/test/runner-win.h b/deps/uv/test/runner-win.h index c94b89bd5ec712..8cc4c16eb22eac 100644 --- a/deps/uv/test/runner-win.h +++ b/deps/uv/test/runner-win.h @@ -19,9 +19,6 @@ * IN THE SOFTWARE. */ -/* Don't complain about _snprintf being insecure. */ -#define _CRT_SECURE_NO_WARNINGS - /* Don't complain about write(), fileno() etc. being deprecated. */ #pragma warning(disable : 4996) @@ -30,10 +27,9 @@ #include #include - -/* Windows has no snprintf, only _snprintf. */ -#define snprintf _snprintf - +#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900 +extern int snprintf(char*, size_t, const char*, ...); +#endif typedef struct { HANDLE process; diff --git a/deps/uv/test/runner.c b/deps/uv/test/runner.c index e094defc7e7de5..c616d176445db1 100644 --- a/deps/uv/test/runner.c +++ b/deps/uv/test/runner.c @@ -210,6 +210,8 @@ int run_test(const char* test, #ifndef _WIN32 /* Clean up stale socket from previous run. */ remove(TEST_PIPENAME); + remove(TEST_PIPENAME_2); + remove(TEST_PIPENAME_3); #endif /* If it's a helper the user asks for, start it directly. */ diff --git a/deps/uv/test/task.h b/deps/uv/test/task.h index e736763802f610..d18c1daa364702 100644 --- a/deps/uv/test/task.h +++ b/deps/uv/test/task.h @@ -50,9 +50,11 @@ #ifdef _WIN32 # define TEST_PIPENAME "\\\\?\\pipe\\uv-test" # define TEST_PIPENAME_2 "\\\\?\\pipe\\uv-test2" +# define TEST_PIPENAME_3 "\\\\?\\pipe\\uv-test3" #else # define TEST_PIPENAME "/tmp/uv-test-sock" # define TEST_PIPENAME_2 "/tmp/uv-test-sock2" +# define TEST_PIPENAME_3 "/tmp/uv-test-sock3" #endif #ifdef _WIN32 @@ -174,40 +176,8 @@ enum test_status { #endif - -#if defined _WIN32 && ! defined __GNUC__ - -#include - -/* Define inline for MSVC<2015 */ -# if defined(_MSC_VER) && _MSC_VER < 1900 -# define inline __inline -# endif - -# if defined(_MSC_VER) && _MSC_VER < 1900 -/* Emulate snprintf() on MSVC<2015, _snprintf() doesn't zero-terminate the buffer - * on overflow... - */ -inline int snprintf(char* buf, size_t len, const char* fmt, ...) { - va_list ap; - int n; - - va_start(ap, fmt); - n = _vsprintf_p(buf, len, fmt, ap); - va_end(ap); - - /* It's a sad fact of life that no one ever checks the return value of - * snprintf(). Zero-terminating the buffer hopefully reduces the risk - * of gaping security holes. - */ - if (n < 0) - if (len > 0) - buf[0] = '\0'; - - return n; -} -# endif - +#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900 +extern int snprintf(char*, size_t, const char*, ...); #endif #if defined(__clang__) || \ diff --git a/deps/uv/test/test-emfile.c b/deps/uv/test/test-emfile.c index 453bfe4cf5ff55..dd35f785b46352 100644 --- a/deps/uv/test/test-emfile.c +++ b/deps/uv/test/test-emfile.c @@ -25,7 +25,6 @@ #include "task.h" #include -#include #include #include @@ -45,6 +44,13 @@ TEST_IMPL(emfile) { uv_loop_t* loop; int first_fd; + /* Lower the file descriptor limit and use up all fds save one. */ + limits.rlim_cur = limits.rlim_max = maxfd + 1; + if (setrlimit(RLIMIT_NOFILE, &limits)) { + ASSERT(errno == EPERM); /* Valgrind blocks the setrlimit() call. */ + RETURN_SKIP("setrlimit(RLIMIT_NOFILE) failed, running under valgrind?"); + } + loop = uv_default_loop(); ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); ASSERT(0 == uv_tcp_init(loop, &server_handle)); @@ -52,13 +58,6 @@ TEST_IMPL(emfile) { ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 8, connection_cb)); - /* Lower the file descriptor limit and use up all fds save one. */ - limits.rlim_cur = limits.rlim_max = maxfd + 1; - if (setrlimit(RLIMIT_NOFILE, &limits)) { - perror("setrlimit(RLIMIT_NOFILE)"); - ASSERT(0); - } - /* Remember the first one so we can clean up afterwards. */ do first_fd = dup(0); diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c index a0908ce575bd42..e02ff2fda5e5d9 100644 --- a/deps/uv/test/test-fs-event.c +++ b/deps/uv/test/test-fs-event.c @@ -115,7 +115,11 @@ static void fs_event_cb_dir(uv_fs_event_t* handle, const char* filename, ASSERT(handle == &fs_event); ASSERT(status == 0); ASSERT(events == UV_RENAME); + #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) + ASSERT(strcmp(filename, "file1") == 0); + #else ASSERT(filename == NULL || strcmp(filename, "file1") == 0); + #endif ASSERT(0 == uv_fs_event_stop(handle)); uv_close((uv_handle_t*)handle, close_cb); } @@ -178,8 +182,12 @@ static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle, ASSERT(handle == &fs_event); ASSERT(status == 0); ASSERT(events == UV_CHANGE || UV_RENAME); + #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) + ASSERT(strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); + #else ASSERT(filename == NULL || strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); + #endif if (fs_event_created + fs_event_removed == fs_event_file_count) { /* Once we've processed all create events, delete all files */ @@ -250,8 +258,16 @@ static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle, ASSERT(handle == &fs_event); ASSERT(status == 0); ASSERT(events == UV_CHANGE || UV_RENAME); + #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) + ASSERT(strncmp(filename, + file_prefix_in_subdir, + sizeof(file_prefix_in_subdir) - 1) == 0); + #else ASSERT(filename == NULL || - strncmp(filename, file_prefix_in_subdir, sizeof(file_prefix_in_subdir) - 1) == 0); + strncmp(filename, + file_prefix_in_subdir, + sizeof(file_prefix_in_subdir) - 1) == 0); + #endif if (fs_event_created + fs_event_removed == fs_event_file_count) { /* Once we've processed all create events, delete all files */ @@ -270,7 +286,11 @@ static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename, ASSERT(handle == &fs_event); ASSERT(status == 0); ASSERT(events == UV_CHANGE); + #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) + ASSERT(strcmp(filename, "file2") == 0); + #else ASSERT(filename == NULL || strcmp(filename, "file2") == 0); + #endif ASSERT(0 == uv_fs_event_stop(handle)); uv_close((uv_handle_t*)handle, close_cb); } @@ -293,7 +313,11 @@ static void fs_event_cb_file_current_dir(uv_fs_event_t* handle, ASSERT(handle == &fs_event); ASSERT(status == 0); ASSERT(events == UV_CHANGE); + #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) + ASSERT(strcmp(filename, "watch_file") == 0); + #else ASSERT(filename == NULL || strcmp(filename, "watch_file") == 0); + #endif /* Regression test for SunOS: touch should generate just one event. */ { @@ -487,7 +511,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) { r = uv_timer_init(loop, &timer); ASSERT(r == 0); - r = uv_timer_start(&timer, timer_cb_touch, 1, 0); + r = uv_timer_start(&timer, timer_cb_touch, 10, 0); ASSERT(r == 0); ASSERT(timer_cb_touch_called == 0); diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index 90572ca6147150..cf37ac4909ca12 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -83,6 +83,7 @@ static int fchown_cb_count; static int link_cb_count; static int symlink_cb_count; static int readlink_cb_count; +static int realpath_cb_count; static int utime_cb_count; static int futime_cb_count; @@ -168,6 +169,35 @@ static void readlink_cb(uv_fs_t* req) { } +static void realpath_cb(uv_fs_t* req) { + char test_file_abs_buf[PATHMAX]; + size_t test_file_abs_size = sizeof(test_file_abs_buf); + ASSERT(req->fs_type == UV_FS_REALPATH); +#ifdef _WIN32 + /* + * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW() + */ + if (req->result == UV_ENOSYS) { + realpath_cb_count++; + uv_fs_req_cleanup(req); + return; + } +#endif + ASSERT(req->result == 0); + + uv_cwd(test_file_abs_buf, &test_file_abs_size); +#ifdef _WIN32 + strcat(test_file_abs_buf, "\\test_file"); + ASSERT(stricmp(req->ptr, test_file_abs_buf) == 0); +#else + strcat(test_file_abs_buf, "/test_file"); + ASSERT(strcmp(req->ptr, test_file_abs_buf) == 0); +#endif + realpath_cb_count++; + uv_fs_req_cleanup(req); +} + + static void access_cb(uv_fs_t* req) { ASSERT(req->fs_type == UV_FS_ACCESS); access_cb_count++; @@ -1565,11 +1595,43 @@ TEST_IMPL(fs_readlink) { } +TEST_IMPL(fs_realpath) { + uv_fs_t req; + + loop = uv_default_loop(); + ASSERT(0 == uv_fs_realpath(loop, &req, "no_such_file", dummy_cb)); + ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT(dummy_cb_count == 1); + ASSERT(req.ptr == NULL); +#ifdef _WIN32 + /* + * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW() + */ + if (req.result == UV_ENOSYS) { + uv_fs_req_cleanup(&req); + RETURN_SKIP("realpath is not supported on Windows XP"); + } +#endif + ASSERT(req.result == UV_ENOENT); + uv_fs_req_cleanup(&req); + + ASSERT(UV_ENOENT == uv_fs_realpath(NULL, &req, "no_such_file", NULL)); + ASSERT(req.ptr == NULL); + ASSERT(req.result == UV_ENOENT); + uv_fs_req_cleanup(&req); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + TEST_IMPL(fs_symlink) { int r; uv_fs_t req; uv_file file; uv_file link; + char test_file_abs_buf[PATHMAX]; + size_t test_file_abs_size; /* Setup. */ unlink("test_file"); @@ -1577,6 +1639,14 @@ TEST_IMPL(fs_symlink) { unlink("test_file_symlink2"); unlink("test_file_symlink_symlink"); unlink("test_file_symlink2_symlink"); + test_file_abs_size = sizeof(test_file_abs_buf); +#ifdef _WIN32 + uv_cwd(test_file_abs_buf, &test_file_abs_size); + strcat(test_file_abs_buf, "\\test_file"); +#else + uv_cwd(test_file_abs_buf, &test_file_abs_size); + strcat(test_file_abs_buf, "/test_file"); +#endif loop = uv_default_loop(); @@ -1647,6 +1717,24 @@ TEST_IMPL(fs_symlink) { ASSERT(strcmp(req.ptr, "test_file_symlink") == 0); uv_fs_req_cleanup(&req); + r = uv_fs_realpath(NULL, &req, "test_file_symlink_symlink", NULL); +#ifdef _WIN32 + /* + * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW() + */ + if (r == UV_ENOSYS) { + uv_fs_req_cleanup(&req); + RETURN_SKIP("realpath is not supported on Windows XP"); + } +#endif + ASSERT(r == 0); +#ifdef _WIN32 + ASSERT(stricmp(req.ptr, test_file_abs_buf) == 0); +#else + ASSERT(strcmp(req.ptr, test_file_abs_buf) == 0); +#endif + uv_fs_req_cleanup(&req); + /* async link */ r = uv_fs_symlink(loop, &req, @@ -1687,6 +1775,20 @@ TEST_IMPL(fs_symlink) { uv_run(loop, UV_RUN_DEFAULT); ASSERT(readlink_cb_count == 1); + r = uv_fs_realpath(loop, &req, "test_file", realpath_cb); +#ifdef _WIN32 + /* + * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW() + */ + if (r == UV_ENOSYS) { + uv_fs_req_cleanup(&req); + RETURN_SKIP("realpath is not supported on Windows XP"); + } +#endif + ASSERT(r == 0); + uv_run(loop, UV_RUN_DEFAULT); + ASSERT(realpath_cb_count == 1); + /* * Run the loop just to check we don't have make any extraneous uv_ref() * calls. This should drop out immediately. @@ -1710,12 +1812,15 @@ TEST_IMPL(fs_symlink_dir) { int r; char* test_dir; uv_dirent_t dent; + static char test_dir_abs_buf[PATHMAX]; + size_t test_dir_abs_size; /* set-up */ unlink("test_dir/file1"); unlink("test_dir/file2"); rmdir("test_dir"); rmdir("test_dir_symlink"); + test_dir_abs_size = sizeof(test_dir_abs_buf); loop = uv_default_loop(); @@ -1723,16 +1828,16 @@ TEST_IMPL(fs_symlink_dir) { uv_fs_req_cleanup(&req); #ifdef _WIN32 - { - static char src_path_buf[PATHMAX]; - size_t size; - size = sizeof(src_path_buf); - strcpy(src_path_buf, "\\\\?\\"); - uv_cwd(src_path_buf + 4, &size); - strcat(src_path_buf, "\\test_dir\\"); - test_dir = src_path_buf; - } + strcpy(test_dir_abs_buf, "\\\\?\\"); + uv_cwd(test_dir_abs_buf + 4, &test_dir_abs_size); + test_dir_abs_size += 4; + strcat(test_dir_abs_buf, "\\test_dir\\"); + test_dir_abs_size += strlen("\\test_dir\\"); + test_dir = test_dir_abs_buf; #else + uv_cwd(test_dir_abs_buf, &test_dir_abs_size); + strcat(test_dir_abs_buf, "/test_dir"); + test_dir_abs_size += strlen("/test_dir"); test_dir = "test_dir"; #endif @@ -1767,6 +1872,25 @@ TEST_IMPL(fs_symlink_dir) { #endif uv_fs_req_cleanup(&req); + r = uv_fs_realpath(NULL, &req, "test_dir_symlink", NULL); +#ifdef _WIN32 + /* + * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW() + */ + if (r == UV_ENOSYS) { + uv_fs_req_cleanup(&req); + RETURN_SKIP("realpath is not supported on Windows XP"); + } +#endif + ASSERT(r == 0); +#ifdef _WIN32 + ASSERT(strlen(req.ptr) == test_dir_abs_size - 5); + ASSERT(strnicmp(req.ptr, test_dir + 4, test_dir_abs_size - 5) == 0); +#else + ASSERT(strcmp(req.ptr, test_dir_abs_buf) == 0); +#endif + uv_fs_req_cleanup(&req); + r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); diff --git a/deps/uv/test/test-get-loadavg.c b/deps/uv/test/test-get-loadavg.c index 7465e18b91e9c7..4762e47576d064 100644 --- a/deps/uv/test/test-get-loadavg.c +++ b/deps/uv/test/test-get-loadavg.c @@ -24,10 +24,9 @@ TEST_IMPL(get_loadavg) { - double avg[3]; + double avg[3] = {-1, -1, -1}; uv_loadavg(avg); - ASSERT(avg != NULL); ASSERT(avg[0] >= 0); ASSERT(avg[1] >= 0); ASSERT(avg[2] >= 0); diff --git a/deps/uv/test/test-getaddrinfo.c b/deps/uv/test/test-getaddrinfo.c index 45813c313af2c2..6b644a8d442a3a 100644 --- a/deps/uv/test/test-getaddrinfo.c +++ b/deps/uv/test/test-getaddrinfo.c @@ -83,10 +83,11 @@ static void getaddrinfo_cuncurrent_cb(uv_getaddrinfo_t* handle, TEST_IMPL(getaddrinfo_fail) { uv_getaddrinfo_t req; + /* Use a FQDN by ending in a period */ ASSERT(0 == uv_getaddrinfo(uv_default_loop(), &req, getaddrinfo_fail_cb, - "xyzzy.xyzzy.xyzzy", + "xyzzy.xyzzy.xyzzy.", NULL, NULL)); ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); @@ -100,10 +101,11 @@ TEST_IMPL(getaddrinfo_fail) { TEST_IMPL(getaddrinfo_fail_sync) { uv_getaddrinfo_t req; + /* Use a FQDN by ending in a period */ ASSERT(0 > uv_getaddrinfo(uv_default_loop(), &req, NULL, - "xyzzy.xyzzy.xyzzy", + "xyzzy.xyzzy.xyzzy.", NULL, NULL)); uv_freeaddrinfo(req.addrinfo); diff --git a/deps/uv/test/test-getnameinfo.c b/deps/uv/test/test-getnameinfo.c index ebe9246699dbd0..b1391616d13e54 100644 --- a/deps/uv/test/test-getnameinfo.c +++ b/deps/uv/test/test-getnameinfo.c @@ -73,8 +73,8 @@ TEST_IMPL(getnameinfo_basic_ip4_sync) { NULL, (const struct sockaddr*)&addr4, 0)); - ASSERT(req.host != NULL); - ASSERT(req.service != NULL); + ASSERT(req.host[0] != '\0'); + ASSERT(req.service[0] != '\0'); MAKE_VALGRIND_HAPPY(); return 0; diff --git a/deps/uv/test/test-ipc-send-recv.c b/deps/uv/test/test-ipc-send-recv.c index d9b913339d3d50..c445483fa089e3 100644 --- a/deps/uv/test/test-ipc-send-recv.c +++ b/deps/uv/test/test-ipc-send-recv.c @@ -30,6 +30,8 @@ void spawn_helper(uv_pipe_t* channel, uv_process_t* process, const char* helper); +void ipc_send_recv_helper_threadproc(void* arg); + union handles { uv_handle_t handle; uv_stream_t stream; @@ -38,16 +40,37 @@ union handles { uv_tty_t tty; }; -struct echo_ctx { +struct test_ctx { uv_pipe_t channel; + uv_connect_t connect_req; uv_write_t write_req; + uv_write_t write_req2; uv_handle_type expected_type; union handles send; + union handles send2; + union handles recv; + union handles recv2; +}; + +struct echo_ctx { + uv_pipe_t listen; + uv_pipe_t channel; + uv_write_t write_req; + uv_write_t write_req2; + uv_handle_type expected_type; union handles recv; + union handles recv2; }; -static struct echo_ctx ctx; -static int num_recv_handles; +static struct test_ctx ctx; +static struct echo_ctx ctx2; + +/* Used in write2_cb to decide if we need to cleanup or not */ +static int is_child_process; +static int is_in_process; +static int read_cb_called; +static int recv_cb_called; +static int write2_cb_called; static void alloc_cb(uv_handle_t* handle, @@ -66,39 +89,55 @@ static void recv_cb(uv_stream_t* handle, uv_handle_type pending; uv_pipe_t* pipe; int r; + union handles* recv; + + if (++recv_cb_called == 1) { + recv = &ctx.recv; + } else { + recv = &ctx.recv2; + } pipe = (uv_pipe_t*) handle; ASSERT(pipe == &ctx.channel); - ASSERT(nread >= 0); - ASSERT(1 == uv_pipe_pending_count(pipe)); - - pending = uv_pipe_pending_type(pipe); - ASSERT(pending == ctx.expected_type); - - if (pending == UV_NAMED_PIPE) - r = uv_pipe_init(ctx.channel.loop, &ctx.recv.pipe, 0); - else if (pending == UV_TCP) - r = uv_tcp_init(ctx.channel.loop, &ctx.recv.tcp); - else - abort(); - ASSERT(r == 0); - r = uv_accept(handle, &ctx.recv.stream); - ASSERT(r == 0); - - uv_close((uv_handle_t*)&ctx.channel, NULL); - uv_close(&ctx.send.handle, NULL); - uv_close(&ctx.recv.handle, NULL); - num_recv_handles++; + /* Depending on the OS, the final recv_cb can be called after the child + * process has terminated which can result in nread being UV_EOF instead of + * the number of bytes read. Since the other end of the pipe has closed this + * UV_EOF is an acceptable value. */ + if (nread == UV_EOF) { + /* UV_EOF is only acceptable for the final recv_cb call */ + ASSERT(recv_cb_called == 2); + } else { + ASSERT(nread >= 0); + ASSERT(1 == uv_pipe_pending_count(pipe)); + + pending = uv_pipe_pending_type(pipe); + ASSERT(pending == ctx.expected_type); + + if (pending == UV_NAMED_PIPE) + r = uv_pipe_init(ctx.channel.loop, &recv->pipe, 0); + else if (pending == UV_TCP) + r = uv_tcp_init(ctx.channel.loop, &recv->tcp); + else + abort(); + ASSERT(r == 0); + + r = uv_accept(handle, &recv->stream); + ASSERT(r == 0); + } + + /* Close after two writes received */ + if (recv_cb_called == 2) { + uv_close((uv_handle_t*)&ctx.channel, NULL); + } } - -static int run_test(void) { - uv_process_t process; - uv_buf_t buf; +static void connect_cb(uv_connect_t* req, int status) { int r; + uv_buf_t buf; - spawn_helper(&ctx.channel, &process, "ipc_send_recv_helper"); + ASSERT(req == &ctx.connect_req); + ASSERT(status == 0); buf = uv_buf_init(".", 1); r = uv_write2(&ctx.write_req, @@ -108,19 +147,56 @@ static int run_test(void) { NULL); ASSERT(r == 0); + /* Perform two writes to the same pipe to make sure that on Windows we are + * not running into issue 505: + * https://github.com/libuv/libuv/issues/505 */ + buf = uv_buf_init(".", 1); + r = uv_write2(&ctx.write_req2, + (uv_stream_t*)&ctx.channel, + &buf, 1, + &ctx.send2.stream, + NULL); + ASSERT(r == 0); + r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb); ASSERT(r == 0); +} + +static int run_test(int inprocess) { + uv_process_t process; + uv_thread_t tid; + int r; + + if (inprocess) { + r = uv_thread_create(&tid, ipc_send_recv_helper_threadproc, (void *) 42); + ASSERT(r == 0); + + uv_sleep(1000); + + r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); + ASSERT(r == 0); + + uv_pipe_connect(&ctx.connect_req, &ctx.channel, TEST_PIPENAME_3, connect_cb); + } else { + spawn_helper(&ctx.channel, &process, "ipc_send_recv_helper"); + + connect_cb(&ctx.connect_req, 0); + } r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); ASSERT(r == 0); - ASSERT(num_recv_handles == 1); + ASSERT(recv_cb_called == 2); + + if (inprocess) { + r = uv_thread_join(&tid); + ASSERT(r == 0); + } return 0; } - -TEST_IMPL(ipc_send_recv_pipe) { +static int run_ipc_send_recv_pipe(int inprocess) { int r; ctx.expected_type = UV_NAMED_PIPE; @@ -131,15 +207,28 @@ TEST_IMPL(ipc_send_recv_pipe) { r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); ASSERT(r == 0); - r = run_test(); + r = uv_pipe_init(uv_default_loop(), &ctx.send2.pipe, 1); + ASSERT(r == 0); + + r = uv_pipe_bind(&ctx.send2.pipe, TEST_PIPENAME_2); + ASSERT(r == 0); + + r = run_test(inprocess); ASSERT(r == 0); MAKE_VALGRIND_HAPPY(); return 0; } +TEST_IMPL(ipc_send_recv_pipe) { + return run_ipc_send_recv_pipe(0); +} -TEST_IMPL(ipc_send_recv_tcp) { +TEST_IMPL(ipc_send_recv_pipe_inprocess) { + return run_ipc_send_recv_pipe(1); +} + +static int run_ipc_send_recv_tcp(int inprocess) { struct sockaddr_in addr; int r; @@ -150,25 +239,45 @@ TEST_IMPL(ipc_send_recv_tcp) { r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); ASSERT(r == 0); + r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp); + ASSERT(r == 0); + r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); ASSERT(r == 0); - r = run_test(); + r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0); + ASSERT(r == 0); + + r = run_test(inprocess); ASSERT(r == 0); MAKE_VALGRIND_HAPPY(); return 0; } +TEST_IMPL(ipc_send_recv_tcp) { + return run_ipc_send_recv_tcp(0); +} + +TEST_IMPL(ipc_send_recv_tcp_inprocess) { + return run_ipc_send_recv_tcp(1); +} + -/* Everything here runs in a child process. */ +/* Everything here runs in a child process or second thread. */ static void write2_cb(uv_write_t* req, int status) { ASSERT(status == 0); - uv_close(&ctx.recv.handle, NULL); - uv_close((uv_handle_t*)&ctx.channel, NULL); -} + /* After two successful writes in the child process, allow the child + * process to be closed. */ + if (++write2_cb_called == 2 && (is_child_process || is_in_process)) { + uv_close(&ctx2.recv.handle, NULL); + uv_close(&ctx2.recv2.handle, NULL); + uv_close((uv_handle_t*)&ctx2.channel, NULL); + uv_close((uv_handle_t*)&ctx2.listen, NULL); + } +} static void read_cb(uv_stream_t* handle, ssize_t nread, @@ -177,37 +286,102 @@ static void read_cb(uv_stream_t* handle, uv_pipe_t* pipe; uv_handle_type pending; int r; + union handles* recv; + uv_write_t* write_req; + + if (nread == UV__EOF || nread == UV__ECONNABORTED) { + return; + } + + if (++read_cb_called == 2) { + recv = &ctx2.recv; + write_req = &ctx2.write_req; + } else { + recv = &ctx2.recv2; + write_req = &ctx2.write_req2; + } pipe = (uv_pipe_t*) handle; - ASSERT(pipe == &ctx.channel); + ASSERT(pipe == &ctx2.channel); ASSERT(nread >= 0); ASSERT(1 == uv_pipe_pending_count(pipe)); pending = uv_pipe_pending_type(pipe); ASSERT(pending == UV_NAMED_PIPE || pending == UV_TCP); - wrbuf = uv_buf_init(".", 1); - if (pending == UV_NAMED_PIPE) - r = uv_pipe_init(ctx.channel.loop, &ctx.recv.pipe, 0); + r = uv_pipe_init(ctx2.channel.loop, &recv->pipe, 0); else if (pending == UV_TCP) - r = uv_tcp_init(ctx.channel.loop, &ctx.recv.tcp); + r = uv_tcp_init(ctx2.channel.loop, &recv->tcp); else abort(); ASSERT(r == 0); - r = uv_accept(handle, &ctx.recv.stream); + r = uv_accept(handle, &recv->stream); ASSERT(r == 0); - r = uv_write2(&ctx.write_req, - (uv_stream_t*)&ctx.channel, + wrbuf = uv_buf_init(".", 1); + r = uv_write2(write_req, + (uv_stream_t*)&ctx2.channel, &wrbuf, 1, - &ctx.recv.stream, + &recv->stream, write2_cb); ASSERT(r == 0); } +static void send_recv_start() { + int r; + ASSERT(1 == uv_is_readable((uv_stream_t*)&ctx2.channel)); + ASSERT(1 == uv_is_writable((uv_stream_t*)&ctx2.channel)); + ASSERT(0 == uv_is_closing((uv_handle_t*)&ctx2.channel)); + + r = uv_read_start((uv_stream_t*)&ctx2.channel, alloc_cb, read_cb); + ASSERT(r == 0); +} + +static void listen_cb(uv_stream_t* handle, int status) { + int r; + ASSERT(handle == (uv_stream_t*)&ctx2.listen); + ASSERT(status == 0); + + r = uv_accept((uv_stream_t*)&ctx2.listen, (uv_stream_t*)&ctx2.channel); + ASSERT(r == 0); + + send_recv_start(); +} + +int run_ipc_send_recv_helper(uv_loop_t* loop, int inprocess) { + int r; + + is_in_process = inprocess; + + memset(&ctx2, 0, sizeof(ctx2)); + + r = uv_pipe_init(loop, &ctx2.listen, 0); + ASSERT(r == 0); + + r = uv_pipe_init(loop, &ctx2.channel, 1); + ASSERT(r == 0); + + if (inprocess) { + r = uv_pipe_bind(&ctx2.listen, TEST_PIPENAME_3); + ASSERT(r == 0); + + r = uv_listen((uv_stream_t*)&ctx2.listen, SOMAXCONN, listen_cb); + ASSERT(r == 0); + } else { + r = uv_pipe_open(&ctx2.channel, 0); + ASSERT(r == 0); + + send_recv_start(); + } + + r = uv_run(loop, UV_RUN_DEFAULT); + ASSERT(r == 0); + + return 0; +} /* stdin is a duplex channel over which a handle is sent. * We receive it and send it back where it came from. @@ -215,22 +389,23 @@ static void read_cb(uv_stream_t* handle, int ipc_send_recv_helper(void) { int r; - memset(&ctx, 0, sizeof(ctx)); - - r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); + r = run_ipc_send_recv_helper(uv_default_loop(), 0); ASSERT(r == 0); - uv_pipe_open(&ctx.channel, 0); - ASSERT(1 == uv_is_readable((uv_stream_t*)&ctx.channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*)&ctx.channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*)&ctx.channel)); + MAKE_VALGRIND_HAPPY(); + return 0; +} - r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, read_cb); +void ipc_send_recv_helper_threadproc(void* arg) { + int r; + uv_loop_t loop; + + r = uv_loop_init(&loop); ASSERT(r == 0); - r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); + r = run_ipc_send_recv_helper(&loop, 1); ASSERT(r == 0); - MAKE_VALGRIND_HAPPY(); - return 0; + r = uv_loop_close(&loop); + ASSERT(r == 0); } diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index 8ee74391afaeb7..858a20af49c291 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -50,8 +50,10 @@ TEST_DECLARE (ipc_listen_before_write) TEST_DECLARE (ipc_listen_after_write) #ifndef _WIN32 TEST_DECLARE (ipc_send_recv_pipe) +TEST_DECLARE (ipc_send_recv_pipe_inprocess) #endif TEST_DECLARE (ipc_send_recv_tcp) +TEST_DECLARE (ipc_send_recv_tcp_inprocess) TEST_DECLARE (ipc_tcp_connection) TEST_DECLARE (tcp_ping_pong) TEST_DECLARE (tcp_ping_pong_v6) @@ -252,6 +254,7 @@ TEST_DECLARE (fs_unlink_readonly) TEST_DECLARE (fs_chown) TEST_DECLARE (fs_link) TEST_DECLARE (fs_readlink) +TEST_DECLARE (fs_realpath) TEST_DECLARE (fs_symlink) TEST_DECLARE (fs_symlink_dir) TEST_DECLARE (fs_utime) @@ -334,6 +337,7 @@ HELPER_DECLARE (tcp6_echo_server) HELPER_DECLARE (udp4_echo_server) HELPER_DECLARE (pipe_echo_server) +TEST_DECLARE (queue_foreach_delete) TASK_LIST_START TEST_ENTRY_CUSTOM (platform_output, 0, 1, 5000) @@ -380,8 +384,10 @@ TASK_LIST_START TEST_ENTRY (ipc_listen_after_write) #ifndef _WIN32 TEST_ENTRY (ipc_send_recv_pipe) + TEST_ENTRY (ipc_send_recv_pipe_inprocess) #endif TEST_ENTRY (ipc_send_recv_tcp) + TEST_ENTRY (ipc_send_recv_tcp_inprocess) TEST_ENTRY (ipc_tcp_connection) TEST_ENTRY (tcp_ping_pong) @@ -671,6 +677,7 @@ TASK_LIST_START TEST_ENTRY (fs_utime) TEST_ENTRY (fs_futime) TEST_ENTRY (fs_readlink) + TEST_ENTRY (fs_realpath) TEST_ENTRY (fs_symlink) TEST_ENTRY (fs_symlink_dir) TEST_ENTRY (fs_stat_missing_path) @@ -714,6 +721,9 @@ TASK_LIST_START TEST_ENTRY (dlerror) TEST_ENTRY (ip4_addr) TEST_ENTRY (ip6_addr_link_local) + + TEST_ENTRY (queue_foreach_delete) + #if 0 /* These are for testing the test runner. */ TEST_ENTRY (fail_always) diff --git a/deps/uv/test/test-mutexes.c b/deps/uv/test/test-mutexes.c index 4aeac73b4c1571..af5e4e88a22f30 100644 --- a/deps/uv/test/test-mutexes.c +++ b/deps/uv/test/test-mutexes.c @@ -25,6 +25,10 @@ #include #include +static uv_cond_t condvar; +static uv_mutex_t mutex; +static uv_rwlock_t rwlock; +static int step; /* The mutex and rwlock tests are really poor. * They're very basic sanity checks and nothing more. @@ -63,60 +67,96 @@ TEST_IMPL(thread_rwlock) { } -TEST_IMPL(thread_rwlock_trylock) { - uv_rwlock_t rwlock; - int r; - - r = uv_rwlock_init(&rwlock); - ASSERT(r == 0); - - /* No locks held. */ +/* Call when holding |mutex|. */ +static void synchronize_nowait(void) { + step += 1; + uv_cond_signal(&condvar); +} - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == 0); - /* Write lock held. */ +/* Call when holding |mutex|. */ +static void synchronize(void) { + int current; - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == UV_EBUSY); - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == UV_EBUSY); + synchronize_nowait(); + /* Wait for the other thread. Guard against spurious wakeups. */ + for (current = step; current == step; uv_cond_wait(&condvar, &mutex)); + ASSERT(step == current + 1); +} - uv_rwlock_wrunlock(&rwlock); - /* No locks held. */ +static void thread_rwlock_trylock_peer(void* unused) { + (void) &unused; - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == 0); + uv_mutex_lock(&mutex); - /* One read lock held. */ + /* Write lock held by other thread. */ + ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock)); + ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + synchronize(); - r = uv_rwlock_tryrdlock(&rwlock); - ASSERT(r == 0); + /* Read lock held by other thread. */ + ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + uv_rwlock_rdunlock(&rwlock); + ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + synchronize(); - /* Two read locks held. */ + /* Acquire write lock. */ + ASSERT(0 == uv_rwlock_trywrlock(&rwlock)); + synchronize(); - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == UV_EBUSY); + /* Release write lock and acquire read lock. */ + uv_rwlock_wrunlock(&rwlock); + ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + synchronize(); uv_rwlock_rdunlock(&rwlock); + synchronize_nowait(); /* Signal main thread we're going away. */ + uv_mutex_unlock(&mutex); +} - /* One read lock held. */ - uv_rwlock_rdunlock(&rwlock); +TEST_IMPL(thread_rwlock_trylock) { + uv_thread_t thread; - /* No read locks held. */ + ASSERT(0 == uv_cond_init(&condvar)); + ASSERT(0 == uv_mutex_init(&mutex)); + ASSERT(0 == uv_rwlock_init(&rwlock)); - r = uv_rwlock_trywrlock(&rwlock); - ASSERT(r == 0); + uv_mutex_lock(&mutex); + ASSERT(0 == uv_thread_create(&thread, thread_rwlock_trylock_peer, NULL)); - /* Write lock held. */ + /* Hold write lock. */ + ASSERT(0 == uv_rwlock_trywrlock(&rwlock)); + synchronize(); /* Releases the mutex to the other thread. */ + /* Release write lock and acquire read lock. Pthreads doesn't support + * the notion of upgrading or downgrading rwlocks, so neither do we. + */ uv_rwlock_wrunlock(&rwlock); + ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + synchronize(); + + /* Release read lock. */ + uv_rwlock_rdunlock(&rwlock); + synchronize(); - /* No locks held. */ + /* Write lock held by other thread. */ + ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock)); + ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + synchronize(); + /* Read lock held by other thread. */ + ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + uv_rwlock_rdunlock(&rwlock); + ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + synchronize(); + + ASSERT(0 == uv_thread_join(&thread)); uv_rwlock_destroy(&rwlock); + uv_mutex_unlock(&mutex); + uv_mutex_destroy(&mutex); + uv_cond_destroy(&condvar); return 0; } diff --git a/deps/uv/test/test-process-title.c b/deps/uv/test/test-process-title.c index 29be20749bea9d..42ade44160416f 100644 --- a/deps/uv/test/test-process-title.c +++ b/deps/uv/test/test-process-title.c @@ -42,7 +42,7 @@ static void set_title(const char* title) { TEST_IMPL(process_title) { -#if defined(__sun) +#if defined(__sun) || defined(_AIX) RETURN_SKIP("uv_(get|set)_process_title is not implemented."); #else /* Check for format string vulnerabilities. */ diff --git a/deps/uv/test/test-queue-foreach-delete.c b/deps/uv/test/test-queue-foreach-delete.c new file mode 100644 index 00000000000000..45da225381f51f --- /dev/null +++ b/deps/uv/test/test-queue-foreach-delete.c @@ -0,0 +1,200 @@ +/* Copyright The libuv project and contributors. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "uv.h" +#include "task.h" + +#include + + +/* + * The idea behind the test is as follows. + * Certain handle types are stored in a queue internally. + * Extra care should be taken for removal of a handle from the queue while iterating over the queue. + * (i.e., QUEUE_REMOVE() called within QUEUE_FOREACH()) + * This usually happens when someone closes or stops a handle from within its callback. + * So we need to check that we haven't screwed the queue on close/stop. + * To do so we do the following (for each handle type): + * 1. Create and start 3 handles (#0, #1, and #2). + * + * The queue after the start() calls: + * ..=> [queue head] <=> [handle] <=> [handle #1] <=> [handle] <=.. + * + * 2. Trigger handles to fire (for uv_idle_t, uv_prepare_t, and uv_check_t there is nothing to do). + * + * 3. In the callback for the first-executed handle (#0 or #2 depending on handle type) + * stop the handle and the next one (#1). + * (for uv_idle_t, uv_prepare_t, and uv_check_t callbacks are executed in the reverse order as they are start()'ed, + * so callback for handle #2 will be called first) + * + * The queue after the stop() calls: + * correct foreach "next" | + * \/ + * ..=> [queue head] <==============================> [handle] <=.. + * [ ] <- [handle] <=> [handle #1] -> [ ] + * /\ + * wrong foreach "next" | + * + * 4. The callback for handle #1 shouldn't be called because the handle #1 is stopped in the previous step. + * However, if QUEUE_REMOVE() is not handled properly within QUEUE_FOREACH(), the callback _will_ be called. + */ + +static const unsigned first_handle_number_idle = 2; +static const unsigned first_handle_number_prepare = 2; +static const unsigned first_handle_number_check = 2; +#ifdef __linux__ +static const unsigned first_handle_number_fs_event = 0; +#endif + + +#define DEFINE_GLOBALS_AND_CBS(name) \ + static uv_##name##_t (name)[3]; \ + static unsigned name##_cb_calls[3]; \ + \ + static void name##2_cb(uv_##name##_t* handle) { \ + ASSERT(handle == &(name)[2]); \ + if (first_handle_number_##name == 2) { \ + uv_close((uv_handle_t*)&(name)[2], NULL); \ + uv_close((uv_handle_t*)&(name)[1], NULL); \ + } \ + name##_cb_calls[2]++; \ + } \ + \ + static void name##1_cb(uv_##name##_t* handle) { \ + ASSERT(handle == &(name)[1]); \ + ASSERT(0 && "Shouldn't be called" && (&name[0])); \ + } \ + \ + static void name##0_cb(uv_##name##_t* handle) { \ + ASSERT(handle == &(name)[0]); \ + if (first_handle_number_##name == 0) { \ + uv_close((uv_handle_t*)&(name)[0], NULL); \ + uv_close((uv_handle_t*)&(name)[1], NULL); \ + } \ + name##_cb_calls[0]++; \ + } \ + \ + static const uv_##name##_cb name##_cbs[] = { \ + (uv_##name##_cb)name##0_cb, \ + (uv_##name##_cb)name##1_cb, \ + (uv_##name##_cb)name##2_cb, \ + }; + +#define INIT_AND_START(name, loop) \ + do { \ + size_t i; \ + for (i = 0; i < ARRAY_SIZE(name); i++) { \ + int r; \ + r = uv_##name##_init((loop), &(name)[i]); \ + ASSERT(r == 0); \ + \ + r = uv_##name##_start(&(name)[i], name##_cbs[i]); \ + ASSERT(r == 0); \ + } \ + } while (0) + +#define END_ASSERTS(name) \ + do { \ + ASSERT(name##_cb_calls[0] == 1); \ + ASSERT(name##_cb_calls[1] == 0); \ + ASSERT(name##_cb_calls[2] == 1); \ + } while (0) + +DEFINE_GLOBALS_AND_CBS(idle) +DEFINE_GLOBALS_AND_CBS(prepare) +DEFINE_GLOBALS_AND_CBS(check) + +#ifdef __linux__ +DEFINE_GLOBALS_AND_CBS(fs_event) + +static const char watched_dir[] = "."; +static uv_timer_t timer; +static unsigned helper_timer_cb_calls; + + +static void init_and_start_fs_events(uv_loop_t* loop) { + size_t i; + for (i = 0; i < ARRAY_SIZE(fs_event); i++) { + int r; + r = uv_fs_event_init(loop, &fs_event[i]); + ASSERT(r == 0); + + r = uv_fs_event_start(&fs_event[i], + (uv_fs_event_cb)fs_event_cbs[i], + watched_dir, + 0); + ASSERT(r == 0); + } +} + +static void helper_timer_cb(uv_timer_t* thandle) { + int r; + uv_fs_t fs_req; + + /* fire all fs_events */ + r = uv_fs_utime(thandle->loop, &fs_req, watched_dir, 0, 0, NULL); + ASSERT(r == 0); + ASSERT(fs_req.result == 0); + ASSERT(fs_req.fs_type == UV_FS_UTIME); + ASSERT(strcmp(fs_req.path, watched_dir) == 0); + uv_fs_req_cleanup(&fs_req); + + helper_timer_cb_calls++; +} +#endif + + +TEST_IMPL(queue_foreach_delete) { + uv_loop_t* loop; + int r; + + loop = uv_default_loop(); + + INIT_AND_START(idle, loop); + INIT_AND_START(prepare, loop); + INIT_AND_START(check, loop); + +#ifdef __linux__ + init_and_start_fs_events(loop); + + /* helper timer to trigger async and fs_event callbacks */ + r = uv_timer_init(loop, &timer); + ASSERT(r == 0); + + r = uv_timer_start(&timer, helper_timer_cb, 0, 0); + ASSERT(r == 0); +#endif + + r = uv_run(loop, UV_RUN_NOWAIT); + ASSERT(r == 1); + + END_ASSERTS(idle); + END_ASSERTS(prepare); + END_ASSERTS(check); + +#ifdef __linux__ + ASSERT(helper_timer_cb_calls == 1); +#endif + + MAKE_VALGRIND_HAPPY(); + + return 0; +} diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c index e71f0f7d53d344..eba54ae7054976 100644 --- a/deps/uv/test/test-spawn.c +++ b/deps/uv/test/test-spawn.c @@ -960,11 +960,11 @@ TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) { options.stdio_count = 2; /* Create a pipe that'll cause a collision. */ - _snprintf(name, - sizeof(name), - "\\\\.\\pipe\\uv\\%p-%d", - &out, - GetCurrentProcessId()); + snprintf(name, + sizeof(name), + "\\\\.\\pipe\\uv\\%p-%d", + &out, + GetCurrentProcessId()); pipe_handle = CreateNamedPipeA(name, PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, diff --git a/deps/uv/test/test-tcp-try-write.c b/deps/uv/test/test-tcp-try-write.c index 8a60136b64e9aa..97a1d6e3d5794f 100644 --- a/deps/uv/test/test-tcp-try-write.c +++ b/deps/uv/test/test-tcp-try-write.c @@ -58,6 +58,11 @@ static void connect_cb(uv_connect_t* req, int status) { break; } } while (1); + + do { + buf = uv_buf_init("", 0); + r = uv_try_write((uv_stream_t*) &client, &buf, 1); + } while (r != 0); uv_close((uv_handle_t*) &client, close_cb); } diff --git a/deps/uv/test/test-tcp-write-fail.c b/deps/uv/test/test-tcp-write-fail.c index 2840d8161032be..5256a9f4a790aa 100644 --- a/deps/uv/test/test-tcp-write-fail.c +++ b/deps/uv/test/test-tcp-write-fail.c @@ -43,7 +43,7 @@ static void close_socket(uv_tcp_t* sock) { r = uv_fileno((uv_handle_t*)sock, &fd); ASSERT(r == 0); #ifdef _WIN32 - r = closesocket(fd); + r = closesocket((uv_os_sock_t)fd); #else r = close(fd); #endif diff --git a/deps/uv/test/test-threadpool-cancel.c b/deps/uv/test/test-threadpool-cancel.c index cb456224516823..784c1739f6d47e 100644 --- a/deps/uv/test/test-threadpool-cancel.c +++ b/deps/uv/test/test-threadpool-cancel.c @@ -276,7 +276,7 @@ TEST_IMPL(threadpool_cancel_work) { TEST_IMPL(threadpool_cancel_fs) { struct cancel_info ci; - uv_fs_t reqs[25]; + uv_fs_t reqs[26]; uv_loop_t* loop; unsigned n; uv_buf_t iov; @@ -305,6 +305,7 @@ TEST_IMPL(threadpool_cancel_fs) { ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, &iov, 1, 0, fs_cb)); ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb)); ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb)); + ASSERT(0 == uv_fs_realpath(loop, reqs + n++, "/", fs_cb)); ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb)); ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); ASSERT(0 == uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb)); diff --git a/deps/uv/test/test-tty.c b/deps/uv/test/test-tty.c index 81e612c1d6ae1c..b844959d526340 100644 --- a/deps/uv/test/test-tty.c +++ b/deps/uv/test/test-tty.c @@ -153,11 +153,14 @@ TEST_IMPL(tty_file) { ASSERT(0 == close(fd)); } +/* Bug on AIX where '/dev/random' returns 1 from isatty() */ +#ifndef _AIX fd = open("/dev/random", O_RDONLY); if (fd != -1) { ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); ASSERT(0 == close(fd)); } +#endif /* _AIX */ fd = open("/dev/zero", O_RDONLY); if (fd != -1) { diff --git a/deps/uv/test/test-udp-ipv6.c b/deps/uv/test/test-udp-ipv6.c index 1d5720ce73162a..1b0db78b8efcea 100644 --- a/deps/uv/test/test-udp-ipv6.c +++ b/deps/uv/test/test-udp-ipv6.c @@ -26,6 +26,10 @@ #include #include +#ifdef __FreeBSD__ +#include +#endif + #define CHECK_HANDLE(handle) \ ASSERT((uv_udp_t*)(handle) == &server \ || (uv_udp_t*)(handle) == &client \ @@ -43,6 +47,18 @@ static int send_cb_called; static int recv_cb_called; static int close_cb_called; +#ifdef __FreeBSD__ +static int can_ipv6_ipv4_dual() { + int v6only; + size_t size = sizeof(int); + + if (sysctlbyname("net.inet6.ip6.v6only", &v6only, &size, NULL, 0)) + return 0; + + return v6only != 1; +} +#endif + static void alloc_cb(uv_handle_t* handle, size_t suggested_size, @@ -150,6 +166,11 @@ TEST_IMPL(udp_dual_stack) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); +#ifdef __FreeBSD__ + if (!can_ipv6_ipv4_dual()) + RETURN_SKIP("IPv6-IPv4 dual stack not supported"); +#endif + do_test(ipv6_recv_ok, 0); ASSERT(recv_cb_called == 1); diff --git a/deps/uv/test/test-udp-multicast-join6.c b/deps/uv/test/test-udp-multicast-join6.c index 873cb6d811d749..f635bdb9e14ee2 100644 --- a/deps/uv/test/test-udp-multicast-join6.c +++ b/deps/uv/test/test-udp-multicast-join6.c @@ -119,7 +119,7 @@ TEST_IMPL(udp_multicast_join6) { ASSERT(r == 0); /* join the multicast channel */ -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(_AIX) r = uv_udp_set_membership(&client, "ff02::1", "::1%lo0", UV_JOIN_GROUP); #else r = uv_udp_set_membership(&client, "ff02::1", NULL, UV_JOIN_GROUP); diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index 8049faa7a66929..635a234ea6eee8 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -104,6 +104,13 @@ 'src/win/winsock.c', 'src/win/winsock.h', ], + 'conditions': [ + ['MSVS_VERSION < "2015"', { + 'sources': [ + 'src/win/snprintf.c' + ] + }] + ], 'link_settings': { 'libraries': [ '-ladvapi32', @@ -340,6 +347,7 @@ 'test/test-poll-close-doesnt-corrupt-stack.c', 'test/test-poll-closesocket.c', 'test/test-process-title.c', + 'test/test-queue-foreach-delete.c', 'test/test-ref.c', 'test/test-run-nowait.c', 'test/test-run-once.c', From 1c81d11b6fbc811b225ccc9dcd73e81004098eef Mon Sep 17 00:00:00 2001 From: Brian White Date: Thu, 17 Dec 2015 01:16:46 -0500 Subject: [PATCH 097/262] test: try other ipv6 localhost alternatives PR-URL: https://github.com/nodejs/node/pull/4325 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- test/common.js | 13 +++ .../parallel/test-net-connect-options-ipv6.js | 96 +++++++++++-------- 2 files changed, 68 insertions(+), 41 deletions(-) diff --git a/test/common.js b/test/common.js index adf4247706f4cb..0e824efd94fe6d 100644 --- a/test/common.js +++ b/test/common.js @@ -79,6 +79,19 @@ var opensslCli = null; var inFreeBSDJail = null; var localhostIPv4 = null; +exports.localIPv6Hosts = [ + // Debian/Ubuntu + 'ip6-localhost', + 'ip6-loopback', + + // SUSE + 'ipv6-localhost', + 'ipv6-loopback', + + // Typically universal + 'localhost', +]; + Object.defineProperty(exports, 'inFreeBSDJail', { get: function() { if (inFreeBSDJail !== null) return inFreeBSDJail; diff --git a/test/parallel/test-net-connect-options-ipv6.js b/test/parallel/test-net-connect-options-ipv6.js index f0f7bc65b3c7eb..623b2eff1ddded 100644 --- a/test/parallel/test-net-connect-options-ipv6.js +++ b/test/parallel/test-net-connect-options-ipv6.js @@ -1,8 +1,8 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); -var dns = require('dns'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const dns = require('dns'); if (!common.hasIPv6) { console.log('1..0 # Skipped: no IPv6 support'); @@ -12,46 +12,60 @@ if (!common.hasIPv6) { var serverGotEnd = false; var clientGotEnd = false; -dns.lookup('localhost', 6, function(err) { - if (err) { - console.error('Looks like IPv6 is not really supported'); - console.error(err); - return; - } +const hosts = common.localIPv6Hosts; +var hostIdx = 0; +var host = hosts[hostIdx]; +var localhostTries = 10; - var server = net.createServer({allowHalfOpen: true}, function(socket) { - socket.resume(); - socket.on('end', function() { - serverGotEnd = true; - }); - socket.end(); +const server = net.createServer({allowHalfOpen: true}, function(socket) { + socket.resume(); + socket.on('end', function() { + serverGotEnd = true; }); + socket.end(); +}); - server.listen(common.PORT, '::1', function() { - var client = net.connect({ - host: 'localhost', - port: common.PORT, - family: 6, - allowHalfOpen: true - }, function() { - console.error('client connect cb'); - client.resume(); - client.on('end', function() { - clientGotEnd = true; - setTimeout(function() { - assert(client.writable); - client.end(); - }, 10); - }); - client.on('close', function() { - server.close(); - }); +server.listen(common.PORT, '::1', tryConnect); + +function tryConnect() { + const client = net.connect({ + host: host, + port: common.PORT, + family: 6, + allowHalfOpen: true + }, function() { + console.error('client connect cb'); + client.resume(); + client.on('end', function() { + clientGotEnd = true; + setTimeout(function() { + assert(client.writable); + client.end(); + }, 10); + }); + client.on('close', function() { + server.close(); }); + }).on('error', function(err) { + if (err.syscall === 'getaddrinfo' && err.code === 'ENOTFOUND') { + if (host !== 'localhost' || --localhostTries === 0) + host = hosts[++hostIdx]; + if (host) + tryConnect(); + else { + console.log('1..0 # Skipped: no IPv6 localhost support'); + process.removeListener('exit', onExit); + server.close(); + } + return; + } + throw err; }); +} - process.on('exit', function() { - console.error('exit', serverGotEnd, clientGotEnd); - assert(serverGotEnd); - assert(clientGotEnd); - }); -}); +process.on('exit', onExit); +function onExit() { + console.error('exit', serverGotEnd, clientGotEnd); + assert(serverGotEnd); + assert(clientGotEnd); +} From 75fad1c414cc87b261edbf9a12c70fb96a09337c Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 18 Dec 2015 01:35:23 -0500 Subject: [PATCH 098/262] test: fix flaky test-net-error-twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows there can exist some race condition where the notification of the client's `socket.destroy()` isn't received before the server writes to the socket. This race condition was more evident/reproducible on a single core system. This commit fixes the flakiness by waiting until the server's connection event handler has been called to destroy the client socket and perform the server socket write. Fixes: https://github.com/nodejs/node/issues/4057 PR-URL: https://github.com/nodejs/node/pull/4342 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis --- test/parallel/test-net-error-twice.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-net-error-twice.js b/test/parallel/test-net-error-twice.js index af92ca93206f18..28e90ddd611ba9 100644 --- a/test/parallel/test-net-error-twice.js +++ b/test/parallel/test-net-error-twice.js @@ -1,16 +1,24 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); -var buf = new Buffer(10 * 1024 * 1024); +const buf = new Buffer(10 * 1024 * 1024); buf.fill(0x62); -var errs = []; +const errs = []; +var clientSocket; +var serverSocket; + +function ready() { + if (clientSocket && serverSocket) { + clientSocket.destroy(); + serverSocket.write(buf); + } +} var srv = net.createServer(function onConnection(conn) { - conn.write(buf); conn.on('error', function(err) { errs.push(err); if (errs.length > 1 && errs[0] === errs[1]) @@ -19,11 +27,14 @@ var srv = net.createServer(function onConnection(conn) { conn.on('close', function() { srv.unref(); }); + serverSocket = conn; + ready(); }).listen(common.PORT, function() { var client = net.connect({ port: common.PORT }); client.on('connect', function() { - client.destroy(); + clientSocket = client; + ready(); }); }); From 04d7c0b887c185381c8a1d309e2520e0261c8a37 Mon Sep 17 00:00:00 2001 From: Devin Nakamura Date: Fri, 18 Dec 2015 10:50:11 -0500 Subject: [PATCH 099/262] test: fix race condition in test-http-client-onerror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Occasionally test-http-client-onerror will fail with a refused connection. This patch fixes the possibility that connections will be attempted before server is listening. PR-URL: https://github.com/nodejs/node/pull/4346 Reviewed-By: Ben Noordhuis Reviewed-By: Brian White Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- test/gc/test-http-client-onerror.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/gc/test-http-client-onerror.js b/test/gc/test-http-client-onerror.js index 98d046e180f11b..7e50683c6633e5 100644 --- a/test/gc/test-http-client-onerror.js +++ b/test/gc/test-http-client-onerror.js @@ -22,7 +22,7 @@ console.log('We should do ' + todo + ' requests'); var http = require('http'); var server = http.createServer(serverHandler); -server.listen(PORT, getall); +server.listen(PORT, runTest); function getall() { if (count >= todo) @@ -51,8 +51,10 @@ function getall() { setImmediate(getall); } -for (var i = 0; i < 10; i++) - getall(); +function runTest() { + for (var i = 0; i < 10; i++) + getall(); +} function afterGC() { countGC ++; From 062d1317c8d0c834587c6b0d3f92fa80ff40f12b Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 19 Dec 2015 19:08:13 -0800 Subject: [PATCH 100/262] doc: improve assert.markdown copy General improvements to assert.markdown copy including new and improved examples PR-URL: https://github.com/nodejs/node/pull/4360 Reviewed-By: Trevor Norris --- doc/api/assert.markdown | 281 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 254 insertions(+), 27 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index eb334696805298..bab280f325ff27 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -2,42 +2,131 @@ Stability: 3 - Locked -This module is used so that Node.js can test itself. It can be accessed with -`require('assert')`. However, it is recommended that a userland assertion -library be used instead. +The `assert` module provides a simple set of assertion tests that can be used +to test invariants and implement unit tests. While the `assert` module is +generally intended for internal use by Node.js itself, it can be used by user +code calling `require('assert')`. + +The API for the `assert` module is [Locked][]. This means that there will be no +additions or changes to any of the methods implemented and exposed by +the module. ## assert(value[, message]), assert.ok(value[, message]) -Tests if value is truthy. It is equivalent to +Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. +If `value` is not truthy, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is `undefined`, a default error message is assigned. + + const assert = require('assert'); + + assert(true); // OK + assert(1); // OK + assert(false); + // throws "AssertionError: false == true" + assert(0); + // throws "AssertionError: 0 == true" + assert(false, 'it\'s false'); + // throws "AssertionError: it's false" + + assert.ok(true); // OK + assert.ok(1); // OK + assert.ok(false); + // throws "AssertionError: false == true" + assert.ok(0); + // throws "AssertionError: 0 == true" + assert.ok(false, 'it\'s false'); + // throws "AssertionError: it's false" + ## assert.deepEqual(actual, expected[, message]) -Tests for deep equality. Primitive values are compared with the equal -comparison operator ( `==` ). +Tests for deep equality between the `actual` and `expected` parameters. +Primitive values are compared with the equal comparison operator ( `==` ). -This only considers enumerable properties. It does not test object prototypes, -attached symbols, or non-enumerable properties. This can lead to some -potentially surprising results. For example, this does not throw an -`AssertionError` because the properties on the [`Error`][] object are -non-enumerable: +Only enumerable "own" properties are considered. The `deepEqual()` +implementation does not test object prototypes, attached symbols, or +non-enumerable properties. This can lead to some potentially surprising +results. For example, the following example does not throw an `AssertionError` +because the properties on the [`Error`][] object are non-enumerable: // WARNING: This does not throw an AssertionError! assert.deepEqual(Error('a'), Error('b')); +"Deep" equality means that the enumerable "own" properties of child objects +are evaluated also: + + const assert = require('assert'); + + const obj1 = { + a : { + b : 1 + } + }; + const obj2 = { + a : { + b : 2 + } + }; + const obj3 = { + a : { + b : 1 + } + } + const obj4 = Object.create(obj1); + + assert.deepEqual(obj1, obj1); + // OK, object is equal to itself + + assert.deepEqual(obj1, obj2); + // AssertionError: { a: { b: 1 } } deepEqual { a: { b: 2 } } + // values of b are different + + assert.deepEqual(obj1, obj3); + // OK, objects are equal + + assert.deepEqual(obj1, obj4); + // AssertionError: { a: { b: 1 } } deepEqual {} + // Prototypes are ignored + +If the values are not equal, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is undefined, a default error message is assigned. + ## assert.deepStrictEqual(actual, expected[, message]) -Tests for deep equality. Primitive values are compared with the strict equality -operator ( `===` ). +Generally identical to `assert.deepEqual` with the exception that primitive +values are compared using the strict equality operator ( `===` ). + + const assert = require('assert'); + + assert.deepEqual({a:1}, {a:'1'}); + // OK, because 1 == '1' + + assert.deepStrictEqual({a:1}, {a:'1'}); + // AssertionError: { a: 1 } deepStrictEqual { a: '1' } + // because 1 !== '1' using strict equality + +If the values are not equal, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is undefined, a default error message is assigned. ## assert.doesNotThrow(block[, error][, message]) -Expects `block` not to throw an error. See [`assert.throws()`][] for more details. +Asserts that the function `block` does not throw an error. See +[`assert.throws()`][] for more details. + +When `assert.doesNotThrow()` is called, it will immediately call the `block` +function. + +If an error is thrown and it is the same type as that specified by the `error` +parameter, then an `AssertionError` is thrown. If the error is of a different +type, or if the `error` parameter is undefined, the error is propagated back +to the caller. -If `block` throws an error and if it is of a different type from `error`, the -thrown error will get propagated back to the caller. The following call will -throw the [`TypeError`][], since we're not matching the error types in the -assertion. +The following, for instance, will throw the [`TypeError`][] because there is no +matching error type in the assertion: assert.doesNotThrow( function() { @@ -46,8 +135,8 @@ assertion. SyntaxError ); -In case `error` matches with the error thrown by `block`, an `AssertionError` -is thrown instead. +However, the following will result in an `AssertionError` with the message +'Got unwanted exception (TypeError)..': assert.doesNotThrow( function() { @@ -56,47 +145,184 @@ is thrown instead. TypeError ); +If an `AssertionError` is thrown and a value is provided for the `message` +parameter, the value of `message` will be appended to the `AssertionError` +message: + + assert.doesNotThrow( + function() { + throw new TypeError('Wrong value'); + }, + TypeError, + 'Whoops' + ); + // Throws: AssertionError: Got unwanted exception (TypeError). Whoops + ## assert.equal(actual, expected[, message]) -Tests shallow, coercive equality with the equal comparison operator ( `==` ). +Tests shallow, coercive equality between the `actual` and `expected` parameters +using the equal comparison operator ( `==` ). + + const assert = require('assert'); + + assert.equal(1, 1); + // OK, 1 == 1 + assert.equal(1, '1'); + // OK, 1 == '1' + + assert.equal(1, 2); + // AssertionError: 1 == 2 + assert.equal({a: {b: 1}}, {a: {b: 1}}); + //AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + +If the values are not equal, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is undefined, a default error message is assigned. ## assert.fail(actual, expected, message, operator) -Throws an `AssertionError`. If `message` is falsy, it displays the values for -`actual` and `expected` separated by the provided `operator`. Otherwise, it -displays `message` (and does not use `actual`, `expected`, and `operator`). +Throws an `AssertionError`. If `message` is falsy, the error message is set as +the values of `actual` and `expected` separated by the provided `operator`. +Otherwise, the error message is the value of `message`. + + const assert = require('assert'); + + assert.fail(1, 2, undefined, '>'); + // AssertionError: 1 > 2 + + assert.fail(1, 2, 'whoops', '>'); + // AssertionError: whoops ## assert.ifError(value) Throws `value` if `value` is truthy. This is useful when testing the `error` argument in callbacks. + const assert = require('assert'); + + assert.ifError(0); // OK + assert.ifError(1); // Throws 1 + assert.ifError('error') // Throws 'error' + assert.ifError(new Error()); // Throws Error + ## assert.notDeepEqual(actual, expected[, message]) Tests for any deep inequality. Opposite of [`assert.deepEqual`][]. + const assert = require('assert'); + + const obj1 = { + a : { + b : 1 + } + }; + const obj2 = { + a : { + b : 2 + } + }; + const obj3 = { + a : { + b : 1 + } + } + const obj4 = Object.create(obj1); + + assert.deepEqual(obj1, obj1); + AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + + assert.deepEqual(obj1, obj2); + // OK, obj1 and obj2 are not deeply equal + + assert.deepEqual(obj1, obj3); + // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + + assert.deepEqual(obj1, obj4); + // OK, obj1 and obj2 are not deeply equal + +If the values are deeply equal, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is undefined, a default error message is assigned. + ## assert.notDeepStrictEqual(actual, expected[, message]) -Tests for deep inequality. Opposite of [`assert.deepStrictEqual`][]. +Tests for deep strict inequality. Opposite of [`assert.deepStrictEqual`][]. + + const assert = require('assert'); + + assert.notDeepEqual({a:1}, {a:'1'}); + // AssertionError: { a: 1 } notDeepEqual { a: '1' } + + assert.notDeepStrictEqual({a:1}, {a:'1'}); + // OK + +If the values are deeply and strictly equal, an `AssertionError` is thrown +with a `message` property set equal to the value of the `message` parameter. If +the `message` parameter is undefined, a default error message is assigned. ## assert.notEqual(actual, expected[, message]) Tests shallow, coercive inequality with the not equal comparison operator ( `!=` ). + const assert = require('assert'); + + assert.notEqual(1, 2); + // OK + + assert.notEqual(1, 1); + // AssertionError: 1 != 1 + + assert.notEqual(1, '1'); + // AssertionError: 1 != '1' + +If the values are equal, an `AssertionError` is thrown with a `message` +property set equal to the value of the `message` parameter. If the `message` +parameter is undefined, a default error message is assigned. + ## assert.notStrictEqual(actual, expected[, message]) Tests strict inequality as determined by the strict not equal operator ( `!==` ). + const assert = require('assert'); + + assert.notStrictEqual(1, 2); + // OK + + assert.notStrictEqual(1, 1); + // AssertionError: 1 != 1 + + assert.notStrictEqual(1, '1'); + // OK + +If the values are strictly equal, an `AssertionError` is thrown with a +`message` property set equal to the value of the `message` parameter. If the +`message` parameter is undefined, a default error message is assigned. + ## assert.strictEqual(actual, expected[, message]) Tests strict equality as determined by the strict equality operator ( `===` ). + const assert = require('assert'); + + assert.strictEqual(1, 2); + // AssertionError: 1 === 2 + + assert.strictEqual(1, 1); + // OK + + assert.strictEqual(1, '1'); + // AssertionError: 1 === '1' + +If the values are not strictly equal, an `AssertionError` is thrown with a +`message` property set equal to the value of the `message` parameter. If the +`message` parameter is undefined, a default error message is assigned. + ## assert.throws(block[, error][, message]) -Expects `block` to throw an error. `error` can be a constructor, [`RegExp`][], or -validation function. +Expects the function `block` to throw an error. If specified, `error` can be a +constructor, [`RegExp`][], or validation function. Validate instanceof using constructor: @@ -130,6 +356,7 @@ Custom error validation: 'unexpected error' ); +[Locked]: documentation.html#documentation_stability_index [`assert.deepEqual`]: #assert_assert_deepequal_actual_expected_message [`assert.deepStrictEqual`]: #assert_assert_deepstrictequal_actual_expected_message [`assert.throws()`]: #assert_assert_throws_block_error_message From 3e140417398f8de95d1ea7b359ce5c8cd116f1b7 Mon Sep 17 00:00:00 2001 From: Brian White Date: Tue, 22 Dec 2015 12:43:44 -0500 Subject: [PATCH 101/262] test: use platformTimeout() in more places Without these changes, the pi1-raspbian-wheezy CI node was timing out on these tests. PR-URL: https://github.com/nodejs/node/pull/4387 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- test/parallel/test-dgram-udp4.js | 2 +- test/parallel/test-http-1.0.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-dgram-udp4.js b/test/parallel/test-dgram-udp4.js index f81dec398f72d1..5b1ede414eb1a1 100644 --- a/test/parallel/test-dgram-udp4.js +++ b/test/parallel/test-dgram-udp4.js @@ -52,4 +52,4 @@ server.bind(server_port); timer = setTimeout(function() { throw new Error('Timeout'); -}, 200); +}, common.platformTimeout(200)); diff --git a/test/parallel/test-http-1.0.js b/test/parallel/test-http-1.0.js index 9989c9b969b879..f9c865f3e630a0 100644 --- a/test/parallel/test-http-1.0.js +++ b/test/parallel/test-http-1.0.js @@ -19,7 +19,7 @@ function test(handler, request_generator, response_validator) { server.close(); response_validator(server_response, client_got_eof, true); } - var timer = setTimeout(cleanup, 1000); + var timer = setTimeout(cleanup, common.platformTimeout(1000)); process.on('exit', cleanup); server.listen(port); From d196f09acf140aec6f6526a1d6d315d17249566a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 00:58:14 -0800 Subject: [PATCH 102/262] test: refactor test-net-connect-options-ipv6 Remove unused variable and refactor checking for event firing. PR-URL: https://github.com/nodejs/node/pull/4395 Reviewed-By: Brian White --- .../parallel/test-net-connect-options-ipv6.js | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/test/parallel/test-net-connect-options-ipv6.js b/test/parallel/test-net-connect-options-ipv6.js index 623b2eff1ddded..8b11612a1286f2 100644 --- a/test/parallel/test-net-connect-options-ipv6.js +++ b/test/parallel/test-net-connect-options-ipv6.js @@ -2,16 +2,12 @@ const common = require('../common'); const assert = require('assert'); const net = require('net'); -const dns = require('dns'); if (!common.hasIPv6) { console.log('1..0 # Skipped: no IPv6 support'); return; } -var serverGotEnd = false; -var clientGotEnd = false; - const hosts = common.localIPv6Hosts; var hostIdx = 0; var host = hosts[hostIdx]; @@ -19,9 +15,7 @@ var localhostTries = 10; const server = net.createServer({allowHalfOpen: true}, function(socket) { socket.resume(); - socket.on('end', function() { - serverGotEnd = true; - }); + socket.on('end', common.mustCall(function() {})); socket.end(); }); @@ -36,13 +30,12 @@ function tryConnect() { }, function() { console.error('client connect cb'); client.resume(); - client.on('end', function() { - clientGotEnd = true; + client.on('end', common.mustCall(function() { setTimeout(function() { assert(client.writable); client.end(); }, 10); - }); + })); client.on('close', function() { server.close(); }); @@ -54,7 +47,6 @@ function tryConnect() { tryConnect(); else { console.log('1..0 # Skipped: no IPv6 localhost support'); - process.removeListener('exit', onExit); server.close(); } return; @@ -62,10 +54,3 @@ function tryConnect() { throw err; }); } - -process.on('exit', onExit); -function onExit() { - console.error('exit', serverGotEnd, clientGotEnd); - assert(serverGotEnd); - assert(clientGotEnd); -} From 4e603c425f861d1d9d5aa245f166b5a105f701e3 Mon Sep 17 00:00:00 2001 From: Nik Nyby Date: Tue, 22 Dec 2015 15:17:25 -0500 Subject: [PATCH 103/262] doc: fix spelling error in lib/url.js comment PR-URL: https://github.com/nodejs/node/pull/4390 Reviewed-By: Stephen Belanger Reviewed-By: Myles Borins Reviewed-By: James M Snell --- lib/url.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/url.js b/lib/url.js index 45155fee936bbf..6489d6327d0e29 100644 --- a/lib/url.js +++ b/lib/url.js @@ -586,7 +586,7 @@ Url.prototype.resolveObject = function(relative) { // Put this after the other two cases because it simplifies the booleans if (psychotic) { result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host + //occasionally the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? @@ -668,7 +668,7 @@ Url.prototype.resolveObject = function(relative) { if (psychotic) { result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host + //occasionally the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? From cea43b33e79212a4d8840b2da53ff0d4d293e149 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 26 Dec 2015 09:13:23 -0800 Subject: [PATCH 104/262] doc: improvements to console.markdown copy Several improvements including a few new examples PR-URL: https://github.com/nodejs/node/pull/4428 Reviewed-By: Stephen Belanger Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- doc/api/console.markdown | 170 +++++++++++++++++++++++++++------------ 1 file changed, 117 insertions(+), 53 deletions(-) diff --git a/doc/api/console.markdown b/doc/api/console.markdown index 85df0ab98fa57e..c0cc060ec14995 100644 --- a/doc/api/console.markdown +++ b/doc/api/console.markdown @@ -2,29 +2,79 @@ Stability: 2 - Stable -The module defines a `Console` class and exports a `console` object. +The `console` module provides a simple debugging console that is similar to the +JavaScript console mechanism provided by web browsers. -The `console` object is a special instance of `Console` whose output is -sent to stdout or stderr. +The module exports two specific components: -For ease of use, `console` is defined as a global object and can be used -directly without `require`. +* A `Console` class with methods such as `console.log()`, `console.error()` and + `console.warn()` that can be used to write to any Node.js stream. +* A global `console` instance configured to write to `stdout` and `stderr`. + Because this object is global, it can be used without calling + `require('console')`. + +Example using the global `console`: + + console.log('hello world'); + // Prints: hello world, to stdout + console.log('hello %s', 'world'); + // Prints: hello world, to stdout + console.error(new Error('Whoops, something bad happened')); + // Prints: [Error: Whoops, something bad happened], to stderr + + const name = 'Will Robinson'; + console.warn(`Danger ${name}! Danger!`); + // Prints: Danger Will Robinson! Danger!, to stderr + +Example using the `Console` class: + + const out = getStreamSomehow(); + const err = getStreamSomehow(); + const myConsole = new console.Console(out, err); + + myConsole.log('hello world'); + // Prints: hello world, to out + myConsole.log('hello %s', 'world'); + // Prints: hello world, to out + myConsole.error(new Error('Whoops, something bad happened')); + // Prints: [Error: Whoops, something bad happened], to err + + const name = 'Will Robinson'; + myConsole.warn(`Danger ${name}! Danger!`); + // Prints: Danger Will Robinson! Danger!, to err + +While the API for the `Console` class is designed fundamentally around the +Web browser `console` object, the `Console` is Node.js is *not* intended to +duplicate the browsers functionality exactly. + +## Asynchronous vs Synchronous Consoles + +The console functions are synchronous when the destination is a terminal or +a file (to avoid lost messages in case of premature exit) and asynchronous +when the destination is a pipe (to avoid blocking for long periods of time). + +In the following example, stdout is non-blocking while stderr is blocking: + + $ node script.js 2> error.log | tee info.log + +Typically, the distinction between blocking/non-blocking is not important +unless an application is logging significant amounts of data. High volume +logging *should* use a `Console` instance that writes to a pipe. ## Class: Console -Use `require('console').Console` or `console.Console` to access this class. +The `Console` class can be used to create a simple logger with configurable +output streams and can be accessed using either `require('console').Console` +or `console.Console`: const Console = require('console').Console; const Console = console.Console; -You can use the `Console` class to create a simple logger like `console` but -with different output streams. - ### new Console(stdout[, stderr]) -Create a new `Console` by passing one or two writable stream instances. +Creates a new `Console` by passing one or two writable stream instances. `stdout` is a writable stream to print log or info output. `stderr` is used for warning or error output. If `stderr` isn't passed, the warning and error output will be sent to the `stdout`. @@ -39,42 +89,27 @@ and error output will be sent to the `stdout`. // in stdout.log: count 5 The global `console` is a special `Console` whose output is sent to -`process.stdout` and `process.stderr`: +`process.stdout` and `process.stderr`. It is equivalent to calling: new Console(process.stdout, process.stderr); -## console - -* {Object} - - - -For printing to stdout and stderr. Similar to the console object functions -provided by most web browsers, here the output is sent to stdout or stderr. - -The console functions are synchronous when the destination is a terminal or -a file (to avoid lost messages in case of premature exit) and asynchronous -when it's a pipe (to avoid blocking for long periods of time). - -That is, in the following example, stdout is non-blocking while stderr -is blocking: - - $ node script.js 2> error.log | tee info.log - -Typically, the blocking/non-blocking dichotomy is not something you should -worry about unless you log huge amounts of data. - ### console.assert(value[, message][, ...]) -Similar to [`assert.ok()`][], but the error message is formatted as -`util.format(message...)`. +A simple assertion test that verifies whether `value` is truthy. If it is not, +an `AssertionError` is throw. If provided, the error `message` is formatted +using [`util.format()`][] and used as the error message. + + console.assert(true, 'does nothing'); + // OK + console.assert(false, 'Whoops %s', 'didn\'t work'); + // AssertionError: Whoops didn't work ### console.dir(obj[, options]) Uses [`util.inspect()`][] on `obj` and prints the resulting string to stdout. -This function bypasses any custom `inspect()` function on `obj`. An optional -`options` object may be passed that alters certain aspects of the formatted -string: +This function bypasses any custom `inspect()` function defined on `obj`. An +optional `options` object may be passed that alters certain aspects of the +formatted string: - `showHidden` - if `true` then the object's non-enumerable and symbol properties will be shown too. Defaults to `false`. @@ -89,37 +124,54 @@ Defaults to `false`. Colors are customizable; see ### console.error([data][, ...]) -Same as [`console.log()`][] but prints to stderr. +Prints to stderr with newline. Multiple arguments can be passed, with the first +used as the primary message and all additional used as substitution +values similar to `printf()` (the arguments are all passed to +[`util.format()`][]). + + const code = 5; + console.error('error #%d', code); + // Prints: error #5, to stderr + console.error('error', code); + // Prints: error 5, to stderr + +If formatting elements (e.g. `%d`) are not found in the first string then +[`util.inspect()`][] is called on each argument and the resulting string +values are concatenated. See [`util.format()`][] for more information. ### console.info([data][, ...]) -Same as [`console.log()`][]. +The `console.info()` function is an alias for [`console.log()`][]. ### console.log([data][, ...]) -Prints to stdout with newline. This function can take multiple arguments in a -`printf()`-like way: +Prints to stdout with newline. Multiple arguments can be passed, with the first +used as the primary message and all additional used as substitution +values similar to `printf()` (the arguments are all passed to +[`util.format()`][]). var count = 5; console.log('count: %d', count); - // prints 'count: 5' + // Prints: count: 5, to stdout + console.log('count: ', count); + // Prints: count: 5, to stdout -If formatting elements are not found in the first string then -[`util.inspect()`][] is used on each argument. See [`util.format()`][] for more -information. +If formatting elements (e.g. `%d`) are not found in the first string then +[`util.inspect()`][] is called on each argument and the resulting string +values are concatenated. See [`util.format()`][] for more information. ### console.time(label) Used to calculate the duration of a specific operation. To start a timer, call -the `console.time()` method, giving it a name as only parameter. To stop the +the `console.time()` method, giving it a unique `label` as the only parameter. To stop the timer, and to get the elapsed time in milliseconds, just call the [`console.timeEnd()`][] method, again passing the -timer's name as the parameter. +timer's unique `label` as the parameter. ### console.timeEnd(label) Stops a timer that was previously started by calling [`console.time()`][] and -prints the result to the console: +prints the result to stdout: console.time('100-elements'); for (var i = 0; i < 100; i++) { @@ -130,18 +182,30 @@ prints the result to the console: ### console.trace(message[, ...]) -Print to stderr `'Trace :'`, followed by the formatted message and stack trace -to the current position. +Prints to stderr the string `'Trace :'`, followed by the [`util.format()`][] +formatted message and stack trace to the current position in the code. + + console.trace('Show me'); + // Prints: (stack trace will vary based on where trace is called) + // Trace: Show me + // at repl:2:9 + // at REPLServer.defaultEval (repl.js:248:27) + // at bound (domain.js:287:14) + // at REPLServer.runBound [as eval] (domain.js:300:12) + // at REPLServer. (repl.js:412:12) + // at emitOne (events.js:82:20) + // at REPLServer.emit (events.js:169:7) + // at REPLServer.Interface._onLine (readline.js:210:10) + // at REPLServer.Interface._line (readline.js:549:8) + // at REPLServer.Interface._ttyWrite (readline.js:826:14) ### console.warn([data][, ...]) -Same as [`console.error()`][]. +The `console.warn()` function is an alias for [`console.error()`][]. -[`assert.ok()`]: assert.html#assert_assert_value_message_assert_ok_value_message [`console.error()`]: #console_console_error_data [`console.log()`]: #console_console_log_data [`console.time()`]: #console_console_time_label [`console.timeEnd()`]: #console_console_timeend_label [`util.format()`]: util.html#util_util_format_format [`util.inspect()`]: util.html#util_util_inspect_object_options -[customizing `util.inspect()` colors]: util.html#util_customizing_util_inspect_colors From 85052eff45408bda6e31607896864ecea830998f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 26 Dec 2015 21:19:35 -0800 Subject: [PATCH 105/262] doc: improvements to debugger.markdown copy General improvements to debugger.markdown PR-URL: https://github.com/nodejs/node/pull/4436 Reviewed-By: Colin Ihrig Reviewed-By: Stephen Belanger Reviewed-By: Minwoo Jung Reviewed-By: Ben Noordhuis --- doc/api/debugger.markdown | 58 +++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/doc/api/debugger.markdown b/doc/api/debugger.markdown index 256fcf57dd8a23..11d31477d41717 100644 --- a/doc/api/debugger.markdown +++ b/doc/api/debugger.markdown @@ -4,9 +4,10 @@ -V8 comes with an extensive debugger which is accessible out-of-process via a -simple [TCP protocol][]. Node.js has a built-in client for this debugger. To -use this, start Node.js with the `debug` argument; a prompt will appear: +Node.js includes a full-featured out-of-process debugging utility accessible +via a simple [TCP-based protocol][] and built-in debugging client. To use it, +start Node.js with the `debug` argument followed by the path to the script to +debug; a prompt will be displayed indicating successful launch of the debugger: % node debug myscript.js < debugger listening on port 5858 @@ -17,11 +18,13 @@ use this, start Node.js with the `debug` argument; a prompt will appear: 3 debugger; debug> -Node.js's debugger client doesn't support the full range of commands, but -simple step and inspection is possible. By putting the statement `debugger;` -into the source code of your script, you will enable a breakpoint. +Node.js's debugger client does not yet support the full range of commands, but +simple step and inspection are possible. -For example, suppose `myscript.js` looked like this: +Inserting the statement `debugger;` into the source code of a script will +enable a breakpoint at that position in the code. + +For example, suppose `myscript.js` is written as: // myscript.js x = 5; @@ -31,7 +34,7 @@ For example, suppose `myscript.js` looked like this: }, 1000); console.log('hello'); -Then once the debugger is run, it will break on line 4. +Once the debugger is run, a breakpoint will occur at line 4: % node debug myscript.js < debugger listening on port 5858 @@ -73,20 +76,20 @@ Then once the debugger is run, it will break on line 4. % -The `repl` command allows you to evaluate code remotely. The `next` command -steps over to the next line. There are a few other commands available and more -to come. Type `help` to see others. +The `repl` command allows code to be evaluated remotely. The `next` command +steps over to the next line. Type `help` to see what other commands are +available. ## Watchers -You can watch expression and variable values while debugging your code. -On every breakpoint each expression from the watchers list will be evaluated -in the current context and displayed just before the breakpoint's source code -listing. +It is possible to watch expression and variable values while debugging. On +every breakpoint, each expression from the watchers list will be evaluated +in the current context and displayed immediately before the breakpoint's +source code listing. -To start watching an expression, type `watch("my_expression")`. `watchers` -prints the active watchers. To remove a watcher, type -`unwatch("my_expression")`. +To begin watching an expression, type `watch('my_expression')`. The command +`watchers` will print the active watchers. To remove a watcher, type +`unwatch('my_expression')`. ## Commands reference @@ -153,19 +156,20 @@ breakpoint) ### Various * `scripts` - List all loaded scripts -* `version` - Display v8's version +* `version` - Display V8's version ## Advanced Usage -The V8 debugger can be enabled and accessed either by starting Node.js with -the `--debug` command-line flag or by signaling an existing Node.js process -with `SIGUSR1`. +An alternative way of enabling and accessing the debugger is to start +Node.js with the `--debug` command-line flag or by signaling an existing +Node.js process with `SIGUSR1`. -Once a process has been set in debug mode with this it can be connected to -with the Node.js debugger. Either connect to the `pid` or the URI to the -debugger. The syntax is: +Once a process has been set in debug mode this way, it can be connected to +using the Node.js debugger by either connecting to the `pid` of the running +process or via URI reference to the listening debugger: * `node debug -p ` - Connects to the process via the `pid` -* `node debug ` - Connects to the process via the URI such as localhost:5858 +* `node debug ` - Connects to the process via the URI such as +localhost:5858 -[TCP protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol +[TCP-based protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol From f30f9ffbd2589cde074145ea0e7ced10e41c2dde Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 26 Dec 2015 22:25:13 -0800 Subject: [PATCH 106/262] doc: improvements to dgram.markdown copy General improvements to dgram.markdown copy PR-URL: https://github.com/nodejs/node/pull/4437 Reviewed-By: Minwoo Jung Reviewed-By: Stephan Belanger --- doc/api/dgram.markdown | 325 +++++++++++++++++++++++++---------------- 1 file changed, 196 insertions(+), 129 deletions(-) diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 996379a04283f3..78bf3c2210bfca 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -4,50 +4,62 @@ -Datagram sockets are available through `require('dgram')`. +The `dgram` module provides an implementation of UDP Datagram sockets. -Important note: the behavior of [`dgram.Socket#bind()`][] has changed in v0.10 -and is always asynchronous now. If you have code that looks like this: + const dgram = require('dgram'); + const server = dgram.createSocket('udp4'); - const s = dgram.createSocket('udp4'); - s.bind(1234); - s.addMembership('224.0.0.114'); + server.on('error', (err) => { + console.log(`server error:\n${err.stack}`); + server.close(); + }); -You have to change it to this: + server.on('message', (msg, rinfo) => { + console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + }); - const s = dgram.createSocket('udp4'); - s.bind(1234, () => { - s.addMembership('224.0.0.114'); + server.on('listening', () => { + var address = server.address(); + console.log(`server listening ${address.address}:${address.port}`); }); + server.bind(41234); + // server listening 0.0.0.0:41234 + ## Class: dgram.Socket -The dgram Socket class encapsulates the datagram functionality. It -should be created via [`dgram.createSocket(...)`][] +The `dgram.Socket` object is an [`EventEmitter`][] that encapsulates the +datagram functionality. + +New instances of `dgram.Socket` are created using [`dgram.createSocket()`][]. +The `new` keyword is not to be used to create `dgram.Socket` instances. ### Event: 'close' -Emitted after a socket is closed with [`close()`][]. No new `'message'` events will be emitted -on this socket. +The `'close'` event is emitted after a socket is closed with [`close()`][]. +Once triggered, no new `'message'` events will be emitted on this socket. ### Event: 'error' * `exception` Error object -Emitted when an error occurs. +The `'error'` event is emitted whenever any error occurs. The event handler +function is passed a single Error object. ### Event: 'listening' -Emitted when a socket starts listening for datagrams. This happens as soon as UDP sockets -are created. +The `'listening'` event is emitted whenever a socket begins listening for +datagram messages. This occurs as soon as UDP sockets are created. ### Event: 'message' * `msg` Buffer object. The message * `rinfo` Object. Remote address information -Emitted when a new datagram is available on a socket. `msg` is a `Buffer` and -`rinfo` is an object with the sender's address information: +The `'message'` event is emitted when a new datagram is available on a socket. +The event handler function is passed two arguments: `msg` and `rinfo`. The +`msg` argument is a [`Buffer`][] and `rinfo` is an object with the sender's +address information provided by the `address`, `family` and `port` properties: socket.on('message', (msg, rinfo) => { console.log('Received %d bytes from %s:%d\n', @@ -59,41 +71,44 @@ Emitted when a new datagram is available on a socket. `msg` is a `Buffer` and * `multicastAddress` String * `multicastInterface` String, Optional -Tells the kernel to join a multicast group with `IP_ADD_MEMBERSHIP` socket option. - -If `multicastInterface` is not specified, the OS will try to add membership to all valid -interfaces. +Tells the kernel to join a multicast group at the given `multicastAddress` +using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` +argument is not specified, the operating system will try to add membership to +all valid networking interfaces. ### socket.address() -Returns an object containing the address information for a socket. For UDP sockets, -this object will contain `address` , `family` and `port`. +Returns an object containing the address information for a socket. +For UDP sockets, this object will contain `address`, `family` and `port` +properties. -### socket.bind([port][, address][, callback]) +### [socket.bind([port][, address][, callback])] * `port` Integer, Optional * `address` String, Optional -* `callback` Function with no parameters, Optional. Callback when - binding is done. - -For UDP sockets, listen for datagrams on a named `port` and optional -`address`. If `port` is not specified, the OS will try to bind to a random -port. If `address` is not specified, the OS will try to listen on -all addresses. After binding is done, a `'listening'` event is emitted -and the `callback`(if specified) is called. Specifying both a -`'listening'` event listener and `callback` is not harmful but not very +* `callback` Function with no parameters, Optional. Called when + binding is complete. + +For UDP sockets, causes the `dgram.Socket` to listen for datagram messages on a +named `port` and optional `address`. If `port` is not specified, the operating +system will attempt to bind to a random port. If `address` is not specified, +the operating system will attempt to listen on all addresses. Once binding is +complete, a `'listening'` event is emitted and the optional `callback` function +is called. + +Note that specifying both a `'listening'` event listener and passing a +`callback` to the `socket.bind()` method is not harmful but not very useful. A bound datagram socket keeps the Node.js process running to receive -datagrams. +datagram messages. If binding fails, an `'error'` event is generated. In rare case (e.g. -binding a closed socket), an [`Error`][] may be thrown by this method. +attempting to bind with a closed socket), an [`Error`][] may be thrown. Example of a UDP server listening on port 41234: const dgram = require('dgram'); - const server = dgram.createSocket('udp4'); server.on('error', (err) => { @@ -121,15 +136,22 @@ Example of a UDP server listening on port 41234: * `exclusive` {Boolean} - Optional. * `callback` {Function} - Optional. -The `port` and `address` properties of `options`, as well as the optional -callback function, behave as they do on a call to -[`socket.bind(port, \[address\], \[callback\])`][]. +For UDP sockets, causes the `dgram.Socket` to listen for datagram messages on a +named `port` and optional `address` that are passed as properties of an +`options` object passed as the first argument. If `port` is not specified, the +operating system will attempt to bind to a random port. If `address` is not +specified, the operating system will attempt to listen on all addresses. Once +binding is complete, a `'listening'` event is emitted and the optional +`callback` function is called. + +The `options` object may contain an additional `exclusive` property that is +use when using `dgram.Socket` objects with the [`cluster`] module. When +`exclusive` is set to `false` (the default), cluster workers will use the same +underlying socket handle allowing connection handling duties to be shared. +When `exclusive` is `true`, however, the handle is not shared and attempted +port sharing results in an error. -If `exclusive` is `false` (default), then cluster workers will use the same -underlying handle, allowing connection handling duties to be shared. When -`exclusive` is `true`, the handle is not shared, and attempted port sharing -results in an error. An example which listens on an exclusive port is -shown below. +An example socket listening on an exclusive port is shown below. socket.bind({ address: 'localhost', @@ -147,13 +169,13 @@ provided, it is added as a listener for the [`'close'`][] event. * `multicastAddress` String * `multicastInterface` String, Optional -Opposite of [`addMembership()`][] - tells the kernel to leave a multicast group with -`IP_DROP_MEMBERSHIP` socket option. This is automatically called by the kernel -when the socket is closed or process terminates, so most apps will never need to call -this. +Instructs the kernel to leave a multicast group at `multicastAddress` using the +`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the +kernel when the socket is closed or the process terminates, so most apps will +never have reason to call this. -If `multicastInterface` is not specified, the OS will try to drop membership to all valid -interfaces. +If `multicastInterface` is not specified, the operating system will attempt to +drop membership on all valid interfaces. ### socket.send(buf, offset, length, port, address[, callback]) @@ -164,26 +186,35 @@ interfaces. * `address` String. Destination hostname or IP address. * `callback` Function. Called when the message has been sent. Optional. -For UDP sockets, the destination port and address must be specified. A string -may be supplied for the `address` parameter, and it will be resolved with DNS. +Broadcasts a datagram on the socket. The destination `port` and `address` must +be specified. -If the address is omitted or is an empty string, `'0.0.0.0'` or `'::0'` is used -instead. Depending on the network configuration, those defaults may or may not -work; it's best to be explicit about the destination address. +The `buf` argument is a [`Buffer`] object containing the message. The `offset` +and `length` specify the offset within the `Buffer` where the message begins +and the number of bytes in the message, respectively. With messages that +contain multi-byte characters, `offset` and `length` will be calculated with +respect to [byte length][] and not the character position. -If the socket has not been previously bound with a call to `bind`, it gets -assigned a random port number and is bound to the "all interfaces" address +The `address` argument is a string. If the value of `address` is a host name, +DNS will be used to resolve the address of the host. If the `address` is not +specified or is an empty string, `'0.0.0.0'` or `'::0'` will be used instead. +It is possible, depending on the network configuration, that these defaults +may not work; accordingly, it is best to be explicit about the destination +address. + +If the socket has not been previously bound with a call to `bind`, the socket +is assigned a random port number and is bound to the "all interfaces" address (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) -An optional callback may be specified to detect DNS errors or for determining -when it's safe to reuse the `buf` object. Note that DNS lookups delay the time -to send for at least one tick. The only way to know for sure that the datagram -has been sent is by using a callback. If an error occurs and a callback is -given, the error will be the first argument to the callback. If a callback is -not given, the error is emitted as an `'error'` event on the `socket` object. +An optional `callback` function may be specified to as a way of reporting +DNS errors or for determining when it is safe to reuse the `buf` object. +Note that DNS lookups delay the time to send for at least one tick of the +Node.js event loop. -With consideration for multi-byte characters, `offset` and `length` will -be calculated with respect to [byte length][] and not the character position. +The only way to know for sure that the datagram has been sent is by using a +`callback`. If an error occurs and a `callback` is given, the error will be +passed as the first argument to the `callback`. If a `callback` is not given, +the error is emitted as an `'error'` event on the `socket` object. Example of sending a UDP packet to a random port on `localhost`; @@ -196,103 +227,137 @@ Example of sending a UDP packet to a random port on `localhost`; **A Note about UDP datagram size** -The maximum size of an `IPv4/v6` datagram depends on the `MTU` (_Maximum Transmission Unit_) -and on the `Payload Length` field size. +The maximum size of an `IPv4/v6` datagram depends on the `MTU` +(_Maximum Transmission Unit_) and on the `Payload Length` field size. -- The `Payload Length` field is `16 bits` wide, which means that a normal payload - cannot be larger than 64K octets including internet header and data +- The `Payload Length` field is `16 bits` wide, which means that a normal + payload exceed 64K octets _including_ the internet header and data (65,507 bytes = 65,535 − 8 bytes UDP header − 20 bytes IP header); - this is generally true for loopback interfaces, but such long datagrams - are impractical for most hosts and networks. + this is generally true for loopback interfaces, but such long datagram + messages are impractical for most hosts and networks. -- The `MTU` is the largest size a given link layer technology can support for datagrams. - For any link, `IPv4` mandates a minimum `MTU` of `68` octets, while the recommended `MTU` - for IPv4 is `576` (typically recommended as the `MTU` for dial-up type applications), - whether they arrive whole or in fragments. +- The `MTU` is the largest size a given link layer technology can support for + datagram messages. For any link, `IPv4` mandates a minimum `MTU` of `68` + octets, while the recommended `MTU` for IPv4 is `576` (typically recommended + as the `MTU` for dial-up type applications), whether they arrive whole or in + fragments. For `IPv6`, the minimum `MTU` is `1280` octets, however, the mandatory minimum - fragment reassembly buffer size is `1500` octets. - The value of `68` octets is very small, since most current link layer technologies have - a minimum `MTU` of `1500` (like Ethernet). + fragment reassembly buffer size is `1500` octets. The value of `68` octets is + very small, since most current link layer technologies, like Ethernet, have a + minimum `MTU` of `1500`. -Note that it's impossible to know in advance the MTU of each link through which -a packet might travel, and that generally sending a datagram greater than -the (receiver) `MTU` won't work (the packet gets silently dropped, without -informing the source that the data did not reach its intended recipient). +It is impossible to know in advance the MTU of each link through which +a packet might travel. Sending a datagram greater than the receiver `MTU` will +not work because the packet will get silently dropped without informing the +source that the data did not reach its intended recipient. ### socket.setBroadcast(flag) * `flag` Boolean -Sets or clears the `SO_BROADCAST` socket option. When this option is set, UDP packets -may be sent to a local interface's broadcast address. +Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP +packets may be sent to a local interface's broadcast address. ### socket.setMulticastLoopback(flag) * `flag` Boolean -Sets or clears the `IP_MULTICAST_LOOP` socket option. When this option is set, multicast -packets will also be received on the local interface. +Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, +multicast packets will also be received on the local interface. ### socket.setMulticastTTL(ttl) * `ttl` Integer -Sets the `IP_MULTICAST_TTL` socket option. TTL stands for "Time to Live", but in this -context it specifies the number of IP hops that a packet is allowed to go through, -specifically for multicast traffic. Each router or gateway that forwards a packet -decrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. +Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for +"Time to Live", in this context it specifies the number of IP hops that a +packet is allowed to travel through, specifically for multicast traffic. Each +router or gateway that forwards a packet decrements the TTL. If the TTL is +decremented to 0 by a router, it will not be forwarded. -The argument to `setMulticastTTL()` is a number of hops between 0 and 255. The default on most -systems is 1. +The argument passed to to `socket.setMulticastTTL()` is a number of hops +between 0 and 255. The default on most systems is `1` but can vary. ### socket.setTTL(ttl) * `ttl` Integer -Sets the `IP_TTL` socket option. TTL stands for "Time to Live", but in this context it -specifies the number of IP hops that a packet is allowed to go through. Each router or -gateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a -router, it will not be forwarded. Changing TTL values is typically done for network -probes or when multicasting. +Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", +in this context it specifies the number of IP hops that a packet is allowed to +travel through. Each router or gateway that forwards a packet decrements the +TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. +Changing TTL values is typically done for network probes or when multicasting. -The argument to `setTTL()` is a number of hops between 1 and 255. The default -on most systems is 64. +The argument to `socket.setTTL()` is a number of hops between 1 and 255. +The default on most systems is 64 but can vary. ### socket.ref() -Opposite of `unref`, calling `ref` on a previously `unref`d socket will *not* -let the program exit if it's the only socket left (the default behavior). If -the socket is `ref`d calling `ref` again will have no effect. +By default, binding a socket will cause it to block the Node.js process from +exiting as long as the socket is open. The `socket.unref()` method can be used +to exclude the socket from the reference counting that keeps the Node.js +process active. The `socket.ref()` method adds the socket back to the reference +counting and restores the default behavior. + +Calling `socket.ref()` multiples times will have no additional effect. -Returns `socket`. +The `socket.ref()` method returns a reference to the socket so calls can be +chained. ### socket.unref() -Calling `unref` on a socket will allow the program to exit if this is the only -active socket in the event system. If the socket is already `unref`d calling -`unref` again will have no effect. +By default, binding a socket will cause it to block the Node.js process from +exiting as long as the socket is open. The `socket.unref()` method can be used +to exclude the socket from the reference counting that keeps the Node.js +process active, allowing the process to exit even if the socket is still +listening. + +Calling `socket.unref()` multiple times will have no addition effect. -Returns `socket`. +The `socket.unref()` method returns a reference to the socket so calls can be +chained. -## dgram.createSocket(options[, callback]) +### Change to asynchronous `socket.bind()` behavior + +As of Node.js v0.10, [`dgram.Socket#bind()`][] changed to an asynchronous +execution model. Legacy code that assumes synchronous behavior, as in the +following example: + + const s = dgram.createSocket('udp4'); + s.bind(1234); + s.addMembership('224.0.0.114'); + +Must be changed to pass a callback function to the [`dgram.Socket#bind()`][] +function: + + const s = dgram.createSocket('udp4'); + s.bind(1234, () => { + s.addMembership('224.0.0.114'); + }); + +## `dgram` module functions + +### dgram.createSocket(options[, callback]) * `options` Object * `callback` Function. Attached as a listener to `'message'` events. * Returns: Socket object -The `options` object should contain a `type` field of either `udp4` or `udp6` -and an optional boolean `reuseAddr` field. +Creates a `dgram.Socket` object. The `options` argument is an object that +should contain a `type` field of either `udp4` or `udp6` and an optional +boolean `reuseAddr` field. When `reuseAddr` is `true` [`socket.bind()`][] will reuse the address, even if another process has already bound a socket on it. `reuseAddr` defaults to -`false`. +`false`. An optional `callback` function can be passed specified which is added +as a listener for `'message'` events. -Takes an optional callback which is added as a listener for `'message'` events. - -Call [`socket.bind()`][] if you want to receive datagrams. [`socket.bind()`][] will -bind to the "all interfaces" address on a random port (it does the right thing -for both `udp4` and `udp6` sockets). You can then retrieve the address and port -with [`socket.address().address`][] and [`socket.address().port`][]. +Once the socket is created, calling [`socket.bind()`][] will instruct the +socket to begin listening for datagram messages. When `address` and `port` are +not passed to [`socket.bind()`][] the method will bind the socket to the "all +interfaces" address on a random port (it does the right thing for both `udp4` +and `udp6` sockets). The bound address and port can be retrieved using +[`socket.address().address`][] and [`socket.address().port`][]. ## dgram.createSocket(type[, callback]) @@ -301,24 +366,26 @@ with [`socket.address().address`][] and [`socket.address().port`][]. Optional * Returns: Socket object -Creates a datagram Socket of the specified types. Valid types are `udp4` -and `udp6`. - -Takes an optional callback which is added as a listener for `'message'` events. +Creates a `dgram.Socket` object of the specified `type`. The `type` argument +can be either `udp4` or `udp6`. An optional `callback` function can be passed +which is added as a listener for `'message'` events. -Call [`socket.bind()`][] if you want to receive datagrams. [`socket.bind()`][] will -bind to the "all interfaces" address on a random port (it does the right thing -for both `udp4` and `udp6` sockets). You can then retrieve the address and port -with [`socket.address().address`][] and [`socket.address().port`][]. +Once the socket is created, calling [`socket.bind()`][] will instruct the +socket to begin listening for datagram messages. When `address` and `port` are +not passed to [`socket.bind()`][] the method will bind the socket to the "all +interfaces" address on a random port (it does the right thing for both `udp4` +and `udp6` sockets). The bound address and port can be retrieved using +[`socket.address().address`][] and [`socket.address().port`][]. +[`EventEmitter`]: events.html +[`Buffer`]: buffer.html [`'close'`]: #dgram_event_close [`addMembership()`]: #dgram_socket_addmembership_multicastaddress_multicastinterface [`close()`]: #dgram_socket_close_callback -[`dgram.createSocket(...)`]: #dgram_dgram_createsocket_options_callback +[`dgram.createSocket()`]: #dgram_dgram_createsocket_options_callback [`dgram.Socket#bind()`]: #dgram_socket_bind_options_callback [`Error`]: errors.html#errors_class_error [`socket.address().address`]: #dgram_socket_address [`socket.address().port`]: #dgram_socket_address [`socket.bind()`]: #dgram_socket_bind_port_address_callback -[`socket.bind(port, \[address\], \[callback\])`]: #dgram_socket_bind_port_address_callback [byte length]: buffer.html#buffer_class_method_buffer_bytelength_string_encoding From 126e054484db6380d2c7b283e825129bc8e39c8e Mon Sep 17 00:00:00 2001 From: Vladimir Kurchatkin Date: Thu, 3 Dec 2015 15:34:52 +0300 Subject: [PATCH 107/262] deps: backport 200315c from V8 upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: Make AstRawString deduplication encoding-agnostic. R=jkummerow@chromium.org BUG=v8:4450 LOG=N Review URL: https://codereview.chromium.org/1411103006 Cr-Commit-Position: refs/heads/master@{#31624} Ref: https://github.com/nodejs/node/pull/4160 PR-URL: https://github.com/nodejs/node/pull/4128 Reviewed-By: jasnell - James M Snell Reviewed-By: targos - Michaël Zasso Reviewed-By: indutny - Fedor Indutny --- deps/v8/src/ast-value-factory.cc | 30 +++++++++++++++++--- deps/v8/test/mjsunit/regress/regress-4450.js | 8 ++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 deps/v8/test/mjsunit/regress/regress-4450.js diff --git a/deps/v8/src/ast-value-factory.cc b/deps/v8/src/ast-value-factory.cc index 68cf015200365c..fbcde8b45703fc 100644 --- a/deps/v8/src/ast-value-factory.cc +++ b/deps/v8/src/ast-value-factory.cc @@ -29,6 +29,7 @@ #include "src/api.h" #include "src/objects.h" +#include "src/utils.h" namespace v8 { namespace internal { @@ -379,11 +380,32 @@ AstRawString* AstValueFactory::GetString(uint32_t hash, bool is_one_byte, bool AstValueFactory::AstRawStringCompare(void* a, void* b) { const AstRawString* lhs = static_cast(a); const AstRawString* rhs = static_cast(b); - if (lhs->is_one_byte() != rhs->is_one_byte()) return false; + if (lhs->length() != rhs->length()) return false; if (lhs->hash() != rhs->hash()) return false; - int len = lhs->byte_length(); - if (rhs->byte_length() != len) return false; - return memcmp(lhs->raw_data(), rhs->raw_data(), len) == 0; + const unsigned char* l = lhs->raw_data(); + const unsigned char* r = rhs->raw_data(); + size_t length = rhs->length(); + if (lhs->is_one_byte()) { + if (rhs->is_one_byte()) { + return CompareCharsUnsigned(reinterpret_cast(l), + reinterpret_cast(r), + length) == 0; + } else { + return CompareCharsUnsigned(reinterpret_cast(l), + reinterpret_cast(r), + length) == 0; + } + } else { + if (rhs->is_one_byte()) { + return CompareCharsUnsigned(reinterpret_cast(l), + reinterpret_cast(r), + length) == 0; + } else { + return CompareCharsUnsigned(reinterpret_cast(l), + reinterpret_cast(r), + length) == 0; + } + } } } // namespace internal } // namespace v8 diff --git a/deps/v8/test/mjsunit/regress/regress-4450.js b/deps/v8/test/mjsunit/regress/regress-4450.js new file mode 100644 index 00000000000000..31ff4f19c26d77 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-4450.js @@ -0,0 +1,8 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +({})['foobar\u2653'.slice(0, 6)] = null; +var x; +eval('x = function foobar() { return foobar };'); +x(); From a1f4285ce87ffa3278818416998e4db9b45c4984 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 23 Nov 2015 14:58:18 -0500 Subject: [PATCH 108/262] util,src: allow lookup of hidden values This commit adds an internal util method that makes hidden values in the C++ layer visible in JS. PR-URL: https://github.com/nodejs/node/pull/3988 Reviewed-By: Trevor Norris Reviewed-By: Ben Noordhuis Conflicts: lib/internal/util.js --- lib/internal/util.js | 3 +++ src/node_util.cc | 19 +++++++++++++++++ test/parallel/test-util-internal.js | 32 +++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 test/parallel/test-util-internal.js diff --git a/lib/internal/util.js b/lib/internal/util.js index a31f22e6e9f186..5be073f18a2217 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -1,7 +1,10 @@ 'use strict'; +const binding = process.binding('util'); const prefix = '(node) '; +exports.getHiddenValue = binding.getHiddenValue; + // All the internal deprecations have to use this function only, as this will // prepend the prefix to the actual message. exports.deprecate = function(fn, msg) { diff --git a/src/node_util.cc b/src/node_util.cc index 19c3e3240a52af..a520b8d5f354ac 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -10,6 +10,7 @@ using v8::Context; using v8::FunctionCallbackInfo; using v8::Local; using v8::Object; +using v8::String; using v8::Value; static void IsMapIterator(const FunctionCallbackInfo& args) { @@ -28,6 +29,23 @@ static void IsPromise(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(args[0]->IsPromise()); } + +static void GetHiddenValue(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + + if (!args[0]->IsObject()) + return env->ThrowTypeError("obj must be an object"); + + if (!args[1]->IsString()) + return env->ThrowTypeError("name must be a string"); + + Local obj = args[0].As(); + Local name = args[1].As(); + + args.GetReturnValue().Set(obj->GetHiddenValue(name)); +} + + void Initialize(Local target, Local unused, Local context) { @@ -35,6 +53,7 @@ void Initialize(Local target, env->SetMethod(target, "isMapIterator", IsMapIterator); env->SetMethod(target, "isSetIterator", IsSetIterator); env->SetMethod(target, "isPromise", IsPromise); + env->SetMethod(target, "getHiddenValue", GetHiddenValue); } } // namespace util diff --git a/test/parallel/test-util-internal.js b/test/parallel/test-util-internal.js new file mode 100644 index 00000000000000..9ab883ec8b6dcd --- /dev/null +++ b/test/parallel/test-util-internal.js @@ -0,0 +1,32 @@ +'use strict'; +// Flags: --expose_internals + +const common = require('../common'); +const assert = require('assert'); +const internalUtil = require('internal/util'); + +function getHiddenValue(obj, name) { + return function() { + internalUtil.getHiddenValue(obj, name); + }; +} + +assert.throws(getHiddenValue(), /obj must be an object/); +assert.throws(getHiddenValue(null, 'foo'), /obj must be an object/); +assert.throws(getHiddenValue(undefined, 'foo'), /obj must be an object/); +assert.throws(getHiddenValue('bar', 'foo'), /obj must be an object/); +assert.throws(getHiddenValue(85, 'foo'), /obj must be an object/); +assert.throws(getHiddenValue({}), /name must be a string/); +assert.throws(getHiddenValue({}, null), /name must be a string/); +assert.throws(getHiddenValue({}, []), /name must be a string/); +assert.deepEqual(internalUtil.getHiddenValue({}, 'foo'), undefined); + +let arrowMessage; + +try { + require('../fixtures/syntax/bad_syntax'); +} catch (err) { + arrowMessage = internalUtil.getHiddenValue(err, 'arrowMessage'); +} + +assert(/bad_syntax\.js:1/.test(arrowMessage)); From 75b638e0ac1039ab02dda63c83713190de3c2928 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 24 Nov 2015 19:52:35 -0500 Subject: [PATCH 109/262] util: add decorateErrorStack() This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: https://github.com/nodejs/node/pull/4013 Reviewed-By: Ben Noordhuis --- lib/util.js | 11 ++++++ .../test-util-decorate-error-stack.js | 35 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 test/parallel/test-util-decorate-error-stack.js diff --git a/lib/util.js b/lib/util.js index 25d470fb743dae..63d1fcc765ac7b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -901,3 +901,14 @@ exports._exceptionWithHostPort = function(err, } return ex; }; + + +exports.decorateErrorStack = function(err) { + if (!(isError(err) && err.stack)) + return; + + const arrow = internalUtil.getHiddenValue(err, 'arrowMessage'); + + if (arrow) + err.stack = arrow + err.stack; +}; diff --git a/test/parallel/test-util-decorate-error-stack.js b/test/parallel/test-util-decorate-error-stack.js new file mode 100644 index 00000000000000..b609ee3372574b --- /dev/null +++ b/test/parallel/test-util-decorate-error-stack.js @@ -0,0 +1,35 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const util = require('util'); + +assert.doesNotThrow(function() { + util.decorateErrorStack(); + util.decorateErrorStack(null); + util.decorateErrorStack(1); + util.decorateErrorStack(true); +}); + +// Verify that a stack property is not added to non-Errors +const obj = {}; +util.decorateErrorStack(obj); +assert.strictEqual(obj.stack, undefined); + +// Verify that the stack is decorated when possible +let err; + +try { + require('../fixtures/syntax/bad_syntax'); +} catch (e) { + err = e; + assert(!/var foo bar;/.test(err.stack)); + util.decorateErrorStack(err); +} + +assert(/var foo bar;/.test(err.stack)); + +// Verify that the stack is unchanged when there is no arrow message +err = new Error('foo'); +const originalStack = err.stack; +util.decorateErrorStack(err); +assert.strictEqual(originalStack, err.stack); From 4e23b2a4bfdb1fde47d22931cbc2bcf5967cd850 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 24 Nov 2015 19:55:51 -0500 Subject: [PATCH 110/262] repl: attach location info to syntax errors Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: https://github.com/nodejs/node/issues/2762 Refs: https://github.com/nodejs/node/issues/3411 Refs: https://github.com/nodejs/node/issues/3784 PR-URL: https://github.com/nodejs/node/pull/4013 Reviewed-By: Ben Noordhuis --- lib/repl.js | 1 + test/parallel/test-repl-syntax-error-stack.js | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/parallel/test-repl-syntax-error-stack.js diff --git a/lib/repl.js b/lib/repl.js index 4fe50f3979e68f..0d82a842be636a 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -274,6 +274,7 @@ function REPLServer(prompt, self._domain.on('error', function(e) { debug('domain error'); const top = replMap.get(self); + util.decorateErrorStack(e); top.outputStream.write((e.stack || e) + '\n'); top.lineParser.reset(); top.bufferedCommand = ''; diff --git a/test/parallel/test-repl-syntax-error-stack.js b/test/parallel/test-repl-syntax-error-stack.js new file mode 100644 index 00000000000000..573059e8d9f34f --- /dev/null +++ b/test/parallel/test-repl-syntax-error-stack.js @@ -0,0 +1,39 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const repl = require('repl'); +const util = require('util'); +let found = false; + +process.on('exit', () => { + assert.strictEqual(found, true); +}); + +// A stream to push an array into a REPL +function ArrayStream() { + this.run = function(data) { + data.forEach(line => { + this.emit('data', line + '\n'); + }); + }; +} +util.inherits(ArrayStream, require('stream').Stream); +ArrayStream.prototype.readable = true; +ArrayStream.prototype.writable = true; +ArrayStream.prototype.resume = function() {}; +ArrayStream.prototype.write = function(output) { + if (/var foo bar;/.test(output)) + found = true; +}; + +const putIn = new ArrayStream(); +const testMe = repl.start('', putIn); +let file = path.resolve(__dirname, '../fixtures/syntax/bad_syntax'); + +if (common.isWindows) + file = file.replace(/\\/g, '\\\\'); + +putIn.run(['.clear']); +putIn.run([`require('${file}');`]); From a8ac55c9c49e19f4034e286a31c61c8d5529a430 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 25 Nov 2015 22:27:29 +0100 Subject: [PATCH 111/262] module,repl: remove repl require() hack Remove a hack that was introduced in commit bb6d468d from November 2010. This is groundwork for a follow-up commit that makes it possible to use internal modules in lib/repl.js. PR-URL: https://github.com/nodejs/node/pull/4026 Reviewed-By: Colin Ihrig Conflicts: lib/module.js --- lib/_debugger.js | 2 +- lib/internal/module.js | 26 ++++++++++++++- lib/module.js | 65 ++++++++++++-------------------------- lib/repl.js | 6 +++- src/node.js | 2 +- test/parallel/test-repl.js | 4 +++ 6 files changed, 56 insertions(+), 49 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index dd47cbff285149..ad7ee6295bee2a 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -5,7 +5,7 @@ const path = require('path'); const net = require('net'); const vm = require('vm'); const Module = require('module'); -const repl = Module.requireRepl(); +const repl = require('repl'); const inherits = util.inherits; const assert = require('assert'); const spawn = require('child_process').spawn; diff --git a/lib/internal/module.js b/lib/internal/module.js index 7f3a39e539424a..ef55aa64bd5642 100644 --- a/lib/internal/module.js +++ b/lib/internal/module.js @@ -1,6 +1,30 @@ 'use strict'; -module.exports.stripBOM = stripBOM; +module.exports = { makeRequireFunction, stripBOM }; + +// Invoke with makeRequireFunction.call(module) where |module| is the +// Module object to use as the context for the require() function. +function makeRequireFunction() { + const Module = this.constructor; + const self = this; + + function require(path) { + return self.require(path); + } + + require.resolve = function(request) { + return Module._resolveFilename(request, self); + }; + + require.main = process.mainModule; + + // Enable support to add extra extension types. + require.extensions = Module._extensions; + + require.cache = Module._cache; + + return require; +} /** * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) diff --git a/lib/module.js b/lib/module.js index b3d29ffbd1c653..99c476210991fd 100644 --- a/lib/module.js +++ b/lib/module.js @@ -274,17 +274,6 @@ Module._load = function(request, parent, isMain) { debug('Module._load REQUEST %s parent: %s', request, parent.id); } - // REPL is a special case, because it needs the real require. - if (request === 'internal/repl' || request === 'repl') { - if (Module._cache[request]) { - return Module._cache[request]; - } - var replModule = new Module(request); - replModule._compile(NativeModule.getSource(request), `${request}.js`); - NativeModule._cache[request] = replModule; - return replModule.exports; - } - var filename = Module._resolveFilename(request, parent); var cachedModule = Module._cache[filename]; @@ -376,37 +365,9 @@ var resolvedArgv; // the file. // Returns exception, if any. Module.prototype._compile = function(content, filename) { - var self = this; // remove shebang content = content.replace(shebangRe, ''); - function require(path) { - return self.require(path); - } - - require.resolve = function(request) { - return Module._resolveFilename(request, self); - }; - - Object.defineProperty(require, 'paths', { get: function() { - throw new Error('require.paths is removed. Use ' + - 'node_modules folders, or the NODE_PATH ' + - 'environment variable instead.'); - }}); - - require.main = process.mainModule; - - // Enable support to add extra extension types - require.extensions = Module._extensions; - require.registerExtension = function() { - throw new Error('require.registerExtension() removed. Use ' + - 'require.extensions instead.'); - }; - - require.cache = Module._cache; - - var dirname = path.dirname(filename); - // create wrapper function var wrapper = Module.wrap(content); @@ -431,8 +392,22 @@ Module.prototype._compile = function(content, filename) { global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0); } } - var args = [self.exports, require, self, filename, dirname]; - return compiledWrapper.apply(self.exports, args); + const dirname = path.dirname(filename); + const require = internalModule.makeRequireFunction.call(this); + + Object.defineProperty(require, 'paths', { get: function() { + throw new Error('require.paths is removed. Use ' + + 'node_modules folders, or the NODE_PATH ' + + 'environment variable instead.'); + }}); + + require.registerExtension = function() { + throw new Error('require.registerExtension() removed. Use ' + + 'require.extensions instead.'); + }; + + const args = [this.exports, require, this, filename, dirname]; + return compiledWrapper.apply(this.exports, args); }; @@ -498,10 +473,10 @@ Module._initPaths = function() { Module.globalPaths = modulePaths.slice(0); }; -// bootstrap repl -Module.requireRepl = function() { - return Module._load('internal/repl', '.'); -}; +// TODO(bnoordhuis) Unused, remove in the future. +Module.requireRepl = internalUtil.deprecate(function() { + return NativeModule.require('internal/repl'); +}, 'Module.requireRepl is deprecated.'); Module._preloadModules = function(requests) { if (!Array.isArray(requests)) diff --git a/lib/repl.js b/lib/repl.js index 0d82a842be636a..42fb6ad3405a74 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -21,6 +21,7 @@ 'use strict'; +const internalModule = require('internal/module'); const util = require('util'); const inherits = util.inherits; const Stream = require('stream'); @@ -29,6 +30,7 @@ const path = require('path'); const fs = require('fs'); const rl = require('readline'); const Console = require('console').Console; +const Module = require('module'); const domain = require('domain'); const debug = util.debuglog('repl'); @@ -508,6 +510,8 @@ REPLServer.prototype.createContext = function() { context.global.global = context; } + const module = new Module(''); + const require = internalModule.makeRequireFunction.call(module); context.module = module; context.require = require; @@ -647,7 +651,7 @@ REPLServer.prototype.complete = function(line, callback) { completionGroupsLoaded(); } else if (match = line.match(requireRE)) { // require('...') - var exts = Object.keys(require.extensions); + const exts = Object.keys(this.context.require.extensions); var indexRe = new RegExp('^index(' + exts.map(regexpEscape).join('|') + ')$'); diff --git a/src/node.js b/src/node.js index a9a85809096a6e..367f68b25c003c 100644 --- a/src/node.js +++ b/src/node.js @@ -142,7 +142,7 @@ // If -i or --interactive were passed, or stdin is a TTY. if (process._forceRepl || NativeModule.require('tty').isatty(0)) { // REPL - var cliRepl = Module.requireRepl(); + var cliRepl = NativeModule.require('internal/repl'); cliRepl.createInternalRepl(process.env, function(err, repl) { if (err) { throw err; diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 4d65a1e9d084b4..0d05de9bc1863d 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -278,6 +278,10 @@ function error_test() { expect: 'undefined\n' + prompt_unix }, { client: client_unix, send: '/* \'\n"\n\'"\'\n*/', expect: 'undefined\n' + prompt_unix }, + // REPL should get a normal require() function, not one that allows + // access to internal modules without the --expose_internals flag. + { client: client_unix, send: 'require("internal/repl")', + expect: /^Error: Cannot find module 'internal\/repl'/ }, ]); } From c16fa6b37536cee8503197d1342978505d6da6f9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 25 Nov 2015 22:37:43 +0100 Subject: [PATCH 112/262] util: move .decorateErrorStack to internal/util Move the method that was added in commit 8ca412b from earlier this month from lib/util.js to lib/internal/util.js. Avoids exposing a method that we may not wish to expose just yet, seeing how it relies on implementation details. PR-URL: https://github.com/nodejs/node/pull/4026 Reviewed-By: Colin Ihrig --- lib/internal/util.js | 18 ++++++++++++++++ lib/repl.js | 3 ++- lib/util.js | 21 +++---------------- .../test-util-decorate-error-stack.js | 17 ++++++++------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/lib/internal/util.js b/lib/internal/util.js index 5be073f18a2217..c34682ed1b3809 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -57,3 +57,21 @@ exports._deprecate = function(fn, msg) { return deprecated; }; + +exports.decorateErrorStack = function decorateErrorStack(err) { + if (!(exports.isError(err) && err.stack)) + return; + + const arrow = exports.getHiddenValue(err, 'arrowMessage'); + + if (arrow) + err.stack = arrow + err.stack; +}; + +exports.isError = function isError(e) { + return exports.objectToString(e) === '[object Error]' || e instanceof Error; +}; + +exports.objectToString = function objectToString(o) { + return Object.prototype.toString.call(o); +}; diff --git a/lib/repl.js b/lib/repl.js index 42fb6ad3405a74..80ec4defaf1646 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -22,6 +22,7 @@ 'use strict'; const internalModule = require('internal/module'); +const internalUtil = require('internal/util'); const util = require('util'); const inherits = util.inherits; const Stream = require('stream'); @@ -276,7 +277,7 @@ function REPLServer(prompt, self._domain.on('error', function(e) { debug('domain error'); const top = replMap.get(self); - util.decorateErrorStack(e); + internalUtil.decorateErrorStack(e); top.outputStream.write((e.stack || e) + '\n'); top.lineParser.reset(); top.bufferedCommand = ''; diff --git a/lib/util.js b/lib/util.js index 63d1fcc765ac7b..1a2f3f34835899 100644 --- a/lib/util.js +++ b/lib/util.js @@ -5,6 +5,9 @@ const Buffer = require('buffer').Buffer; const internalUtil = require('internal/util'); const binding = process.binding('util'); +const isError = internalUtil.isError; +const objectToString = internalUtil.objectToString; + var Debug; const formatRegExp = /%[sdj%]/g; @@ -684,9 +687,6 @@ function isDate(d) { } exports.isDate = isDate; -function isError(e) { - return objectToString(e) === '[object Error]' || e instanceof Error; -} exports.isError = isError; function isFunction(arg) { @@ -702,10 +702,6 @@ exports.isPrimitive = isPrimitive; exports.isBuffer = Buffer.isBuffer; -function objectToString(o) { - return Object.prototype.toString.call(o); -} - function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); @@ -901,14 +897,3 @@ exports._exceptionWithHostPort = function(err, } return ex; }; - - -exports.decorateErrorStack = function(err) { - if (!(isError(err) && err.stack)) - return; - - const arrow = internalUtil.getHiddenValue(err, 'arrowMessage'); - - if (arrow) - err.stack = arrow + err.stack; -}; diff --git a/test/parallel/test-util-decorate-error-stack.js b/test/parallel/test-util-decorate-error-stack.js index b609ee3372574b..24fee56df7b655 100644 --- a/test/parallel/test-util-decorate-error-stack.js +++ b/test/parallel/test-util-decorate-error-stack.js @@ -1,18 +1,19 @@ +// Flags: --expose_internals 'use strict'; const common = require('../common'); const assert = require('assert'); -const util = require('util'); +const internalUtil = require('internal/util'); assert.doesNotThrow(function() { - util.decorateErrorStack(); - util.decorateErrorStack(null); - util.decorateErrorStack(1); - util.decorateErrorStack(true); + internalUtil.decorateErrorStack(); + internalUtil.decorateErrorStack(null); + internalUtil.decorateErrorStack(1); + internalUtil.decorateErrorStack(true); }); // Verify that a stack property is not added to non-Errors const obj = {}; -util.decorateErrorStack(obj); +internalUtil.decorateErrorStack(obj); assert.strictEqual(obj.stack, undefined); // Verify that the stack is decorated when possible @@ -23,7 +24,7 @@ try { } catch (e) { err = e; assert(!/var foo bar;/.test(err.stack)); - util.decorateErrorStack(err); + internalUtil.decorateErrorStack(err); } assert(/var foo bar;/.test(err.stack)); @@ -31,5 +32,5 @@ assert(/var foo bar;/.test(err.stack)); // Verify that the stack is unchanged when there is no arrow message err = new Error('foo'); const originalStack = err.stack; -util.decorateErrorStack(err); +internalUtil.decorateErrorStack(err); assert.strictEqual(originalStack, err.stack); From f64aa34ebd3285b665917a17f040fd272de53be7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 25 Nov 2015 16:38:01 -0500 Subject: [PATCH 113/262] test: move ArrayStream to common A number of REPL tests define the same ArrayStream object. This commit moves the repeated code into common.js. PR-URL: https://github.com/nodejs/node/pull/4027 Reviewed-By: Ben Noordhuis Conflicts: test/common.js --- test/common.js | 19 ++++++++++++++++++ test/parallel/test-repl-.save.load.js | 17 +--------------- test/parallel/test-repl-autolibs.js | 20 ++++--------------- test/parallel/test-repl-console.js | 7 ++----- test/parallel/test-repl-domain.js | 17 +--------------- test/parallel/test-repl-end-emits-exit.js | 7 ++----- test/parallel/test-repl-options.js | 7 ++----- test/parallel/test-repl-reset-event.js | 7 ++----- test/parallel/test-repl-syntax-error-stack.js | 16 ++------------- test/parallel/test-repl-tab-complete-crash.js | 19 +++--------------- test/parallel/test-repl-tab-complete.js | 17 +--------------- 11 files changed, 39 insertions(+), 114 deletions(-) diff --git a/test/common.js b/test/common.js index 0e824efd94fe6d..c1012e7a097688 100644 --- a/test/common.js +++ b/test/common.js @@ -5,6 +5,8 @@ var fs = require('fs'); var assert = require('assert'); var os = require('os'); var child_process = require('child_process'); +const stream = require('stream'); +const util = require('util'); exports.testDir = path.dirname(__filename); @@ -503,3 +505,20 @@ exports.nodeProcessAborted = function nodeProcessAborted(exitCode, signal) { return expectedExitCodes.indexOf(exitCode) > -1; } }; + +// A stream to push an array into a REPL +function ArrayStream() { + this.run = function(data) { + data.forEach(line => { + this.emit('data', line + '\n'); + }); + }; +} + +util.inherits(ArrayStream, stream.Stream); +exports.ArrayStream = ArrayStream; +ArrayStream.prototype.readable = true; +ArrayStream.prototype.writable = true; +ArrayStream.prototype.pause = function() {}; +ArrayStream.prototype.resume = function() {}; +ArrayStream.prototype.write = function() {}; diff --git a/test/parallel/test-repl-.save.load.js b/test/parallel/test-repl-.save.load.js index 56566719926519..c71b383bcd7409 100644 --- a/test/parallel/test-repl-.save.load.js +++ b/test/parallel/test-repl-.save.load.js @@ -9,24 +9,9 @@ common.refreshTmpDir(); var repl = require('repl'); -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - var self = this; - data.forEach(function(line) { - self.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function() {}; - var works = [['inner.one'], 'inner.o']; -var putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); var testMe = repl.start('', putIn); diff --git a/test/parallel/test-repl-autolibs.js b/test/parallel/test-repl-autolibs.js index e37f2d036ece4d..05cc299f56888f 100644 --- a/test/parallel/test-repl-autolibs.js +++ b/test/parallel/test-repl-autolibs.js @@ -1,25 +1,13 @@ -/* eslint-disable required-modules */ 'use strict'; +const common = require('../common'); var assert = require('assert'); var util = require('util'); var repl = require('repl'); -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - var self = this; - data.forEach(function(line) { - self.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function() {}; +// This test adds global variables +common.globalCheck = false; -var putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); var testMe = repl.start('', putIn, null, true); test1(); diff --git a/test/parallel/test-repl-console.js b/test/parallel/test-repl-console.js index e66fcb1621adc5..fe737d841e1651 100644 --- a/test/parallel/test-repl-console.js +++ b/test/parallel/test-repl-console.js @@ -1,13 +1,10 @@ 'use strict'; var common = require('../common'), assert = require('assert'), - Stream = require('stream'), repl = require('repl'); -// create a dummy stream that does nothing -var stream = new Stream(); -stream.write = stream.pause = stream.resume = function() {}; -stream.readable = stream.writable = true; +// Create a dummy stream that does nothing +const stream = new common.ArrayStream(); var r = repl.start({ input: stream, diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index 7528f502878f63..baf0485b3b80b2 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -5,22 +5,7 @@ var common = require('../common'); var util = require('util'); var repl = require('repl'); -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - var self = this; - data.forEach(function(line) { - self.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function() {}; - -var putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); var testMe = repl.start('', putIn); putIn.write = function(data) { diff --git a/test/parallel/test-repl-end-emits-exit.js b/test/parallel/test-repl-end-emits-exit.js index e4bc4da78c142d..2c18b413d68c0f 100644 --- a/test/parallel/test-repl-end-emits-exit.js +++ b/test/parallel/test-repl-end-emits-exit.js @@ -1,15 +1,12 @@ 'use strict'; var common = require('../common'), assert = require('assert'), - Stream = require('stream'), repl = require('repl'), terminalExit = 0, regularExit = 0; -// create a dummy stream that does nothing -var stream = new Stream(); -stream.write = stream.pause = stream.resume = function() {}; -stream.readable = stream.writable = true; +// Create a dummy stream that does nothing +const stream = new common.ArrayStream(); function testTerminalMode() { var r1 = repl.start({ diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index 5bc37d2d7117f3..ec3b144ec0ef77 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -1,15 +1,12 @@ 'use strict'; var common = require('../common'), assert = require('assert'), - Stream = require('stream'), repl = require('repl'); common.globalCheck = false; -// create a dummy stream that does nothing -var stream = new Stream(); -stream.write = stream.pause = stream.resume = function() {}; -stream.readable = stream.writable = true; +// Create a dummy stream that does nothing +const stream = new common.ArrayStream(); // 1, mostly defaults var r1 = repl.start({ diff --git a/test/parallel/test-repl-reset-event.js b/test/parallel/test-repl-reset-event.js index e6d4eed1385b10..0bd43dcd6c370e 100644 --- a/test/parallel/test-repl-reset-event.js +++ b/test/parallel/test-repl-reset-event.js @@ -4,12 +4,9 @@ common.globalCheck = false; var assert = require('assert'); var repl = require('repl'); -var Stream = require('stream'); -// create a dummy stream that does nothing -var dummy = new Stream(); -dummy.write = dummy.pause = dummy.resume = function() {}; -dummy.readable = dummy.writable = true; +// Create a dummy stream that does nothing +const dummy = new common.ArrayStream(); function testReset(cb) { var r = repl.start({ diff --git a/test/parallel/test-repl-syntax-error-stack.js b/test/parallel/test-repl-syntax-error-stack.js index 573059e8d9f34f..647d3e3569ce00 100644 --- a/test/parallel/test-repl-syntax-error-stack.js +++ b/test/parallel/test-repl-syntax-error-stack.js @@ -11,24 +11,12 @@ process.on('exit', () => { assert.strictEqual(found, true); }); -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - data.forEach(line => { - this.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function(output) { +common.ArrayStream.prototype.write = function(output) { if (/var foo bar;/.test(output)) found = true; }; -const putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); const testMe = repl.start('', putIn); let file = path.resolve(__dirname, '../fixtures/syntax/bad_syntax'); diff --git a/test/parallel/test-repl-tab-complete-crash.js b/test/parallel/test-repl-tab-complete-crash.js index 85ab0577eb8601..484580f1e72fe5 100644 --- a/test/parallel/test-repl-tab-complete-crash.js +++ b/test/parallel/test-repl-tab-complete-crash.js @@ -1,32 +1,19 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const util = require('util'); const repl = require('repl'); var referenceErrorCount = 0; -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - const self = this; - data.forEach(function(line) { - self.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function(msg) { +common.ArrayStream.prototype.write = function(msg) { if (msg.startsWith('ReferenceError: ')) { referenceErrorCount++; } }; -const putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); const testMe = repl.start('', putIn); // https://github.com/nodejs/node/issues/3346 diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 1cb6e7791d3c2b..6bf7d5059d0116 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -20,23 +20,8 @@ process.on('exit', function() { assert.strictEqual(referenceErrors, expectedReferenceErrors); }); -// A stream to push an array into a REPL -function ArrayStream() { - this.run = function(data) { - var self = this; - data.forEach(function(line) { - self.emit('data', line + '\n'); - }); - }; -} -util.inherits(ArrayStream, require('stream').Stream); -ArrayStream.prototype.readable = true; -ArrayStream.prototype.writable = true; -ArrayStream.prototype.resume = function() {}; -ArrayStream.prototype.write = function() {}; - var works = [['inner.one'], 'inner.o']; -var putIn = new ArrayStream(); +const putIn = new common.ArrayStream(); var testMe = repl.start('', putIn); // Some errors are passed to the domain, but do not callback From b5f8a359c02abaa606039e79838c036f736eb1f3 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 1 Dec 2015 11:27:39 -0500 Subject: [PATCH 114/262] util: determine object types in C++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Determine object types of regular expressions, Dates, Maps, and Sets in the C++ layer instead of depending on toString() behavior in JavaScript. PR-URL: https://github.com/nodejs/node/pull/4100 Reviewed-By: Evan Lucas Reviewed-By: Michaël Zasso Reviewed-By: Ben Noordhuis --- lib/util.js | 9 ++++----- src/node_util.cc | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/lib/util.js b/lib/util.js index 1a2f3f34835899..236adf35b87eab 100644 --- a/lib/util.js +++ b/lib/util.js @@ -6,7 +6,6 @@ const internalUtil = require('internal/util'); const binding = process.binding('util'); const isError = internalUtil.isError; -const objectToString = internalUtil.objectToString; var Debug; @@ -305,7 +304,7 @@ function formatValue(ctx, value, recurseTimes) { braces = ['[', ']']; empty = value.length === 0; formatter = formatArray; - } else if (objectToString(value) === '[object Set]') { + } else if (binding.isSet(value)) { braces = ['{', '}']; // With `showHidden`, `length` will display as a hidden property for // arrays. For consistency's sake, do the same for `size`, even though this @@ -314,7 +313,7 @@ function formatValue(ctx, value, recurseTimes) { keys.unshift('size'); empty = value.size === 0; formatter = formatSet; - } else if (objectToString(value) === '[object Map]') { + } else if (binding.isMap(value)) { braces = ['{', '}']; // Ditto. if (ctx.showHidden) @@ -673,7 +672,7 @@ function isUndefined(arg) { exports.isUndefined = isUndefined; function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; + return binding.isRegExp(re); } exports.isRegExp = isRegExp; @@ -683,7 +682,7 @@ function isObject(arg) { exports.isObject = isObject; function isDate(d) { - return objectToString(d) === '[object Date]'; + return binding.isDate(d); } exports.isDate = isDate; diff --git a/src/node_util.cc b/src/node_util.cc index a520b8d5f354ac..ea800ff339a36f 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -13,12 +13,37 @@ using v8::Object; using v8::String; using v8::Value; + +static void IsRegExp(const FunctionCallbackInfo& args) { + CHECK_EQ(1, args.Length()); + args.GetReturnValue().Set(args[0]->IsRegExp()); +} + + +static void IsDate(const FunctionCallbackInfo& args) { + CHECK_EQ(1, args.Length()); + args.GetReturnValue().Set(args[0]->IsDate()); +} + + +static void IsMap(const FunctionCallbackInfo& args) { + CHECK_EQ(1, args.Length()); + args.GetReturnValue().Set(args[0]->IsMap()); +} + + static void IsMapIterator(const FunctionCallbackInfo& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsMapIterator()); } +static void IsSet(const FunctionCallbackInfo& args) { + CHECK_EQ(1, args.Length()); + args.GetReturnValue().Set(args[0]->IsSet()); +} + + static void IsSetIterator(const FunctionCallbackInfo& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsSetIterator()); @@ -50,7 +75,11 @@ void Initialize(Local target, Local unused, Local context) { Environment* env = Environment::GetCurrent(context); + env->SetMethod(target, "isRegExp", IsRegExp); + env->SetMethod(target, "isDate", IsDate); + env->SetMethod(target, "isMap", IsMap); env->SetMethod(target, "isMapIterator", IsMapIterator); + env->SetMethod(target, "isSet", IsSet); env->SetMethod(target, "isSetIterator", IsSetIterator); env->SetMethod(target, "isPromise", IsPromise); env->SetMethod(target, "getHiddenValue", GetHiddenValue); From 1782577d9401b45717a385607175c66d2578c666 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 2 Dec 2015 11:49:35 -0500 Subject: [PATCH 115/262] src: define Is* util functions with macros The Is* type checking functions in node_util.cc are mostly the same boilerplate. This commit defines them using a macro. Refs: https://github.com/nodejs/node/pull/4100 PR-URL: https://github.com/nodejs/node/pull/4118 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Conflicts: src/node_util.cc --- src/node_util.cc | 66 +++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/src/node_util.cc b/src/node_util.cc index ea800ff339a36f..1e0f214ae4470a 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -14,45 +14,27 @@ using v8::String; using v8::Value; -static void IsRegExp(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsRegExp()); -} - +#define VALUE_METHOD_MAP(V) \ + V(isArrayBuffer, IsArrayBuffer) \ + V(isDataView, IsDataView) \ + V(isDate, IsDate) \ + V(isMap, IsMap) \ + V(isMapIterator, IsMapIterator) \ + V(isPromise, IsPromise) \ + V(isRegExp, IsRegExp) \ + V(isSet, IsSet) \ + V(isSetIterator, IsSetIterator) \ + V(isTypedArray, IsTypedArray) -static void IsDate(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsDate()); -} +#define V(_, ucname) \ + static void ucname(const FunctionCallbackInfo& args) { \ + CHECK_EQ(1, args.Length()); \ + args.GetReturnValue().Set(args[0]->ucname()); \ + } -static void IsMap(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsMap()); -} - - -static void IsMapIterator(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsMapIterator()); -} - - -static void IsSet(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsSet()); -} - - -static void IsSetIterator(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsSetIterator()); -} - -static void IsPromise(const FunctionCallbackInfo& args) { - CHECK_EQ(1, args.Length()); - args.GetReturnValue().Set(args[0]->IsPromise()); -} + VALUE_METHOD_MAP(V) +#undef V static void GetHiddenValue(const FunctionCallbackInfo& args) { @@ -75,13 +57,11 @@ void Initialize(Local target, Local unused, Local context) { Environment* env = Environment::GetCurrent(context); - env->SetMethod(target, "isRegExp", IsRegExp); - env->SetMethod(target, "isDate", IsDate); - env->SetMethod(target, "isMap", IsMap); - env->SetMethod(target, "isMapIterator", IsMapIterator); - env->SetMethod(target, "isSet", IsSet); - env->SetMethod(target, "isSetIterator", IsSetIterator); - env->SetMethod(target, "isPromise", IsPromise); + +#define V(lcname, ucname) env->SetMethod(target, #lcname, ucname); + VALUE_METHOD_MAP(V) +#undef V + env->SetMethod(target, "getHiddenValue", GetHiddenValue); } From 82c9778ab0817d2a4bb76ddfa61fc36a1feddc91 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 9 Dec 2015 21:55:29 +0100 Subject: [PATCH 116/262] repl: fix require('3rdparty') regression Fix module loading of third-party modules in the REPL by inheriting module.paths from the REPL's parent module. Commit ee72ee7 ("module,repl: remove repl require() hack") introduced a regression where require() of modules in node_modules directories no longer worked in the REPL (and fortunately only in the REPL.) It turns out we didn't have test coverage for that but we do now. Fixes: https://github.com/nodejs/node/issues/4208 PR-URL: https://github.com/nodejs/node/pull/4215 Reviewed-By: Roman Reiss --- lib/repl.js | 3 +++ test/fixtures/node_modules/baz/index.js | 2 ++ test/parallel/test-repl-require.js | 33 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 test/parallel/test-repl-require.js diff --git a/lib/repl.js b/lib/repl.js index 80ec4defaf1646..84ac726e1f1671 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -35,6 +35,7 @@ const Module = require('module'); const domain = require('domain'); const debug = util.debuglog('repl'); +const parentModule = module; const replMap = new WeakMap(); try { @@ -512,6 +513,8 @@ REPLServer.prototype.createContext = function() { } const module = new Module(''); + module.paths = Module._resolveLookupPaths('', parentModule)[1]; + const require = internalModule.makeRequireFunction.call(module); context.module = module; context.require = require; diff --git a/test/fixtures/node_modules/baz/index.js b/test/fixtures/node_modules/baz/index.js index 346f068ec52a2b..859ea0924d6fb7 100644 --- a/test/fixtures/node_modules/baz/index.js +++ b/test/fixtures/node_modules/baz/index.js @@ -6,3 +6,5 @@ assert.equal(require('bar'), require('../bar.js')); // this should work, and get the one in ./node_modules/asdf.js assert.equal(require('asdf'), require('./node_modules/asdf.js')); + +module.exports = 'eye catcher'; diff --git a/test/parallel/test-repl-require.js b/test/parallel/test-repl-require.js new file mode 100644 index 00000000000000..e8e5e34190c464 --- /dev/null +++ b/test/parallel/test-repl-require.js @@ -0,0 +1,33 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +process.chdir(common.fixturesDir); +const repl = require('repl'); + +const server = net.createServer(conn => { + repl.start('', conn).on('exit', () => { + conn.destroy(); + server.close(); + }); +}); + +const host = common.localhostIPv4; +const port = common.PORT; +const options = { host, port }; + +var answer = ''; +server.listen(options, function() { + const conn = net.connect(options); + conn.setEncoding('utf8'); + conn.on('data', data => answer += data); + conn.write('require("baz")\n.exit\n'); +}); + +process.on('exit', function() { + assert.strictEqual(false, /Cannot find module/.test(answer)); + assert.strictEqual(false, /Error/.test(answer)); + assert.strictEqual(true, /eye catcher/.test(answer)); +}); From e9959ab99cb7dbb936359ad86eb92426b3cd6f3f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 16:02:12 -0800 Subject: [PATCH 117/262] test: remove unnecessary assignments common.js needs to be loaded in all tests so that there is checking for variable leaks and possibly other things. However, it does not need to be assigned to a variable if nothing in common.js is referred to elsewhere in the test. The main tradeoff for this bit of code churn is that it gets the code base most of the way to being able to enable the no-unused-vars rule in eslint. (The non-tooling benefit is that it lessens cognitive load when reading tests as it is an immediate indication that none of the functions or properties in common.js will be used by the test.) PR-URL: https://github.com/nodejs/node/pull/4563 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- test/internet/test-dns-txt-sigsegv.js | 2 +- test/internet/test-dns.js | 2 +- test/internet/test-http-dns-fail.js | 2 +- test/internet/test-net-connect-timeout.js | 2 +- test/internet/test-net-connect-unref.js | 2 +- test/message/2100bytes.js | 2 +- test/message/core_line_numbers.js | 2 +- test/message/error_exit.js | 2 +- test/message/eval_messages.js | 2 +- test/message/hello_world.js | 2 +- test/message/max_tick_depth.js | 2 +- test/message/nexttick_throw.js | 2 +- test/message/stack_overflow.js | 2 +- test/message/stdin_messages.js | 2 +- test/message/throw_custom_error.js | 2 +- test/message/throw_in_line_with_tabs.js | 2 +- test/message/throw_non_error.js | 2 +- test/message/throw_null.js | 2 +- test/message/throw_undefined.js | 2 +- test/message/timeout_throw.js | 2 +- test/message/undefined_reference_in_new_context.js | 2 +- test/message/vm_display_runtime_error.js | 2 +- test/message/vm_dont_display_syntax_error.js | 2 +- test/parallel/test-async-wrap-throw-no-init.js | 2 +- test/parallel/test-buffer-arraybuffer.js | 2 +- test/parallel/test-buffer-ascii.js | 2 +- test/parallel/test-buffer-bytelength.js | 2 +- test/parallel/test-buffer-concat.js | 2 +- test/parallel/test-buffer-fakes.js | 2 +- test/parallel/test-buffer-indexof.js | 2 +- test/parallel/test-buffer-inheritance.js | 2 +- test/parallel/test-buffer-inspect.js | 2 +- test/parallel/test-buffer-iterator.js | 2 +- test/parallel/test-buffer-slow.js | 2 +- test/parallel/test-child-process-constructor.js | 2 +- test/parallel/test-child-process-detached.js | 2 +- test/parallel/test-child-process-fork-and-spawn.js | 2 +- test/parallel/test-child-process-fork-ref.js | 2 +- test/parallel/test-child-process-fork-ref2.js | 2 +- test/parallel/test-child-process-internal.js | 2 +- test/parallel/test-child-process-set-blocking.js | 2 +- test/parallel/test-child-process-silent.js | 2 +- test/parallel/test-child-process-spawnsync-env.js | 2 +- test/parallel/test-child-process-spawnsync-timeout.js | 2 +- test/parallel/test-child-process-stdin-ipc.js | 2 +- test/parallel/test-child-process-stdio-big-write-end.js | 2 +- test/parallel/test-child-process-validate-stdio.js | 2 +- test/parallel/test-cluster-debug-port.js | 2 +- test/parallel/test-cluster-fork-env.js | 2 +- test/parallel/test-cluster-setup-master-cumulative.js | 2 +- test/parallel/test-cluster-setup-master-emit.js | 2 +- test/parallel/test-cluster-setup-master-multiple.js | 2 +- test/parallel/test-cluster-setup-master.js | 2 +- test/parallel/test-cluster-uncaught-exception.js | 2 +- test/parallel/test-cluster-worker-constructor.js | 2 +- test/parallel/test-cluster-worker-death.js | 2 +- test/parallel/test-cluster-worker-init.js | 2 +- test/parallel/test-console-instance.js | 2 +- test/parallel/test-console-not-call-toString.js | 2 +- test/parallel/test-console.js | 2 +- test/parallel/test-delayed-require.js | 2 +- test/parallel/test-dgram-bind.js | 2 +- test/parallel/test-dgram-bytes-length.js | 2 +- test/parallel/test-dgram-listen-after-bind.js | 2 +- test/parallel/test-dgram-ref.js | 2 +- test/parallel/test-dgram-regress-4496.js | 2 +- test/parallel/test-dgram-send-bad-arguments.js | 2 +- test/parallel/test-dgram-unref.js | 2 +- test/parallel/test-dh-padding.js | 2 +- test/parallel/test-dns-cares-domains.js | 2 +- test/parallel/test-dns-lookup-cb-error.js | 2 +- test/parallel/test-dns-regress-7070.js | 2 +- test/parallel/test-dns.js | 2 +- test/parallel/test-domain-exit-dispose.js | 2 +- test/parallel/test-domain-from-timer.js | 2 +- test/parallel/test-domain-implicit-fs.js | 2 +- test/parallel/test-domain-nested-throw.js | 2 +- test/parallel/test-domain-stack.js | 2 +- test/parallel/test-domain-timers.js | 2 +- .../parallel/test-domain-top-level-error-handler-throw.js | 2 +- test/parallel/test-domain.js | 2 +- test/parallel/test-event-emitter-add-listeners.js | 2 +- test/parallel/test-event-emitter-check-listener-leaks.js | 2 +- test/parallel/test-event-emitter-get-max-listeners.js | 2 +- test/parallel/test-event-emitter-listener-count.js | 2 +- .../parallel/test-event-emitter-listeners-side-effects.js | 2 +- test/parallel/test-event-emitter-listeners.js | 2 +- test/parallel/test-event-emitter-max-listeners.js | 2 +- test/parallel/test-event-emitter-method-names.js | 2 +- test/parallel/test-event-emitter-modify-in-emit.js | 2 +- ...test-event-emitter-no-error-provided-to-error-event.js | 2 +- test/parallel/test-event-emitter-num-args.js | 2 +- test/parallel/test-event-emitter-once.js | 2 +- .../test-event-emitter-set-max-listeners-side-effects.js | 2 +- test/parallel/test-event-emitter-subclass.js | 2 +- test/parallel/test-exception-handler.js | 2 +- test/parallel/test-exception-handler2.js | 2 +- test/parallel/test-exec-max-buffer.js | 2 +- test/parallel/test-fs-exists.js | 2 +- test/parallel/test-fs-make-callback.js | 2 +- test/parallel/test-fs-open-flags.js | 2 +- test/parallel/test-fs-open.js | 2 +- test/parallel/test-fs-read-file-sync-hostname.js | 2 +- test/parallel/test-fs-readfile-zero-byte-liar.js | 2 +- test/parallel/test-fs-stat.js | 2 +- test/parallel/test-fs-sync-fd-leak.js | 2 +- test/parallel/test-fs-write-no-fd.js | 2 +- test/parallel/test-handle-wrap-close-abort.js | 2 +- test/parallel/test-http-agent-false.js | 2 +- test/parallel/test-http-agent-getname.js | 2 +- test/parallel/test-http-client-readable.js | 2 +- test/parallel/test-http-methods.js | 2 +- test/parallel/test-http-parser-bad-ref.js | 2 +- test/parallel/test-http-parser.js | 2 +- ...est-http-url.parse-only-support-http-https-protocol.js | 2 +- test/parallel/test-internal-modules-expose.js | 2 +- test/parallel/test-internal-modules.js | 2 +- test/parallel/test-intl.js | 2 +- test/parallel/test-js-stream-call-properties.js | 2 +- test/parallel/test-memory-usage.js | 2 +- test/parallel/test-microtask-queue-integration-domain.js | 2 +- test/parallel/test-microtask-queue-integration.js | 2 +- test/parallel/test-microtask-queue-run-domain.js | 2 +- .../parallel/test-microtask-queue-run-immediate-domain.js | 2 +- test/parallel/test-microtask-queue-run-immediate.js | 2 +- test/parallel/test-microtask-queue-run.js | 2 +- test/parallel/test-module-loading-error.js | 2 +- test/parallel/test-net-dns-error.js | 2 +- test/parallel/test-net-end-without-connect.js | 2 +- test/parallel/test-net-isip.js | 2 +- test/parallel/test-net-listen-error.js | 2 +- test/parallel/test-net-server-connections.js | 2 +- test/parallel/test-net-server-unref-persistent.js | 2 +- test/parallel/test-next-tick-domain.js | 2 +- test/parallel/test-next-tick-errors.js | 2 +- test/parallel/test-next-tick-intentional-starvation.js | 2 +- test/parallel/test-next-tick-ordering.js | 2 +- test/parallel/test-next-tick-ordering2.js | 2 +- test/parallel/test-next-tick.js | 2 +- test/parallel/test-path-zero-length-strings.js | 2 +- test/parallel/test-pipe-return-val.js | 2 +- test/parallel/test-preload.js | 4 ++-- test/parallel/test-process-before-exit.js | 2 +- test/parallel/test-process-config.js | 2 +- test/parallel/test-process-env.js | 2 +- test/parallel/test-process-exit-code.js | 2 +- test/parallel/test-process-exit.js | 2 +- test/parallel/test-process-getgroups.js | 2 +- test/parallel/test-process-hrtime.js | 2 +- test/parallel/test-process-kill-null.js | 2 +- test/parallel/test-process-kill-pid.js | 2 +- test/parallel/test-process-next-tick.js | 2 +- test/parallel/test-process-raw-debug.js | 2 +- test/parallel/test-process-wrap.js | 2 +- test/parallel/test-punycode.js | 2 +- test/parallel/test-querystring-multichar-separator.js | 2 +- test/parallel/test-querystring.js | 2 +- test/parallel/test-readdouble.js | 2 +- test/parallel/test-readfloat.js | 2 +- test/parallel/test-readint.js | 2 +- test/parallel/test-readuint.js | 2 +- test/parallel/test-ref-unref-return.js | 2 +- test/parallel/test-regress-GH-6235.js | 2 +- test/parallel/test-regress-GH-7511.js | 4 ++-- test/parallel/test-regress-GH-897.js | 2 +- test/parallel/test-repl-envvars.js | 2 +- test/parallel/test-repl-harmony.js | 2 +- test/parallel/test-repl-require-cache.js | 4 ++-- test/parallel/test-repl-setprompt.js | 2 +- test/parallel/test-repl-syntax-error-handling.js | 2 +- test/parallel/test-repl-unexpected-token-recoverable.js | 2 +- test/parallel/test-require-cache.js | 2 +- test/parallel/test-signal-safety.js | 2 +- test/parallel/test-stdin-hang.js | 2 +- test/parallel/test-stdio-readable-writable.js | 2 +- test/parallel/test-stdout-close-unref.js | 2 +- test/parallel/test-stream-big-packet.js | 2 +- test/parallel/test-stream-big-push.js | 2 +- test/parallel/test-stream-duplex.js | 2 +- test/parallel/test-stream-end-paused.js | 2 +- test/parallel/test-stream-ispaused.js | 2 +- test/parallel/test-stream-pipe-after-end.js | 2 +- test/parallel/test-stream-pipe-cleanup.js | 2 +- test/parallel/test-stream-pipe-error-handling.js | 2 +- test/parallel/test-stream-pipe-event.js | 2 +- test/parallel/test-stream-push-order.js | 2 +- test/parallel/test-stream-push-strings.js | 2 +- .../test-stream-readable-constructor-set-methods.js | 2 +- test/parallel/test-stream-readable-event.js | 2 +- test/parallel/test-stream-readable-flow-recursion.js | 2 +- .../test-stream-transform-constructor-set-methods.js | 2 +- .../test-stream-transform-objectmode-falsey-value.js | 2 +- test/parallel/test-stream-transform-split-objectmode.js | 2 +- test/parallel/test-stream-unshift-empty-chunk.js | 2 +- test/parallel/test-stream-unshift-read-race.js | 2 +- test/parallel/test-stream-wrap.js | 2 +- .../test-stream-writable-change-default-encoding.js | 2 +- .../test-stream-writable-constructor-set-methods.js | 2 +- test/parallel/test-stream-writable-decoded-encoding.js | 2 +- test/parallel/test-stream-writev.js | 2 +- test/parallel/test-stream2-base64-single-char-read-end.js | 2 +- test/parallel/test-stream2-compatibility.js | 2 +- test/parallel/test-stream2-finish-pipe.js | 2 +- test/parallel/test-stream2-large-read-stall.js | 2 +- test/parallel/test-stream2-objects.js | 2 +- test/parallel/test-stream2-pipe-error-handling.js | 2 +- test/parallel/test-stream2-pipe-error-once-listener.js | 2 +- test/parallel/test-stream2-push.js | 2 +- test/parallel/test-stream2-read-sync-stack.js | 2 +- .../parallel/test-stream2-readable-empty-buffer-no-eof.js | 2 +- test/parallel/test-stream2-readable-from-list.js | 2 +- test/parallel/test-stream2-readable-legacy-drain.js | 2 +- test/parallel/test-stream2-readable-non-empty-end.js | 2 +- test/parallel/test-stream2-readable-wrap-empty.js | 2 +- test/parallel/test-stream2-readable-wrap.js | 2 +- test/parallel/test-stream2-set-encoding.js | 2 +- test/parallel/test-stream2-transform.js | 2 +- test/parallel/test-stream2-unpipe-leak.js | 2 +- test/parallel/test-stream2-writable.js | 2 +- test/parallel/test-stream3-pause-then-read.js | 2 +- test/parallel/test-string-decoder.js | 2 +- test/parallel/test-stringbytes-external.js | 2 +- test/parallel/test-timers-active.js | 2 +- test/parallel/test-timers-args.js | 2 +- test/parallel/test-timers-immediate-queue.js | 2 +- test/parallel/test-timers-immediate.js | 2 +- test/parallel/test-timers-linked-list.js | 7 +++---- test/parallel/test-timers-now.js | 2 +- test/parallel/test-timers-ordering.js | 2 +- test/parallel/test-timers-uncaught-exception.js | 2 +- test/parallel/test-timers-unref-active.js | 2 +- test/parallel/test-timers-unref-call.js | 2 +- ...mers-unref-remove-other-unref-timers-only-one-fires.js | 2 +- test/parallel/test-timers-unref.js | 2 +- test/parallel/test-timers-zero-timeout.js | 2 +- test/parallel/test-timers.js | 2 +- test/parallel/test-tls-parse-cert-string.js | 2 +- test/parallel/test-tty-stdout-end.js | 2 +- test/parallel/test-tty-wrap.js | 2 +- test/parallel/test-url.js | 2 +- test/parallel/test-utf8-scripts.js | 2 +- test/parallel/test-util-format.js | 2 +- test/parallel/test-util-inspect.js | 2 +- test/parallel/test-util.js | 2 +- test/parallel/test-v8-flag-type-check.js | 2 +- test/parallel/test-v8-flags.js | 2 +- test/parallel/test-v8-stats.js | 2 +- test/parallel/test-vm-basic.js | 2 +- test/parallel/test-vm-context-async-script.js | 2 +- test/parallel/test-vm-context-property-forwarding.js | 2 +- test/parallel/test-vm-context.js | 2 +- test/parallel/test-vm-create-and-run-in-context.js | 2 +- test/parallel/test-vm-create-context-accessors.js | 2 +- test/parallel/test-vm-create-context-arg.js | 2 +- .../parallel/test-vm-create-context-circular-reference.js | 2 +- test/parallel/test-vm-cross-context.js | 2 +- test/parallel/test-vm-function-declaration.js | 2 +- test/parallel/test-vm-global-define-property.js | 2 +- test/parallel/test-vm-global-identity.js | 2 +- test/parallel/test-vm-harmony-proxies.js | 2 +- test/parallel/test-vm-harmony-symbols.js | 2 +- test/parallel/test-vm-is-context.js | 2 +- test/parallel/test-vm-preserves-property.js | 2 +- test/parallel/test-vm-symbols.js | 2 +- test/parallel/test-vm-syntax-error-message.js | 2 +- test/parallel/test-vm-timeout.js | 2 +- test/parallel/test-writedouble.js | 2 +- test/parallel/test-writefloat.js | 2 +- test/parallel/test-writeint.js | 2 +- test/parallel/test-writeuint.js | 2 +- test/parallel/test-zlib-close-after-write.js | 2 +- test/parallel/test-zlib-const.js | 2 +- test/parallel/test-zlib-convenience-methods.js | 2 +- test/parallel/test-zlib-dictionary.js | 8 ++++---- test/parallel/test-zlib-flush-drain.js | 2 +- test/parallel/test-zlib-from-string.js | 2 +- test/parallel/test-zlib-invalid-input.js | 4 ++-- test/parallel/test-zlib-write-after-close.js | 2 +- test/parallel/test-zlib-write-after-flush.js | 2 +- test/parallel/test-zlib-zero-byte.js | 2 +- test/pummel/test-dtrace-jsstack.js | 2 +- test/pummel/test-next-tick-infinite-calls.js | 2 +- test/pummel/test-process-hrtime.js | 2 +- test/pummel/test-process-uptime.js | 2 +- test/pummel/test-stream-pipe-multi.js | 2 +- test/pummel/test-stream2-basic.js | 2 +- test/pummel/test-timer-wrap.js | 2 +- test/pummel/test-timer-wrap2.js | 2 +- test/pummel/test-timers.js | 2 +- test/pummel/test-vm-memleak.js | 2 +- test/sequential/test-debug-args.js | 2 +- test/sequential/test-deprecation-flags.js | 2 +- test/sequential/test-memory-usage-emfile.js | 2 +- test/sequential/test-net-listen-exclusive-random-ports.js | 2 +- test/sequential/test-regress-GH-1726.js | 2 +- test/sequential/test-regress-GH-819.js | 2 +- test/sequential/test-setproctitle.js | 2 +- test/sequential/test-sigint-infinite-loop.js | 2 +- test/sequential/test-stdin-child-proc.js | 2 +- test/sequential/test-stdin-pipe-resume.js | 2 +- test/sequential/test-stdin-script-child.js | 2 +- .../test-stdout-cannot-be-closed-child-process-pipe.js | 2 +- test/sequential/test-stdout-stderr-reading.js | 2 +- test/sequential/test-stream2-stderr-sync.js | 2 +- test/sequential/test-sync-fileread.js | 2 +- test/sequential/test-util-debug.js | 2 +- test/timers/test-timers-reliability.js | 2 +- 307 files changed, 316 insertions(+), 317 deletions(-) diff --git a/test/internet/test-dns-txt-sigsegv.js b/test/internet/test-dns-txt-sigsegv.js index eba5c66c464981..4c2f12f7a97c28 100644 --- a/test/internet/test-dns-txt-sigsegv.js +++ b/test/internet/test-dns-txt-sigsegv.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index 2a423f97dee7b0..5c89021c030b19 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'), dns = require('dns'), net = require('net'), diff --git a/test/internet/test-http-dns-fail.js b/test/internet/test-http-dns-fail.js index 151597de14cb0e..7e2f8cd402d658 100644 --- a/test/internet/test-http-dns-fail.js +++ b/test/internet/test-http-dns-fail.js @@ -4,7 +4,7 @@ * should trigger the error event after each attempt. */ -var common = require('../common'); +require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index b92d234852967e..fd78a2936bd88b 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -3,7 +3,7 @@ // https://groups.google.com/forum/#!topic/nodejs/UE0ZbfLt6t8 // https://groups.google.com/forum/#!topic/nodejs-dev/jR7-5UDqXkw -var common = require('../common'); +require('../common'); var net = require('net'); var assert = require('assert'); diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index a712490d31f566..ad24683b34d49e 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js index b05f5e9e1d7168..930b706f977671 100644 --- a/test/message/2100bytes.js +++ b/test/message/2100bytes.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/message/core_line_numbers.js b/test/message/core_line_numbers.js index ab86eb1e38f7f4..221001ed8952d0 100644 --- a/test/message/core_line_numbers.js +++ b/test/message/core_line_numbers.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const punycode = require('punycode'); // This test verifies that line numbers in core modules are reported correctly. diff --git a/test/message/error_exit.js b/test/message/error_exit.js index 7805fd21935377..18d9dfb4ee998c 100644 --- a/test/message/error_exit.js +++ b/test/message/error_exit.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); process.on('exit', function(code) { diff --git a/test/message/eval_messages.js b/test/message/eval_messages.js index 0b17bf5f97ae52..7d3444c236b68e 100644 --- a/test/message/eval_messages.js +++ b/test/message/eval_messages.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/message/hello_world.js b/test/message/hello_world.js index 1e6b030393c6cf..dfcba71bdd4334 100644 --- a/test/message/hello_world.js +++ b/test/message/hello_world.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); console.log('hello world'); diff --git a/test/message/max_tick_depth.js b/test/message/max_tick_depth.js index cacd795810605a..1d2ec175c5d957 100644 --- a/test/message/max_tick_depth.js +++ b/test/message/max_tick_depth.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); process.maxTickDepth = 10; var i = 20; diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index 3c0e2d8e379fd9..474531a0160875 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); process.nextTick(function() { diff --git a/test/message/stack_overflow.js b/test/message/stack_overflow.js index 7d1033c3ab2b1a..edcbe3b2d6fa28 100644 --- a/test/message/stack_overflow.js +++ b/test/message/stack_overflow.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); Error.stackTraceLimit = 0; diff --git a/test/message/stdin_messages.js b/test/message/stdin_messages.js index e99c08553a916d..4f87626f63cee6 100644 --- a/test/message/stdin_messages.js +++ b/test/message/stdin_messages.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/message/throw_custom_error.js b/test/message/throw_custom_error.js index bb5dae05a9b03a..9466ed9e8b4747 100644 --- a/test/message/throw_custom_error.js +++ b/test/message/throw_custom_error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // custom error throwing diff --git a/test/message/throw_in_line_with_tabs.js b/test/message/throw_in_line_with_tabs.js index 50c69ca681019d..54dcd9f3a64c3b 100644 --- a/test/message/throw_in_line_with_tabs.js +++ b/test/message/throw_in_line_with_tabs.js @@ -1,6 +1,6 @@ /* eslint-disable indent */ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); console.error('before'); diff --git a/test/message/throw_non_error.js b/test/message/throw_non_error.js index a1046b725e93a4..2fb82ee053d55a 100644 --- a/test/message/throw_non_error.js +++ b/test/message/throw_non_error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // custom error throwing diff --git a/test/message/throw_null.js b/test/message/throw_null.js index ab8fb565a61e54..c252fba1ecfbb6 100644 --- a/test/message/throw_null.js +++ b/test/message/throw_null.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); throw null; diff --git a/test/message/throw_undefined.js b/test/message/throw_undefined.js index f855cdd2f7dabd..da2ae18c444d82 100644 --- a/test/message/throw_undefined.js +++ b/test/message/throw_undefined.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); throw undefined; diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index aaf3fbc8d2f48f..648f874b7e15c4 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); setTimeout(function() { diff --git a/test/message/undefined_reference_in_new_context.js b/test/message/undefined_reference_in_new_context.js index 7256c0d8e36088..4230ce6529336c 100644 --- a/test/message/undefined_reference_in_new_context.js +++ b/test/message/undefined_reference_in_new_context.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/message/vm_display_runtime_error.js b/test/message/vm_display_runtime_error.js index d01ab0b540b3cb..3525ab4d03073f 100644 --- a/test/message/vm_display_runtime_error.js +++ b/test/message/vm_display_runtime_error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/message/vm_dont_display_syntax_error.js b/test/message/vm_dont_display_syntax_error.js index 42b1ab14cba76f..bff23e533dcfed 100644 --- a/test/message/vm_dont_display_syntax_error.js +++ b/test/message/vm_dont_display_syntax_error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-async-wrap-throw-no-init.js b/test/parallel/test-async-wrap-throw-no-init.js index b2f60f3215e850..768e38e8eff389 100644 --- a/test/parallel/test-async-wrap-throw-no-init.js +++ b/test/parallel/test-async-wrap-throw-no-init.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const async_wrap = process.binding('async_wrap'); diff --git a/test/parallel/test-buffer-arraybuffer.js b/test/parallel/test-buffer-arraybuffer.js index c25de262ea9779..522d97ece196c1 100644 --- a/test/parallel/test-buffer-arraybuffer.js +++ b/test/parallel/test-buffer-arraybuffer.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-buffer-ascii.js b/test/parallel/test-buffer-ascii.js index efc3a72c662595..94ba85a22761dd 100644 --- a/test/parallel/test-buffer-ascii.js +++ b/test/parallel/test-buffer-ascii.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // ASCII conversion in node.js simply masks off the high bits, diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js index c136c62808e8fc..91f18afcb3f5c3 100644 --- a/test/parallel/test-buffer-bytelength.js +++ b/test/parallel/test-buffer-bytelength.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js index 8d0c0eebbd14e6..07f763a76dc419 100644 --- a/test/parallel/test-buffer-concat.js +++ b/test/parallel/test-buffer-concat.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var zero = []; diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index d473d16e92159f..5804cbba303408 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const Buffer = require('buffer').Buffer; const Bp = Buffer.prototype; diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js index d358749f8efc01..aac5b18f718cb3 100644 --- a/test/parallel/test-buffer-indexof.js +++ b/test/parallel/test-buffer-indexof.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-buffer-inheritance.js b/test/parallel/test-buffer-inheritance.js index eb2f4a531d0b38..ea61e50bf5f04a 100644 --- a/test/parallel/test-buffer-inheritance.js +++ b/test/parallel/test-buffer-inheritance.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-buffer-inspect.js b/test/parallel/test-buffer-inspect.js index 35da378631aee8..6d44389de735a2 100644 --- a/test/parallel/test-buffer-inspect.js +++ b/test/parallel/test-buffer-inspect.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-buffer-iterator.js b/test/parallel/test-buffer-iterator.js index 05371d6d793fed..ad135a9113627d 100644 --- a/test/parallel/test-buffer-iterator.js +++ b/test/parallel/test-buffer-iterator.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var buffer = new Buffer([1, 2, 3, 4, 5]); diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index d7b4f486e21422..cf1a3fd8eb200d 100644 --- a/test/parallel/test-buffer-slow.js +++ b/test/parallel/test-buffer-slow.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const buffer = require('buffer'); const Buffer = buffer.Buffer; diff --git a/test/parallel/test-child-process-constructor.js b/test/parallel/test-child-process-constructor.js index 89db9cf81fddc7..6980810485c964 100644 --- a/test/parallel/test-child-process-constructor.js +++ b/test/parallel/test-child-process-constructor.js @@ -1,7 +1,7 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var child_process = require('child_process'); var ChildProcess = child_process.ChildProcess; assert.equal(typeof ChildProcess, 'function'); diff --git a/test/parallel/test-child-process-detached.js b/test/parallel/test-child-process-detached.js index 25b811a8caa991..711c5d227d6b07 100644 --- a/test/parallel/test-child-process-detached.js +++ b/test/parallel/test-child-process-detached.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var path = require('path'); diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index d5255bf83ca8e0..5766dc865bc975 100644 --- a/test/parallel/test-child-process-fork-and-spawn.js +++ b/test/parallel/test-child-process-fork-and-spawn.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; var fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-fork-ref.js b/test/parallel/test-child-process-fork-ref.js index b4066641bae970..de34f3eb8ae9c3 100644 --- a/test/parallel/test-child-process-fork-ref.js +++ b/test/parallel/test-child-process-fork-ref.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-fork-ref2.js b/test/parallel/test-child-process-fork-ref2.js index 8bc7e4c35541b2..b7addea8f9c77d 100644 --- a/test/parallel/test-child-process-fork-ref2.js +++ b/test/parallel/test-child-process-fork-ref2.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-internal.js b/test/parallel/test-child-process-internal.js index c39dc93293aa8b..03ea340236ad34 100644 --- a/test/parallel/test-child-process-internal.js +++ b/test/parallel/test-child-process-internal.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); //messages diff --git a/test/parallel/test-child-process-set-blocking.js b/test/parallel/test-child-process-set-blocking.js index 3f09388265b89a..6cdfbbc9a24c71 100644 --- a/test/parallel/test-child-process-set-blocking.js +++ b/test/parallel/test-child-process-set-blocking.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var ch = require('child_process'); diff --git a/test/parallel/test-child-process-silent.js b/test/parallel/test-child-process-silent.js index 3714d3758d0f22..c3705ab2a4d7e0 100644 --- a/test/parallel/test-child-process-silent.js +++ b/test/parallel/test-child-process-silent.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var childProcess = require('child_process'); diff --git a/test/parallel/test-child-process-spawnsync-env.js b/test/parallel/test-child-process-spawnsync-env.js index 646097f9454c5c..4455b867e30108 100644 --- a/test/parallel/test-child-process-spawnsync-env.js +++ b/test/parallel/test-child-process-spawnsync-env.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cp = require('child_process'); diff --git a/test/parallel/test-child-process-spawnsync-timeout.js b/test/parallel/test-child-process-spawnsync-timeout.js index 34c69a1fc597d2..122a65825949df 100644 --- a/test/parallel/test-child-process-spawnsync-timeout.js +++ b/test/parallel/test-child-process-spawnsync-timeout.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawnSync = require('child_process').spawnSync; diff --git a/test/parallel/test-child-process-stdin-ipc.js b/test/parallel/test-child-process-stdin-ipc.js index d2347849dd5b9b..79e60f333b9d6b 100644 --- a/test/parallel/test-child-process-stdin-ipc.js +++ b/test/parallel/test-child-process-stdin-ipc.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-child-process-stdio-big-write-end.js b/test/parallel/test-child-process-stdio-big-write-end.js index 5ae85acc54d9dd..bc414938b581e3 100644 --- a/test/parallel/test-child-process-stdio-big-write-end.js +++ b/test/parallel/test-child-process-stdio-big-write-end.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var BUFSIZE = 1024; diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js index 289323002da4bd..0a12e4f54c5306 100644 --- a/test/parallel/test-child-process-validate-stdio.js +++ b/test/parallel/test-child-process-validate-stdio.js @@ -1,8 +1,8 @@ 'use strict'; // Flags: --expose_internals +require('../common'); var assert = require('assert'); -var common = require('../common'); var _validateStdio = require('internal/child_process')._validateStdio; // should throw if string and not ignore, pipe, or inherit diff --git a/test/parallel/test-cluster-debug-port.js b/test/parallel/test-cluster-debug-port.js index 1a42850e9b2bc1..076a59108b09de 100644 --- a/test/parallel/test-cluster-debug-port.js +++ b/test/parallel/test-cluster-debug-port.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const cluster = require('cluster'); diff --git a/test/parallel/test-cluster-fork-env.js b/test/parallel/test-cluster-fork-env.js index 7749e42f608c60..fb58daee0cffdb 100644 --- a/test/parallel/test-cluster-fork-env.js +++ b/test/parallel/test-cluster-fork-env.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-cumulative.js b/test/parallel/test-cluster-setup-master-cumulative.js index 0376546d286b51..f0f98fbdbfb3a6 100644 --- a/test/parallel/test-cluster-setup-master-cumulative.js +++ b/test/parallel/test-cluster-setup-master-cumulative.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-emit.js b/test/parallel/test-cluster-setup-master-emit.js index 8b463ec97bff45..ad15c084c5924d 100644 --- a/test/parallel/test-cluster-setup-master-emit.js +++ b/test/parallel/test-cluster-setup-master-emit.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index 8ee6d091cd524a..5ceff2bddfaf9d 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-setup-master.js b/test/parallel/test-cluster-setup-master.js index c32b3ea6d3b18b..561371afb027a3 100644 --- a/test/parallel/test-cluster-setup-master.js +++ b/test/parallel/test-cluster-setup-master.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-uncaught-exception.js b/test/parallel/test-cluster-uncaught-exception.js index ec42773ef55856..04eac2e8ce63d4 100644 --- a/test/parallel/test-cluster-uncaught-exception.js +++ b/test/parallel/test-cluster-uncaught-exception.js @@ -3,7 +3,7 @@ // one that the cluster module installs. // https://github.com/joyent/node/issues/2556 -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); var fork = require('child_process').fork; diff --git a/test/parallel/test-cluster-worker-constructor.js b/test/parallel/test-cluster-worker-constructor.js index e29dc01561903d..2a96d24a8a3459 100644 --- a/test/parallel/test-cluster-worker-constructor.js +++ b/test/parallel/test-cluster-worker-constructor.js @@ -2,7 +2,7 @@ // test-cluster-worker-constructor.js // validates correct behavior of the cluster.Worker constructor -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); var worker; diff --git a/test/parallel/test-cluster-worker-death.js b/test/parallel/test-cluster-worker-death.js index 88a0f887cc2cab..65da9865b0dd2d 100644 --- a/test/parallel/test-cluster-worker-death.js +++ b/test/parallel/test-cluster-worker-death.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); diff --git a/test/parallel/test-cluster-worker-init.js b/test/parallel/test-cluster-worker-init.js index 38886af5279a6d..41f73e1255a7c5 100644 --- a/test/parallel/test-cluster-worker-init.js +++ b/test/parallel/test-cluster-worker-init.js @@ -3,7 +3,7 @@ // verifies that, when a child process is forked, the cluster.worker // object can receive messages as expected -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); var msg = 'foo'; diff --git a/test/parallel/test-console-instance.js b/test/parallel/test-console-instance.js index a80c6e57e4b151..1ab038df48e432 100644 --- a/test/parallel/test-console-instance.js +++ b/test/parallel/test-console-instance.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Stream = require('stream'); var Console = require('console').Console; diff --git a/test/parallel/test-console-not-call-toString.js b/test/parallel/test-console-not-call-toString.js index 7846dbf2778b9c..f152e33e98f087 100644 --- a/test/parallel/test-console-not-call-toString.js +++ b/test/parallel/test-console-not-call-toString.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var func = function() {}; diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index 982c83851f072a..b906d837562ef9 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); assert.ok(process.stdout.writable); diff --git a/test/parallel/test-delayed-require.js b/test/parallel/test-delayed-require.js index 5fa82f236c1dd9..7376e70ba780e2 100644 --- a/test/parallel/test-delayed-require.js +++ b/test/parallel/test-delayed-require.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var a; diff --git a/test/parallel/test-dgram-bind.js b/test/parallel/test-dgram-bind.js index 6d35534cb5eb56..0bca97fb294f79 100644 --- a/test/parallel/test-dgram-bind.js +++ b/test/parallel/test-dgram-bind.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-bytes-length.js b/test/parallel/test-dgram-bytes-length.js index 9f8c39eb04daaf..c68b2fab70aff5 100644 --- a/test/parallel/test-dgram-bytes-length.js +++ b/test/parallel/test-dgram-bytes-length.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-listen-after-bind.js b/test/parallel/test-dgram-listen-after-bind.js index 2aac7ae9cf7588..498a17a0e5b053 100644 --- a/test/parallel/test-dgram-listen-after-bind.js +++ b/test/parallel/test-dgram-listen-after-bind.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-ref.js b/test/parallel/test-dgram-ref.js index d689a45e36dfa2..6505ce9b1ec886 100644 --- a/test/parallel/test-dgram-ref.js +++ b/test/parallel/test-dgram-ref.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var dgram = require('dgram'); // should not hang, see #1282 diff --git a/test/parallel/test-dgram-regress-4496.js b/test/parallel/test-dgram-regress-4496.js index fcb8d026bc547e..4bdd0d6520d7dc 100644 --- a/test/parallel/test-dgram-regress-4496.js +++ b/test/parallel/test-dgram-regress-4496.js @@ -1,7 +1,7 @@ 'use strict'; // Remove this test once we support sending strings. -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-send-bad-arguments.js b/test/parallel/test-dgram-send-bad-arguments.js index ccd10e00555384..ddaa162c8bff10 100644 --- a/test/parallel/test-dgram-send-bad-arguments.js +++ b/test/parallel/test-dgram-send-bad-arguments.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dgram-unref.js b/test/parallel/test-dgram-unref.js index 2add3d28c49760..083dab6d29589c 100644 --- a/test/parallel/test-dgram-unref.js +++ b/test/parallel/test-dgram-unref.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dgram = require('dgram'); diff --git a/test/parallel/test-dh-padding.js b/test/parallel/test-dh-padding.js index cdb1fc75f94215..7d482b78f63a7c 100644 --- a/test/parallel/test-dh-padding.js +++ b/test/parallel/test-dh-padding.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); try { diff --git a/test/parallel/test-dns-cares-domains.js b/test/parallel/test-dns-cares-domains.js index cb651c5f5afb86..a1aa18a10f88ec 100644 --- a/test/parallel/test-dns-cares-domains.js +++ b/test/parallel/test-dns-cares-domains.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dns = require('dns'); var domain = require('domain'); diff --git a/test/parallel/test-dns-lookup-cb-error.js b/test/parallel/test-dns-lookup-cb-error.js index 330dfb5d57092a..4a3dd2694121f8 100644 --- a/test/parallel/test-dns-lookup-cb-error.js +++ b/test/parallel/test-dns-lookup-cb-error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cares = process.binding('cares_wrap'); diff --git a/test/parallel/test-dns-regress-7070.js b/test/parallel/test-dns-regress-7070.js index 1fbd7f07a9d520..e696327d4d5f66 100644 --- a/test/parallel/test-dns-regress-7070.js +++ b/test/parallel/test-dns-regress-7070.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index abc7edbf598097..3362e8c534eaab 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var dns = require('dns'); diff --git a/test/parallel/test-domain-exit-dispose.js b/test/parallel/test-domain-exit-dispose.js index 90e7210ce21aea..2bddb01cbd8ca5 100644 --- a/test/parallel/test-domain-exit-dispose.js +++ b/test/parallel/test-domain-exit-dispose.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); var disposalFailed = false; diff --git a/test/parallel/test-domain-from-timer.js b/test/parallel/test-domain-from-timer.js index 93661b419b0bbf..f0115018ec1879 100644 --- a/test/parallel/test-domain-from-timer.js +++ b/test/parallel/test-domain-from-timer.js @@ -1,7 +1,7 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); +require('../common'); var assert = require('assert'); // timeouts call the callback directly from cc, so need to make sure the diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index fd21dcafe0858f..f35647b525c5c7 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -1,7 +1,7 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); var events = require('events'); diff --git a/test/parallel/test-domain-nested-throw.js b/test/parallel/test-domain-nested-throw.js index 0fba3001b543fb..69a80b7ab104d0 100644 --- a/test/parallel/test-domain-nested-throw.js +++ b/test/parallel/test-domain-nested-throw.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); diff --git a/test/parallel/test-domain-stack.js b/test/parallel/test-domain-stack.js index f9b5648a6619a7..6f4d03ca5a5e1f 100644 --- a/test/parallel/test-domain-stack.js +++ b/test/parallel/test-domain-stack.js @@ -1,7 +1,7 @@ 'use strict'; // Make sure that the domain stack doesn't get out of hand. -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); var events = require('events'); diff --git a/test/parallel/test-domain-timers.js b/test/parallel/test-domain-timers.js index 7530c9edba40b1..a97b300da02d31 100644 --- a/test/parallel/test-domain-timers.js +++ b/test/parallel/test-domain-timers.js @@ -1,7 +1,7 @@ 'use strict'; +require('../common'); var domain = require('domain'); var assert = require('assert'); -var common = require('../common'); var timeout_err, timeout, immediate_err; diff --git a/test/parallel/test-domain-top-level-error-handler-throw.js b/test/parallel/test-domain-top-level-error-handler-throw.js index 8f63c94295a845..4bde30d17cb8c8 100644 --- a/test/parallel/test-domain-top-level-error-handler-throw.js +++ b/test/parallel/test-domain-top-level-error-handler-throw.js @@ -7,7 +7,7 @@ * top-level error handler, not the one from the previous error. */ -const common = require('../common'); +require('../common'); const domainErrHandlerExMessage = 'exception from domain error handler'; const internalExMessage = 'You should NOT see me'; diff --git a/test/parallel/test-domain.js b/test/parallel/test-domain.js index 918e3288e8dc91..bef5e942e057a1 100644 --- a/test/parallel/test-domain.js +++ b/test/parallel/test-domain.js @@ -1,7 +1,7 @@ 'use strict'; // Simple tests of most basic domain functionality. -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-add-listeners.js b/test/parallel/test-event-emitter-add-listeners.js index cc30fd24add340..82acd65c585880 100644 --- a/test/parallel/test-event-emitter-add-listeners.js +++ b/test/parallel/test-event-emitter-add-listeners.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-check-listener-leaks.js b/test/parallel/test-event-emitter-check-listener-leaks.js index 90f686b5422c43..3c8260e787470a 100644 --- a/test/parallel/test-event-emitter-check-listener-leaks.js +++ b/test/parallel/test-event-emitter-check-listener-leaks.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-get-max-listeners.js b/test/parallel/test-event-emitter-get-max-listeners.js index 43a14db0cca362..34ffee3600e5e9 100644 --- a/test/parallel/test-event-emitter-get-max-listeners.js +++ b/test/parallel/test-event-emitter-get-max-listeners.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var EventEmitter = require('events'); diff --git a/test/parallel/test-event-emitter-listener-count.js b/test/parallel/test-event-emitter-listener-count.js index c5b75c819d17f9..ebfed8b2ee33b1 100644 --- a/test/parallel/test-event-emitter-listener-count.js +++ b/test/parallel/test-event-emitter-listener-count.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const EventEmitter = require('events'); diff --git a/test/parallel/test-event-emitter-listeners-side-effects.js b/test/parallel/test-event-emitter-listeners-side-effects.js index 23076128eddfc1..8f40d88f34486e 100644 --- a/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-listeners-side-effects.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-listeners.js b/test/parallel/test-event-emitter-listeners.js index 48a60609e7be88..77c44907b62d8c 100644 --- a/test/parallel/test-event-emitter-listeners.js +++ b/test/parallel/test-event-emitter-listeners.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-max-listeners.js b/test/parallel/test-event-emitter-max-listeners.js index 5e754698d0a018..7d80c7a32fe0c4 100644 --- a/test/parallel/test-event-emitter-max-listeners.js +++ b/test/parallel/test-event-emitter-max-listeners.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-method-names.js b/test/parallel/test-event-emitter-method-names.js index a260aa779855aa..c1e6540f0184af 100644 --- a/test/parallel/test-event-emitter-method-names.js +++ b/test/parallel/test-event-emitter-method-names.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-modify-in-emit.js b/test/parallel/test-event-emitter-modify-in-emit.js index 85845cc4443b32..cd1849201dfe47 100644 --- a/test/parallel/test-event-emitter-modify-in-emit.js +++ b/test/parallel/test-event-emitter-modify-in-emit.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js index e85361475f894e..918ba195d4be18 100644 --- a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js +++ b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); var domain = require('domain'); diff --git a/test/parallel/test-event-emitter-num-args.js b/test/parallel/test-event-emitter-num-args.js index 6c403cd2f294ae..51f57e89bc6e22 100644 --- a/test/parallel/test-event-emitter-num-args.js +++ b/test/parallel/test-event-emitter-num-args.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-once.js b/test/parallel/test-event-emitter-once.js index 1085e7942a59bf..d007ef663fdede 100644 --- a/test/parallel/test-event-emitter-once.js +++ b/test/parallel/test-event-emitter-once.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js index f09f130ab489ed..11cfab0bb876c6 100644 --- a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var events = require('events'); diff --git a/test/parallel/test-event-emitter-subclass.js b/test/parallel/test-event-emitter-subclass.js index fe915be34efc2b..02309241514683 100644 --- a/test/parallel/test-event-emitter-subclass.js +++ b/test/parallel/test-event-emitter-subclass.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var EventEmitter = require('events').EventEmitter; var util = require('util'); diff --git a/test/parallel/test-exception-handler.js b/test/parallel/test-exception-handler.js index 9cc8106ea6f80a..735daa51070014 100644 --- a/test/parallel/test-exception-handler.js +++ b/test/parallel/test-exception-handler.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var MESSAGE = 'catch me if you can'; diff --git a/test/parallel/test-exception-handler2.js b/test/parallel/test-exception-handler2.js index 58e84ad21ba4ee..3ed2c9520461f8 100644 --- a/test/parallel/test-exception-handler2.js +++ b/test/parallel/test-exception-handler2.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); process.on('uncaughtException', function(err) { diff --git a/test/parallel/test-exec-max-buffer.js b/test/parallel/test-exec-max-buffer.js index 5cae35b69f95d5..15c6e7025978e2 100644 --- a/test/parallel/test-exec-max-buffer.js +++ b/test/parallel/test-exec-max-buffer.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var exec = require('child_process').exec; var assert = require('assert'); diff --git a/test/parallel/test-fs-exists.js b/test/parallel/test-fs-exists.js index fcbd729a5ed850..3474fc4cb9ff2b 100644 --- a/test/parallel/test-fs-exists.js +++ b/test/parallel/test-fs-exists.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); var f = __filename; diff --git a/test/parallel/test-fs-make-callback.js b/test/parallel/test-fs-make-callback.js index a15a16404df003..4fbe64437eaff0 100644 --- a/test/parallel/test-fs-make-callback.js +++ b/test/parallel/test-fs-make-callback.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index c7d53117d587fc..b53a823603d0fc 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var constants = require('constants'); diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index 59b605841b4440..0a069b9a0bafda 100644 --- a/test/parallel/test-fs-open.js +++ b/test/parallel/test-fs-open.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var constants = require('constants'); -var common = require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-read-file-sync-hostname.js b/test/parallel/test-fs-read-file-sync-hostname.js index c5c5264c0dde3b..de105737969865 100644 --- a/test/parallel/test-fs-read-file-sync-hostname.js +++ b/test/parallel/test-fs-read-file-sync-hostname.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-readfile-zero-byte-liar.js b/test/parallel/test-fs-readfile-zero-byte-liar.js index 2c9c6e3db9a584..a81b055494d3d2 100644 --- a/test/parallel/test-fs-readfile-zero-byte-liar.js +++ b/test/parallel/test-fs-readfile-zero-byte-liar.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index 123d6608b4bb4f..1affdec6260c0d 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -1,5 +1,5 @@ /* eslint-disable strict */ -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); var got_error = false; diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 5f2b63125a1d0f..f7cfd25f4b9b4c 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-write-no-fd.js b/test/parallel/test-fs-write-no-fd.js index 5b38ce6ba814c4..eb0ed5caeb6612 100644 --- a/test/parallel/test-fs-write-no-fd.js +++ b/test/parallel/test-fs-write-no-fd.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const fs = require('fs'); const assert = require('assert'); diff --git a/test/parallel/test-handle-wrap-close-abort.js b/test/parallel/test-handle-wrap-close-abort.js index 8e2388fa84d809..8572668f666864 100644 --- a/test/parallel/test-handle-wrap-close-abort.js +++ b/test/parallel/test-handle-wrap-close-abort.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); process.on('uncaughtException', function() { }); diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index ad8de89f2038e9..96606028bf7a45 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-agent-getname.js b/test/parallel/test-http-agent-getname.js index d8d30a8ddbc25c..1b80b5c36e1e64 100644 --- a/test/parallel/test-http-agent-getname.js +++ b/test/parallel/test-http-agent-getname.js @@ -1,8 +1,8 @@ 'use strict'; +require('../common'); var assert = require('assert'); var http = require('http'); -var common = require('../common'); var agent = new http.Agent(); diff --git a/test/parallel/test-http-client-readable.js b/test/parallel/test-http-client-readable.js index ba9fdd658c3864..8328afb01c6478 100644 --- a/test/parallel/test-http-client-readable.js +++ b/test/parallel/test-http-client-readable.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var http = require('http'); var util = require('util'); diff --git a/test/parallel/test-http-methods.js b/test/parallel/test-http-methods.js index 348fd2e519ef64..62a4187841bdbc 100644 --- a/test/parallel/test-http-methods.js +++ b/test/parallel/test-http-methods.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var http = require('http'); var util = require('util'); diff --git a/test/parallel/test-http-parser-bad-ref.js b/test/parallel/test-http-parser-bad-ref.js index d409dc62d008d9..545a9c1fef11c4 100644 --- a/test/parallel/test-http-parser-bad-ref.js +++ b/test/parallel/test-http-parser-bad-ref.js @@ -4,7 +4,7 @@ // Flags: --expose_gc -var common = require('../common'); +require('../common'); var assert = require('assert'); var HTTPParser = process.binding('http_parser').HTTPParser; diff --git a/test/parallel/test-http-parser.js b/test/parallel/test-http-parser.js index bb004f864cf468..f10f3ac26b4b10 100644 --- a/test/parallel/test-http-parser.js +++ b/test/parallel/test-http-parser.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var HTTPParser = process.binding('http_parser').HTTPParser; diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index fd52a0b62d11de..0e997694aa7459 100644 --- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var http = require('http'); var url = require('url'); diff --git a/test/parallel/test-internal-modules-expose.js b/test/parallel/test-internal-modules-expose.js index 4ece1d0c7b6f29..ed3cecb6f29719 100644 --- a/test/parallel/test-internal-modules-expose.js +++ b/test/parallel/test-internal-modules-expose.js @@ -1,7 +1,7 @@ 'use strict'; // Flags: --expose_internals -var common = require('../common'); +require('../common'); var assert = require('assert'); assert.equal(typeof require('internal/freelist').FreeList, 'function'); diff --git a/test/parallel/test-internal-modules.js b/test/parallel/test-internal-modules.js index 011b6f7132e9bf..5d93a381c7acdf 100644 --- a/test/parallel/test-internal-modules.js +++ b/test/parallel/test-internal-modules.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); assert.throws(function() { diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 7288febf9e6bfd..1219c330386ca5 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // does node think that i18n was enabled? diff --git a/test/parallel/test-js-stream-call-properties.js b/test/parallel/test-js-stream-call-properties.js index c6b1adb3cb7a7a..280e5d9dabee66 100644 --- a/test/parallel/test-js-stream-call-properties.js +++ b/test/parallel/test-js-stream-call-properties.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const util = require('util'); const JSStream = process.binding('js_stream').JSStream; diff --git a/test/parallel/test-memory-usage.js b/test/parallel/test-memory-usage.js index 8394fc16599ef3..9b39601e2e20b3 100644 --- a/test/parallel/test-memory-usage.js +++ b/test/parallel/test-memory-usage.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var r = process.memoryUsage(); diff --git a/test/parallel/test-microtask-queue-integration-domain.js b/test/parallel/test-microtask-queue-integration-domain.js index 7a4ad77cd321e3..89697ef7f711bb 100644 --- a/test/parallel/test-microtask-queue-integration-domain.js +++ b/test/parallel/test-microtask-queue-integration-domain.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); diff --git a/test/parallel/test-microtask-queue-integration.js b/test/parallel/test-microtask-queue-integration.js index 37de5ee33b1477..fe873d27c91447 100644 --- a/test/parallel/test-microtask-queue-integration.js +++ b/test/parallel/test-microtask-queue-integration.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var implementations = [ diff --git a/test/parallel/test-microtask-queue-run-domain.js b/test/parallel/test-microtask-queue-run-domain.js index 77534920ff1451..3e35cea15ed9dc 100644 --- a/test/parallel/test-microtask-queue-run-domain.js +++ b/test/parallel/test-microtask-queue-run-domain.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); diff --git a/test/parallel/test-microtask-queue-run-immediate-domain.js b/test/parallel/test-microtask-queue-run-immediate-domain.js index 2dea0a76cc1bf4..5ce3ec59b6731b 100644 --- a/test/parallel/test-microtask-queue-run-immediate-domain.js +++ b/test/parallel/test-microtask-queue-run-immediate-domain.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); diff --git a/test/parallel/test-microtask-queue-run-immediate.js b/test/parallel/test-microtask-queue-run-immediate.js index cfd9cd3659ef00..479062ad4710f4 100644 --- a/test/parallel/test-microtask-queue-run-immediate.js +++ b/test/parallel/test-microtask-queue-run-immediate.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); function enqueueMicrotask(fn) { diff --git a/test/parallel/test-microtask-queue-run.js b/test/parallel/test-microtask-queue-run.js index ca758546c2bcfd..ce743d93003249 100644 --- a/test/parallel/test-microtask-queue-run.js +++ b/test/parallel/test-microtask-queue-run.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); function enqueueMicrotask(fn) { diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js index e67c53fc3b076a..072a6aadcb8c62 100644 --- a/test/parallel/test-module-loading-error.js +++ b/test/parallel/test-module-loading-error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); console.error('load test-module-loading-error.js'); diff --git a/test/parallel/test-net-dns-error.js b/test/parallel/test-net-dns-error.js index 17f251cec3b6af..fc27eb1b9b0751 100644 --- a/test/parallel/test-net-dns-error.js +++ b/test/parallel/test-net-dns-error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-end-without-connect.js b/test/parallel/test-net-end-without-connect.js index 2911591f9f486d..69abf486316ff2 100644 --- a/test/parallel/test-net-end-without-connect.js +++ b/test/parallel/test-net-end-without-connect.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var net = require('net'); var sock = new net.Socket(); diff --git a/test/parallel/test-net-isip.js b/test/parallel/test-net-isip.js index 96177122b7ba21..76432ed3488240 100644 --- a/test/parallel/test-net-isip.js +++ b/test/parallel/test-net-isip.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-listen-error.js b/test/parallel/test-net-listen-error.js index 79cfc7da6c9255..4c4d27d703a9a6 100644 --- a/test/parallel/test-net-listen-error.js +++ b/test/parallel/test-net-listen-error.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); var gotError = false; diff --git a/test/parallel/test-net-server-connections.js b/test/parallel/test-net-server-connections.js index 138a78defb260d..ae89d9aac7b3f7 100644 --- a/test/parallel/test-net-server-connections.js +++ b/test/parallel/test-net-server-connections.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/parallel/test-net-server-unref-persistent.js b/test/parallel/test-net-server-unref-persistent.js index a071b625ef26d7..8e8f45f5fd7d20 100644 --- a/test/parallel/test-net-server-unref-persistent.js +++ b/test/parallel/test-net-server-unref-persistent.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var net = require('net'); var closed = false; diff --git a/test/parallel/test-next-tick-domain.js b/test/parallel/test-next-tick-domain.js index 4d53bba6c4f5cc..8f9d9bb4aa50f7 100644 --- a/test/parallel/test-next-tick-domain.js +++ b/test/parallel/test-next-tick-domain.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var origNextTick = process.nextTick; diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index eccd7a43a0825f..7c511b8d5e18ab 100644 --- a/test/parallel/test-next-tick-errors.js +++ b/test/parallel/test-next-tick-errors.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var order = [], diff --git a/test/parallel/test-next-tick-intentional-starvation.js b/test/parallel/test-next-tick-intentional-starvation.js index d4a8a1b7481329..414524e5405ecc 100644 --- a/test/parallel/test-next-tick-intentional-starvation.js +++ b/test/parallel/test-next-tick-intentional-starvation.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // this is the inverse of test-next-tick-starvation. diff --git a/test/parallel/test-next-tick-ordering.js b/test/parallel/test-next-tick-ordering.js index c2b936a1061d52..63f8d37828e53c 100644 --- a/test/parallel/test-next-tick-ordering.js +++ b/test/parallel/test-next-tick-ordering.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var i; diff --git a/test/parallel/test-next-tick-ordering2.js b/test/parallel/test-next-tick-ordering2.js index 4252d623679f65..70f7611dbaddae 100644 --- a/test/parallel/test-next-tick-ordering2.js +++ b/test/parallel/test-next-tick-ordering2.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var order = []; diff --git a/test/parallel/test-next-tick.js b/test/parallel/test-next-tick.js index 54e7b88cf022ca..8b45e8c705fc84 100644 --- a/test/parallel/test-next-tick.js +++ b/test/parallel/test-next-tick.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var complete = 0; diff --git a/test/parallel/test-path-zero-length-strings.js b/test/parallel/test-path-zero-length-strings.js index 083eb3e7ac03c6..07de030aa0b323 100644 --- a/test/parallel/test-path-zero-length-strings.js +++ b/test/parallel/test-path-zero-length-strings.js @@ -5,7 +5,7 @@ // directory. This test makes sure that the behaviour is intact between commits. // See: https://github.com/nodejs/node/pull/2106 -const common = require('../common'); +require('../common'); const assert = require('assert'); const path = require('path'); const pwd = process.cwd(); diff --git a/test/parallel/test-pipe-return-val.js b/test/parallel/test-pipe-return-val.js index 718d052cd24c27..7bb43b59c36f0a 100644 --- a/test/parallel/test-pipe-return-val.js +++ b/test/parallel/test-pipe-return-val.js @@ -1,7 +1,7 @@ 'use strict'; // This test ensures SourceStream.pipe(DestStream) returns DestStream -var common = require('../common'); +require('../common'); var Stream = require('stream').Stream; var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index b4a3af78d8df3b..c1d92c7818abb3 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), +require('../common'); +var assert = require('assert'), path = require('path'), child_process = require('child_process'); diff --git a/test/parallel/test-process-before-exit.js b/test/parallel/test-process-before-exit.js index eff96da98e4729..5d8855869a8e4a 100644 --- a/test/parallel/test-process-before-exit.js +++ b/test/parallel/test-process-before-exit.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var N = 5; var n = 0; diff --git a/test/parallel/test-process-config.js b/test/parallel/test-process-config.js index 4fc3bcaa98afc8..cedd773dfbeaeb 100644 --- a/test/parallel/test-process-config.js +++ b/test/parallel/test-process-config.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); var path = require('path'); diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index 7e927d09bae668..932bae3f8ff095 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -4,7 +4,7 @@ // first things first, set the timezone; see tzset(3) process.env.TZ = 'Europe/Amsterdam'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-process-exit-code.js b/test/parallel/test-process-exit-code.js index fea8c2d4fcdc5d..8d657528d05561 100644 --- a/test/parallel/test-process-exit-code.js +++ b/test/parallel/test-process-exit-code.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); switch (process.argv[2]) { diff --git a/test/parallel/test-process-exit.js b/test/parallel/test-process-exit.js index 999eefc1eff518..0ea36f158eaf9b 100644 --- a/test/parallel/test-process-exit.js +++ b/test/parallel/test-process-exit.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // calling .exit() from within "exit" should not overflow the call stack diff --git a/test/parallel/test-process-getgroups.js b/test/parallel/test-process-getgroups.js index b18b5a0f2f90d4..08eab8d5a8afe2 100644 --- a/test/parallel/test-process-getgroups.js +++ b/test/parallel/test-process-getgroups.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var exec = require('child_process').exec; diff --git a/test/parallel/test-process-hrtime.js b/test/parallel/test-process-hrtime.js index 0e2c5b110e9292..ad186a3507d1e7 100644 --- a/test/parallel/test-process-hrtime.js +++ b/test/parallel/test-process-hrtime.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // the default behavior, return an Array "tuple" of numbers diff --git a/test/parallel/test-process-kill-null.js b/test/parallel/test-process-kill-null.js index 65dab752f12e6d..2516773f08786a 100644 --- a/test/parallel/test-process-kill-null.js +++ b/test/parallel/test-process-kill-null.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-process-kill-pid.js b/test/parallel/test-process-kill-pid.js index f193e979166da7..5c11be2903c4a7 100644 --- a/test/parallel/test-process-kill-pid.js +++ b/test/parallel/test-process-kill-pid.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // test variants of pid diff --git a/test/parallel/test-process-next-tick.js b/test/parallel/test-process-next-tick.js index e7b5f8f3fe886e..6b20cfbe93377b 100644 --- a/test/parallel/test-process-next-tick.js +++ b/test/parallel/test-process-next-tick.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var N = 2; var tickCount = 0; diff --git a/test/parallel/test-process-raw-debug.js b/test/parallel/test-process-raw-debug.js index f849457d643894..ab461902911a93 100644 --- a/test/parallel/test-process-raw-debug.js +++ b/test/parallel/test-process-raw-debug.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var os = require('os'); diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js index bf3dfe4e8b1651..b5d4dc35e4fe00 100644 --- a/test/parallel/test-process-wrap.js +++ b/test/parallel/test-process-wrap.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Process = process.binding('process_wrap').Process; var Pipe = process.binding('pipe_wrap').Pipe; diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js index 179bca51ec2fe0..42927549eae395 100644 --- a/test/parallel/test-punycode.js +++ b/test/parallel/test-punycode.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var punycode = require('punycode'); var assert = require('assert'); diff --git a/test/parallel/test-querystring-multichar-separator.js b/test/parallel/test-querystring-multichar-separator.js index 257492659bdfde..488b5ac56aefa0 100644 --- a/test/parallel/test-querystring-multichar-separator.js +++ b/test/parallel/test-querystring-multichar-separator.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const qs = require('querystring'); diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index 66497ac2d3b6db..bb3c361f882a14 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // test using assert diff --git a/test/parallel/test-readdouble.js b/test/parallel/test-readdouble.js index c0dab8956593fe..6c55a65007aa88 100644 --- a/test/parallel/test-readdouble.js +++ b/test/parallel/test-readdouble.js @@ -2,7 +2,7 @@ /* * Tests to verify we're reading in doubles correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readfloat.js b/test/parallel/test-readfloat.js index 5572bbf18e291b..468faf76029613 100644 --- a/test/parallel/test-readfloat.js +++ b/test/parallel/test-readfloat.js @@ -2,7 +2,7 @@ /* * Tests to verify we're reading in floats correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readint.js b/test/parallel/test-readint.js index 233128d792d068..b3997f74f17721 100644 --- a/test/parallel/test-readint.js +++ b/test/parallel/test-readint.js @@ -2,7 +2,7 @@ /* * Tests to verify we're reading in signed integers correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-readuint.js b/test/parallel/test-readuint.js index b984541bfe9eb0..154af1841a98cd 100644 --- a/test/parallel/test-readuint.js +++ b/test/parallel/test-readuint.js @@ -3,7 +3,7 @@ * A battery of tests to help us read a series of uints */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-ref-unref-return.js b/test/parallel/test-ref-unref-return.js index a82a433ab1af05..89ac52d2bcaa50 100644 --- a/test/parallel/test-ref-unref-return.js +++ b/test/parallel/test-ref-unref-return.js @@ -1,8 +1,8 @@ 'use strict'; +require('../common'); var assert = require('assert'); var net = require('net'); var dgram = require('dgram'); -var common = require('../common'); assert.ok((new net.Server()).ref() instanceof net.Server); assert.ok((new net.Server()).unref() instanceof net.Server); diff --git a/test/parallel/test-regress-GH-6235.js b/test/parallel/test-regress-GH-6235.js index 2f2f17d9698fc9..0bf9b8965d1184 100644 --- a/test/parallel/test-regress-GH-6235.js +++ b/test/parallel/test-regress-GH-6235.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); assert.doesNotThrow(function() { diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-regress-GH-7511.js index 0e5c4ded011a43..03813dea003eaf 100644 --- a/test/parallel/test-regress-GH-7511.js +++ b/test/parallel/test-regress-GH-7511.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), +require('../common'); +var assert = require('assert'), vm = require('vm'); assert.doesNotThrow(function() { diff --git a/test/parallel/test-regress-GH-897.js b/test/parallel/test-regress-GH-897.js index 4b7ba61f9ceca9..1b46994dc37d94 100644 --- a/test/parallel/test-regress-GH-897.js +++ b/test/parallel/test-regress-GH-897.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var t = Date.now(); diff --git a/test/parallel/test-repl-envvars.js b/test/parallel/test-repl-envvars.js index 6073144085843d..2c34bbf2da86fa 100644 --- a/test/parallel/test-repl-envvars.js +++ b/test/parallel/test-repl-envvars.js @@ -2,7 +2,7 @@ // Flags: --expose-internals -const common = require('../common'); +require('../common'); const stream = require('stream'); const REPL = require('internal/repl'); const assert = require('assert'); diff --git a/test/parallel/test-repl-harmony.js b/test/parallel/test-repl-harmony.js index 6bc5cb57aa1187..a5928800381cfe 100644 --- a/test/parallel/test-repl-harmony.js +++ b/test/parallel/test-repl-harmony.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-repl-require-cache.js b/test/parallel/test-repl-require-cache.js index d9b4d71d484640..c5f317ac268e2f 100644 --- a/test/parallel/test-repl-require-cache.js +++ b/test/parallel/test-repl-require-cache.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), +require('../common'); +var assert = require('assert'), repl = require('repl'); // https://github.com/joyent/node/issues/3226 diff --git a/test/parallel/test-repl-setprompt.js b/test/parallel/test-repl-setprompt.js index f2c65583b3656b..2708a3e6af5448 100644 --- a/test/parallel/test-repl-setprompt.js +++ b/test/parallel/test-repl-setprompt.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; const os = require('os'); diff --git a/test/parallel/test-repl-syntax-error-handling.js b/test/parallel/test-repl-syntax-error-handling.js index 66e8fb6b352c56..10166b4f06a692 100644 --- a/test/parallel/test-repl-syntax-error-handling.js +++ b/test/parallel/test-repl-syntax-error-handling.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); switch (process.argv[2]) { diff --git a/test/parallel/test-repl-unexpected-token-recoverable.js b/test/parallel/test-repl-unexpected-token-recoverable.js index 4cfaa5136b6a55..84668c8657c453 100644 --- a/test/parallel/test-repl-unexpected-token-recoverable.js +++ b/test/parallel/test-repl-unexpected-token-recoverable.js @@ -2,7 +2,7 @@ /* * This is a regression test for https://github.com/joyent/node/issues/8874. */ -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/parallel/test-require-cache.js b/test/parallel/test-require-cache.js index f2245345e3e4bd..7ea68dd0515799 100644 --- a/test/parallel/test-require-cache.js +++ b/test/parallel/test-require-cache.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); (function testInjectFakeModule() { diff --git a/test/parallel/test-signal-safety.js b/test/parallel/test-signal-safety.js index 549c26662f717a..7938ae04d6591b 100644 --- a/test/parallel/test-signal-safety.js +++ b/test/parallel/test-signal-safety.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Signal = process.binding('signal_wrap').Signal; diff --git a/test/parallel/test-stdin-hang.js b/test/parallel/test-stdin-hang.js index 4818a9ee952026..bb43d52506e5dc 100644 --- a/test/parallel/test-stdin-hang.js +++ b/test/parallel/test-stdin-hang.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); // This test *only* verifies that invoking the stdin getter does not // cause node to hang indefinitely. diff --git a/test/parallel/test-stdio-readable-writable.js b/test/parallel/test-stdio-readable-writable.js index f8a8923498cb03..7b9b69d309aec5 100644 --- a/test/parallel/test-stdio-readable-writable.js +++ b/test/parallel/test-stdio-readable-writable.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); assert(process.stdout.writable); diff --git a/test/parallel/test-stdout-close-unref.js b/test/parallel/test-stdout-close-unref.js index 12a031562bf6f0..37ab4987eebcaa 100644 --- a/test/parallel/test-stdout-close-unref.js +++ b/test/parallel/test-stdout-close-unref.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var errs = 0; diff --git a/test/parallel/test-stream-big-packet.js b/test/parallel/test-stream-big-packet.js index a9f6064c7e7277..67bb32847bd7f7 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); var stream = require('stream'); diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index e02ff98d3c7454..b46665efc94ff5 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); var str = 'asdfasdfasdfasdfasdf'; diff --git a/test/parallel/test-stream-duplex.js b/test/parallel/test-stream-duplex.js index 0e8789d6bf5555..200de24877bf79 100644 --- a/test/parallel/test-stream-duplex.js +++ b/test/parallel/test-stream-duplex.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Duplex = require('stream').Transform; diff --git a/test/parallel/test-stream-end-paused.js b/test/parallel/test-stream-end-paused.js index 585d6c327fd592..9cc32db880ea88 100644 --- a/test/parallel/test-stream-end-paused.js +++ b/test/parallel/test-stream-end-paused.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var gotEnd = false; diff --git a/test/parallel/test-stream-ispaused.js b/test/parallel/test-stream-ispaused.js index 8112dc733a7205..38f8da3fd512e4 100644 --- a/test/parallel/test-stream-ispaused.js +++ b/test/parallel/test-stream-ispaused.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var stream = require('stream'); diff --git a/test/parallel/test-stream-pipe-after-end.js b/test/parallel/test-stream-pipe-after-end.js index 4bead73f68ce5b..258c9330a96018 100644 --- a/test/parallel/test-stream-pipe-after-end.js +++ b/test/parallel/test-stream-pipe-after-end.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream-pipe-cleanup.js b/test/parallel/test-stream-pipe-cleanup.js index 08da96f92c3a0f..251695c9f723ab 100644 --- a/test/parallel/test-stream-pipe-cleanup.js +++ b/test/parallel/test-stream-pipe-cleanup.js @@ -2,7 +2,7 @@ // This test asserts that Stream.prototype.pipe does not leave listeners // hanging on the source or dest. -var common = require('../common'); +require('../common'); var stream = require('stream'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-stream-pipe-error-handling.js b/test/parallel/test-stream-pipe-error-handling.js index 031a0da7e395db..8b674bffbd087b 100644 --- a/test/parallel/test-stream-pipe-error-handling.js +++ b/test/parallel/test-stream-pipe-error-handling.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Stream = require('stream').Stream; diff --git a/test/parallel/test-stream-pipe-event.js b/test/parallel/test-stream-pipe-event.js index 0d10533b0c496a..d8601dd04a4d8e 100644 --- a/test/parallel/test-stream-pipe-event.js +++ b/test/parallel/test-stream-pipe-event.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var stream = require('stream'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-stream-push-order.js b/test/parallel/test-stream-push-order.js index d67233aff7a498..0bbcdf522b28fa 100644 --- a/test/parallel/test-stream-push-order.js +++ b/test/parallel/test-stream-push-order.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var Readable = require('stream').Readable; var assert = require('assert'); diff --git a/test/parallel/test-stream-push-strings.js b/test/parallel/test-stream-push-strings.js index 0d9c0653c0dc66..21621ff3fd114f 100644 --- a/test/parallel/test-stream-push-strings.js +++ b/test/parallel/test-stream-push-strings.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-constructor-set-methods.js b/test/parallel/test-stream-readable-constructor-set-methods.js index 928ce31a8ebe7b..fb2114f44dad19 100644 --- a/test/parallel/test-stream-readable-constructor-set-methods.js +++ b/test/parallel/test-stream-readable-constructor-set-methods.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js index 965fc82c05a1d9..10d314f4eec254 100644 --- a/test/parallel/test-stream-readable-event.js +++ b/test/parallel/test-stream-readable-event.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js index 07edd579f1deea..57e295e5383550 100644 --- a/test/parallel/test-stream-readable-flow-recursion.js +++ b/test/parallel/test-stream-readable-flow-recursion.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // this test verifies that passing a huge number to read(size) diff --git a/test/parallel/test-stream-transform-constructor-set-methods.js b/test/parallel/test-stream-transform-constructor-set-methods.js index c24c273b6f20e1..bf76b93690c840 100644 --- a/test/parallel/test-stream-transform-constructor-set-methods.js +++ b/test/parallel/test-stream-transform-constructor-set-methods.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Transform = require('stream').Transform; diff --git a/test/parallel/test-stream-transform-objectmode-falsey-value.js b/test/parallel/test-stream-transform-objectmode-falsey-value.js index 762f0500ad3e60..eeb3d3f4ccc692 100644 --- a/test/parallel/test-stream-transform-objectmode-falsey-value.js +++ b/test/parallel/test-stream-transform-objectmode-falsey-value.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-transform-split-objectmode.js b/test/parallel/test-stream-transform-split-objectmode.js index 24833ece051e9e..4e33028da2f7de 100644 --- a/test/parallel/test-stream-transform-split-objectmode.js +++ b/test/parallel/test-stream-transform-split-objectmode.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Transform = require('stream').Transform; diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index a7dcad425310b1..0da979e337486e 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // This test verifies that stream.unshift(Buffer(0)) or diff --git a/test/parallel/test-stream-unshift-read-race.js b/test/parallel/test-stream-unshift-read-race.js index 90f519b5b5d738..253427e3915103 100644 --- a/test/parallel/test-stream-unshift-read-race.js +++ b/test/parallel/test-stream-unshift-read-race.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // This test verifies that: diff --git a/test/parallel/test-stream-wrap.js b/test/parallel/test-stream-wrap.js index e7a7ecddd2385d..5a8b75d4dc1f19 100644 --- a/test/parallel/test-stream-wrap.js +++ b/test/parallel/test-stream-wrap.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const StreamWrap = require('_stream_wrap'); diff --git a/test/parallel/test-stream-writable-change-default-encoding.js b/test/parallel/test-stream-writable-change-default-encoding.js index a6fcda3e62a517..d8193123d6f3af 100644 --- a/test/parallel/test-stream-writable-change-default-encoding.js +++ b/test/parallel/test-stream-writable-change-default-encoding.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-writable-constructor-set-methods.js b/test/parallel/test-stream-writable-constructor-set-methods.js index 47fc458ce9713b..4a5f90216070c5 100644 --- a/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/test/parallel/test-stream-writable-constructor-set-methods.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Writable = require('stream').Writable; diff --git a/test/parallel/test-stream-writable-decoded-encoding.js b/test/parallel/test-stream-writable-decoded-encoding.js index b637838c0c65be..b5f1b4f6b73f49 100644 --- a/test/parallel/test-stream-writable-decoded-encoding.js +++ b/test/parallel/test-stream-writable-decoded-encoding.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js index f73270f2ff53ba..88933508fb5246 100644 --- a/test/parallel/test-stream-writev.js +++ b/test/parallel/test-stream-writev.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-base64-single-char-read-end.js b/test/parallel/test-stream2-base64-single-char-read-end.js index 2d60877de83662..900e090921b712 100644 --- a/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/test/parallel/test-stream2-base64-single-char-read-end.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var R = require('_stream_readable'); var W = require('_stream_writable'); var assert = require('assert'); diff --git a/test/parallel/test-stream2-compatibility.js b/test/parallel/test-stream2-compatibility.js index 9eab7b713bf167..3dbee62871c68c 100644 --- a/test/parallel/test-stream2-compatibility.js +++ b/test/parallel/test-stream2-compatibility.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var R = require('_stream_readable'); var assert = require('assert'); diff --git a/test/parallel/test-stream2-finish-pipe.js b/test/parallel/test-stream2-finish-pipe.js index 913bb7b0b4db09..63c78759cab60d 100644 --- a/test/parallel/test-stream2-finish-pipe.js +++ b/test/parallel/test-stream2-finish-pipe.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var stream = require('stream'); var Buffer = require('buffer').Buffer; diff --git a/test/parallel/test-stream2-large-read-stall.js b/test/parallel/test-stream2-large-read-stall.js index 4cd89599fee730..84457c7e3e9ff7 100644 --- a/test/parallel/test-stream2-large-read-stall.js +++ b/test/parallel/test-stream2-large-read-stall.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // If everything aligns so that you do a read(n) of exactly the diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js index a2f554a0b8a004..e79b8f9524c494 100644 --- a/test/parallel/test-stream2-objects.js +++ b/test/parallel/test-stream2-objects.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var Readable = require('_stream_readable'); var Writable = require('_stream_writable'); var assert = require('assert'); diff --git a/test/parallel/test-stream2-pipe-error-handling.js b/test/parallel/test-stream2-pipe-error-handling.js index 9eddbdd90d00c3..7d7cfb6b2b3307 100644 --- a/test/parallel/test-stream2-pipe-error-handling.js +++ b/test/parallel/test-stream2-pipe-error-handling.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-pipe-error-once-listener.js b/test/parallel/test-stream2-pipe-error-once-listener.js index f2ecb87ce97a75..3ca0782ea069d4 100644 --- a/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/test/parallel/test-stream2-pipe-error-once-listener.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index b58bce143585f4..59f82ad54f3cdf 100644 --- a/test/parallel/test-stream2-push.js +++ b/test/parallel/test-stream2-push.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var stream = require('stream'); var Readable = stream.Readable; var Writable = stream.Writable; diff --git a/test/parallel/test-stream2-read-sync-stack.js b/test/parallel/test-stream2-read-sync-stack.js index e912e1039ff558..4bce87ffb9dffd 100644 --- a/test/parallel/test-stream2-read-sync-stack.js +++ b/test/parallel/test-stream2-read-sync-stack.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; var r = new Readable(); diff --git a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 8e4001f8022f1c..2ebb1a696f3348 100644 --- a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('stream').Readable; diff --git a/test/parallel/test-stream2-readable-from-list.js b/test/parallel/test-stream2-readable-from-list.js index a8d9fb38f25090..d4b42b60af65a4 100644 --- a/test/parallel/test-stream2-readable-from-list.js +++ b/test/parallel/test-stream2-readable-from-list.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var fromList = require('_stream_readable')._fromList; // tiny node-tap lookalike. diff --git a/test/parallel/test-stream2-readable-legacy-drain.js b/test/parallel/test-stream2-readable-legacy-drain.js index 4218bace2b878f..399771e46a11ed 100644 --- a/test/parallel/test-stream2-readable-legacy-drain.js +++ b/test/parallel/test-stream2-readable-legacy-drain.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Stream = require('stream'); diff --git a/test/parallel/test-stream2-readable-non-empty-end.js b/test/parallel/test-stream2-readable-non-empty-end.js index 46d6f92f2b9df2..1953503ef9be2e 100644 --- a/test/parallel/test-stream2-readable-non-empty-end.js +++ b/test/parallel/test-stream2-readable-non-empty-end.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var Readable = require('_stream_readable'); var len = 0; diff --git a/test/parallel/test-stream2-readable-wrap-empty.js b/test/parallel/test-stream2-readable-wrap-empty.js index 60417ca893300d..d2bf8f3f306f6d 100644 --- a/test/parallel/test-stream2-readable-wrap-empty.js +++ b/test/parallel/test-stream2-readable-wrap-empty.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream2-readable-wrap.js b/test/parallel/test-stream2-readable-wrap.js index 8e3e04b966010f..acf1cfdb030439 100644 --- a/test/parallel/test-stream2-readable-wrap.js +++ b/test/parallel/test-stream2-readable-wrap.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream2-set-encoding.js b/test/parallel/test-stream2-set-encoding.js index ea9a315cb1a6e1..40e09035a98e90 100644 --- a/test/parallel/test-stream2-set-encoding.js +++ b/test/parallel/test-stream2-set-encoding.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var R = require('_stream_readable'); var util = require('util'); diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index e45c913c94f559..7dad5734839791 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -1,6 +1,6 @@ 'use strict'; +require('../common'); var assert = require('assert'); -var common = require('../common'); var PassThrough = require('_stream_passthrough'); var Transform = require('_stream_transform'); diff --git a/test/parallel/test-stream2-unpipe-leak.js b/test/parallel/test-stream2-unpipe-leak.js index 15b510e7f643cc..3b529bac1f2e9c 100644 --- a/test/parallel/test-stream2-unpipe-leak.js +++ b/test/parallel/test-stream2-unpipe-leak.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-stream2-writable.js b/test/parallel/test-stream2-writable.js index 1d87d7f920c052..81e57d06eb3bec 100644 --- a/test/parallel/test-stream2-writable.js +++ b/test/parallel/test-stream2-writable.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var W = require('_stream_writable'); var D = require('_stream_duplex'); var assert = require('assert'); diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index 135629a243d66c..e4e33738b33206 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var stream = require('stream'); diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index 0b22d3dd04efc9..9d0034e2fc9c7d 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var StringDecoder = require('string_decoder').StringDecoder; diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index ba3f0c5d1d9ade..1f03e2be42f577 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // minimum string size to overflow into external string space var EXTERN_APEX = 0xFBEE9; diff --git a/test/parallel/test-timers-active.js b/test/parallel/test-timers-active.js index acddc2f41a45e8..d8faa1f5a33483 100644 --- a/test/parallel/test-timers-active.js +++ b/test/parallel/test-timers-active.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const active = require('timers').active; diff --git a/test/parallel/test-timers-args.js b/test/parallel/test-timers-args.js index abb785ea0fc79c..ae11e35ba2784d 100644 --- a/test/parallel/test-timers-args.js +++ b/test/parallel/test-timers-args.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); function range(n) { diff --git a/test/parallel/test-timers-immediate-queue.js b/test/parallel/test-timers-immediate-queue.js index a71472d46442ab..62482d510a6608 100644 --- a/test/parallel/test-timers-immediate-queue.js +++ b/test/parallel/test-timers-immediate-queue.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // setImmediate should run clear its queued cbs once per event loop turn diff --git a/test/parallel/test-timers-immediate.js b/test/parallel/test-timers-immediate.js index bcfc4616ac6264..9486465602ce9b 100644 --- a/test/parallel/test-timers-immediate.js +++ b/test/parallel/test-timers-immediate.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var immediateA = false, diff --git a/test/parallel/test-timers-linked-list.js b/test/parallel/test-timers-linked-list.js index 00b2129d126c4a..cc81e8721f13e2 100644 --- a/test/parallel/test-timers-linked-list.js +++ b/test/parallel/test-timers-linked-list.js @@ -1,8 +1,7 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var L = require('_linklist'); - +require('../common'); +const assert = require('assert'); +const L = require('_linklist'); var list = { name: 'list' }; var A = { name: 'A' }; diff --git a/test/parallel/test-timers-now.js b/test/parallel/test-timers-now.js index 466bd064b8decf..8a47e397ce97a8 100644 --- a/test/parallel/test-timers-now.js +++ b/test/parallel/test-timers-now.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); // Return value of Timer.now() should easily fit in a SMI right after start-up. diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index 730a78a072c663..5da88967e37dda 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var Timer = process.binding('timer_wrap').Timer; diff --git a/test/parallel/test-timers-uncaught-exception.js b/test/parallel/test-timers-uncaught-exception.js index 794b3b923be1df..6b6dc583715849 100644 --- a/test/parallel/test-timers-uncaught-exception.js +++ b/test/parallel/test-timers-uncaught-exception.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var exceptions = 0; diff --git a/test/parallel/test-timers-unref-active.js b/test/parallel/test-timers-unref-active.js index 08f28b0153fecb..ad72ac4047747b 100644 --- a/test/parallel/test-timers-unref-active.js +++ b/test/parallel/test-timers-unref-active.js @@ -15,7 +15,7 @@ * all 10 timeouts had the time to expire. */ -const common = require('../common'); +require('../common'); const timers = require('timers'); const assert = require('assert'); diff --git a/test/parallel/test-timers-unref-call.js b/test/parallel/test-timers-unref-call.js index b348330d200d65..edd5865e8f610b 100644 --- a/test/parallel/test-timers-unref-call.js +++ b/test/parallel/test-timers-unref-call.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var Timer = process.binding('timer_wrap').Timer; Timer.now = function() { return ++Timer.now.ticks; }; diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js index aead4a4e7def64..971c485a4cf986 100644 --- a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js +++ b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js @@ -10,7 +10,7 @@ * This behavior is a private implementation detail and should not be * considered public interface. */ -const common = require('../common'); +require('../common'); const timers = require('timers'); const assert = require('assert'); diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index c0b24a4275be86..671c676e350e3a 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var interval_fired = false, diff --git a/test/parallel/test-timers-zero-timeout.js b/test/parallel/test-timers-zero-timeout.js index 1c84814363a641..78445ac6596db9 100644 --- a/test/parallel/test-timers-zero-timeout.js +++ b/test/parallel/test-timers-zero-timeout.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // https://github.com/joyent/node/issues/2079 - zero timeout drops extra args diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index e784e262959d97..0b379e0eb45ad0 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var inputs = [ diff --git a/test/parallel/test-tls-parse-cert-string.js b/test/parallel/test-tls-parse-cert-string.js index 57180c9ce9df56..11128783871fe4 100644 --- a/test/parallel/test-tls-parse-cert-string.js +++ b/test/parallel/test-tls-parse-cert-string.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const tls = require('tls'); diff --git a/test/parallel/test-tty-stdout-end.js b/test/parallel/test-tty-stdout-end.js index 57f9c03ec449e9..a33a2e5ed27209 100644 --- a/test/parallel/test-tty-stdout-end.js +++ b/test/parallel/test-tty-stdout-end.js @@ -1,6 +1,6 @@ 'use strict'; // Can't test this when 'make test' doesn't assign a tty to the stdout. -const common = require('../common'); +require('../common'); const assert = require('assert'); const shouldThrow = function() { diff --git a/test/parallel/test-tty-wrap.js b/test/parallel/test-tty-wrap.js index dbe7b6890fd218..5e124dc89f7b87 100644 --- a/test/parallel/test-tty-wrap.js +++ b/test/parallel/test-tty-wrap.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var TTY = process.binding('tty_wrap').TTY; diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 5098c7e46ab6e6..1295b691fb117d 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -1,6 +1,6 @@ /* eslint-disable max-len */ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var url = require('url'), diff --git a/test/parallel/test-utf8-scripts.js b/test/parallel/test-utf8-scripts.js index 3a891283509b9e..a9db5d10e4fde7 100644 --- a/test/parallel/test-utf8-scripts.js +++ b/test/parallel/test-utf8-scripts.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // üäö diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js index 6761671e1997bd..00028ddbb74728 100644 --- a/test/parallel/test-util-format.js +++ b/test/parallel/test-util-format.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); var symbol = Symbol('foo'); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 5831c40e77e930..d88096765694bd 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/parallel/test-util.js b/test/parallel/test-util.js index 700532bd5a397b..864361d80a6dfa 100644 --- a/test/parallel/test-util.js +++ b/test/parallel/test-util.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); var context = require('vm').runInNewContext; diff --git a/test/parallel/test-v8-flag-type-check.js b/test/parallel/test-v8-flag-type-check.js index 68bf30dba3cdbc..3724944821343c 100644 --- a/test/parallel/test-v8-flag-type-check.js +++ b/test/parallel/test-v8-flag-type-check.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var v8 = require('v8'); diff --git a/test/parallel/test-v8-flags.js b/test/parallel/test-v8-flags.js index d21cbc6c2635a5..cee924d5b13068 100644 --- a/test/parallel/test-v8-flags.js +++ b/test/parallel/test-v8-flags.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var v8 = require('v8'); var vm = require('vm'); diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js index fc4a6df30f8ed8..eb5566fe2bc28f 100644 --- a/test/parallel/test-v8-stats.js +++ b/test/parallel/test-v8-stats.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var v8 = require('v8'); diff --git a/test/parallel/test-vm-basic.js b/test/parallel/test-vm-basic.js index 96c615c44af10c..8f9cab90eb5a1b 100644 --- a/test/parallel/test-vm-basic.js +++ b/test/parallel/test-vm-basic.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context-async-script.js b/test/parallel/test-vm-context-async-script.js index e146d48343aa60..b09eda85209807 100644 --- a/test/parallel/test-vm-context-async-script.js +++ b/test/parallel/test-vm-context-async-script.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context-property-forwarding.js b/test/parallel/test-vm-context-property-forwarding.js index 5fcd64b8ba9094..4034441615ca9e 100644 --- a/test/parallel/test-vm-context-property-forwarding.js +++ b/test/parallel/test-vm-context-property-forwarding.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index e1cd2ef01e5176..3fe3cf1b66a88e 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-and-run-in-context.js b/test/parallel/test-vm-create-and-run-in-context.js index 01df6ad4531e4a..94527598ca27b1 100644 --- a/test/parallel/test-vm-create-and-run-in-context.js +++ b/test/parallel/test-vm-create-and-run-in-context.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-context-accessors.js b/test/parallel/test-vm-create-context-accessors.js index 678cf3fbd2128e..d2e7d7bd8eacc2 100644 --- a/test/parallel/test-vm-create-context-accessors.js +++ b/test/parallel/test-vm-create-context-accessors.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index d44eeec18decd5..d569ce1089c386 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/test/parallel/test-vm-create-context-arg.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-create-context-circular-reference.js b/test/parallel/test-vm-create-context-circular-reference.js index cb6a90dcaef321..851bebdb088adf 100644 --- a/test/parallel/test-vm-create-context-circular-reference.js +++ b/test/parallel/test-vm-create-context-circular-reference.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-cross-context.js b/test/parallel/test-vm-cross-context.js index 20a3792b28578e..5674f582426f1f 100644 --- a/test/parallel/test-vm-cross-context.js +++ b/test/parallel/test-vm-cross-context.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js index 5ff194e12dd8d8..fd41be7564aab0 100644 --- a/test/parallel/test-vm-function-declaration.js +++ b/test/parallel/test-vm-function-declaration.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-global-define-property.js b/test/parallel/test-vm-global-define-property.js index f7f3e4f3df7d76..71e6ae9eaa0b73 100644 --- a/test/parallel/test-vm-global-define-property.js +++ b/test/parallel/test-vm-global-define-property.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-global-identity.js b/test/parallel/test-vm-global-identity.js index 647edb22b44db0..7d90408b64c2c7 100644 --- a/test/parallel/test-vm-global-identity.js +++ b/test/parallel/test-vm-global-identity.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-harmony-proxies.js b/test/parallel/test-vm-harmony-proxies.js index 2f008615ebaf54..15a58b2a4dacd4 100644 --- a/test/parallel/test-vm-harmony-proxies.js +++ b/test/parallel/test-vm-harmony-proxies.js @@ -1,7 +1,7 @@ 'use strict'; // Flags: --harmony_proxies -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-harmony-symbols.js b/test/parallel/test-vm-harmony-symbols.js index 86fde1b978ffb2..efd15327c5fa07 100644 --- a/test/parallel/test-vm-harmony-symbols.js +++ b/test/parallel/test-vm-harmony-symbols.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js index 5a46a452b91634..cc106a15fbfc61 100644 --- a/test/parallel/test-vm-is-context.js +++ b/test/parallel/test-vm-is-context.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-preserves-property.js b/test/parallel/test-vm-preserves-property.js index 85ce2d6e8165c8..9786ee54a7cffd 100644 --- a/test/parallel/test-vm-preserves-property.js +++ b/test/parallel/test-vm-preserves-property.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-symbols.js b/test/parallel/test-vm-symbols.js index d7d0ffe3af6157..d3419af559a2f2 100644 --- a/test/parallel/test-vm-symbols.js +++ b/test/parallel/test-vm-symbols.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-vm-syntax-error-message.js b/test/parallel/test-vm-syntax-error-message.js index 4b48b0d474a88d..75748b24e193ee 100644 --- a/test/parallel/test-vm-syntax-error-message.js +++ b/test/parallel/test-vm-syntax-error-message.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var child_process = require('child_process'); diff --git a/test/parallel/test-vm-timeout.js b/test/parallel/test-vm-timeout.js index e9511e59230a84..b4dd57bb54d234 100644 --- a/test/parallel/test-vm-timeout.js +++ b/test/parallel/test-vm-timeout.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/parallel/test-writedouble.js b/test/parallel/test-writedouble.js index 2a9ab11107f147..4e86182137de29 100644 --- a/test/parallel/test-writedouble.js +++ b/test/parallel/test-writedouble.js @@ -2,7 +2,7 @@ /* * Tests to verify we're writing doubles correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); function test(clazz) { diff --git a/test/parallel/test-writefloat.js b/test/parallel/test-writefloat.js index 948bf4910208a5..0cb748d603d0ff 100644 --- a/test/parallel/test-writefloat.js +++ b/test/parallel/test-writefloat.js @@ -2,7 +2,7 @@ /* * Tests to verify we're writing floats correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); function test(clazz) { diff --git a/test/parallel/test-writeint.js b/test/parallel/test-writeint.js index ee981a157ad761..d05a90d48b5ac6 100644 --- a/test/parallel/test-writeint.js +++ b/test/parallel/test-writeint.js @@ -2,7 +2,7 @@ /* * Tests to verify we're writing signed integers correctly */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); function test8(clazz) { diff --git a/test/parallel/test-writeuint.js b/test/parallel/test-writeuint.js index baa12aa57666f3..843cc423072225 100644 --- a/test/parallel/test-writeuint.js +++ b/test/parallel/test-writeuint.js @@ -2,7 +2,7 @@ /* * A battery of tests to help us read a series of uints */ -var common = require('../common'); +require('../common'); var ASSERT = require('assert'); /* diff --git a/test/parallel/test-zlib-close-after-write.js b/test/parallel/test-zlib-close-after-write.js index c02ff33fb5eb63..b47deddd8889e9 100644 --- a/test/parallel/test-zlib-close-after-write.js +++ b/test/parallel/test-zlib-close-after-write.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-const.js b/test/parallel/test-zlib-const.js index 511eca613a5229..b7eb31d2c5f48c 100644 --- a/test/parallel/test-zlib-const.js +++ b/test/parallel/test-zlib-const.js @@ -1,5 +1,5 @@ /* eslint-disable strict */ -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js index 5808bdf04a8f14..70c102efd2862c 100644 --- a/test/parallel/test-zlib-convenience-methods.js +++ b/test/parallel/test-zlib-convenience-methods.js @@ -1,7 +1,7 @@ 'use strict'; // test convenience methods with and without options supplied -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js index 109f4273f767d0..d190ff51a57e63 100644 --- a/test/parallel/test-zlib-dictionary.js +++ b/test/parallel/test-zlib-dictionary.js @@ -1,10 +1,10 @@ 'use strict'; // test compression/decompression with dictionary -var common = require('../common'); -var assert = require('assert'); -var zlib = require('zlib'); -var path = require('path'); +require('../common'); +const assert = require('assert'); +const zlib = require('zlib'); +const path = require('path'); var spdyDict = new Buffer([ 'optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-', diff --git a/test/parallel/test-zlib-flush-drain.js b/test/parallel/test-zlib-flush-drain.js index 93966cd85d269a..26285c04739a25 100644 --- a/test/parallel/test-zlib-flush-drain.js +++ b/test/parallel/test-zlib-flush-drain.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const zlib = require('zlib'); const path = require('path'); diff --git a/test/parallel/test-zlib-from-string.js b/test/parallel/test-zlib-from-string.js index 49f4d139c148d9..14c747fc433692 100644 --- a/test/parallel/test-zlib-from-string.js +++ b/test/parallel/test-zlib-from-string.js @@ -1,7 +1,7 @@ 'use strict'; // test compressing and uncompressing a string with zlib -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js index e1e81bacc1a499..9850c6078c5320 100644 --- a/test/parallel/test-zlib-invalid-input.js +++ b/test/parallel/test-zlib-invalid-input.js @@ -1,8 +1,8 @@ 'use strict'; // test uncompressing invalid input -var common = require('../common'), - assert = require('assert'), +require('../common'); +var assert = require('assert'), zlib = require('zlib'); var nonStringInputs = [1, true, {a: 1}, ['a']]; diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index a1d9adb6d9b996..b1d35935e8ab19 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 4c53ca49ebf758..53fa715a673f7e 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); var fs = require('fs'); diff --git a/test/parallel/test-zlib-zero-byte.js b/test/parallel/test-zlib-zero-byte.js index 9aa260a7f3149d..826a9c7c79793d 100644 --- a/test/parallel/test-zlib-zero-byte.js +++ b/test/parallel/test-zlib-zero-byte.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var zlib = require('zlib'); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index 67194a3dd77f53..513cbeb0ee7f96 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var os = require('os'); var util = require('util'); diff --git a/test/pummel/test-next-tick-infinite-calls.js b/test/pummel/test-next-tick-infinite-calls.js index d4fdb3496423eb..7abdd38cf26e83 100644 --- a/test/pummel/test-next-tick-infinite-calls.js +++ b/test/pummel/test-next-tick-infinite-calls.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var complete = 0; diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js index 4fd66c03907aac..04225bae421b1a 100644 --- a/test/pummel/test-process-hrtime.js +++ b/test/pummel/test-process-hrtime.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var start = process.hrtime(); diff --git a/test/pummel/test-process-uptime.js b/test/pummel/test-process-uptime.js index a80806c2099cb1..8d2d88b74f736f 100644 --- a/test/pummel/test-process-uptime.js +++ b/test/pummel/test-process-uptime.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); console.error(process.uptime()); diff --git a/test/pummel/test-stream-pipe-multi.js b/test/pummel/test-stream-pipe-multi.js index 807e3c1415154e..44d6973938debe 100644 --- a/test/pummel/test-stream-pipe-multi.js +++ b/test/pummel/test-stream-pipe-multi.js @@ -2,7 +2,7 @@ // Test that having a bunch of streams piping in parallel // doesn't break anything. -var common = require('../common'); +require('../common'); var assert = require('assert'); var Stream = require('stream').Stream; var rr = []; diff --git a/test/pummel/test-stream2-basic.js b/test/pummel/test-stream2-basic.js index fe921dc0058374..723e9a0308be00 100644 --- a/test/pummel/test-stream2-basic.js +++ b/test/pummel/test-stream2-basic.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var R = require('_stream_readable'); var assert = require('assert'); diff --git a/test/pummel/test-timer-wrap.js b/test/pummel/test-timer-wrap.js index 62ba69d3fde033..d2e96e066d2fb1 100644 --- a/test/pummel/test-timer-wrap.js +++ b/test/pummel/test-timer-wrap.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var timeouts = 0; diff --git a/test/pummel/test-timer-wrap2.js b/test/pummel/test-timer-wrap2.js index b289a85644a068..9f62bd95d01974 100644 --- a/test/pummel/test-timer-wrap2.js +++ b/test/pummel/test-timer-wrap2.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // Test that allocating a timer does not increase the loop's reference diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index 2225da91edcf5f..c9ac9b8bf6d905 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var WINDOW = 200; // why is does this need to be so big? diff --git a/test/pummel/test-vm-memleak.js b/test/pummel/test-vm-memleak.js index f93f34127f9219..c6623991922da9 100644 --- a/test/pummel/test-vm-memleak.js +++ b/test/pummel/test-vm-memleak.js @@ -1,8 +1,8 @@ 'use strict'; // Flags: --max_old_space_size=32 +require('../common'); var assert = require('assert'); -var common = require('../common'); var start = Date.now(); var maxMem = 0; diff --git a/test/sequential/test-debug-args.js b/test/sequential/test-debug-args.js index eb1533d4418a55..cb70c185f5419b 100644 --- a/test/sequential/test-debug-args.js +++ b/test/sequential/test-debug-args.js @@ -1,7 +1,7 @@ 'use strict'; // Flags: --debugger -var common = require('../common'); +require('../common'); var assert = require('assert'); assert.notEqual(process.execArgv.indexOf('--debugger'), -1); diff --git a/test/sequential/test-deprecation-flags.js b/test/sequential/test-deprecation-flags.js index ca325654c55d80..037f40f07e0a25 100644 --- a/test/sequential/test-deprecation-flags.js +++ b/test/sequential/test-deprecation-flags.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var execFile = require('child_process').execFile; var depmod = require.resolve('../fixtures/deprecated.js'); diff --git a/test/sequential/test-memory-usage-emfile.js b/test/sequential/test-memory-usage-emfile.js index 6b439049805786..92c103669a9a85 100644 --- a/test/sequential/test-memory-usage-emfile.js +++ b/test/sequential/test-memory-usage-emfile.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/sequential/test-net-listen-exclusive-random-ports.js b/test/sequential/test-net-listen-exclusive-random-ports.js index c32273a59b2a50..f46f9a01d773ce 100644 --- a/test/sequential/test-net-listen-exclusive-random-ports.js +++ b/test/sequential/test-net-listen-exclusive-random-ports.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var cluster = require('cluster'); var net = require('net'); diff --git a/test/sequential/test-regress-GH-1726.js b/test/sequential/test-regress-GH-1726.js index 859ab6cc5e4253..c5f0bba1335264 100644 --- a/test/sequential/test-regress-GH-1726.js +++ b/test/sequential/test-regress-GH-1726.js @@ -4,7 +4,7 @@ // exit when its child exits. // https://github.com/joyent/node/issues/1726 -var common = require('../common'); +require('../common'); var assert = require('assert'); var ch = require('child_process'); diff --git a/test/sequential/test-regress-GH-819.js b/test/sequential/test-regress-GH-819.js index e459587d97cba9..a8a26b4e067f64 100644 --- a/test/sequential/test-regress-GH-819.js +++ b/test/sequential/test-regress-GH-819.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var net = require('net'); var assert = require('assert'); diff --git a/test/sequential/test-setproctitle.js b/test/sequential/test-setproctitle.js index 11395f4fdbc52f..40107f5774962f 100644 --- a/test/sequential/test-setproctitle.js +++ b/test/sequential/test-setproctitle.js @@ -7,7 +7,7 @@ if ('linux freebsd darwin'.indexOf(process.platform) === -1) { return; } -var common = require('../common'); +require('../common'); var assert = require('assert'); var exec = require('child_process').exec; var path = require('path'); diff --git a/test/sequential/test-sigint-infinite-loop.js b/test/sequential/test-sigint-infinite-loop.js index 8211aeb69ec5db..1570f9c59dd5d3 100644 --- a/test/sequential/test-sigint-infinite-loop.js +++ b/test/sequential/test-sigint-infinite-loop.js @@ -2,7 +2,7 @@ // This test is to assert that we can SIGINT a script which loops forever. // Ref(http): // groups.google.com/group/nodejs-dev/browse_thread/thread/e20f2f8df0296d3f -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/sequential/test-stdin-child-proc.js b/test/sequential/test-stdin-child-proc.js index 93bf265b8b0020..0189e94d5d4c8c 100644 --- a/test/sequential/test-stdin-child-proc.js +++ b/test/sequential/test-stdin-child-proc.js @@ -1,7 +1,7 @@ 'use strict'; // This tests that pausing and resuming stdin does not hang and timeout // when done in a child process. See test/simple/test-stdin-pause-resume.js -var common = require('../common'); +require('../common'); var child_process = require('child_process'); var path = require('path'); child_process.spawn(process.execPath, diff --git a/test/sequential/test-stdin-pipe-resume.js b/test/sequential/test-stdin-pipe-resume.js index dbac78d78c5e12..cd409a1d236f53 100644 --- a/test/sequential/test-stdin-pipe-resume.js +++ b/test/sequential/test-stdin-pipe-resume.js @@ -1,6 +1,6 @@ 'use strict'; // This tests that piping stdin will cause it to resume() as well. -var common = require('../common'); +require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') { diff --git a/test/sequential/test-stdin-script-child.js b/test/sequential/test-stdin-script-child.js index c5d5d6d44281e3..ad65734364e707 100644 --- a/test/sequential/test-stdin-script-child.js +++ b/test/sequential/test-stdin-script-child.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js index c6f5aecd40e262..a138108fae7e01 100644 --- a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js +++ b/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') diff --git a/test/sequential/test-stdout-stderr-reading.js b/test/sequential/test-stdout-stderr-reading.js index 82fd51cedda1de..2cc029c501c162 100644 --- a/test/sequential/test-stdout-stderr-reading.js +++ b/test/sequential/test-stdout-stderr-reading.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); // verify that stdout is never read from. diff --git a/test/sequential/test-stream2-stderr-sync.js b/test/sequential/test-stream2-stderr-sync.js index ccbdc55e4feaf9..0889a38ed398db 100644 --- a/test/sequential/test-stream2-stderr-sync.js +++ b/test/sequential/test-stream2-stderr-sync.js @@ -1,7 +1,7 @@ 'use strict'; // Make sure that sync writes to stderr get processed before exiting. -var common = require('../common'); +require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/sequential/test-sync-fileread.js b/test/sequential/test-sync-fileread.js index 24a80d96c2601b..6208e4c619efc7 100644 --- a/test/sequential/test-sync-fileread.js +++ b/test/sequential/test-sync-fileread.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var path = require('path'); var fs = require('fs'); diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js index 02d30449a9944b..5f0306e5e01645 100644 --- a/test/sequential/test-util-debug.js +++ b/test/sequential/test-util-debug.js @@ -1,5 +1,5 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); if (process.argv[2] === 'child') diff --git a/test/timers/test-timers-reliability.js b/test/timers/test-timers-reliability.js index b4332468bc2ec3..966b82fd6217c9 100644 --- a/test/timers/test-timers-reliability.js +++ b/test/timers/test-timers-reliability.js @@ -1,7 +1,7 @@ 'use strict'; // FaketimeFlags: --exclude-monotonic -f '2014-07-21 09:00:00' -var common = require('../common'); +require('../common'); var Timer = process.binding('timer_wrap').Timer; var assert = require('assert'); From 51e0693a1e6c1e280311d50e3230d41d40fc1256 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 01:33:56 -0800 Subject: [PATCH 118/262] test: remove unused `util` imports A number of tests in `test/parallel` were importing the `util` module via `require()` but not using `util` for anything. This removes those `require()` statements. PR-URL: https://github.com/nodejs/node/pull/4562 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-beforeexit-event.js | 1 - test/parallel/test-child-process-fork-regr-gh-2847.js | 1 - test/parallel/test-cluster-worker-isconnected.js | 1 - test/parallel/test-file-write-stream2.js | 1 - test/parallel/test-file-write-stream3.js | 3 +-- test/parallel/test-http-buffer-sanity.js | 1 - test/parallel/test-http-head-request.js | 1 - test/parallel/test-http-keep-alive-close-on-header.js | 1 - test/parallel/test-pipe-return-val.js | 1 - test/parallel/test-repl-persistent-history.js | 1 - test/parallel/test-repl-tab.js | 1 - test/parallel/test-stream2-push.js | 1 - test/parallel/test-url.js | 3 +-- 13 files changed, 2 insertions(+), 15 deletions(-) diff --git a/test/parallel/test-beforeexit-event.js b/test/parallel/test-beforeexit-event.js index f3bd127b408b08..8e5d66f5f5d7c7 100644 --- a/test/parallel/test-beforeexit-event.js +++ b/test/parallel/test-beforeexit-event.js @@ -1,7 +1,6 @@ 'use strict'; var assert = require('assert'); var net = require('net'); -var util = require('util'); var common = require('../common'); var revivals = 0; var deaths = 0; diff --git a/test/parallel/test-child-process-fork-regr-gh-2847.js b/test/parallel/test-child-process-fork-regr-gh-2847.js index 27b4d72d2fc612..f035b7fdc89eb8 100644 --- a/test/parallel/test-child-process-fork-regr-gh-2847.js +++ b/test/parallel/test-child-process-fork-regr-gh-2847.js @@ -5,7 +5,6 @@ const assert = require('assert'); const cluster = require('cluster'); const net = require('net'); -const util = require('util'); var connectcount = 0; var sendcount = 0; diff --git a/test/parallel/test-cluster-worker-isconnected.js b/test/parallel/test-cluster-worker-isconnected.js index eb3c5892bb5e21..985d15ce6475e6 100644 --- a/test/parallel/test-cluster-worker-isconnected.js +++ b/test/parallel/test-cluster-worker-isconnected.js @@ -2,7 +2,6 @@ require('../common'); var cluster = require('cluster'); var assert = require('assert'); -var util = require('util'); if (cluster.isMaster) { var worker = cluster.fork(); diff --git a/test/parallel/test-file-write-stream2.js b/test/parallel/test-file-write-stream2.js index 0044548b736df0..e95760bc2d9a4e 100644 --- a/test/parallel/test-file-write-stream2.js +++ b/test/parallel/test-file-write-stream2.js @@ -4,7 +4,6 @@ var assert = require('assert'); var path = require('path'); var fs = require('fs'); -var util = require('util'); var filepath = path.join(common.tmpDir, 'write.txt'); diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index 1a88faa01fb8a6..6ed852eb00995b 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -3,8 +3,7 @@ var common = require('../common'); var assert = require('assert'); var path = require('path'), - fs = require('fs'), - util = require('util'); + fs = require('fs'); var filepath = path.join(common.tmpDir, 'write_pos.txt'); diff --git a/test/parallel/test-http-buffer-sanity.js b/test/parallel/test-http-buffer-sanity.js index 4b120311d7dac9..98ce0f75b916a8 100644 --- a/test/parallel/test-http-buffer-sanity.js +++ b/test/parallel/test-http-buffer-sanity.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); var bufferSize = 5 * 1024 * 1024; var measuredSize = 0; diff --git a/test/parallel/test-http-head-request.js b/test/parallel/test-http-head-request.js index 5a6f90507cf303..faf2168e36d0be 100644 --- a/test/parallel/test-http-head-request.js +++ b/test/parallel/test-http-head-request.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); var body = 'hello world\n'; diff --git a/test/parallel/test-http-keep-alive-close-on-header.js b/test/parallel/test-http-keep-alive-close-on-header.js index 9ed6077b943aa8..83a0d0684cf637 100644 --- a/test/parallel/test-http-keep-alive-close-on-header.js +++ b/test/parallel/test-http-keep-alive-close-on-header.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var util = require('util'); var body = 'hello world\n'; var headers = {'connection': 'keep-alive'}; diff --git a/test/parallel/test-pipe-return-val.js b/test/parallel/test-pipe-return-val.js index 7bb43b59c36f0a..eab5db8f70cf92 100644 --- a/test/parallel/test-pipe-return-val.js +++ b/test/parallel/test-pipe-return-val.js @@ -4,7 +4,6 @@ require('../common'); var Stream = require('stream').Stream; var assert = require('assert'); -var util = require('util'); var sourceStream = new Stream(); var destStream = new Stream(); diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 10e0dedf53ec3e..68860e89460e1d 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -7,7 +7,6 @@ const stream = require('stream'); const REPL = require('internal/repl'); const assert = require('assert'); const fs = require('fs'); -const util = require('util'); const path = require('path'); const os = require('os'); diff --git a/test/parallel/test-repl-tab.js b/test/parallel/test-repl-tab.js index 1ab3b4743913bd..6474d8e4088167 100644 --- a/test/parallel/test-repl-tab.js +++ b/test/parallel/test-repl-tab.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); var assert = require('assert'); -var util = require('util'); var repl = require('repl'); var zlib = require('zlib'); diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index 59f82ad54f3cdf..99b73d7277aa52 100644 --- a/test/parallel/test-stream2-push.js +++ b/test/parallel/test-stream2-push.js @@ -5,7 +5,6 @@ var Readable = stream.Readable; var Writable = stream.Writable; var assert = require('assert'); -var util = require('util'); var EE = require('events').EventEmitter; diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 1295b691fb117d..a912b43d820e9f 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -3,8 +3,7 @@ require('../common'); var assert = require('assert'); -var url = require('url'), - util = require('util'); +var url = require('url'); // URLs to parse, and expected data // { url : parsed } From e566843935b69ef4576871e1e570fb589bd4253b Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 11 Jan 2016 11:39:51 -0800 Subject: [PATCH 119/262] deps: backport 066747e from upstream V8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This backport fixes a performance pathology in how arrays grow/shrink. Fixes: https://github.com/nodejs/node/issues/3538 V8-Commit: https://github.com/v8/v8/commit/066747ea053012a99e0cd3e20f36b8ed053b2124 PR-URL: https://github.com/nodejs/node/pull/4625 Reviewed-By: cjihrig - Colin Ihrig Reviewed-By: targos - Michaël Zasso Reviewed-By: indutny - Fedor Indutny Original commit message: Make sure that NormalizeElements and ShouldConvertToFastElements are … …based on the same values BUG=v8:4518 LOG=n Review URL: https://codereview.chromium.org/1472293002 Cr-Commit-Position: refs/heads/master@{#32265} Commit metadata for v4.x-staging: PR-URL: https://github.com/nodejs/node/pull/4655 Reviewed-By: James M Snell --- deps/v8/src/elements.cc | 17 +++++++++++------ deps/v8/src/objects.cc | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/deps/v8/src/elements.cc b/deps/v8/src/elements.cc index e830d7c4650052..f2ae31863a28ea 100644 --- a/deps/v8/src/elements.cc +++ b/deps/v8/src/elements.cc @@ -1100,13 +1100,18 @@ class FastElementsAccessor } int num_used = 0; for (int i = 0; i < backing_store->length(); ++i) { - if (!backing_store->is_the_hole(i)) ++num_used; - // Bail out early if more than 1/4 is used. - if (4 * num_used > backing_store->length()) break; - } - if (4 * num_used <= backing_store->length()) { - JSObject::NormalizeElements(obj); + if (!backing_store->is_the_hole(i)) { + ++num_used; + // Bail out if a number dictionary wouldn't be able to save at least + // 75% space. + if (4 * SeededNumberDictionary::ComputeCapacity(num_used) * + SeededNumberDictionary::kEntrySize > + backing_store->length()) { + return; + } + } } + JSObject::NormalizeElements(obj); } } diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 5c863855f89d79..e7d4844ad05329 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -12459,6 +12459,8 @@ static bool ShouldConvertToFastElements(JSObject* object, uint32_t dictionary_size = static_cast(dictionary->Capacity()) * SeededNumberDictionary::kEntrySize; + + // Turn fast if the dictionary only saves 50% space. return 2 * dictionary_size >= *new_capacity; } From dbf6537cc1779506dd1b7b11dbae9cbc42eae4de Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 18 Nov 2015 06:59:43 -0600 Subject: [PATCH 120/262] repl: use String#repeat instead of Array#join String#repeat is quite a bit faster than new Array().join(). PR-URL: https://github.com/nodejs/node/pull/3900 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Roman Reiss --- lib/repl.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 84ac726e1f1671..9c80ee59bd53d2 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -554,7 +554,8 @@ REPLServer.prototype.displayPrompt = function(preserveCursor) { var prompt = this._initialPrompt; if (this.bufferedCommand.length) { prompt = '...'; - var levelInd = new Array(this.lines.level.length).join('..'); + const len = this.lines.level.length ? this.lines.level.length - 1 : 0; + const levelInd = '..'.repeat(len); prompt += levelInd + ' '; } @@ -906,7 +907,8 @@ REPLServer.prototype.memory = function memory(cmd) { // save the line so I can do magic later if (cmd) { // TODO should I tab the level? - self.lines.push(new Array(self.lines.level.length).join(' ') + cmd); + const len = self.lines.level.length ? self.lines.level.length - 1 : 0; + self.lines.push(' '.repeat(len) + cmd); } else { // I don't want to not change the format too much... self.lines.push(''); From 54bb2fb80d398d3da06b71e0b829f8442835ef46 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Sun, 22 Nov 2015 17:08:45 +0800 Subject: [PATCH 121/262] util: faster arrayToHash The `util.format()` is used frequently, make the method faster is better. R-URL: https://github.com/nodejs/node/pull/3964 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: James M Snell --- Makefile | 3 +++ benchmark/util/inspect.js | 15 +++++++++++++++ lib/util.js | 5 +++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 benchmark/util/inspect.js diff --git a/Makefile b/Makefile index a99b112508c448..94eb41995367ed 100644 --- a/Makefile +++ b/Makefile @@ -493,6 +493,9 @@ bench-url: all bench-events: all @$(NODE) benchmark/common.js events +bench-util: all + @$(NODE) benchmark/common.js util + bench-all: bench bench-misc bench-array bench-buffer bench-url bench-events bench: bench-net bench-http bench-fs bench-tls diff --git a/benchmark/util/inspect.js b/benchmark/util/inspect.js new file mode 100644 index 00000000000000..8a59e6b48e54df --- /dev/null +++ b/benchmark/util/inspect.js @@ -0,0 +1,15 @@ +var util = require('util'); + +var common = require('../common.js'); + +var bench = common.createBenchmark(main, {n: [5e6]}); + +function main(conf) { + var n = conf.n | 0; + + bench.start(); + for (var i = 0; i < n; i += 1) { + var r = util.inspect({a: 'a', b: 'b', c: 'c', d: 'd'}); + } + bench.end(n); +} diff --git a/lib/util.js b/lib/util.js index 236adf35b87eab..6f8d841dd438f7 100644 --- a/lib/util.js +++ b/lib/util.js @@ -163,9 +163,10 @@ function stylizeNoColor(str, styleType) { function arrayToHash(array) { var hash = {}; - array.forEach(function(val, idx) { + for (var i = 0; i < array.length; i++) { + var val = array[i]; hash[val] = true; - }); + } return hash; } From fc79e180a9009abfcc69be3d3e26e7ad11badcff Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 30 Nov 2015 02:41:51 -0800 Subject: [PATCH 122/262] child_process: flush consuming streams When a client calls read() with a nonzero argument on a Socket, that Socket sets this._consuming to true. It never sets this._consuming back to false. ChildProcess.flushStdio() currently doesn't flush any streams where _consuming is truthy. But, that means that it never flushes any stream that has ever been read from. This prevents a child process from ever closing if one of its streams has been read from, causing issue #4049. This commit allows consuming streams to be flushed, and the child process to emit a close event. Fixes: https://github.com/nodejs/node/issues/4049 PR-URL: https://github.com/nodejs/node/pull/4071 Reviewed-By: Colin Ihrig --- lib/internal/child_process.js | 2 +- test/parallel/test-child-process-flush-stdio.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-child-process-flush-stdio.js diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 8c1abc5f746fc8..8b2e57eb10ba74 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -217,7 +217,7 @@ util.inherits(ChildProcess, EventEmitter); function flushStdio(subprocess) { if (subprocess.stdio == null) return; subprocess.stdio.forEach(function(stream, fd, stdio) { - if (!stream || !stream.readable || stream._consuming) + if (!stream || !stream.readable) return; stream.resume(); }); diff --git a/test/parallel/test-child-process-flush-stdio.js b/test/parallel/test-child-process-flush-stdio.js new file mode 100644 index 00000000000000..5fd7eb3bc99922 --- /dev/null +++ b/test/parallel/test-child-process-flush-stdio.js @@ -0,0 +1,17 @@ +'use strict'; +const cp = require('child_process'); +const common = require('../common'); +const assert = require('assert'); + +const p = cp.spawn('echo'); + +p.on('close', common.mustCall(function(code, signal) { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +})); + +p.stdout.read(); + +setTimeout(function() { + p.kill(); +}, 100); From eb55780b1843e4afff939fe53b1327db660d0636 Mon Sep 17 00:00:00 2001 From: Mudit Ameta Date: Wed, 2 Dec 2015 02:19:01 +0530 Subject: [PATCH 123/262] repl: Fixed node repl history edge case. If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: https://github.com/nodejs/node/issues/4102 PR-URL: https://github.com/nodejs/node/pull/4108 Reviewed-By: Jeremiah Senkpiel --- lib/internal/repl.js | 18 ++++++++++++++++-- test/fixtures/.empty-repl-history-file | 0 test/parallel/test-repl-persistent-history.js | 16 +++++++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/.empty-repl-history-file diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 1a62414a49e95d..79ad79abe87f04 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -120,7 +120,15 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { if (data) { repl.history = data.split(/[\n\r]+/, repl.historySize); - } else if (oldHistoryPath) { + } else if (oldHistoryPath === historyPath) { + // If pre-v3.0, the user had set NODE_REPL_HISTORY_FILE to + // ~/.node_repl_history, warn the user about it and proceed. + repl._writeToOutput( + '\nThe old repl history file has the same name and location as ' + + `the new one i.e., ${historyPath} and is empty.\nUsing it as is.\n`); + repl._refreshLine(); + + } else if (oldHistoryPath) { // Grab data from the older pre-v3.0 JSON NODE_REPL_HISTORY_FILE format. repl._writeToOutput( '\nConverting old JSON repl history to line-separated history.\n' + @@ -128,7 +136,13 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { repl._refreshLine(); try { - repl.history = JSON.parse(fs.readFileSync(oldHistoryPath, 'utf8')); + // Pre-v3.0, repl history was stored as JSON. + // Try and convert it to line separated history. + const oldReplJSONHistory = fs.readFileSync(oldHistoryPath, 'utf8'); + + // Only attempt to use the history if there was any. + if (oldReplJSONHistory) repl.history = JSON.parse(oldReplJSONHistory); + if (!Array.isArray(repl.history)) { throw new Error('Expected array, got ' + typeof repl.history); } diff --git a/test/fixtures/.empty-repl-history-file b/test/fixtures/.empty-repl-history-file new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 68860e89460e1d..7571527b73800d 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -65,6 +65,10 @@ const homedirErr = '\nError: Could not get the home directory.\n' + 'REPL session history will not be persisted.\n'; const replFailedRead = '\nError: Could not open history file.\n' + 'REPL session history will not be persisted.\n'; +const sameHistoryFilePaths = '\nThe old repl history file has the same name ' + + 'and location as the new one i.e., ' + + path.join(common.tmpDir, '.node_repl_history') + + ' and is empty.\nUsing it as is.\n'; // File paths const fixtures = path.join(common.testDir, 'fixtures'); const historyFixturePath = path.join(fixtures, '.node_repl_history'); @@ -72,9 +76,9 @@ const historyPath = path.join(common.tmpDir, '.fixture_copy_repl_history'); const historyPathFail = path.join(common.tmpDir, '.node_repl\u0000_history'); const oldHistoryPath = path.join(fixtures, 'old-repl-history-file.json'); const enoentHistoryPath = path.join(fixtures, 'enoent-repl-history-file.json'); +const emptyHistoryPath = path.join(fixtures, '.empty-repl-history-file'); const defaultHistoryPath = path.join(common.tmpDir, '.node_repl_history'); - const tests = [{ env: { NODE_REPL_HISTORY: '' }, test: [UP], @@ -92,6 +96,16 @@ const tests = [{ test: [UP], expected: [prompt, replDisabled, prompt] }, +{ + env: { NODE_REPL_HISTORY_FILE: emptyHistoryPath }, + test: [UP], + expected: [prompt, convertMsg, prompt] +}, +{ + env: { NODE_REPL_HISTORY_FILE: defaultHistoryPath }, + test: [UP], + expected: [prompt, sameHistoryFilePaths, prompt] +}, { env: { NODE_REPL_HISTORY: historyPath }, test: [UP, CLEAR], From bb0a9645e5bf207c1f5bf7fb49d68bd172e4ccd5 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 5 Dec 2015 16:53:30 -0500 Subject: [PATCH 124/262] crypto: load PFX chain the same way as regular one Load the certificate chain from the PFX file the same as we do it for a regular certificate chain. Fix: #4127 PR-URL: https://github.com/nodejs/node/pull/4165 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 170 +++++++++++++++++------- test/fixtures/keys/Makefile | 8 ++ test/fixtures/keys/agent1-pfx.pem | Bin 0 -> 2437 bytes test/parallel/test-tls-ocsp-callback.js | 33 ++++- 4 files changed, 156 insertions(+), 55 deletions(-) create mode 100644 test/fixtures/keys/agent1-pfx.pem diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 77ccbfcbbd3759..708f15f6961409 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -519,46 +519,35 @@ int SSL_CTX_get_issuer(SSL_CTX* ctx, X509* cert, X509** issuer) { } -// Read a file that contains our certificate in "PEM" format, -// possibly followed by a sequence of CA certificates that should be -// sent to the peer in the Certificate message. -// -// Taken from OpenSSL - editted for style. int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, - BIO* in, + X509* x, + STACK_OF(X509)* extra_certs, X509** cert, X509** issuer) { - int ret = 0; - X509* x = nullptr; + CHECK_EQ(*issuer, nullptr); + CHECK_EQ(*cert, nullptr); - x = PEM_read_bio_X509_AUX(in, nullptr, CryptoPemCallback, nullptr); - - if (x == nullptr) { - SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE, ERR_R_PEM_LIB); - goto end; - } - - ret = SSL_CTX_use_certificate(ctx, x); + int ret = SSL_CTX_use_certificate(ctx, x); if (ret) { // If we could set up our certificate, now proceed to // the CA certificates. - X509 *ca; int r; - unsigned long err; if (ctx->extra_certs != nullptr) { sk_X509_pop_free(ctx->extra_certs, X509_free); ctx->extra_certs = nullptr; } - while ((ca = PEM_read_bio_X509(in, nullptr, CryptoPemCallback, nullptr))) { + for (int i = 0; i < sk_X509_num(extra_certs); i++) { + X509* ca = sk_X509_value(extra_certs, i); + // NOTE: Increments reference count on `ca` r = SSL_CTX_add1_chain_cert(ctx, ca); if (!r) { - X509_free(ca); ret = 0; + *issuer = nullptr; goto end; } // Note that we must not free r if it was successfully @@ -569,17 +558,8 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, // Find issuer if (*issuer != nullptr || X509_check_issued(ca, x) != X509_V_OK) continue; - *issuer = ca; - } - // When the while loop ends, it's usually just EOF. - err = ERR_peek_last_error(); - if (ERR_GET_LIB(err) == ERR_LIB_PEM && - ERR_GET_REASON(err) == PEM_R_NO_START_LINE) { - ERR_clear_error(); - } else { - // some real error - ret = 0; + *issuer = ca; } } @@ -592,13 +572,88 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, // no need to free `store` } else { // Increment issuer reference count - CRYPTO_add(&(*issuer)->references, 1, CRYPTO_LOCK_X509); + *issuer = X509_dup(*issuer); + if (*issuer == nullptr) { + ret = 0; + goto end; + } } } end: + if (ret && x != nullptr) { + *cert = X509_dup(x); + if (*cert == nullptr) + ret = 0; + } + return ret; +} + + +// Read a file that contains our certificate in "PEM" format, +// possibly followed by a sequence of CA certificates that should be +// sent to the peer in the Certificate message. +// +// Taken from OpenSSL - edited for style. +int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, + BIO* in, + X509** cert, + X509** issuer) { + X509* x = nullptr; + + // Just to ensure that `ERR_peek_last_error` below will return only errors + // that we are interested in + ERR_clear_error(); + + x = PEM_read_bio_X509_AUX(in, nullptr, CryptoPemCallback, nullptr); + + if (x == nullptr) { + SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE, ERR_R_PEM_LIB); + return 0; + } + + X509* extra = nullptr; + int ret = 0; + unsigned long err = 0; + + // Read extra certs + STACK_OF(X509)* extra_certs = sk_X509_new_null(); + if (extra_certs == nullptr) { + SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE, ERR_R_MALLOC_FAILURE); + goto done; + } + + while ((extra = PEM_read_bio_X509(in, nullptr, CryptoPemCallback, nullptr))) { + if (sk_X509_push(extra_certs, extra)) + continue; + + // Failure, free all certs + goto done; + } + extra = nullptr; + + // When the while loop ends, it's usually just EOF. + err = ERR_peek_last_error(); + if (ERR_GET_LIB(err) == ERR_LIB_PEM && + ERR_GET_REASON(err) == PEM_R_NO_START_LINE) { + ERR_clear_error(); + } else { + // some real error + goto done; + } + + ret = SSL_CTX_use_certificate_chain(ctx, x, extra_certs, cert, issuer); + if (!ret) + goto done; + + done: + if (extra_certs != nullptr) + sk_X509_pop_free(extra_certs, X509_free); + if (extra != nullptr) + X509_free(extra); if (x != nullptr) - *cert = x; + X509_free(x); + return ret; } @@ -616,6 +671,16 @@ void SecureContext::SetCert(const FunctionCallbackInfo& args) { if (!bio) return; + // Free previous certs + if (sc->issuer_ != nullptr) { + X509_free(sc->issuer_); + sc->issuer_ = nullptr; + } + if (sc->cert_ != nullptr) { + X509_free(sc->cert_); + sc->cert_ = nullptr; + } + int rv = SSL_CTX_use_certificate_chain(sc->ctx_, bio, &sc->cert_, @@ -887,7 +952,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo& args) { PKCS12* p12 = nullptr; EVP_PKEY* pkey = nullptr; X509* cert = nullptr; - STACK_OF(X509)* extraCerts = nullptr; + STACK_OF(X509)* extra_certs = nullptr; char* pass = nullptr; bool ret = false; @@ -912,28 +977,33 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo& args) { pass[passlen] = '\0'; } + // Free previous certs + if (sc->issuer_ != nullptr) { + X509_free(sc->issuer_); + sc->issuer_ = nullptr; + } + if (sc->cert_ != nullptr) { + X509_free(sc->cert_); + sc->cert_ = nullptr; + } + if (d2i_PKCS12_bio(in, &p12) && - PKCS12_parse(p12, pass, &pkey, &cert, &extraCerts) && - SSL_CTX_use_certificate(sc->ctx_, cert) && + PKCS12_parse(p12, pass, &pkey, &cert, &extra_certs) && + SSL_CTX_use_certificate_chain(sc->ctx_, + cert, + extra_certs, + &sc->cert_, + &sc->issuer_) && SSL_CTX_use_PrivateKey(sc->ctx_, pkey)) { - // set extra certs - while (X509* x509 = sk_X509_pop(extraCerts)) { - if (!sc->ca_store_) { - sc->ca_store_ = X509_STORE_new(); - SSL_CTX_set_cert_store(sc->ctx_, sc->ca_store_); - } - - X509_STORE_add_cert(sc->ca_store_, x509); - SSL_CTX_add_client_CA(sc->ctx_, x509); - X509_free(x509); - } + ret = true; + } + if (pkey != nullptr) EVP_PKEY_free(pkey); + if (cert != nullptr) X509_free(cert); - sk_X509_free(extraCerts); - - ret = true; - } + if (extra_certs != nullptr) + sk_X509_free(extra_certs); PKCS12_free(p12); BIO_free_all(in); diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile index 143986274a6b93..1148e529cd9595 100644 --- a/test/fixtures/keys/Makefile +++ b/test/fixtures/keys/Makefile @@ -79,6 +79,14 @@ agent1-cert.pem: agent1-csr.pem ca1-cert.pem ca1-key.pem -CAcreateserial \ -out agent1-cert.pem +agent1-pfx.pem: agent1-cert.pem agent1-key.pem ca1-cert.pem + openssl pkcs12 -export \ + -in agent1-cert.pem \ + -inkey agent1-key.pem \ + -certfile ca1-cert.pem \ + -out agent1-pfx.pem \ + -password pass:sample + agent1-verify: agent1-cert.pem ca1-cert.pem openssl verify -CAfile ca1-cert.pem agent1-cert.pem diff --git a/test/fixtures/keys/agent1-pfx.pem b/test/fixtures/keys/agent1-pfx.pem new file mode 100644 index 0000000000000000000000000000000000000000..a36e746a72e06e8dd913f335c1e889ae7646513e GIT binary patch literal 2437 zcmY+FX*3j!8pq8T!w^H33`WSEit-0U(9ItpEOS1^`BKfLNNlr?OJ1>&rkO z3qvH1X(dN!wDhm`p>`5u2ycJP%BvjJ|M6vKhd;iYzes8nQ|!joljb@5azgeWC}Z z&F_;+#ve_b0>Q#cx75wAv&P%l*yy0F^DM6)tq0GSx^4ui4Ne&udX}a~CPGT*!kk^U zl>Euzs|^nx_e+f0$Gk!N9!3~744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IN|e1fWsBW#73X~+R&$(GPx^ZuW7+UzLQ zJzCyeRPsG9Ku*Y_w_F{FI;PJV&3u>h84EOM%nhK*|5@7EtOHe>onbsnajAP|yU*{T zK_oxkZfb{Ab16u}9s5@FY@=QYKKl{P*=-#e0qL}7vkYf%5v2yUP5C829F3sl7|)2u zt6GaF;!KUMAORP8fhgt8@xd6~J>r61k7}igApje!~o(+nE`3(5W?;=yp=dQhfSj=T3y`$v7kO@dNR67MEq{|zW{xI BfE@q; literal 0 HcmV?d00001 diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index d970b2ab013446..a11be7ac22d1c5 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -22,11 +22,7 @@ var constants = require('constants'); var fs = require('fs'); var join = require('path').join; -test({ response: false }, function() { - test({ response: 'hello world' }, function() { - test({ ocsp: false }); - }); -}); +var pfx = fs.readFileSync(join(common.fixturesDir, 'keys', 'agent1-pfx.pem')); function test(testOptions, cb) { @@ -47,6 +43,13 @@ function test(testOptions, cb) { var ocspResponse; var session; + if (testOptions.pfx) { + delete options.key; + delete options.cert; + options.pfx = testOptions.pfx; + options.passphrase = testOptions.passphrase; + } + var server = tls.createServer(options, function(cleartext) { cleartext.on('error', function(er) { // We're ok with getting ECONNRESET in this test, but it's @@ -106,3 +109,23 @@ function test(testOptions, cb) { assert.equal(ocspCount, 1); }); } + +var tests = [ + { response: false }, + { response: 'hello world' }, + { ocsp: false } +]; + +if (!common.hasFipsCrypto) { + tests.push({ pfx: pfx, passphrase: 'sample', response: 'hello pfx' }); +} + +function runTests(i) { + if (i === tests.length) return; + + test(tests[i], common.mustCall(function() { + runTests(i + 1); + })); +} + +runTests(0); From 44bb76323379c0fe61aadea6fade49c05e1ea876 Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 6 Dec 2015 04:55:02 -0800 Subject: [PATCH 125/262] http: remove excess calls to removeSocket socket.destroy() triggers a 'close' event from the socket which triggers the onClose handler of HTTPAgent which calls self.removeSocket(). So by calling self.removeSocket() prior to socket.destroy() we end up with two calls to self.removeSocket(). If there are pending requests, removeSocket ends up creating a new socket. So if there are pending requests, each time a request completes, we tear down one socket and create two more. So the total number of sockets grows exponentially and without regard for any maxSockets settings. This was noticed in https://github.com/nodejs/node/issues/4050. Let's get rid of the extra calls to removeSocket so we only call it once per completed request. PR-URL: https://github.com/nodejs/node/pull/4172 Reviewed-By: Brian White Reviewed-By: James M Snell Reviewed-By: Fedor Indutny --- lib/_http_agent.js | 2 - ...test-http-agent-maxsockets-regress-4050.js | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-http-agent-maxsockets-regress-4050.js diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 305baa2cbd2f03..c6e3ef63bd72af 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -66,7 +66,6 @@ function Agent(options) { count += self.sockets[name].length; if (count > self.maxSockets || freeLen >= self.maxFreeSockets) { - self.removeSocket(socket, options); socket.destroy(); } else { freeSockets = freeSockets || []; @@ -78,7 +77,6 @@ function Agent(options) { freeSockets.push(socket); } } else { - self.removeSocket(socket, options); socket.destroy(); } } diff --git a/test/parallel/test-http-agent-maxsockets-regress-4050.js b/test/parallel/test-http-agent-maxsockets-regress-4050.js new file mode 100644 index 00000000000000..1cbe37cf0cc443 --- /dev/null +++ b/test/parallel/test-http-agent-maxsockets-regress-4050.js @@ -0,0 +1,43 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const MAX_SOCKETS = 2; + +const agent = new http.Agent({ + keepAlive: true, + keepAliveMsecs: 1000, + maxSockets: MAX_SOCKETS, + maxFreeSockets: 2 +}); + +const server = http.createServer(function(req, res) { + res.end('hello world'); +}); + +function get(path, callback) { + return http.get({ + host: 'localhost', + port: common.PORT, + agent: agent, + path: path + }, callback); +} + +server.listen(common.PORT, function() { + var finished = 0; + const num_requests = 6; + for (var i = 0; i < num_requests; i++) { + const request = get('/1', function() { + }); + request.on('response', function() { + request.abort(); + const sockets = agent.sockets[Object.keys(agent.sockets)[0]]; + assert(sockets.length <= MAX_SOCKETS); + if (++finished === num_requests) { + server.close(); + } + }); + } +}); From 1ca43b9bc7751ab9c405b58954da49d1252d9100 Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Fri, 11 Dec 2015 17:43:04 -0800 Subject: [PATCH 126/262] test: add test-domain-exit-dispose-again back 1c8584997346d549dd5ff4bb787f48f52440a9cb "fixed" test-domain-exit-dispose-again by changing its logic to test that process.domain was cleared properly in case an error was thrown from a timer's callback. However, it became clear when reviewing a recent change that refactors lib/timers.js that it was not quite the intention of the original test. Thus, this change adds the original implementation of test-domain-exit-dispose-again back, with comments that make its implementation easier to understand. It also preserve the changes made by 1c8584997346d549dd5ff4bb787f48f52440a9cb, but it moves them to a new test file named test-timers-reset-process-domain-on-throw.js. PR: #4256 PR-URL: https://github.com/nodejs/node/pull/4256 Reviewed-By: Jeremiah Senkpiel --- .../test-domain-exit-dispose-again.js | 99 +++++++++++++------ ...st-timers-reset-process-domain-on-throw.js | 45 +++++++++ 2 files changed, 113 insertions(+), 31 deletions(-) create mode 100644 test/parallel/test-timers-reset-process-domain-on-throw.js diff --git a/test/parallel/test-domain-exit-dispose-again.js b/test/parallel/test-domain-exit-dispose-again.js index 6fe9f25fb0d887..3cae101fd69c39 100644 --- a/test/parallel/test-domain-exit-dispose-again.js +++ b/test/parallel/test-domain-exit-dispose-again.js @@ -1,39 +1,76 @@ 'use strict'; -const common = require('../common'); -const assert = require('assert'); -const domain = require('domain'); -// Use the same timeout value so that both timers' callbacks are called during -// the same invocation of the underlying native timer's callback (listOnTimeout -// in lib/timers.js). -setTimeout(err, 50); -setTimeout(common.mustCall(secondTimer), 50); +// This test makes sure that when a domain is disposed, timers that are +// attached to that domain are not fired, but timers that are _not_ attached +// to that domain, including those whose callbacks are called from within +// the same invocation of listOnTimeout, _are_ called. -function err() { +var common = require('../common'); +var assert = require('assert'); +var domain = require('domain'); +var disposalFailed = false; + +// Repeatedly schedule a timer with a delay different than the timers attached +// to a domain that will eventually be disposed to make sure that they are +// called, regardless of what happens with those timers attached to domains +// that will eventually be disposed. +var a = 0; +log(); +function log() { + console.log(a++, process.domain); + if (a < 10) setTimeout(log, 20); +} + +var secondTimerRan = false; + +// Use the same timeout duration for both "firstTimer" and "secondTimer" +// callbacks so that they are called during the same invocation of the +// underlying native timer's callback (listOnTimeout in lib/timers.js). +const TIMEOUT_DURATION = 50; + +setTimeout(function firstTimer() { const d = domain.create(); - d.on('error', handleDomainError); - d.run(err2); - function err2() { - // this function doesn't exist, and throws an error as a result. + d.on('error', function handleError(err) { + // Dispose the domain on purpose, so that we can test that nestedTimer + // is not called since it's associated to this domain and a timer whose + // domain is diposed should not run. + d.dispose(); + console.error(err); + console.error('in domain error handler', + process.domain, process.domain === d); + }); + + d.run(function() { + // Create another nested timer that is by definition associated to the + // domain "d". Because an error is thrown before the timer's callback + // is called, and because the domain's error handler disposes the domain, + // this timer's callback should never run. + setTimeout(function nestedTimer() { + console.error('Nested timer should not run, because it is attached to ' + + 'a domain that should be disposed.'); + disposalFailed = true; + process.exit(1); + }); + + // Make V8 throw an unreferenced error. As a result, the domain's error + // handler is called, which disposes the domain "d" and should prevent the + // nested timer that is attached to it from running. err3(); - } + }); +}, TIMEOUT_DURATION); - function handleDomainError(e) { - // In the domain's error handler, the current active domain should be the - // domain within which the error was thrown. - assert.equal(process.domain, d); - } -} +// This timer expires in the same invocation of listOnTimeout than firstTimer, +// but because it's not attached to any domain, it must run regardless of +// domain "d" being disposed. +setTimeout(function secondTimer() { + console.log('In second timer'); + secondTimerRan = true; +}, TIMEOUT_DURATION); -function secondTimer() { - // secondTimer was scheduled before any domain had been created, so its - // callback should not have any active domain set when it runs. - // Do not use assert here, as it throws errors and if a domain with an error - // handler is active, then asserting wouldn't make the test fail. - if (process.domain !== null) { - console.log('process.domain should be null, but instead is:', - process.domain); - process.exit(1); - } -} +process.on('exit', function() { + assert.equal(a, 10); + assert.equal(disposalFailed, false); + assert(secondTimerRan); + console.log('ok'); +}); diff --git a/test/parallel/test-timers-reset-process-domain-on-throw.js b/test/parallel/test-timers-reset-process-domain-on-throw.js new file mode 100644 index 00000000000000..f72530b5423886 --- /dev/null +++ b/test/parallel/test-timers-reset-process-domain-on-throw.js @@ -0,0 +1,45 @@ +'use strict'; + +// This test makes sure that when throwing from within a timer's callback, +// its active domain at the time of the throw is not the process' active domain +// for the next timers that need to be processed on the same turn of the event +// loop. + +const common = require('../common'); +const assert = require('assert'); +const domain = require('domain'); + +// Use the same timeout value so that both timers' callbacks are called during +// the same invocation of the underlying native timer's callback (listOnTimeout +// in lib/timers.js). +setTimeout(err, 50); +setTimeout(common.mustCall(secondTimer), 50); + +function err() { + const d = domain.create(); + d.on('error', handleDomainError); + d.run(err2); + + function err2() { + // this function doesn't exist, and throws an error as a result. + err3(); + } + + function handleDomainError(e) { + // In the domain's error handler, the current active domain should be the + // domain within which the error was thrown. + assert.equal(process.domain, d); + } +} + +function secondTimer() { + // secondTimer was scheduled before any domain had been created, so its + // callback should not have any active domain set when it runs. + if (process.domain !== null) { + console.log('process.domain should be null in this timer callback, but ' + + 'instead is:', process.domain); + // Do not use assert here, as it throws errors and if a domain with an error + // handler is active, then asserting wouldn't make the test fail. + process.exit(1); + } +} From a9ca039580d4853e1784bb1b60ffe6b423f9d955 Mon Sep 17 00:00:00 2001 From: Martin Bark Date: Mon, 14 Dec 2015 21:36:21 +0000 Subject: [PATCH 127/262] os: fix crash in GetInterfaceAddresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are uninitialised. This can cause a segmentation fault inside GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error. This issue was observed when using uCLibc-ng version 1.0.9 because uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly undefines HAVE_IFADDRS_H. Signed-off-by: Martin Bark PR-URL: https://github.com/nodejs/node/pull/4272 Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: James M Snell Reviewed-By: Rod Vagg --- src/node_os.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_os.cc b/src/node_os.cc index a1000907485519..92f53a9c407fae 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -200,7 +200,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo& args) { ret = Object::New(env->isolate()); if (err == UV_ENOSYS) { - args.GetReturnValue().Set(ret); + return args.GetReturnValue().Set(ret); } else if (err) { return env->ThrowUVException(err, "uv_interface_addresses"); } From 11526bd1c4704e93453825e8b3e0e117c3b2fe75 Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Wed, 16 Dec 2015 18:31:38 -0800 Subject: [PATCH 128/262] http: Remove an unnecessary assignment This just removes an assignment to `ret` of a value that's not used before it's overwritten. Immediately following the assigment is an `if/else` in which both branches assign to `ret` without using it. PR-URL: https://github.com/nodejs/node/pull/4323 Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: James M Snell --- lib/_http_outgoing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index d130246b84dc58..8a6f76a357d40d 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -560,7 +560,7 @@ OutgoingMessage.prototype.end = function(data, encoding, callback) { var ret; if (data) { // Normal body write. - ret = this.write(data, encoding); + this.write(data, encoding); } if (this._hasBody && this.chunkedEncoding) { From 81104591982a5a2fe75a36b1a7c7e1873c94ed2f Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Thu, 17 Dec 2015 17:44:34 +0800 Subject: [PATCH 129/262] buffer: faster case for create Buffer from new Buffer(0) When create Buffer from a Buffer will copy data from old to new even though length is zero. This patch can improve edge case 4x faster. following is benchmark results. new: buffers/buffer_zero.js n=1024: 2463.53891 old: buffers/buffer_zero.js n=1024: 618.70801 PR-URL: https://github.com/nodejs/node/pull/4326 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- benchmark/buffers/buffer_zero.js | 18 ++++++++++++++++++ lib/buffer.js | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 benchmark/buffers/buffer_zero.js diff --git a/benchmark/buffers/buffer_zero.js b/benchmark/buffers/buffer_zero.js new file mode 100644 index 00000000000000..461378758b5951 --- /dev/null +++ b/benchmark/buffers/buffer_zero.js @@ -0,0 +1,18 @@ +'use strict'; + +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + n: [1024] +}); + +const zero = new Buffer(0); + +function main(conf) { + var n = +conf.n; + bench.start(); + for (let i = 0; i < n * 1024; i++) { + new Buffer(zero); + } + bench.end(n); +} diff --git a/lib/buffer.js b/lib/buffer.js index 378dde79a1c085..31deb522ba190a 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -123,6 +123,10 @@ function fromString(string, encoding) { function fromObject(obj) { if (obj instanceof Buffer) { var b = allocate(obj.length); + + if (b.length === 0) + return b; + obj.copy(b, 0, 0, obj.length); return b; } From a22b3896af9edf590e24394cf94b2d63aaf8e6dc Mon Sep 17 00:00:00 2001 From: Claudio Rodriguez Date: Thu, 17 Dec 2015 10:05:45 -0300 Subject: [PATCH 130/262] assert: typed array deepequal performance fix assert.deepEqual: when actual and expected are typed arrays, wrap them in a new Buffer each to increase performance significantly. PR-URL: https://github.com/nodejs/node/pull/4330 Fixes: https://github.com/nodejs/node/issues/4294 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig --- .../deepequal-prims-and-objs-big-array.js | 37 +++++++++++++++++ .../deepequal-prims-and-objs-big-loop.js | 30 ++++++++++++++ benchmark/assert/deepequal-typedarrays.js | 22 ++++++++++ lib/assert.js | 5 +++ .../test-assert-typedarray-deepequal.js | 41 +++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 benchmark/assert/deepequal-prims-and-objs-big-array.js create mode 100644 benchmark/assert/deepequal-prims-and-objs-big-loop.js create mode 100644 benchmark/assert/deepequal-typedarrays.js create mode 100644 test/parallel/test-assert-typedarray-deepequal.js diff --git a/benchmark/assert/deepequal-prims-and-objs-big-array.js b/benchmark/assert/deepequal-prims-and-objs-big-array.js new file mode 100644 index 00000000000000..d8d2b57331f7ef --- /dev/null +++ b/benchmark/assert/deepequal-prims-and-objs-big-array.js @@ -0,0 +1,37 @@ +'use strict'; +var common = require('../common.js'); +var assert = require('assert'); +var bench = common.createBenchmark(main, { + prim: [ + null, + undefined, + 'a', + 1, + true, + {0: 'a'}, + [1, 2, 3], + new Array([1, 2, 3]) + ], + n: [25] +}); + +function main(conf) { + var prim = conf.prim; + var n = +conf.n; + var primArray; + var primArrayCompare; + var x; + + primArray = new Array(); + primArrayCompare = new Array(); + for (x = 0; x < (1e5); x++) { + primArray.push(prim); + primArrayCompare.push(prim); + } + + bench.start(); + for (x = 0; x < n; x++) { + assert.deepEqual(primArray, primArrayCompare); + } + bench.end(n); +} diff --git a/benchmark/assert/deepequal-prims-and-objs-big-loop.js b/benchmark/assert/deepequal-prims-and-objs-big-loop.js new file mode 100644 index 00000000000000..5f0519bb3b45ad --- /dev/null +++ b/benchmark/assert/deepequal-prims-and-objs-big-loop.js @@ -0,0 +1,30 @@ +'use strict'; +var common = require('../common.js'); +var assert = require('assert'); +var bench = common.createBenchmark(main, { + prim: [ + null, + undefined, + 'a', + 1, + true, + {0: 'a'}, + [1, 2, 3], + new Array([1, 2, 3]) + ], + n: [1e5] +}); + +function main(conf) { + var prim = conf.prim; + var n = +conf.n; + var x; + + bench.start(); + + for (x = 0; x < n; x++) { + assert.deepEqual(new Array([prim]), new Array([prim])); + } + + bench.end(n); +} diff --git a/benchmark/assert/deepequal-typedarrays.js b/benchmark/assert/deepequal-typedarrays.js new file mode 100644 index 00000000000000..99c13206d7560a --- /dev/null +++ b/benchmark/assert/deepequal-typedarrays.js @@ -0,0 +1,22 @@ +'use strict'; +var common = require('../common.js'); +var assert = require('assert'); +var bench = common.createBenchmark(main, { + type: ('Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array ' + + 'Float32Array Float64Array Uint8ClampedArray').split(' '), + n: [1] +}); + +function main(conf) { + var type = conf.type; + var clazz = global[type]; + var n = +conf.n; + + bench.start(); + var actual = new clazz(n * 1e6); + var expected = new clazz(n * 1e6); + + assert.deepEqual(actual, expected); + + bench.end(n); +} diff --git a/lib/assert.js b/lib/assert.js index 6b99098c5fda35..f8dc97dfcfcd43 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -170,6 +170,11 @@ function _deepEqual(actual, expected, strict) { (expected === null || typeof expected !== 'object')) { return strict ? actual === expected : actual == expected; + // If both values are instances of typed arrays, wrap them in + // a Buffer each to increase performance + } else if (ArrayBuffer.isView(actual) && ArrayBuffer.isView(expected)) { + return compare(new Buffer(actual), new Buffer(expected)) === 0; + // 7.5 For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js new file mode 100644 index 00000000000000..32748784dfe9a8 --- /dev/null +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -0,0 +1,41 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const a = require('assert'); + +function makeBlock(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function() { + return f.apply(this, args); + }; +} + +const equalArrayPairs = [ + [new Uint8Array(1e5), new Uint8Array(1e5)], + [new Uint16Array(1e5), new Uint16Array(1e5)], + [new Uint32Array(1e5), new Uint32Array(1e5)], + [new Uint8ClampedArray(1e5), new Uint8ClampedArray(1e5)], + [new Int8Array(1e5), new Int8Array(1e5)], + [new Int16Array(1e5), new Int16Array(1e5)], + [new Int32Array(1e5), new Int32Array(1e5)], + [new Float32Array(1e5), new Float32Array(1e5)], + [new Float64Array(1e5), new Float64Array(1e5)] +]; + +const notEqualArrayPairs = [ + [new Uint8Array(2), new Uint8Array(3)], + [new Uint8Array([1, 2, 3]), new Uint8Array([4, 5, 6])], + [new Uint8ClampedArray([300, 2, 3]), new Uint8Array([300, 2, 3])] +]; + +equalArrayPairs.forEach((arrayPair) => { + assert.deepEqual(arrayPair[0], arrayPair[1]); +}); + +notEqualArrayPairs.forEach((arrayPair) => { + assert.throws( + makeBlock(a.deepEqual, arrayPair[0], arrayPair[1]), + a.AssertionError + ); +}); From b3c99175519323fb3e4b42e48745e0a0ce9b6d22 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Fri, 18 Dec 2015 10:09:15 +0800 Subject: [PATCH 131/262] buffer: refactor create buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use createBuffer to reduce new Uint8Array() and setPrototypeOf. PR-URL: https://github.com/nodejs/node/pull/4340 Reviewed-By: Michaël Zasso Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Trevor Norris Reviewed-By: Ben Noordhuis --- lib/buffer.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 31deb522ba190a..9c6b6c94162833 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -19,13 +19,17 @@ binding.setupBufferJS(Buffer.prototype, bindingObj); const flags = bindingObj.flags; const kNoZeroFill = 0; +function createBuffer(size) { + const ui8 = new Uint8Array(size); + Object.setPrototypeOf(ui8, Buffer.prototype); + return ui8; +} function createPool() { poolSize = Buffer.poolSize; if (poolSize > 0) flags[kNoZeroFill] = 1; - allocPool = new Uint8Array(poolSize); - Object.setPrototypeOf(allocPool, Buffer.prototype); + allocPool = createBuffer(poolSize); poolOffset = 0; } createPool(); @@ -67,9 +71,7 @@ function SlowBuffer(length) { length = 0; if (length > 0) flags[kNoZeroFill] = 1; - const ui8 = new Uint8Array(+length); - Object.setPrototypeOf(ui8, Buffer.prototype); - return ui8; + return createBuffer(+length); } Object.setPrototypeOf(SlowBuffer.prototype, Uint8Array.prototype); @@ -78,9 +80,7 @@ Object.setPrototypeOf(SlowBuffer, Uint8Array); function allocate(size) { if (size === 0) { - const ui8 = new Uint8Array(size); - Object.setPrototypeOf(ui8, Buffer.prototype); - return ui8; + return createBuffer(size); } if (size < (Buffer.poolSize >>> 1)) { if (size > (poolSize - poolOffset)) @@ -95,9 +95,7 @@ function allocate(size) { // being zero filled. if (size > 0) flags[kNoZeroFill] = 1; - const ui8 = new Uint8Array(size); - Object.setPrototypeOf(ui8, Buffer.prototype); - return ui8; + return createBuffer(size); } } From 6924b6c5d8b195866c255b90a1acb1a23673d3c3 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 22 Dec 2015 13:22:52 -0500 Subject: [PATCH 132/262] https: use `servername` in agent key https requests with different SNI values should not be sent over the same connection, even if the `host` is the same. Server may want to present different certificate or route the incoming TLS connection differently, depending on the received servername extension. Fix: https://github.com/nodejs/node/issues/3940 PR-URL: https://github.com/nodejs/node/pull/4389 Reviewed-By: Ben Noordhuis --- lib/https.js | 4 +++ test/parallel/test-https-agent-sni.js | 52 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 test/parallel/test-https-agent-sni.js diff --git a/lib/https.js b/lib/https.js index abe4a20907dfdd..f13c1ffea96be8 100644 --- a/lib/https.js +++ b/lib/https.js @@ -123,6 +123,10 @@ Agent.prototype.getName = function(options) { if (options.rejectUnauthorized !== undefined) name += options.rejectUnauthorized; + name += ':'; + if (options.servername && options.servername !== options.host) + name += options.servername; + return name; }; diff --git a/test/parallel/test-https-agent-sni.js b/test/parallel/test-https-agent-sni.js new file mode 100644 index 00000000000000..117075f68264b4 --- /dev/null +++ b/test/parallel/test-https-agent-sni.js @@ -0,0 +1,52 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +if (!common.hasCrypto) { + console.log('1..0 # Skipped: missing crypto'); + return; +} +const https = require('https'); + +const fs = require('fs'); + +const options = { + key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), + cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') +}; + +const TOTAL = 4; +var waiting = TOTAL; + +const server = https.Server(options, function(req, res) { + if (--waiting === 0) server.close(); + + res.writeHead(200, { + 'x-sni': req.socket.servername + }); + res.end('hello world'); +}); + +server.listen(common.PORT, function() { + function expectResponse(id) { + return common.mustCall(function(res) { + res.resume(); + assert.equal(res.headers['x-sni'], 'sni.' + id); + }); + } + + var agent = new https.Agent({ + maxSockets: 1 + }); + for (var j = 0; j < TOTAL; j++) { + https.get({ + agent: agent, + + path: '/', + port: common.PORT, + host: '127.0.0.1', + servername: 'sni.' + j, + rejectUnauthorized: false + }, expectResponse(j)); + } +}); From 337d225329579ba5c3a0d6433d83db3b24dfa68b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 11:34:07 -0800 Subject: [PATCH 133/262] repl: remove unused function replStart() was defined but never used. The function has been removed. Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Chris Dickinson --- lib/internal/repl.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 79ad79abe87f04..e6b41fbdd89b65 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -14,12 +14,6 @@ module.exports.createInternalRepl = createRepl; // The debounce is to guard against code pasted into the REPL. const kDebounceHistoryMS = 15; -// XXX(chrisdickinson): hack to make sure that the internal debugger -// uses the original repl. -function replStart() { - return REPL.start.apply(REPL, arguments); -} - function createRepl(env, opts, cb) { if (typeof opts === 'function') { cb = opts; From 4a7558ee6103636f0691c1ea0a2280f80cdb887c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 13:09:34 -0800 Subject: [PATCH 134/262] test: remove unused var from test-assert.js `aethrow` is defined as a function returned from makeBlock() but the function is never used and the call to makeBlock() does not run any tests. PR-URL: https://github.com/nodejs/node/pull/4405 Reviewed-By: James M Snell --- test/parallel/test-assert.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 7e40ecb78b80c4..b28ca03ca97e65 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -271,8 +271,6 @@ assert.throws(makeBlock(a.deepStrictEqual, new Boolean(true), {}), function thrower(errorConstructor) { throw new errorConstructor('test'); } -var aethrow = makeBlock(thrower, a.AssertionError); -aethrow = makeBlock(thrower, a.AssertionError); // the basic calls work assert.throws(makeBlock(thrower, a.AssertionError), From 187ab4a746fe93e486107e2e388386709d0928e5 Mon Sep 17 00:00:00 2001 From: Damian Schenkelman Date: Wed, 23 Dec 2015 20:52:01 -0300 Subject: [PATCH 135/262] http: use `self.keepAlive` instead of `self.options.keepAlive` In http.agent, all other options are directly accessed through `self.` not `self.options`. PR-URL: https://github.com/nodejs/node/pull/4407 Reviewed-By: Brian White Reviewed-By: Fedor Indutny Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/_http_agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_agent.js b/lib/_http_agent.js index c6e3ef63bd72af..ddb1c5bfff9b63 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -58,7 +58,7 @@ function Agent(options) { if (req && req.shouldKeepAlive && !socket.destroyed && - self.options.keepAlive) { + self.keepAlive) { var freeSockets = self.freeSockets[name]; var freeLen = freeSockets ? freeSockets.length : 0; var count = freeLen; From a7b58efd472f0274542e710e1b761fcf8ab3177a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 24 Dec 2015 13:00:29 -0800 Subject: [PATCH 136/262] child_process: guard against race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is possible that the internal hnadleMessage() might try to send to a channel that has been closed. The result can be an AssertionError. Guard against this. Fixes: https://github.com/nodejs/node/issues/4205 PR-URL: https://github.com/nodejs/node/pull/4418 Reviewed-By: Brian White Reviewed-By: Johan Bergström --- lib/internal/child_process.js | 3 ++ test/parallel/test-cluster-disconnect-race.js | 33 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 test/parallel/test-cluster-disconnect-race.js diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 8b2e57eb10ba74..b4365fb8c067f7 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -675,6 +675,9 @@ function setupChannel(target, channel) { const INTERNAL_PREFIX = 'NODE_'; function handleMessage(target, message, handle) { + if (!target._channel) + return; + var eventName = 'message'; if (message !== null && typeof message === 'object' && diff --git a/test/parallel/test-cluster-disconnect-race.js b/test/parallel/test-cluster-disconnect-race.js new file mode 100644 index 00000000000000..40cfd919e3e964 --- /dev/null +++ b/test/parallel/test-cluster-disconnect-race.js @@ -0,0 +1,33 @@ +'use strict'; + +// This code triggers an AssertionError on Linux in Node.js 5.3.0 and earlier. +// Ref: https://github.com/nodejs/node/issues/4205 + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const cluster = require('cluster'); +cluster.schedulingPolicy = cluster.SCHED_NONE; + +if (cluster.isMaster) { + var worker1, worker2; + + worker1 = cluster.fork(); + worker1.on('message', common.mustCall(function() { + worker2 = cluster.fork(); + worker1.disconnect(); + worker2.on('online', common.mustCall(worker2.disconnect)); + })); + + cluster.on('exit', function(worker, code) { + assert.strictEqual(code, 0, 'worker exited with error'); + }); + + return; +} + +var server = net.createServer(); + +server.listen(common.PORT, function() { + process.send('listening'); +}); From 44a1b10bf60a38420cc19c9ed4d90db757a5a5a5 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 22:45:46 -0800 Subject: [PATCH 137/262] test: remove unused assert module imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many test modules load assert but do not use it. This change removes those instances. It also removes a handful of other unused variables when they were nearby. PR-URL: https://github.com/nodejs/node/pull/4438 Reviewed-By: Michaël Zasso Reviewed-By: Brian White Reviewed-By: Colin Ihrig --- test/addons/buffer-free-callback/test.js | 1 - test/message/2100bytes.js | 1 - test/message/eval_messages.js | 1 - test/message/hello_world.js | 1 - test/message/nexttick_throw.js | 1 - test/message/stack_overflow.js | 1 - test/message/stdin_messages.js | 1 - test/message/throw_custom_error.js | 1 - test/message/throw_custom_error.out | 2 +- test/message/throw_in_line_with_tabs.js | 1 - test/message/throw_in_line_with_tabs.out | 2 +- test/message/throw_non_error.js | 1 - test/message/throw_non_error.out | 2 +- test/message/throw_null.js | 1 - test/message/throw_null.out | 2 +- test/message/throw_undefined.js | 1 - test/message/throw_undefined.out | 2 +- test/message/timeout_throw.js | 1 - test/message/undefined_reference_in_new_context.js | 1 - test/message/vm_display_runtime_error.js | 1 - test/message/vm_display_syntax_error.js | 3 +-- test/message/vm_dont_display_runtime_error.js | 3 +-- test/message/vm_dont_display_syntax_error.js | 1 - test/parallel/test-cluster-dgram-2.js | 1 - test/parallel/test-cluster-rr-ref.js | 1 - test/parallel/test-crypto-verify-failure.js | 13 ++++--------- test/parallel/test-dgram-empty-packet.js | 2 -- test/parallel/test-dgram-send-empty-buffer.js | 3 --- test/parallel/test-domain-stack.js | 2 -- test/parallel/test-repl-domain.js | 3 +-- test/parallel/test-require-extensions-main.js | 1 - test/parallel/test-stream-pipe-cleanup-pause.js | 1 - .../test-stream2-pipe-error-once-listener.js | 1 - test/parallel/test-timers-non-integer-delay.js | 1 - ...cket-timeout-removes-other-socket-unref-timer.js | 1 - .../test-timers-unref-remove-other-unref-timers.js | 1 - .../test-timers-unrefd-interval-still-fires.js | 1 - test/pummel/test-fs-watch-non-recursive.js | 1 - test/pummel/test-http-upload-timeout.js | 1 - test/pummel/test-next-tick-infinite-calls.js | 1 - test/sequential/test-regress-GH-819.js | 1 - test/sequential/test-stream2-stderr-sync.js | 4 ---- 42 files changed, 12 insertions(+), 60 deletions(-) diff --git a/test/addons/buffer-free-callback/test.js b/test/addons/buffer-free-callback/test.js index 6ee328d5222049..a70931d81e8977 100644 --- a/test/addons/buffer-free-callback/test.js +++ b/test/addons/buffer-free-callback/test.js @@ -2,7 +2,6 @@ // Flags: --expose-gc require('../../common'); -var assert = require('assert'); var binding = require('./build/Release/binding'); function check(size) { diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js index 930b706f977671..03aca7a6626bce 100644 --- a/test/message/2100bytes.js +++ b/test/message/2100bytes.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var util = require('util'); console.log([ diff --git a/test/message/eval_messages.js b/test/message/eval_messages.js index 7d3444c236b68e..bb1569601c889f 100644 --- a/test/message/eval_messages.js +++ b/test/message/eval_messages.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); -var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/message/hello_world.js b/test/message/hello_world.js index dfcba71bdd4334..187bbd2cfcf7f7 100644 --- a/test/message/hello_world.js +++ b/test/message/hello_world.js @@ -1,5 +1,4 @@ 'use strict'; require('../common'); -var assert = require('assert'); console.log('hello world'); diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index 474531a0160875..22f61a36f947df 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); process.nextTick(function() { process.nextTick(function() { diff --git a/test/message/stack_overflow.js b/test/message/stack_overflow.js index edcbe3b2d6fa28..cef53bfb3d35c5 100644 --- a/test/message/stack_overflow.js +++ b/test/message/stack_overflow.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); Error.stackTraceLimit = 0; diff --git a/test/message/stdin_messages.js b/test/message/stdin_messages.js index 4f87626f63cee6..6e1ced4124f2a6 100644 --- a/test/message/stdin_messages.js +++ b/test/message/stdin_messages.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); -var assert = require('assert'); var spawn = require('child_process').spawn; diff --git a/test/message/throw_custom_error.js b/test/message/throw_custom_error.js index 9466ed9e8b4747..8866ca8514de7d 100644 --- a/test/message/throw_custom_error.js +++ b/test/message/throw_custom_error.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); // custom error throwing throw ({ name: 'MyCustomError', message: 'This is a custom message' }); diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out index ef73c52c889dff..401581f31d5caf 100644 --- a/test/message/throw_custom_error.out +++ b/test/message/throw_custom_error.out @@ -1,4 +1,4 @@ -*test*message*throw_custom_error.js:6 +*test*message*throw_custom_error.js:5 throw ({ name: 'MyCustomError', message: 'This is a custom message' }); ^ MyCustomError: This is a custom message diff --git a/test/message/throw_in_line_with_tabs.js b/test/message/throw_in_line_with_tabs.js index 54dcd9f3a64c3b..3bb403feb3221b 100644 --- a/test/message/throw_in_line_with_tabs.js +++ b/test/message/throw_in_line_with_tabs.js @@ -1,7 +1,6 @@ /* eslint-disable indent */ 'use strict'; require('../common'); -var assert = require('assert'); console.error('before'); diff --git a/test/message/throw_in_line_with_tabs.out b/test/message/throw_in_line_with_tabs.out index e83b05768433b8..d245cca4941ab5 100644 --- a/test/message/throw_in_line_with_tabs.out +++ b/test/message/throw_in_line_with_tabs.out @@ -1,5 +1,5 @@ before -*test*message*throw_in_line_with_tabs.js:10 +*test*message*throw_in_line_with_tabs.js:9 throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_non_error.js b/test/message/throw_non_error.js index 2fb82ee053d55a..d4dae642af882b 100644 --- a/test/message/throw_non_error.js +++ b/test/message/throw_non_error.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); // custom error throwing throw ({ foo: 'bar' }); diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out index 15f95fcc11699a..b98edc46ae2a6e 100644 --- a/test/message/throw_non_error.out +++ b/test/message/throw_non_error.out @@ -1,4 +1,4 @@ -*test*message*throw_non_error.js:6 +*test*message*throw_non_error.js:5 throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_null.js b/test/message/throw_null.js index c252fba1ecfbb6..9b17aa68f186e4 100644 --- a/test/message/throw_null.js +++ b/test/message/throw_null.js @@ -1,5 +1,4 @@ 'use strict'; require('../common'); -var assert = require('assert'); throw null; diff --git a/test/message/throw_null.out b/test/message/throw_null.out index eb3eeb1294e727..5d2c677240d1a7 100644 --- a/test/message/throw_null.out +++ b/test/message/throw_null.out @@ -1,5 +1,5 @@ -*test*message*throw_null.js:5 +*test*message*throw_null.js:4 throw null; ^ null diff --git a/test/message/throw_undefined.js b/test/message/throw_undefined.js index da2ae18c444d82..18c27dbac87799 100644 --- a/test/message/throw_undefined.js +++ b/test/message/throw_undefined.js @@ -1,5 +1,4 @@ 'use strict'; require('../common'); -var assert = require('assert'); throw undefined; diff --git a/test/message/throw_undefined.out b/test/message/throw_undefined.out index c23dac051fa5f1..32a71f0486e47e 100644 --- a/test/message/throw_undefined.out +++ b/test/message/throw_undefined.out @@ -1,5 +1,5 @@ -*test*message*throw_undefined.js:5 +*test*message*throw_undefined.js:4 throw undefined; ^ undefined diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index 648f874b7e15c4..5c345ac8c0c376 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); setTimeout(function() { undefined_reference_error_maker; diff --git a/test/message/undefined_reference_in_new_context.js b/test/message/undefined_reference_in_new_context.js index 4230ce6529336c..73821ae53d4f5f 100644 --- a/test/message/undefined_reference_in_new_context.js +++ b/test/message/undefined_reference_in_new_context.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('before'); diff --git a/test/message/vm_display_runtime_error.js b/test/message/vm_display_runtime_error.js index 3525ab4d03073f..a7ca9907444181 100644 --- a/test/message/vm_display_runtime_error.js +++ b/test/message/vm_display_runtime_error.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_display_syntax_error.js b/test/message/vm_display_syntax_error.js index 179263478b84b8..23525c14d822fb 100644 --- a/test/message/vm_display_syntax_error.js +++ b/test/message/vm_display_syntax_error.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +require('../common'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_dont_display_runtime_error.js b/test/message/vm_dont_display_runtime_error.js index 6b4c824cbe5eff..19d0120a90abfd 100644 --- a/test/message/vm_dont_display_runtime_error.js +++ b/test/message/vm_dont_display_runtime_error.js @@ -1,6 +1,5 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +require('../common'); var vm = require('vm'); console.error('beginning'); diff --git a/test/message/vm_dont_display_syntax_error.js b/test/message/vm_dont_display_syntax_error.js index bff23e533dcfed..bff0433a144b09 100644 --- a/test/message/vm_dont_display_syntax_error.js +++ b/test/message/vm_dont_display_syntax_error.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var vm = require('vm'); console.error('beginning'); diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js index 0253cafcf49766..6426e1c224beb7 100644 --- a/test/parallel/test-cluster-dgram-2.js +++ b/test/parallel/test-cluster-dgram-2.js @@ -2,7 +2,6 @@ var NUM_WORKERS = 4; var PACKETS_PER_WORKER = 10; -var assert = require('assert'); var cluster = require('cluster'); var common = require('../common'); var dgram = require('dgram'); diff --git a/test/parallel/test-cluster-rr-ref.js b/test/parallel/test-cluster-rr-ref.js index 474e4d69f225c6..95d121df875bb8 100644 --- a/test/parallel/test-cluster-rr-ref.js +++ b/test/parallel/test-cluster-rr-ref.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const cluster = require('cluster'); const net = require('net'); diff --git a/test/parallel/test-crypto-verify-failure.js b/test/parallel/test-crypto-verify-failure.js index f315aed1a9f139..2bc4ce5433739d 100644 --- a/test/parallel/test-crypto-verify-failure.js +++ b/test/parallel/test-crypto-verify-failure.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -20,8 +19,6 @@ var options = { cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') }; -var canSend = true; - var server = tls.Server(options, function(socket) { setImmediate(function() { console.log('sending'); @@ -32,17 +29,15 @@ var server = tls.Server(options, function(socket) { }); }); -var client; - function verify() { console.log('verify'); - var verified = crypto.createVerify('RSA-SHA1') - .update('Test') - .verify(certPem, 'asdfasdfas', 'base64'); + crypto.createVerify('RSA-SHA1') + .update('Test') + .verify(certPem, 'asdfasdfas', 'base64'); } server.listen(common.PORT, function() { - client = tls.connect({ + tls.connect({ port: common.PORT, rejectUnauthorized: false }, function() { diff --git a/test/parallel/test-dgram-empty-packet.js b/test/parallel/test-dgram-empty-packet.js index ba6faa62d86cec..66cdbb92ac8f1b 100644 --- a/test/parallel/test-dgram-empty-packet.js +++ b/test/parallel/test-dgram-empty-packet.js @@ -1,8 +1,6 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); -var fs = require('fs'); var dgram = require('dgram'); var callbacks = 0; var client; diff --git a/test/parallel/test-dgram-send-empty-buffer.js b/test/parallel/test-dgram-send-empty-buffer.js index 11f3d38d2ed046..a8ab4339d8a398 100644 --- a/test/parallel/test-dgram-send-empty-buffer.js +++ b/test/parallel/test-dgram-send-empty-buffer.js @@ -1,10 +1,7 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); -var fs = require('fs'); var dgram = require('dgram'); -var callbacks = 0; var client, timer, buf; if (process.platform === 'darwin') { diff --git a/test/parallel/test-domain-stack.js b/test/parallel/test-domain-stack.js index 6f4d03ca5a5e1f..e30d3b21f3af57 100644 --- a/test/parallel/test-domain-stack.js +++ b/test/parallel/test-domain-stack.js @@ -2,9 +2,7 @@ // Make sure that the domain stack doesn't get out of hand. require('../common'); -var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var a = domain.create(); a.name = 'a'; diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index baf0485b3b80b2..1de2405b3ca9a3 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -1,12 +1,11 @@ 'use strict'; -var assert = require('assert'); var common = require('../common'); var util = require('util'); var repl = require('repl'); const putIn = new common.ArrayStream(); -var testMe = repl.start('', putIn); +repl.start('', putIn); putIn.write = function(data) { // Don't use assert for this because the domain might catch it, and diff --git a/test/parallel/test-require-extensions-main.js b/test/parallel/test-require-extensions-main.js index 198fa6a8c52d37..0376082262dd78 100644 --- a/test/parallel/test-require-extensions-main.js +++ b/test/parallel/test-require-extensions-main.js @@ -1,5 +1,4 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); require(common.fixturesDir + '/require-bin/bin/req.js'); diff --git a/test/parallel/test-stream-pipe-cleanup-pause.js b/test/parallel/test-stream-pipe-cleanup-pause.js index b38f57a4ff0ba1..332930c813a3dd 100644 --- a/test/parallel/test-stream-pipe-cleanup-pause.js +++ b/test/parallel/test-stream-pipe-cleanup-pause.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const stream = require('stream'); const reader = new stream.Readable(); diff --git a/test/parallel/test-stream2-pipe-error-once-listener.js b/test/parallel/test-stream2-pipe-error-once-listener.js index 3ca0782ea069d4..d046c5ea55e498 100644 --- a/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/test/parallel/test-stream2-pipe-error-once-listener.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var util = require('util'); var stream = require('stream'); diff --git a/test/parallel/test-timers-non-integer-delay.js b/test/parallel/test-timers-non-integer-delay.js index 97b2c0734f60d5..b42053db3b1895 100644 --- a/test/parallel/test-timers-non-integer-delay.js +++ b/test/parallel/test-timers-non-integer-delay.js @@ -16,7 +16,6 @@ */ require('../common'); -var assert = require('assert'); var TIMEOUT_DELAY = 1.1; var NB_TIMEOUTS_FIRED = 50; diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js index 081688cfa5e812..c9ca3eafd64ebf 100644 --- a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js +++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -5,7 +5,6 @@ */ const common = require('../common'); -const assert = require('assert'); const net = require('net'); const clients = []; diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers.js b/test/parallel/test-timers-unref-remove-other-unref-timers.js index 8c1864f1a7da01..dcc50a5171ad28 100644 --- a/test/parallel/test-timers-unref-remove-other-unref-timers.js +++ b/test/parallel/test-timers-unref-remove-other-unref-timers.js @@ -7,7 +7,6 @@ * considered public interface. */ const common = require('../common'); -const assert = require('assert'); const timers = require('timers'); const foo = { diff --git a/test/parallel/test-timers-unrefd-interval-still-fires.js b/test/parallel/test-timers-unrefd-interval-still-fires.js index a716c6ed645cbd..8f26d28816b60c 100644 --- a/test/parallel/test-timers-unrefd-interval-still-fires.js +++ b/test/parallel/test-timers-unrefd-interval-still-fires.js @@ -3,7 +3,6 @@ * This test is a regression test for joyent/node#8900. */ const common = require('../common'); -const assert = require('assert'); const TEST_DURATION = common.platformTimeout(100); const N = 5; diff --git a/test/pummel/test-fs-watch-non-recursive.js b/test/pummel/test-fs-watch-non-recursive.js index 2586aec59b2d94..ead7de9e28dc47 100644 --- a/test/pummel/test-fs-watch-non-recursive.js +++ b/test/pummel/test-fs-watch-non-recursive.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var path = require('path'); var fs = require('fs'); diff --git a/test/pummel/test-http-upload-timeout.js b/test/pummel/test-http-upload-timeout.js index 08132e3c7594d1..d1be5311db0c00 100644 --- a/test/pummel/test-http-upload-timeout.js +++ b/test/pummel/test-http-upload-timeout.js @@ -3,7 +3,6 @@ // data in random intervals. Clients are also randomly disconnecting until there // are no more clients left. If no false timeout occurs, this test has passed. var common = require('../common'), - assert = require('assert'), http = require('http'), server = http.createServer(), connections = 0; diff --git a/test/pummel/test-next-tick-infinite-calls.js b/test/pummel/test-next-tick-infinite-calls.js index 7abdd38cf26e83..18223885d6cc19 100644 --- a/test/pummel/test-next-tick-infinite-calls.js +++ b/test/pummel/test-next-tick-infinite-calls.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var complete = 0; diff --git a/test/sequential/test-regress-GH-819.js b/test/sequential/test-regress-GH-819.js index a8a26b4e067f64..20ca75c793ce24 100644 --- a/test/sequential/test-regress-GH-819.js +++ b/test/sequential/test-regress-GH-819.js @@ -1,7 +1,6 @@ 'use strict'; require('../common'); var net = require('net'); -var assert = require('assert'); // Connect to something that we need to DNS resolve var c = net.createConnection(80, 'google.com'); diff --git a/test/sequential/test-stream2-stderr-sync.js b/test/sequential/test-stream2-stderr-sync.js index 0889a38ed398db..c7daaa6b083205 100644 --- a/test/sequential/test-stream2-stderr-sync.js +++ b/test/sequential/test-stream2-stderr-sync.js @@ -2,10 +2,6 @@ // Make sure that sync writes to stderr get processed before exiting. require('../common'); -var assert = require('assert'); -var util = require('util'); - -var errnoException = util._errnoException; function parent() { var spawn = require('child_process').spawn; From 4520599302cb8d79842519d3fe734a342ff9f06a Mon Sep 17 00:00:00 2001 From: iamchenxin Date: Mon, 28 Dec 2015 21:19:59 +0800 Subject: [PATCH 138/262] doc: add anchors for _transform _flush _writev in stream.markdown PR-URL: https://github.com/nodejs/node/pull/4448 Reviewed-By: Trevor Norris Reviewed-By: James M Snell --- doc/api/stream.markdown | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index e874b6f8b8d129..9ab35254bad21b 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -761,7 +761,7 @@ of stream class you are writing:

[Writable](#stream_class_stream_writable_1)

-

[_write][], _writev

+

[_write][], [_writev][]

@@ -772,7 +772,7 @@ of stream class you are writing:

[Duplex](#stream_class_stream_duplex_1)

-

[_read][], [_write][], _writev

+

[_read][], [_write][], [_writev][]

@@ -783,7 +783,7 @@ of stream class you are writing:

[Transform](#stream_class_stream_transform_1)

-

_transform, _flush

+

[_transform][], [_flush][]

@@ -1728,3 +1728,12 @@ horribly wrong. [Writable]: #stream_class_stream_writable [zlib streams]: zlib.html [zlib]: zlib.html +[_transform]: #stream_transform_transform_chunk_encoding_callback +[`_transform()`]: #stream_transform_transform_chunk_encoding_callback +[`_transform(chunk, encoding, callback)`]: #stream_transform_transform_chunk_encoding_callback +[_flush]: #stream_transform_flush_callback +[`_flush()`]: #stream_transform_flush_callback +[`_flush(callback)`]: #stream_transform_flush_callback +[_writev]: #stream_writable_writev_chunks_callback +[`_writev()`]: #stream_writable_writev_chunks_callback +[`_writev(chunks, callback)`]: #stream_writable_writev_chunks_callback From ec3b699fb5d4aeb26c4caa97ef4becaf85609ae8 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 26 Dec 2015 23:19:45 -0800 Subject: [PATCH 139/262] doc: improvements to dns.markdown copy General improvements to dns.markdown copy and examples PR-URL: https://github.com/nodejs/node/pull/4449 Reviewed-By: Roman Reiss Reviewed-By: Stephen Belanger --- doc/api/dns.markdown | 287 +++++++++++++++++++++++-------------------- 1 file changed, 156 insertions(+), 131 deletions(-) diff --git a/doc/api/dns.markdown b/doc/api/dns.markdown index 1b01f0ee1cead7..86bee216487683 100644 --- a/doc/api/dns.markdown +++ b/doc/api/dns.markdown @@ -2,39 +2,36 @@ Stability: 2 - Stable -Use `require('dns')` to access this module. - -This module contains functions that belong to two different categories: +The `dns` module contains functions belonging to two different categories: 1) Functions that use the underlying operating system facilities to perform -name resolution, and that do not necessarily do any network communication. +name resolution, and that do not necessarily perform any network communication. This category contains only one function: [`dns.lookup()`][]. __Developers looking to perform name resolution in the same way that other applications on the same operating system behave should use [`dns.lookup()`][].__ -Here is an example that does a lookup of `www.google.com`. +For example, looking up `nodejs.org`. const dns = require('dns'); - dns.lookup('www.google.com', function onLookup(err, addresses, family) { + dns.lookup('nodejs.org', (err, addresses, family) => { console.log('addresses:', addresses); }); 2) Functions that connect to an actual DNS server to perform name resolution, and that _always_ use the network to perform DNS queries. This category -contains all functions in the `dns` module but [`dns.lookup()`][]. These -functions do not use the same set of configuration files than what -[`dns.lookup()`][] uses. For instance, _they do not use the configuration from -`/etc/hosts`_. These functions should be used by developers who do not want to -use the underlying operating system's facilities for name resolution, and -instead want to _always_ perform DNS queries. +contains all functions in the `dns` module _except_ [`dns.lookup()`][]. These +functions do not use the same set of configuration files used by +[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by +developers who do not want to use the underlying operating system's facilities +for name resolution, and instead want to _always_ perform DNS queries. -Here is an example which resolves `'www.google.com'` then reverse -resolves the IP addresses which are returned. +Below is an example that resolves `'nodejs.org'` then reverse resolves the IP +addresses that are returned. const dns = require('dns'); - dns.resolve4('www.google.com', (err, addresses) => { + dns.resolve4('nodejs.org', (err, addresses) => { if (err) throw err; console.log(`addresses: ${JSON.stringify(addresses)}`); @@ -49,19 +46,19 @@ resolves the IP addresses which are returned. }); }); -There are subtle consequences in choosing one or another, please consult the -[Implementation considerations section][] for more information. +There are subtle consequences in choosing one over the other, please consult +the [Implementation considerations section][] for more information. ## dns.getServers() -Returns an array of IP addresses as strings that are currently being used for -resolution +Returns an array of IP address strings that are being used for name +resolution. ## dns.lookup(hostname[, options], callback) -Resolves a hostname (e.g. `'google.com'`) into the first found A (IPv4) or +Resolves a hostname (e.g. `'nodejs.org'`) into the first found A (IPv4) or AAAA (IPv6) record. `options` can be an object or integer. If `options` is -not provided, then IP v4 and v6 addresses are both valid. If `options` is +not provided, then IPv4 and IPv6 addresses are both valid. If `options` is an integer, then it must be `4` or `6`. Alternatively, `options` can be an object containing these properties: @@ -79,154 +76,193 @@ Alternatively, `options` can be an object containing these properties: All properties are optional. An example usage of options is shown below. -``` -{ - family: 4, - hints: dns.ADDRCONFIG | dns.V4MAPPED, - all: false -} -``` + { + family: 4, + hints: dns.ADDRCONFIG | dns.V4MAPPED, + all: false + } -The callback has arguments `(err, address, family)`. `address` is a string -representation of an IP v4 or v6 address. `family` is either the integer 4 or 6 -and denotes the family of `address` (not necessarily the value initially passed -to `lookup`). +The `callback` function has arguments `(err, address, family)`. `address` is a +string representation of an IPv4 or IPv6 address. `family` is either the +integer `4` or `6` and denotes the family of `address` (not necessarily the +value initially passed to `lookup`). -With the `all` option set, the arguments change to `(err, addresses)`, with -`addresses` being an array of objects with the properties `address` and -`family`. +With the `all` option set to `true`, the arguments change to +`(err, addresses)`, with `addresses` being an array of objects with the +properties `address` and `family`. On error, `err` is an [`Error`][] object, where `err.code` is the error code. Keep in mind that `err.code` will be set to `'ENOENT'` not only when the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. -`dns.lookup()` doesn't necessarily have anything to do with the DNS protocol. -It's only an operating system facility that can associate name with addresses, -and vice versa. +`dns.lookup()` does not necessarily have anything to do with the DNS protocol. +The implementation uses an operating system facility that can associate names +with addresses, and vice versa. This implementation can have subtle but +important consequences on the behavior of any Node.js program. Please take some +time to consult the [Implementation considerations section][] before using +`dns.lookup()`. + +### Supported getaddrinfo flags -Its implementation can have subtle but important consequences on the behavior -of any Node.js program. Please take some time to consult the [Implementation -considerations section][] before using it. +The following flags can be passed as hints to [`dns.lookup()`][]. + +- `dns.ADDRCONFIG`: Returned address types are determined by the types +of addresses supported by the current system. For example, IPv4 addresses +are only returned if the current system has at least one IPv4 address +configured. Loopback addresses are not considered. +- `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were +found, then return IPv4 mapped IPv6 addresses. Note that it is not supported +on some operating systems (e.g FreeBSD 10.1). ## dns.lookupService(address, port, callback) -Resolves the given address and port into a hostname and service using -`getnameinfo`. +Resolves the given `address` and `port` into a hostname and service using +the operating system's underlying `getnameinfo` implementation. The callback has arguments `(err, hostname, service)`. The `hostname` and `service` arguments are strings (e.g. `'localhost'` and `'http'` respectively). On error, `err` is an [`Error`][] object, where `err.code` is the error code. + const dns = require('dns'); + dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + console.log(hostname, service); + // Prints: localhost ssh + }); ## dns.resolve(hostname[, rrtype], callback) -Resolves a hostname (e.g. `'google.com'`) into an array of the record types -specified by rrtype. +Uses the DNS protocol to resolve a hostname (e.g. `'nodejs.org'`) into an +array of the record types specified by `rrtype`. -Valid rrtypes are: +Valid values for `rrtype` are: - * `'A'` (IPV4 addresses, default) - * `'AAAA'` (IPV6 addresses) - * `'MX'` (mail exchange records) - * `'TXT'` (text records) - * `'SRV'` (SRV records) - * `'PTR'` (used for reverse IP lookups) - * `'NS'` (name server records) - * `'CNAME'` (canonical name records) - * `'SOA'` (start of authority record) + * `'A'` - IPV4 addresses, default + * `'AAAA'` - IPV6 addresses + * `'MX'` - mail exchange records + * `'TXT'` - text records + * `'SRV'` - SRV records + * `'PTR'` - used for reverse IP lookups + * `'NS'` - name server records + * `'CNAME'` - canonical name records + * `'SOA'` - start of authority record -The callback has arguments `(err, addresses)`. The type of each item -in `addresses` is determined by the record type, and described in the -documentation for the corresponding lookup methods below. +The `callback` function has arguments `(err, addresses)`. When successful, +`addresses` will be an array. The type of each item in `addresses` is +determined by the record type, and described in the documentation for the +corresponding lookup methods below. On error, `err` is an [`Error`][] object, where `err.code` is one of the error codes listed below. - ## dns.resolve4(hostname, callback) -The same as [`dns.resolve()`][], but only for IPv4 queries (`A` records). -`addresses` is an array of IPv4 addresses (e.g. +Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the +`hostname`. The `addresses` argument passed to the `callback` function +will contain an array of IPv4 addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). ## dns.resolve6(hostname, callback) -The same as [`dns.resolve4()`][] except for IPv6 queries (an `AAAA` query). +Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the +`hostname`. The `addresses` argument passed to the `callback` function +will contain an array of IPv6 addresses. ## dns.resolveCname(hostname, callback) -The same as [`dns.resolve()`][], but only for canonical name records (`CNAME` -records). `addresses` is an array of the canonical name records available for -`hostname` (e.g., `['bar.example.com']`). +Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The +`addresses` argument passed to the `callback` function +will contain an of canonical name records available for the `hostname` +(e.g. `['bar.example.com']`). ## dns.resolveMx(hostname, callback) -The same as [`dns.resolve()`][], but only for mail exchange queries -(`MX` records). - -`addresses` is an array of MX records, each with a priority and an exchange -attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`). +Uses the DNS protocol to resolve mail exchange records (`MX` records) for the +`hostname`. The `addresses` argument passed to the `callback` function will +contain an array of objects containing both a `priority` and `exchange` +property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). ## dns.resolveNs(hostname, callback) -The same as [`dns.resolve()`][], but only for name server records -(`NS` records). `addresses` is an array of the name server records available -for `hostname` (e.g., `['ns1.example.com', 'ns2.example.com']`). +Uses the DNS protocol to resolve name server records (`NS` records) for the +`hostname`. The `addresses` argument passed to the `callback` function will +contain an array of name server records available for `hostname` +(e.g., `['ns1.example.com', 'ns2.example.com']`). ## dns.resolveSoa(hostname, callback) -The same as [`dns.resolve()`][], but only for start of authority record queries -(`SOA` record). +Uses the DNS protocol to resolve a start of authority record (`SOA` record) for +the `hostname`. The `addresses` argument passed to the `callback` function will +be an object with the following properties: + +* `nsname` +* `hostmaster` +* `serial` +* `refresh` +* `retry` +* `expire` +* `minttl` + + { + nsname: 'ns.example.com', + hostmaster: 'root.example.com', + serial: 2013101809, + refresh: 10000, + retry: 2400, + expire: 604800, + minttl: 3600 + } -`addresses` is an object with the following structure: +## dns.resolveSrv(hostname, callback) -``` -{ - nsname: 'ns.example.com', - hostmaster: 'root.example.com', - serial: 2013101809, - refresh: 10000, - retry: 2400, - expire: 604800, - minttl: 3600 -} -``` +Uses the DNS protocol to resolve service records (`SRV` records) for the +`hostname`. The `addresses` argument passed to the `callback` function will +be an array of objects with the following properties: -## dns.resolveSrv(hostname, callback) +* `priority` +* `weight` +* `port` +* `name` -The same as [`dns.resolve()`][], but only for service records (`SRV` records). -`addresses` is an array of the SRV records available for `hostname`. Properties -of SRV records are priority, weight, port, and name (e.g., -`[{'priority': 10, 'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...]`). + { + priority: 10, + weight: 5, + port: 21223, + name: 'service.example.com' + } ## dns.resolveTxt(hostname, callback) -The same as [`dns.resolve()`][], but only for text queries (`TXT` records). -`addresses` is a 2-d array of the text records available for `hostname` (e.g., +Uses the DNS protocol to resolve text queries (`TXT` records) for the +`hostname`. The `addresses` argument passed to the `callback` function is +is a two-dimentional array of the text records available for `hostname` (e.g., `[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of -one record. Depending on the use case, the could be either joined together or +one record. Depending on the use case, these could be either joined together or treated separately. ## dns.reverse(ip, callback) -Reverse resolves an ip address to an array of hostnames. +Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an +array of hostnames. -The callback has arguments `(err, hostnames)`. +The `callback` function has arguments `(err, hostnames)`, where `hostnames` +is an array of resolved hostnames for the given `ip`. On error, `err` is an [`Error`][] object, where `err.code` is one of the error codes listed below. ## dns.setServers(servers) -Given an array of IP addresses as strings, set them as the servers to use for -resolving +Sets the IP addresses of the servers to be used when resolving. The `servers` +argument is an array of IPv4 or IPv6 addresses. -If you specify a port with the address it will be stripped, as the underlying -library doesn't support that. +If a port specified on the address it will be removed. -This will throw if you pass invalid input. +An error will be thrown if an invalid address is provided. + +The `dns.setServers()` method must not be called while a DNS query is in +progress. ## Error codes @@ -257,47 +293,36 @@ Each DNS query can return one of the following error codes: - `dns.ADDRGETNETWORKPARAMS`: Could not find GetNetworkParams function. - `dns.CANCELLED`: DNS query cancelled. -## Supported getaddrinfo flags - -The following flags can be passed as hints to [`dns.lookup()`][]. - -- `dns.ADDRCONFIG`: Returned address types are determined by the types -of addresses supported by the current system. For example, IPv4 addresses -are only returned if the current system has at least one IPv4 address -configured. Loopback addresses are not considered. -- `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were -found, then return IPv4 mapped IPv6 addresses. Note that it is not supported -on some operating systems (e.g FreeBSD 10.1). - ## Implementation considerations -Although [`dns.lookup()`][] and `dns.resolve*()/dns.reverse()` functions have -the same goal of associating a network name with a network address (or vice -versa), their behavior is quite different. These differences can have subtle but -significant consequences on the behavior of Node.js programs. +Although [`dns.lookup()`][] and the various `dns.resolve*()/dns.reverse()` +functions have the same goal of associating a network name with a network +address (or vice versa), their behavior is quite different. These differences +can have subtle but significant consequences on the behavior of Node.js +programs. -### dns.lookup +### `dns.lookup()` Under the hood, [`dns.lookup()`][] uses the same operating system facilities as most other programs. For instance, [`dns.lookup()`][] will almost always resolve a given name the same way as the `ping` command. On most POSIX-like operating systems, the behavior of the [`dns.lookup()`][] function can be -tweaked by changing settings in `nsswitch.conf(5)` and/or `resolv.conf(5)`, but -be careful that changing these files will change the behavior of all other -programs running on the same operating system. - -Though the call will be asynchronous from JavaScript's perspective, it is -implemented as a synchronous call to `getaddrinfo(3)` that runs on libuv's -threadpool. Because libuv's threadpool has a fixed size, it means that if for -whatever reason the call to `getaddrinfo(3)` takes a long time, other -operations that could run on libuv's threadpool (such as filesystem +modified by changing settings in `nsswitch.conf(5)` and/or `resolv.conf(5)`, +but note that changing these files will change the behavior of _all other +programs running on the same operating system_. + +Though the call to `dns.lookup()` will be asynchronous from JavaScript's +perspective, it is implemented as a synchronous call to `getaddrinfo(3)` that +runs on libuv's threadpool. Because libuv's threadpool has a fixed size, it +means that if for whatever reason the call to `getaddrinfo(3)` takes a long +time, other operations that could run on libuv's threadpool (such as filesystem operations) will experience degraded performance. In order to mitigate this issue, one potential solution is to increase the size of libuv's threadpool by -setting the 'UV_THREADPOOL_SIZE' environment variable to a value greater than -4 (its current default value). For more information on libuv's threadpool, see +setting the `'UV_THREADPOOL_SIZE'` environment variable to a value greater than +`4` (its current default value). For more information on libuv's threadpool, see [the official libuv documentation][]. -### dns.resolve, functions starting with dns.resolve and dns.reverse +### `dns.resolve()`, `dns.resolve*()` and `dns.reverse()` These functions are implemented quite differently than [`dns.lookup()`][]. They do not use `getaddrinfo(3)` and they _always_ perform a DNS query on the From 8ca365b324d337a29d72e191c3a93e6d05df75e0 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 28 Dec 2015 11:42:05 -0800 Subject: [PATCH 140/262] doc: improvements to errors.markdown copy General improvements to errors.markdown including improved/revised examples PR-URL: https://github.com/nodejs/node/pull/4454 Reviewed-By: Myles Borins Reviewed-By: Stephen Belanger Reviewed-By: Minwoo Jung --- doc/api/errors.markdown | 700 +++++++++++++++++++++------------------- 1 file changed, 364 insertions(+), 336 deletions(-) diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index 8269e19c39cd03..207c3b66e06df3 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -2,222 +2,257 @@ -Errors generated by Node.js fall into two categories: JavaScript errors and system -errors. All errors inherit from or are instances of JavaScript's [`Error`][] -class and are guaranteed to provide *at least* the attributes available on that -class. - -When an operation is not permitted due to language-syntax or -language-runtime-level reasons, a **JavaScript error** is generated and thrown -as an **exception**. If an operation is not allowed due to system-level -restrictions, a **system error** is generated. Client code is then given the -opportunity to **intercept** this error based on how the API **propagates** it. - -The style of API called determines how generated errors are handed back, or -**propagated**, to client code, which in turn informs how the client may **intercept** -the error. Exceptions can be intercepted using the [`try / catch` construct][]; -other propagation strategies are covered [below][]. +Applications running in Node.js will generally experience four categories of +errors: + +- Standard JavaScript errors such as: + - [`EvalError`][]: thrown when a call to `eval()` fails. + - [`SyntaxError`][]: thrown in response to improper JavaScript language + syntax. + - [`RangeError`][]: thrown when a value is not within an expected range + - [`ReferenceError`][]: thrown when using undefined variables + - [`TypeError`][]: thrown when passing arguments of the wrong type + - [`URIError`][]: thrown when a global URI handling function is misused. +- System errors triggered by underlying operating system constraints such + as attempting to open a file that does not exist, attempting to send data + over a closed socket, etc; +- And User-specified errors triggered by application code. +- Assertion Errors are a special class of error that can be triggered whenever + Node.js detects an exceptional logic violation that should never occur. These + are raised typically by the `assert` module. + +All JavaScript and System errors raised by Node.js inherit from, or are +instances of, the standard JavaScript [`Error`][] class and are guaranteed +to provide *at least* the properties available on that class. ## Error Propagation and Interception -All Node.js APIs will treat invalid arguments as exceptional -- that is, if passed -invalid arguments, they will *immediately* generate and throw the error as an -exception, even if they are an otherwise asynchronous API. - -Synchronous APIs (like [`fs.readFileSync`][]) will throw the error. The act of -*throwing* a value (in this case, the error) turns the value into an **exception**. -Exceptions may be caught using the [`try { } catch(err) { }`][] construct. +Node.js supports several mechanisms for propagating and handling errors that +occur while an application is running. How these errors are reported and +handled depends entirely on the type of Error and the style of the API that is +called. + +All JavaScript errors are handled as exceptions that *immediately* generate +and throw an error using the standard JavaScript `throw` mechanism. These +are handled using the [`try / catch` construct][] provided by the JavaScript +language. + + // Throws with a ReferenceError because z is undefined + try { + const m = 1; + const n = m + z; + } catch (err) { + // Handle the error here. + } -Asynchronous APIs have **two** mechanisms for error propagation; one mechanism -for APIs that represent a single operation, and one for APIs that represent -multiple operations over time. +Any use of the JavaScript `throw` mechanism will raise an exception that +*must* be handled using `try / catch` or the Node.js process will exit +immediately. -### Error events +With few exceptions, _Synchronous_ APIs (any blocking method that does not +accept a `callback` function, such as [`fs.readFileSync`][]), will use `throw` +to report errors. - +Errors that occur within _Asynchronous APIs_ may be reported in multiple ways: -The other mechanism for providing errors is the `'error'` event. This is -typically used by [stream-based][] and [event emitter-based][] APIs, which -themselves represent a series of asynchronous operations over time (versus a -single operation that may pass or fail). If no `'error'` event handler is -attached to the source of the error, the error will be thrown. At this point, -it will crash the process as an unhandled exception unless [domains][] are -employed appropriately or [`process.on('uncaughtException')`][] has a handler. +- Most asynchronous methods that accept a `callback` function will accept an + `Error` object passed as the first argument to that function. If that first + argument is not `null` and is an instance of `Error`, then an error occurred + that should be handled. -```javascript -const net = require('net'); + ``` + const fs = require('fs'); + fs.readFile('a file that does not exist', (err, data) => { + if (err) { + console.error('There was an error reading the file!', err); + return; + } + // Otherwise handle the data + }); + ``` +- When an asynchronous method is called on an object that is an `EventEmitter`, + errors can be routed to that object's `'error'` event. + + ``` + const net = require('net'); + const connection = net.connect('localhost'); + + // Adding an 'error' event handler to a stream: + connection.on('error', (err) => { + // If the connection is reset by the server, or if it can't + // connect at all, or on any sort of error encountered by + // the connection, the error will be sent here. + console.error(err); + }); -const connection = net.connect('localhost'); + connection.pipe(process.stdout); + ``` -// adding an 'error' event handler to a stream: -connection.on('error', (err) => { - // if the connection is reset by the server, or if it can't - // connect at all, or on any sort of error encountered by - // the connection, the error will be sent here. - console.error(err); -}); +- A handful of typically asynchronous methods in the Node.js API may still + use the `throw` mechanism to raise exceptions that must be handled using + `try / catch`. There is no comprehensive list of such methods; please + refer to the documentation of each method to determine the appropriate + error handling mechanism required. -connection.pipe(process.stdout); -``` +The use of the `'error'` event mechanism is most common for [stream-based][] +and [event emitter-based][] APIs, which themselves represent a series of +asynchronous operations over time (as opposed to a single operation that may +pass or fail). -The "throw when no error handlers are attached behavior" is not limited to APIs -provided by Node.js -- even user created event emitters and streams will throw -errors when no error handlers are attached. An example: +For *all* `EventEmitter` objects, if an `'error'` event handler is not +provided, the error will be thrown, causing the Node.js process to report an +unhandled exception and crash unless either: The [`domain`][] module is used +appropriately or a handler has been registered for the +[`process.on('uncaughtException')`][] event. -```javascript -const EventEmitter = require('events'); + const EventEmitter = require('events'); + const ee = new EventEmitter(); -const ee = new EventEmitter(); + setImmediate(() => { + // This will crash the process because no 'error' event + // handler has been added. + ee.emit('error', new Error('This will crash')); + }); -setImmediate(() => { - // this will crash the process because no 'error' event - // handler has been added. - ee.emit('error', new Error('This will crash')); -}); -``` +Errors generated in this way *cannot* be intercepted using `try / catch` as +they are thrown *after* the calling code has already exited. -As with node style callbacks, errors generated this way *cannot* be intercepted -by `try { } catch(err) { }` -- they happen *after* the calling code has already -exited. +Developers must refer to the documentation for each method to determine +exactly how errors raised by those methods are propagated. -### Node style callbacks +### Node.js style callbacks -Single operation APIs take "node style callbacks" -- a -function provided to the API as an argument. The node style callback takes -at least **one** argument -- `error` -- that will either be `null` (if no error -was encountered) or an `Error` instance. For instance: - -```javascript -const fs = require('fs'); - -fs.readFile('/some/file/that/does-not-exist', function nodeStyleCallback(err, data) { - console.log(err) // Error: ENOENT - console.log(data) // undefined / null -}); - -fs.readFile('/some/file/that/does-exist', (err, data) => { - console.log(err) // null - console.log(data) // -}) -``` - -Note that `try { } catch(err) { }` **cannot** intercept errors generated by -asynchronous APIs. A common mistake for beginners is to try to use `throw` -inside their node style callback: - -```javascript -// THIS WILL NOT WORK: -const fs = require('fs'); - -try { - fs.readFile('/some/file/that/does-not-exist', (err, data) => { - // mistaken assumption: throwing here... - if (err) { - throw err; +Most asynchronous methods exposed by the Node.js core API follow an idiomatic +pattern referred to as a "Node.js style callback". With this pattern, a +callback function is passed to the method as an argument. When the operation +either completes or an error is raised, the callback function is called with +the Error object (if any) passed as the first argument. If no error was raised, +the first argument will be passed as `null`. + + const fs = require('fs'); + + function nodeStyleCallback(err, data) { + if (err) { + console.error('There was an error', err); + return; + } + console.log(data); } - }); -} catch(err) { - // ... will be caught here -- this is incorrect! - console.log(err); // Error: ENOENT -} -``` - -This will not work! By the time the node style callback has been called, the -surrounding code (including the `try { } catch(err) { }` will have already -exited. Throwing an error inside a node style callback **will crash the process** in most cases. -If [domains][] are enabled, they may intercept the thrown error; similarly, if a -handler has been added to `process.on('uncaughtException')`, it will intercept -the error. -## JavaScript Errors - - + fs.readFile('/some/file/that/does-not-exist', nodeStyleCallback); + fs.readFile('/some/file/that/does-exist', nodeStyleCallback) + +The JavaScript `try / catch` mechanism **cannot** be used to intercept errors +generated by asynchronous APIs. A common mistake for beginners is to try to +use `throw` inside a Node.js style callback: + + // THIS WILL NOT WORK: + const fs = require('fs'); + + try { + fs.readFile('/some/file/that/does-not-exist', (err, data) => { + // mistaken assumption: throwing here... + if (err) { + throw err; + } + }); + } catch(err) { + // This will not catch the throw! + console.log(err); + } -JavaScript errors typically denote that an API is being used incorrectly, or that -there is a problem with the program as written. +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. -### Class: Error +## Class: Error -A general error object. Unlike other error objects, `Error` instances do not -denote any specific circumstance of why the error occurred. Errors capture a -"stack trace" detailing the point in the program at which they were -instantiated, and may provide a description of the error. +A generic JavaScript `Error` object that does not denote any specific +circumstance of why the error occurred. `Error` objects capture a "stack trace" +detailing the point in the code at which the `Error` was instantiated, and may +provide a text description of the error. -**Note**: Node.js will generate this class of error to encapsulate system -errors as well as plain JavaScript errors. +All errors generated by Node.js, including all System and JavaScript errors, +will either be instances of, or inherit from, the `Error` class. -#### new Error(message) +### new Error(message) -Instantiates a new `Error` object and sets its `.message` property to the provided -message. Its `.stack` will represent the point in the program at which `new Error` -was called. Stack traces are subject to [V8's stack trace API][]. -Stack traces only extend to the beginning of synchronous code execution, *or* a number of frames given by -`Error.stackTraceLimit`, whichever is smaller. +Creates a new `Error` object and sets the `error.message` property to the +provided text message. If an object is passed as `message`, the text message +is generated by calling `message.toString()`. The `error.stack` property will +represent the point in the code at which `new Error()` was called. Stack traces +are dependent on [V8's stack trace API][]. Stack traces extend only to either +(a) the beginning of *synchronous code execution*, or (b) the number of frames +given by the property `Error.stackTraceLimit`, whichever is smaller. -#### Error.captureStackTrace(targetObject[, constructorOpt]) +### Error.captureStackTrace(targetObject[, constructorOpt]) Creates a `.stack` property on `targetObject`, which when accessed returns -a string representing the location in the program at which `Error.captureStackTrace` -was called. +a string representing the location in the code at which +`Error.captureStackTrace()` was called. -```javascript -var myObject = {}; - -Error.captureStackTrace(myObject); - -myObject.stack // similar to `new Error().stack` -``` + const myObject = {}; + Error.captureStackTrace(myObject); + myObject.stack // similar to `new Error().stack` The first line of the trace, instead of being prefixed with `ErrorType: -message`, will be the result of `targetObject.toString()`. - -`constructorOpt` optionally accepts a function. If given, all frames above -`constructorOpt`, including `constructorOpt`, will be omitted from the generated -stack trace. +message`, will be the result of calling `targetObject.toString()`. -This is useful for hiding implementation details of error generation from the -end user. A common way of using this parameter is to pass the current Error -constructor to it: +The optional `constructorOpt` argument accepts a function. If given, all frames +above `constructorOpt`, including `constructorOpt`, will be omitted from the +generated stack trace. -```javascript +The `constructorOpt` argument is useful for hiding implementation +details of error generation from an end user. For instance: -function MyError() { - Error.captureStackTrace(this, MyError); -} + function MyError() { + Error.captureStackTrace(this, MyError); + } -// without passing MyError to captureStackTrace, the MyError -// frame would should up in the .stack property. by passing -// the constructor, we omit that frame and all frames above it. -new MyError().stack + // Without passing MyError to captureStackTrace, the MyError + // frame would should up in the .stack property. by passing + // the constructor, we omit that frame and all frames above it. + new MyError().stack -``` +### Error.stackTraceLimit -#### Error.stackTraceLimit +The `Error.stackTraceLimit` property specifies the number of stack frames +collected by a stack trace (whether generated by `new Error().stack` or +`Error.captureStackTrace(obj)`). -Property that determines the number of stack frames collected by a stack trace -(whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). +The default value is `10` but may be set to any valid JavaScript number. Changes +will affect any stack trace captured *after* the value has been changed. -The initial value is `10`. It may be set to any valid JavaScript number, which -will affect any stack trace captured *after* the value has been changed. If set -to a non-number value, stack traces will not capture any frames and will report -`undefined` on access. +If set to a non-number value, or set to a negative number, stack traces will +not capture any frames. #### error.message -A string of the value passed to `Error()` upon instantiation. The message will -also appear in the first line of the stack trace of the error. Changing this -property *may not* change the first line of the stack trace. +Returns the string description of error as set by calling `new Error(message)`. +The `message` passed to the constructor will also appear in the first line of +the stack trace of the `Error`, however changing this property after the +`Error` object is created *may not* change the first line of the stack trace. + + const err = new Error('The message'); + console.log(err.message); + // Prints: The message #### error.stack -A property that, when **accessed**, returns a string representing the point in the program -at which this error was instantiated. An example stacktrace follows: +Returns a string describing the point in the code at which the `Error` was +instantiated. + +For example: Error: Things keep happening! at /home/gbusey/file.js:525:2 @@ -225,103 +260,107 @@ at which this error was instantiated. An example stacktrace follows: at Actor. (/home/gbusey/actors.js:400:8) at increaseSynergy (/home/gbusey/actors.js:701:6) -The first line is formatted as `: `, and it is followed -by a series of stack frames (each line beginning with "at "). Each frame describes -a call site in the program that lead to the error being generated. V8 attempts to -display a name for each function (by variable name, function name, or object -method name), but occasionally it will not be able to find a suitable name. If -V8 cannot determine a name for the function, only location information will be -displayed for that frame. Otherwise, the determined function name will be displayed -with location information appended in parentheses. - -Frames are **only** generated for JavaScript functions. If, for example, execution -synchronously passes through a C++ addon function called `cheetahify`, which itself -calls a JavaScript function, the frame representing the `cheetahify` call will **not** -be present in stacktraces: - -```javascript -const cheetahify = require('./native-binding.node'); - -function makeFaster() { - // cheetahify *synchronously* calls speedy. - cheetahify(function speedy() { - throw new Error('oh no!'); - }); -} - -makeFaster(); // will throw: -// /home/gbusey/file.js:6 -// throw new Error('oh no!'); -// ^ -// Error: oh no! -// at speedy (/home/gbusey/file.js:6:11) -// at makeFaster (/home/gbusey/file.js:5:3) -// at Object. (/home/gbusey/file.js:10:1) -// at Module._compile (module.js:456:26) -// at Object.Module._extensions..js (module.js:474:10) -// at Module.load (module.js:356:32) -// at Function.Module._load (module.js:312:12) -// at Function.Module.runMain (module.js:497:10) -// at startup (node.js:119:16) -// at node.js:906:3 -``` +The first line is formatted as `: `, and +is followed by a series of stack frames (each line beginning with "at "). +Each frame describes a call site within the code that lead to the error being +generated. V8 attempts to display a name for each function (by variable name, +function name, or object method name), but occasionally it will not be able to +find a suitable name. If V8 cannot determine a name for the function, only +location information will be displayed for that frame. Otherwise, the +determined function name will be displayed with location information appended +in parentheses. + +It is important to note that frames are **only** generated for JavaScript +functions. If, for example, execution synchronously passes through a C++ addon +function called `cheetahify`, which itself calls a JavaScript function, the +frame representing the `cheetahify` call will **not** be present in the stack +traces: + + const cheetahify = require('./native-binding.node'); + + function makeFaster() { + // cheetahify *synchronously* calls speedy. + cheetahify(function speedy() { + throw new Error('oh no!'); + }); + } + + makeFaster(); // will throw: + // /home/gbusey/file.js:6 + // throw new Error('oh no!'); + // ^ + // Error: oh no! + // at speedy (/home/gbusey/file.js:6:11) + // at makeFaster (/home/gbusey/file.js:5:3) + // at Object. (/home/gbusey/file.js:10:1) + // at Module._compile (module.js:456:26) + // at Object.Module._extensions..js (module.js:474:10) + // at Module.load (module.js:356:32) + // at Function.Module._load (module.js:312:12) + // at Function.Module.runMain (module.js:497:10) + // at startup (node.js:119:16) + // at node.js:906:3 The location information will be one of: * `native`, if the frame represents a call internal to V8 (as in `[].forEach`). -* `plain-filename.js:line:column`, if the frame represents a call internal to Node.js. -* `/absolute/path/to/file.js:line:column`, if the frame represents a call in a user program, or its dependencies. +* `plain-filename.js:line:column`, if the frame represents a call internal + to Node.js. +* `/absolute/path/to/file.js:line:column`, if the frame represents a call in + a user program, or its dependencies. -It is important to note that the string representing the stacktrace is only -generated on **access**: it is lazily generated. +The string representing the stack trace is lazily generated when the +`error.stack` property is **accessed**. The number of frames captured by the stack trace is bounded by the smaller of `Error.stackTraceLimit` or the number of available frames on the current event loop tick. -System-level errors are generated as augmented `Error` instances, which are detailed -[below](#errors_system_errors). +System-level errors are generated as augmented `Error` instances, which are +detailed [below](#errors_system_errors). -### Class: RangeError +## Class: RangeError A subclass of `Error` that indicates that a provided argument was not within the -set or range of acceptable values for a function; whether that be a numeric -range, or outside the set of options for a given function parameter. An example: +set or range of acceptable values for a function; whether that is a numeric +range, or outside the set of options for a given function parameter. + +For example: -```javascript -require('net').connect(-1); // throws RangeError, port should be > 0 && < 65536 -``` + require('net').connect(-1); + // throws RangeError, port should be > 0 && < 65536 -Node.js will generate and throw `RangeError` instances *immediately* -- they are a form +Node.js will generate and throw `RangeError` instances *immediately* as a form of argument validation. -### Class: ReferenceError +## Class: ReferenceError -A subclass of `Error` that indicates that an attempt is being made to access a variable -that is not defined. Most commonly it indicates a typo, or an otherwise broken program. -While client code may generate and propagate these errors, in practice only V8 will do -so. +A subclass of `Error` that indicates that an attempt is being made to access a +variable that is not defined. Such errors commonly indicate typos in code, or +an otherwise broken program. -```javascript -doesNotExist; // throws ReferenceError, doesNotExist is not a variable in this program. -``` +While client code may generate and propagate these errors, in practice, only V8 +will do so. -`ReferenceError` instances will have an `.arguments` member that is an array containing -one element -- a string representing the variable that was not defined. + doesNotExist; + // throws ReferenceError, doesNotExist is not a variable in this program. -```javascript -try { - doesNotExist; -} catch(err) { - err.arguments[0] === 'doesNotExist'; -} -``` +`ReferenceError` instances will have an `error.arguments` property whose value +is an array containing a single element: a string representing the variable +that was not defined. -Unless the userland program is dynamically generating and running code, -ReferenceErrors should always be considered a bug in the program, or its -dependencies. + const assert = require('assert'); + try { + doesNotExist; + } catch(err) { + assert(err.arguments[0], 'doesNotExist'); + } + +Unless an application is dynamically generating and running code, +`ReferenceError` instances should always be considered a bug in the code +or its dependencies. -### Class: SyntaxError +## Class: SyntaxError A subclass of `Error` that indicates that a program is not valid JavaScript. These errors may only be generated and propagated as a result of code @@ -329,144 +368,129 @@ evaluation. Code evaluation may happen as a result of `eval`, `Function`, `require`, or [vm][]. These errors are almost always indicative of a broken program. -```javascript -try { - require('vm').runInThisContext('binary ! isNotOk'); -} catch(err) { - // err will be a SyntaxError -} -``` + try { + require('vm').runInThisContext('binary ! isNotOk'); + } catch(err) { + // err will be a SyntaxError + } -SyntaxErrors are unrecoverable from the context that created them – they may only be caught -by other contexts. +`SyntaxError` instances are unrecoverable in the context that created them – +they may only be caught by other contexts. -### Class: TypeError +## Class: TypeError -A subclass of `Error` that indicates that a provided argument is not an allowable -type. For example, passing a function to a parameter which expects a string would -be considered a TypeError. +A subclass of `Error` that indicates that a provided argument is not an +allowable type. For example, passing a function to a parameter which expects a +string would be considered a TypeError. -```javascript -require('url').parse(function() { }); // throws TypeError, since it expected a string -``` + require('url').parse(function() { }); + // throws TypeError, since it expected a string -Node.js will generate and throw `TypeError` instances *immediately* -- they are a form +Node.js will generate and throw `TypeError` instances *immediately* as a form of argument validation. -### Exceptions vs. Errors +## Exceptions vs. Errors -A JavaScript exception is a value that is thrown as a result of an invalid operation or -as the target of a `throw` statement. While it is not required that these values are instances of -`Error` or classes which inherit from `Error`, all exceptions thrown by Node.js or the JavaScript -runtime *will* be instances of Error. +A JavaScript exception is a value that is thrown as a result of an invalid +operation or as the target of a `throw` statement. While it is not required +that these values are instances of `Error` or classes which inherit from +`Error`, all exceptions thrown by Node.js or the JavaScript runtime *will* be +instances of Error. -Some exceptions are *unrecoverable* at the JavaScript layer. These exceptions will always bring -down the process. These are usually failed `assert()` checks or `abort()` calls in the C++ layer. +Some exceptions are *unrecoverable* at the JavaScript layer. Such exceptions +will *always* cause the Node.js process to crash. Examples include `assert()` +checks or `abort()` calls in the C++ layer. ## System Errors -System errors are generated in response to a program's runtime environment. -Ideally, they represent operational errors that the program needs to be able to -react to. They are generated at the syscall level: an exhaustive list of error -codes and their meanings is available by running `man 2 intro` or `man 3 errno` -on most Unices; or [online][]. +System errors are generated when exceptions occur within the program's +runtime environment. Typically, these are operational errors that occur +when an application violates an operating system constraint such as attempting +to read a file that does not exist or when the user does not have sufficient +permissions. + +System errors are typically generated at the syscall level: an exhaustive list +of error codes and their meanings is available by running `man 2 intro` or +`man 3 errno` on most Unices; or [online][]. -In Node.js, system errors are represented as augmented `Error` objects -- not full -subclasses, but instead an error instance with added members. +In Node.js, system errors are represented as augmented `Error` objects with +added properties. ### Class: System Error #### error.code #### error.errno -A string representing the error code, which is always `E` followed by capital -letters, and may be referenced in `man 2 intro`. +Returns a string representing the error code, which is always `E` followed by +a sequence of capital letters, and may be referenced in `man 2 intro`. + +The properties `error.code` and `error.errno` are aliases of one another and +return the same value. #### error.syscall -A string representing the [syscall][] that failed. +Returns a string describing the [syscall][] that failed. ### Common System Errors -This list is **not exhaustive**, but enumerates many of the common system errors when -writing a Node.js program. An exhaustive list may be found [here][online]. - -#### EACCES: Permission denied - -An attempt was made to access a file in a way forbidden by its file access -permissions. - -#### EADDRINUSE: Address already in use - -An attempt to bind a server ([`net`][], [`http`][], or [`https`][]) to a local -address failed due to another server on the local system already occupying -that address. - -#### ECONNREFUSED: Connection refused - -No connection could be made because the target machine actively refused -it. This usually results from trying to connect to a service that is inactive -on the foreign host. - -#### ECONNRESET: Connection reset by peer - -A connection was forcibly closed by a peer. This normally results -from a loss of the connection on the remote socket due to a timeout -or reboot. Commonly encountered via the [`http`][] and [`net`][] modules. - -#### EEXIST: File exists - -An existing file was the target of an operation that required that the target -not exist. - -#### EISDIR: Is a directory - -An operation expected a file, but the given pathname was a directory. - -#### EMFILE: Too many open files in system - -Maximum number of [file descriptors][] allowable on the system has -been reached, and requests for another descriptor cannot be fulfilled until -at least one has been closed. +This list is **not exhaustive**, but enumerates many of the common system +errors encountered when writing a Node.js program. An exhaustive list may be +found [here][online]. -Commonly encountered when opening many files at once in parallel, especially -on systems (in particular, OS X) where there is a low file descriptor limit -for processes. To remedy a low limit, run `ulimit -n 2048` in the same shell -that will run the Node.js process. +- `EACCES` (Permission denied): An attempt was made to access a file in a way + forbidden by its file access permissions. -#### ENOENT: No such file or directory +- `EADDRINUSE` (Address already in use): An attempt to bind a server + ([`net`][], [`http`][], or [`https`][]) to a local address failed due to + another server on the local system already occupying that address. -Commonly raised by [`fs`][] operations; a component of the specified pathname -does not exist -- no entity (file or directory) could be found by the given path. +- `ECONNREFUSED` (Connection refused): No connection could be made because the + target machine actively refused it. This usually results from trying to + connect to a service that is inactive on the foreign host. -#### ENOTDIR: Not a directory +- `ECONNRESET` (Connection reset by peer): A connection was forcibly closed by + a peer. This normally results from a loss of the connection on the remote + socket due to a timeout or reboot. Commonly encountered via the [`http`][] + and [`net`][] modules. -A component of the given pathname existed, but was not a directory as expected. -Commonly raised by [`fs.readdir`][]. +- `EEXIST` (File exists): An existing file was the target of an operation that + required that the target not exist. -#### ENOTEMPTY: Directory not empty +- `EISDIR` (Is a directory): An operation expected a file, but the given + pathname was a directory. -A directory with entries was the target of an operation that requires -an empty directory -- usually [`fs.unlink`][]. +- `EMFILE` (Too many open files in system): Maximum number of + [file descriptors][] allowable on the system has been reached, and + requests for another descriptor cannot be fulfilled until at least one + has been closed. This is encountered when opening many files at once in + parallel, especially on systems (in particular, OS X) where there is a low + file descriptor limit for processes. To remedy a low limit, run + `ulimit -n 2048` in the same shell that will run the Node.js process. -#### EPERM: Operation not permitted +- `ENOENT` (No such file or directory): Commonly raised by [`fs`][] operations + to indicate that a component of the specified pathname does not exist -- no + entity (file or directory) could be found by the given path. -An attempt was made to perform an operation that requires appropriate -privileges. +- `ENOTDIR` (Not a directory): A component of the given pathname existed, but + was not a directory as expected. Commonly raised by [`fs.readdir`][]. -#### EPIPE: Broken pipe +- `ENOTEMPTY` (Directory not empty): A directory with entries was the target + of an operation that requires an empty directory -- usually [`fs.unlink`][]. -A write on a pipe, socket, or FIFO for which there is no process to read the -data. Commonly encountered at the [`net`][] and [`http`][] layers, indicative that -the remote side of the stream being written to has been closed. +- `EPERM` (Operation not permitted): An attempt was made to perform an + operation that requires elevated privileges. -#### ETIMEDOUT: Operation timed out +- `EPIPE` (Broken pipe): A write on a pipe, socket, or FIFO for which there is + no process to read the data. Commonly encountered at the [`net`][] and + [`http`][] layers, indicative that the remote side of the stream being + written to has been closed. -A connect or send request failed because the connected party did not properly -respond after a period of time. Usually encountered by [`http`][] or [`net`][] -- -often a sign that a connected socket was not `.end()`'d appropriately. +- `ETIMEDOUT` (Operation timed out): A connect or send request failed because + the connected party did not properly respond after a period of time. Usually + encountered by [`http`][] or [`net`][] -- often a sign that a `socket.end()` + was not properly called. [`Error`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error [`fs.readdir`]: fs.html#fs_fs_readdir_path_callback @@ -488,3 +512,7 @@ often a sign that a connected socket was not `.end()`'d appropriately. [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html [V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API [vm]: vm.html +[`SyntaxError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError +[`ReferenceError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError +[`TypeError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError +[`domain`]: domain.html From abf50ac97061b15ddf1cc587bf47d7fc2cc3023c Mon Sep 17 00:00:00 2001 From: Ben Ripkens Date: Tue, 29 Dec 2015 00:10:21 +0100 Subject: [PATCH 141/262] doc: explain ClientRequest#setTimeout time unit State a time unit for the timeout parameter in ClientRequest#setTimeout PR-URL: https://github.com/nodejs/node/pull/4458 Reviewed-By: Stephen Belanger Reviewed-By: James M Snell --- doc/api/http.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 6562a469a73bdb..f62b248f63d5fe 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -375,6 +375,9 @@ Once a socket is assigned to this request and is connected Once a socket is assigned to this request and is connected [`socket.setTimeout()`][] will be called. +* `timeout` {Number} Milliseconds before a request is considered to be timed out. +* `callback` {Function} Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + ### request.write(chunk[, encoding][, callback]) Sends a chunk of the body. By calling this method From b539ff8815ef9fbdf108bcb2c98acfaf4fb55cc2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 28 Dec 2015 21:28:36 -0800 Subject: [PATCH 142/262] test: improve assert message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improves the message when an assertion fires in the test-net-pipe-connect-errors so that it indicates the incorrect value received rather than merely reporting that the value is incorrect. PR-URL: https://github.com/nodejs/node/pull/4461 Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins --- test/parallel/test-net-pipe-connect-errors.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-net-pipe-connect-errors.js b/test/parallel/test-net-pipe-connect-errors.js index 81ad90ef829c07..dbc7967fec9e63 100644 --- a/test/parallel/test-net-pipe-connect-errors.js +++ b/test/parallel/test-net-pipe-connect-errors.js @@ -42,7 +42,8 @@ var notSocketClient = net.createConnection(emptyTxt, function() { }); notSocketClient.on('error', function(err) { - assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED'); + assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED', + `received ${err.code} instead of ENOTSOCK or ECONNREFUSED`); notSocketErrorFired = true; }); From 9f23872f98f12acf347dc8afc84b92fca44d2843 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 29 Dec 2015 10:04:13 -0800 Subject: [PATCH 143/262] doc: improvements to events.markdown copy General improvements to events.markdown copy including a bit of restructuring and improved examples PR-URL: https://github.com/nodejs/node/pull/4468 Reviewed-By: Myles Borins Reviewed-By: Stephen Belanger --- doc/api/events.markdown | 352 ++++++++++++++++++++++++++++++---------- 1 file changed, 263 insertions(+), 89 deletions(-) diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 02617b10e8dc5c..0fdfc078749046 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -4,88 +4,257 @@ -Many objects in Node.js emit events: a [`net.Server`][] emits an event each -time a peer connects to it, a [`fs.ReadStream`][] emits an event when the file -is opened. All objects which emit events are instances of `events.EventEmitter`. -You can access this module by doing: `require("events");` +Much of the Node.js core API is built around an idiomatic asynchronous +event-driven architecture in which certain kinds of objects (called "emitters") +periodically emit named events that cause Function objects ("listeners") to be +called. -Typically, event names are represented by a camel-cased string, however, -there aren't any strict restrictions on that, as any valid property key will be -accepted. +For instance: a [`net.Server`][] object emits an event each time a peer +connects to it; a [`fs.ReadStream`][] emits an event when the file is opened; +a [stream][] emits an event whenever data is available to be read. -Functions can then be attached to objects, to be executed when an event -is emitted. These functions are called _listeners_. Inside a listener -function, `this` refers to the `EventEmitter` that the listener was -attached to. +All objects that emit events are instances of the `EventEmitter` class. These +objects expose an `eventEmitter.on()` function that allows one or more +Functions to be attached to named events emitted by the object. Typically, +event names are camel-cased strings but any valid JavaScript property key +can be used. +When the `EventEmitter` object emits an event, all of the Functions attached +to that specific event are called _synchronously_. Any values returned by the +called listeners are _ignored_ and will be discarded. -## Class: events.EventEmitter +The following example shows a simple `EventEmitter` instance with a single +listener. The `eventEmitter.on()` method is used to register listeners, while +the `eventEmitter.emit()` method is used to trigger the event. -Use `require('events')` to access the EventEmitter class. + const EventEmitter = require('events'); + const util = require('util'); + + function MyEmitter() { + EventEmitter.call(this); + } + util.inherits(MyEmitter, EventEmitter); -```javascript -const EventEmitter = require('events'); -``` + const myEmitter = new MyEmitter(); + myEmitter.on('event', function() { + console.log('an event occurred!'); + }); + myEmitter.emit('event'); -When an `EventEmitter` instance experiences an error, the typical action is -to emit an `'error'` event. Error events are treated as a special case in -Node.js. If there is no listener for it, then the default action is to print -a stack trace and exit the program. +Any object can become an `EventEmitter` through inheritance. The example above +uses the traditional Node.js style prototypical inheritance using +the `util.inherits()` method. It is, however, possible to use ES6 classes as +well: -All EventEmitters emit the event `'newListener'` when new listeners are -added and `'removeListener'` when a listener is removed. + const EventEmitter = require('events'); -### Inheriting from 'EventEmitter' + class MyEmitter extends EventEmitter {} -Inheriting from `EventEmitter` is no different from inheriting from any other -constructor function. For example: + const myEmitter = new MyEmitter(); + myEmitter.on('event', function() { + console.log('an event occurred!'); + }); + myEmitter.emit('event'); + +## Passing arguments and `this` to listeners + +The `eventEmitter.emit()` method allows an arbitrary set of arguments to be +passed to the listener functions. It is important to keep in mind that when an +ordinary listener function is called by the `EventEmitter`, the standard `this` +keyword is intentionally set to reference the `EventEmitter` to which the +listener is attached. + + const myEmitter = new MyEmitter(); + myEmitter.on('event', function(a, b) { + console.log(a, b, this); + // Prints: + // a b MyEmitter { + // domain: null, + // _events: { event: [Function] }, + // _eventsCount: 1, + // _maxListeners: undefined } + }); + myEmitter.emit('event', 'a', 'b'); - 'use strict'; - const util = require('util'); - const EventEmitter = require('events'); +It is possible to use ES6 Arrow Functions as listeners, however, when doing so, +the `this` keyword will no longer reference the `EventEmitter` instance: - function MyEventEmitter() { - // Initialize necessary properties from `EventEmitter` in this instance - EventEmitter.call(this); - } + const myEmitter = new MyEmitter(); + myEmitter.on('event', (a, b) => { + console.log(a, b, this); + // Prints: a b {} + }); + myEmitter.emit('event', 'a', 'b'); + +## Asynchronous vs. Synchronous + +The `EventListener` calls all listeners synchronously in the order in which +they were registered. This is important to ensure the proper sequencing of +events and to avoid race conditions or logic errors. When appropriate, +listener functions can switch to an asynchronous mode of operation using +the `setImmediate()` or `process.nextTick()` methods: + + const myEmitter = new MyEmitter(); + myEmitter.on('event', (a, b) => { + setImmediate(() => { + console.log('this happens asynchronously'); + }); + }); + myEmitter.emit('event', 'a', 'b'); + +## Handling events only once + +When a listener is registered using the `eventEmitter.on()` method, that +listener will be invoked _every time_ the named event is emitted. + + const myEmitter = new MyEmitter(); + var m = 0; + myEmitter.on('event', () => { + console.log(++m); + }); + myEmitter.emit('event'); + // Prints: 1 + myEmitter.emit('event'); + // Prints: 2 + +Using the `eventEmitter.once()` method, it is possible to register a listener +that is immediately unregistered after it is called. + + const myEmitter = new MyEmitter(); + var m = 0; + myEmitter.once('event', () => { + console.log(++m); + }); + myEmitter.emit('event'); + // Prints: 1 + myEmitter.emit('event'); + // Ignored + +## Error events + +When an error occurs within an `EventEmitter` instance, the typical action is +for an `'error'` event to be emitted. These are treated as a special case +within Node.js. + +If an `EventEmitter` does _not_ have at least one listener registered for the +`'error'` event, and an `'error'` event is emitted, the error is thrown, a +stack trace is printed, and the Node.js process exits. + + const myEmitter = new MyEmitter(); + myEmitter.emit('error', new Error('whoops!')); + // Throws and crashes Node.js + +To guard against crashing the Node.js process, developers can either register +a listener for the `process.on('uncaughtException')` event or use the +[`domain`][] module (_Note, however, that the `domain` module has been +deprecated_). + + const myEmitter = new MyEmitter(); + + process.on('uncaughtException', (err) => { + console.log('whoops! there was an error'); + }); + + myEmitter.emit('error', new Error('whoops!')); + // Prints: whoops! there was an error + +As a best practice, developers should always register listeners for the +`'error'` event: + + const myEmitter = new MyEmitter(); + myEmitter.on('error', (err) => { + console.log('whoops! there was an error'); + }); + myEmitter.emit('error', new Error('whoops!')); + // Prints: whoops! there was an error - // Inherit functions from `EventEmitter`'s prototype - util.inherits(MyEventEmitter, EventEmitter); +## Class: EventEmitter -### Class Method: EventEmitter.listenerCount(emitter, event) +The `EventEmitter` class is defined and exposed by the `events` module: - Stability: 0 - Deprecated: Use [emitter.listenerCount][] instead. + const EventEmitter = require('events'); -Returns the number of listeners for a given event. +All EventEmitters emit the event `'newListener'` when new listeners are +added and `'removeListener'` when a listener is removed. ### Event: 'newListener' * `event` {String|Symbol} The event name * `listener` {Function} The event handler function -This event is emitted *before* a listener is added. When this event is -triggered, the listener has not been added to the array of listeners for the -`event`. Any listeners added to the event `name` in the newListener event -callback will be added *before* the listener that is in the process of being -added. +The `EventEmitter` instance will emit it's own `'newListener'` event *before* +a listener is added to it's internal array of listeners. + +Listeners registered for the `'newListener'` event will be passed the event +name and a reference to the listener being added. + +The fact that the event is triggered before adding the listener has a subtle +but important side effect: any *additional* listeners registered to the same +`name` *within* the `'newListener'` callback will be inserted *before* the +listener that is in the process of being added. + + const myEmitter = new MyEmitter(); + // Only do this once so we don't loop forever + myEmitter.once('newListener', (event, listener) => { + if (event === 'event') { + // Insert a new listener in front + myEmitter.on('event', () => { + console.log('B'); + }); + } + }); + myEmitter.on('event', () => { + console.log('A'); + }); + myEmitter.emit('event'); + // Prints: + // B + // A ### Event: 'removeListener' * `event` {String|Symbol} The event name * `listener` {Function} The event handler function -This event is emitted *after* a listener is removed. When this event is -triggered, the listener has been removed from the array of listeners for the -`event`. +The `'removeListener'` event is emitted *after* a listener is removed. + +### EventEmitter.listenerCount(emitter, event) + + Stability: 0 - Deprecated: Use [`emitter.listenerCount()`][] instead. + +A class method that returns the number of listeners for the given `event` +registered on the given `emitter`. + + const myEmitter = new MyEmitter(); + myEmitter.on('event', () => {}); + myEmitter.on('event', () => {}); + console.log(EventEmitter.listenerCount(myEmitter, 'event')); + // Prints: 2 ### EventEmitter.defaultMaxListeners -[`emitter.setMaxListeners(n)`][] sets the maximum on a per-instance basis. -This class property lets you set it for *all* `EventEmitter` instances, -current and future, effective immediately. Use with care. +By default, a maximum of `10` listeners can be registered for any single +event. This limit can be changed for individual `EventEmitter` instances +using the [`emitter.setMaxListeners(n)`][] method. To change the default +for *all* `EventEmitter` instances, the `EventEmitter.defaultMaxListeners` +property can be used. + +Take caution when setting the `EventEmitter.defaultMaxListeners` because the +change effects *all* `EventEmitter` instances, including those created before +the change is made. However, calling [`emitter.setMaxListeners(n)`][] still has +precedence over `EventEmitter.defaultMaxListeners`. -Note that [`emitter.setMaxListeners(n)`][] still has precedence over -`EventEmitter.defaultMaxListeners`. +Note that this is not a hard limit. The `EventEmitter` instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a `possible EventEmitter memory leak` has been detected. For any single +`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` +methods can be used to temporarily avoid this warning: + + emitter.setMaxListeners(emitter.getMaxListeners() + 1); + emitter.once('event', () => { + // do stuff + emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); + }); ### emitter.addListener(event, listener) @@ -93,77 +262,72 @@ Alias for `emitter.on(event, listener)`. ### emitter.emit(event[, arg1][, arg2][, ...]) -Calls each of the listeners in order with the supplied arguments. +Synchronously calls each of the listeners registered for `event`, in the order +they were registered, passing the supplied arguments to each. Returns `true` if event had listeners, `false` otherwise. ### emitter.getMaxListeners() -Returns the current max listener value for the emitter which is either set by -[`emitter.setMaxListeners(n)`][] or defaults to +Returns the current max listener value for the `EventEmitter` which is either +set by [`emitter.setMaxListeners(n)`][] or defaults to [`EventEmitter.defaultMaxListeners`][]. -This can be useful to increment/decrement max listeners to avoid the warning -while not being irresponsible and setting a too big number. - - emitter.setMaxListeners(emitter.getMaxListeners() + 1); - emitter.once('event', () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); - }); - -### emitter.listenerCount(type) +### emitter.listenerCount(event) -* `type` {Value} The type of event +* `event` {Value} The type of event -Returns the number of listeners listening to the `type` of event. +Returns the number of listeners listening to the `event` type. ### emitter.listeners(event) -Returns a copy of the array of listeners for the specified event. +Returns a copy of the array of listeners for the specified `event`. server.on('connection', (stream) => { console.log('someone connected!'); }); - console.log(util.inspect(server.listeners('connection'))); // [ [Function] ] + console.log(util.inspect(server.listeners('connection'))); + // Prints: [ [Function] ] ### emitter.on(event, listener) -Adds a listener to the end of the listeners array for the specified `event`. -No checks are made to see if the `listener` has already been added. Multiple -calls passing the same combination of `event` and `listener` will result in the -`listener` being added multiple times. +Adds the `listener` function to the end of the listeners array for the +specified `event`. No checks are made to see if the `listener` has already +been added. Multiple calls passing the same combination of `event` and +`listener` will result in the `listener` being added, and called, multiple +times. server.on('connection', (stream) => { console.log('someone connected!'); }); -Returns emitter, so calls can be chained. +Returns a reference to the `EventEmitter` so calls can be chained. ### emitter.once(event, listener) -Adds a **one time** listener for the event. This listener is -invoked only the next time the event is fired, after which -it is removed. +Adds a **one time** `listener` function for the `event`. This listener is +invoked only the next time `event` is triggered, after which it is removed. server.once('connection', (stream) => { console.log('Ah, we have our first user!'); }); -Returns emitter, so calls can be chained. +Returns a reference to the `EventEmitter` so calls can be chained. ### emitter.removeAllListeners([event]) -Removes all listeners, or those of the specified event. It's not a good idea to -remove listeners that were added elsewhere in the code, especially when it's on -an emitter that you didn't create (e.g. sockets or file streams). +Removes all listeners, or those of the specified `event`. + +Note that it is bad practice to remove listeners added elsewhere in the code, +particularly when the `EventEmitter` instance was created by some other +component or module (e.g. sockets or file streams). -Returns emitter, so calls can be chained. +Returns a reference to the `EventEmitter` so calls can be chained. ### emitter.removeListener(event, listener) -Removes a listener from the listener array for the specified event. -**Caution**: changes array indices in the listener array behind the listener. +Removes the specified `listener` from the listener array for the specified +`event`. var callback = function(stream) { console.log('someone connected!'); @@ -177,19 +341,29 @@ listener array. If any single listener has been added multiple times to the listener array for the specified `event`, then `removeListener` must be called multiple times to remove each instance. -Returns emitter, so calls can be chained. +Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered *after* the listener +being removed. This will not impact the order in which listeners are called, +but it will means that any copies of the listener array as returned by +the `emitter.listeners()` method will need to be recreated. + +Returns a reference to the `EventEmitter` so calls can be chained. ### emitter.setMaxListeners(n) -By default EventEmitters will print a warning if more than 10 listeners are -added for a particular event. This is a useful default which helps finding -memory leaks. Obviously not all Emitters should be limited to 10. This function -allows that to be increased. Set to `Infinity` (or `0`) for unlimited. +By default EventEmitters will print a warning if more than `10` listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. Obviously, not all events should be limited to just 10 listeners. +The `emitter.setMaxListeners()` method allows the limit to be modified for this +specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) +for to indicate an unlimited number of listeners. -Returns emitter, so calls can be chained. +Returns a reference to the `EventEmitter` so calls can be chained. [`net.Server`]: net.html#net_class_net_server [`fs.ReadStream`]: fs.html#fs_class_fs_readstream [`emitter.setMaxListeners(n)`]: #events_emitter_setmaxlisteners_n [`EventEmitter.defaultMaxListeners`]: #events_eventemitter_defaultmaxlisteners -[emitter.listenerCount]: #events_emitter_listenercount_type +[`emitter.listenerCount()`]: #events_emitter_listenercount_event +[`domain`]: domain.html +[stream]: stream.html From aa6e704753cfc2dac3a07546a65a201dd1717638 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 31 Dec 2015 08:21:50 -0800 Subject: [PATCH 144/262] test: clarify role of domains in test Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: https://github.com/nodejs/node/pull/4474 Reviewed-By: Colin Ihrig Reviewed-By: Julien Gilli --- test/parallel/test-microtask-queue-integration-domain.js | 8 +++++++- test/parallel/test-microtask-queue-run-domain.js | 8 +++++++- .../parallel/test-microtask-queue-run-immediate-domain.js | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-microtask-queue-integration-domain.js b/test/parallel/test-microtask-queue-integration-domain.js index 89697ef7f711bb..f0d0196ac2f9a7 100644 --- a/test/parallel/test-microtask-queue-integration-domain.js +++ b/test/parallel/test-microtask-queue-integration-domain.js @@ -1,7 +1,13 @@ 'use strict'; require('../common'); var assert = require('assert'); -var domain = require('domain'); + +// Requiring the domain module here changes the function that is used by node to +// call process.nextTick's callbacks to a variant that specifically handles +// domains. We want to test this specific variant in this test, and so even if +// the domain module is not used, this require call is needed and must not be +// removed. +require('domain'); var implementations = [ function(fn) { diff --git a/test/parallel/test-microtask-queue-run-domain.js b/test/parallel/test-microtask-queue-run-domain.js index 3e35cea15ed9dc..fb5139f71d65aa 100644 --- a/test/parallel/test-microtask-queue-run-domain.js +++ b/test/parallel/test-microtask-queue-run-domain.js @@ -1,7 +1,13 @@ 'use strict'; require('../common'); var assert = require('assert'); -var domain = require('domain'); + +// Requiring the domain module here changes the function that is used by node to +// call process.nextTick's callbacks to a variant that specifically handles +// domains. We want to test this specific variant in this test, and so even if +// the domain module is not used, this require call is needed and must not be +// removed. +require('domain'); function enqueueMicrotask(fn) { Promise.resolve().then(fn); diff --git a/test/parallel/test-microtask-queue-run-immediate-domain.js b/test/parallel/test-microtask-queue-run-immediate-domain.js index 5ce3ec59b6731b..4a7729ab98a062 100644 --- a/test/parallel/test-microtask-queue-run-immediate-domain.js +++ b/test/parallel/test-microtask-queue-run-immediate-domain.js @@ -1,7 +1,13 @@ 'use strict'; require('../common'); var assert = require('assert'); -var domain = require('domain'); + +// Requiring the domain module here changes the function that is used by node to +// call process.nextTick's callbacks to a variant that specifically handles +// domains. We want to test this specific variant in this test, and so even if +// the domain module is not used, this require call is needed and must not be +// removed. +require('domain'); function enqueueMicrotask(fn) { Promise.resolve().then(fn); From 4e936b1552833e9ce9ba31837b060a00c2fc84dc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 30 Dec 2015 14:02:28 -0800 Subject: [PATCH 145/262] test: refactor test-fs-empty-readStream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor test to remove unnecessary booleans and one unnecesary timer. Instead, throw Error objects where appropriate and rely on common.mustCall(). The timer seemed to be the source of an issue when parallelizing tests. Ref: https://github.com/nodejs/node/pull/4476#issuecomment-168080875 PR-URL: https://github.com/nodejs/node/pull/4490 Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig --- test/parallel/test-fs-empty-readStream.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/test/parallel/test-fs-empty-readStream.js b/test/parallel/test-fs-empty-readStream.js index 0863e0cdba4ddb..c5a016f9ea2c36 100644 --- a/test/parallel/test-fs-empty-readStream.js +++ b/test/parallel/test-fs-empty-readStream.js @@ -15,15 +15,7 @@ fs.open(emptyFile, 'r', function(error, fd) { throw new Error('data event should not emit'); }); - var readEmit = false; - read.once('end', function() { - readEmit = true; - console.error('end event 1'); - }); - - setTimeout(function() { - assert.equal(readEmit, true); - }, common.platformTimeout(50)); + read.once('end', common.mustCall(function endEvent1() {})); }); fs.open(emptyFile, 'r', function(error, fd) { @@ -36,13 +28,11 @@ fs.open(emptyFile, 'r', function(error, fd) { throw new Error('data event should not emit'); }); - var readEmit = false; - read.once('end', function() { - readEmit = true; - console.error('end event 2'); + read.once('end', function endEvent2() { + throw new Error('end event should not emit'); }); setTimeout(function() { - assert.equal(readEmit, false); + assert.equal(read.isPaused(), true); }, common.platformTimeout(50)); }); From 596438e7414a8a60477600797c3fc147377b4c9b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 30 Dec 2015 20:13:15 -0800 Subject: [PATCH 146/262] test: remove time check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test-child-process-fork-net2.js checks that things happen within certain time constraints, thus doubling as a benchmark test in addition to a functionality test. This change removes the time check, as it was causing the test to fail on SmartOS and Windows (and possibly elsewhere) when the tests were run in parallel on CI. There is no guarantee that other tests won't consume enough resources to slow this test down, so don't check the time constraints (beyond the generous timeout that the test is given by test.py in the first place, of course). If we want to do benchmark/performance tests, we should keep them separate from pure functionality tests. The time check may have been a remnant of the distant past when Node.js was much slower. It predates io.js Ref: https://github.com/nodejs/node/pull/4476 PR-URL: https://github.com/nodejs/node/pull/4494 Reviewed-By: Colin Ihrig Reviewed-By: Johan Bergström --- test/parallel/test-child-process-fork-net2.js | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js index 95ec26a88d0de2..dd89557b61121d 100644 --- a/test/parallel/test-child-process-fork-net2.js +++ b/test/parallel/test-child-process-fork-net2.js @@ -117,47 +117,29 @@ if (process.argv[2] === 'child') { }); var closeEmitted = false; - server.on('close', function() { - console.error('[m] server close'); + server.on('close', common.mustCall(function() { closeEmitted = true; - console.error('[m] killing child processes'); child1.kill(); child2.kill(); child3.kill(); - }); + })); server.listen(common.PORT, '127.0.0.1'); - var timeElapsed = 0; var closeServer = function() { - console.error('[m] closeServer'); - var startTime = Date.now(); - server.on('close', function() { - console.error('[m] emit(close)'); - timeElapsed = Date.now() - startTime; - }); - - console.error('[m] calling server.close'); server.close(); setTimeout(function() { assert(!closeEmitted); - console.error('[m] sending close to children'); child1.send('close'); child2.send('close'); child3.disconnect(); }, 200); }; - var min = 190; - var max = common.platformTimeout(2000); process.on('exit', function() { assert.equal(disconnected, count); assert.equal(connected, count); - assert.ok(closeEmitted); - assert.ok(timeElapsed >= min && timeElapsed <= max, - `timeElapsed was not between ${min} and ${max} ms:` + - `${timeElapsed}`); }); } From 0589987e7f139b3257fd3c7d391832194f392479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Thu, 31 Dec 2015 17:32:42 +1100 Subject: [PATCH 147/262] test: inherit JOBS from environment In some virtualized environments the amount of available resources are misleading; for instance `multiprocessing.cpu_count()` on our current 4-core smartos vm's returns `48`. This is not a bug, merely how the vm host provides information about available hardware. Avoid running into issues by overriding `cpu_count()` with `JOBS`. PR-URL: https://github.com/nodejs/node/pull/4495 Reviewed-By: Brian White --- tools/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 4baca769c25ee5..a864b0ef6140d3 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1337,7 +1337,10 @@ def ProcessOptions(options): print "The test group to run (n) must be smaller than number of groups (m)." return False if options.J: - options.j = multiprocessing.cpu_count() + # inherit JOBS from environment if provided. some virtualised systems + # tends to exaggerate the number of available cpus/cores. + cores = os.environ.get('JOBS') + options.j = int(cores) if cores is not None else multiprocessing.cpu_count() if options.flaky_tests not in ["run", "skip", "dontcare"]: print "Unknown flaky-tests mode %s" % options.flaky_tests return False From 749d0155be7e13d6307f2bcbed5d98ae2c07454e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 2 Jan 2016 21:39:55 -0800 Subject: [PATCH 148/262] test: fix flaky streams test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use common.platformTimeout() to fix flaky test-stream2-readable-empty-buffer-no-eofi on Raspberry Pis. Fixes: https://github.com/nodejs/node/issues/4493 PR-URL: https://github.com/nodejs/node/pull/4516 Reviewed-By: Johan Bergström Reviewed-By: Evan Lucas Reviewed-By: James M Snell --- ...st-stream2-readable-empty-buffer-no-eof.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 2ebb1a696f3348..18012df3a41d89 100644 --- a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -1,14 +1,14 @@ 'use strict'; -require('../common'); -var assert = require('assert'); +const common = require('../common'); +const assert = require('assert'); -var Readable = require('stream').Readable; +const Readable = require('stream').Readable; test1(); test2(); function test1() { - var r = new Readable(); + const r = new Readable(); // should not end when we get a Buffer(0) or '' as the _read result // that just means that there is *temporarily* no data, but to go @@ -20,9 +20,9 @@ function test1() { // r.read(0) again later, otherwise there is no more work being done // and the process just exits. - var buf = new Buffer(5); - buf.fill('x'); - var reads = 5; + const buf = Buffer(5).fill('x'); + let reads = 5; + const timeout = common.platformTimeout(50); r._read = function(n) { switch (reads--) { case 0: @@ -30,15 +30,15 @@ function test1() { case 1: return r.push(buf); case 2: - setTimeout(r.read.bind(r, 0), 50); + setTimeout(r.read.bind(r, 0), timeout); return r.push(new Buffer(0)); // Not-EOF! case 3: - setTimeout(r.read.bind(r, 0), 50); + setTimeout(r.read.bind(r, 0), timeout); return process.nextTick(function() { return r.push(new Buffer(0)); }); case 4: - setTimeout(r.read.bind(r, 0), 50); + setTimeout(r.read.bind(r, 0), timeout); return setTimeout(function() { return r.push(new Buffer(0)); }); @@ -51,9 +51,9 @@ function test1() { } }; - var results = []; + const results = []; function flow() { - var chunk; + let chunk; while (null !== (chunk = r.read())) results.push(chunk + ''); } From f710028891b0eaf130e69a7621c8aeb2ae7e292d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 3 Jan 2016 08:26:31 -0800 Subject: [PATCH 149/262] test: remove flaky designations for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three tests designated as flaky on Linux have not failed on the continuous integration server in a long time. Removing flaky designation for these tests. Fixes: https://github.com/nodejs/node/issues/4446 PR-URL: https://github.com/nodejs/node/pull/4519 Reviewed-By: Johan Bergström Reviewed-By: James M Snell Reviewed-By: Brian White --- test/parallel/parallel.status | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index fb301e0bfd8e4e..f6613046be4639 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -13,9 +13,6 @@ test-cluster-shared-leak : PASS,FLAKY test-tls-ticket-cluster : PASS,FLAKY [$system==linux] -test-http-client-timeout-event : PASS,FLAKY -test-child-process-buffering : PASS,FLAKY -test-child-process-exit-code : PASS,FLAKY [$system==macos] From 6e531bb8d270ad23042dfffb70c7ae4aa711cec8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 3 Jan 2016 18:53:27 -0800 Subject: [PATCH 150/262] test: fix flaky test-http-agent-keepalive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove timeout delay causing flakiness on SmartOS. Fixes: https://github.com/nodejs/node/issues/4492 PR-URL: https://github.com/nodejs/node/pull/4524 Reviewed-By: James M Snell Reviewed-By: Rod Vagg Reviewed-By: Johan Bergström --- test/parallel/test-http-agent-keepalive.js | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index ef9553c8316841..8e80b00b2c1c49 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -1,27 +1,27 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var Agent = require('_http_agent').Agent; -var EventEmitter = require('events').EventEmitter; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const Agent = require('_http_agent').Agent; +const EventEmitter = require('events').EventEmitter; -var agent = new Agent({ +const agent = new Agent({ keepAlive: true, keepAliveMsecs: 1000, maxSockets: 5, maxFreeSockets: 5 }); -var server = http.createServer(function(req, res) { +const server = http.createServer(function(req, res) { if (req.url === '/error') { res.destroy(); return; } else if (req.url === '/remote_close') { - // cache the socket, close it after 100ms - var socket = res.connection; - setTimeout(function() { + // cache the socket, close it after a short delay + const socket = res.connection; + setImmediate(function() { socket.end(); - }, 100); + }); } res.end('hello world'); }); @@ -35,7 +35,7 @@ function get(path, callback) { }, callback); } -var name = 'localhost:' + common.PORT + ':'; +const name = 'localhost:' + common.PORT + ':'; function checkDataAndSockets(body) { assert.equal(body.toString(), 'hello world'); @@ -77,7 +77,7 @@ function remoteClose() { assert.equal(agent.freeSockets[name], undefined, 'freeSockets is not empty'); remoteError(); - }, 200); + }, common.platformTimeout(200)); }); }); }); @@ -85,7 +85,7 @@ function remoteClose() { function remoteError() { // remove server will destroy ths socket - var req = get('/error', function(res) { + const req = get('/error', function(res) { throw new Error('should not call this function'); }); req.on('error', function(err) { @@ -98,7 +98,7 @@ function remoteError() { assert.equal(agent.sockets[name], undefined); assert.equal(agent.freeSockets[name], undefined); done(); - }, 1); + }, common.platformTimeout(1)); }); } From a7fddd761dd95b1b88d9b22756039b40d3359663 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 4 Jan 2016 16:15:10 -0800 Subject: [PATCH 151/262] doc: close backtick in process.title description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4534 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: Brian White Reviewed-By: Michaël Zasso --- doc/api/process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index 987bca9f657a23..d954f4c9ab843e 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -891,7 +891,7 @@ See [the tty docs][] for more information. ## process.title -Getter/setter to set what is displayed in `ps. +Getter/setter to set what is displayed in `ps`. When used as a setter, the maximum length is platform-specific and probably short. From 3ffc928a9ae5907ae5c0d8f5a9653751248ed992 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 4 Jan 2016 22:14:40 -0600 Subject: [PATCH 152/262] doc: stronger suggestion for userland assert Fixes: https://github.com/nodejs/node/issues/4532 PR-URL: https://github.com/nodejs/node/pull/4535 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Sam Roberts Reviewed-By: Roman Reiss --- doc/api/assert.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index bab280f325ff27..cf710c6ed4ced0 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -2,10 +2,11 @@ Stability: 3 - Locked -The `assert` module provides a simple set of assertion tests that can be used -to test invariants and implement unit tests. While the `assert` module is -generally intended for internal use by Node.js itself, it can be used by user -code calling `require('assert')`. +The `assert` module provides a simple set of assertion tests that can be used to +test invariants. The module is intended for internal use by Node.js, but can be +used in application code via `require('assert')`. However, `assert` is not a +testing framework, and is not intended to be used as a general purpose assertion +library. The API for the `assert` module is [Locked][]. This means that there will be no additions or changes to any of the methods implemented and exposed by From 715eb1015c8355422915c55bf4aa12e8543b299d Mon Sep 17 00:00:00 2001 From: Richard Sun Date: Tue, 5 Jan 2016 03:12:56 -0800 Subject: [PATCH 153/262] doc: fix numbering in stream.markdown PR-URL: https://github.com/nodejs/node/pull/4538 Reviewed-By: Colin Ihrig --- doc/api/stream.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 9ab35254bad21b..76d96233ac4bde 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -723,7 +723,7 @@ To implement any sort of stream, the pattern is the same: [`util.inherits`][] method is particularly helpful for this.) 2. Call the appropriate parent class constructor in your constructor, to be sure that the internal mechanisms are set up properly. -2. Implement one or more specific methods, as detailed below. +3. Implement one or more specific methods, as detailed below. The class to extend and the method(s) to implement depend on the sort of stream class you are writing: From ac3f1a7712183ee23596e75b03f9972e0763ec21 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 5 Jan 2016 12:52:20 -0500 Subject: [PATCH 154/262] doc: bring releases.md up to date Refs: https://github.com/nodejs/node/issues/3254 PR-URL: https://github.com/nodejs/node/pull/4540 Reviewed-By: James M Snell --- doc/releases.md | 166 +++++++++++++++++++++++++++++++----------------- 1 file changed, 107 insertions(+), 59 deletions(-) diff --git a/doc/releases.md b/doc/releases.md index 57e95c266f4ff6..53aa4d53fb9157 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -50,19 +50,42 @@ Notes: - Dates listed below as _"YYYY-MM-DD"_ should be the date of the release **as UTC**. Use `date -u +'%Y-%m-%d'` to find out what this is. - Version strings are listed below as _"vx.y.z"_. Substitute for the release version. -### 1. Ensure that HEAD Is Stable +### 1. Cherry-picking from `master` and other branches -Run a **[node-test-pull-request](https://ci.nodejs.org/job/node-test-pull-request/)** test run to ensure that the build is stable and the HEAD commit is ready for release. +Create a new branch named _"vx.y.z-proposal"_, or something similar. Using `git cherry-pick`, bring the appropriate commits into your new branch. To determine the relevant commits, use [`branch-diff`](https://github.com/rvagg/branch-diff) and [`changelog-maker`](https://github.com/rvagg/changelog-maker/) (both are available on npm and should be installed globally). These tools depend on our commit metadata, as well as the `semver-minor` and `semver-major` GitHub labels. One drawback is that when the `PR-URL` metadata is accidentally omitted from a commit, the commit will show up because it's unsure if it's a duplicate or not. -### 2. Produce a Nightly Build _(optional)_ +Carefully review the list of commits looking for errors (incorrect `PR-URL`, incorrect semver, etc.). Commits labeled as semver minor or semver major should only be cherry-picked when appropriate for the type of release being made. Previous release commits and version bumps do not need to be cherry-picked. -If there is a reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** and wait for it to drop in . Follow the directions and enter a proper length commit SHA, enter a date string, and select "nightly" for "disttype". +### 2. Update `src/node_version.h` -This is particularly recommended if there has been recent work relating to the OS X or Windows installers as they are not tested in any way by CI. +Set the version for the proposed release using the following macros, which are already defined in `src/node_version.h`: -### 3. Update the _CHANGELOG.md_ +``` +#define NODE_MAJOR_VERSION x +#define NODE_MINOR_VERSION y +#define NODE_PATCH_VERSION z +``` -Collect a formatted list of commits since the last release. Use [changelog-maker](https://github.com/rvagg/changelog-maker) (available from npm: `npm install changelog-maker -g`) to do this. +Set the `NODE_VERSION_IS_RELEASE` macro value to `1`. This causes the build to be produced with a version string that does not have a trailing pre-release tag: + +``` +#define NODE_VERSION_IS_RELEASE 1 +``` + +**Also consider whether to bump `NODE_MODULE_VERSION`**: + +This macro is used to signal an ABI version for native addons. It currently has two common uses in the community: + +* Determining what API to work against for compiling native addons, e.g. [NAN](https://github.com/rvagg/nan) uses it to form a compatibility-layer for much of what it wraps. +* Determining the ABI for downloading pre-built binaries of native addons, e.g. [node-pre-gyp](https://github.com/mapbox/node-pre-gyp) uses this value as exposed via `process.versions.modules` to help determine the appropriate binary to download at install-time. + +The general rule is to bump this version when there are _breaking ABI_ changes and also if there are non-trivial API changes. The rules are not yet strictly defined, so if in doubt, please confer with someone that will have a more informed perspective, such as a member of the NAN team. + +**Note** that it is current TSC policy to bump major version when ABI changes. If you see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC. Commits may need to be reverted or a major version bump may need to happen. + +### 3. Update `CHANGELOG.md` + +Collect a formatted list of commits since the last release. Use [`changelog-maker`](https://github.com/rvagg/changelog-maker) to do this. ``` $ changelog-maker --group @@ -74,10 +97,10 @@ Note that changelog-maker counts commits since the last tag and if the last tag $ changelog-maker --group --start-ref v2.3.1 ``` -The _CHANGELOG.md_ entry should take the following form: +The `CHANGELOG.md` entry should take the following form: ``` -## YYYY-MM-DD, Version x.y.z, @releaser +## YYYY-MM-DD, Version x.y.z (Release Type), @releaser ### Notable changes @@ -95,55 +118,46 @@ See https://github.com/nodejs/node/labels/confirmed-bug for complete and current ### Commits -* Include the full list of commits since the last release here +* Include the full list of commits since the last release here. Do not include "Working on X.Y.Z+1" commits. ``` -### 4. Update _src/node_version.h_ +The release type should be either Stable, LTS, or Maintenance, depending on the type of release being produced. -The following macros should already be set for the release since they will have been updated directly following the last release. They shouldn't require changing: +### 4. Create Release Commit -``` -#define NODE_MAJOR_VERSION x -#define NODE_MINOR_VERSION y -#define NODE_PATCH_VERSION z -``` - -However, the `NODE_VERSION_IS_RELEASE` macro needs to be set to `1` for the build to be produced with a version string that does not have a trailing pre-release tag: +The `CHANGELOG.md` and `src/node_version.h` changes should be the final commit that will be tagged for the release. When committing these to git, use the following message format: ``` -#define NODE_VERSION_IS_RELEASE 1 -``` +YYYY-MM-DD, Version x.y.z (Release Type) -**Also consider whether to bump `NODE_MODULE_VERSION`**: +Notable changes: -This macro is used to signal an ABI version for native addons. It currently has two common uses in the community: +* Copy the notable changes list here, reformatted for plain-text +``` -* Determining what API to work against for compiling native addons, e.g. [NAN](https://github.com/rvagg/nan) uses it to form a compatibility-layer for much of what it wraps. -* Determining the ABI for downloading pre-built binaries of native addons, e.g. [node-pre-gyp](https://github.com/mapbox/node-pre-gyp) uses this value as exposed via `process.versions.modules` to help determine the appropriate binary to download at install-time. +### 5. Propose Release on GitHub -The general rule is to bump this version when there are _breaking ABI_ changes and also if there are non-trivial API changes. The rules are not yet strictly defined, so if in doubt, please confer with someone that will have a more informed perspective, such as a member of the NAN team. +Push the release branch to `nodejs/node`, not to your own fork. This allows release branches to more easily be passed between members of the release team if necessary. -**Note** that it is current TSC policy to bump major version when ABI changes. If you see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC. Commits may need to be reverted or a major version bump may need to happen. +Create a pull request targeting the correct release line. For example, a v5.3.0-proposal PR should target v5.x, not master. Paste the CHANGELOG modifications into the body of the PR so that collaborators can see what is changing. These PRs should be left open for at least 24 hours, and can be updated as new commits land. -### 5. Create Release Commit +If you need any additional information about any of the commits, this PR is a good place to @-mention the relevant contributors. -The _CHANGELOG.md_ and _src/node_version.h_ changes should be the final commit that will be tagged for the release. +This is also a good time to update the release commit to include `PR-URL` metadata. -When committing these to git, use the following message format: +### 6. Ensure that the Release Branch is Stable -``` -YYYY-MM-DD node.js vx.y.z Release +Run a **[node-test-pull-request](https://ci.nodejs.org/job/node-test-pull-request/)** test run to ensure that the build is stable and the HEAD commit is ready for release. -Notable changes: +Perform some smoke-testing. We have [citgm](https://github.com/nodejs/citgm) for this. You can also manually test important modules from the ecosystem. Remember that node-gyp and npm both take a `--nodedir` flag to point to your local repository so that you can test unreleased versions without needing node-gyp to download headers for you. -* Copy the notable changes list here, reformatted for plain-text -``` +### 7. Produce a Nightly Build _(optional)_ -### 6. Push to GitHub +If there is a reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** and wait for it to drop in . Follow the directions and enter a proper length commit SHA, enter a date string, and select "nightly" for "disttype". -Note that it is not essential that the release builds be created from the Node.js repository. They may be created from your own fork if you desire. It is preferable, but not essential, that the commits remain the same between that used to build and the tagged commit in the Node.js repository. +This is particularly recommended if there has been recent work relating to the OS X or Windows installers as they are not tested in any way by CI. -### 7. Produce Release Builds +### 8. Produce Release Builds Use **[iojs+release](https://ci.nodejs.org/job/iojs+release/)** to produce release artifacts. Enter the commit that you want to build from and select "release" for "disttype". @@ -153,44 +167,62 @@ All release slaves should achieve "SUCCESS" (and be green, not red). A release w You can rebuild the release as many times as you need prior to promoting them if you encounter problems. -Note that you do not have to wait for the ARM builds if they take longer than the others. It is only necessary to have the main Linux (x64 and x86), OS X .pkg and .tar.gz, Windows (x64 and x86) .msi and .exe, source, headers and docs (both produced currently by an OS X slave). That is, the slaves with "arm" in their name don't need to have finished to progress to the next step. However, **if you promote builds _before_ ARM builds have finished, you must repeat the promotion step for the ARM builds when they are ready**. +If you have an error on Windows and need to start again, be aware that you'll get immediate failure unless you wait up to 2 minutes for the linker to stop from previous jobs. i.e. if a build fails after having started compiling, that slave will still have a linker process that's running for another couple of minutes which will prevent Jenkins from clearing the workspace to start a new one. This isn't a big deal, it's just a hassle because it'll result in another failed build if you start again! + +ARMv7 takes the longest to compile. Unfortunately ccache isn't as effective on release builds, I think it's because of the additional macro settings that go in to a release build that nullify previous builds. Also most of the release build machines are separate to the test build machines so they don't get any benefit from ongoing compiles between releases. You can expect 1.5 hours for the ARMv7 builder to complete and you should normally wait for this to finish. It is possible to rush a release out if you want and add additional builds later but we normally provide ARMv7 from initial promotion. -### 8. Tag and Sign the Release Commit +You do not have to wait for the ARMv6 / Raspberry PI builds if they take longer than the others. It is only necessary to have the main Linux (x64 and x86), OS X .pkg and .tar.gz, Windows (x64 and x86) .msi and .exe, source, headers and docs (both produced currently by an OS X slave). **If you promote builds _before_ ARM builds have finished, you must repeat the promotion step for the ARM builds when they are ready**. -Tag the release as vx.y.z and sign **using the same GPG key that will be used to sign SHASUMS256.txt**. +### 9. Test the Build + +Jenkins collects the artifacts from the builds, allowing you to download and install the new build. Make sure that the build appears correct. Check the version numbers, and perform some basic checks to confirm that all is well with the build before moving forward. + +### 10. Tag and Sign the Release Commit + +Once you have produced builds that you're happy with, create a new tag. By waiting until this stage to create tags, you can discard a proposed release if something goes wrong or additional commits are required. Once you have created a tag and pushed it to GitHub, you ***should not*** delete and re-tag. If you make a mistake after tagging then you'll have to version-bump and start again and count that tag/version as lost. + +Tag summaries have a predictable format, look at a recent tag to see, `git tag -v v5.3.0`. The message should look something like `2015-12-16 Node.js v5.3.0 (Stable) Release`. + +Create a tag using the following command: ``` -$ git tag -sm 'YYYY-MM-DD node.js vz.y.x Release' +$ git tag -sm 'YYYY-MM-DD Node.js vx.y.z (Release Type) Release' ``` -Push the tag to GitHub. +The tag **must** be signed using the GPG key that's listed for you on the project README. + +Push the tag to the repo before you promote the builds. If you haven't pushed your tag first, then build promotion won't work properly. Push the tag using the following command: ``` -$ git push origin +$ git push ``` -### 9. Set Up For the Next Release +### 11. Set Up For the Next Release -Edit _src/node_version.h_ again and: +On release proposal branch, edit `src/node_version.h` again and: * Increment `NODE_PATCH_VERSION` by one * Change `NODE_VERSION_IS_RELEASE` back to `0` -Commit this change with: +Commit this change with the following commit message format: ``` -$ git commit -am 'Working on vx.y.z' # where 'z' is the incremented patch number +Working on vx.y.z # where 'z' is the incremented patch number + +PR-URL: ``` This sets up the branch so that nightly builds are produced with the next version number _and_ a pre-release tag. -### 10. Promote and Sign the Release Builds +Merge your release branch into the stable branch that you are releasing from (not master). -**It is important that the same individual who signed the release tag be the one to promote the builds as the SHASUMS256.txt file needs to be signed with the same GPG key!** +Cherry-pick the release commit to `master`. After cherry-picking, edit `src/node_version.h` to ensure the version macros contain whatever values were previously on `master`. `NODE_VERSION_IS_RELEASE` should be `0`. -When you are confident that the build slaves have properly produced usable artifacts and uploaded them to the web server, you can promote them to release status. This is done by interacting with the web server via the _dist_ user. +### 12. Promote and Sign the Release Builds -The _tools/release.sh_ script should be used to promote and sign the build. When run, it will perform the following actions: +**It is important that the same individual who signed the release tag be the one to promote the builds as the SHASUMS256.txt file needs to be signed with the same GPG key!** + +Use `tools/release.sh` to promote and sign the build. When run, it will perform the following actions: **a.** Select a GPG key from your private keys. It will use a command similar to: `gpg --list-secret-keys` to list your keys. If you don't have any keys, it will bail. (Why are you releasing? Your tag should be signed!) If you have only one key, it will use that. If you have more than one key it will ask you to select one from the list. Be sure to use the same key that you signed your git tag with. @@ -204,20 +236,36 @@ The _tools/release.sh_ script should be used to promote and sign the build. When **f.** Output an ASCII armored version of your public GPG key using a command similar to: `gpg --default-key YOURKEY --armor --export --output /path/to/SHASUMS256.txt.gpg`. This does not require your password and is mainly a convenience for users, although not the recommended way to get a copy of your key. -**g.** Upload the SHASUMS256.txt\* files back to the server into the release directory. +**g.** Upload the SHASUMS256.txt files back to the server into the release directory. -If you didn't wait for ARM builds in the previous step before promoting the release, you should re-run _tools/release.sh_ after the ARM builds have finished. That will move the ARM artifacts into the correct location. You will be prompted to re-sign SHASUMS256.txt. +If you didn't wait for ARM builds in the previous step before promoting the release, you should re-run `tools/release.sh` after the ARM builds have finished. That will move the ARM artifacts into the correct location. You will be prompted to re-sign SHASUMS256.txt. -### 11. Check the Release +### 13. Check the Release Your release should be available at and . Check that the appropriate files are in place. You may want to check that the binaries are working as appropriate and have the right internal version strings. Check that the API docs are available at . Check that the release catalog files are correct at and . -### 12. Announce +### 14. Create a Blog Post + +There is an automatic build that is kicked off when you promote new builds, so within a few minutes nodejs.org will be listing your new version as the latest release. However, the blog post is not yet fully automatic. + +Create a new blog post by running the [nodejs.org release-post.js script](https://github.com/nodejs/nodejs.org/blob/master/scripts/release-post.js). This script will use the promoted builds and changelog to generate the post. Run `npm serve` to preview the post locally before pushing to the [nodejs.org](https://github.com/nodejs/nodejs.org) repo. + +* You can add a short blurb just under the main heading if you want to say something important, otherwise the text should be publication ready. +* The links to the download files won't be complete unless you waited for the ARMv6 builds. Any downloads that are missing will have `*Coming soon*` next to them. It's your responsibility to manually update these later when you have the outstanding builds. +* The SHASUMS256.txt.asc content is at the bottom of the post. When you update the list of tarballs you'll need to copy/paste the new contents of this file to reflect those changes. +* Always use pull-requests on the nodejs.org repo. Be respectful of that working group, but you shouldn't have to wait for PR sign-off. Opening a PR and merging it immediately _should_ be fine. +* Changes to `master` on the nodejs.org repo will trigger a new build of nodejs.org so your changes should appear in a few minutes after pushing. + +### 15. Announce + +The nodejs.org website will automatically rebuild and include the new version. You simply need to announce the build, preferably via Twitter with a message such as: + +> v5.3.0 of @nodejs is out @ https://nodejs.org/dist/latest/ changelog @ https://github.com/nodejs/node/blob/master/CHANGELOG.md#2015-12-16-version-530-stable-cjihrig … something here about notable changes -The nodejs.org website will automatically rebuild and include the new version. You simply need to announce the build, preferably via twitter with a message such as: +### 16. Cleanup -> v2.3.2 of @official_iojs is out @ https://nodejs.org/dist/latest/ changelog @ https://github.com/nodejs/node/blob/master/CHANGELOG.md#2015-07-01-version-232-rvagg … something here about notable changes +Close your release proposal PR and remove the proposal branch. -### 13. Celebrate +### 17. Celebrate _In whatever form you do this..._ From 42f1c9039b283074360a485417e3bdb8a6afb867 Mon Sep 17 00:00:00 2001 From: Brian White Date: Tue, 5 Jan 2016 23:46:05 -0500 Subject: [PATCH 155/262] doc: add missing backtick for readline PR-URL: https://github.com/nodejs/node/pull/4549 Reviewed-By: Colin Ihrig --- doc/api/readline.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index 5d98f501f68c65..05a52cd25cc390 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -247,7 +247,7 @@ Clears the screen from the current position of the cursor down. ## readline.createInterface(options) -Creates a readline `Interface` instance. Accepts an `options Object that takes +Creates a readline `Interface` instance. Accepts an `options` Object that takes the following values: - `input` - the readable stream to listen to (Required). From 4bcef3cdc726d1947eaab09183b62ce25924d90a Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Thu, 7 Jan 2016 16:38:15 -0800 Subject: [PATCH 156/262] doc: add Myles Borins to Release Team Adds Myles Borins and his public key to the README PR-URL: https://github.com/nodejs/node/pull/4578 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3df9b93dd39d66..8f2ada16767835 100644 --- a/README.md +++ b/README.md @@ -444,6 +444,7 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys: * **Jeremiah Senkpiel** <fishrock@keybase.io> `FD3A5288F042B6850C66B31F09FE44734EB7990E` * **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` * **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` +* **Myles Borins** <thealphanerd@keybase.io> `792807C150954BF0299B289A38CE40DEEE898E15` The full set of trusted release keys can be imported by running: @@ -454,6 +455,7 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF174 gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D +gpg --keyserver pool.sks-keyservers.net --recv-keys 792807C150954BF0299B289A38CE40DEEE898E15 ``` See the section above on [Verifying Binaries](#verifying-binaries) for From 10ffdaff2317adced41f45ced100980d4d8b36e3 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Thu, 7 Jan 2016 18:41:16 -0600 Subject: [PATCH 157/262] doc: add Evan Lucas to Release Team Adds Evan Lucas and his public key to the README for releases PR-URL: https://github.com/nodejs/node/pull/4579 Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8f2ada16767835..c4bba4ed380d2e 100644 --- a/README.md +++ b/README.md @@ -445,6 +445,7 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys: * **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` * **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` * **Myles Borins** <thealphanerd@keybase.io> `792807C150954BF0299B289A38CE40DEEE898E15` +* **Evan Lucas** <evanlucas@me.com> `B9AE9905FFD7803F25714661B63B535A4C206CA9` The full set of trusted release keys can be imported by running: @@ -456,6 +457,7 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D gpg --keyserver pool.sks-keyservers.net --recv-keys 792807C150954BF0299B289A38CE40DEEE898E15 +gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9 ``` See the section above on [Verifying Binaries](#verifying-binaries) for From 3a6ab1b34b1018b62d4877415a2fdc65b1a9b828 Mon Sep 17 00:00:00 2001 From: Minwoo Jung Date: Fri, 8 Jan 2016 21:13:33 +0900 Subject: [PATCH 158/262] doc: fix description about the latest-codename fix description about the latest LTS release download page to make it clear PR-URL: https://github.com/nodejs/node/pull/4583 Reviewed-By: Rod Vagg Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4bba4ed380d2e..0de5a9e75a7562 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ Binaries, installers, and source tarballs are available at , listed under their version strings. The [latest](https://nodejs.org/download/release/latest/) directory is an alias for the latest Stable release. The latest LTS release from an LTS -line is available in the form: latest-lts-_codename_. For example: - +line is available in the form: latest-_codename_. For example: + **Nightly** builds are available at , listed under their version From 70791aec85386af2d05f5ee6f99e7f029b084aa4 Mon Sep 17 00:00:00 2001 From: Sequoia McDowell Date: Fri, 8 Jan 2016 13:22:23 -0500 Subject: [PATCH 159/262] doc: label http.IncomingMessage as a Class `Server`, `ServerResponse` etc. were marked as classes, this one class was overlooked. PR-URL: https://github.com/nodejs/node/pull/4589 Fixes: https://github.com/nodejs/node/issues/4576 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Roman Reiss --- doc/api/http.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index f62b248f63d5fe..5540dc6c1d4675 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -781,7 +781,7 @@ should be used to determine the number of bytes in a given encoding. And Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. -## http.IncomingMessage +## Class: http.IncomingMessage An `IncomingMessage` object is created by [`http.Server`][] or [`http.ClientRequest`][] and passed as the first argument to the `'request'` From 19f21ab10ecb76cf11602bb3bdf8214dd342cc81 Mon Sep 17 00:00:00 2001 From: Sequoia McDowell Date: Fri, 8 Jan 2016 13:27:44 -0500 Subject: [PATCH 160/262] doc: document http's server.listen return value The server method returns `self` in order to allow chaining. PR-URL: https://github.com/nodejs/node/pull/4590 Fixes: https://github.com/nodejs/node/issues/4571 Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- doc/api/http.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 5540dc6c1d4675..3904dd29d4d485 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -506,6 +506,8 @@ Listening on a file descriptor is not supported on Windows. This function is asynchronous. The last parameter `callback` will be added as a listener for the `'listening'` event. See also [`net.Server.listen()`][]. +Returns `server`. + ### server.listen(path[, callback]) Start a UNIX socket server listening for connections on the given `path`. From 909df52f84369ffbae46c5d45b9bd71ee43d991a Mon Sep 17 00:00:00 2001 From: Robert Jefe Lindstaedt Date: Sun, 10 Jan 2016 17:18:49 +0100 Subject: [PATCH 161/262] doc: adds usage of readline line-by-line parsing In order to make developers aware of node-core built-in functionality, which might replace module APIs, we should add an example of readline`s interface usage. SEO will eventually aid this goal, since it is well searched on Q&A sites. PR-URL: https://github.com/nodejs/node/pull/4609 Reviewed-By: Roman Reiss Reviewed-By: James M Snell > --- doc/api/readline.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index 05a52cd25cc390..a83b492b0b5621 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -232,6 +232,22 @@ line interface: process.exit(0); }); +## Example: Read File Stream Line-by-Line + +A common case for `readline`'s `input` option is to pass a filesystem readable +stream to it. This is how one could craft line-by-line parsing of a file: + + const readline = require('readline'); + const fs = require('fs'); + + const rl = readline.createInterface({ + input: fs.createReadStream('sample.txt') + }); + + rl.on('line', function (line) { + console.log('Line from file:', line); + }); + ## readline.clearLine(stream, dir) Clears current line of given TTY stream in a specified direction. From a6483ebd03508db4afcbaeb2ec9c9f2889142650 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 11 Jan 2016 16:27:03 +0100 Subject: [PATCH 162/262] doc: update stylesheet to match frontpage - Changed colors to match frontpage as close as possible. - Links are slightly more horizontally padded as compared before to accomodate for the hover effect. - Slightly reduced the scroll indication height on the TOC. - The main content is now offset using margin instead of the previous border hack. - remove empty footer that was rendering a dark bar on the bottom of each page without any content. PR-URL: https://github.com/nodejs/node/pull/4621 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Brian White --- doc/api_assets/style.css | 68 ++++++++++++++++++++++------------------ doc/template.html | 3 -- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 6f26c3a0c71075..4c8d64ab5579c3 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -11,26 +11,28 @@ body { font-size: 62.5%; margin: 0; padding: 0; - color: #3a3a3a; - background: #fcfefa; + color: #333; + background: #fff; } #content { font-size: 1.8em; } -a { - color: #FE5210; +a, +a:link, +a:active { + color: #80bd01; text-decoration: none; -} - -a:visited { - color: #FE7110; + border-radius: 2px; + padding: .1em .2em; + margin: -.1em 0; } a:hover, a:focus { - color: #FFA158; + color: #fff; + background-color: #80bd01; } strong { @@ -170,7 +172,6 @@ dd + dt.pre { } h1, h2, h3, h4, h5, h6 { - color: #301004; text-rendering: optimizeLegibility; font-weight: 700; position: relative; @@ -280,7 +281,7 @@ code.pre { } #intro a { - color: #333; + color: #ddd; font-size: 1.25em; font-weight: bold; } @@ -296,7 +297,6 @@ hr { } #toc h2 { - color: #C73E09; margin-top: 0; font-size: 1.0em; line-height: 0; @@ -339,12 +339,14 @@ p code, li code { font-size: 0.9em; color: #040404; - background-color: #f2f5f0; - padding: 0.2em 0.4em; + background-color: #f0f0f0; + padding: .1em .2em; + border-radius: 2px; } a code { color: inherit; + background: inherit; } span.type { @@ -360,12 +362,13 @@ span.type { #column1.interior { width: 702px; - border-left: 234px solid #f2f5f0; + margin-left: 234px; padding-left: 2.0em; } #column2.interior { width: 234px; + background: #333; position: fixed; height: 100%; overflow-y: scroll; @@ -377,8 +380,8 @@ span.type { bottom: 0; left: 0; width: 234px; - height: 5em; - background: linear-gradient(rgba(242,245,240, 0), rgba(242,245,240, 1)); + height: 4em; + background: linear-gradient(rgba(242,245,240, 0), rgba(51, 51, 51, 1)); pointer-events: none; } @@ -386,9 +389,9 @@ span.type { list-style: none; margin-left: 0em; margin-top: 1.25em; - background: #f2f5f0; + background: #333; margin-bottom: 0; - padding-bottom: 4em; + padding-bottom: 3em; } #column2 ul li { @@ -403,19 +406,24 @@ span.type { } #column2 ul li a { - color: #7a7a7a; + color: #ccc; + border-radius: 0; } -#column2 ul li a.active { - color: #533; - border-bottom: 1px solid #533; +#column2 ul li a.active, +#column2 ul li a.active:hover, +#column2 ul li a.active:focus { + color: #80bd01; + border-radius: 0; + border-bottom: 1px solid #80bd01; + background: none; } -#footer { - padding: 0; - min-height: 24px; - background: #333; - color: white; +#intro a:hover, +#column2 ul li a:hover, +#column2 ul li a:focus { + color: #fff; + background: none; } span > .mark, @@ -455,7 +463,7 @@ td > *:last-child { font-size: 2.1em; } #column1.interior { - border-left: 0; + margin-left: 0; padding-left: 0.5em; padding-right: 0.5em; width: auto; @@ -473,7 +481,7 @@ td > *:last-child { font-size: 2.4em; } #column1.interior { - border-left: 0; + margin-left: 0; padding-left: 0.5em; padding-right: 0.5em; width: auto; diff --git a/doc/template.html b/doc/template.html index f9f27d0dc267b4..dec3f50670226e 100644 --- a/doc/template.html +++ b/doc/template.html @@ -42,9 +42,6 @@

Table of Contents

- - From 0b70a9a2b3d2159cc7e618dd1112649c3e4a931e Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Mon, 11 Jan 2016 18:01:31 -0800 Subject: [PATCH 163/262] doc: add branch-diff example to releases.md Useful to have for reference, especially for onboarding PR-URL: https://github.com/nodejs/node/pull/4636 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/releases.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/releases.md b/doc/releases.md index 53aa4d53fb9157..2f55c2d8188538 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -54,6 +54,12 @@ Notes: Create a new branch named _"vx.y.z-proposal"_, or something similar. Using `git cherry-pick`, bring the appropriate commits into your new branch. To determine the relevant commits, use [`branch-diff`](https://github.com/rvagg/branch-diff) and [`changelog-maker`](https://github.com/rvagg/changelog-maker/) (both are available on npm and should be installed globally). These tools depend on our commit metadata, as well as the `semver-minor` and `semver-major` GitHub labels. One drawback is that when the `PR-URL` metadata is accidentally omitted from a commit, the commit will show up because it's unsure if it's a duplicate or not. +For a list of commits that could be landed in a patch release on v5.x + +``` +$ branch-diff v5.x master --exclude-label semver-major,semver-minor,dont-land-on-v5.x --simple +``` + Carefully review the list of commits looking for errors (incorrect `PR-URL`, incorrect semver, etc.). Commits labeled as semver minor or semver major should only be cherry-picked when appropriate for the type of release being made. Previous release commits and version bumps do not need to be cherry-picked. ### 2. Update `src/node_version.h` From 1622bcc2afd5bf5a3afbf7d04b847acfd7b278e9 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 12 Jan 2016 16:07:29 -0800 Subject: [PATCH 164/262] docs: fix npm command in releases.md PR-URL: https://github.com/nodejs/node/pull/4656 Reviewed-By: Colin Ihrig Reviewed-By: Rod Vagg Reviewed-By: James M Snell --- doc/releases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/releases.md b/doc/releases.md index 2f55c2d8188538..daa325b0bce351 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -254,7 +254,7 @@ Your release should be available at and Date: Tue, 12 Jan 2016 16:22:25 -0800 Subject: [PATCH 165/262] docs: update gpg key for Myles Borins Original key did not have personal information associated with it. The new key rectifies this problem PR-URL: https://github.com/nodejs/node/pull/4657 Reviewed-By: Colin Ihrig Reviewed-By: Rod Vagg Reviewed-By: James M Snell --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0de5a9e75a7562..c534c64fbe29a7 100644 --- a/README.md +++ b/README.md @@ -444,7 +444,7 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys: * **Jeremiah Senkpiel** <fishrock@keybase.io> `FD3A5288F042B6850C66B31F09FE44734EB7990E` * **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` * **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` -* **Myles Borins** <thealphanerd@keybase.io> `792807C150954BF0299B289A38CE40DEEE898E15` +* **Myles Borins** <myles.borins@gmail.com> `C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8` * **Evan Lucas** <evanlucas@me.com> `B9AE9905FFD7803F25714661B63B535A4C206CA9` The full set of trusted release keys can be imported by running: @@ -456,7 +456,7 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF174 gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D -gpg --keyserver pool.sks-keyservers.net --recv-keys 792807C150954BF0299B289A38CE40DEEE898E15 +gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9 ``` From cf7ebd3b47fc0fea7e794c26eb702bfe7b3faf66 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 28 Dec 2015 16:58:24 -0500 Subject: [PATCH 166/262] test: fix flaky cluster-disconnect-race On single core Windows systems, process.send() would cause an EPIPE because of the ordering of the IPC channel disconnect and the process.send(). The test was originally only relevant for non-Windows platforms, so this commit merely skips the test on Windows. Fixes: https://github.com/nodejs/node/issues/4450 PR-URL: https://github.com/nodejs/node/pull/4457 Reviewed-By: Rich Trott --- test/parallel/test-cluster-disconnect-race.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-cluster-disconnect-race.js b/test/parallel/test-cluster-disconnect-race.js index 40cfd919e3e964..97d55a20b1ac51 100644 --- a/test/parallel/test-cluster-disconnect-race.js +++ b/test/parallel/test-cluster-disconnect-race.js @@ -7,6 +7,12 @@ const common = require('../common'); const assert = require('assert'); const net = require('net'); const cluster = require('cluster'); + +if (common.isWindows) { + console.log('1..0 # Skipped: This test does not apply to Windows.'); + return; +} + cluster.schedulingPolicy = cluster.SCHED_NONE; if (cluster.isMaster) { @@ -19,9 +25,9 @@ if (cluster.isMaster) { worker2.on('online', common.mustCall(worker2.disconnect)); })); - cluster.on('exit', function(worker, code) { + cluster.on('exit', common.mustCall(function(worker, code) { assert.strictEqual(code, 0, 'worker exited with error'); - }); + }, 2)); return; } From df4938e5ef8d93b32138d2a162570e24273bb5c7 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Sun, 27 Sep 2015 13:59:53 +0200 Subject: [PATCH 167/262] dns: remove nonexistant exports.ADNAME MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This error code export was mistakingly introduced in a 2012 commit which added more error codes. The correct export.BADNAME was added in https://github.com/nodejs/node/pull/3051. Semver: Major PR-URL: https://github.com/nodejs/node/pull/3051 Fixes: https://github.com/nodejs/node/issues/3050 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Sakthipriyan Vairamani --- lib/dns.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/dns.js b/lib/dns.js index 71d20bdca403df..782cdfa3f79df4 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -330,7 +330,6 @@ exports.NOTFOUND = 'ENOTFOUND'; exports.NOTIMP = 'ENOTIMP'; exports.REFUSED = 'EREFUSED'; exports.BADQUERY = 'EBADQUERY'; -exports.ADNAME = 'EADNAME'; exports.BADNAME = 'EBADNAME'; exports.BADFAMILY = 'EBADFAMILY'; exports.BADRESP = 'EBADRESP'; From dba3dc523cf2929c9c7ca91ec51835c9434b086d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 29 Dec 2015 18:56:29 -0800 Subject: [PATCH 168/262] test: remove unused modules Many tests use require() to import modules that subsequently never gets used. This removes those imports and, in a few cases, removes other unused variables from tests. PR-URL: https://github.com/nodejs/node/pull/4684 Reviewed-By: Myles Borins --- test/addons/at-exit/test.js | 2 +- test/internet/test-dns-ipv4.js | 2 -- test/internet/test-dns-ipv6.js | 2 -- test/message/2100bytes.js | 1 - test/parallel/test-cluster-eaddrinuse.js | 1 - test/parallel/test-cluster-worker-forced-exit.js | 1 - test/parallel/test-crypto-certificate.js | 1 - .../parallel/test-dgram-send-callback-buffer-length.js | 2 -- test/parallel/test-dgram-udp4.js | 3 +-- test/parallel/test-domain-multi.js | 1 - test/parallel/test-eval-require.js | 2 -- .../test-event-emitter-listeners-side-effects.js | 1 - test/parallel/test-fs-readdir.js | 1 - test/parallel/test-listen-fd-cluster.js | 1 - test/parallel/test-listen-fd-server.js | 1 - test/parallel/test-readline-keys.js | 3 +-- test/parallel/test-tls-legacy-onselect.js | 10 ---------- test/parallel/test-zlib-dictionary.js | 1 - test/parallel/test-zlib-flush-drain.js | 1 - test/parallel/test-zlib-write-after-flush.js | 1 - test/pummel/test-dtrace-jsstack.js | 3 --- test/pummel/test-http-client-reconnect-bug.js | 1 - test/pummel/test-keep-alive.js | 1 - test/pummel/test-timer-wrap2.js | 3 +-- test/pummel/test-tls-securepair-client.js | 4 ---- test/sequential/test-child-process-execsync.js | 1 - test/sequential/test-regress-GH-1697.js | 3 +-- test/sequential/test-stdout-close-catch.js | 1 - 28 files changed, 5 insertions(+), 50 deletions(-) diff --git a/test/addons/at-exit/test.js b/test/addons/at-exit/test.js index 32264a6604eeb6..c94453cb3b05a4 100644 --- a/test/addons/at-exit/test.js +++ b/test/addons/at-exit/test.js @@ -1,3 +1,3 @@ 'use strict'; require('../../common'); -var binding = require('./build/Release/binding'); +require('./build/Release/binding'); diff --git a/test/internet/test-dns-ipv4.js b/test/internet/test-dns-ipv4.js index 04befca6370e1e..bdca60d1b4fd5d 100644 --- a/test/internet/test-dns-ipv4.js +++ b/test/internet/test-dns-ipv4.js @@ -3,9 +3,7 @@ var common = require('../common'); var assert = require('assert'), dns = require('dns'), net = require('net'), - isIP = net.isIP, isIPv4 = net.isIPv4; -var util = require('util'); var expected = 0, completed = 0, diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js index 27547edcd84b46..d7c50a1e86b656 100644 --- a/test/internet/test-dns-ipv6.js +++ b/test/internet/test-dns-ipv6.js @@ -3,9 +3,7 @@ var common = require('../common'); var assert = require('assert'), dns = require('dns'), net = require('net'), - isIP = net.isIP, isIPv6 = net.isIPv6; -var util = require('util'); var expected = 0, completed = 0, diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js index 03aca7a6626bce..0f696806be03fe 100644 --- a/test/message/2100bytes.js +++ b/test/message/2100bytes.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var util = require('util'); console.log([ '_______________________________________________50', diff --git a/test/parallel/test-cluster-eaddrinuse.js b/test/parallel/test-cluster-eaddrinuse.js index 6ff68252d9d867..3821551f00a32c 100644 --- a/test/parallel/test-cluster-eaddrinuse.js +++ b/test/parallel/test-cluster-eaddrinuse.js @@ -5,7 +5,6 @@ var common = require('../common'); var assert = require('assert'); -var cluster = require('cluster'); var fork = require('child_process').fork; var net = require('net'); diff --git a/test/parallel/test-cluster-worker-forced-exit.js b/test/parallel/test-cluster-worker-forced-exit.js index 76f5cc69a9f716..ef9f7728bad3a2 100644 --- a/test/parallel/test-cluster-worker-forced-exit.js +++ b/test/parallel/test-cluster-worker-forced-exit.js @@ -2,7 +2,6 @@ require('../common'); var assert = require('assert'); var cluster = require('cluster'); -var net = require('net'); var SENTINEL = 42; diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 8286d58d1e44ca..9814b395552e9f 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -11,7 +11,6 @@ var crypto = require('crypto'); crypto.DEFAULT_ENCODING = 'buffer'; var fs = require('fs'); -var path = require('path'); // Test Certificates var spkacValid = fs.readFileSync(common.fixturesDir + '/spkac.valid'); diff --git a/test/parallel/test-dgram-send-callback-buffer-length.js b/test/parallel/test-dgram-send-callback-buffer-length.js index a34c5e2eb6b8db..80c2d23e42ef55 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length.js +++ b/test/parallel/test-dgram-send-callback-buffer-length.js @@ -2,9 +2,7 @@ var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var dgram = require('dgram'); -var callbacks = 0; var client, timer, buf, len, offset; diff --git a/test/parallel/test-dgram-udp4.js b/test/parallel/test-dgram-udp4.js index 5b1ede414eb1a1..58c8b69839ffe6 100644 --- a/test/parallel/test-dgram-udp4.js +++ b/test/parallel/test-dgram-udp4.js @@ -2,8 +2,7 @@ var common = require('../common'); var assert = require('assert'); -var fs = require('fs'), - dgram = require('dgram'), server, client, +var dgram = require('dgram'), server, client, server_port = common.PORT, message_to_send = 'A message to send', timer; diff --git a/test/parallel/test-domain-multi.js b/test/parallel/test-domain-multi.js index e5f9f6748b178e..ac01d66deee544 100644 --- a/test/parallel/test-domain-multi.js +++ b/test/parallel/test-domain-multi.js @@ -4,7 +4,6 @@ var common = require('../common'); var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var caughtA = false; var caughtB = false; diff --git a/test/parallel/test-eval-require.js b/test/parallel/test-eval-require.js index f966b5a98c80ba..4e2ddf42b6dffa 100644 --- a/test/parallel/test-eval-require.js +++ b/test/parallel/test-eval-require.js @@ -2,8 +2,6 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var path = require('path'); -var fs = require('fs'); var options = { cwd: common.fixturesDir diff --git a/test/parallel/test-event-emitter-listeners-side-effects.js b/test/parallel/test-event-emitter-listeners-side-effects.js index 8f40d88f34486e..5b9f2f3ddf0f41 100644 --- a/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-listeners-side-effects.js @@ -2,7 +2,6 @@ require('../common'); var assert = require('assert'); -var events = require('events'); var EventEmitter = require('events').EventEmitter; var assert = require('assert'); diff --git a/test/parallel/test-fs-readdir.js b/test/parallel/test-fs-readdir.js index b08f42b5c23f85..9a9b85ecaccd2c 100644 --- a/test/parallel/test-fs-readdir.js +++ b/test/parallel/test-fs-readdir.js @@ -2,7 +2,6 @@ const common = require('../common'); const assert = require('assert'); -const path = require('path'); const fs = require('fs'); const readdirDir = common.tmpDir; diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index f6d00c72a0f78c..c321f699d7a89d 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -4,7 +4,6 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); var PORT = common.PORT; -var spawn = require('child_process').spawn; var cluster = require('cluster'); console.error('Cluster listen fd test', process.argv[2] || 'runner'); diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index d51d51ee8eb4de..3e0fa521f75334 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -4,7 +4,6 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); var PORT = common.PORT; -var spawn = require('child_process').spawn; if (common.isWindows) { console.log('1..0 # Skipped: This test is disabled on windows.'); diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js index 5cac38a1d7db42..e026c0b583cd9e 100644 --- a/test/parallel/test-readline-keys.js +++ b/test/parallel/test-readline-keys.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var EventEmitter = require('events').EventEmitter; var PassThrough = require('stream').PassThrough; var assert = require('assert'); var inherits = require('util').inherits; @@ -16,7 +15,7 @@ inherits(FakeInput, PassThrough); var fi = new FakeInput(); var fo = new FakeInput(); -var rli = new Interface({ input: fi, output: fo, terminal: true }); +new Interface({ input: fi, output: fo, terminal: true }); var keys = []; fi.on('keypress', function(s, k) { diff --git a/test/parallel/test-tls-legacy-onselect.js b/test/parallel/test-tls-legacy-onselect.js index 6f1e9a91a8344c..d3b20d5d8a4cef 100644 --- a/test/parallel/test-tls-legacy-onselect.js +++ b/test/parallel/test-tls-legacy-onselect.js @@ -9,18 +9,8 @@ if (!common.hasCrypto) { var tls = require('tls'); var net = require('net'); -var fs = require('fs'); - var success = false; -function filenamePEM(n) { - return require('path').join(common.fixturesDir, 'keys', n + '.pem'); -} - -function loadPEM(n) { - return fs.readFileSync(filenamePEM(n)); -} - var server = net.Server(function(raw) { var pair = tls.createSecurePair(null, true, false, false); pair.on('error', function() {}); diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js index d190ff51a57e63..f8ce5bfbe87df4 100644 --- a/test/parallel/test-zlib-dictionary.js +++ b/test/parallel/test-zlib-dictionary.js @@ -4,7 +4,6 @@ require('../common'); const assert = require('assert'); const zlib = require('zlib'); -const path = require('path'); var spdyDict = new Buffer([ 'optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-', diff --git a/test/parallel/test-zlib-flush-drain.js b/test/parallel/test-zlib-flush-drain.js index 26285c04739a25..f04dac9f0699ac 100644 --- a/test/parallel/test-zlib-flush-drain.js +++ b/test/parallel/test-zlib-flush-drain.js @@ -2,7 +2,6 @@ require('../common'); const assert = require('assert'); const zlib = require('zlib'); -const path = require('path'); const bigData = new Buffer(10240).fill('x'); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 53fa715a673f7e..fa70c5f14dee6c 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -2,7 +2,6 @@ require('../common'); var assert = require('assert'); var zlib = require('zlib'); -var fs = require('fs'); var gzip = zlib.createGzip(); var gunz = zlib.createUnzip(); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index 513cbeb0ee7f96..b558dd28020c07 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -2,7 +2,6 @@ require('../common'); var assert = require('assert'); var os = require('os'); -var util = require('util'); if (os.type() != 'SunOS') { console.log('1..0 # Skipped: no DTRACE support'); @@ -13,7 +12,6 @@ if (os.type() != 'SunOS') { * Some functions to create a recognizable stack. */ var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ]; -var expected; var stalloogle = function(str) { expected = str; @@ -35,7 +33,6 @@ var doogle = function() { var spawn = require('child_process').spawn; var prefix = '/var/tmp/node'; -var corefile = prefix + '.' + process.pid; /* * We're going to use DTrace to stop us, gcore us, and set us running again diff --git a/test/pummel/test-http-client-reconnect-bug.js b/test/pummel/test-http-client-reconnect-bug.js index bd852e45f19410..12a6fecc7050e8 100644 --- a/test/pummel/test-http-client-reconnect-bug.js +++ b/test/pummel/test-http-client-reconnect-bug.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'), - util = require('util'), http = require('http'); var errorCount = 0; diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index c2ec7fd81f1691..46190555b27263 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -5,7 +5,6 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; var http = require('http'); -var path = require('path'); var url = require('url'); if (common.isWindows) { diff --git a/test/pummel/test-timer-wrap2.js b/test/pummel/test-timer-wrap2.js index 9f62bd95d01974..87497b2685f5d3 100644 --- a/test/pummel/test-timer-wrap2.js +++ b/test/pummel/test-timer-wrap2.js @@ -1,9 +1,8 @@ 'use strict'; require('../common'); -var assert = require('assert'); // Test that allocating a timer does not increase the loop's reference // count. var Timer = process.binding('timer_wrap').Timer; -var t = new Timer(); +new Timer(); diff --git a/test/pummel/test-tls-securepair-client.js b/test/pummel/test-tls-securepair-client.js index aaf8e628d6a2bc..3d33ef8f21623f 100644 --- a/test/pummel/test-tls-securepair-client.js +++ b/test/pummel/test-tls-securepair-client.js @@ -17,9 +17,7 @@ var join = require('path').join; var net = require('net'); var assert = require('assert'); var fs = require('fs'); -var crypto = require('crypto'); var tls = require('tls'); -var exec = require('child_process').exec; var spawn = require('child_process').spawn; test1(); @@ -47,8 +45,6 @@ function test(keyfn, certfn, check, next) { // EADDRINUSE. var PORT = common.PORT + 5; - var connections = 0; - keyfn = join(common.fixturesDir, keyfn); var key = fs.readFileSync(keyfn).toString(); diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 0bc4e02c65edb8..205485c9ebbc48 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var os = require('os'); var execSync = require('child_process').execSync; var execFileSync = require('child_process').execFileSync; diff --git a/test/sequential/test-regress-GH-1697.js b/test/sequential/test-regress-GH-1697.js index ff5754f357dfc1..ba7f90ecf00951 100644 --- a/test/sequential/test-regress-GH-1697.js +++ b/test/sequential/test-regress-GH-1697.js @@ -1,8 +1,7 @@ 'use strict'; var common = require('../common'); var net = require('net'), - cp = require('child_process'), - util = require('util'); + cp = require('child_process'); if (process.argv[2] === 'server') { // Server diff --git a/test/sequential/test-stdout-close-catch.js b/test/sequential/test-stdout-close-catch.js index f0ecf9a7c4b725..470fa9843cb9de 100644 --- a/test/sequential/test-stdout-close-catch.js +++ b/test/sequential/test-stdout-close-catch.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'); var path = require('path'); var child_process = require('child_process'); -var fs = require('fs'); var testScript = path.join(common.fixturesDir, 'catch-stdout-error.js'); From 46e3fd6494fbc1105eee502952a44caf5311f6ae Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 01:15:44 -0800 Subject: [PATCH 169/262] lib: remove unused modules Some files in `lib` were using `require` to load modules that were subsequently not used in the file. This removes those `require` statements. PR-URL: https://github.com/nodejs/node/pull/4683 Reviewed-By: Myles Borins --- lib/_http_client.js | 1 - lib/os.js | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index aef05eb8fa2299..db1db7bcc3ab60 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -3,7 +3,6 @@ const util = require('util'); const net = require('net'); const url = require('url'); -const EventEmitter = require('events'); const HTTPParser = process.binding('http_parser').HTTPParser; const assert = require('assert').ok; const common = require('_http_common'); diff --git a/lib/os.js b/lib/os.js index 2d537f53840a35..ddf7cee9d48791 100644 --- a/lib/os.js +++ b/lib/os.js @@ -1,7 +1,6 @@ 'use strict'; const binding = process.binding('os'); -const util = require('util'); const internalUtil = require('internal/util'); const isWindows = process.platform === 'win32'; From 7894f19c4d63780c302718c2a5f7e334e71731c2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 22:08:08 -0800 Subject: [PATCH 170/262] test: remove unused vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unused vars in tests PR-URL: https://github.com/nodejs/node/pull/4536 Reviewed-By: Rod Vagg Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- test/addons/repl-domain-abort/test.js | 2 +- test/debugger/test-debugger-pid.js | 9 +-------- test/debugger/test-debugger-remote.js | 2 -- test/internet/test-dns.js | 5 ++--- test/parallel/test-domain-exit-dispose-again.js | 2 +- test/parallel/test-domain-implicit-fs.js | 1 - test/parallel/test-vm-create-context-arg.js | 6 +++--- test/parallel/test-vm-harmony-proxies.js | 4 ++-- test/parallel/test-vm-harmony-symbols.js | 4 ++-- test/parallel/test-vm-new-script-new-context.js | 3 ++- test/parallel/test-vm-run-in-new-context.js | 2 ++ test/parallel/test-vm-static-this.js | 2 ++ test/pummel/test-dtrace-jsstack.js | 1 - test/pummel/test-fs-watch-file.js | 1 - test/pummel/test-https-no-reader.js | 3 --- test/pummel/test-regress-GH-892.js | 4 ---- test/pummel/test-stream2-basic.js | 2 -- test/pummel/test-timers.js | 6 +++--- test/pummel/test-watch-file.js | 1 - test/sequential/test-pump-file2tcp.js | 1 - test/sequential/test-stream2-fs.js | 2 -- test/sequential/test-tcp-wrap-listen.js | 2 +- test/timers/test-timers-reliability.js | 2 +- 23 files changed, 23 insertions(+), 44 deletions(-) diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index bbd0c737eeba49..5591b4f2b38e90 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -46,4 +46,4 @@ var options = { }; // Run commands from fake REPL. -var dummy = repl.start(options); +repl.start(options); diff --git a/test/debugger/test-debugger-pid.js b/test/debugger/test-debugger-pid.js index 14a281ab3ce4cc..6a977d7cfa72e8 100644 --- a/test/debugger/test-debugger-pid.js +++ b/test/debugger/test-debugger-pid.js @@ -1,16 +1,9 @@ 'use strict'; -var common = require('../common'); +require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var port = common.PORT + 1337; var buffer = ''; -var expected = []; -var scriptToDebug = common.fixturesDir + '/empty.js'; - -function fail() { - assert(0); // `--debug-brk script.js` should not quit -} // connect to debug agent var interfacer = spawn(process.execPath, ['debug', '-p', '655555']); diff --git a/test/debugger/test-debugger-remote.js b/test/debugger/test-debugger-remote.js index 81ed8b41ab0198..f5232dce9c8df4 100644 --- a/test/debugger/test-debugger-remote.js +++ b/test/debugger/test-debugger-remote.js @@ -3,9 +3,7 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var port = common.PORT + 1337; var buffer = ''; -var expected = []; var scriptToDebug = common.fixturesDir + '/empty.js'; function fail() { diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index 5c89021c030b19..6448ad7c76b07b 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -3,7 +3,6 @@ require('../common'); var assert = require('assert'), dns = require('dns'), net = require('net'), - isIP = net.isIP, isIPv4 = net.isIPv4, isIPv6 = net.isIPv6; var util = require('util'); @@ -48,7 +47,7 @@ TEST(function test_reverse_bogus(done) { var error; try { - var req = dns.reverse('bogus ip', function() { + dns.reverse('bogus ip', function() { assert.ok(false); }); } catch (e) { @@ -369,7 +368,7 @@ console.log('looking up nodejs.org...'); var cares = process.binding('cares_wrap'); var req = new cares.GetAddrInfoReqWrap(); -var err = cares.getaddrinfo(req, 'nodejs.org', 4); +cares.getaddrinfo(req, 'nodejs.org', 4); req.oncomplete = function(err, domains) { assert.strictEqual(err, 0); diff --git a/test/parallel/test-domain-exit-dispose-again.js b/test/parallel/test-domain-exit-dispose-again.js index 3cae101fd69c39..e5b1affc0afb55 100644 --- a/test/parallel/test-domain-exit-dispose-again.js +++ b/test/parallel/test-domain-exit-dispose-again.js @@ -5,7 +5,7 @@ // to that domain, including those whose callbacks are called from within // the same invocation of listOnTimeout, _are_ called. -var common = require('../common'); +require('../common'); var assert = require('assert'); var domain = require('domain'); var disposalFailed = false; diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index f35647b525c5c7..a5bbb83bd62d53 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -4,7 +4,6 @@ require('../common'); var assert = require('assert'); var domain = require('domain'); -var events = require('events'); var caught = 0; var expectCaught = 1; diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index d569ce1089c386..a0c29762330133 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/test/parallel/test-vm-create-context-arg.js @@ -4,12 +4,12 @@ var assert = require('assert'); var vm = require('vm'); assert.throws(function() { - var ctx = vm.createContext('string is not supported'); + vm.createContext('string is not supported'); }, TypeError); assert.doesNotThrow(function() { - var ctx = vm.createContext({ a: 1 }); - ctx = vm.createContext([0, 1, 2, 3]); + vm.createContext({ a: 1 }); + vm.createContext([0, 1, 2, 3]); }); assert.doesNotThrow(function() { diff --git a/test/parallel/test-vm-harmony-proxies.js b/test/parallel/test-vm-harmony-proxies.js index 15a58b2a4dacd4..78ee144582741a 100644 --- a/test/parallel/test-vm-harmony-proxies.js +++ b/test/parallel/test-vm-harmony-proxies.js @@ -8,12 +8,12 @@ var vm = require('vm'); // src/node_contextify.cc filters out the Proxy object from the parent // context. Make sure that the new context has a Proxy object of its own. var sandbox = {}; -var result = vm.runInNewContext('this.Proxy = Proxy', sandbox); +vm.runInNewContext('this.Proxy = Proxy', sandbox); assert(typeof sandbox.Proxy === 'object'); assert(sandbox.Proxy !== Proxy); // Unless we copy the Proxy object explicitly, of course. var sandbox = { Proxy: Proxy }; -var result = vm.runInNewContext('this.Proxy = Proxy', sandbox); +vm.runInNewContext('this.Proxy = Proxy', sandbox); assert(typeof sandbox.Proxy === 'object'); assert(sandbox.Proxy === Proxy); diff --git a/test/parallel/test-vm-harmony-symbols.js b/test/parallel/test-vm-harmony-symbols.js index efd15327c5fa07..e4b27c9ebb8579 100644 --- a/test/parallel/test-vm-harmony-symbols.js +++ b/test/parallel/test-vm-harmony-symbols.js @@ -5,12 +5,12 @@ var vm = require('vm'); // The sandbox should have its own Symbol constructor. var sandbox = {}; -var result = vm.runInNewContext('this.Symbol = Symbol', sandbox); +vm.runInNewContext('this.Symbol = Symbol', sandbox); assert(typeof sandbox.Symbol === 'function'); assert(sandbox.Symbol !== Symbol); // Unless we copy the Symbol constructor explicitly, of course. var sandbox = { Symbol: Symbol }; -var result = vm.runInNewContext('this.Symbol = Symbol', sandbox); +vm.runInNewContext('this.Symbol = Symbol', sandbox); assert(typeof sandbox.Symbol === 'function'); assert(sandbox.Symbol === Symbol); diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index e3cc6e91cb432a..81f9b57593ea2f 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -21,7 +21,6 @@ assert.throws(function() { console.error('undefined reference'); -var error; script = new Script('foo.bar = 5;'); assert.throws(function() { script.runInNewContext(); @@ -41,7 +40,9 @@ code = 'foo = 1;' + foo = 2; obj = { foo: 0, baz: 3 }; script = new Script(code); +/* eslint-disable no-unused-vars */ var baz = script.runInNewContext(obj); +/* eslint-enable no-unused-vars */ assert.equal(1, obj.foo); assert.equal(2, obj.bar); assert.equal(2, foo); diff --git a/test/parallel/test-vm-run-in-new-context.js b/test/parallel/test-vm-run-in-new-context.js index da14a041face31..2b32eccf408ff0 100644 --- a/test/parallel/test-vm-run-in-new-context.js +++ b/test/parallel/test-vm-run-in-new-context.js @@ -29,7 +29,9 @@ code = 'foo = 1;' + 'if (baz !== 3) throw new Error(\'test fail\');'; foo = 2; obj = { foo: 0, baz: 3 }; +/* eslint-disable no-unused-vars */ var baz = vm.runInNewContext(code, obj); +/* eslint-enable no-unused-vars */ assert.equal(1, obj.foo); assert.equal(2, obj.bar); assert.equal(2, foo); diff --git a/test/parallel/test-vm-static-this.js b/test/parallel/test-vm-static-this.js index fb9cb764f8422c..a5f5ad9415a828 100644 --- a/test/parallel/test-vm-static-this.js +++ b/test/parallel/test-vm-static-this.js @@ -25,7 +25,9 @@ code = 'foo = 1;' + 'if (typeof baz !== \'undefined\') throw new Error(\'test fail\');'; foo = 2; obj = { foo: 0, baz: 3 }; +/* eslint-disable no-unused-vars */ var baz = vm.runInThisContext(code); +/* eslint-enable no-unused-vars */ assert.equal(0, obj.foo); assert.equal(2, bar); assert.equal(1, foo); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index b558dd28020c07..2e5c8670553138 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -32,7 +32,6 @@ var doogle = function() { }; var spawn = require('child_process').spawn; -var prefix = '/var/tmp/node'; /* * We're going to use DTrace to stop us, gcore us, and set us running again diff --git a/test/pummel/test-fs-watch-file.js b/test/pummel/test-fs-watch-file.js index 7b57803dd4ec93..4e08e9e9d1cc9b 100644 --- a/test/pummel/test-fs-watch-file.js +++ b/test/pummel/test-fs-watch-file.js @@ -9,7 +9,6 @@ var watchSeenTwo = 0; var watchSeenThree = 0; var watchSeenFour = 0; -var startDir = process.cwd(); var testDir = common.tmpDir; var filenameOne = 'watch.txt'; diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index 753687e67a5589..d9d2b64cc73d62 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -18,8 +18,6 @@ var options = { }; var buf = new Buffer(1024 * 1024); -var sent = 0; -var received = 0; var server = https.createServer(options, function(req, res) { res.writeHead(200); @@ -30,7 +28,6 @@ var server = https.createServer(options, function(req, res) { }); server.listen(common.PORT, function() { - var resumed = false; var req = https.request({ method: 'POST', port: common.PORT, diff --git a/test/pummel/test-regress-GH-892.js b/test/pummel/test-regress-GH-892.js index 67f9dd95aebe5f..11cab1b8b6230e 100644 --- a/test/pummel/test-regress-GH-892.js +++ b/test/pummel/test-regress-GH-892.js @@ -17,11 +17,7 @@ var https = require('https'); var fs = require('fs'); -var PORT = 8000; - - var bytesExpected = 1024 * 1024 * 32; -var gotResponse = false; var started = false; diff --git a/test/pummel/test-stream2-basic.js b/test/pummel/test-stream2-basic.js index 723e9a0308be00..564a3f7f42d5a0 100644 --- a/test/pummel/test-stream2-basic.js +++ b/test/pummel/test-stream2-basic.js @@ -157,7 +157,6 @@ test('pipe', function(t) { 'xxxxx' ]; var w = new TestWriter(); - var flush = true; w.on('end', function(received) { t.same(received, expect); @@ -439,7 +438,6 @@ test('adding readable triggers data flow', function(t) { r.push(new Buffer('asdf')); }; - var called = false; r.on('readable', function() { onReadable = true; r.read(); diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index c9ac9b8bf6d905..d911beb6b09288 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -91,12 +91,12 @@ function t() { expectedTimeouts--; } -var w = setTimeout(t, 200); -var x = setTimeout(t, 200); +setTimeout(t, 200); +setTimeout(t, 200); var y = setTimeout(t, 200); clearTimeout(y); -var z = setTimeout(t, 200); +setTimeout(t, 200); clearTimeout(y); diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index 1d0ef77d543e43..b87711c7a17c45 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -6,7 +6,6 @@ var fs = require('fs'); var path = require('path'); var f = path.join(common.fixturesDir, 'x.txt'); -var f2 = path.join(common.fixturesDir, 'x2.txt'); console.log('watching for changes of ' + f); diff --git a/test/sequential/test-pump-file2tcp.js b/test/sequential/test-pump-file2tcp.js index f5949085e0aec3..f99ae1c5d79ea6 100644 --- a/test/sequential/test-pump-file2tcp.js +++ b/test/sequential/test-pump-file2tcp.js @@ -28,7 +28,6 @@ server.listen(common.PORT, function() { }); var buffer = ''; -var count = 0; server.on('listening', function() { }); diff --git a/test/sequential/test-stream2-fs.js b/test/sequential/test-stream2-fs.js index 96ab97174b2478..e775dd7c0ab690 100644 --- a/test/sequential/test-stream2-fs.js +++ b/test/sequential/test-stream2-fs.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var R = require('_stream_readable'); var assert = require('assert'); var fs = require('fs'); @@ -41,7 +40,6 @@ var w = new TestWriter(); w.on('results', function(res) { console.error(res, w.length); assert.equal(w.length, size); - var l = 0; assert.deepEqual(res.map(function(c) { return c.length; }), expectLengths); diff --git a/test/sequential/test-tcp-wrap-listen.js b/test/sequential/test-tcp-wrap-listen.js index a2c07a7a9ce2a2..44254c3d3f39aa 100644 --- a/test/sequential/test-tcp-wrap-listen.js +++ b/test/sequential/test-tcp-wrap-listen.js @@ -12,7 +12,7 @@ assert.equal(0, r); server.listen(128); -var slice, sliceCount = 0, eofCount = 0; +var sliceCount = 0, eofCount = 0; var writeCount = 0; var recvCount = 0; diff --git a/test/timers/test-timers-reliability.js b/test/timers/test-timers-reliability.js index 966b82fd6217c9..76aa6ea31afe4d 100644 --- a/test/timers/test-timers-reliability.js +++ b/test/timers/test-timers-reliability.js @@ -44,7 +44,7 @@ monoTimer.ontimeout = function() { monoTimer.start(300, 0); -var timer = setTimeout(function() { +setTimeout(function() { timerFired = true; }, 200); From e36811b06f1bdd8bfa4b778e1520191d84ba6a13 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Dec 2015 21:52:52 -0800 Subject: [PATCH 171/262] test: remove unused vars in ChildProcess tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to removing unused vars, this also fixes an instance where booleans were set presumably to check something but then never used. This now confirms that the events that were setting the booleans are fired. PR-URL: https://github.com/nodejs/node/pull/4425 Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig --- test/parallel/test-child-process-buffering.js | 2 -- test/parallel/test-child-process-cwd.js | 2 -- test/parallel/test-child-process-exec-buffer.js | 2 +- test/parallel/test-child-process-exec-cwd.js | 2 +- test/parallel/test-child-process-fork-dgram.js | 1 - test/parallel/test-child-process-fork-exec-path.js | 1 - test/parallel/test-child-process-fork-ref2.js | 1 - test/parallel/test-child-process-spawn-error.js | 1 - test/parallel/test-child-process-stdin.js | 14 ++------------ test/parallel/test-child-process-stdio-inherit.js | 2 +- test/parallel/test-child-process-stdio.js | 1 - .../test-child-process-stdout-flush-exit.js | 1 - 12 files changed, 5 insertions(+), 25 deletions(-) diff --git a/test/parallel/test-child-process-buffering.js b/test/parallel/test-child-process-buffering.js index a37e1dbbbd7574..1efa5a65f9cea8 100644 --- a/test/parallel/test-child-process-buffering.js +++ b/test/parallel/test-child-process-buffering.js @@ -2,8 +2,6 @@ var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; - var pwd_called = false; var childClosed = false; var childExited = false; diff --git a/test/parallel/test-child-process-cwd.js b/test/parallel/test-child-process-cwd.js index e0e83b6007a815..f13da684fbdfe4 100644 --- a/test/parallel/test-child-process-cwd.js +++ b/test/parallel/test-child-process-cwd.js @@ -1,8 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; -var path = require('path'); var returns = 0; diff --git a/test/parallel/test-child-process-exec-buffer.js b/test/parallel/test-child-process-exec-buffer.js index 0ab05080a2cb87..b9727f0c63add5 100644 --- a/test/parallel/test-child-process-exec-buffer.js +++ b/test/parallel/test-child-process-exec-buffer.js @@ -9,7 +9,7 @@ var success_count = 0; var str = 'hello'; // default encoding -var child = exec('echo ' + str, function(err, stdout, stderr) { +exec('echo ' + str, function(err, stdout, stderr) { assert.ok('string', typeof(stdout), 'Expected stdout to be a string'); assert.ok('string', typeof(stderr), 'Expected stderr to be a string'); assert.equal(str + os.EOL, stdout); diff --git a/test/parallel/test-child-process-exec-cwd.js b/test/parallel/test-child-process-exec-cwd.js index e253399b96ac30..c259ffffda3dee 100644 --- a/test/parallel/test-child-process-exec-cwd.js +++ b/test/parallel/test-child-process-exec-cwd.js @@ -16,7 +16,7 @@ if (common.isWindows) { dir = '/dev'; } -var child = exec(pwdcommand, {cwd: dir}, function(err, stdout, stderr) { +exec(pwdcommand, {cwd: dir}, function(err, stdout, stderr) { if (err) { error_count++; console.log('error!: ' + err.code); diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index f700960490cbaa..86cd6576c73b98 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -25,7 +25,6 @@ if (common.isWindows) { } if (process.argv[2] === 'child') { - var childCollected = 0; var server; process.on('message', function removeMe(msg, clusterServer) { diff --git a/test/parallel/test-child-process-fork-exec-path.js b/test/parallel/test-child-process-fork-exec-path.js index 6a61bddd8a19a4..35a730b0da6c42 100644 --- a/test/parallel/test-child-process-fork-exec-path.js +++ b/test/parallel/test-child-process-fork-exec-path.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var cp = require('child_process'); var fs = require('fs'); var path = require('path'); var common = require('../common'); diff --git a/test/parallel/test-child-process-fork-ref2.js b/test/parallel/test-child-process-fork-ref2.js index b7addea8f9c77d..42c43ed8882b78 100644 --- a/test/parallel/test-child-process-fork-ref2.js +++ b/test/parallel/test-child-process-fork-ref2.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var assert = require('assert'); var fork = require('child_process').fork; if (process.argv[2] === 'child') { diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js index 1398dac165319c..4eaa45ee7aefb0 100644 --- a/test/parallel/test-child-process-spawn-error.js +++ b/test/parallel/test-child-process-spawn-error.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var fs = require('fs'); var spawn = require('child_process').spawn; var assert = require('assert'); diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js index c12b24579375dc..4a371b83fb045b 100644 --- a/test/parallel/test-child-process-stdin.js +++ b/test/parallel/test-child-process-stdin.js @@ -18,30 +18,20 @@ var response = ''; var exitStatus = -1; var closed = false; -var gotStdoutEOF = false; - cat.stdout.setEncoding('utf8'); cat.stdout.on('data', function(chunk) { console.log('stdout: ' + chunk); response += chunk; }); -cat.stdout.on('end', function() { - gotStdoutEOF = true; -}); - - -var gotStderrEOF = false; +cat.stdout.on('end', common.mustCall(function() {})); cat.stderr.on('data', function(chunk) { // shouldn't get any stderr output assert.ok(false); }); -cat.stderr.on('end', function(chunk) { - gotStderrEOF = true; -}); - +cat.stderr.on('end', common.mustCall(function() {})); cat.on('exit', function(status) { console.log('exit event'); diff --git a/test/parallel/test-child-process-stdio-inherit.js b/test/parallel/test-child-process-stdio-inherit.js index 8cf08a7bd5fa71..409c0af7ca0d31 100644 --- a/test/parallel/test-child-process-stdio-inherit.js +++ b/test/parallel/test-child-process-stdio-inherit.js @@ -31,5 +31,5 @@ function grandparent() { function parent() { // should not immediately exit. - var child = common.spawnCat({ stdio: 'inherit' }); + common.spawnCat({ stdio: 'inherit' }); } diff --git a/test/parallel/test-child-process-stdio.js b/test/parallel/test-child-process-stdio.js index 1ff6e4d914f7ec..d5fe6d43b64d5c 100644 --- a/test/parallel/test-child-process-stdio.js +++ b/test/parallel/test-child-process-stdio.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var spawn = require('child_process').spawn; var options = {stdio: ['pipe']}; var child = common.spawnPwd(options); diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js index 577a33a05082f2..b76a7cb5e5a8e2 100644 --- a/test/parallel/test-child-process-stdout-flush-exit.js +++ b/test/parallel/test-child-process-stdout-flush-exit.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var path = require('path'); // if child process output to console and exit if (process.argv[2] === 'child') { From 8c094be1570d67d02cfd6086f44d5ef62b174519 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 13:48:54 -0800 Subject: [PATCH 172/262] test: remove unused variables from net tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove a handful of variables that are declared but never used in the tests for the net module. PR-URL: https://github.com/nodejs/node/pull/4430 Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- test/parallel/test-net-create-connection.js | 2 +- test/parallel/test-net-dns-custom-lookup.js | 1 - test/parallel/test-net-dns-lookup-skip.js | 1 - test/parallel/test-net-listen-close-server.js | 1 - test/parallel/test-net-local-address-port.js | 2 +- test/parallel/test-net-localerror.js | 2 +- test/parallel/test-net-reconnect.js | 1 - 7 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-net-create-connection.js b/test/parallel/test-net-create-connection.js index c245ddc2ae7860..38452be6e6a954 100644 --- a/test/parallel/test-net-create-connection.js +++ b/test/parallel/test-net-create-connection.js @@ -22,7 +22,7 @@ server.listen(tcpPort, 'localhost', function() { function fail(opts, errtype, msg) { assert.throws(function() { - var client = net.createConnection(opts, cb); + net.createConnection(opts, cb); }, function(err) { return err instanceof errtype && msg === err.message; }); diff --git a/test/parallel/test-net-dns-custom-lookup.js b/test/parallel/test-net-dns-custom-lookup.js index 008e831c61fc9c..a2ce3966ae1237 100644 --- a/test/parallel/test-net-dns-custom-lookup.js +++ b/test/parallel/test-net-dns-custom-lookup.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var dns = require('dns'); var ok = false; function check(addressType, cb) { diff --git a/test/parallel/test-net-dns-lookup-skip.js b/test/parallel/test-net-dns-lookup-skip.js index b293196ad45c7e..9b3ae15fc393ae 100644 --- a/test/parallel/test-net-dns-lookup-skip.js +++ b/test/parallel/test-net-dns-lookup-skip.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var net = require('net'); function check(addressType) { diff --git a/test/parallel/test-net-listen-close-server.js b/test/parallel/test-net-listen-close-server.js index 144ca58bbbe2b9..9cde6df1645d01 100644 --- a/test/parallel/test-net-listen-close-server.js +++ b/test/parallel/test-net-listen-close-server.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var gotError = false; var server = net.createServer(function(socket) { }); diff --git a/test/parallel/test-net-local-address-port.js b/test/parallel/test-net-local-address-port.js index aa28d180dae6ff..728993ee1bb023 100644 --- a/test/parallel/test-net-local-address-port.js +++ b/test/parallel/test-net-local-address-port.js @@ -3,7 +3,7 @@ var common = require('../common'); var assert = require('assert'); var net = require('net'); -var conns = 0, conns_closed = 0; +var conns = 0; var server = net.createServer(function(socket) { conns++; diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index 45ec1fc9099955..ed7c9471e0397f 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -17,6 +17,6 @@ connect({ function connect(opts, msg) { assert.throws(function() { - var client = net.connect(opts); + net.connect(opts); }, msg); } diff --git a/test/parallel/test-net-reconnect.js b/test/parallel/test-net-reconnect.js index b2e8f6ea8b4e3f..f8cdcbdc4e76dd 100644 --- a/test/parallel/test-net-reconnect.js +++ b/test/parallel/test-net-reconnect.js @@ -5,7 +5,6 @@ var assert = require('assert'); var net = require('net'); var N = 50; -var c = 0; var client_recv_count = 0; var client_end_count = 0; var disconnect_count = 0; From ba1847d643bb1263ec1cff2e39264b7fa2c61ce3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Dec 2015 22:00:10 -0800 Subject: [PATCH 173/262] test: remove unused variables from HTTPS tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4426 Reviewed-By: Johan Bergström --- test/parallel/test-https-agent-servername.js | 1 - test/parallel/test-https-byteswritten.js | 1 - test/parallel/test-https-eof-for-eom.js | 2 +- test/parallel/test-https-localaddress-bind-error.js | 2 +- test/parallel/test-https-socket-options.js | 2 -- test/parallel/test-https-strict.js | 2 +- test/parallel/test-https-timeout-server-2.js | 1 - test/parallel/test-https-timeout-server.js | 1 - test/parallel/test-https-timeout.js | 2 -- test/parallel/test-https-truncate.js | 1 - 10 files changed, 3 insertions(+), 12 deletions(-) diff --git a/test/parallel/test-https-agent-servername.js b/test/parallel/test-https-agent-servername.js index 2be40836a04ea2..f7d5e5a40d8679 100644 --- a/test/parallel/test-https-agent-servername.js +++ b/test/parallel/test-https-agent-servername.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-https-byteswritten.js b/test/parallel/test-https-byteswritten.js index 5163eccc262ffa..beef89b25ccb98 100644 --- a/test/parallel/test-https-byteswritten.js +++ b/test/parallel/test-https-byteswritten.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var fs = require('fs'); -var http = require('http'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-https-eof-for-eom.js b/test/parallel/test-https-eof-for-eom.js index 0445625bace642..50d909373ff5b0 100644 --- a/test/parallel/test-https-eof-for-eom.js +++ b/test/parallel/test-https-eof-for-eom.js @@ -53,7 +53,7 @@ var bodyBuffer = ''; server.listen(common.PORT, function() { console.log('1) Making Request'); - var req = https.get({ + https.get({ port: common.PORT, rejectUnauthorized: false }, function(res) { diff --git a/test/parallel/test-https-localaddress-bind-error.js b/test/parallel/test-https-localaddress-bind-error.js index 66551a780aed9e..f5bb1f84c310b3 100644 --- a/test/parallel/test-https-localaddress-bind-error.js +++ b/test/parallel/test-https-localaddress-bind-error.js @@ -28,7 +28,7 @@ var server = https.createServer(options, function(req, res) { }); server.listen(common.PORT, '127.0.0.1', function() { - var req = https.request({ + https.request({ host: 'localhost', port: common.PORT, path: '/', diff --git a/test/parallel/test-https-socket-options.js b/test/parallel/test-https-socket-options.js index 44e179f27a800c..2adf8c798dff65 100644 --- a/test/parallel/test-https-socket-options.js +++ b/test/parallel/test-https-socket-options.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -9,7 +8,6 @@ if (!common.hasCrypto) { var https = require('https'); var fs = require('fs'); -var exec = require('child_process').exec; var http = require('http'); diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 65ebfabde2bcdd..04561959de130f 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -110,7 +110,7 @@ function makeReq(path, port, error, host, ca) { path: path, ca: ca }; - var whichCa = 0; + if (!ca) { options.agent = agent0; } else { diff --git a/test/parallel/test-https-timeout-server-2.js b/test/parallel/test-https-timeout-server-2.js index df605958cf42df..a195ce1938b9cd 100644 --- a/test/parallel/test-https-timeout-server-2.js +++ b/test/parallel/test-https-timeout-server-2.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { } var https = require('https'); -var net = require('net'); var tls = require('tls'); var fs = require('fs'); diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index ba175ecf763ecf..f6d5d75a88abbe 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var https = require('https'); var net = require('net'); -var tls = require('tls'); var fs = require('fs'); var clientErrors = 0; diff --git a/test/parallel/test-https-timeout.js b/test/parallel/test-https-timeout.js index 7f34c18bec0897..2b41dadaec7857 100644 --- a/test/parallel/test-https-timeout.js +++ b/test/parallel/test-https-timeout.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -9,7 +8,6 @@ if (!common.hasCrypto) { var https = require('https'); var fs = require('fs'); -var exec = require('child_process').exec; var options = { key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index e77bf29ed25454..83506c65d6f3cc 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var https = require('https'); var fs = require('fs'); -var path = require('path'); var key = fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'); var cert = fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'); From 7c30944c8b4c09673fafb496e30a8ee15bbc50ff Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Dec 2015 20:31:50 -0800 Subject: [PATCH 174/262] test: remove unused variables from TLS tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the TLS tests have variables that do not get used. This removes those variables. PR-URL: https://github.com/nodejs/node/pull/4424 Reviewed-By: Johan Bergström --- test/parallel/test-tls-0-dns-altname.js | 1 - test/parallel/test-tls-async-cb-after-socket-end.js | 1 - test/parallel/test-tls-client-default-ciphers.js | 2 +- test/parallel/test-tls-close-error.js | 1 - test/parallel/test-tls-close-notify.js | 1 - test/parallel/test-tls-destroy-whilst-write.js | 1 - test/parallel/test-tls-fast-writing.js | 2 +- test/parallel/test-tls-handshake-error.js | 1 - test/parallel/test-tls-handshake-nohang.js | 1 - test/parallel/test-tls-invoke-queued.js | 1 - test/parallel/test-tls-key-mismatch.js | 2 -- test/parallel/test-tls-max-send-fragment.js | 1 - test/parallel/test-tls-ocsp-callback.js | 1 - test/parallel/test-tls-peer-certificate-encoding.js | 1 - test/parallel/test-tls-peer-certificate-multi-keys.js | 1 - test/parallel/test-tls-peer-certificate.js | 1 - test/parallel/test-tls-request-timeout.js | 2 +- test/parallel/test-tls-socket-default-options.js | 1 - test/parallel/test-tls-ticket-cluster.js | 1 - 19 files changed, 3 insertions(+), 20 deletions(-) diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 61458142bc0115..95ceb1aa59aaea 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var common = require('../common'); diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index ea40205bfff06f..d89a4e9930ca6a 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -2,7 +2,6 @@ var common = require('../common'); -var assert = require('assert'); var path = require('path'); var fs = require('fs'); var constants = require('constants'); diff --git a/test/parallel/test-tls-client-default-ciphers.js b/test/parallel/test-tls-client-default-ciphers.js index e38671fd6f9de1..9905fc45bdcd24 100644 --- a/test/parallel/test-tls-client-default-ciphers.js +++ b/test/parallel/test-tls-client-default-ciphers.js @@ -19,7 +19,7 @@ function test1() { }; try { - var s = tls.connect(common.PORT); + tls.connect(common.PORT); } catch (e) { assert(e instanceof Done); } diff --git a/test/parallel/test-tls-close-error.js b/test/parallel/test-tls-close-error.js index 5c5a797c280a7d..bd38cb55f7a17b 100644 --- a/test/parallel/test-tls-close-error.js +++ b/test/parallel/test-tls-close-error.js @@ -10,7 +10,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var errorCount = 0; var closeCount = 0; diff --git a/test/parallel/test-tls-close-notify.js b/test/parallel/test-tls-close-notify.js index 5cc3021ab8dd7e..5545f4512d5f39 100644 --- a/test/parallel/test-tls-close-notify.js +++ b/test/parallel/test-tls-close-notify.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var ended = 0; diff --git a/test/parallel/test-tls-destroy-whilst-write.js b/test/parallel/test-tls-destroy-whilst-write.js index f42ed1d4ea7702..26c20264735926 100644 --- a/test/parallel/test-tls-destroy-whilst-write.js +++ b/test/parallel/test-tls-destroy-whilst-write.js @@ -1,5 +1,4 @@ 'use strict'; -var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index 009fa40b631ee5..1f65391480d59d 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -20,7 +20,7 @@ var server = tls.createServer(options, onconnection); var gotChunk = false; var gotDrain = false; -var timer = setTimeout(function() { +setTimeout(function() { console.log('not ok - timed out'); process.exit(1); }, common.platformTimeout(500)); diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js index f33177455f8943..f65440ed93b1a3 100644 --- a/test/parallel/test-tls-handshake-error.js +++ b/test/parallel/test-tls-handshake-error.js @@ -10,7 +10,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var errorCount = 0; var closeCount = 0; diff --git a/test/parallel/test-tls-handshake-nohang.js b/test/parallel/test-tls-handshake-nohang.js index ae07551ef98088..374ac02a2f45b5 100644 --- a/test/parallel/test-tls-handshake-nohang.js +++ b/test/parallel/test-tls-handshake-nohang.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index f833108ea3f9e0..efa5c0aa9aa31d 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var received = ''; diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js index f7919c545aefb1..2e17a4931078c7 100644 --- a/test/parallel/test-tls-key-mismatch.js +++ b/test/parallel/test-tls-key-mismatch.js @@ -14,8 +14,6 @@ var options = { cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem') }; -var cert = null; - assert.throws(function() { tls.createSecureContext(options); }); diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js index cc9413b81e78d6..8b1bf0998aad30 100644 --- a/test/parallel/test-tls-max-send-fragment.js +++ b/test/parallel/test-tls-max-send-fragment.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { var tls = require('tls'); var fs = require('fs'); -var net = require('net'); var common = require('../common'); diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index a11be7ac22d1c5..e9443f45357995 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -41,7 +41,6 @@ function test(testOptions, cb) { var clientSecure = 0; var ocspCount = 0; var ocspResponse; - var session; if (testOptions.pfx) { delete options.key; diff --git a/test/parallel/test-tls-peer-certificate-encoding.js b/test/parallel/test-tls-peer-certificate-encoding.js index 96cb6944ef6a97..32b1583a0c4840 100644 --- a/test/parallel/test-tls-peer-certificate-encoding.js +++ b/test/parallel/test-tls-peer-certificate-encoding.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent5-key.pem')), diff --git a/test/parallel/test-tls-peer-certificate-multi-keys.js b/test/parallel/test-tls-peer-certificate-multi-keys.js index fca7a1a77dda67..50ce9037f8d755 100644 --- a/test/parallel/test-tls-peer-certificate-multi-keys.js +++ b/test/parallel/test-tls-peer-certificate-multi-keys.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'agent.key')), diff --git a/test/parallel/test-tls-peer-certificate.js b/test/parallel/test-tls-peer-certificate.js index 3cb0eef2d56268..cdf8bf5644f675 100644 --- a/test/parallel/test-tls-peer-certificate.js +++ b/test/parallel/test-tls-peer-certificate.js @@ -11,7 +11,6 @@ var tls = require('tls'); var fs = require('fs'); var util = require('util'); var join = require('path').join; -var spawn = require('child_process').spawn; var options = { key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent1-key.pem')), diff --git a/test/parallel/test-tls-request-timeout.js b/test/parallel/test-tls-request-timeout.js index a9b1c78c91a0bf..0db2a613afc9e4 100644 --- a/test/parallel/test-tls-request-timeout.js +++ b/test/parallel/test-tls-request-timeout.js @@ -29,7 +29,7 @@ var server = tls.Server(options, function(socket) { }); server.listen(common.PORT, function() { - var socket = tls.connect({ + tls.connect({ port: common.PORT, rejectUnauthorized: false }); diff --git a/test/parallel/test-tls-socket-default-options.js b/test/parallel/test-tls-socket-default-options.js index 7b41d0f5a9ec23..c2c6e518bbc4d8 100644 --- a/test/parallel/test-tls-socket-default-options.js +++ b/test/parallel/test-tls-socket-default-options.js @@ -9,7 +9,6 @@ if (!common.hasCrypto) { const tls = require('tls'); const fs = require('fs'); -const net = require('net'); const sent = 'hello world'; diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index fc0f1d5e858d00..1fd1776ca8199f 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -42,7 +42,6 @@ if (cluster.isMaster) { function fork() { var worker = cluster.fork(); - var workerReqCount = 0; worker.on('message', function(msg) { console.error('[master] got %j', msg); if (msg === 'reused') { From 36d28ce3b3deb89986e949f5e52245787e7c9230 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 15:04:56 -0800 Subject: [PATCH 175/262] test: extend timeout in Debug mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debug mode slows execution speed. There is work afoot to enable Debug mode runs on the continuous integration infrastructure for the project. Some tests are timing out, such as test-net-GH-5504.js. This change doubles the timeout returned from `common.platformTimeout()` when running in Debug mode. It also removes an unused variable from the aforementioned test-net-GH-5504.js. PR-URL: https://github.com/nodejs/node/pull/4431 Reviewed-By: Johan Bergström --- test/common.js | 3 +++ test/sequential/test-net-GH-5504.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/common.js b/test/common.js index c1012e7a097688..5f18fec74a6945 100644 --- a/test/common.js +++ b/test/common.js @@ -255,6 +255,9 @@ exports.spawnPwd = function(options) { }; exports.platformTimeout = function(ms) { + if (process.config.target_defaults.default_configuration === 'Debug') + ms = 2 * ms; + if (process.arch !== 'arm') return ms; diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index 9526993dfd12c2..179b3ae3c2e241 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/test/sequential/test-net-GH-5504.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // this test only fails with CentOS 6.3 using kernel version 2.6.32 // On other linuxes and darwin, the `read` call gets an ECONNRESET in From eb53af2797de3c9db14c29fd0bddd1587632bce8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Dec 2015 15:32:13 -0800 Subject: [PATCH 176/262] test: remove unused variables form http tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The http tests seem especially prone to including unused variables. This change removes them. PR-URL: https://github.com/nodejs/node/pull/4422 Reviewed-By: Johan Bergström --- test/parallel/test-http-1.0-keep-alive.js | 1 - test/parallel/test-http-304.js | 1 - test/parallel/test-http-abort-client.js | 2 +- test/parallel/test-http-after-connect.js | 2 +- test/parallel/test-http-agent-keepalive.js | 1 - test/parallel/test-http-agent-null.js | 1 - test/parallel/test-http-byteswritten.js | 1 - test/parallel/test-http-client-abort2.js | 1 - test/parallel/test-http-client-encoding.js | 1 - test/parallel/test-http-client-pipe-end.js | 1 - test/parallel/test-http-default-port.js | 2 +- test/parallel/test-http-destroyed-socket-write2.js | 1 - test/parallel/test-http-eof-on-connect.js | 1 - test/parallel/test-http-exceptions.js | 4 +--- test/parallel/test-http-flush.js | 1 - .../test-http-incoming-pipelined-socket-destroy.js | 1 - test/parallel/test-http-keep-alive.js | 1 - test/parallel/test-http-localaddress-bind-error.js | 2 +- test/parallel/test-http-many-ended-pipelines.js | 1 - test/parallel/test-http-no-content-length.js | 2 +- test/parallel/test-http-pipeline-regr-3508.js | 1 - test/parallel/test-http-proxy.js | 4 ++-- test/parallel/test-http-raw-headers.js | 8 -------- test/parallel/test-http-regr-gh-2821.js | 1 - test/parallel/test-http-res-write-after-end.js | 2 +- test/parallel/test-http-server-stale-close.js | 1 - test/parallel/test-http-timeout.js | 1 - test/parallel/test-http-unix-socket.js | 1 - test/parallel/test-http-url.parse-https.request.js | 1 - 29 files changed, 9 insertions(+), 39 deletions(-) diff --git a/test/parallel/test-http-1.0-keep-alive.js b/test/parallel/test-http-1.0-keep-alive.js index eac0fe51e2206a..516a02031ef247 100644 --- a/test/parallel/test-http-1.0-keep-alive.js +++ b/test/parallel/test-http-1.0-keep-alive.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-304.js b/test/parallel/test-http-304.js index 06fd60f5572ba2..6ac1c68d0d3665 100644 --- a/test/parallel/test-http-304.js +++ b/test/parallel/test-http-304.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var childProcess = require('child_process'); diff --git a/test/parallel/test-http-abort-client.js b/test/parallel/test-http-abort-client.js index e24ded11d1a7ec..4d7a32c1dfb26b 100644 --- a/test/parallel/test-http-abort-client.js +++ b/test/parallel/test-http-abort-client.js @@ -14,7 +14,7 @@ var server = http.Server(function(req, res) { var responseClose = false; server.listen(common.PORT, function() { - var client = http.get({ + http.get({ port: common.PORT, headers: { connection: 'keep-alive' } diff --git a/test/parallel/test-http-after-connect.js b/test/parallel/test-http-after-connect.js index edd03b2178b2ba..ed18def8608820 100644 --- a/test/parallel/test-http-after-connect.js +++ b/test/parallel/test-http-after-connect.js @@ -45,7 +45,7 @@ server.listen(common.PORT, function() { }); function doRequest(i) { - var req = http.get({ + http.get({ port: common.PORT, path: '/request' + i }, function(res) { diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index 8e80b00b2c1c49..6800e893e329da 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -3,7 +3,6 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); const Agent = require('_http_agent').Agent; -const EventEmitter = require('events').EventEmitter; const agent = new Agent({ keepAlive: true, diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index e118738f664083..29961ff3a5e84b 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var net = require('net'); var request = 0; var response = 0; diff --git a/test/parallel/test-http-byteswritten.js b/test/parallel/test-http-byteswritten.js index 974f446dd436b4..fdc407aec667ba 100644 --- a/test/parallel/test-http-byteswritten.js +++ b/test/parallel/test-http-byteswritten.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var body = 'hello world\n'; diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js index 3f7ae98fa25820..477d12b25827b2 100644 --- a/test/parallel/test-http-client-abort2.js +++ b/test/parallel/test-http-client-abort2.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-client-encoding.js b/test/parallel/test-http-client-encoding.js index dd696f4dff608a..baaef855b1e6e0 100644 --- a/test/parallel/test-http-client-encoding.js +++ b/test/parallel/test-http-client-encoding.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js index efe241419397e4..715f8ccf79df92 100644 --- a/test/parallel/test-http-client-pipe-end.js +++ b/test/parallel/test-http-client-pipe-end.js @@ -2,7 +2,6 @@ // see https://github.com/joyent/node/issues/3257 var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 457424ecfa9397..e403b401fb603f 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -57,7 +57,7 @@ if (common.hasCrypto) { res.end('ok'); this.close(); }).listen(SSLPORT, function() { - var req = https.get({ + https.get({ host: 'localhost', rejectUnauthorized: false, headers: { diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 5bbb3bbc946f7d..9065939ccbd798 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -6,7 +6,6 @@ var assert = require('assert'); // where the server has ended the socket. var http = require('http'); -var net = require('net'); var server = http.createServer(function(req, res) { setImmediate(function() { res.destroy(); diff --git a/test/parallel/test-http-eof-on-connect.js b/test/parallel/test-http-eof-on-connect.js index e676643bab4911..fc7dd1d9fe88ce 100644 --- a/test/parallel/test-http-eof-on-connect.js +++ b/test/parallel/test-http-eof-on-connect.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var net = require('net'); var http = require('http'); diff --git a/test/parallel/test-http-exceptions.js b/test/parallel/test-http-exceptions.js index dc2d5583ddbaf9..922dc2095714be 100644 --- a/test/parallel/test-http-exceptions.js +++ b/test/parallel/test-http-exceptions.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { @@ -11,9 +10,8 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, function() { - var req; for (var i = 0; i < 4; i += 1) { - req = http.get({ port: common.PORT, path: '/busy/' + i }); + http.get({ port: common.PORT, path: '/busy/' + i }); } }); diff --git a/test/parallel/test-http-flush.js b/test/parallel/test-http-flush.js index cac1caf752bee6..8dc7ba7418dc88 100644 --- a/test/parallel/test-http-flush.js +++ b/test/parallel/test-http-flush.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); http.createServer(function(req, res) { diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js index 21cd3e69dfd746..1e5a910424d737 100644 --- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js +++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js index f89f7698c46ebd..0d30bbe1da3069 100644 --- a/test/parallel/test-http-keep-alive.js +++ b/test/parallel/test-http-keep-alive.js @@ -11,7 +11,6 @@ var server = http.createServer(function(req, res) { res.end(); }); -var connectCount = 0; var agent = new http.Agent({maxSockets: 1}); var headers = {'connection': 'keep-alive'}; var name = agent.getName({ port: common.PORT }); diff --git a/test/parallel/test-http-localaddress-bind-error.js b/test/parallel/test-http-localaddress-bind-error.js index 9a4bde26cd22d6..adaeba2b9459ea 100644 --- a/test/parallel/test-http-localaddress-bind-error.js +++ b/test/parallel/test-http-localaddress-bind-error.js @@ -17,7 +17,7 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, '127.0.0.1', function() { - var req = http.request({ + http.request({ host: 'localhost', port: common.PORT, path: '/', diff --git a/test/parallel/test-http-many-ended-pipelines.js b/test/parallel/test-http-many-ended-pipelines.js index 604dab7cc2c1d2..c415af64f9dcd6 100644 --- a/test/parallel/test-http-many-ended-pipelines.js +++ b/test/parallel/test-http-many-ended-pipelines.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // no warnings should happen! var trace = console.trace; diff --git a/test/parallel/test-http-no-content-length.js b/test/parallel/test-http-no-content-length.js index 5752e5e924cd1b..7a205dc07df3ca 100644 --- a/test/parallel/test-http-no-content-length.js +++ b/test/parallel/test-http-no-content-length.js @@ -10,7 +10,7 @@ var server = net.createServer(function(socket) { // Neither Content-Length nor Connection socket.end('HTTP/1.1 200 ok\r\n\r\nHello'); }).listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { res.setEncoding('utf8'); res.on('data', function(chunk) { body += chunk; diff --git a/test/parallel/test-http-pipeline-regr-3508.js b/test/parallel/test-http-pipeline-regr-3508.js index 05639a2a42c5a7..74fe7586726cbd 100644 --- a/test/parallel/test-http-pipeline-regr-3508.js +++ b/test/parallel/test-http-pipeline-regr-3508.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); const net = require('net'); diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js index fc8a753f2485ce..8a579cd69aa5b4 100644 --- a/test/parallel/test-http-proxy.js +++ b/test/parallel/test-http-proxy.js @@ -25,7 +25,7 @@ var backend = http.createServer(function(req, res) { var proxy = http.createServer(function(req, res) { console.error('proxy req headers: ' + JSON.stringify(req.headers)); - var proxy_req = http.get({ + http.get({ port: BACKEND_PORT, path: url.parse(req.url).pathname }, function(proxy_res) { @@ -56,7 +56,7 @@ function startReq() { nlistening++; if (nlistening < 2) return; - var client = http.get({ + http.get({ port: PROXY_PORT, path: '/test' }, function(res) { diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js index 7ecaaa93cfb04e..2042c0262a95ed 100644 --- a/test/parallel/test-http-raw-headers.js +++ b/test/parallel/test-http-raw-headers.js @@ -54,14 +54,6 @@ http.createServer(function(req, res) { ]); res.end('x f o o'); }).listen(common.PORT, function() { - var expectRawHeaders = [ - 'Date', - 'Tue, 06 Aug 2013 01:31:54 GMT', - 'Connection', - 'close', - 'Transfer-Encoding', - 'chunked' - ]; var req = http.request({ port: common.PORT, path: '/' }); req.addTrailers([ ['x-bAr', 'yOyOyOy'], diff --git a/test/parallel/test-http-regr-gh-2821.js b/test/parallel/test-http-regr-gh-2821.js index 4fdef2369bb168..8725111324a869 100644 --- a/test/parallel/test-http-regr-gh-2821.js +++ b/test/parallel/test-http-regr-gh-2821.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); const server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-res-write-after-end.js b/test/parallel/test-http-res-write-after-end.js index c8b3bf26e0804b..206f4273ec70c7 100644 --- a/test/parallel/test-http-res-write-after-end.js +++ b/test/parallel/test-http-res-write-after-end.js @@ -18,7 +18,7 @@ var server = http.Server(function(req, res) { }); server.listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { server.close(); }); }); diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index a866d39c2cc735..349e869c1a4fbc 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var util = require('util'); var fork = require('child_process').fork; diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index aab903420f0acc..f459961517852b 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-unix-socket.js b/test/parallel/test-http-unix-socket.js index 98ed839241c2c6..bdac0566c33a42 100644 --- a/test/parallel/test-http-unix-socket.js +++ b/test/parallel/test-http-unix-socket.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var status_ok = false; // status code == 200? diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js index 10c40ec0310708..df01ae64f81dba 100644 --- a/test/parallel/test-http-url.parse-https.request.js +++ b/test/parallel/test-http-url.parse-https.request.js @@ -10,7 +10,6 @@ var https = require('https'); var url = require('url'); var fs = require('fs'); -var clientRequest; // https options var httpsOptions = { From b3b150c20b5470ed78ee74d5ae281507ac7519fd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 1 Jan 2016 17:37:10 -0800 Subject: [PATCH 177/262] test: remove unused vars from parallel tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove all remaining unused variables from tests in test/parallel. PR-URL: https://github.com/nodejs/node/pull/4511 Reviewed-By: James M Snell Reviewed-By: Johan Bergström --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- test/parallel/test-buffer-fakes.js | 1 - test/parallel/test-child-process-exec-buffer.js | 2 +- test/parallel/test-cluster-http-pipe.js | 1 - test/parallel/test-crypto-binary-default.js | 1 - test/parallel/test-crypto-dh.js | 2 +- test/parallel/test-debug-signal-cluster.js | 1 - test/parallel/test-dgram-error-message-address.js | 1 - test/parallel/test-dgram-pingpong.js | 2 -- test/parallel/test-domain-http-server.js | 1 - test/parallel/test-domain-implicit-fs.js | 1 - test/parallel/test-domain-uncaught-exception.js | 2 -- .../test-domain-with-abort-on-uncaught-exception.js | 8 -------- test/parallel/test-dsa-fips-invalid-key.js | 2 -- test/parallel/test-eval.js | 2 +- test/parallel/test-event-emitter-remove-listeners.js | 5 ----- test/parallel/test-file-write-stream3.js | 4 ++-- test/parallel/test-fs-open-flags.js | 5 ----- test/parallel/test-fs-open.js | 1 - test/parallel/test-fs-utimes.js | 2 +- test/parallel/test-fs-write-file-sync.js | 2 +- test/parallel/test-preload.js | 1 - test/parallel/test-process-release.js | 2 +- test/parallel/test-promises-unhandled-rejections.js | 5 ++--- test/parallel/test-readline-undefined-columns.js | 2 +- test/parallel/test-regress-GH-4256.js | 2 +- test/parallel/test-repl-.save.load.js | 1 - test/parallel/test-repl-autolibs.js | 2 +- test/parallel/test-repl-domain.js | 1 - test/parallel/test-repl-syntax-error-stack.js | 3 +-- test/parallel/test-repl-tab-complete-crash.js | 1 - test/parallel/test-repl-tab-complete.js | 1 - test/parallel/test-stream-pipe-error-handling.js | 2 -- test/parallel/test-stream-push-order.js | 2 +- test/parallel/test-stream-unshift-read-race.js | 1 - test/parallel/test-stream-writev.js | 2 -- test/parallel/test-stream2-compatibility.js | 3 +-- test/parallel/test-stream2-large-read-stall.js | 3 --- test/parallel/test-stream2-objects.js | 2 -- test/parallel/test-stream2-readable-from-list.js | 4 ---- test/parallel/test-stream2-transform.js | 3 --- test/parallel/test-timers-ordering.js | 3 --- test/parallel/test-timers-zero-timeout.js | 2 +- test/parallel/test-url.js | 3 --- test/parallel/test-util-decorate-error-stack.js | 2 +- test/parallel/test-util-internal.js | 2 +- 46 files changed, 20 insertions(+), 83 deletions(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index 32748784dfe9a8..68edefdc175317 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const a = require('assert'); diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index 5804cbba303408..1a1d9c0c494b84 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -3,7 +3,6 @@ require('../common'); const assert = require('assert'); const Buffer = require('buffer').Buffer; -const Bp = Buffer.prototype; function FakeBuffer() { } FakeBuffer.__proto__ = Buffer; diff --git a/test/parallel/test-child-process-exec-buffer.js b/test/parallel/test-child-process-exec-buffer.js index b9727f0c63add5..a381af9631e0d8 100644 --- a/test/parallel/test-child-process-exec-buffer.js +++ b/test/parallel/test-child-process-exec-buffer.js @@ -18,7 +18,7 @@ exec('echo ' + str, function(err, stdout, stderr) { }); // no encoding (Buffers expected) -var child = exec('echo ' + str, { +exec('echo ' + str, { encoding: null }, function(err, stdout, stderr) { assert.ok(stdout instanceof Buffer, 'Expected stdout to be a Buffer'); diff --git a/test/parallel/test-cluster-http-pipe.js b/test/parallel/test-cluster-http-pipe.js index 4c6dee347bb8e9..cb9b090f08e801 100644 --- a/test/parallel/test-cluster-http-pipe.js +++ b/test/parallel/test-cluster-http-pipe.js @@ -34,7 +34,6 @@ http.createServer(function(req, res) { res.writeHead(200); res.end('OK'); }).listen(common.PIPE, function() { - var self = this; http.get({ socketPath: common.PIPE, path: '/' }, function(res) { res.resume(); res.on('end', function(err) { diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 806f5de18bbb1f..c4b8990beb2ec2 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -20,7 +20,6 @@ var fs = require('fs'); var path = require('path'); // Test Certificates -var caPem = fs.readFileSync(common.fixturesDir + '/test_ca.pem', 'ascii'); var certPem = fs.readFileSync(common.fixturesDir + '/test_cert.pem', 'ascii'); var certPfx = fs.readFileSync(common.fixturesDir + '/test_cert.pfx'); var keyPem = fs.readFileSync(common.fixturesDir + '/test_key.pem', 'ascii'); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index f3e54c46a8e16b..93224416ed9754 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -171,7 +171,7 @@ var ecdh3 = crypto.createECDH('secp256k1'); var key3 = ecdh3.generateKeys(); assert.throws(function() { - var secret3 = ecdh2.computeSecret(key3, 'binary', 'buffer'); + ecdh2.computeSecret(key3, 'binary', 'buffer'); }); // ECDH should allow .setPrivateKey()/.setPublicKey() diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js index 6572ef50afe845..7a950458b87271 100644 --- a/test/parallel/test-debug-signal-cluster.js +++ b/test/parallel/test-debug-signal-cluster.js @@ -10,7 +10,6 @@ var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] }; var child = spawn(process.execPath, args, options); var outputLines = []; -var outputTimerId; var waitingForDebuggers = false; var pids = null; diff --git a/test/parallel/test-dgram-error-message-address.js b/test/parallel/test-dgram-error-message-address.js index e307a23e2451db..005695654f9542 100644 --- a/test/parallel/test-dgram-error-message-address.js +++ b/test/parallel/test-dgram-error-message-address.js @@ -20,7 +20,6 @@ socket_ipv4.bind(common.PORT, '1.1.1.1'); // IPv6 Test var socket_ipv6 = dgram.createSocket('udp6'); -var family_ipv6 = 'IPv6'; socket_ipv6.on('listening', common.fail); diff --git a/test/parallel/test-dgram-pingpong.js b/test/parallel/test-dgram-pingpong.js index 29ab92757bd817..883085a9cdaab2 100644 --- a/test/parallel/test-dgram-pingpong.js +++ b/test/parallel/test-dgram-pingpong.js @@ -11,7 +11,6 @@ function pingPongTest(port, host) { var callbacks = 0; var N = 500; var count = 0; - var sent_final_ping = false; var server = dgram.createSocket('udp4', function(msg, rinfo) { if (debug) console.log('server got: ' + msg + @@ -48,7 +47,6 @@ function pingPongTest(port, host) { if (count < N) { client.send(buf, 0, buf.length, port, 'localhost'); } else { - sent_final_ping = true; client.send(buf, 0, buf.length, port, 'localhost', function() { client.close(); }); diff --git a/test/parallel/test-domain-http-server.js b/test/parallel/test-domain-http-server.js index 99dbf413e3a4f8..37dbc30f4234d7 100644 --- a/test/parallel/test-domain-http-server.js +++ b/test/parallel/test-domain-http-server.js @@ -9,7 +9,6 @@ objects.baz.asdf = objects; var serverCaught = 0; var clientCaught = 0; -var disposeEmit = 0; var server = http.createServer(function(req, res) { var dom = domain.create(); diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index a5bbb83bd62d53..d0a468419b923e 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -8,7 +8,6 @@ var caught = 0; var expectCaught = 1; var d = new domain.Domain(); -var e = new events.EventEmitter(); d.on('error', function(er) { console.error('caught', er); diff --git a/test/parallel/test-domain-uncaught-exception.js b/test/parallel/test-domain-uncaught-exception.js index 8792eb1ce5459f..35632dbf537202 100644 --- a/test/parallel/test-domain-uncaught-exception.js +++ b/test/parallel/test-domain-uncaught-exception.js @@ -13,8 +13,6 @@ const assert = require('assert'); const domain = require('domain'); const child_process = require('child_process'); -const uncaughtExceptions = {}; - const tests = []; function test1() { diff --git a/test/parallel/test-domain-with-abort-on-uncaught-exception.js b/test/parallel/test-domain-with-abort-on-uncaught-exception.js index 130778038bf072..3158274ea181a9 100644 --- a/test/parallel/test-domain-with-abort-on-uncaught-exception.js +++ b/test/parallel/test-domain-with-abort-on-uncaught-exception.js @@ -31,7 +31,6 @@ const domainErrHandlerExMessage = 'exception from domain error handler'; if (process.argv[2] === 'child') { var domain = require('domain'); var d = domain.create(); - var triggeredProcessUncaughtException = false; process.on('uncaughtException', function onUncaughtException() { // The process' uncaughtException event must not be emitted when @@ -116,13 +115,6 @@ if (process.argv[2] === 'child') { var child = exec(cmdToExec); if (child) { - var childTriggeredOnUncaughtExceptionHandler = false; - child.on('message', function onChildMsg(msg) { - if (msg === 'triggeredProcessUncaughtEx') { - childTriggeredOnUncaughtExceptionHandler = true; - } - }); - child.on('exit', function onChildExited(exitCode, signal) { // When throwing errors from the top-level domain error handler // outside of a try/catch block, the process should not exit gracefully diff --git a/test/parallel/test-dsa-fips-invalid-key.js b/test/parallel/test-dsa-fips-invalid-key.js index 0b5773411ee592..2d30ef6891008a 100644 --- a/test/parallel/test-dsa-fips-invalid-key.js +++ b/test/parallel/test-dsa-fips-invalid-key.js @@ -12,8 +12,6 @@ var fs = require('fs'); var input = 'hello'; -var dsapub = fs.readFileSync(common.fixturesDir + - '/keys/dsa_public_1025.pem'); var dsapri = fs.readFileSync(common.fixturesDir + '/keys/dsa_private_1025.pem'); var sign = crypto.createSign('DSS1'); diff --git a/test/parallel/test-eval.js b/test/parallel/test-eval.js index d3a83fbd5a7060..59b5d1a240861a 100644 --- a/test/parallel/test-eval.js +++ b/test/parallel/test-eval.js @@ -10,7 +10,7 @@ var error_count = 0; var cmd = ['"' + process.execPath + '"', '-e', '"console.error(process.argv)"', 'foo', 'bar'].join(' '); var expected = util.format([process.execPath, 'foo', 'bar']) + '\n'; -var child = exec(cmd, function(err, stdout, stderr) { +exec(cmd, function(err, stdout, stderr) { if (err) { console.log(err.toString()); ++error_count; diff --git a/test/parallel/test-event-emitter-remove-listeners.js b/test/parallel/test-event-emitter-remove-listeners.js index 8993aadf51a46e..396979a923d1ac 100644 --- a/test/parallel/test-event-emitter-remove-listeners.js +++ b/test/parallel/test-event-emitter-remove-listeners.js @@ -15,11 +15,6 @@ function listener2() { count++; } -function listener3() { - console.log('listener3'); - count++; -} - function remove1() { assert(0); } diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index 6ed852eb00995b..a2552d95b215d4 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -124,7 +124,7 @@ function run_test_2() { function run_test_3() { - var file, buffer, options; + var file, options; var data = '\u2026\u2026', // 3 bytes * 2 = 6 bytes in UTF-8 fileData; @@ -167,7 +167,7 @@ function run_test_3() { function run_test_4() { - var file, options; + var options; options = { start: -5, flags: 'r+' }; diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index b53a823603d0fc..667abb81765f91 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -7,14 +7,9 @@ var fs = require('fs'); var O_APPEND = constants.O_APPEND || 0; var O_CREAT = constants.O_CREAT || 0; -var O_DIRECTORY = constants.O_DIRECTORY || 0; var O_EXCL = constants.O_EXCL || 0; -var O_NOCTTY = constants.O_NOCTTY || 0; -var O_NOFOLLOW = constants.O_NOFOLLOW || 0; var O_RDONLY = constants.O_RDONLY || 0; var O_RDWR = constants.O_RDWR || 0; -var O_SYMLINK = constants.O_SYMLINK || 0; -var O_SYNC = constants.O_SYNC || 0; var O_TRUNC = constants.O_TRUNC || 0; var O_WRONLY = constants.O_WRONLY || 0; diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index 0a069b9a0bafda..0818f2b7f63d8f 100644 --- a/test/parallel/test-fs-open.js +++ b/test/parallel/test-fs-open.js @@ -1,6 +1,5 @@ 'use strict'; require('../common'); -var constants = require('constants'); var assert = require('assert'); var fs = require('fs'); diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 2ad6cea4379b2e..5d5cb40ec1eede 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -48,7 +48,7 @@ function expect_ok(syscall, resource, err, atime, mtime) { // would be even better though (node doesn't have such functionality yet) function runTest(atime, mtime, callback) { - var fd, err; + var fd; // // test synchronized code paths, these functions throw on failure // diff --git a/test/parallel/test-fs-write-file-sync.js b/test/parallel/test-fs-write-file-sync.js index 37373404daf20e..5f51878cbd8340 100644 --- a/test/parallel/test-fs-write-file-sync.js +++ b/test/parallel/test-fs-write-file-sync.js @@ -15,7 +15,7 @@ fs._closeSync = fs.closeSync; fs.closeSync = closeSync; // Reset the umask for testing -var mask = process.umask(0o000); +process.umask(0o000); // On Windows chmod is only able to manipulate read-only bit. Test if creating // the file in read-only mode works. diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index c1d92c7818abb3..f30ad1d218e645 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -82,7 +82,6 @@ child_process.exec(nodeBinary + ' ' }); // https://github.com/nodejs/node/issues/1691 -var originalCwd = process.cwd(); process.chdir(path.join(__dirname, '../fixtures/')); child_process.exec(nodeBinary + ' ' + '--expose_debug_as=v8debug ' diff --git a/test/parallel/test-process-release.js b/test/parallel/test-process-release.js index af21daf78b61b2..aac7009f2e90b8 100644 --- a/test/parallel/test-process-release.js +++ b/test/parallel/test-process-release.js @@ -1,5 +1,5 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const versionParts = process.versions.node.split('.'); diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js index e229bada3a10e2..5e7739daa5b406 100644 --- a/test/parallel/test-promises-unhandled-rejections.js +++ b/test/parallel/test-promises-unhandled-rejections.js @@ -185,12 +185,11 @@ asyncTest('When re-throwing new errors in a promise catch, only the' + asyncTest('Test params of unhandledRejection for a synchronously-rejected' + 'promise', function(done) { var e = new Error(); - var e2 = new Error(); onUnhandledSucceed(done, function(reason, promise) { assert.strictEqual(e, reason); assert.strictEqual(promise, promise); }); - var promise = Promise.reject(e); + Promise.reject(e); }); asyncTest('When re-throwing new errors in a promise catch, only the ' + @@ -629,7 +628,7 @@ asyncTest('Promise unhandledRejection handler does not interfere with domain' + assert.strictEqual(domainReceivedError, domainError); d.dispose(); }); - var a = Promise.reject(e); + Promise.reject(e); process.nextTick(function() { throw domainError; }); diff --git a/test/parallel/test-readline-undefined-columns.js b/test/parallel/test-readline-undefined-columns.js index 73945af8bc52b9..24f138f46bce11 100644 --- a/test/parallel/test-readline-undefined-columns.js +++ b/test/parallel/test-readline-undefined-columns.js @@ -11,7 +11,7 @@ const readline = require('readline'); const iStream = new PassThrough(); const oStream = new PassThrough(); -const rli = readline.createInterface({ +readline.createInterface({ terminal: true, input: iStream, output: oStream, diff --git a/test/parallel/test-regress-GH-4256.js b/test/parallel/test-regress-GH-4256.js index 1a4a78b3c0781d..a312fb277fdad5 100644 --- a/test/parallel/test-regress-GH-4256.js +++ b/test/parallel/test-regress-GH-4256.js @@ -1,6 +1,6 @@ 'use strict'; require('../common'); process.domain = null; -var timer = setTimeout(function() { +setTimeout(function() { console.log('this console.log statement should not make node crash'); }, 1); diff --git a/test/parallel/test-repl-.save.load.js b/test/parallel/test-repl-.save.load.js index c71b383bcd7409..6d28015b385e15 100644 --- a/test/parallel/test-repl-.save.load.js +++ b/test/parallel/test-repl-.save.load.js @@ -1,6 +1,5 @@ 'use strict'; var assert = require('assert'); -var util = require('util'); var join = require('path').join; var fs = require('fs'); var common = require('../common'); diff --git a/test/parallel/test-repl-autolibs.js b/test/parallel/test-repl-autolibs.js index 05cc299f56888f..15f779d3b12269 100644 --- a/test/parallel/test-repl-autolibs.js +++ b/test/parallel/test-repl-autolibs.js @@ -8,7 +8,7 @@ var repl = require('repl'); common.globalCheck = false; const putIn = new common.ArrayStream(); -var testMe = repl.start('', putIn, null, true); +repl.start('', putIn, null, true); test1(); diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index 1de2405b3ca9a3..adc8478beef4af 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); -var util = require('util'); var repl = require('repl'); const putIn = new common.ArrayStream(); diff --git a/test/parallel/test-repl-syntax-error-stack.js b/test/parallel/test-repl-syntax-error-stack.js index 647d3e3569ce00..ebf0b2e4d8aed1 100644 --- a/test/parallel/test-repl-syntax-error-stack.js +++ b/test/parallel/test-repl-syntax-error-stack.js @@ -4,7 +4,6 @@ const common = require('../common'); const assert = require('assert'); const path = require('path'); const repl = require('repl'); -const util = require('util'); let found = false; process.on('exit', () => { @@ -17,7 +16,7 @@ common.ArrayStream.prototype.write = function(output) { }; const putIn = new common.ArrayStream(); -const testMe = repl.start('', putIn); +repl.start('', putIn); let file = path.resolve(__dirname, '../fixtures/syntax/bad_syntax'); if (common.isWindows) diff --git a/test/parallel/test-repl-tab-complete-crash.js b/test/parallel/test-repl-tab-complete-crash.js index 484580f1e72fe5..ce283757438192 100644 --- a/test/parallel/test-repl-tab-complete-crash.js +++ b/test/parallel/test-repl-tab-complete-crash.js @@ -2,7 +2,6 @@ const common = require('../common'); const assert = require('assert'); -const util = require('util'); const repl = require('repl'); var referenceErrorCount = 0; diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 6bf7d5059d0116..86a0444c953d27 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -4,7 +4,6 @@ var common = require('../common'); var assert = require('assert'); -var util = require('util'); var repl = require('repl'); var referenceErrors = 0; var expectedReferenceErrors = 0; diff --git a/test/parallel/test-stream-pipe-error-handling.js b/test/parallel/test-stream-pipe-error-handling.js index 8b674bffbd087b..88a70fb58e2cf1 100644 --- a/test/parallel/test-stream-pipe-error-handling.js +++ b/test/parallel/test-stream-pipe-error-handling.js @@ -38,7 +38,6 @@ var Stream = require('stream').Stream; })(); (function testErrorWithRemovedListenerThrows() { - var EE = require('events').EventEmitter; var R = Stream.Readable; var W = Stream.Writable; @@ -73,7 +72,6 @@ var Stream = require('stream').Stream; })(); (function testErrorWithRemovedListenerThrows() { - var EE = require('events').EventEmitter; var R = Stream.Readable; var W = Stream.Writable; diff --git a/test/parallel/test-stream-push-order.js b/test/parallel/test-stream-push-order.js index 0bbcdf522b28fa..f09cf95f370bce 100644 --- a/test/parallel/test-stream-push-order.js +++ b/test/parallel/test-stream-push-order.js @@ -21,7 +21,7 @@ s._read = function(n) { } }; -var v = s.read(0); +s.read(0); // ACTUALLY [1, 3, 5, 6, 4, 2] diff --git a/test/parallel/test-stream-unshift-read-race.js b/test/parallel/test-stream-unshift-read-race.js index 253427e3915103..8239a380def66c 100644 --- a/test/parallel/test-stream-unshift-read-race.js +++ b/test/parallel/test-stream-unshift-read-race.js @@ -13,7 +13,6 @@ var stream = require('stream'); var hwm = 10; var r = stream.Readable({ highWaterMark: hwm }); var chunks = 10; -var t = (chunks * 5); var data = new Buffer(chunks * hwm + Math.ceil(hwm / 2)); for (var i = 0; i < data.length; i++) { diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js index 88933508fb5246..5b07dd11198e1a 100644 --- a/test/parallel/test-stream-writev.js +++ b/test/parallel/test-stream-writev.js @@ -30,11 +30,9 @@ function test(decode, uncork, multi, next) { function cnt(msg) { expectCount++; var expect = expectCount; - var called = false; return function(er) { if (er) throw er; - called = true; counter++; assert.equal(counter, expect); }; diff --git a/test/parallel/test-stream2-compatibility.js b/test/parallel/test-stream2-compatibility.js index 3dbee62871c68c..1ee47c03cf0e01 100644 --- a/test/parallel/test-stream2-compatibility.js +++ b/test/parallel/test-stream2-compatibility.js @@ -4,7 +4,6 @@ var R = require('_stream_readable'); var assert = require('assert'); var util = require('util'); -var EE = require('events').EventEmitter; var ondataCalled = 0; @@ -25,7 +24,7 @@ TestReader.prototype._read = function(n) { this._buffer = new Buffer(0); }; -var reader = new TestReader(); +new TestReader(); setImmediate(function() { assert.equal(ondataCalled, 1); console.log('ok'); diff --git a/test/parallel/test-stream2-large-read-stall.js b/test/parallel/test-stream2-large-read-stall.js index 84457c7e3e9ff7..6a38baac5dacbc 100644 --- a/test/parallel/test-stream2-large-read-stall.js +++ b/test/parallel/test-stream2-large-read-stall.js @@ -53,9 +53,6 @@ function push() { setTimeout(push); } -// start the flow -var ret = r.read(0); - process.on('exit', function() { assert.equal(pushes, PUSHCOUNT + 1); assert(endEmitted); diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js index e79b8f9524c494..e67359eff2b29e 100644 --- a/test/parallel/test-stream2-objects.js +++ b/test/parallel/test-stream2-objects.js @@ -167,8 +167,6 @@ test('read(0) for object streams', function(t) { r.push('foobar'); r.push(null); - var v = r.read(0); - r.pipe(toArray(function(array) { assert.deepEqual(array, ['foobar']); diff --git a/test/parallel/test-stream2-readable-from-list.js b/test/parallel/test-stream2-readable-from-list.js index d4b42b60af65a4..ab9d9c5d72cae1 100644 --- a/test/parallel/test-stream2-readable-from-list.js +++ b/test/parallel/test-stream2-readable-from-list.js @@ -39,8 +39,6 @@ process.nextTick(run); test('buffers', function(t) { - // have a length - var len = 16; var list = [ new Buffer('foog'), new Buffer('bark'), new Buffer('bazy'), @@ -69,8 +67,6 @@ test('buffers', function(t) { }); test('strings', function(t) { - // have a length - var len = 16; var list = [ 'foog', 'bark', 'bazy', diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index 7dad5734839791..11ee45915c8395 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -303,13 +303,10 @@ test('passthrough event emission', function(t) { var pt = new PassThrough(); var emits = 0; pt.on('readable', function() { - var state = pt._readableState; console.error('>>> emit readable %d', emits); emits++; }); - var i = 0; - pt.write(new Buffer('foog')); console.error('need emit 0'); diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index 5da88967e37dda..cef91e58e78c3d 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -3,13 +3,10 @@ require('../common'); var assert = require('assert'); var Timer = process.binding('timer_wrap').Timer; -var i; - var N = 30; var last_i = 0; var last_ts = 0; -var start = Timer.now(); var f = function(i) { if (i <= N) { diff --git a/test/parallel/test-timers-zero-timeout.js b/test/parallel/test-timers-zero-timeout.js index 78445ac6596db9..ab0c38f6084277 100644 --- a/test/parallel/test-timers-zero-timeout.js +++ b/test/parallel/test-timers-zero-timeout.js @@ -7,7 +7,7 @@ var assert = require('assert'); var ncalled = 0; setTimeout(f, 0, 'foo', 'bar', 'baz'); - var timer = setTimeout(function() {}, 0); + setTimeout(function() {}, 0); function f(a, b, c) { assert.equal(a, 'foo'); diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index a912b43d820e9f..cd097be24384eb 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -1514,9 +1514,6 @@ relativeTests2.forEach(function(relativeTest) { //if format and parse are inverse operations then //resolveObject(parse(x), y) == parse(resolve(x, y)) -//host and hostname are special, in this case a '' value is important -var emptyIsImportant = {'host': true, 'hostname': ''}; - //format: [from, path, expected] relativeTests.forEach(function(relativeTest) { var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]), diff --git a/test/parallel/test-util-decorate-error-stack.js b/test/parallel/test-util-decorate-error-stack.js index 24fee56df7b655..017a5ab6afe807 100644 --- a/test/parallel/test-util-decorate-error-stack.js +++ b/test/parallel/test-util-decorate-error-stack.js @@ -1,6 +1,6 @@ // Flags: --expose_internals 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const internalUtil = require('internal/util'); diff --git a/test/parallel/test-util-internal.js b/test/parallel/test-util-internal.js index 9ab883ec8b6dcd..b557356716a004 100644 --- a/test/parallel/test-util-internal.js +++ b/test/parallel/test-util-internal.js @@ -1,7 +1,7 @@ 'use strict'; // Flags: --expose_internals -const common = require('../common'); +require('../common'); const assert = require('assert'); const internalUtil = require('internal/util'); From ef5e9ef0c938e8c9d9b17975bfddf4b6f8c385db Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Dec 2015 11:32:25 -0800 Subject: [PATCH 178/262] tools: implement no-unused-vars for eslint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4536 Reviewed-By: Rod Vagg Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- .eslintrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc b/.eslintrc index bf3fc3378f2d92..33a7919d88c9ef 100644 --- a/.eslintrc +++ b/.eslintrc @@ -84,6 +84,8 @@ rules: # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables ## disallow use of undefined variables (globals) no-undef: 2 + ## disallow declaration of variables that are not used in the code + no-unused-vars: [2, {"args": "none"}] # Custom rules in tools/eslint-rules require-buffer: 2 From 56082676227fc4dbd46a12c75e8adcbd4de7e925 Mon Sep 17 00:00:00 2001 From: Vitor Cortez Date: Thu, 10 Dec 2015 18:32:13 -0300 Subject: [PATCH 179/262] doc: clarify explanation of first stream section The last sentence of the explanation for the first stream section seemed a bit confusing. I tried to change the sentence to clarify it. Additionally, the sections were turned into a numbered list to be more clear about which section is being described, and improve readability. PR-URL: https://github.com/nodejs/node/pull/4234 Reviewed-By: James M Snell --- doc/api/stream.markdown | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 76d96233ac4bde..a0fcb81e9fab0b 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -11,19 +11,17 @@ You can load the Stream base classes by doing `require('stream')`. There are base classes provided for [Readable][] streams, [Writable][] streams, [Duplex][] streams, and [Transform][] streams. -This document is split up into 3 sections. The first explains the -parts of the API that you need to be aware of to use streams in your -programs. If you never implement a streaming API yourself, you can -stop there. - -The second section explains the parts of the API that you need to use -if you implement your own custom streams yourself. The API is -designed to make this easy for you to do. - -The third section goes into more depth about how streams work, -including some of the internal mechanisms and functions that you -should probably not modify unless you definitely know what you are -doing. +This document is split up into 3 sections: + +1. The first section explains the parts of the API that you need to be + aware of to use streams in your programs. +2. The second section explains the parts of the API that you need to + use if you implement your own custom streams yourself. The API is + designed to make this easy for you to do. +3. The third section goes into more depth about how streams work, + including some of the internal mechanisms and functions that you + should probably not modify unless you definitely know what you are + doing. ## API for Stream Consumers From cfb094595b97717d88a206e23cd7921d17fd06c9 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 2 Jan 2016 23:05:40 -0500 Subject: [PATCH 180/262] tls_wrap: clear errors on return Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: https://github.com/nodejs/node/issues/4485 PR-URL: https://github.com/nodejs/node/pull/4515 Reviewed-By: Ben Noordhuis v4.x-staging Commit Metadata: PR-URL: https://github.com/nodejs/node/pull/4709 Reviewed-By: James M Snell --- src/node_crypto.cc | 8 -------- src/node_crypto.h | 15 +++++++++++++++ src/tls_wrap.cc | 10 +++++++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 708f15f6961409..7911ce9e612816 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -116,14 +116,6 @@ static X509_NAME *cnnic_ev_name = d2i_X509_NAME(nullptr, &cnnic_ev_p, sizeof(CNNIC_EV_ROOT_CA_SUBJECT_DATA)-1); -// Forcibly clear OpenSSL's error stack on return. This stops stale errors -// from popping up later in the lifecycle of crypto operations where they -// would cause spurious failures. It's a rather blunt method, though. -// ERR_clear_error() isn't necessarily cheap either. -struct ClearErrorOnReturn { - ~ClearErrorOnReturn() { ERR_clear_error(); } -}; - static uv_mutex_t* locks; const char* const root_certs[] = { diff --git a/src/node_crypto.h b/src/node_crypto.h index 3bec02c38ebdec..e009fc1da63b01 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -41,6 +41,21 @@ namespace node { namespace crypto { +// Forcibly clear OpenSSL's error stack on return. This stops stale errors +// from popping up later in the lifecycle of crypto operations where they +// would cause spurious failures. It's a rather blunt method, though. +// ERR_clear_error() isn't necessarily cheap either. +struct ClearErrorOnReturn { + ~ClearErrorOnReturn() { ERR_clear_error(); } +}; + +// Pop errors from OpenSSL's error stack that were added +// between when this was constructed and destructed. +struct MarkPopErrorOnReturn { + MarkPopErrorOnReturn() { ERR_set_mark(); } + ~MarkPopErrorOnReturn() { ERR_pop_to_mark(); } +}; + enum CheckResult { CHECK_CERT_REVOKED = 0, CHECK_OK = 1 diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 1dca69f07a341c..1bdd4b7df947fe 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -31,7 +31,6 @@ using v8::Object; using v8::String; using v8::Value; - TLSWrap::TLSWrap(Environment* env, Kind kind, StreamBase* stream, @@ -401,6 +400,8 @@ void TLSWrap::ClearOut() { if (ssl_ == nullptr) return; + crypto::MarkPopErrorOnReturn mark_pop_error_on_return; + char out[kClearOutChunkSize]; int read; for (;;) { @@ -462,6 +463,8 @@ bool TLSWrap::ClearIn() { if (ssl_ == nullptr) return false; + crypto::MarkPopErrorOnReturn mark_pop_error_on_return; + int written = 0; while (clear_in_->Length() > 0) { size_t avail = 0; @@ -589,6 +592,8 @@ int TLSWrap::DoWrite(WriteWrap* w, if (ssl_ == nullptr) return UV_EPROTO; + crypto::MarkPopErrorOnReturn mark_pop_error_on_return; + int written = 0; for (i = 0; i < count; i++) { written = SSL_write(ssl_, bufs[i].base, bufs[i].len); @@ -704,8 +709,11 @@ void TLSWrap::DoRead(ssize_t nread, int TLSWrap::DoShutdown(ShutdownWrap* req_wrap) { + crypto::MarkPopErrorOnReturn mark_pop_error_on_return; + if (ssl_ != nullptr && SSL_shutdown(ssl_) == 0) SSL_shutdown(ssl_); + shutdown_ = true; EncOut(); return stream_->DoShutdown(req_wrap); From d33279d2673d70317780698fc90d1a3d6eced97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Mon, 12 Oct 2015 15:11:57 +1100 Subject: [PATCH 181/262] test: make temp path customizable In CI we previously passed `NODE_COMMON_PIPE` to the test runner to avoid long filenames. Add an option to the test runner that allows the user to change the temporary directory instead. This also allows us to run test suites in parallel since `NODE_COMMON_PIPE` otherwise would have been used from multiple tests at the same time. PR-URL: https://github.com/nodejs/node/pull/3325 Reviewed-By: Joao Reis --- test/common.js | 23 +++++++---------------- tools/test.py | 12 ++++++++++++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/test/common.js b/test/common.js index 5f18fec74a6945..bb7a3652f38a02 100644 --- a/test/common.js +++ b/test/common.js @@ -8,6 +8,8 @@ var child_process = require('child_process'); const stream = require('stream'); const util = require('util'); +const testRoot = path.resolve(process.env.NODE_TEST_DIR || + path.dirname(__filename)); exports.testDir = path.dirname(__filename); exports.fixturesDir = path.join(exports.testDir, 'fixtures'); @@ -69,13 +71,10 @@ exports.refreshTmpDir = function() { }; if (process.env.TEST_THREAD_ID) { - // Distribute ports in parallel tests - if (!process.env.NODE_COMMON_PORT) - exports.PORT += +process.env.TEST_THREAD_ID * 100; - + exports.PORT += process.env.TEST_THREAD_ID * 100; exports.tmpDirName += '.' + process.env.TEST_THREAD_ID; } -exports.tmpDir = path.join(exports.testDir, exports.tmpDirName); +exports.tmpDir = path.join(testRoot, exports.tmpDirName); var opensslCli = null; var inFreeBSDJail = null; @@ -168,21 +167,13 @@ Object.defineProperty(exports, 'hasFipsCrypto', { if (exports.isWindows) { exports.PIPE = '\\\\.\\pipe\\libuv-test'; + if (process.env.TEST_THREAD_ID) { + exports.PIPE += '.' + process.env.TEST_THREAD_ID; + } } else { exports.PIPE = exports.tmpDir + '/test.sock'; } -if (process.env.NODE_COMMON_PIPE) { - exports.PIPE = process.env.NODE_COMMON_PIPE; - // Remove manually, the test runner won't do it - // for us like it does for files in test/tmp. - try { - fs.unlinkSync(exports.PIPE); - } catch (e) { - // Ignore. - } -} - if (exports.isWindows) { exports.faketimeCli = false; } else { diff --git a/tools/test.py b/tools/test.py index a864b0ef6140d3..217e72b870a6f8 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1310,6 +1310,8 @@ def BuildOptions(): result.add_option("-r", "--run", help="Divide the tests in m groups (interleaved) and run tests from group n (--run=n,m with n < m)", default="") + result.add_option('--temp-dir', + help='Optional path to change directory used for tests', default=False) return result @@ -1541,6 +1543,16 @@ def Main(): for rule in globally_unused_rules: print "Rule for '%s' was not used." % '/'.join([str(s) for s in rule.path]) + tempdir = os.environ.get('NODE_TEST_DIR') or options.temp_dir + if tempdir: + try: + os.makedirs(tempdir) + os.environ['NODE_TEST_DIR'] = tempdir + except OSError as exception: + if exception.errno != errno.EEXIST: + print "Could not create the temporary directory", options.temp_dir + sys.exit(1) + if options.report: PrintReport(all_cases) From b3079ef736694b6de61d389ee7e8270673f6e739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Wed, 30 Dec 2015 12:11:17 +1100 Subject: [PATCH 182/262] test: don't assume a certain folder structure A few tests assumed that temp dirs always lived in the same parent folder as fixtures. Make these use `common.tmpDir` instead. PR-URL: https://github.com/nodejs/node/pull/3325 Reviewed-By: Joao Reis --- test/parallel/test-fs-realpath.js | 18 +++++++++--------- .../test-fs-symlink-dir-junction-relative.js | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 12a4ce7b41b679..1e038c047b2bd8 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -273,14 +273,14 @@ function test_deep_symlink_mix(callback) { } /* - /tmp/node-test-realpath-f1 -> ../tmp/node-test-realpath-d1/foo - /tmp/node-test-realpath-d1 -> ../node-test-realpath-d2 - /tmp/node-test-realpath-d2/foo -> ../node-test-realpath-f2 + /tmp/node-test-realpath-f1 -> $tmpDir/node-test-realpath-d1/foo + /tmp/node-test-realpath-d1 -> $tmpDir/node-test-realpath-d2 + /tmp/node-test-realpath-d2/foo -> $tmpDir/node-test-realpath-f2 /tmp/node-test-realpath-f2 -> /node/test/fixtures/nested-index/one/realpath-c /node/test/fixtures/nested-index/one/realpath-c -> /node/test/fixtures/nested-index/two/realpath-c - /node/test/fixtures/nested-index/two/realpath-c -> ../../cycles/root.js + /node/test/fixtures/nested-index/two/realpath-c -> $tmpDir/cycles/root.js /node/test/fixtures/cycles/root.js (hard) */ var entry = tmp('node-test-realpath-f1'); @@ -289,16 +289,16 @@ function test_deep_symlink_mix(callback) { fs.mkdirSync(tmp('node-test-realpath-d2'), 0o700); try { [ - [entry, '../' + common.tmpDirName + '/node-test-realpath-d1/foo'], + [entry, common.tmpDir + '/node-test-realpath-d1/foo'], [tmp('node-test-realpath-d1'), - '../' + common.tmpDirName + '/node-test-realpath-d2'], + common.tmpDir + '/node-test-realpath-d2'], [tmp('node-test-realpath-d2/foo'), '../node-test-realpath-f2'], [tmp('node-test-realpath-f2'), fixturesAbsDir + - '/nested-index/one/realpath-c'], + '/nested-index/one/realpath-c'], [fixturesAbsDir + '/nested-index/one/realpath-c', fixturesAbsDir + - '/nested-index/two/realpath-c'], + '/nested-index/two/realpath-c'], [fixturesAbsDir + '/nested-index/two/realpath-c', - '../../../' + common.tmpDirName + '/cycles/root.js'] + common.tmpDir + '/cycles/root.js'] ].forEach(function(t) { try { fs.unlinkSync(t[0]); } catch (e) {} fs.symlinkSync(t[1], t[0]); diff --git a/test/parallel/test-fs-symlink-dir-junction-relative.js b/test/parallel/test-fs-symlink-dir-junction-relative.js index dcc4e989cc1ef2..cb3e5a464faba9 100644 --- a/test/parallel/test-fs-symlink-dir-junction-relative.js +++ b/test/parallel/test-fs-symlink-dir-junction-relative.js @@ -11,7 +11,7 @@ var expected_tests = 2; var linkPath1 = path.join(common.tmpDir, 'junction1'); var linkPath2 = path.join(common.tmpDir, 'junction2'); var linkTarget = path.join(common.fixturesDir); -var linkData = '../fixtures'; +var linkData = path.join(common.fixturesDir); common.refreshTmpDir(); @@ -42,4 +42,3 @@ function verifyLink(linkPath) { process.on('exit', function() { assert.equal(completed, expected_tests); }); - From 3fa0d4acd23cf64e79938d6794d5b7e668e9126b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 30 Dec 2015 13:39:47 -0800 Subject: [PATCH 183/262] test: write to tmp dir rather than fixture dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test-fs-realpath.js was writing files to the fixture dir. This changes it to use the temp directory instead. This also replaces some of the string concatenation for paths with uses of path.join() and path.relative(). PR-URL: https://github.com/nodejs/node/pull/4489 Reviewed-By: Johan Bergström --- test/parallel/test-fs-realpath.js | 42 +++++++++++++++++-------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 1e038c047b2bd8..26514baf48b9d1 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -37,11 +37,14 @@ function tmp(p) { return path.join(common.tmpDir, p); } -var fixturesAbsDir = common.fixturesDir; +var targetsAbsDir = path.join(common.tmpDir, 'targets'); var tmpAbsDir = common.tmpDir; -assert(fixturesAbsDir !== tmpAbsDir); -console.error('absolutes\n%s\n%s', fixturesAbsDir, tmpAbsDir); +// Set up targetsAbsDir and expected subdirectories +fs.mkdirSync(targetsAbsDir); +fs.mkdirSync(path.join(targetsAbsDir, 'nested-index')); +fs.mkdirSync(path.join(targetsAbsDir, 'nested-index', 'one')); +fs.mkdirSync(path.join(targetsAbsDir, 'nested-index', 'two')); function asynctest(testBlock, args, callback, assertBlock) { async_expected++; @@ -109,7 +112,7 @@ function test_simple_absolute_symlink(callback) { console.log('using type=%s', type); var entry = tmpAbsDir + '/symlink', - expected = fixturesAbsDir + '/nested-index/one'; + expected = common.fixturesDir + '/nested-index/one'; [ [entry, expected] ].forEach(function(t) { @@ -133,14 +136,15 @@ function test_deep_relative_file_symlink(callback) { } var expected = path.join(common.fixturesDir, 'cycles', 'root.js'); - var linkData1 = '../../cycles/root.js'; - var linkPath1 = path.join(common.fixturesDir, + var linkData1 = path.relative(path.join(targetsAbsDir, 'nested-index', 'one'), + expected); + var linkPath1 = path.join(targetsAbsDir, 'nested-index', 'one', 'symlink1.js'); try {fs.unlinkSync(linkPath1);} catch (e) {} fs.symlinkSync(linkData1, linkPath1, 'file'); var linkData2 = '../one/symlink1.js'; - var entry = path.join(common.fixturesDir, + var entry = path.join(targetsAbsDir, 'nested-index', 'two', 'symlink1-b.js'); try {fs.unlinkSync(entry);} catch (e) {} fs.symlinkSync(linkData2, entry, 'file'); @@ -160,14 +164,14 @@ function test_deep_relative_dir_symlink(callback) { return runNextTest(); } var expected = path.join(common.fixturesDir, 'cycles', 'folder'); - var linkData1b = '../../cycles/folder'; - var linkPath1b = path.join(common.fixturesDir, - 'nested-index', 'one', 'symlink1-dir'); + var path1b = path.join(targetsAbsDir, 'nested-index', 'one'); + var linkPath1b = path.join(path1b, 'symlink1-dir'); + var linkData1b = path.relative(path1b, expected); try {fs.unlinkSync(linkPath1b);} catch (e) {} fs.symlinkSync(linkData1b, linkPath1b, 'dir'); var linkData2b = '../one/symlink1-dir'; - var entry = path.join(common.fixturesDir, + var entry = path.join(targetsAbsDir, 'nested-index', 'two', 'symlink12-dir'); try {fs.unlinkSync(entry);} catch (e) {} fs.symlinkSync(linkData2b, entry, 'dir'); @@ -277,11 +281,11 @@ function test_deep_symlink_mix(callback) { /tmp/node-test-realpath-d1 -> $tmpDir/node-test-realpath-d2 /tmp/node-test-realpath-d2/foo -> $tmpDir/node-test-realpath-f2 /tmp/node-test-realpath-f2 - -> /node/test/fixtures/nested-index/one/realpath-c - /node/test/fixtures/nested-index/one/realpath-c - -> /node/test/fixtures/nested-index/two/realpath-c - /node/test/fixtures/nested-index/two/realpath-c -> $tmpDir/cycles/root.js - /node/test/fixtures/cycles/root.js (hard) + -> $tmpDir/targets/nested-index/one/realpath-c + $tmpDir/targets/nested-index/one/realpath-c + -> $tmpDir/targets/nested-index/two/realpath-c + $tmpDir/targets/nested-index/two/realpath-c -> $tmpDir/cycles/root.js + $tmpDir/targets/cycles/root.js (hard) */ var entry = tmp('node-test-realpath-f1'); try { fs.unlinkSync(tmp('node-test-realpath-d2/foo')); } catch (e) {} @@ -293,11 +297,11 @@ function test_deep_symlink_mix(callback) { [tmp('node-test-realpath-d1'), common.tmpDir + '/node-test-realpath-d2'], [tmp('node-test-realpath-d2/foo'), '../node-test-realpath-f2'], - [tmp('node-test-realpath-f2'), fixturesAbsDir + + [tmp('node-test-realpath-f2'), targetsAbsDir + '/nested-index/one/realpath-c'], - [fixturesAbsDir + '/nested-index/one/realpath-c', fixturesAbsDir + + [targetsAbsDir + '/nested-index/one/realpath-c', targetsAbsDir + '/nested-index/two/realpath-c'], - [fixturesAbsDir + '/nested-index/two/realpath-c', + [targetsAbsDir + '/nested-index/two/realpath-c', common.tmpDir + '/cycles/root.js'] ].forEach(function(t) { try { fs.unlinkSync(t[0]); } catch (e) {} From 476ac24b91fbcecc055fee9c9026478afd9059d6 Mon Sep 17 00:00:00 2001 From: jpersson Date: Wed, 2 Dec 2015 11:17:19 -0500 Subject: [PATCH 184/262] doc: update links to use https where possible PR-URL: https://github.com/nodejs/node/pull/4054 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- doc/api/addons.markdown | 2 +- doc/api/crypto.markdown | 10 +++++----- doc/api/errors.markdown | 2 +- doc/api/https.markdown | 4 ++-- doc/api/punycode.markdown | 2 +- doc/api/tls.markdown | 22 +++++++++++----------- doc/api/vm.markdown | 4 ++-- doc/api/zlib.markdown | 4 ++-- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 1d93b16599936a..aa343d73192ce8 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -873,4 +873,4 @@ Test in JavaScript by running: [download]: https://github.com/nodejs/node-addon-examples [node-gyp]: https://github.com/nodejs/node-gyp [v8 reference]: http://izs.me/v8-docs/main.html -[Embedder's Guide]: http://code.google.com/apis/v8/embed.html +[Embedder's Guide]: https://code.google.com/apis/v8/embed.html diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 773d05e9f1749c..d98365842423ff 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -14,7 +14,7 @@ decipher, sign and verify methods. The class used for working with signed public key & challenges. The most common usage for this series of functions is when dealing with the `` -element. http://www.openssl.org/docs/apps/spkac.html +element. https://www.openssl.org/docs/apps/spkac.html Returned by `crypto.Certificate`. @@ -464,7 +464,7 @@ dictionary with keys: (Certificate Revocation List) * `ciphers`: A string describing the ciphers to use or exclude. Consult - + for details on the format. If no 'ca' details are given, then Node.js will use the default @@ -797,10 +797,10 @@ See the reference for other recommendations and details. [buffer]: buffer.html [buffers]: buffer.html [Caveats]: #crypto_caveats -[initialization vector]: http://en.wikipedia.org/wiki/Initialization_vector +[initialization vector]: https://en.wikipedia.org/wiki/Initialization_vector [NIST SP 800-131A]: http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf [NIST SP 800-132]: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf -[RFC 2412]: http://www.rfc-editor.org/rfc/rfc2412.txt -[RFC 3526]: http://www.rfc-editor.org/rfc/rfc3526.txt +[RFC 2412]: https://www.rfc-editor.org/rfc/rfc2412.txt +[RFC 3526]: https://www.rfc-editor.org/rfc/rfc3526.txt [stream]: stream.html [streams]: stream.html diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index 207c3b66e06df3..823e9361901cb1 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -506,7 +506,7 @@ found [here][online]. [below]: #errors_error_propagation_and_interception [domains]: domain.html [event emitter-based]: events.html#events_class_events_eventemitter -[file descriptors]: http://en.wikipedia.org/wiki/File_descriptor +[file descriptors]: https://en.wikipedia.org/wiki/File_descriptor [online]: http://man7.org/linux/man-pages/man3/errno.3.html [stream-based]: stream.html [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 1d079333489abe..93416633747fb4 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -168,7 +168,7 @@ The following options from [`tls.connect()`][] can also be specified. However, a certificates in PEM format. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections. - `ciphers`: A string describing the ciphers to use or exclude. Consult - for + for details on the format. - `rejectUnauthorized`: If `true`, the server certificate is verified against the list of supplied CAs. An `'error'` event is emitted if verification @@ -226,7 +226,7 @@ Example: [`http.Server`]: http.html#http_class_http_server [`https.Agent`]: #https_class_https_agent [`https.request()`]: #https_https_request_options_callback -[`SSL_METHODS`]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS +[`SSL_METHODS`]: https://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS [`tls.connect()`]: tls.html#tls_tls_connect_options_callback [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener [`url.parse()`]: url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost diff --git a/doc/api/punycode.markdown b/doc/api/punycode.markdown index c54a981fedb45b..0b3f49d9ba69a3 100644 --- a/doc/api/punycode.markdown +++ b/doc/api/punycode.markdown @@ -67,4 +67,4 @@ Creates a string based on an array of numeric code point values. A string representing the current Punycode.js version number. [Punycode.js]: https://mths.be/punycode -[JavaScript uses UCS-2 internally]: http://mathiasbynens.be/notes/javascript-encoding +[JavaScript uses UCS-2 internally]: https://mathiasbynens.be/notes/javascript-encoding diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 7fb0a39961b406..469b0d64733be2 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -422,7 +422,7 @@ Example: { name: 'AES256-SHA', version: 'TLSv1/SSLv3' } See SSL_CIPHER_get_name() and SSL_CIPHER_get_version() in -http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_CIPHERS for more +https://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_CIPHERS for more information. ### tlsSocket.getPeerCertificate([ detailed ]) @@ -650,7 +650,7 @@ dictionary with keys: (Certificate Revocation List) * `ciphers`: A string describing the ciphers to use or exclude. Consult - + for details on the format. * `honorCipherOrder` : When choosing a cipher, use the server's preferences instead of the client preferences. For further details see `tls` module @@ -876,10 +876,10 @@ Example: var ciphers = tls.getCiphers(); console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...] -[OpenSSL cipher list format documentation]: http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT -[Chrome's 'modern cryptography' setting]: http://www.chromium.org/Home/chromium-security/education/tls#TOC-Deprecation-of-TLS-Features-Algorithms-in-Chrome +[OpenSSL cipher list format documentation]: https://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT +[Chrome's 'modern cryptography' setting]: https://www.chromium.org/Home/chromium-security/education/tls#TOC-Deprecation-of-TLS-Features-Algorithms-in-Chrome [specific attacks affecting larger AES key sizes]: https://www.schneier.com/blog/archives/2009/07/another_new_aes.html -[BEAST attacks]: http://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html +[BEAST attacks]: https://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html [crypto.getCurves()]: crypto.html#crypto_crypto_getcurves [tls.createServer]: #tls_tls_createserver_options_secureconnectionlistener [tls.createSecurePair]: #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options @@ -890,15 +890,15 @@ Example: [`'secureConnect'`]: #tls_event_secureconnect [`'secureConnection'`]: #tls_event_secureconnection [Stream]: stream.html#stream_stream -[SSL_METHODS]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS +[SSL_METHODS]: https://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS [tls.Server]: #tls_class_tls_server -[SSL_CTX_set_timeout]: http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html -[RFC 4492]: http://www.rfc-editor.org/rfc/rfc4492.txt -[Forward secrecy]: http://en.wikipedia.org/wiki/Perfect_forward_secrecy +[SSL_CTX_set_timeout]: https://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html +[RFC 4492]: https://www.rfc-editor.org/rfc/rfc4492.txt +[Forward secrecy]: https://en.wikipedia.org/wiki/Perfect_forward_secrecy [DHE]: https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange [ECDHE]: https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman -[asn1.js]: http://npmjs.org/package/asn1.js -[OCSP request]: http://en.wikipedia.org/wiki/OCSP_stapling +[asn1.js]: https://npmjs.org/package/asn1.js +[OCSP request]: https://en.wikipedia.org/wiki/OCSP_stapling [TLS recommendations]: https://wiki.mozilla.org/Security/Server_Side_TLS [TLS Session Tickets]: https://www.ietf.org/rfc/rfc5077.txt [getPeerCertificate]: #tls_tlssocket_getpeercertificate_detailed diff --git a/doc/api/vm.markdown b/doc/api/vm.markdown index 8fbcc045193e10..07e99ac735677c 100644 --- a/doc/api/vm.markdown +++ b/doc/api/vm.markdown @@ -275,6 +275,6 @@ e.g. `(0,eval)('code')`. However, it also has the following additional options: - `timeout`: a number of milliseconds to execute `code` before terminating execution. If execution is terminated, an [`Error`][] will be thrown. -[indirect `eval` call]: http://es5.github.io/#x10.4.2 -[global object]: http://es5.github.io/#x15.1 +[indirect `eval` call]: https://es5.github.io/#x10.4.2 +[global object]: https://es5.github.io/#x15.1 [`Error`]: errors.html#errors_class_error diff --git a/doc/api/zlib.markdown b/doc/api/zlib.markdown index 31d61a0c759ee6..5f238be5bff8d8 100644 --- a/doc/api/zlib.markdown +++ b/doc/api/zlib.markdown @@ -356,8 +356,8 @@ Decompress a raw Buffer with Inflate. Decompress a raw Buffer with Unzip. -[accept-encoding]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 -[content-encoding]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 +[accept-encoding]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 +[content-encoding]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 [Memory Usage Tuning]: #zlib_memory_usage_tuning [zlib documentation]: http://zlib.net/manual.html#Constants [options]: #zlib_class_options From bb2e2d0d887391de6cbc74cacde834843a3c4be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Wed, 30 Dec 2015 17:24:25 +1100 Subject: [PATCH 185/262] test: don't use cwd for relative path With the introduction of temporary paths in the test runner realpath tests would bail in scenarios where the temporary folder wasn't in the same directory as the source code. PR-URL: https://github.com/nodejs/node/pull/4477 Reviewed-By: Rich Trott --- test/parallel/test-fs-realpath.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 26514baf48b9d1..53312c6e8d7186 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -236,11 +236,10 @@ function test_relative_input_cwd(callback) { return runNextTest(); } - // we need to get the relative path to the tmp dir from cwd. - // When the test runner is running it, that will be .../node/test - // but it's more common to run `./node test/.../`, so detect it here. + // we need to calculate the relative path to the tmp dir from cwd var entrydir = process.cwd(); - var entry = common.tmpDir.substr(entrydir.length + 1) + '/cycles/realpath-3a'; + var entry = path.relative(entrydir, + path.join(common.tmpDir + '/cycles/realpath-3a')); var expected = common.tmpDir + '/cycles/root.js'; [ [entry, '../cycles/realpath-3b'], From 7e1564de10a11f1965101fa3256272bebf0902b3 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 15 Jan 2016 11:45:49 -0500 Subject: [PATCH 186/262] doc: clarify protocol default in http.request() The previously listed default of 'http' is incorrect, and causes an error to be thrown. This commit changes it to the correct value of 'http:' Fixes: https://github.com/nodejs/node/issues/4712 PR-URL: https://github.com/nodejs/node/pull/4714 Reviewed-By: James M Snell --- doc/api/http.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 3904dd29d4d485..56d3595ed12ca3 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -992,7 +992,7 @@ automatically parsed with [`url.parse()`][]. Options: -- `protocol`: Protocol to use. Defaults to `'http'`. +- `protocol`: Protocol to use. Defaults to `'http:'`. - `host`: A domain name or IP address of the server to issue the request to. Defaults to `'localhost'`. - `hostname`: Alias for `host`. To support [`url.parse()`][] `hostname` is From 12db976b5f15470eba51f9b2bdb9194e473a7ffb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Dec 2015 09:21:02 -0800 Subject: [PATCH 187/262] test: mark test-debug-no-context is flaky test-debug-no-context is flaky on Windows. Mark as such. Ref: https://github.com/nodejs/node/issues/4343 PR-URL: https://github.com/nodejs/node/pull/4421 Reviewed-By: Brian White --- test/parallel/parallel.status | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index f6613046be4639..ced1680ef9d66b 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -10,6 +10,7 @@ prefix parallel test-child-process-fork-regr-gh-2847 : PASS,FLAKY test-cluster-net-send : PASS,FLAKY test-cluster-shared-leak : PASS,FLAKY +test-debug-no-context : PASS,FLAKY test-tls-ticket-cluster : PASS,FLAKY [$system==linux] From 46b2d2baa54b44c7fa49524d4193fe8a2e1529d0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 5 Dec 2015 17:29:28 -0800 Subject: [PATCH 188/262] assert: accommodate ES6 classes that extend Error `assert.throws()` and `assert.doesNotThrow()` blow up with a `TypeError` if used with an ES6 class that extends Error. Fixes: https://github.com/nodejs/node/issues/3188 PR-URL: https://github.com/nodejs/node/pull/4166 Reviewed-By: Ben Noordhuis --- lib/assert.js | 4 ++++ test/parallel/test-assert.js | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/assert.js b/lib/assert.js index f8dc97dfcfcd43..3e52ab45f66127 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -283,6 +283,10 @@ function expectedException(actual, expected) { // Ignore. The instanceof check doesn't work for arrow functions. } + if (Error.isPrototypeOf(expected)) { + return false; + } + return expected.call({}, actual) === true; } diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index b28ca03ca97e65..e9c01fda773d9e 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -342,9 +342,28 @@ a.throws(makeBlock(thrower, TypeError), function(err) { } }); +// https://github.com/nodejs/node/issues/3188 +threw = false; -// GH-207. Make sure deepEqual doesn't loop forever on circular refs +try { + var ES6Error = class extends Error {}; + + var AnotherErrorType = class extends Error {}; + const functionThatThrows = function() { + throw new AnotherErrorType('foo'); + }; + + assert.throws(functionThatThrows, ES6Error); +} catch (e) { + threw = true; + assert(e instanceof AnotherErrorType, + `expected AnotherErrorType, received ${e}`); +} + +assert.ok(threw); + +// GH-207. Make sure deepEqual doesn't loop forever on circular refs var b = {}; b.b = b; From 98a6793acc22145132cc475e1f5b6bab4ede3c91 Mon Sep 17 00:00:00 2001 From: ronkorving Date: Tue, 22 Sep 2015 12:36:03 +0900 Subject: [PATCH 189/262] tools: add .editorconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helps editors (see http://editorconfig.org/#download) to apply the right indentation and encoding rules to files by default. PR-URL: https://github.com/nodejs/node/pull/2993 Reviewed-By: Roman Reiss Reviewed-By: Saúl Ibarra Corretgé --- .editorconfig | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000000..ca97ab47dfea49 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true + +[vcbuild.bat] +end_of_line = crlf + +[*.{md,markdown}] +trim_trailing_whitespace = false + +[{lib,src,test}/**.js] +indent_style = space +indent_size = 2 + +[src/**.{h,cc}] +indent_style = space +indent_size = 2 + +[test/*.py] +indent_style = space +indent_size = 2 + +[configure] +indent_style = space +indent_size = 2 + +[Makefile] +indent_style = tab +indent_size = 8 + +[{deps,tools}/**] +indent_style = ignore +indent_size = ignore +end_of_line = ignore +trim_trailing_whitespace = ignore +charset = ignore From fdcf296ac3c5b1bd25f603c8baccaf245a5f8f37 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 15 Dec 2015 17:37:16 -0500 Subject: [PATCH 190/262] module,src: do not wrap modules with -1 lineOffset In b799a74709af69daf13901390df9428c4c38adfc and dfee4e3712ac4673b5fc472a8f77ac65bdc65f87 the module wrapping mechanism was changed for better error reporting. However, the changes causes issues with debuggers and profilers. This commit reverts the wrapping changes. Fixes: https://github.com/nodejs/node/issues/4297 PR-URL: https://github.com/nodejs/node/pull/4298 Reviewed-By: Ben Noordhuis Reviewed-By: Ali Ijaz Sheikh --- lib/module.js | 2 +- src/node.js | 4 ++-- test/sequential/test-module-loading.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/module.js b/lib/module.js index 99c476210991fd..1d937f8baa2aa8 100644 --- a/lib/module.js +++ b/lib/module.js @@ -372,7 +372,7 @@ Module.prototype._compile = function(content, filename) { var wrapper = Module.wrap(content); var compiledWrapper = runInThisContext(wrapper, - { filename: filename, lineOffset: -1 }); + { filename: filename, lineOffset: 0 }); if (global.v8debug) { if (!resolvedArgv) { // we enter the repl if we're not given a filename argument. diff --git a/src/node.js b/src/node.js index 367f68b25c003c..b38594f7c09274 100644 --- a/src/node.js +++ b/src/node.js @@ -942,7 +942,7 @@ }; NativeModule.wrapper = [ - '(function (exports, require, module, __filename, __dirname) {\n', + '(function (exports, require, module, __filename, __dirname) { ', '\n});' ]; @@ -952,7 +952,7 @@ var fn = runInThisContext(source, { filename: this.filename, - lineOffset: -1 + lineOffset: 0 }); fn(this.exports, NativeModule.require, this, this.filename); diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 19ba398d960701..ead3447320c50a 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -285,9 +285,9 @@ assert.equal(42, require('../fixtures/utf8-bom.js')); assert.equal(42, require('../fixtures/utf8-bom.json')); // Error on the first line of a module should -// have the correct line and column number +// have the correct line number assert.throws(function() { require('../fixtures/test-error-first-line-offset.js'); }, function(err) { - return /test-error-first-line-offset.js:1:1/.test(err.stack); + return /test-error-first-line-offset.js:1:/.test(err.stack); }, 'Expected appearance of proper offset in Error stack'); From 39eeca6b0858f739d8150522d5790f4be4087b5e Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 15 Dec 2015 17:38:00 -0500 Subject: [PATCH 191/262] test: add test for debugging one line files This commit adds a regression test for debugging of single line files. Refs: https://github.com/nodejs/node/issues/4297 PR-URL: https://github.com/nodejs/node/pull/4298 Reviewed-By: Ben Noordhuis Reviewed-By: Ali Ijaz Sheikh --- test/fixtures/exports-function-with-param.js | 1 + test/parallel/test-vm-debug-context.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/fixtures/exports-function-with-param.js diff --git a/test/fixtures/exports-function-with-param.js b/test/fixtures/exports-function-with-param.js new file mode 100644 index 00000000000000..263b9064422108 --- /dev/null +++ b/test/fixtures/exports-function-with-param.js @@ -0,0 +1 @@ +module.exports = function foo(arg) { return arg; } diff --git a/test/parallel/test-vm-debug-context.js b/test/parallel/test-vm-debug-context.js index 2e86d136bea2fa..b648592eaea901 100644 --- a/test/parallel/test-vm-debug-context.js +++ b/test/parallel/test-vm-debug-context.js @@ -53,6 +53,24 @@ assert.strictEqual(vm.runInDebugContext(undefined), undefined); assert.equal(breaks, 1); })(); +// Can set listeners and breakpoints on a single line file +(function() { + const Debug = vm.runInDebugContext('Debug'); + const fn = require(common.fixturesDir + '/exports-function-with-param'); + let called = false; + + Debug.setListener(function(event, state, data) { + if (data.constructor.name === 'BreakEvent') { + called = true; + } + }); + + Debug.setBreakPoint(fn); + fn('foo'); + assert.strictEqual(Debug.showBreakPoints(fn), '(arg) { [B0]return arg; }'); + assert.strictEqual(called, true); +})(); + // See https://github.com/nodejs/node/issues/1190, fatal errors should not // crash the process. var script = common.fixturesDir + '/vm-run-in-debug-context.js'; From d96e385bb11f582644d1b5e95d539f2d19906be6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 17 Jan 2016 17:18:37 +0100 Subject: [PATCH 192/262] src: don't check failure with ERR_peek_error() It's possible there is already an existing error on OpenSSL's error stack that is unrelated to the EVP_DigestInit_ex() operation we just executed. Fixes: https://github.com/nodejs/node/issues/4221 PR-URL: https://github.com/nodejs/node/pull/4731 Reviewed-By: Colin Ihrig Reviewed-By: Fedor Indutny --- src/node_crypto.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 7911ce9e612816..eec1eb9e63a5ec 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3440,8 +3440,7 @@ bool Hash::HashInit(const char* hash_type) { if (md_ == nullptr) return false; EVP_MD_CTX_init(&mdctx_); - EVP_DigestInit_ex(&mdctx_, md_, nullptr); - if (0 != ERR_peek_error()) { + if (EVP_DigestInit_ex(&mdctx_, md_, nullptr) <= 0) { return false; } initialised_ = true; From 6c536ede2007e1274d07c9919e8e34cd4a767e5d Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 17 Dec 2015 12:13:11 +0100 Subject: [PATCH 193/262] debugger: guard against call from non-node context Fix a segmentation fault when the debug message handler was called from a context without an associated `node::Environment`. Fixes: https://github.com/nodejs/node/issues/4261 Fixes: https://github.com/nodejs/node/issues/4322 PR-URL: https://github.com/nodejs/node/pull/4328 Reviewed-By: Evan Lucas Reviewed-By: James M Snell --- src/debug-agent.cc | 2 ++ test/parallel/test-debug-no-context.js | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/parallel/test-debug-no-context.js diff --git a/src/debug-agent.cc b/src/debug-agent.cc index 3409fb2603ae9b..06ede7fdef4aa9 100644 --- a/src/debug-agent.cc +++ b/src/debug-agent.cc @@ -321,6 +321,8 @@ void Agent::EnqueueMessage(AgentMessage* message) { void Agent::MessageHandler(const v8::Debug::Message& message) { Isolate* isolate = message.GetIsolate(); Environment* env = Environment::GetCurrent(isolate); + if (env == nullptr) + return; // Called from a non-node context. Agent* a = env->debugger_agent(); CHECK_NE(a, nullptr); CHECK_EQ(isolate, a->parent_env()->isolate()); diff --git a/test/parallel/test-debug-no-context.js b/test/parallel/test-debug-no-context.js new file mode 100644 index 00000000000000..a143e67ac66cd5 --- /dev/null +++ b/test/parallel/test-debug-no-context.js @@ -0,0 +1,24 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const spawn = require('child_process').spawn; + +const args = [`--debug`, `--debug-port=${common.PORT}`, `--interactive`]; +const proc = spawn(process.execPath, args, { stdio: 'pipe' }); +proc.stdin.write(` + util.inspect(Promise.resolve(42)); + util.inspect(Promise.resolve(1337)); + .exit +`); +proc.on('exit', common.mustCall((exitCode, signalCode) => { + assert.strictEqual(exitCode, 0); + assert.strictEqual(signalCode, null); +})); +let stdout = ''; +proc.stdout.setEncoding('utf8'); +proc.stdout.on('data', data => stdout += data); +process.on('exit', () => { + assert(stdout.includes('Promise { 42 }')); + assert(stdout.includes('Promise { 1337 }')); +}); From a6bf781fce5272f8f82f362d530cbb0de5ff89e1 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 3 Dec 2015 22:13:00 +1100 Subject: [PATCH 194/262] tools: add license-builder.sh to construct LICENSE PR-URL: https://github.com/nodejs/node/pull/4194 Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- tools/license-builder.sh | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 tools/license-builder.sh diff --git a/tools/license-builder.sh b/tools/license-builder.sh new file mode 100755 index 00000000000000..bb350e5a8bc559 --- /dev/null +++ b/tools/license-builder.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +set -e + +rootdir="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +licensefile="${rootdir}/LICENSE" +licensehead="$(sed '/^- /,$d' ${licensefile})" +tmplicense="${rootdir}/~LICENSE.$$" +echo -e "$licensehead" > $tmplicense + + +# addlicense +function addlicense { + + echo " +- ${1}, located at ${2}, is licensed as follows: + \"\"\" +$(echo -e "$3" | sed -e 's/^/ /' -e 's/^ $//' -e 's/ *$//' | sed -e '/./,$!d' | sed -e '/^$/N;/^\n$/D') + \"\"\"\ +" >> $tmplicense + +} + + +if ! [ -f "${rootdir}/deps/icu/license.html" ]; then + echo "ICU not installed, run configure to download it, e.g. ./configure --with-intl=small-icu --download=icu" + exit 1 +fi + + +# Dependencies bundled in distributions +addlicense "c-ares" "deps/cares" \ + "$(sed -e '/^ \*\/$/,$d' -e '/^$/d' -e 's/^[/ ]\* *//' ${rootdir}/deps/cares/src/ares_init.c)" +addlicense "HTTP Parser" "deps/http_parser" "$(cat deps/http_parser/LICENSE-MIT)" +addlicense "ICU" "deps/icu" \ + "$(sed -e '1,/COPYRIGHT AND PERMISSION NOTICE/d' -e '/^
$//' ${rootdir}/deps/icu/license.html)" +addlicense "libuv" "deps/uv" "$(cat ${rootdir}/deps/uv/LICENSE)" +addlicense "OpenSSL" "deps/openssl" \ + "$(sed -e '/^ \*\/$/,$d' -e '/^ [^*].*$/d' -e '/\/\*.*$/d' -e '/^$/d' -e 's/^[/ ]\* *//' ${rootdir}/deps/openssl/openssl/LICENSE)" +addlicense "Punycode.js" "lib/punycode.js" \ + "$(curl -sL https://raw.githubusercontent.com/bestiejs/punycode.js/master/LICENSE-MIT.txt)" +addlicense "V8" "deps/v8" "$(cat ${rootdir}/deps/v8/LICENSE)" +addlicense "zlib" "deps/zlib" \ + "$(sed -e '/The data format used by the zlib library/,$d' -e 's/^\/\* *//' -e 's/^ *//' ${rootdir}/deps/zlib/zlib.h)" + +# npm +addlicense "npm" "deps/npm" "$(cat ${rootdir}/deps/npm/LICENSE)" + +# Build tools +addlicense "GYP" "tools/gyp" "$(cat ${rootdir}/tools/gyp/LICENSE)" +addlicense "marked" "tools/doc/node_modules/marked" \ + "$(cat ${rootdir}/tools/doc/node_modules/marked/LICENSE)" + +# Testing tools +addlicense "cpplint.py" "tools/cpplint.py" \ + "$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' ${rootdir}/tools/cpplint.py | tail +3)" +addlicense "ESLint" "tools/eslint" "$(cat ${rootdir}/tools/eslint/LICENSE)" +addlicense "gtest" "deps/gtest" "$(cat ${rootdir}/deps/gtest/LICENSE)" +addlicense "node-weak" "test/gc/node_modules/weak" \ + "$(cat ${rootdir}/test/gc/node_modules/weak/LICENSE)" + + +mv $tmplicense $licensefile From 6d1ab714fa5438e915076e17b16fbcfb9a2e5e59 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 8 Dec 2015 21:57:59 +1100 Subject: [PATCH 195/262] doc: rebuild LICENSE using tools/license-builder.sh PR-URL: https://github.com/nodejs/node/pull/4194 Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- LICENSE | 950 ++++++++++++++++++++------------------------------------ 1 file changed, 338 insertions(+), 612 deletions(-) diff --git a/LICENSE b/LICENSE index ea51cc496d78fd..2b2a73ebbd0fa3 100644 --- a/LICENSE +++ b/LICENSE @@ -51,142 +51,25 @@ maintained libraries. The externally maintained libraries used by Node.js are: -- V8, located at deps/v8. V8's license follows: +- c-ares, located at deps/cares, 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.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. 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. - - Copyright 2006-2012, 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. + 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. """ -- C-Ares, an asynchronous DNS client, located at deps/cares. C-Ares license - follows: - """ - /* Copyright 1998 by the Massachusetts Institute of Technology. - * - * 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. - """ - -- OpenSSL located at deps/openssl. OpenSSL is cryptographic software written - by Eric Young (eay@cryptsoft.com) to provide SSL/TLS encryption. OpenSSL's - license follows: - """ - /* ==================================================================== - * Copyright (c) 1998-2011 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). - * - */ - """ - -- HTTP Parser, located at deps/http_parser. HTTP Parser's license follows: +- 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. @@ -213,16 +96,49 @@ The externally maintained libraries used by Node.js are: IN THE SOFTWARE. """ -- ESLint is located at tools/eslint. ESLint's license follows: +- ICU, located at deps/icu, is licensed as follows: """ - ESLint - Copyright (c) 2013 Nicholas C. Zakas. All rights reserved. + Copyright (c) 1995-2015 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, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is + 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. + """ + +- 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 @@ -232,67 +148,159 @@ The externally maintained libraries used by Node.js are: 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. + 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. """ -- tools/cpplint.py is a C++ linter. Its license follows: +- OpenSSL, located at deps/openssl, 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. + Copyright (c) 1998-2011 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). """ -- lib/punycode.js is copyright 2011 Mathias Bynens - and released under the MIT license. +- Punycode.js, located at lib/punycode.js, is licensed as follows: """ - * Punycode.js - * Copyright 2011 Mathias Bynens - * Available under MIT license + 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. """ -- tools/gyp. GYP is a meta-build system. GYP's license follows: +- V8, located at deps/v8, is licensed as follows: """ - Copyright (c) 2009 Google Inc. All rights reserved. + 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. + * 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 @@ -307,36 +315,34 @@ The externally maintained libraries used by Node.js are: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ -- Zlib at deps/zlib. zlib's license follows: +- 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 - */ + 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 is a package manager program located at deps/npm. - npm's license follows: +- npm, located at deps/npm, is licensed as follows: """ The npm application Copyright (c) npm, Inc. and Contributors @@ -365,10 +371,8 @@ The externally maintained libraries used by Node.js are: Copyright (c) Tjarda Koster, https://jelloween.deviantart.com Used with permission - -------- - The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. @@ -434,14 +438,12 @@ The externally maintained libraries used by Node.js are: 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 @@ -456,7 +458,6 @@ The externally maintained libraries used by Node.js are: 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 @@ -490,7 +491,6 @@ The externally maintained libraries used by Node.js are: 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 @@ -508,7 +508,6 @@ The externally maintained libraries used by Node.js are: 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 @@ -525,7 +524,6 @@ The externally maintained libraries used by Node.js are: 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 @@ -534,7 +532,6 @@ The externally maintained libraries used by Node.js are: 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 @@ -571,10 +568,8 @@ The externally maintained libraries used by Node.js are: DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------- - The following additional terms shall apply to use of the npm software, the npm website, the npm repository and any other services or products offered by npm, Inc.: @@ -621,8 +616,38 @@ The externally maintained libraries used by Node.js are: subdirectory, according to the terms of their respective licenses. """ -- tools/doc/node_modules/marked. Marked is a Markdown parser. Marked's - license follows: +- 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-2012, Christopher Jeffrey (https://github.com/chjj/) @@ -645,405 +670,106 @@ The externally maintained libraries used by Node.js are: THE SOFTWARE. """ -- test/gc/node_modules/weak. Node-weak is a node.js addon that provides garbage - collector notifications. Node-weak's license follows: +- cpplint.py, located at tools/cpplint.py, is licensed as follows: """ - Copyright (c) 2011, Ben Noordhuis + Copyright (c) 2009 Google Inc. All rights reserved. - 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. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: - 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. - """ + * 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. -- ICU's license follows: - From http://source.icu-project.org/repos/icu/icu/trunk/license.html + 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. """ - ICU License - ICU 1.8.1 and later - COPYRIGHT AND PERMISSION NOTICE - - Copyright (c) 1995-2014 International Business Machines Corporation and others +- ESLint, located at tools/eslint, is licensed as follows: + """ + ESLint + Copyright (c) 2013 Nicholas C. Zakas. All rights reserved. - 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: - 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 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 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. + 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. + """ - 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. +- gtest, located at deps/gtest, is licensed as follows: + """ + Copyright 2008, Google Inc. + All rights reserved. - All trademarks and registered trademarks mentioned herein are the - property of their respective owners. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: - Third-Party Software Licenses + * 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 section contains third-party software notices and/or - additional terms for licensed third-party software components - included within ICU libraries. + 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. + """ - 1. Unicode Data Files and Software - COPYRIGHT AND PERMISSION NOTICE +- node-weak, located at test/gc/node_modules/weak, is licensed as follows: + """ + Copyright (c) 2011, Ben Noordhuis - Copyright © 1991-2014 Unicode, Inc. All rights reserved. - Distributed under the Terms of Use in - http://www.unicode.org/copyright.html. + 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. - 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 - (a) this copyright and permission notice appear with all copies - of the Data Files or Software, - (b) this copyright and permission notice appear in associated - documentation, and - (c) there is clear notice in each modified Data File or in the Software - as well as in the documentation associated with the Data File(s) or - Software that the data or software has been modified. - - 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. - - 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. + 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. """ From 6e6f20af955d0de55143595189e6d85331140f73 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 19 Jan 2016 10:41:23 -0500 Subject: [PATCH 196/262] tools: fix license-builder.sh for ICU Modify tools/license-builder.sh to restore the Third-Party Software licenses for ICU. Also fix arguments to tail to work on Linux. rvagg: modified sed command for ICU to replace tabs with spaces and remove whitespace at the end of lines PR-URL: https://github.com/nodejs/node/pull/4762 Reviewed-By: Rod Vagg --- tools/license-builder.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/license-builder.sh b/tools/license-builder.sh index bb350e5a8bc559..5d6b810e1234c3 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -33,7 +33,8 @@ addlicense "c-ares" "deps/cares" \ "$(sed -e '/^ \*\/$/,$d' -e '/^$/d' -e 's/^[/ ]\* *//' ${rootdir}/deps/cares/src/ares_init.c)" addlicense "HTTP Parser" "deps/http_parser" "$(cat deps/http_parser/LICENSE-MIT)" addlicense "ICU" "deps/icu" \ - "$(sed -e '1,/COPYRIGHT AND PERMISSION NOTICE/d' -e '/^
$//' ${rootdir}/deps/icu/license.html)" + "$(sed -e '1,/ICU License - ICU 1\.8\.1 and later/d' -e :a \ + -e 's/<[^>]*>//g;s/ / /g;s/ +$//;/ Date: Tue, 19 Jan 2016 10:47:18 -0500 Subject: [PATCH 197/262] doc: restore ICU third-party software licenses PR-URL: https://github.com/nodejs/node/pull/4762 Reviewed-By: Rod Vagg --- LICENSE | 328 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) diff --git a/LICENSE b/LICENSE index 2b2a73ebbd0fa3..a5045ba8cfadff 100644 --- a/LICENSE +++ b/LICENSE @@ -98,6 +98,10 @@ The externally maintained libraries used by Node.js are: - ICU, located at deps/icu, is licensed as follows: """ + ICU License - ICU 1.8.1 and later + + COPYRIGHT AND PERMISSION NOTICE + Copyright (c) 1995-2015 International Business Machines Corporation and others All rights reserved. @@ -124,6 +128,330 @@ The externally maintained libraries used by Node.js are: 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. + + 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. Unicode Data Files and Software + + COPYRIGHT AND PERMISSION NOTICE + + Copyright © 1991-2015 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 + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, + (b) this copyright and permission notice appear in associated + documentation, and + (c) there is clear notice in each modified Data File or in the Software + as well as in the documentation associated with the Data File(s) or + Software that the data or software has been modified. + + 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. + + 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: From 671ac2f185557d8980c9a9090b25eabb0a4ad3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 5 Nov 2015 20:53:52 +0100 Subject: [PATCH 198/262] gitignore: never ignore debug module On case-insensitive platorms, the Debug/ rule catches the debug module under npm and eslint. PR-URL: https://github.com/nodejs/node/pull/2286 Reviewed-By: Roman Reiss --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5cf2cd0a71cbdf..d4ead4924371d8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ icu_config.gypi # various stuff that VC++ produces/uses Debug/ -!node_modules/debug/ +!**/node_modules/debug/ Release/ !doc/blog/** *.sln From 890cf223e02b5f08bfc18cc5dfb6949b58ed53a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 12 Jan 2016 20:50:19 +0100 Subject: [PATCH 199/262] tools: update eslint to v1.10.3 PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss --- tools/eslint/README.md | 57 +- tools/eslint/bin/eslint.js | 38 +- tools/eslint/conf/blank-script.json | 21 + tools/eslint/conf/environments.js | 51 +- tools/eslint/conf/eslint.json | 164 +- tools/eslint/conf/json-schema-schema.json | 150 + tools/eslint/conf/replacements.json | 17 + tools/eslint/lib/api.js | 4 +- tools/eslint/lib/ast-utils.js | 154 + tools/eslint/lib/cli-engine.js | 435 +- tools/eslint/lib/cli.js | 91 +- tools/eslint/lib/config-initializer.js | 145 - tools/eslint/lib/config-validator.js | 110 - tools/eslint/lib/config.js | 266 +- tools/eslint/lib/config/config-file.js | 440 + tools/eslint/lib/config/config-initializer.js | 241 + tools/eslint/lib/config/config-ops.js | 186 + tools/eslint/lib/config/config-validator.js | 163 + tools/eslint/lib/eslint.js | 633 +- tools/eslint/lib/file-finder.js | 53 +- tools/eslint/lib/formatters/checkstyle.js | 15 +- tools/eslint/lib/formatters/compact.js | 6 + .../eslint/lib/formatters/html-template.html | 130 + tools/eslint/lib/formatters/html.js | 88 + tools/eslint/lib/formatters/json.js | 14 + tools/eslint/lib/formatters/junit.js | 6 + tools/eslint/lib/formatters/unix.js | 59 + tools/eslint/lib/ignored-paths.js | 12 +- tools/eslint/lib/load-rules.js | 2 +- tools/eslint/lib/logging.js | 25 + tools/eslint/lib/options.js | 297 +- tools/eslint/lib/rule-context.js | 108 +- tools/eslint/lib/rules.js | 30 +- tools/eslint/lib/rules/accessor-pairs.js | 88 +- .../eslint/lib/rules/array-bracket-spacing.js | 113 +- tools/eslint/lib/rules/arrow-body-style.js | 71 + tools/eslint/lib/rules/arrow-parens.js | 52 + tools/eslint/lib/rules/arrow-spacing.js | 124 + tools/eslint/lib/rules/block-scoped-var.js | 356 +- tools/eslint/lib/rules/block-spacing.js | 119 + tools/eslint/lib/rules/brace-style.js | 73 +- tools/eslint/lib/rules/callback-return.js | 142 + tools/eslint/lib/rules/comma-dangle.js | 209 +- tools/eslint/lib/rules/comma-spacing.js | 182 +- tools/eslint/lib/rules/comma-style.js | 25 +- tools/eslint/lib/rules/complexity.js | 31 +- .../lib/rules/computed-property-spacing.js | 85 +- tools/eslint/lib/rules/consistent-this.js | 58 +- tools/eslint/lib/rules/constructor-super.js | 8 +- tools/eslint/lib/rules/curly.js | 267 +- tools/eslint/lib/rules/dot-location.js | 25 +- tools/eslint/lib/rules/dot-notation.js | 62 +- tools/eslint/lib/rules/eol-last.js | 21 +- tools/eslint/lib/rules/eqeqeq.js | 36 +- tools/eslint/lib/rules/func-style.js | 59 +- .../lib/rules/generator-star-spacing.js | 26 +- tools/eslint/lib/rules/generator-star.js | 76 - tools/eslint/lib/rules/global-require.js | 35 + tools/eslint/lib/rules/global-strict.js | 49 - tools/eslint/lib/rules/handle-callback-err.js | 2 +- tools/eslint/lib/rules/id-length.js | 106 + tools/eslint/lib/rules/id-match.js | 129 + tools/eslint/lib/rules/indent.js | 868 +- tools/eslint/lib/rules/init-declarations.js | 120 + tools/eslint/lib/rules/jsx-quotes.js | 63 + tools/eslint/lib/rules/key-spacing.js | 50 +- tools/eslint/lib/rules/linebreak-style.js | 57 +- .../eslint/lib/rules/lines-around-comment.js | 156 +- tools/eslint/lib/rules/max-depth.js | 21 + tools/eslint/lib/rules/max-len.js | 103 +- .../eslint/lib/rules/max-nested-callbacks.js | 2 +- tools/eslint/lib/rules/max-statements.js | 17 + tools/eslint/lib/rules/new-cap.js | 23 +- tools/eslint/lib/rules/newline-after-var.js | 61 +- tools/eslint/lib/rules/no-alert.js | 9 +- .../eslint/lib/rules/no-array-constructor.js | 6 + tools/eslint/lib/rules/no-arrow-condition.js | 88 + .../eslint/lib/rules/no-case-declarations.js | 47 + tools/eslint/lib/rules/no-catch-shadow.js | 32 +- tools/eslint/lib/rules/no-class-assign.js | 48 + tools/eslint/lib/rules/no-comma-dangle.js | 45 - tools/eslint/lib/rules/no-cond-assign.js | 18 +- tools/eslint/lib/rules/no-const-assign.js | 41 + tools/eslint/lib/rules/no-control-regex.js | 6 + tools/eslint/lib/rules/no-dupe-args.js | 76 +- .../eslint/lib/rules/no-dupe-class-members.js | 82 + tools/eslint/lib/rules/no-dupe-keys.js | 7 +- tools/eslint/lib/rules/no-duplicate-case.js | 56 +- tools/eslint/lib/rules/no-else-return.js | 61 +- .../lib/rules/no-empty-character-class.js | 2 + tools/eslint/lib/rules/no-empty-class.js | 45 - tools/eslint/lib/rules/no-empty-label.js | 2 +- tools/eslint/lib/rules/no-empty-pattern.js | 28 + tools/eslint/lib/rules/no-ex-assign.js | 35 +- tools/eslint/lib/rules/no-extend-native.js | 21 +- tools/eslint/lib/rules/no-extra-bind.js | 7 +- .../eslint/lib/rules/no-extra-boolean-cast.js | 2 +- tools/eslint/lib/rules/no-extra-parens.js | 117 +- tools/eslint/lib/rules/no-extra-semi.js | 19 +- tools/eslint/lib/rules/no-extra-strict.js | 86 - tools/eslint/lib/rules/no-fallthrough.js | 5 +- tools/eslint/lib/rules/no-func-assign.js | 108 +- .../eslint/lib/rules/no-implicit-coercion.js | 220 + tools/eslint/lib/rules/no-implied-eval.js | 113 +- tools/eslint/lib/rules/no-inline-comments.js | 7 +- tools/eslint/lib/rules/no-invalid-regexp.js | 14 +- tools/eslint/lib/rules/no-invalid-this.js | 350 + .../lib/rules/no-irregular-whitespace.js | 12 +- tools/eslint/lib/rules/no-label-var.js | 37 +- tools/eslint/lib/rules/no-loop-func.js | 112 +- tools/eslint/lib/rules/no-magic-numbers.js | 130 + tools/eslint/lib/rules/no-mixed-requires.js | 27 +- .../lib/rules/no-mixed-spaces-and-tabs.js | 76 +- tools/eslint/lib/rules/no-multi-spaces.js | 30 +- .../lib/rules/no-multiple-empty-lines.js | 52 +- tools/eslint/lib/rules/no-native-reassign.js | 77 +- .../eslint/lib/rules/no-negated-condition.js | 74 + tools/eslint/lib/rules/no-new-func.js | 22 +- tools/eslint/lib/rules/no-param-reassign.js | 147 +- tools/eslint/lib/rules/no-plusplus.js | 23 +- tools/eslint/lib/rules/no-redeclare.js | 63 +- tools/eslint/lib/rules/no-reserved-keys.js | 56 - .../eslint/lib/rules/no-restricted-modules.js | 4 +- .../eslint/lib/rules/no-restricted-syntax.js | 46 + tools/eslint/lib/rules/no-return-assign.js | 2 +- tools/eslint/lib/rules/no-script-url.js | 4 +- tools/eslint/lib/rules/no-sequences.js | 5 +- .../lib/rules/no-shadow-restricted-names.js | 6 + tools/eslint/lib/rules/no-shadow.js | 132 +- .../eslint/lib/rules/no-space-before-semi.js | 98 - tools/eslint/lib/rules/no-spaced-func.js | 43 +- tools/eslint/lib/rules/no-sync.js | 2 +- .../eslint/lib/rules/no-this-before-super.js | 10 +- tools/eslint/lib/rules/no-throw-literal.js | 43 +- tools/eslint/lib/rules/no-trailing-spaces.js | 48 +- tools/eslint/lib/rules/no-undef-init.js | 8 +- tools/eslint/lib/rules/no-undef.js | 48 +- .../eslint/lib/rules/no-underscore-dangle.js | 71 +- tools/eslint/lib/rules/no-unneeded-ternary.js | 42 +- tools/eslint/lib/rules/no-unreachable.js | 11 +- .../eslint/lib/rules/no-unused-expressions.js | 54 +- tools/eslint/lib/rules/no-unused-vars.js | 143 +- .../eslint/lib/rules/no-use-before-define.js | 58 +- tools/eslint/lib/rules/no-useless-call.js | 96 + tools/eslint/lib/rules/no-useless-concat.js | 89 + tools/eslint/lib/rules/no-var.js | 2 +- tools/eslint/lib/rules/no-warning-comments.js | 15 +- tools/eslint/lib/rules/no-wrap-func.js | 65 - .../eslint/lib/rules/object-curly-spacing.js | 224 +- tools/eslint/lib/rules/object-shorthand.js | 5 +- tools/eslint/lib/rules/one-var.js | 6 +- tools/eslint/lib/rules/operator-linebreak.js | 81 +- tools/eslint/lib/rules/padded-blocks.js | 43 +- .../eslint/lib/rules/prefer-arrow-callback.js | 206 + tools/eslint/lib/rules/prefer-const.js | 6 +- tools/eslint/lib/rules/prefer-reflect.js | 100 + tools/eslint/lib/rules/prefer-spread.js | 92 + tools/eslint/lib/rules/prefer-template.js | 96 + tools/eslint/lib/rules/quote-props.js | 192 +- tools/eslint/lib/rules/quotes.js | 136 +- tools/eslint/lib/rules/radix.js | 61 +- tools/eslint/lib/rules/require-jsdoc.js | 97 + tools/eslint/lib/rules/require-yield.js | 62 + tools/eslint/lib/rules/semi-spacing.js | 62 +- tools/eslint/lib/rules/semi.js | 39 +- tools/eslint/lib/rules/sort-vars.js | 4 + .../lib/rules/space-after-function-name.js | 49 - .../eslint/lib/rules/space-after-keywords.js | 46 +- tools/eslint/lib/rules/space-before-blocks.js | 84 +- .../lib/rules/space-before-function-paren.js | 63 +- .../space-before-function-parentheses.js | 139 - .../eslint/lib/rules/space-before-keywords.js | 214 + tools/eslint/lib/rules/space-in-brackets.js | 305 - tools/eslint/lib/rules/space-in-parens.js | 338 +- tools/eslint/lib/rules/space-infix-ops.js | 42 +- .../lib/rules/space-return-throw-case.js | 14 +- tools/eslint/lib/rules/space-unary-ops.js | 81 +- tools/eslint/lib/rules/spaced-comment.js | 262 +- tools/eslint/lib/rules/spaced-line-comment.js | 89 - tools/eslint/lib/rules/strict.js | 202 +- tools/eslint/lib/rules/use-isnan.js | 4 +- tools/eslint/lib/rules/valid-jsdoc.js | 104 +- tools/eslint/lib/rules/valid-typeof.js | 2 +- tools/eslint/lib/rules/vars-on-top.js | 8 +- tools/eslint/lib/rules/wrap-iife.js | 6 + tools/eslint/lib/rules/yoda.js | 4 +- .../lib/testers/event-generator-tester.js | 63 + tools/eslint/lib/testers/rule-tester.js | 421 + tools/eslint/lib/timing.js | 29 + tools/eslint/lib/util.js | 60 +- .../lib/util/comment-event-generator.js | 116 + tools/eslint/lib/util/estraverse.js | 54 + tools/eslint/lib/util/glob-util.js | 149 + tools/eslint/lib/util/keywords.js | 68 + tools/eslint/lib/util/node-event-generator.js | 55 + tools/eslint/lib/util/rule-fixer.js | 147 + tools/eslint/lib/util/source-code-fixer.js | 123 + tools/eslint/lib/util/source-code.js | 288 + tools/eslint/lib/util/traverse.js | 105 - tools/eslint/node_modules/.bin/handlebars | 1 + tools/eslint/node_modules/.bin/rimraf | 1 + tools/eslint/node_modules/.bin/shjs | 1 + tools/eslint/node_modules/.bin/uglifyjs | 1 + tools/eslint/node_modules/.bin/user-home | 1 - tools/eslint/node_modules/align-text/LICENSE | 21 + .../eslint/node_modules/align-text/README.md | 236 + tools/eslint/node_modules/align-text/index.js | 52 + .../node_modules/align-text/package.json | 101 + tools/eslint/node_modules/amdefine/LICENSE | 58 + tools/eslint/node_modules/amdefine/README.md | 171 + .../eslint/node_modules/amdefine/amdefine.js | 301 + .../eslint/node_modules/amdefine/intercept.js | 36 + .../eslint/node_modules/amdefine/package.json | 74 + .../eslint/node_modules/ansi-escapes/index.js | 79 + .../ansi-styles => ansi-escapes}/license | 0 .../node_modules/ansi-escapes/package.json | 104 + .../node_modules/ansi-escapes/readme.md | 132 + tools/eslint/node_modules/ansi-regex/index.js | 4 + .../has-ansi => ansi-regex}/license | 0 .../node_modules/ansi-regex/package.json | 114 + .../eslint/node_modules/ansi-regex/readme.md | 31 + .../eslint/node_modules/ansi-styles/index.js | 65 + .../ansi-regex => ansi-styles}/license | 0 .../node_modules/ansi-styles/package.json | 106 + .../eslint/node_modules/ansi-styles/readme.md | 86 + .../node_modules => }/argparse/LICENSE | 0 tools/eslint/node_modules/argparse/README.md | 241 + .../node_modules => }/argparse/index.js | 0 .../node_modules => }/argparse/lib/action.js | 0 .../argparse/lib/action/append.js | 2 - .../argparse/lib/action/append/constant.js | 0 .../argparse/lib/action/count.js | 0 .../argparse/lib/action/help.js | 0 .../argparse/lib/action/store.js | 0 .../argparse/lib/action/store/constant.js | 0 .../argparse/lib/action/store/false.js | 0 .../argparse/lib/action/store/true.js | 0 .../argparse/lib/action/subparsers.js | 2 - .../argparse/lib/action/version.js | 3 - .../argparse/lib/action_container.js | 0 .../argparse/lib/argparse.js | 0 .../argparse/lib/argument/error.js | 0 .../argparse/lib/argument/exclusive.js | 1 - .../argparse/lib/argument/group.js | 74 + .../argparse/lib/argument_parser.js | 8 +- .../node_modules => }/argparse/lib/const.js | 0 .../argparse/lib/help/added_formatters.js | 0 .../argparse/lib/help/formatter.js | 0 .../argparse/lib/namespace.js | 0 .../eslint/node_modules/argparse/package.json | 87 + .../eslint/node_modules/array-union/index.js | 6 + .../node_modules/array-union/package.json | 94 + .../eslint/node_modules/array-union/readme.md | 28 + tools/eslint/node_modules/array-uniq/index.js | 60 + .../node_modules/array-uniq/package.json | 92 + .../eslint/node_modules/array-uniq/readme.md | 30 + tools/eslint/node_modules/arrify/index.js | 8 + .../ansi-regex => arrify}/license | 0 tools/eslint/node_modules/arrify/package.json | 89 + tools/eslint/node_modules/arrify/readme.md | 36 + tools/eslint/node_modules/async/LICENSE | 19 + tools/eslint/node_modules/async/README.md | 1877 +++ tools/eslint/node_modules/async/dist/async.js | 1265 ++ .../node_modules/async/dist/async.min.js | 2 + tools/eslint/node_modules/async/lib/async.js | 1265 ++ tools/eslint/node_modules/async/package.json | 149 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules => }/balanced-match/Makefile | 1 - .../node_modules/balanced-match/README.md | 89 + .../node_modules/balanced-match/example.js | 4 + .../node_modules/balanced-match/index.js | 50 + .../node_modules/balanced-match/package.json | 98 + .../node_modules/brace-expansion/README.md | 122 + .../node_modules/brace-expansion/example.js | 7 + .../node_modules/brace-expansion/index.js | 190 + .../node_modules/brace-expansion/package.json | 100 + tools/eslint/node_modules/camelcase/index.js | 27 + .../supports-color => camelcase}/license | 0 .../node_modules/camelcase/package.json | 94 + tools/eslint/node_modules/camelcase/readme.md | 56 + .../eslint/node_modules/center-align/LICENSE | 21 + .../node_modules/center-align/README.md | 74 + .../eslint/node_modules/center-align/index.js | 16 + .../node_modules/center-align/package.json | 109 + .../eslint/node_modules/center-align/utils.js | 40 + tools/eslint/node_modules/chalk/index.js | 46 +- .../chalk/node_modules/.bin/has-ansi | 1 - .../chalk/node_modules/.bin/strip-ansi | 1 - .../chalk/node_modules/.bin/supports-color | 1 - .../chalk/node_modules/ansi-styles/index.js | 56 - .../node_modules/ansi-styles/package.json | 80 - .../chalk/node_modules/ansi-styles/readme.md | 86 - .../chalk/node_modules/has-ansi/cli.js | 45 - .../has-ansi/node_modules/ansi-regex/index.js | 4 - .../node_modules/ansi-regex/package.json | 86 - .../node_modules/ansi-regex/readme.md | 33 - .../has-ansi/node_modules/get-stdin/index.js | 49 - .../node_modules/get-stdin/package.json | 64 - .../has-ansi/node_modules/get-stdin/readme.md | 44 - .../chalk/node_modules/has-ansi/package.json | 92 - .../chalk/node_modules/has-ansi/readme.md | 45 - .../chalk/node_modules/strip-ansi/cli.js | 47 - .../node_modules/ansi-regex/index.js | 4 - .../node_modules/ansi-regex/package.json | 86 - .../node_modules/ansi-regex/readme.md | 33 - .../node_modules/strip-ansi/package.json | 89 - .../chalk/node_modules/strip-ansi/readme.md | 43 - .../chalk/node_modules/supports-color/cli.js | 29 - .../node_modules/supports-color/index.js | 43 - .../node_modules/supports-color/package.json | 85 - .../node_modules/supports-color/readme.md | 46 - tools/eslint/node_modules/chalk/package.json | 172 +- tools/eslint/node_modules/chalk/readme.md | 34 +- tools/eslint/node_modules/cli-cursor/index.js | 26 + .../ansi-regex => cli-cursor}/license | 0 .../node_modules/cli-cursor/package.json | 98 + .../eslint/node_modules/cli-cursor/readme.md | 40 + tools/eslint/node_modules/cli-width/LICENSE | 13 + tools/eslint/node_modules/cli-width/README.md | 30 + tools/eslint/node_modules/cli-width/index.js | 28 + .../node_modules/cli-width/package.json | 75 + .../eslint/node_modules/cliui/.coveralls.yml | 1 + tools/eslint/node_modules/cliui/LICENSE.txt | 14 + tools/eslint/node_modules/cliui/README.md | 104 + tools/eslint/node_modules/cliui/index.js | 273 + .../node_modules/wordwrap/README.markdown | 0 .../cliui/node_modules/wordwrap/index.js | 76 + .../cliui/node_modules/wordwrap/package.json | 86 + tools/eslint/node_modules/cliui/package.json | 114 + .../node_modules/code-point-at/index.js | 33 + .../eslint/node_modules/code-point-at/license | 21 + .../node_modules/code-point-at/package.json | 96 + .../node_modules/code-point-at/readme.md | 34 + .../node_modules => }/concat-map/LICENSE | 0 .../concat-map/README.markdown | 0 .../node_modules => }/concat-map/index.js | 0 .../node_modules/concat-map/package.json | 109 + .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/package.json | 33 - .../node_modules/inherits/test.js | 25 - .../node_modules/readable-stream/.npmignore | 5 - .../node_modules/readable-stream/.travis.yml | 39 - .../node_modules/readable-stream/README.md | 36 - .../readable-stream/doc/stream.markdown | 1651 --- .../doc/wg-meetings/2015-01-30.md | 60 - .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 36 - .../node_modules/core-util-is/util.js | 106 - .../node_modules/isarray/build/build.js | 209 - .../node_modules/isarray/component.json | 19 - .../node_modules/isarray/package.json | 54 - .../process-nextick-args/.travis.yml | 7 - .../process-nextick-args/index.js | 13 - .../process-nextick-args/package.json | 44 - .../process-nextick-args/readme.md | 18 - .../node_modules/process-nextick-args/test.js | 17 - .../node_modules/string_decoder/.npmignore | 2 - .../node_modules/string_decoder/package.json | 54 - .../node_modules/util-deprecate/History.md | 11 - .../node_modules/util-deprecate/browser.js | 62 - .../node_modules/util-deprecate/package.json | 53 - .../node_modules/readable-stream/package.json | 75 - .../node_modules/typedarray/.travis.yml | 4 - .../node_modules/typedarray/example/tarray.js | 4 - .../node_modules/typedarray/package.json | 64 - .../typedarray/test/server/undef_globals.js | 19 - .../node_modules/typedarray/test/tarray.js | 10 - .../node_modules/concat-stream/package.json | 139 +- .../node_modules/concat-stream/readme.md | 8 +- .../eslint/node_modules/core-util-is/LICENSE | 19 + .../node_modules => }/core-util-is/README.md | 0 .../core-util-is/float.patch | 0 .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 86 + .../es6-map/node_modules => }/d/.lint | 0 .../node_modules/es6-map => d}/LICENCE | 0 .../es6-map/node_modules => }/d/README.md | 0 .../es6-map/node_modules => }/d/auto-bind.js | 0 .../es6-map/node_modules => }/d/index.js | 0 .../es6-map/node_modules => }/d/lazy.js | 0 tools/eslint/node_modules/d/package.json | 89 + tools/eslint/node_modules/debug/.jshintrc | 3 - tools/eslint/node_modules/debug/.npmignore | 6 - tools/eslint/node_modules/debug/History.md | 195 - tools/eslint/node_modules/debug/bower.json | 28 - .../eslint/node_modules/debug/component.json | 19 - .../debug/node_modules/ms/.npmignore | 5 - .../debug/node_modules/ms/package.json | 48 - tools/eslint/node_modules/debug/package.json | 103 +- tools/eslint/node_modules/decamelize/index.js | 16 + tools/eslint/node_modules/decamelize/license | 21 + .../node_modules/decamelize/package.json | 96 + .../eslint/node_modules/decamelize/readme.md | 48 + .../node_modules => }/deep-is/LICENSE | 0 .../node_modules => }/deep-is/README.markdown | 0 .../node_modules => }/deep-is/index.js | 0 .../eslint/node_modules/deep-is/package.json | 112 + tools/eslint/node_modules/del/index.js | 72 + tools/eslint/node_modules/del/license | 21 + tools/eslint/node_modules/del/package.json | 121 + tools/eslint/node_modules/del/readme.md | 100 + tools/eslint/node_modules/doctrine/.jshintrc | 28 - tools/eslint/node_modules/doctrine/.npmignore | 3 - tools/eslint/node_modules/doctrine/.scripted | 6 - .../eslint/node_modules/doctrine/.travis.yml | 7 - .../node_modules/doctrine/CONTRIBUTING.md | 5 - tools/eslint/node_modules/doctrine/README.md | 138 +- .../doctrine/coverage/coverage-final.json | 2 - .../doctrine/coverage/lcov-report/base.css | 182 - .../doctrine/coverage/lcov-report/index.html | 72 - .../coverage/lcov-report/prettify.css | 1 - .../doctrine/coverage/lcov-report/prettify.js | 1 - .../lcov-report/sort-arrow-sprite.png | Bin 209 -> 0 bytes .../doctrine/coverage/lcov-report/sorter.js | 156 - .../node_modules/doctrine/coverage/lcov.info | 0 .../eslint/node_modules/doctrine/eslint.json | 22 - .../eslint/node_modules/doctrine/gulpfile.js | 120 - .../node_modules/doctrine/lib/doctrine.js | 58 +- .../node_modules/esutils/package.json | 108 +- .../doctrine/node_modules/isarray/README.md | 54 - .../node_modules/isarray/build/build.js | 209 - .../node_modules/isarray/component.json | 19 - .../doctrine/node_modules/isarray/index.js | 3 - .../node_modules/isarray/package.json | 54 - .../eslint/node_modules/doctrine/package.json | 130 +- .../node_modules/doctrine/test/midstream.js | 61 - .../node_modules/doctrine/test/parse.js | 2219 --- .../node_modules/doctrine/test/strict.js | 168 - .../node_modules/doctrine/test/stringify.js | 413 - .../node_modules/doctrine/test/test.html | 31 - .../node_modules/doctrine/test/unwrap.js | 60 - .../es6-map/node_modules => }/es5-ext/.lint | 0 tools/eslint/node_modules/es5-ext/.lintignore | 9 + .../es6-map/node_modules => }/es5-ext/LICENSE | 0 tools/eslint/node_modules/es5-ext/README.md | 993 ++ .../es5-ext/array/#/@@iterator/implement.js | 0 .../es5-ext/array/#/@@iterator/index.js | 0 .../array/#/@@iterator/is-implemented.js | 0 .../es5-ext/array/#/@@iterator/shim.js | 0 .../es5-ext/array/#/_compare-by-length.js | 0 .../es5-ext/array/#/binary-search.js | 0 .../es5-ext/array/#/clear.js | 0 .../es5-ext/array/#/compact.js | 0 .../es5-ext/array/#/concat/implement.js | 0 .../es5-ext/array/#/concat/index.js | 0 .../es5-ext/array/#/concat/is-implemented.js | 0 .../es5-ext/array/#/concat/shim.js | 0 .../es5-ext/array/#/contains.js | 0 .../es5-ext/array/#/copy-within/implement.js | 0 .../es5-ext/array/#/copy-within/index.js | 0 .../array/#/copy-within/is-implemented.js | 0 .../es5-ext/array/#/copy-within/shim.js | 0 .../node_modules => }/es5-ext/array/#/diff.js | 0 .../es5-ext/array/#/e-index-of.js | 0 .../es5-ext/array/#/e-last-index-of.js | 0 .../es5-ext/array/#/entries/implement.js | 0 .../es5-ext/array/#/entries/index.js | 0 .../es5-ext/array/#/entries/is-implemented.js | 0 .../es5-ext/array/#/entries/shim.js | 0 .../es5-ext/array/#/exclusion.js | 0 .../es5-ext/array/#/fill/implement.js | 0 .../es5-ext/array/#/fill/index.js | 0 .../es5-ext/array/#/fill/is-implemented.js | 0 .../es5-ext/array/#/fill/shim.js | 0 .../es5-ext/array/#/filter/implement.js | 0 .../es5-ext/array/#/filter/index.js | 0 .../es5-ext/array/#/filter/is-implemented.js | 0 .../es5-ext/array/#/filter/shim.js | 0 .../es5-ext/array/#/find-index/implement.js | 0 .../es5-ext/array/#/find-index/index.js | 0 .../array/#/find-index/is-implemented.js | 0 .../es5-ext/array/#/find-index/shim.js | 0 .../es5-ext/array/#/find/implement.js | 0 .../es5-ext/array/#/find/index.js | 0 .../es5-ext/array/#/find/is-implemented.js | 0 .../es5-ext/array/#/find/shim.js | 0 .../es5-ext/array/#/first-index.js | 0 .../es5-ext/array/#/first.js | 0 .../es5-ext/array/#/flatten.js | 0 .../es5-ext/array/#/for-each-right.js | 20 + .../es5-ext/array/#/group.js | 0 .../es5-ext/array/#/index.js | 0 .../es5-ext/array/#/indexes-of.js | 0 .../es5-ext/array/#/intersection.js | 0 .../es5-ext/array/#/is-copy.js | 0 .../es5-ext/array/#/is-uniq.js | 0 .../es5-ext/array/#/keys/implement.js | 0 .../es5-ext/array/#/keys/index.js | 0 .../es5-ext/array/#/keys/is-implemented.js | 0 .../es5-ext/array/#/keys/shim.js | 0 .../es5-ext/array/#/last-index.js | 0 .../node_modules => }/es5-ext/array/#/last.js | 0 .../es5-ext/array/#/map/implement.js | 0 .../es5-ext/array/#/map/index.js | 0 .../es5-ext/array/#/map/is-implemented.js | 0 .../es5-ext/array/#/map/shim.js | 0 .../es5-ext/array/#/remove.js | 0 .../es5-ext/array/#/separate.js | 0 .../es5-ext/array/#/slice/implement.js | 0 .../es5-ext/array/#/slice/index.js | 0 .../es5-ext/array/#/slice/is-implemented.js | 0 .../es5-ext/array/#/slice/shim.js | 0 .../es5-ext/array/#/some-right.js | 23 + .../es5-ext/array/#/splice/implement.js | 0 .../es5-ext/array/#/splice/index.js | 0 .../es5-ext/array/#/splice/is-implemented.js | 0 .../es5-ext/array/#/splice/shim.js | 0 .../node_modules => }/es5-ext/array/#/uniq.js | 0 .../es5-ext/array/#/values/implement.js | 0 .../es5-ext/array/#/values/index.js | 0 .../es5-ext/array/#/values/is-implemented.js | 0 .../es5-ext/array/#/values/shim.js | 0 .../es5-ext/array/_is-extensible.js | 0 .../es5-ext/array/_sub-array-dummy-safe.js | 0 .../es5-ext/array/_sub-array-dummy.js | 0 .../es5-ext/array/from/implement.js | 0 .../es5-ext/array/from/index.js | 0 .../es5-ext/array/from/is-implemented.js | 0 .../es5-ext/array/from/shim.js | 0 .../es5-ext/array/generate.js | 0 .../node_modules => }/es5-ext/array/index.js | 0 .../es5-ext/array/is-plain-array.js | 0 .../es5-ext/array/of/implement.js | 0 .../es5-ext/array/of/index.js | 0 .../es5-ext/array/of/is-implemented.js | 0 .../es5-ext/array/of/shim.js | 0 .../es5-ext/array/to-array.js | 0 .../es5-ext/array/valid-array.js | 0 .../es5-ext/boolean/index.js | 0 .../es5-ext/boolean/is-boolean.js | 0 .../node_modules => }/es5-ext/date/#/copy.js | 0 .../es5-ext/date/#/days-in-month.js | 0 .../es5-ext/date/#/floor-day.js | 0 .../es5-ext/date/#/floor-month.js | 0 .../es5-ext/date/#/floor-year.js | 0 .../es5-ext/date/#/format.js | 0 .../node_modules => }/es5-ext/date/#/index.js | 0 .../node_modules => }/es5-ext/date/index.js | 0 .../node_modules => }/es5-ext/date/is-date.js | 0 .../es5-ext/date/valid-date.js | 0 .../es5-ext/error/#/index.js | 0 .../es5-ext/error/#/throw.js | 0 .../node_modules => }/es5-ext/error/custom.js | 0 .../node_modules => }/es5-ext/error/index.js | 0 .../es5-ext/error/is-error.js | 0 .../es5-ext/error/valid-error.js | 0 .../es5-ext/function/#/compose.js | 0 .../es5-ext/function/#/copy.js | 0 .../es5-ext/function/#/curry.js | 0 .../es5-ext/function/#/index.js | 0 .../es5-ext/function/#/lock.js | 0 .../es5-ext/function/#/not.js | 0 .../es5-ext/function/#/partial.js | 0 .../es5-ext/function/#/spread.js | 0 .../es5-ext/function/#/to-string-tokens.js | 0 .../es5-ext/function/_define-length.js | 0 .../es5-ext/function/constant.js | 0 .../es5-ext/function/identity.js | 0 .../es5-ext/function/index.js | 0 .../es5-ext/function/invoke.js | 0 .../es5-ext/function/is-arguments.js | 0 .../es5-ext/function/is-function.js | 0 .../es5-ext/function/noop.js | 0 .../es5-ext/function/pluck.js | 0 .../es5-ext/function/valid-function.js | 0 .../node_modules => }/es5-ext/global.js | 0 .../node_modules => }/es5-ext/index.js | 0 .../es5-ext/iterable/for-each.js | 0 .../es5-ext/iterable/index.js | 0 .../node_modules => }/es5-ext/iterable/is.js | 0 .../es5-ext/iterable/validate-object.js | 0 .../es5-ext/iterable/validate.js | 0 .../es5-ext/math/_pack-ieee754.js | 0 .../es5-ext/math/_unpack-ieee754.js | 0 .../es5-ext/math/acosh/implement.js | 0 .../es5-ext/math/acosh/index.js | 0 .../es5-ext/math/acosh/is-implemented.js | 0 .../es5-ext/math/acosh/shim.js | 0 .../es5-ext/math/asinh/implement.js | 0 .../es5-ext/math/asinh/index.js | 0 .../es5-ext/math/asinh/is-implemented.js | 0 .../es5-ext/math/asinh/shim.js | 0 .../es5-ext/math/atanh/implement.js | 0 .../es5-ext/math/atanh/index.js | 0 .../es5-ext/math/atanh/is-implemented.js | 0 .../es5-ext/math/atanh/shim.js | 0 .../es5-ext/math/cbrt/implement.js | 0 .../es5-ext/math/cbrt/index.js | 0 .../es5-ext/math/cbrt/is-implemented.js | 0 .../es5-ext/math/cbrt/shim.js | 0 .../es5-ext/math/clz32/implement.js | 0 .../es5-ext/math/clz32/index.js | 0 .../es5-ext/math/clz32/is-implemented.js | 0 .../es5-ext/math/clz32/shim.js | 0 .../es5-ext/math/cosh/implement.js | 0 .../es5-ext/math/cosh/index.js | 0 .../es5-ext/math/cosh/is-implemented.js | 0 .../es5-ext/math/cosh/shim.js | 0 .../es5-ext/math/expm1/implement.js | 0 .../es5-ext/math/expm1/index.js | 0 .../es5-ext/math/expm1/is-implemented.js | 0 .../es5-ext/math/expm1/shim.js | 0 .../es5-ext/math/fround/implement.js | 0 .../es5-ext/math/fround/index.js | 0 .../es5-ext/math/fround/is-implemented.js | 0 .../es5-ext/math/fround/shim.js | 0 .../es5-ext/math/hypot/implement.js | 0 .../es5-ext/math/hypot/index.js | 0 .../es5-ext/math/hypot/is-implemented.js | 0 .../es5-ext/math/hypot/shim.js | 0 .../es5-ext/math/imul/implement.js | 0 .../es5-ext/math/imul/index.js | 0 .../es5-ext/math/imul/is-implemented.js | 0 .../es5-ext/math/imul/shim.js | 0 .../node_modules => }/es5-ext/math/index.js | 0 .../es5-ext/math/log10/implement.js | 0 .../es5-ext/math/log10/index.js | 0 .../es5-ext/math/log10/is-implemented.js | 0 .../es5-ext/math/log10/shim.js | 0 .../es5-ext/math/log1p/implement.js | 0 .../es5-ext/math/log1p/index.js | 0 .../es5-ext/math/log1p/is-implemented.js | 0 .../es5-ext/math/log1p/shim.js | 0 .../es5-ext/math/log2/implement.js | 0 .../es5-ext/math/log2/index.js | 0 .../es5-ext/math/log2/is-implemented.js | 0 .../es5-ext/math/log2/shim.js | 0 .../es5-ext/math/sign/implement.js | 0 .../es5-ext/math/sign/index.js | 0 .../es5-ext/math/sign/is-implemented.js | 0 .../es5-ext/math/sign/shim.js | 0 .../es5-ext/math/sinh/implement.js | 0 .../es5-ext/math/sinh/index.js | 0 .../es5-ext/math/sinh/is-implemented.js | 0 .../es5-ext/math/sinh/shim.js | 0 .../es5-ext/math/tanh/implement.js | 0 .../es5-ext/math/tanh/index.js | 0 .../es5-ext/math/tanh/is-implemented.js | 0 .../es5-ext/math/tanh/shim.js | 0 .../es5-ext/math/trunc/implement.js | 0 .../es5-ext/math/trunc/index.js | 0 .../es5-ext/math/trunc/is-implemented.js | 0 .../es5-ext/math/trunc/shim.js | 0 .../es5-ext/number/#/index.js | 0 .../node_modules => }/es5-ext/number/#/pad.js | 0 .../es5-ext/number/epsilon/implement.js | 0 .../es5-ext/number/epsilon/index.js | 0 .../es5-ext/number/epsilon/is-implemented.js | 0 .../node_modules/es5-ext/number/index.js | 17 + .../es5-ext/number/is-finite/implement.js | 0 .../es5-ext/number/is-finite/index.js | 0 .../number/is-finite/is-implemented.js | 0 .../es5-ext/number/is-finite/shim.js | 0 .../es5-ext/number/is-integer/implement.js | 0 .../es5-ext/number/is-integer/index.js | 0 .../number/is-integer/is-implemented.js | 0 .../es5-ext/number/is-integer/shim.js | 0 .../es5-ext/number/is-nan/implement.js | 0 .../es5-ext/number/is-nan/index.js | 0 .../es5-ext/number/is-nan/is-implemented.js | 0 .../es5-ext/number/is-nan/shim.js | 0 .../node_modules/es5-ext/number/is-natural.js | 5 + .../es5-ext/number/is-number.js | 0 .../number/is-safe-integer/implement.js | 0 .../es5-ext/number/is-safe-integer/index.js | 0 .../number/is-safe-integer/is-implemented.js | 0 .../es5-ext/number/is-safe-integer/shim.js | 0 .../number/max-safe-integer/implement.js | 0 .../es5-ext/number/max-safe-integer/index.js | 0 .../number/max-safe-integer/is-implemented.js | 0 .../number/min-safe-integer/implement.js | 0 .../es5-ext/number/min-safe-integer/index.js | 0 .../number/min-safe-integer/is-implemented.js | 0 .../es5-ext/number/to-integer.js | 0 .../es5-ext/number/to-pos-integer.js | 0 .../es5-ext/number/to-uint32.js | 0 .../node_modules/es5-ext/object/_iterate.js | 29 + .../es5-ext/object/assign/implement.js | 0 .../es5-ext/object/assign/index.js | 0 .../es5-ext/object/assign/is-implemented.js | 0 .../es5-ext/object/assign/shim.js | 0 .../node_modules => }/es5-ext/object/clear.js | 0 .../es5-ext/object/compact.js | 0 .../es5-ext/object/compare.js | 0 .../node_modules/es5-ext/object/copy-deep.js | 38 + .../node_modules => }/es5-ext/object/copy.js | 0 .../node_modules => }/es5-ext/object/count.js | 0 .../es5-ext/object/create.js | 0 .../object/ensure-natural-number-value.js | 8 + .../es5-ext/object/ensure-natural-number.js | 9 + .../node_modules => }/es5-ext/object/eq.js | 0 .../node_modules => }/es5-ext/object/every.js | 0 .../es5-ext/object/filter.js | 0 .../node_modules/es5-ext/object/find-key.js | 3 + .../node_modules/es5-ext/object/find.js | 8 + .../es5-ext/object/first-key.js | 0 .../es5-ext/object/flatten.js | 0 .../es5-ext/object/for-each.js | 0 .../es5-ext/object/get-property-names.js | 0 .../node_modules/es5-ext/object/index.js | 53 + .../es5-ext/object/is-array-like.js | 0 .../es5-ext/object/is-callable.js | 0 .../es5-ext/object/is-copy-deep.js | 0 .../es5-ext/object/is-copy.js | 0 .../es5-ext/object/is-empty.js | 0 .../es5-ext/object/is-number-value.js | 3 + .../es5-ext/object/is-object.js | 0 .../es5-ext/object/is-plain-object.js | 0 .../node_modules => }/es5-ext/object/is.js | 0 .../es5-ext/object/key-of.js | 0 .../es5-ext/object/keys/implement.js | 0 .../es5-ext/object/keys/index.js | 0 .../es5-ext/object/keys/is-implemented.js | 0 .../es5-ext/object/keys/shim.js | 0 .../es5-ext/object/map-keys.js | 0 .../node_modules => }/es5-ext/object/map.js | 0 .../es5-ext/object/mixin-prototypes.js | 0 .../node_modules => }/es5-ext/object/mixin.js | 0 .../es5-ext/object/normalize-options.js | 0 .../es5-ext/object/primitive-set.js | 0 .../es5-ext/object/safe-traverse.js | 0 .../es5-ext/object/serialize.js | 0 .../object/set-prototype-of/implement.js | 0 .../es5-ext/object/set-prototype-of/index.js | 0 .../object/set-prototype-of/is-implemented.js | 0 .../es5-ext/object/set-prototype-of/shim.js | 0 .../node_modules => }/es5-ext/object/some.js | 0 .../es5-ext/object/to-array.js | 0 .../es5-ext/object/unserialize.js | 0 .../es5-ext/object/valid-callable.js | 0 .../es5-ext/object/valid-object.js | 0 .../es5-ext/object/valid-value.js | 0 .../object/validate-array-like-object.js | 0 .../es5-ext/object/validate-array-like.js | 0 .../object/validate-stringifiable-value.js | 0 .../es5-ext/object/validate-stringifiable.js | 0 .../eslint/node_modules/es5-ext/package.json | 105 + .../es5-ext/reg-exp/#/index.js | 0 .../es5-ext/reg-exp/#/is-sticky.js | 0 .../es5-ext/reg-exp/#/is-unicode.js | 0 .../es5-ext/reg-exp/#/match/implement.js | 0 .../es5-ext/reg-exp/#/match/index.js | 0 .../es5-ext/reg-exp/#/match/is-implemented.js | 0 .../es5-ext/reg-exp/#/match/shim.js | 0 .../es5-ext/reg-exp/#/replace/implement.js | 0 .../es5-ext/reg-exp/#/replace/index.js | 0 .../reg-exp/#/replace/is-implemented.js | 0 .../es5-ext/reg-exp/#/replace/shim.js | 0 .../es5-ext/reg-exp/#/search/implement.js | 0 .../es5-ext/reg-exp/#/search/index.js | 0 .../reg-exp/#/search/is-implemented.js | 0 .../es5-ext/reg-exp/#/search/shim.js | 0 .../es5-ext/reg-exp/#/split/implement.js | 0 .../es5-ext/reg-exp/#/split/index.js | 0 .../es5-ext/reg-exp/#/split/is-implemented.js | 0 .../es5-ext/reg-exp/#/split/shim.js | 0 .../es5-ext/reg-exp/#/sticky/implement.js | 0 .../reg-exp/#/sticky/is-implemented.js | 10 + .../es5-ext/reg-exp/#/unicode/implement.js | 0 .../reg-exp/#/unicode/is-implemented.js | 10 + .../es5-ext/reg-exp/escape.js | 0 .../es5-ext/reg-exp/index.js | 0 .../es5-ext/reg-exp/is-reg-exp.js | 0 .../es5-ext/reg-exp/valid-reg-exp.js | 0 .../es5-ext/string/#/@@iterator/implement.js | 0 .../es5-ext/string/#/@@iterator/index.js | 0 .../string/#/@@iterator/is-implemented.js | 0 .../es5-ext/string/#/@@iterator/shim.js | 0 .../node_modules => }/es5-ext/string/#/at.js | 0 .../es5-ext/string/#/camel-to-hyphen.js | 0 .../es5-ext/string/#/capitalize.js | 0 .../string/#/case-insensitive-compare.js | 0 .../string/#/code-point-at/implement.js | 0 .../es5-ext/string/#/code-point-at/index.js | 0 .../string/#/code-point-at/is-implemented.js | 0 .../es5-ext/string/#/code-point-at/shim.js | 0 .../es5-ext/string/#/contains/implement.js | 0 .../es5-ext/string/#/contains/index.js | 0 .../string/#/contains/is-implemented.js | 0 .../es5-ext/string/#/contains/shim.js | 0 .../es5-ext/string/#/ends-with/implement.js | 0 .../es5-ext/string/#/ends-with/index.js | 0 .../string/#/ends-with/is-implemented.js | 0 .../es5-ext/string/#/ends-with/shim.js | 0 .../es5-ext/string/#/hyphen-to-camel.js | 0 .../es5-ext/string/#/indent.js | 0 .../node_modules/es5-ext/string/#/index.js | 22 + .../es5-ext/string/#/last.js | 0 .../es5-ext/string/#/normalize/_data.js | 0 .../es5-ext/string/#/normalize/implement.js | 0 .../es5-ext/string/#/normalize/index.js | 0 .../string/#/normalize/is-implemented.js | 0 .../es5-ext/string/#/normalize/shim.js | 0 .../node_modules => }/es5-ext/string/#/pad.js | 0 .../es5-ext/string/#/plain-replace-all.js | 0 .../es5-ext/string/#/plain-replace.js | 0 .../es5-ext/string/#/repeat/implement.js | 0 .../es5-ext/string/#/repeat/index.js | 0 .../es5-ext/string/#/repeat/is-implemented.js | 0 .../es5-ext/string/#/repeat/shim.js | 0 .../es5-ext/string/#/starts-with/implement.js | 0 .../es5-ext/string/#/starts-with/index.js | 0 .../string/#/starts-with/is-implemented.js | 0 .../es5-ext/string/#/starts-with/shim.js | 0 .../es5-ext/string/#/uncapitalize.js | 8 + .../es5-ext/string/format-method.js | 0 .../string/from-code-point/implement.js | 0 .../es5-ext/string/from-code-point/index.js | 0 .../string/from-code-point/is-implemented.js | 0 .../es5-ext/string/from-code-point/shim.js | 0 .../node_modules => }/es5-ext/string/index.js | 0 .../es5-ext/string/is-string.js | 0 .../es5-ext/string/random-uniq.js | 0 .../es5-ext/string/raw/implement.js | 0 .../es5-ext/string/raw/index.js | 0 .../es5-ext/string/raw/is-implemented.js | 0 .../es5-ext/string/raw/shim.js | 0 .../node_modules => }/es6-iterator/#/chain.js | 0 .../node_modules => }/es6-iterator/.lint | 0 .../es6-symbol => es6-iterator}/LICENSE | 0 .../node_modules/es6-iterator/README.md | 148 + .../node_modules => }/es6-iterator/array.js | 0 .../node_modules/es6-iterator/for-of.js | 46 + tools/eslint/node_modules/es6-iterator/get.js | 15 + .../node_modules => }/es6-iterator/index.js | 0 .../node_modules/es6-iterator/is-iterable.js | 15 + .../node_modules/es6-iterator/package.json | 94 + .../node_modules => }/es6-iterator/string.js | 0 .../es6-iterator/valid-iterable.js | 0 tools/eslint/node_modules/es6-map/.lint | 13 + .../d/LICENCE => es6-map/LICENSE} | 0 tools/eslint/node_modules/es6-map/README.md | 75 + .../node_modules => }/es6-map/implement.js | 0 .../node_modules => }/es6-map/index.js | 0 .../node_modules/es6-map/is-implemented.js | 32 + tools/eslint/node_modules/es6-map/is-map.js | 12 + .../es6-map/is-native-implemented.js | 9 + .../es6-map/lib/iterator-kinds.js | 0 .../node_modules => }/es6-map/lib/iterator.js | 0 .../es6-map/lib/primitive-iterator.js | 0 .../eslint/node_modules/es6-map/package.json | 97 + tools/eslint/node_modules/es6-map/polyfill.js | 104 + .../node_modules/es6-map/primitive/index.js | 117 + .../node_modules => }/es6-map/valid-map.js | 0 tools/eslint/node_modules/es6-set/.lint | 13 + .../es6-set/LICENCE => es6-set/LICENSE} | 0 .../node_modules => }/es6-set/README.md | 0 .../node_modules => }/es6-set/ext/copy.js | 0 .../node_modules => }/es6-set/ext/every.js | 0 .../eslint/node_modules/es6-set/ext/filter.js | 18 + .../es6-set/ext/get-first.js | 0 .../node_modules => }/es6-set/ext/get-last.js | 0 .../node_modules => }/es6-set/ext/some.js | 0 .../node_modules => }/es6-set/implement.js | 0 .../node_modules => }/es6-set/index.js | 0 .../node_modules/es6-set/is-implemented.js | 24 + .../es6-set/is-native-implemented.js | 0 tools/eslint/node_modules/es6-set/is-set.js | 12 + .../node_modules/es6-set/lib/iterator.js | 30 + .../es6-set/lib/primitive-iterator.js | 0 .../eslint/node_modules/es6-set/package.json | 92 + tools/eslint/node_modules/es6-set/polyfill.js | 78 + .../node_modules/es6-set/primitive/index.js | 87 + .../node_modules => }/es6-set/valid-set.js | 0 tools/eslint/node_modules/es6-symbol/.lint | 15 + .../es6-iterator => es6-symbol}/LICENSE | 0 .../eslint/node_modules/es6-symbol/README.md | 71 + .../node_modules => }/es6-symbol/implement.js | 0 .../node_modules => }/es6-symbol/index.js | 0 .../es6-symbol/is-implemented.js | 0 .../es6-symbol/is-native-implemented.js | 0 .../node_modules => }/es6-symbol/is-symbol.js | 0 .../node_modules/es6-symbol/package.json | 95 + .../node_modules/es6-symbol/polyfill.js | 107 + .../es6-symbol/validate-symbol.js | 0 tools/eslint/node_modules/es6-weak-map/.lint | 13 + .../LICENCE => es6-weak-map/LICENSE} | 0 .../node_modules/es6-weak-map/README.md | 63 + .../es6-weak-map/implement.js | 0 .../eslint/node_modules/es6-weak-map/index.js | 3 + .../es6-weak-map/is-implemented.js | 20 + .../es6-weak-map/is-native-implemented.js | 8 + .../es6-weak-map/is-weak-map.js | 0 .../node_modules/es6-weak-map/package.json | 94 + .../node_modules/es6-weak-map/polyfill.js | 66 + .../es6-weak-map/valid-weak-map.js | 0 .../escape-string-regexp/index.js | 2 +- .../escape-string-regexp/package.json | 129 +- .../escape-string-regexp/readme.md | 8 +- tools/eslint/node_modules/escope/.jshintrc | 20 - .../node_modules/escope/CONTRIBUTING.md | 5 - tools/eslint/node_modules/escope/README.md | 50 +- tools/eslint/node_modules/escope/bower.json | 13 - tools/eslint/node_modules/escope/gulpfile.js | 147 - .../node_modules/escope/lib/definition.js | 2 +- tools/eslint/node_modules/escope/lib/index.js | 2 +- .../escope/lib/pattern-visitor.js | 169 + .../node_modules/escope/lib/reference.js | 2 +- .../node_modules/escope/lib/referencer.js | 159 +- .../node_modules/escope/lib/scope-manager.js | 22 +- tools/eslint/node_modules/escope/lib/scope.js | 30 +- .../node_modules/escope/lib/variable.js | 2 +- .../escope/node_modules/es6-map/.lint | 11 - .../escope/node_modules/es6-map/.npmignore | 4 - .../escope/node_modules/es6-map/.travis.yml | 11 - .../escope/node_modules/es6-map/CHANGES | 16 - .../escope/node_modules/es6-map/README.md | 75 - .../node_modules/es6-map/is-implemented.js | 30 - .../escope/node_modules/es6-map/is-map.js | 12 - .../es6-map/is-native-implemented.js | 9 - .../es6-map/node_modules/d/.npmignore | 4 - .../es6-map/node_modules/d/.travis.yml | 9 - .../es6-map/node_modules/d/CHANGES | 7 - .../es6-map/node_modules/d/package.json | 59 - .../es6-map/node_modules/d/test/auto-bind.js | 12 - .../es6-map/node_modules/d/test/index.js | 182 - .../es6-map/node_modules/d/test/lazy.js | 77 - .../es6-map/node_modules/es5-ext/.lintignore | 8 - .../es6-map/node_modules/es5-ext/.npmignore | 4 - .../es6-map/node_modules/es5-ext/.travis.yml | 15 - .../es6-map/node_modules/es5-ext/CHANGES | 611 - .../es6-map/node_modules/es5-ext/README.md | 993 -- .../es5-ext/array/#/for-each-right.js | 20 - .../es5-ext/array/#/some-right.js | 22 - .../es5-ext/node_modules/es6-symbol/.lint | 13 - .../node_modules/es6-symbol/.npmignore | 4 - .../node_modules/es6-symbol/.travis.yml | 9 - .../es5-ext/node_modules/es6-symbol/CHANGES | 34 - .../es5-ext/node_modules/es6-symbol/README.md | 71 - .../node_modules/es6-symbol/package.json | 63 - .../node_modules/es6-symbol/polyfill.js | 77 - .../node_modules/es6-symbol/test/implement.js | 3 - .../node_modules/es6-symbol/test/index.js | 12 - .../es6-symbol/test/is-implemented.js | 14 - .../es6-symbol/test/is-native-implemented.js | 3 - .../node_modules/es6-symbol/test/is-symbol.js | 16 - .../node_modules/es6-symbol/test/polyfill.js | 27 - .../es6-symbol/test/validate-symbol.js | 19 - .../node_modules/es5-ext/number/index.js | 16 - .../node_modules/es5-ext/object/_iterate.js | 29 - .../node_modules/es5-ext/object/copy-deep.js | 30 - .../node_modules/es5-ext/object/index.js | 48 - .../es6-map/node_modules/es5-ext/package.json | 74 - .../reg-exp/#/sticky/is-implemented.js | 5 - .../reg-exp/#/unicode/is-implemented.js | 5 - .../node_modules/es5-ext/string/#/index.js | 21 - .../node_modules/es5-ext/test/__tad.js | 3 - .../test/array/#/@@iterator/implement.js | 5 - .../es5-ext/test/array/#/@@iterator/index.js | 3 - .../test/array/#/@@iterator/is-implemented.js | 3 - .../es5-ext/test/array/#/@@iterator/shim.js | 9 - .../test/array/#/_compare-by-length.js | 7 - .../es5-ext/test/array/#/binary-search.js | 15 - .../es5-ext/test/array/#/clear.js | 7 - .../es5-ext/test/array/#/compact.js | 17 - .../es5-ext/test/array/#/concat/implement.js | 5 - .../es5-ext/test/array/#/concat/index.js | 3 - .../test/array/#/concat/is-implemented.js | 3 - .../es5-ext/test/array/#/concat/shim.js | 26 - .../es5-ext/test/array/#/contains.js | 21 - .../test/array/#/copy-within/implement.js | 5 - .../es5-ext/test/array/#/copy-within/index.js | 3 - .../array/#/copy-within/is-implemented.js | 3 - .../es5-ext/test/array/#/copy-within/shim.js | 29 - .../node_modules/es5-ext/test/array/#/diff.js | 17 - .../es5-ext/test/array/#/e-index-of.js | 13 - .../es5-ext/test/array/#/e-last-index-of.js | 12 - .../es5-ext/test/array/#/entries/implement.js | 5 - .../es5-ext/test/array/#/entries/index.js | 3 - .../test/array/#/entries/is-implemented.js | 3 - .../es5-ext/test/array/#/entries/shim.js | 9 - .../es5-ext/test/array/#/exclusion.js | 15 - .../es5-ext/test/array/#/fill/implement.js | 5 - .../es5-ext/test/array/#/fill/index.js | 3 - .../test/array/#/fill/is-implemented.js | 3 - .../es5-ext/test/array/#/fill/shim.js | 18 - .../es5-ext/test/array/#/filter/implement.js | 5 - .../es5-ext/test/array/#/filter/index.js | 3 - .../test/array/#/filter/is-implemented.js | 3 - .../es5-ext/test/array/#/filter/shim.js | 17 - .../test/array/#/find-index/implement.js | 5 - .../es5-ext/test/array/#/find-index/index.js | 3 - .../test/array/#/find-index/is-implemented.js | 3 - .../es5-ext/test/array/#/find-index/shim.js | 17 - .../es5-ext/test/array/#/find/implement.js | 5 - .../es5-ext/test/array/#/find/index.js | 3 - .../test/array/#/find/is-implemented.js | 3 - .../es5-ext/test/array/#/find/shim.js | 17 - .../es5-ext/test/array/#/first-index.js | 17 - .../es5-ext/test/array/#/first.js | 13 - .../es5-ext/test/array/#/flatten.js | 12 - .../es5-ext/test/array/#/for-each-right.js | 36 - .../es5-ext/test/array/#/group.js | 24 - .../es5-ext/test/array/#/indexes-of.js | 14 - .../es5-ext/test/array/#/intersection.js | 24 - .../es5-ext/test/array/#/is-copy.js | 13 - .../es5-ext/test/array/#/is-uniq.js | 11 - .../es5-ext/test/array/#/keys/implement.js | 5 - .../es5-ext/test/array/#/keys/index.js | 3 - .../test/array/#/keys/is-implemented.js | 3 - .../es5-ext/test/array/#/keys/shim.js | 9 - .../es5-ext/test/array/#/last-index.js | 17 - .../node_modules/es5-ext/test/array/#/last.js | 15 - .../es5-ext/test/array/#/map/implement.js | 5 - .../es5-ext/test/array/#/map/index.js | 3 - .../test/array/#/map/is-implemented.js | 3 - .../es5-ext/test/array/#/map/shim.js | 19 - .../es5-ext/test/array/#/remove.js | 14 - .../es5-ext/test/array/#/separate.js | 15 - .../es5-ext/test/array/#/slice/implement.js | 5 - .../es5-ext/test/array/#/slice/index.js | 3 - .../test/array/#/slice/is-implemented.js | 3 - .../es5-ext/test/array/#/slice/shim.js | 17 - .../es5-ext/test/array/#/some-right.js | 43 - .../es5-ext/test/array/#/splice/implement.js | 5 - .../es5-ext/test/array/#/splice/index.js | 3 - .../test/array/#/splice/is-implemented.js | 3 - .../es5-ext/test/array/#/splice/shim.js | 19 - .../node_modules/es5-ext/test/array/#/uniq.js | 14 - .../es5-ext/test/array/#/values/implement.js | 5 - .../es5-ext/test/array/#/values/index.js | 3 - .../test/array/#/values/is-implemented.js | 3 - .../es5-ext/test/array/#/values/shim.js | 9 - .../es5-ext/test/array/__scopes.js | 9 - .../es5-ext/test/array/_is-extensible.js | 5 - .../test/array/_sub-array-dummy-safe.js | 7 - .../es5-ext/test/array/_sub-array-dummy.js | 7 - .../es5-ext/test/array/from/implement.js | 5 - .../es5-ext/test/array/from/index.js | 3 - .../es5-ext/test/array/from/is-implemented.js | 3 - .../es5-ext/test/array/from/shim.js | 60 - .../es5-ext/test/array/generate.js | 10 - .../es5-ext/test/array/is-plain-array.js | 18 - .../es5-ext/test/array/of/implement.js | 5 - .../es5-ext/test/array/of/index.js | 3 - .../es5-ext/test/array/of/is-implemented.js | 3 - .../es5-ext/test/array/of/shim.js | 68 - .../es5-ext/test/array/to-array.js | 13 - .../es5-ext/test/array/valid-array.js | 14 - .../es5-ext/test/boolean/is-boolean.js | 12 - .../node_modules/es5-ext/test/date/#/copy.js | 10 - .../es5-ext/test/date/#/days-in-month.js | 17 - .../es5-ext/test/date/#/floor-day.js | 6 - .../es5-ext/test/date/#/floor-month.js | 6 - .../es5-ext/test/date/#/floor-year.js | 6 - .../es5-ext/test/date/#/format.js | 6 - .../node_modules/es5-ext/test/date/is-date.js | 10 - .../es5-ext/test/date/valid-date.js | 12 - .../es5-ext/test/error/#/throw.js | 10 - .../node_modules/es5-ext/test/error/custom.js | 12 - .../es5-ext/test/error/is-error.js | 16 - .../es5-ext/test/error/valid-error.js | 9 - .../es5-ext/test/function/#/compose.js | 9 - .../es5-ext/test/function/#/copy.js | 19 - .../es5-ext/test/function/#/curry.js | 18 - .../es5-ext/test/function/#/lock.js | 7 - .../es5-ext/test/function/#/not.js | 11 - .../es5-ext/test/function/#/partial.js | 9 - .../es5-ext/test/function/#/spread.js | 8 - .../test/function/#/to-string-tokens.js | 12 - .../es5-ext/test/function/_define-length.js | 12 - .../es5-ext/test/function/constant.js | 7 - .../es5-ext/test/function/identity.js | 7 - .../es5-ext/test/function/invoke.js | 9 - .../es5-ext/test/function/is-arguments.js | 11 - .../es5-ext/test/function/is-function.js | 8 - .../es5-ext/test/function/noop.js | 5 - .../es5-ext/test/function/pluck.js | 7 - .../es5-ext/test/function/valid-function.js | 17 - .../node_modules/es5-ext/test/global.js | 5 - .../es5-ext/test/iterable/for-each.js | 40 - .../node_modules/es5-ext/test/iterable/is.js | 20 - .../es5-ext/test/iterable/validate-object.js | 20 - .../es5-ext/test/iterable/validate.js | 20 - .../es5-ext/test/math/_pack-ieee754.js | 5 - .../es5-ext/test/math/_unpack-ieee754.js | 5 - .../es5-ext/test/math/acosh/implement.js | 5 - .../es5-ext/test/math/acosh/index.js | 3 - .../es5-ext/test/math/acosh/is-implemented.js | 3 - .../es5-ext/test/math/acosh/shim.js | 11 - .../es5-ext/test/math/asinh/implement.js | 5 - .../es5-ext/test/math/asinh/index.js | 3 - .../es5-ext/test/math/asinh/is-implemented.js | 3 - .../es5-ext/test/math/asinh/shim.js | 10 - .../es5-ext/test/math/atanh/implement.js | 5 - .../es5-ext/test/math/atanh/index.js | 3 - .../es5-ext/test/math/atanh/is-implemented.js | 3 - .../es5-ext/test/math/atanh/shim.js | 11 - .../es5-ext/test/math/cbrt/implement.js | 5 - .../es5-ext/test/math/cbrt/index.js | 3 - .../es5-ext/test/math/cbrt/is-implemented.js | 3 - .../es5-ext/test/math/cbrt/shim.js | 11 - .../es5-ext/test/math/clz32/implement.js | 5 - .../es5-ext/test/math/clz32/index.js | 3 - .../es5-ext/test/math/clz32/is-implemented.js | 3 - .../es5-ext/test/math/clz32/shim.js | 12 - .../es5-ext/test/math/cosh/implement.js | 5 - .../es5-ext/test/math/cosh/index.js | 3 - .../es5-ext/test/math/cosh/is-implemented.js | 3 - .../es5-ext/test/math/cosh/shim.js | 13 - .../es5-ext/test/math/expm1/implement.js | 5 - .../es5-ext/test/math/expm1/index.js | 3 - .../es5-ext/test/math/expm1/is-implemented.js | 3 - .../es5-ext/test/math/expm1/shim.js | 9 - .../es5-ext/test/math/fround/implement.js | 5 - .../es5-ext/test/math/fround/index.js | 3 - .../test/math/fround/is-implemented.js | 3 - .../es5-ext/test/math/fround/shim.js | 9 - .../es5-ext/test/math/hypot/implement.js | 5 - .../es5-ext/test/math/hypot/index.js | 3 - .../es5-ext/test/math/hypot/is-implemented.js | 3 - .../es5-ext/test/math/hypot/shim.js | 11 - .../es5-ext/test/math/imul/implement.js | 5 - .../es5-ext/test/math/imul/index.js | 3 - .../es5-ext/test/math/imul/is-implemented.js | 3 - .../es5-ext/test/math/imul/shim.js | 9 - .../es5-ext/test/math/log10/implement.js | 5 - .../es5-ext/test/math/log10/index.js | 3 - .../es5-ext/test/math/log10/is-implemented.js | 3 - .../es5-ext/test/math/log10/shim.js | 10 - .../es5-ext/test/math/log1p/implement.js | 5 - .../es5-ext/test/math/log1p/index.js | 3 - .../es5-ext/test/math/log1p/is-implemented.js | 3 - .../es5-ext/test/math/log1p/shim.js | 10 - .../es5-ext/test/math/log2/implement.js | 5 - .../es5-ext/test/math/log2/index.js | 3 - .../es5-ext/test/math/log2/is-implemented.js | 3 - .../es5-ext/test/math/log2/shim.js | 10 - .../es5-ext/test/math/sign/implement.js | 5 - .../es5-ext/test/math/sign/index.js | 3 - .../es5-ext/test/math/sign/is-implemented.js | 3 - .../es5-ext/test/math/sign/shim.js | 11 - .../es5-ext/test/math/sinh/implement.js | 5 - .../es5-ext/test/math/sinh/index.js | 3 - .../es5-ext/test/math/sinh/is-implemented.js | 3 - .../es5-ext/test/math/sinh/shim.js | 13 - .../es5-ext/test/math/tanh/implement.js | 5 - .../es5-ext/test/math/tanh/index.js | 3 - .../es5-ext/test/math/tanh/is-implemented.js | 3 - .../es5-ext/test/math/tanh/shim.js | 11 - .../es5-ext/test/math/trunc/implement.js | 5 - .../es5-ext/test/math/trunc/index.js | 3 - .../es5-ext/test/math/trunc/is-implemented.js | 3 - .../es5-ext/test/math/trunc/shim.js | 16 - .../node_modules/es5-ext/test/number/#/pad.js | 7 - .../es5-ext/test/number/epsilon/implement.js | 5 - .../es5-ext/test/number/epsilon/index.js | 5 - .../test/number/epsilon/is-implemented.js | 3 - .../test/number/is-finite/implement.js | 5 - .../es5-ext/test/number/is-finite/index.js | 3 - .../test/number/is-finite/is-implemented.js | 3 - .../es5-ext/test/number/is-finite/shim.js | 8 - .../test/number/is-integer/implement.js | 5 - .../es5-ext/test/number/is-integer/index.js | 3 - .../test/number/is-integer/is-implemented.js | 3 - .../es5-ext/test/number/is-integer/shim.js | 9 - .../es5-ext/test/number/is-nan/implement.js | 5 - .../es5-ext/test/number/is-nan/index.js | 3 - .../test/number/is-nan/is-implemented.js | 3 - .../es5-ext/test/number/is-nan/shim.js | 7 - .../es5-ext/test/number/is-number.js | 13 - .../test/number/is-safe-integer/implement.js | 5 - .../test/number/is-safe-integer/index.js | 3 - .../number/is-safe-integer/is-implemented.js | 3 - .../test/number/is-safe-integer/shim.js | 11 - .../test/number/max-safe-integer/implement.js | 5 - .../test/number/max-safe-integer/index.js | 5 - .../number/max-safe-integer/is-implemented.js | 3 - .../test/number/min-safe-integer/implement.js | 5 - .../test/number/min-safe-integer/index.js | 5 - .../number/min-safe-integer/is-implemented.js | 3 - .../es5-ext/test/number/to-integer.js | 10 - .../es5-ext/test/number/to-pos-integer.js | 10 - .../es5-ext/test/number/to-uint32.js | 8 - .../es5-ext/test/object/_iterate.js | 30 - .../es5-ext/test/object/assign/implement.js | 5 - .../es5-ext/test/object/assign/index.js | 3 - .../test/object/assign/is-implemented.js | 3 - .../es5-ext/test/object/assign/shim.js | 11 - .../node_modules/es5-ext/test/object/clear.js | 13 - .../es5-ext/test/object/compact.js | 14 - .../es5-ext/test/object/compare.js | 13 - .../es5-ext/test/object/copy-deep.js | 24 - .../node_modules/es5-ext/test/object/copy.js | 19 - .../node_modules/es5-ext/test/object/count.js | 11 - .../es5-ext/test/object/create.js | 22 - .../node_modules/es5-ext/test/object/eq.js | 12 - .../node_modules/es5-ext/test/object/every.js | 21 - .../es5-ext/test/object/filter.js | 6 - .../es5-ext/test/object/first-key.js | 13 - .../es5-ext/test/object/flatten.js | 6 - .../es5-ext/test/object/for-each.js | 10 - .../es5-ext/test/object/get-property-names.js | 18 - .../es5-ext/test/object/is-array-like.js | 14 - .../es5-ext/test/object/is-callable.js | 8 - .../es5-ext/test/object/is-copy-deep.js | 46 - .../es5-ext/test/object/is-copy.js | 18 - .../es5-ext/test/object/is-empty.js | 6 - .../es5-ext/test/object/is-object.js | 13 - .../es5-ext/test/object/is-plain-object.js | 18 - .../node_modules/es5-ext/test/object/is.js | 12 - .../es5-ext/test/object/key-of.js | 12 - .../es5-ext/test/object/keys/implement.js | 5 - .../es5-ext/test/object/keys/index.js | 3 - .../test/object/keys/is-implemented.js | 3 - .../es5-ext/test/object/keys/shim.js | 8 - .../es5-ext/test/object/map-keys.js | 7 - .../node_modules/es5-ext/test/object/map.js | 9 - .../es5-ext/test/object/mixin-prototypes.js | 67 - .../node_modules/es5-ext/test/object/mixin.js | 69 - .../es5-ext/test/object/normalize-options.js | 32 - .../es5-ext/test/object/primitive-set.js | 15 - .../es5-ext/test/object/safe-traverse.js | 15 - .../es5-ext/test/object/serialize.js | 25 - .../test/object/set-prototype-of/implement.js | 6 - .../test/object/set-prototype-of/index.js | 23 - .../object/set-prototype-of/is-implemented.js | 3 - .../test/object/set-prototype-of/shim.js | 23 - .../node_modules/es5-ext/test/object/some.js | 23 - .../es5-ext/test/object/to-array.js | 15 - .../es5-ext/test/object/unserialize.js | 24 - .../es5-ext/test/object/valid-callable.js | 9 - .../es5-ext/test/object/valid-object.js | 15 - .../es5-ext/test/object/valid-value.js | 19 - .../test/object/validate-array-like-object.js | 15 - .../test/object/validate-array-like.js | 15 - .../object/validate-stringifiable-value.js | 16 - .../test/object/validate-stringifiable.js | 16 - .../es5-ext/test/reg-exp/#/index.js | 12 - .../es5-ext/test/reg-exp/#/is-sticky.js | 10 - .../es5-ext/test/reg-exp/#/is-unicode.js | 10 - .../es5-ext/test/reg-exp/#/match/implement.js | 5 - .../es5-ext/test/reg-exp/#/match/index.js | 3 - .../test/reg-exp/#/match/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/match/shim.js | 8 - .../test/reg-exp/#/replace/implement.js | 5 - .../es5-ext/test/reg-exp/#/replace/index.js | 3 - .../test/reg-exp/#/replace/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/replace/shim.js | 5 - .../test/reg-exp/#/search/implement.js | 5 - .../es5-ext/test/reg-exp/#/search/index.js | 3 - .../test/reg-exp/#/search/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/search/shim.js | 5 - .../es5-ext/test/reg-exp/#/split/implement.js | 5 - .../es5-ext/test/reg-exp/#/split/index.js | 3 - .../test/reg-exp/#/split/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/split/shim.js | 5 - .../test/reg-exp/#/sticky/implement.js | 5 - .../test/reg-exp/#/sticky/is-implemented.js | 3 - .../test/reg-exp/#/unicode/implement.js | 5 - .../test/reg-exp/#/unicode/is-implemented.js | 3 - .../es5-ext/test/reg-exp/escape.js | 6 - .../es5-ext/test/reg-exp/is-reg-exp.js | 12 - .../es5-ext/test/reg-exp/valid-reg-exp.js | 17 - .../test/string/#/@@iterator/implement.js | 5 - .../es5-ext/test/string/#/@@iterator/index.js | 3 - .../string/#/@@iterator/is-implemented.js | 3 - .../es5-ext/test/string/#/@@iterator/shim.js | 9 - .../node_modules/es5-ext/test/string/#/at.js | 97 - .../es5-ext/test/string/#/camel-to-hyphen.js | 5 - .../es5-ext/test/string/#/capitalize.js | 9 - .../test/string/#/case-insensitive-compare.js | 7 - .../test/string/#/code-point-at/implement.js | 6 - .../test/string/#/code-point-at/index.js | 3 - .../string/#/code-point-at/is-implemented.js | 3 - .../test/string/#/code-point-at/shim.js | 81 - .../test/string/#/contains/implement.js | 5 - .../es5-ext/test/string/#/contains/index.js | 3 - .../test/string/#/contains/is-implemented.js | 3 - .../es5-ext/test/string/#/contains/shim.js | 14 - .../test/string/#/ends-with/implement.js | 5 - .../es5-ext/test/string/#/ends-with/index.js | 3 - .../test/string/#/ends-with/is-implemented.js | 3 - .../es5-ext/test/string/#/ends-with/shim.js | 16 - .../es5-ext/test/string/#/hyphen-to-camel.js | 5 - .../es5-ext/test/string/#/indent.js | 9 - .../es5-ext/test/string/#/last.js | 6 - .../es5-ext/test/string/#/normalize/_data.js | 3 - .../test/string/#/normalize/implement.js | 5 - .../es5-ext/test/string/#/normalize/index.js | 3 - .../test/string/#/normalize/is-implemented.js | 3 - .../es5-ext/test/string/#/normalize/shim.js | 13 - .../node_modules/es5-ext/test/string/#/pad.js | 24 - .../test/string/#/plain-replace-all.js | 11 - .../es5-ext/test/string/#/plain-replace.js | 7 - .../es5-ext/test/string/#/repeat/implement.js | 5 - .../es5-ext/test/string/#/repeat/index.js | 3 - .../test/string/#/repeat/is-implemented.js | 3 - .../es5-ext/test/string/#/repeat/shim.js | 8 - .../test/string/#/starts-with/implement.js | 5 - .../test/string/#/starts-with/index.js | 3 - .../string/#/starts-with/is-implemented.js | 3 - .../es5-ext/test/string/#/starts-with/shim.js | 14 - .../es5-ext/test/string/format-method.js | 7 - .../test/string/from-code-point/implement.js | 5 - .../test/string/from-code-point/index.js | 3 - .../string/from-code-point/is-implemented.js | 3 - .../test/string/from-code-point/shim.js | 47 - .../es5-ext/test/string/is-string.js | 11 - .../es5-ext/test/string/random-uniq.js | 14 - .../es5-ext/test/string/raw/implement.js | 5 - .../es5-ext/test/string/raw/index.js | 3 - .../es5-ext/test/string/raw/is-implemented.js | 3 - .../es5-ext/test/string/raw/shim.js | 15 - .../node_modules/es6-iterator/.npmignore | 4 - .../node_modules/es6-iterator/.travis.yml | 11 - .../es6-map/node_modules/es6-iterator/CHANGES | 28 - .../node_modules/es6-iterator/README.md | 148 - .../node_modules/es6-iterator/for-of.js | 44 - .../es6-map/node_modules/es6-iterator/get.js | 13 - .../node_modules/es6-iterator/is-iterable.js | 13 - .../node_modules/es6-symbol/.lint | 13 - .../node_modules/es6-symbol/.npmignore | 4 - .../node_modules/es6-symbol/.travis.yml | 9 - .../node_modules/es6-symbol/CHANGES | 34 - .../node_modules/es6-symbol/LICENSE | 19 - .../node_modules/es6-symbol/README.md | 71 - .../node_modules/es6-symbol/implement.js | 7 - .../node_modules/es6-symbol/index.js | 3 - .../node_modules/es6-symbol/is-implemented.js | 18 - .../es6-symbol/is-native-implemented.js | 8 - .../node_modules/es6-symbol/is-symbol.js | 5 - .../node_modules/es6-symbol/package.json | 63 - .../node_modules/es6-symbol/polyfill.js | 77 - .../node_modules/es6-symbol/test/implement.js | 3 - .../node_modules/es6-symbol/test/index.js | 12 - .../es6-symbol/test/is-implemented.js | 14 - .../es6-symbol/test/is-native-implemented.js | 3 - .../node_modules/es6-symbol/test/is-symbol.js | 16 - .../node_modules/es6-symbol/test/polyfill.js | 27 - .../es6-symbol/test/validate-symbol.js | 19 - .../es6-symbol/validate-symbol.js | 8 - .../node_modules/es6-iterator/package.json | 66 - .../node_modules/es6-iterator/test/#/chain.js | 23 - .../node_modules/es6-iterator/test/array.js | 67 - .../node_modules/es6-iterator/test/for-of.js | 35 - .../node_modules/es6-iterator/test/get.js | 16 - .../node_modules/es6-iterator/test/index.js | 99 - .../es6-iterator/test/is-iterable.js | 18 - .../node_modules/es6-iterator/test/string.js | 23 - .../es6-iterator/test/valid-iterable.js | 16 - .../es6-map/node_modules/es6-set/.lint | 11 - .../es6-map/node_modules/es6-set/.npmignore | 4 - .../es6-map/node_modules/es6-set/.travis.yml | 11 - .../es6-map/node_modules/es6-set/CHANGES | 18 - .../node_modules/es6-set/is-implemented.js | 22 - .../es6-map/node_modules/es6-set/is-set.js | 12 - .../node_modules/es6-set/lib/iterator.js | 31 - .../es6-map/node_modules/es6-set/package.json | 66 - .../es6-map/node_modules/es6-set/polyfill.js | 79 - .../node_modules/es6-set/primitive/index.js | 88 - .../node_modules/es6-set/test/ext/copy.js | 12 - .../node_modules/es6-set/test/ext/every.js | 9 - .../es6-set/test/ext/get-first.js | 12 - .../node_modules/es6-set/test/ext/get-last.js | 12 - .../node_modules/es6-set/test/ext/some.js | 10 - .../node_modules/es6-set/test/implement.js | 3 - .../node_modules/es6-set/test/index.js | 3 - .../es6-set/test/is-implemented.js | 14 - .../es6-set/test/is-native-implemented.js | 3 - .../node_modules/es6-set/test/is-set.js | 16 - .../node_modules/es6-set/test/lib/iterator.js | 13 - .../es6-set/test/lib/primitive-iterator.js | 113 - .../node_modules/es6-set/test/polyfill.js | 44 - .../es6-set/test/primitive/index.js | 44 - .../node_modules/es6-set/test/valid-set.js | 19 - .../es6-map/node_modules/es6-symbol/.lint | 13 - .../node_modules/es6-symbol/.npmignore | 4 - .../node_modules/es6-symbol/.travis.yml | 9 - .../es6-map/node_modules/es6-symbol/CHANGES | 12 - .../es6-map/node_modules/es6-symbol/README.md | 67 - .../node_modules/es6-symbol/implement.js | 7 - .../es6-map/node_modules/es6-symbol/index.js | 3 - .../node_modules/es6-symbol/is-implemented.js | 19 - .../es6-symbol/is-native-implemented.js | 8 - .../node_modules/es6-symbol/is-symbol.js | 12 - .../node_modules/es6-symbol/package.json | 59 - .../node_modules/es6-symbol/polyfill.js | 53 - .../node_modules/es6-symbol/test/implement.js | 3 - .../node_modules/es6-symbol/test/index.js | 12 - .../es6-symbol/test/is-implemented.js | 14 - .../es6-symbol/test/is-native-implemented.js | 3 - .../node_modules/es6-symbol/test/is-symbol.js | 16 - .../node_modules/es6-symbol/test/polyfill.js | 17 - .../es6-symbol/test/valid-iterable.js | 14 - .../es6-symbol/test/valid-symbol.js | 19 - .../node_modules/es6-symbol/valid-symbol.js | 8 - .../node_modules/event-emitter/.npmignore | 3 - .../node_modules/event-emitter/.travis.yml | 14 - .../node_modules/event-emitter/CHANGES | 66 - .../node_modules/event-emitter/README.md | 95 - .../event-emitter/benchmark/many-on.js | 83 - .../event-emitter/benchmark/single-on.js | 73 - .../node_modules/event-emitter/package.json | 64 - .../event-emitter/test/all-off.js | 48 - .../event-emitter/test/has-listeners.js | 42 - .../node_modules/event-emitter/test/index.js | 107 - .../node_modules/event-emitter/test/pipe.js | 53 - .../node_modules/event-emitter/test/unify.js | 123 - .../escope/node_modules/es6-map/package.json | 70 - .../escope/node_modules/es6-map/polyfill.js | 100 - .../node_modules/es6-map/primitive/index.js | 115 - .../node_modules/es6-map/test/implement.js | 3 - .../escope/node_modules/es6-map/test/index.js | 5 - .../es6-map/test/is-implemented.js | 14 - .../node_modules/es6-map/test/is-map.js | 16 - .../es6-map/test/is-native-implemented.js | 3 - .../es6-map/test/lib/iterator-kinds.js | 5 - .../node_modules/es6-map/test/lib/iterator.js | 13 - .../es6-map/test/lib/primitive-iterator.js | 130 - .../node_modules/es6-map/test/polyfill.js | 54 - .../es6-map/test/primitive/index.js | 53 - .../node_modules/es6-map/test/valid-map.js | 19 - .../escope/node_modules/es6-weak-map/.lint | 11 - .../node_modules/es6-weak-map/.npmignore | 4 - .../node_modules/es6-weak-map/.travis.yml | 10 - .../escope/node_modules/es6-weak-map/CHANGES | 24 - .../escope/node_modules/es6-weak-map/LICENCE | 19 - .../node_modules/es6-weak-map/README.md | 65 - .../escope/node_modules/es6-weak-map/index.js | 4 - .../es6-weak-map/is-implemented.js | 14 - .../es6-weak-map/is-native-implemented.js | 10 - .../es6-weak-map/node_modules/d/.lint | 12 - .../es6-weak-map/node_modules/d/.npmignore | 4 - .../es6-weak-map/node_modules/d/.travis.yml | 9 - .../es6-weak-map/node_modules/d/CHANGES | 7 - .../es6-weak-map/node_modules/d/LICENCE | 19 - .../es6-weak-map/node_modules/d/README.md | 108 - .../es6-weak-map/node_modules/d/auto-bind.js | 31 - .../es6-weak-map/node_modules/d/index.js | 63 - .../es6-weak-map/node_modules/d/lazy.js | 111 - .../es6-weak-map/node_modules/d/package.json | 59 - .../node_modules/d/test/auto-bind.js | 12 - .../es6-weak-map/node_modules/d/test/index.js | 182 - .../es6-weak-map/node_modules/d/test/lazy.js | 77 - .../es6-weak-map/node_modules/es5-ext/.lint | 38 - .../node_modules/es5-ext/.lintignore | 8 - .../node_modules/es5-ext/.npmignore | 4 - .../node_modules/es5-ext/.travis.yml | 15 - .../es6-weak-map/node_modules/es5-ext/CHANGES | 611 - .../es6-weak-map/node_modules/es5-ext/LICENSE | 19 - .../node_modules/es5-ext/README.md | 993 -- .../es5-ext/array/#/@@iterator/implement.js | 6 - .../es5-ext/array/#/@@iterator/index.js | 4 - .../array/#/@@iterator/is-implemented.js | 16 - .../es5-ext/array/#/@@iterator/shim.js | 3 - .../es5-ext/array/#/_compare-by-length.js | 9 - .../es5-ext/array/#/binary-search.js | 28 - .../node_modules/es5-ext/array/#/clear.js | 12 - .../node_modules/es5-ext/array/#/compact.js | 9 - .../es5-ext/array/#/concat/implement.js | 6 - .../es5-ext/array/#/concat/index.js | 4 - .../es5-ext/array/#/concat/is-implemented.js | 7 - .../es5-ext/array/#/concat/shim.js | 39 - .../node_modules/es5-ext/array/#/contains.js | 7 - .../es5-ext/array/#/copy-within/implement.js | 7 - .../es5-ext/array/#/copy-within/index.js | 4 - .../array/#/copy-within/is-implemented.js | 7 - .../es5-ext/array/#/copy-within/shim.js | 39 - .../node_modules/es5-ext/array/#/diff.js | 13 - .../es5-ext/array/#/e-index-of.js | 29 - .../es5-ext/array/#/e-last-index-of.js | 29 - .../es5-ext/array/#/entries/implement.js | 6 - .../es5-ext/array/#/entries/index.js | 4 - .../es5-ext/array/#/entries/is-implemented.js | 15 - .../es5-ext/array/#/entries/shim.js | 4 - .../node_modules/es5-ext/array/#/exclusion.js | 27 - .../es5-ext/array/#/fill/implement.js | 6 - .../es5-ext/array/#/fill/index.js | 4 - .../es5-ext/array/#/fill/is-implemented.js | 7 - .../node_modules/es5-ext/array/#/fill/shim.js | 21 - .../es5-ext/array/#/filter/implement.js | 6 - .../es5-ext/array/#/filter/index.js | 4 - .../es5-ext/array/#/filter/is-implemented.js | 9 - .../es5-ext/array/#/filter/shim.js | 22 - .../es5-ext/array/#/find-index/implement.js | 7 - .../es5-ext/array/#/find-index/index.js | 4 - .../array/#/find-index/is-implemented.js | 9 - .../es5-ext/array/#/find-index/shim.js | 20 - .../es5-ext/array/#/find/implement.js | 6 - .../es5-ext/array/#/find/index.js | 4 - .../es5-ext/array/#/find/is-implemented.js | 9 - .../node_modules/es5-ext/array/#/find/shim.js | 8 - .../es5-ext/array/#/first-index.js | 16 - .../node_modules/es5-ext/array/#/first.js | 9 - .../node_modules/es5-ext/array/#/flatten.js | 12 - .../es5-ext/array/#/for-each-right.js | 20 - .../node_modules/es5-ext/array/#/group.js | 23 - .../node_modules/es5-ext/array/#/index.js | 40 - .../es5-ext/array/#/indexes-of.js | 12 - .../es5-ext/array/#/intersection.js | 19 - .../node_modules/es5-ext/array/#/is-copy.js | 21 - .../node_modules/es5-ext/array/#/is-uniq.js | 12 - .../es5-ext/array/#/keys/implement.js | 6 - .../es5-ext/array/#/keys/index.js | 4 - .../es5-ext/array/#/keys/is-implemented.js | 14 - .../node_modules/es5-ext/array/#/keys/shim.js | 4 - .../es5-ext/array/#/last-index.js | 16 - .../node_modules/es5-ext/array/#/last.js | 9 - .../es5-ext/array/#/map/implement.js | 6 - .../node_modules/es5-ext/array/#/map/index.js | 4 - .../es5-ext/array/#/map/is-implemented.js | 8 - .../node_modules/es5-ext/array/#/map/shim.js | 21 - .../node_modules/es5-ext/array/#/remove.js | 12 - .../node_modules/es5-ext/array/#/separate.js | 10 - .../es5-ext/array/#/slice/implement.js | 6 - .../es5-ext/array/#/slice/index.js | 4 - .../es5-ext/array/#/slice/is-implemented.js | 7 - .../es5-ext/array/#/slice/shim.js | 35 - .../es5-ext/array/#/some-right.js | 22 - .../es5-ext/array/#/splice/implement.js | 6 - .../es5-ext/array/#/splice/index.js | 4 - .../es5-ext/array/#/splice/is-implemented.js | 7 - .../es5-ext/array/#/splice/shim.js | 14 - .../node_modules/es5-ext/array/#/uniq.js | 13 - .../es5-ext/array/#/values/implement.js | 6 - .../es5-ext/array/#/values/index.js | 3 - .../es5-ext/array/#/values/is-implemented.js | 14 - .../es5-ext/array/#/values/shim.js | 4 - .../es5-ext/array/_is-extensible.js | 13 - .../es5-ext/array/_sub-array-dummy-safe.js | 23 - .../es5-ext/array/_sub-array-dummy.js | 16 - .../es5-ext/array/from/implement.js | 6 - .../node_modules/es5-ext/array/from/index.js | 5 - .../es5-ext/array/from/is-implemented.js | 9 - .../node_modules/es5-ext/array/from/shim.js | 106 - .../node_modules/es5-ext/array/generate.js | 20 - .../node_modules/es5-ext/array/index.js | 11 - .../es5-ext/array/is-plain-array.js | 11 - .../es5-ext/array/of/implement.js | 6 - .../node_modules/es5-ext/array/of/index.js | 5 - .../es5-ext/array/of/is-implemented.js | 8 - .../node_modules/es5-ext/array/of/shim.js | 19 - .../node_modules/es5-ext/array/to-array.js | 9 - .../node_modules/es5-ext/array/valid-array.js | 8 - .../node_modules/es5-ext/boolean/index.js | 5 - .../es5-ext/boolean/is-boolean.js | 10 - .../node_modules/es5-ext/date/#/copy.js | 5 - .../es5-ext/date/#/days-in-month.js | 17 - .../node_modules/es5-ext/date/#/floor-day.js | 8 - .../es5-ext/date/#/floor-month.js | 8 - .../node_modules/es5-ext/date/#/floor-year.js | 8 - .../node_modules/es5-ext/date/#/format.js | 21 - .../node_modules/es5-ext/date/#/index.js | 10 - .../node_modules/es5-ext/date/index.js | 7 - .../node_modules/es5-ext/date/is-date.js | 9 - .../node_modules/es5-ext/date/valid-date.js | 8 - .../node_modules/es5-ext/error/#/index.js | 5 - .../node_modules/es5-ext/error/#/throw.js | 5 - .../node_modules/es5-ext/error/custom.js | 20 - .../node_modules/es5-ext/error/index.js | 8 - .../node_modules/es5-ext/error/is-error.js | 9 - .../node_modules/es5-ext/error/valid-error.js | 8 - .../es5-ext/function/#/compose.js | 20 - .../node_modules/es5-ext/function/#/copy.js | 15 - .../node_modules/es5-ext/function/#/curry.js | 24 - .../node_modules/es5-ext/function/#/index.js | 12 - .../node_modules/es5-ext/function/#/lock.js | 12 - .../node_modules/es5-ext/function/#/not.js | 14 - .../es5-ext/function/#/partial.js | 16 - .../node_modules/es5-ext/function/#/spread.js | 10 - .../es5-ext/function/#/to-string-tokens.js | 11 - .../es5-ext/function/_define-length.js | 44 - .../node_modules/es5-ext/function/constant.js | 5 - .../node_modules/es5-ext/function/identity.js | 3 - .../node_modules/es5-ext/function/index.js | 15 - .../node_modules/es5-ext/function/invoke.js | 15 - .../es5-ext/function/is-arguments.js | 7 - .../es5-ext/function/is-function.js | 9 - .../node_modules/es5-ext/function/noop.js | 3 - .../node_modules/es5-ext/function/pluck.js | 7 - .../es5-ext/function/valid-function.js | 8 - .../node_modules/es5-ext/global.js | 3 - .../node_modules/es5-ext/index.js | 17 - .../node_modules/es5-ext/iterable/for-each.js | 12 - .../node_modules/es5-ext/iterable/index.js | 8 - .../node_modules/es5-ext/iterable/is.js | 10 - .../es5-ext/iterable/validate-object.js | 9 - .../node_modules/es5-ext/iterable/validate.js | 8 - .../es5-ext/math/_pack-ieee754.js | 82 - .../es5-ext/math/_unpack-ieee754.js | 33 - .../es5-ext/math/acosh/implement.js | 6 - .../node_modules/es5-ext/math/acosh/index.js | 5 - .../es5-ext/math/acosh/is-implemented.js | 7 - .../node_modules/es5-ext/math/acosh/shim.js | 12 - .../es5-ext/math/asinh/implement.js | 6 - .../node_modules/es5-ext/math/asinh/index.js | 5 - .../es5-ext/math/asinh/is-implemented.js | 7 - .../node_modules/es5-ext/math/asinh/shim.js | 15 - .../es5-ext/math/atanh/implement.js | 6 - .../node_modules/es5-ext/math/atanh/index.js | 5 - .../es5-ext/math/atanh/is-implemented.js | 7 - .../node_modules/es5-ext/math/atanh/shim.js | 14 - .../es5-ext/math/cbrt/implement.js | 6 - .../node_modules/es5-ext/math/cbrt/index.js | 5 - .../es5-ext/math/cbrt/is-implemented.js | 7 - .../node_modules/es5-ext/math/cbrt/shim.js | 12 - .../es5-ext/math/clz32/implement.js | 6 - .../node_modules/es5-ext/math/clz32/index.js | 5 - .../es5-ext/math/clz32/is-implemented.js | 7 - .../node_modules/es5-ext/math/clz32/shim.js | 6 - .../es5-ext/math/cosh/implement.js | 6 - .../node_modules/es5-ext/math/cosh/index.js | 5 - .../es5-ext/math/cosh/is-implemented.js | 7 - .../node_modules/es5-ext/math/cosh/shim.js | 11 - .../es5-ext/math/expm1/implement.js | 6 - .../node_modules/es5-ext/math/expm1/index.js | 5 - .../es5-ext/math/expm1/is-implemented.js | 7 - .../node_modules/es5-ext/math/expm1/shim.js | 16 - .../es5-ext/math/fround/implement.js | 6 - .../node_modules/es5-ext/math/fround/index.js | 5 - .../es5-ext/math/fround/is-implemented.js | 7 - .../node_modules/es5-ext/math/fround/shim.js | 33 - .../es5-ext/math/hypot/implement.js | 6 - .../node_modules/es5-ext/math/hypot/index.js | 5 - .../es5-ext/math/hypot/is-implemented.js | 7 - .../node_modules/es5-ext/math/hypot/shim.js | 34 - .../es5-ext/math/imul/implement.js | 6 - .../node_modules/es5-ext/math/imul/index.js | 5 - .../es5-ext/math/imul/is-implemented.js | 7 - .../node_modules/es5-ext/math/imul/shim.js | 13 - .../node_modules/es5-ext/math/index.js | 21 - .../es5-ext/math/log10/implement.js | 6 - .../node_modules/es5-ext/math/log10/index.js | 5 - .../es5-ext/math/log10/is-implemented.js | 7 - .../node_modules/es5-ext/math/log10/shim.js | 14 - .../es5-ext/math/log1p/implement.js | 6 - .../node_modules/es5-ext/math/log1p/index.js | 5 - .../es5-ext/math/log1p/is-implemented.js | 7 - .../node_modules/es5-ext/math/log1p/shim.js | 17 - .../es5-ext/math/log2/implement.js | 6 - .../node_modules/es5-ext/math/log2/index.js | 5 - .../es5-ext/math/log2/is-implemented.js | 7 - .../node_modules/es5-ext/math/log2/shim.js | 14 - .../es5-ext/math/sign/implement.js | 6 - .../node_modules/es5-ext/math/sign/index.js | 5 - .../es5-ext/math/sign/is-implemented.js | 7 - .../node_modules/es5-ext/math/sign/shim.js | 7 - .../es5-ext/math/sinh/implement.js | 6 - .../node_modules/es5-ext/math/sinh/index.js | 5 - .../es5-ext/math/sinh/is-implemented.js | 7 - .../node_modules/es5-ext/math/sinh/shim.js | 17 - .../es5-ext/math/tanh/implement.js | 6 - .../node_modules/es5-ext/math/tanh/index.js | 5 - .../es5-ext/math/tanh/is-implemented.js | 7 - .../node_modules/es5-ext/math/tanh/shim.js | 17 - .../es5-ext/math/trunc/implement.js | 6 - .../node_modules/es5-ext/math/trunc/index.js | 5 - .../es5-ext/math/trunc/is-implemented.js | 7 - .../node_modules/es5-ext/math/trunc/shim.js | 13 - .../node_modules/es5-ext/number/#/index.js | 5 - .../node_modules/es5-ext/number/#/pad.js | 15 - .../es5-ext/number/epsilon/implement.js | 6 - .../es5-ext/number/epsilon/index.js | 3 - .../es5-ext/number/epsilon/is-implemented.js | 5 - .../node_modules/es5-ext/number/index.js | 16 - .../es5-ext/number/is-finite/implement.js | 6 - .../es5-ext/number/is-finite/index.js | 5 - .../number/is-finite/is-implemented.js | 7 - .../es5-ext/number/is-finite/shim.js | 5 - .../es5-ext/number/is-integer/implement.js | 6 - .../es5-ext/number/is-integer/index.js | 5 - .../number/is-integer/is-implemented.js | 7 - .../es5-ext/number/is-integer/shim.js | 8 - .../es5-ext/number/is-nan/implement.js | 6 - .../es5-ext/number/is-nan/index.js | 5 - .../es5-ext/number/is-nan/is-implemented.js | 7 - .../es5-ext/number/is-nan/shim.js | 3 - .../node_modules/es5-ext/number/is-number.js | 11 - .../number/is-safe-integer/implement.js | 6 - .../es5-ext/number/is-safe-integer/index.js | 5 - .../number/is-safe-integer/is-implemented.js | 8 - .../es5-ext/number/is-safe-integer/shim.js | 11 - .../number/max-safe-integer/implement.js | 6 - .../es5-ext/number/max-safe-integer/index.js | 3 - .../number/max-safe-integer/is-implemented.js | 5 - .../number/min-safe-integer/implement.js | 6 - .../es5-ext/number/min-safe-integer/index.js | 3 - .../number/min-safe-integer/is-implemented.js | 5 - .../node_modules/es5-ext/number/to-integer.js | 12 - .../es5-ext/number/to-pos-integer.js | 7 - .../node_modules/es5-ext/number/to-uint32.js | 3 - .../node_modules/es5-ext/object/_iterate.js | 29 - .../es5-ext/object/assign/implement.js | 6 - .../es5-ext/object/assign/index.js | 5 - .../es5-ext/object/assign/is-implemented.js | 9 - .../es5-ext/object/assign/shim.js | 22 - .../node_modules/es5-ext/object/clear.js | 16 - .../node_modules/es5-ext/object/compact.js | 7 - .../node_modules/es5-ext/object/compare.js | 42 - .../node_modules/es5-ext/object/copy-deep.js | 30 - .../node_modules/es5-ext/object/copy.js | 10 - .../node_modules/es5-ext/object/count.js | 5 - .../node_modules/es5-ext/object/create.js | 36 - .../node_modules/es5-ext/object/eq.js | 5 - .../node_modules/es5-ext/object/every.js | 3 - .../node_modules/es5-ext/object/filter.js | 15 - .../node_modules/es5-ext/object/first-key.js | 14 - .../node_modules/es5-ext/object/flatten.js | 17 - .../node_modules/es5-ext/object/for-each.js | 3 - .../es5-ext/object/get-property-names.js | 18 - .../node_modules/es5-ext/object/index.js | 48 - .../es5-ext/object/is-array-like.js | 14 - .../es5-ext/object/is-callable.js | 5 - .../es5-ext/object/is-copy-deep.js | 58 - .../node_modules/es5-ext/object/is-copy.js | 24 - .../node_modules/es5-ext/object/is-empty.js | 14 - .../node_modules/es5-ext/object/is-object.js | 7 - .../es5-ext/object/is-plain-object.js | 20 - .../node_modules/es5-ext/object/is.js | 10 - .../node_modules/es5-ext/object/key-of.js | 15 - .../es5-ext/object/keys/implement.js | 6 - .../node_modules/es5-ext/object/keys/index.js | 5 - .../es5-ext/object/keys/is-implemented.js | 8 - .../node_modules/es5-ext/object/keys/shim.js | 7 - .../node_modules/es5-ext/object/map-keys.js | 15 - .../node_modules/es5-ext/object/map.js | 15 - .../es5-ext/object/mixin-prototypes.js | 34 - .../node_modules/es5-ext/object/mixin.js | 19 - .../es5-ext/object/normalize-options.js | 17 - .../es5-ext/object/primitive-set.js | 9 - .../es5-ext/object/safe-traverse.js | 15 - .../node_modules/es5-ext/object/serialize.js | 36 - .../object/set-prototype-of/implement.js | 8 - .../es5-ext/object/set-prototype-of/index.js | 5 - .../object/set-prototype-of/is-implemented.js | 11 - .../es5-ext/object/set-prototype-of/shim.js | 73 - .../node_modules/es5-ext/object/some.js | 3 - .../node_modules/es5-ext/object/to-array.js | 18 - .../es5-ext/object/unserialize.js | 7 - .../es5-ext/object/valid-callable.js | 6 - .../es5-ext/object/valid-object.js | 8 - .../es5-ext/object/valid-value.js | 6 - .../object/validate-array-like-object.js | 9 - .../es5-ext/object/validate-array-like.js | 8 - .../object/validate-stringifiable-value.js | 6 - .../es5-ext/object/validate-stringifiable.js | 9 - .../node_modules/es5-ext/package.json | 74 - .../node_modules/es5-ext/reg-exp/#/index.js | 10 - .../es5-ext/reg-exp/#/is-sticky.js | 9 - .../es5-ext/reg-exp/#/is-unicode.js | 9 - .../es5-ext/reg-exp/#/match/implement.js | 6 - .../es5-ext/reg-exp/#/match/index.js | 5 - .../es5-ext/reg-exp/#/match/is-implemented.js | 8 - .../es5-ext/reg-exp/#/match/shim.js | 8 - .../es5-ext/reg-exp/#/replace/implement.js | 6 - .../es5-ext/reg-exp/#/replace/index.js | 5 - .../reg-exp/#/replace/is-implemented.js | 8 - .../es5-ext/reg-exp/#/replace/shim.js | 8 - .../es5-ext/reg-exp/#/search/implement.js | 6 - .../es5-ext/reg-exp/#/search/index.js | 5 - .../reg-exp/#/search/is-implemented.js | 8 - .../es5-ext/reg-exp/#/search/shim.js | 8 - .../es5-ext/reg-exp/#/split/implement.js | 6 - .../es5-ext/reg-exp/#/split/index.js | 5 - .../es5-ext/reg-exp/#/split/is-implemented.js | 8 - .../es5-ext/reg-exp/#/split/shim.js | 8 - .../es5-ext/reg-exp/#/sticky/implement.js | 8 - .../reg-exp/#/sticky/is-implemented.js | 5 - .../es5-ext/reg-exp/#/unicode/implement.js | 8 - .../reg-exp/#/unicode/is-implemented.js | 5 - .../node_modules/es5-ext/reg-exp/escape.js | 9 - .../node_modules/es5-ext/reg-exp/index.js | 8 - .../es5-ext/reg-exp/is-reg-exp.js | 9 - .../es5-ext/reg-exp/valid-reg-exp.js | 8 - .../es5-ext/string/#/@@iterator/implement.js | 6 - .../es5-ext/string/#/@@iterator/index.js | 4 - .../string/#/@@iterator/is-implemented.js | 16 - .../es5-ext/string/#/@@iterator/shim.js | 6 - .../node_modules/es5-ext/string/#/at.js | 33 - .../es5-ext/string/#/camel-to-hyphen.js | 10 - .../es5-ext/string/#/capitalize.js | 8 - .../string/#/case-insensitive-compare.js | 7 - .../string/#/code-point-at/implement.js | 7 - .../es5-ext/string/#/code-point-at/index.js | 5 - .../string/#/code-point-at/is-implemented.js | 8 - .../es5-ext/string/#/code-point-at/shim.js | 26 - .../es5-ext/string/#/contains/implement.js | 7 - .../es5-ext/string/#/contains/index.js | 5 - .../string/#/contains/is-implemented.js | 8 - .../es5-ext/string/#/contains/shim.js | 7 - .../es5-ext/string/#/ends-with/implement.js | 7 - .../es5-ext/string/#/ends-with/index.js | 5 - .../string/#/ends-with/is-implemented.js | 8 - .../es5-ext/string/#/ends-with/shim.js | 16 - .../es5-ext/string/#/hyphen-to-camel.js | 8 - .../node_modules/es5-ext/string/#/indent.js | 12 - .../node_modules/es5-ext/string/#/index.js | 21 - .../node_modules/es5-ext/string/#/last.js | 8 - .../es5-ext/string/#/normalize/_data.js | 69 - .../es5-ext/string/#/normalize/implement.js | 7 - .../es5-ext/string/#/normalize/index.js | 5 - .../string/#/normalize/is-implemented.js | 8 - .../es5-ext/string/#/normalize/shim.js | 289 - .../node_modules/es5-ext/string/#/pad.js | 18 - .../es5-ext/string/#/plain-replace-all.js | 16 - .../es5-ext/string/#/plain-replace.js | 10 - .../es5-ext/string/#/repeat/implement.js | 7 - .../es5-ext/string/#/repeat/index.js | 5 - .../es5-ext/string/#/repeat/is-implemented.js | 8 - .../es5-ext/string/#/repeat/shim.js | 22 - .../es5-ext/string/#/starts-with/implement.js | 7 - .../es5-ext/string/#/starts-with/index.js | 5 - .../string/#/starts-with/is-implemented.js | 9 - .../es5-ext/string/#/starts-with/shim.js | 12 - .../es5-ext/string/format-method.js | 24 - .../string/from-code-point/implement.js | 6 - .../es5-ext/string/from-code-point/index.js | 5 - .../string/from-code-point/is-implemented.js | 7 - .../es5-ext/string/from-code-point/shim.js | 30 - .../node_modules/es5-ext/string/index.js | 10 - .../node_modules/es5-ext/string/is-string.js | 10 - .../es5-ext/string/random-uniq.js | 11 - .../es5-ext/string/raw/implement.js | 6 - .../node_modules/es5-ext/string/raw/index.js | 5 - .../es5-ext/string/raw/is-implemented.js | 9 - .../node_modules/es5-ext/string/raw/shim.js | 15 - .../node_modules/es5-ext/test/__tad.js | 3 - .../test/array/#/@@iterator/implement.js | 5 - .../es5-ext/test/array/#/@@iterator/index.js | 3 - .../test/array/#/@@iterator/is-implemented.js | 3 - .../es5-ext/test/array/#/@@iterator/shim.js | 9 - .../test/array/#/_compare-by-length.js | 7 - .../es5-ext/test/array/#/binary-search.js | 15 - .../es5-ext/test/array/#/clear.js | 7 - .../es5-ext/test/array/#/compact.js | 17 - .../es5-ext/test/array/#/concat/implement.js | 5 - .../es5-ext/test/array/#/concat/index.js | 3 - .../test/array/#/concat/is-implemented.js | 3 - .../es5-ext/test/array/#/concat/shim.js | 26 - .../es5-ext/test/array/#/contains.js | 21 - .../test/array/#/copy-within/implement.js | 5 - .../es5-ext/test/array/#/copy-within/index.js | 3 - .../array/#/copy-within/is-implemented.js | 3 - .../es5-ext/test/array/#/copy-within/shim.js | 29 - .../node_modules/es5-ext/test/array/#/diff.js | 17 - .../es5-ext/test/array/#/e-index-of.js | 13 - .../es5-ext/test/array/#/e-last-index-of.js | 12 - .../es5-ext/test/array/#/entries/implement.js | 5 - .../es5-ext/test/array/#/entries/index.js | 3 - .../test/array/#/entries/is-implemented.js | 3 - .../es5-ext/test/array/#/entries/shim.js | 9 - .../es5-ext/test/array/#/exclusion.js | 15 - .../es5-ext/test/array/#/fill/implement.js | 5 - .../es5-ext/test/array/#/fill/index.js | 3 - .../test/array/#/fill/is-implemented.js | 3 - .../es5-ext/test/array/#/fill/shim.js | 18 - .../es5-ext/test/array/#/filter/implement.js | 5 - .../es5-ext/test/array/#/filter/index.js | 3 - .../test/array/#/filter/is-implemented.js | 3 - .../es5-ext/test/array/#/filter/shim.js | 17 - .../test/array/#/find-index/implement.js | 5 - .../es5-ext/test/array/#/find-index/index.js | 3 - .../test/array/#/find-index/is-implemented.js | 3 - .../es5-ext/test/array/#/find-index/shim.js | 17 - .../es5-ext/test/array/#/find/implement.js | 5 - .../es5-ext/test/array/#/find/index.js | 3 - .../test/array/#/find/is-implemented.js | 3 - .../es5-ext/test/array/#/find/shim.js | 17 - .../es5-ext/test/array/#/first-index.js | 17 - .../es5-ext/test/array/#/first.js | 13 - .../es5-ext/test/array/#/flatten.js | 12 - .../es5-ext/test/array/#/for-each-right.js | 36 - .../es5-ext/test/array/#/group.js | 24 - .../es5-ext/test/array/#/indexes-of.js | 14 - .../es5-ext/test/array/#/intersection.js | 24 - .../es5-ext/test/array/#/is-copy.js | 13 - .../es5-ext/test/array/#/is-uniq.js | 11 - .../es5-ext/test/array/#/keys/implement.js | 5 - .../es5-ext/test/array/#/keys/index.js | 3 - .../test/array/#/keys/is-implemented.js | 3 - .../es5-ext/test/array/#/keys/shim.js | 9 - .../es5-ext/test/array/#/last-index.js | 17 - .../node_modules/es5-ext/test/array/#/last.js | 15 - .../es5-ext/test/array/#/map/implement.js | 5 - .../es5-ext/test/array/#/map/index.js | 3 - .../test/array/#/map/is-implemented.js | 3 - .../es5-ext/test/array/#/map/shim.js | 19 - .../es5-ext/test/array/#/remove.js | 14 - .../es5-ext/test/array/#/separate.js | 15 - .../es5-ext/test/array/#/slice/implement.js | 5 - .../es5-ext/test/array/#/slice/index.js | 3 - .../test/array/#/slice/is-implemented.js | 3 - .../es5-ext/test/array/#/slice/shim.js | 17 - .../es5-ext/test/array/#/some-right.js | 43 - .../es5-ext/test/array/#/splice/implement.js | 5 - .../es5-ext/test/array/#/splice/index.js | 3 - .../test/array/#/splice/is-implemented.js | 3 - .../es5-ext/test/array/#/splice/shim.js | 19 - .../node_modules/es5-ext/test/array/#/uniq.js | 14 - .../es5-ext/test/array/#/values/implement.js | 5 - .../es5-ext/test/array/#/values/index.js | 3 - .../test/array/#/values/is-implemented.js | 3 - .../es5-ext/test/array/#/values/shim.js | 9 - .../es5-ext/test/array/__scopes.js | 9 - .../es5-ext/test/array/_is-extensible.js | 5 - .../test/array/_sub-array-dummy-safe.js | 7 - .../es5-ext/test/array/_sub-array-dummy.js | 7 - .../es5-ext/test/array/from/implement.js | 5 - .../es5-ext/test/array/from/index.js | 3 - .../es5-ext/test/array/from/is-implemented.js | 3 - .../es5-ext/test/array/from/shim.js | 60 - .../es5-ext/test/array/generate.js | 10 - .../es5-ext/test/array/is-plain-array.js | 18 - .../es5-ext/test/array/of/implement.js | 5 - .../es5-ext/test/array/of/index.js | 3 - .../es5-ext/test/array/of/is-implemented.js | 3 - .../es5-ext/test/array/of/shim.js | 68 - .../es5-ext/test/array/to-array.js | 13 - .../es5-ext/test/array/valid-array.js | 14 - .../es5-ext/test/boolean/is-boolean.js | 12 - .../node_modules/es5-ext/test/date/#/copy.js | 10 - .../es5-ext/test/date/#/days-in-month.js | 17 - .../es5-ext/test/date/#/floor-day.js | 6 - .../es5-ext/test/date/#/floor-month.js | 6 - .../es5-ext/test/date/#/floor-year.js | 6 - .../es5-ext/test/date/#/format.js | 6 - .../node_modules/es5-ext/test/date/is-date.js | 10 - .../es5-ext/test/date/valid-date.js | 12 - .../es5-ext/test/error/#/throw.js | 10 - .../node_modules/es5-ext/test/error/custom.js | 12 - .../es5-ext/test/error/is-error.js | 16 - .../es5-ext/test/error/valid-error.js | 9 - .../es5-ext/test/function/#/compose.js | 9 - .../es5-ext/test/function/#/copy.js | 19 - .../es5-ext/test/function/#/curry.js | 18 - .../es5-ext/test/function/#/lock.js | 7 - .../es5-ext/test/function/#/not.js | 11 - .../es5-ext/test/function/#/partial.js | 9 - .../es5-ext/test/function/#/spread.js | 8 - .../test/function/#/to-string-tokens.js | 12 - .../es5-ext/test/function/_define-length.js | 12 - .../es5-ext/test/function/constant.js | 7 - .../es5-ext/test/function/identity.js | 7 - .../es5-ext/test/function/invoke.js | 9 - .../es5-ext/test/function/is-arguments.js | 11 - .../es5-ext/test/function/is-function.js | 8 - .../es5-ext/test/function/noop.js | 5 - .../es5-ext/test/function/pluck.js | 7 - .../es5-ext/test/function/valid-function.js | 17 - .../node_modules/es5-ext/test/global.js | 5 - .../es5-ext/test/iterable/for-each.js | 40 - .../node_modules/es5-ext/test/iterable/is.js | 20 - .../es5-ext/test/iterable/validate-object.js | 20 - .../es5-ext/test/iterable/validate.js | 20 - .../es5-ext/test/math/_pack-ieee754.js | 5 - .../es5-ext/test/math/_unpack-ieee754.js | 5 - .../es5-ext/test/math/acosh/implement.js | 5 - .../es5-ext/test/math/acosh/index.js | 3 - .../es5-ext/test/math/acosh/is-implemented.js | 3 - .../es5-ext/test/math/acosh/shim.js | 11 - .../es5-ext/test/math/asinh/implement.js | 5 - .../es5-ext/test/math/asinh/index.js | 3 - .../es5-ext/test/math/asinh/is-implemented.js | 3 - .../es5-ext/test/math/asinh/shim.js | 10 - .../es5-ext/test/math/atanh/implement.js | 5 - .../es5-ext/test/math/atanh/index.js | 3 - .../es5-ext/test/math/atanh/is-implemented.js | 3 - .../es5-ext/test/math/atanh/shim.js | 11 - .../es5-ext/test/math/cbrt/implement.js | 5 - .../es5-ext/test/math/cbrt/index.js | 3 - .../es5-ext/test/math/cbrt/is-implemented.js | 3 - .../es5-ext/test/math/cbrt/shim.js | 11 - .../es5-ext/test/math/clz32/implement.js | 5 - .../es5-ext/test/math/clz32/index.js | 3 - .../es5-ext/test/math/clz32/is-implemented.js | 3 - .../es5-ext/test/math/clz32/shim.js | 12 - .../es5-ext/test/math/cosh/implement.js | 5 - .../es5-ext/test/math/cosh/index.js | 3 - .../es5-ext/test/math/cosh/is-implemented.js | 3 - .../es5-ext/test/math/cosh/shim.js | 13 - .../es5-ext/test/math/expm1/implement.js | 5 - .../es5-ext/test/math/expm1/index.js | 3 - .../es5-ext/test/math/expm1/is-implemented.js | 3 - .../es5-ext/test/math/expm1/shim.js | 9 - .../es5-ext/test/math/fround/implement.js | 5 - .../es5-ext/test/math/fround/index.js | 3 - .../test/math/fround/is-implemented.js | 3 - .../es5-ext/test/math/fround/shim.js | 9 - .../es5-ext/test/math/hypot/implement.js | 5 - .../es5-ext/test/math/hypot/index.js | 3 - .../es5-ext/test/math/hypot/is-implemented.js | 3 - .../es5-ext/test/math/hypot/shim.js | 11 - .../es5-ext/test/math/imul/implement.js | 5 - .../es5-ext/test/math/imul/index.js | 3 - .../es5-ext/test/math/imul/is-implemented.js | 3 - .../es5-ext/test/math/imul/shim.js | 9 - .../es5-ext/test/math/log10/implement.js | 5 - .../es5-ext/test/math/log10/index.js | 3 - .../es5-ext/test/math/log10/is-implemented.js | 3 - .../es5-ext/test/math/log10/shim.js | 10 - .../es5-ext/test/math/log1p/implement.js | 5 - .../es5-ext/test/math/log1p/index.js | 3 - .../es5-ext/test/math/log1p/is-implemented.js | 3 - .../es5-ext/test/math/log1p/shim.js | 10 - .../es5-ext/test/math/log2/implement.js | 5 - .../es5-ext/test/math/log2/index.js | 3 - .../es5-ext/test/math/log2/is-implemented.js | 3 - .../es5-ext/test/math/log2/shim.js | 10 - .../es5-ext/test/math/sign/implement.js | 5 - .../es5-ext/test/math/sign/index.js | 3 - .../es5-ext/test/math/sign/is-implemented.js | 3 - .../es5-ext/test/math/sign/shim.js | 11 - .../es5-ext/test/math/sinh/implement.js | 5 - .../es5-ext/test/math/sinh/index.js | 3 - .../es5-ext/test/math/sinh/is-implemented.js | 3 - .../es5-ext/test/math/sinh/shim.js | 13 - .../es5-ext/test/math/tanh/implement.js | 5 - .../es5-ext/test/math/tanh/index.js | 3 - .../es5-ext/test/math/tanh/is-implemented.js | 3 - .../es5-ext/test/math/tanh/shim.js | 11 - .../es5-ext/test/math/trunc/implement.js | 5 - .../es5-ext/test/math/trunc/index.js | 3 - .../es5-ext/test/math/trunc/is-implemented.js | 3 - .../es5-ext/test/math/trunc/shim.js | 16 - .../node_modules/es5-ext/test/number/#/pad.js | 7 - .../es5-ext/test/number/epsilon/implement.js | 5 - .../es5-ext/test/number/epsilon/index.js | 5 - .../test/number/epsilon/is-implemented.js | 3 - .../test/number/is-finite/implement.js | 5 - .../es5-ext/test/number/is-finite/index.js | 3 - .../test/number/is-finite/is-implemented.js | 3 - .../es5-ext/test/number/is-finite/shim.js | 8 - .../test/number/is-integer/implement.js | 5 - .../es5-ext/test/number/is-integer/index.js | 3 - .../test/number/is-integer/is-implemented.js | 3 - .../es5-ext/test/number/is-integer/shim.js | 9 - .../es5-ext/test/number/is-nan/implement.js | 5 - .../es5-ext/test/number/is-nan/index.js | 3 - .../test/number/is-nan/is-implemented.js | 3 - .../es5-ext/test/number/is-nan/shim.js | 7 - .../es5-ext/test/number/is-number.js | 13 - .../test/number/is-safe-integer/implement.js | 5 - .../test/number/is-safe-integer/index.js | 3 - .../number/is-safe-integer/is-implemented.js | 3 - .../test/number/is-safe-integer/shim.js | 11 - .../test/number/max-safe-integer/implement.js | 5 - .../test/number/max-safe-integer/index.js | 5 - .../number/max-safe-integer/is-implemented.js | 3 - .../test/number/min-safe-integer/implement.js | 5 - .../test/number/min-safe-integer/index.js | 5 - .../number/min-safe-integer/is-implemented.js | 3 - .../es5-ext/test/number/to-integer.js | 10 - .../es5-ext/test/number/to-pos-integer.js | 10 - .../es5-ext/test/number/to-uint32.js | 8 - .../es5-ext/test/object/_iterate.js | 30 - .../es5-ext/test/object/assign/implement.js | 5 - .../es5-ext/test/object/assign/index.js | 3 - .../test/object/assign/is-implemented.js | 3 - .../es5-ext/test/object/assign/shim.js | 11 - .../node_modules/es5-ext/test/object/clear.js | 13 - .../es5-ext/test/object/compact.js | 14 - .../es5-ext/test/object/compare.js | 13 - .../es5-ext/test/object/copy-deep.js | 24 - .../node_modules/es5-ext/test/object/copy.js | 19 - .../node_modules/es5-ext/test/object/count.js | 11 - .../es5-ext/test/object/create.js | 22 - .../node_modules/es5-ext/test/object/eq.js | 12 - .../node_modules/es5-ext/test/object/every.js | 21 - .../es5-ext/test/object/filter.js | 6 - .../es5-ext/test/object/first-key.js | 13 - .../es5-ext/test/object/flatten.js | 6 - .../es5-ext/test/object/for-each.js | 10 - .../es5-ext/test/object/get-property-names.js | 18 - .../es5-ext/test/object/is-array-like.js | 14 - .../es5-ext/test/object/is-callable.js | 8 - .../es5-ext/test/object/is-copy-deep.js | 46 - .../es5-ext/test/object/is-copy.js | 18 - .../es5-ext/test/object/is-empty.js | 6 - .../es5-ext/test/object/is-object.js | 13 - .../es5-ext/test/object/is-plain-object.js | 18 - .../node_modules/es5-ext/test/object/is.js | 12 - .../es5-ext/test/object/key-of.js | 12 - .../es5-ext/test/object/keys/implement.js | 5 - .../es5-ext/test/object/keys/index.js | 3 - .../test/object/keys/is-implemented.js | 3 - .../es5-ext/test/object/keys/shim.js | 8 - .../es5-ext/test/object/map-keys.js | 7 - .../node_modules/es5-ext/test/object/map.js | 9 - .../es5-ext/test/object/mixin-prototypes.js | 67 - .../node_modules/es5-ext/test/object/mixin.js | 69 - .../es5-ext/test/object/normalize-options.js | 32 - .../es5-ext/test/object/primitive-set.js | 15 - .../es5-ext/test/object/safe-traverse.js | 15 - .../es5-ext/test/object/serialize.js | 25 - .../test/object/set-prototype-of/implement.js | 6 - .../test/object/set-prototype-of/index.js | 23 - .../object/set-prototype-of/is-implemented.js | 3 - .../test/object/set-prototype-of/shim.js | 23 - .../node_modules/es5-ext/test/object/some.js | 23 - .../es5-ext/test/object/to-array.js | 15 - .../es5-ext/test/object/unserialize.js | 24 - .../es5-ext/test/object/valid-callable.js | 9 - .../es5-ext/test/object/valid-object.js | 15 - .../es5-ext/test/object/valid-value.js | 19 - .../test/object/validate-array-like-object.js | 15 - .../test/object/validate-array-like.js | 15 - .../object/validate-stringifiable-value.js | 16 - .../test/object/validate-stringifiable.js | 16 - .../es5-ext/test/reg-exp/#/index.js | 12 - .../es5-ext/test/reg-exp/#/is-sticky.js | 10 - .../es5-ext/test/reg-exp/#/is-unicode.js | 10 - .../es5-ext/test/reg-exp/#/match/implement.js | 5 - .../es5-ext/test/reg-exp/#/match/index.js | 3 - .../test/reg-exp/#/match/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/match/shim.js | 8 - .../test/reg-exp/#/replace/implement.js | 5 - .../es5-ext/test/reg-exp/#/replace/index.js | 3 - .../test/reg-exp/#/replace/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/replace/shim.js | 5 - .../test/reg-exp/#/search/implement.js | 5 - .../es5-ext/test/reg-exp/#/search/index.js | 3 - .../test/reg-exp/#/search/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/search/shim.js | 5 - .../es5-ext/test/reg-exp/#/split/implement.js | 5 - .../es5-ext/test/reg-exp/#/split/index.js | 3 - .../test/reg-exp/#/split/is-implemented.js | 3 - .../es5-ext/test/reg-exp/#/split/shim.js | 5 - .../test/reg-exp/#/sticky/implement.js | 5 - .../test/reg-exp/#/sticky/is-implemented.js | 3 - .../test/reg-exp/#/unicode/implement.js | 5 - .../test/reg-exp/#/unicode/is-implemented.js | 3 - .../es5-ext/test/reg-exp/escape.js | 6 - .../es5-ext/test/reg-exp/is-reg-exp.js | 12 - .../es5-ext/test/reg-exp/valid-reg-exp.js | 17 - .../test/string/#/@@iterator/implement.js | 5 - .../es5-ext/test/string/#/@@iterator/index.js | 3 - .../string/#/@@iterator/is-implemented.js | 3 - .../es5-ext/test/string/#/@@iterator/shim.js | 9 - .../node_modules/es5-ext/test/string/#/at.js | 97 - .../es5-ext/test/string/#/camel-to-hyphen.js | 5 - .../es5-ext/test/string/#/capitalize.js | 9 - .../test/string/#/case-insensitive-compare.js | 7 - .../test/string/#/code-point-at/implement.js | 6 - .../test/string/#/code-point-at/index.js | 3 - .../string/#/code-point-at/is-implemented.js | 3 - .../test/string/#/code-point-at/shim.js | 81 - .../test/string/#/contains/implement.js | 5 - .../es5-ext/test/string/#/contains/index.js | 3 - .../test/string/#/contains/is-implemented.js | 3 - .../es5-ext/test/string/#/contains/shim.js | 14 - .../test/string/#/ends-with/implement.js | 5 - .../es5-ext/test/string/#/ends-with/index.js | 3 - .../test/string/#/ends-with/is-implemented.js | 3 - .../es5-ext/test/string/#/ends-with/shim.js | 16 - .../es5-ext/test/string/#/hyphen-to-camel.js | 5 - .../es5-ext/test/string/#/indent.js | 9 - .../es5-ext/test/string/#/last.js | 6 - .../es5-ext/test/string/#/normalize/_data.js | 3 - .../test/string/#/normalize/implement.js | 5 - .../es5-ext/test/string/#/normalize/index.js | 3 - .../test/string/#/normalize/is-implemented.js | 3 - .../es5-ext/test/string/#/normalize/shim.js | 13 - .../node_modules/es5-ext/test/string/#/pad.js | 24 - .../test/string/#/plain-replace-all.js | 11 - .../es5-ext/test/string/#/plain-replace.js | 7 - .../es5-ext/test/string/#/repeat/implement.js | 5 - .../es5-ext/test/string/#/repeat/index.js | 3 - .../test/string/#/repeat/is-implemented.js | 3 - .../es5-ext/test/string/#/repeat/shim.js | 8 - .../test/string/#/starts-with/implement.js | 5 - .../test/string/#/starts-with/index.js | 3 - .../string/#/starts-with/is-implemented.js | 3 - .../es5-ext/test/string/#/starts-with/shim.js | 14 - .../es5-ext/test/string/format-method.js | 7 - .../test/string/from-code-point/implement.js | 5 - .../test/string/from-code-point/index.js | 3 - .../string/from-code-point/is-implemented.js | 3 - .../test/string/from-code-point/shim.js | 47 - .../es5-ext/test/string/is-string.js | 11 - .../es5-ext/test/string/random-uniq.js | 14 - .../es5-ext/test/string/raw/implement.js | 5 - .../es5-ext/test/string/raw/index.js | 3 - .../es5-ext/test/string/raw/is-implemented.js | 3 - .../es5-ext/test/string/raw/shim.js | 15 - .../node_modules/es6-iterator/#/chain.js | 40 - .../node_modules/es6-iterator/.lint | 11 - .../node_modules/es6-iterator/.npmignore | 4 - .../node_modules/es6-iterator/.travis.yml | 11 - .../node_modules/es6-iterator/CHANGES | 28 - .../node_modules/es6-iterator/LICENSE | 19 - .../node_modules/es6-iterator/README.md | 148 - .../node_modules/es6-iterator/array.js | 30 - .../node_modules/es6-iterator/for-of.js | 44 - .../node_modules/es6-iterator/get.js | 13 - .../node_modules/es6-iterator/index.js | 90 - .../node_modules/es6-iterator/is-iterable.js | 13 - .../node_modules/es6-iterator/package.json | 66 - .../node_modules/es6-iterator/string.js | 37 - .../node_modules/es6-iterator/test/#/chain.js | 23 - .../node_modules/es6-iterator/test/array.js | 67 - .../node_modules/es6-iterator/test/for-of.js | 35 - .../node_modules/es6-iterator/test/get.js | 16 - .../node_modules/es6-iterator/test/index.js | 99 - .../es6-iterator/test/is-iterable.js | 18 - .../node_modules/es6-iterator/test/string.js | 23 - .../es6-iterator/test/valid-iterable.js | 16 - .../es6-iterator/valid-iterable.js | 8 - .../node_modules/es6-symbol/.lint | 13 - .../node_modules/es6-symbol/.npmignore | 4 - .../node_modules/es6-symbol/.travis.yml | 9 - .../node_modules/es6-symbol/CHANGES | 34 - .../node_modules/es6-symbol/LICENSE | 19 - .../node_modules/es6-symbol/README.md | 71 - .../node_modules/es6-symbol/implement.js | 7 - .../node_modules/es6-symbol/index.js | 3 - .../node_modules/es6-symbol/is-implemented.js | 18 - .../es6-symbol/is-native-implemented.js | 8 - .../node_modules/es6-symbol/is-symbol.js | 5 - .../node_modules/es6-symbol/package.json | 63 - .../node_modules/es6-symbol/polyfill.js | 77 - .../node_modules/es6-symbol/test/implement.js | 3 - .../node_modules/es6-symbol/test/index.js | 12 - .../es6-symbol/test/is-implemented.js | 14 - .../es6-symbol/test/is-native-implemented.js | 3 - .../node_modules/es6-symbol/test/is-symbol.js | 16 - .../node_modules/es6-symbol/test/polyfill.js | 27 - .../es6-symbol/test/validate-symbol.js | 19 - .../es6-symbol/validate-symbol.js | 8 - .../node_modules/es6-weak-map/package.json | 64 - .../node_modules/es6-weak-map/polyfill.js | 75 - .../es6-weak-map/test/implement.js | 3 - .../node_modules/es6-weak-map/test/index.js | 6 - .../es6-weak-map/test/is-implemented.js | 3 - .../test/is-native-implemented.js | 3 - .../es6-weak-map/test/is-weak-map.js | 16 - .../es6-weak-map/test/polyfill.js | 22 - .../es6-weak-map/test/valid-weak-map.js | 19 - .../node_modules/esrecurse/gulpfile.coffee | 79 - .../node_modules/esrecurse/package.json | 71 - .../escope/node_modules/estraverse/.jshintrc | 16 - .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 66 - tools/eslint/node_modules/escope/package.json | 147 +- .../escope/src/pattern-visitor.js | 134 + .../node_modules/escope/src/referencer.js | 128 +- .../node_modules/escope/src/scope-manager.js | 17 +- tools/eslint/node_modules/escope/src/scope.js | 29 +- tools/eslint/node_modules/espree/README.md | 8 +- tools/eslint/node_modules/espree/espree.js | 77 +- .../espree/lib/ast-node-factory.js | 32 + .../node_modules/espree/lib/ast-node-types.js | 3 + .../espree/lib/comment-attachment.js | 18 +- .../node_modules/espree/lib/features.js | 8 +- tools/eslint/node_modules/espree/package.json | 151 +- .../eslint/node_modules/espree/test/compat.js | 255 - .../node_modules/espree/test/reflect.js | 422 - tools/eslint/node_modules/espree/test/run.js | 68 - .../eslint/node_modules/espree/test/runner.js | 492 - tools/eslint/node_modules/espree/test/test.js | 34 - .../node_modules => }/esrecurse/README.md | 0 .../node_modules => }/esrecurse/esrecurse.js | 0 .../node_modules/estraverse/LICENSE.BSD | 0 .../node_modules/estraverse/README.md | 0 .../node_modules/estraverse/estraverse.js | 0 .../node_modules/estraverse/package.json | 92 + .../node_modules/esrecurse/package.json | 96 + .../node_modules/estraverse-fb/.npmignore | 25 - .../node_modules/estraverse-fb/.travis.yml | 2 - .../node_modules/estraverse-fb/package.json | 98 +- .../eslint/node_modules/estraverse-fb/test.js | 116 - .../eslint/node_modules/estraverse/.jshintrc | 16 - .../eslint/node_modules/estraverse/README.md | 2 +- .../node_modules/estraverse/estraverse.js | 4 +- .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 112 +- tools/eslint/node_modules/esutils/LICENSE.BSD | 19 + tools/eslint/node_modules/esutils/README.md | 169 + tools/eslint/node_modules/esutils/lib/ast.js | 144 + tools/eslint/node_modules/esutils/lib/code.js | 135 + .../node_modules/esutils/lib/keyword.js | 165 + .../eslint/node_modules/esutils/lib/utils.js | 33 + .../eslint/node_modules/esutils/package.json | 97 + .../node_modules => }/event-emitter/.lint | 0 .../event-emitter/.testignore | 0 .../node_modules => }/event-emitter/LICENSE | 0 .../node_modules/event-emitter/README.md | 95 + .../event-emitter/all-off.js | 0 .../node_modules/event-emitter/emit-error.js | 13 + .../event-emitter/has-listeners.js | 0 .../node_modules => }/event-emitter/index.js | 0 .../node_modules/event-emitter/package.json | 91 + .../node_modules => }/event-emitter/pipe.js | 0 .../node_modules => }/event-emitter/unify.js | 0 tools/eslint/node_modules/exit-hook/index.js | 30 + .../node_modules/exit-hook/package.json | 93 + tools/eslint/node_modules/exit-hook/readme.md | 40 + .../node_modules/fast-levenshtein/LICENSE.md | 24 + .../fast-levenshtein/README.md | 0 .../fast-levenshtein/levenshtein.js | 1 - .../fast-levenshtein/package.json | 93 + tools/eslint/node_modules/figures/index.js | 89 + tools/eslint/node_modules/figures/license | 21 + .../eslint/node_modules/figures/package.json | 93 + tools/eslint/node_modules/figures/readme.md | 34 + .../node_modules/file-entry-cache/LICENSE | 21 + .../node_modules/file-entry-cache/README.md | 94 + .../node_modules/file-entry-cache/cache.js | 190 + .../file-entry-cache/changelog.md | 57 + .../file-entry-cache/package.json | 140 + tools/eslint/node_modules/flat-cache/LICENSE | 21 + .../eslint/node_modules/flat-cache/README.md | 67 + tools/eslint/node_modules/flat-cache/cache.js | 187 + .../node_modules/flat-cache/changelog.md | 72 + .../node_modules/flat-cache/package.json | 141 + .../generate-function/README.md | 0 .../generate-function/example.js | 0 .../generate-function/index.js | 0 .../generate-function/package.json | 79 + .../generate-object-property/LICENSE | 0 .../generate-object-property/README.md | 0 .../generate-object-property/index.js | 0 .../generate-object-property/package.json | 76 + tools/eslint/node_modules/glob/LICENSE | 15 + tools/eslint/node_modules/glob/README.md | 377 + tools/eslint/node_modules/glob/common.js | 245 + tools/eslint/node_modules/glob/glob.js | 752 + tools/eslint/node_modules/glob/package.json | 98 + tools/eslint/node_modules/glob/sync.js | 460 + .../eslint/node_modules/globals/globals.json | 505 +- .../eslint/node_modules/globals/package.json | 121 +- tools/eslint/node_modules/globals/readme.md | 2 +- tools/eslint/node_modules/globby/index.js | 68 + tools/eslint/node_modules/globby/license | 21 + .../globby/node_modules/glob/LICENSE | 15 + .../globby/node_modules/glob/README.md | 359 + .../globby/node_modules/glob/common.js | 226 + .../globby/node_modules/glob/glob.js | 765 + .../globby/node_modules/glob/package.json | 98 + .../globby/node_modules/glob/sync.js | 460 + tools/eslint/node_modules/globby/package.json | 137 + tools/eslint/node_modules/globby/readme.md | 75 + tools/eslint/node_modules/graceful-fs/LICENSE | 15 + .../eslint/node_modules/graceful-fs/README.md | 36 + tools/eslint/node_modules/graceful-fs/fs.js | 21 + .../node_modules/graceful-fs/graceful-fs.js | 251 + .../graceful-fs/legacy-streams.js | 118 + .../node_modules/graceful-fs/package.json | 100 + .../node_modules/graceful-fs/polyfills.js | 252 + .../node_modules/handlebars/.istanbul.yml | 2 + tools/eslint/node_modules/handlebars/FAQ.md | 60 + tools/eslint/node_modules/handlebars/LICENSE | 19 + .../node_modules/handlebars/README.markdown | 165 + .../node_modules/handlebars/bin/handlebars | 128 + .../handlebars/dist/amd/handlebars.js | 51 + .../handlebars/dist/amd/handlebars.runtime.js | 44 + .../handlebars/dist/amd/handlebars/base.js | 96 + .../dist/amd/handlebars/compiler/ast.js | 31 + .../dist/amd/handlebars/compiler/base.js | 36 + .../dist/amd/handlebars/compiler/code-gen.js | 163 + .../dist/amd/handlebars/compiler/compiler.js | 568 + .../dist/amd/handlebars/compiler/helpers.js | 230 + .../compiler/javascript-compiler.js | 1118 ++ .../dist/amd/handlebars/compiler/parser.js | 740 + .../dist/amd/handlebars/compiler/printer.js | 186 + .../dist/amd/handlebars/compiler/visitor.js | 138 + .../handlebars/compiler/whitespace-control.js | 219 + .../dist/amd/handlebars/decorators.js | 16 + .../dist/amd/handlebars/decorators/inline.js | 25 + .../dist/amd/handlebars/exception.js | 39 + .../handlebars/dist/amd/handlebars/helpers.js | 34 + .../helpers/block-helper-missing.js | 35 + .../dist/amd/handlebars/helpers/each.js | 89 + .../amd/handlebars/helpers/helper-missing.js | 22 + .../dist/amd/handlebars/helpers/if.js | 25 + .../dist/amd/handlebars/helpers/log.js | 24 + .../dist/amd/handlebars/helpers/lookup.js | 10 + .../dist/amd/handlebars/helpers/with.js | 29 + .../handlebars/dist/amd/handlebars/logger.js | 44 + .../dist/amd/handlebars/no-conflict.js | 18 + .../handlebars/dist/amd/handlebars/runtime.js | 282 + .../dist/amd/handlebars/safe-string.js | 15 + .../handlebars/dist/amd/handlebars/utils.js | 126 + .../handlebars/dist/amd/precompiler.js | 292 + .../handlebars/dist/cjs/handlebars.js | 65 + .../handlebars/dist/cjs/handlebars.runtime.js | 66 + .../handlebars/dist/cjs/handlebars/base.js | 104 + .../dist/cjs/handlebars/compiler/ast.js | 31 + .../dist/cjs/handlebars/compiler/base.js | 48 + .../dist/cjs/handlebars/compiler/code-gen.js | 166 + .../dist/cjs/handlebars/compiler/compiler.js | 572 + .../dist/cjs/handlebars/compiler/helpers.js | 230 + .../compiler/javascript-compiler.js | 1126 ++ .../dist/cjs/handlebars/compiler/parser.js | 738 + .../dist/cjs/handlebars/compiler/printer.js | 186 + .../dist/cjs/handlebars/compiler/visitor.js | 140 + .../handlebars/compiler/whitespace-control.js | 221 + .../dist/cjs/handlebars/decorators.js | 16 + .../dist/cjs/handlebars/decorators/inline.js | 29 + .../dist/cjs/handlebars/exception.js | 40 + .../handlebars/dist/cjs/handlebars/helpers.js | 46 + .../helpers/block-helper-missing.js | 39 + .../dist/cjs/handlebars/helpers/each.js | 94 + .../cjs/handlebars/helpers/helper-missing.js | 25 + .../dist/cjs/handlebars/helpers/if.js | 29 + .../dist/cjs/handlebars/helpers/log.js | 26 + .../dist/cjs/handlebars/helpers/lookup.js | 12 + .../dist/cjs/handlebars/helpers/with.js | 33 + .../handlebars/dist/cjs/handlebars/logger.js | 47 + .../dist/cjs/handlebars/no-conflict.js | 20 + .../handlebars/dist/cjs/handlebars/runtime.js | 292 + .../dist/cjs/handlebars/safe-string.js | 15 + .../handlebars/dist/cjs/handlebars/utils.js | 124 + .../handlebars/dist/cjs/precompiler.js | 308 + .../handlebars/dist/handlebars.amd.js | 4321 ++++++ .../handlebars/dist/handlebars.amd.min.js | 29 + .../handlebars/dist/handlebars.js | 4608 ++++++ .../handlebars/dist/handlebars.min.js | 29 + .../handlebars/dist/handlebars.runtime.amd.js | 1017 ++ .../dist/handlebars.runtime.amd.min.js | 27 + .../handlebars/dist/handlebars.runtime.js | 1240 ++ .../handlebars/dist/handlebars.runtime.min.js | 27 + .../node_modules/handlebars/lib/handlebars.js | 41 + .../handlebars/lib/handlebars.runtime.js | 37 + .../handlebars/lib/handlebars/base.js | 78 + .../handlebars/lib/handlebars/compiler/ast.js | 28 + .../lib/handlebars/compiler/base.js | 24 + .../lib/handlebars/compiler/code-gen.js | 167 + .../lib/handlebars/compiler/compiler.js | 558 + .../lib/handlebars/compiler/helpers.js | 211 + .../compiler/javascript-compiler.js | 1135 ++ .../lib/handlebars/compiler/parser.js | 623 + .../lib/handlebars/compiler/printer.js | 171 + .../lib/handlebars/compiler/visitor.js | 129 + .../handlebars/compiler/whitespace-control.js | 216 + .../handlebars/lib/handlebars/decorators.js | 5 + .../lib/handlebars/decorators/inline.js | 22 + .../handlebars/lib/handlebars/exception.js | 35 + .../handlebars/lib/handlebars/helpers.js | 17 + .../helpers/block-helper-missing.js | 32 + .../handlebars/lib/handlebars/helpers/each.js | 79 + .../lib/handlebars/helpers/helper-missing.js | 13 + .../handlebars/lib/handlebars/helpers/if.js | 20 + .../handlebars/lib/handlebars/helpers/log.js | 19 + .../lib/handlebars/helpers/lookup.js | 5 + .../handlebars/lib/handlebars/helpers/with.js | 24 + .../handlebars/lib/handlebars/logger.js | 35 + .../handlebars/lib/handlebars/no-conflict.js | 13 + .../handlebars/lib/handlebars/runtime.js | 269 + .../handlebars/lib/handlebars/safe-string.js | 10 + .../handlebars/lib/handlebars/utils.js | 108 + .../node_modules/handlebars/lib/index.js | 25 + .../handlebars/lib/precompiler.js | 276 + .../node_modules/handlebars/package.json | 129 + .../node_modules/handlebars/print-script | 95 + .../node_modules/handlebars/release-notes.md | 462 + .../eslint/node_modules/handlebars/runtime.js | 3 + .../node_modules => }/has-ansi/index.js | 0 tools/eslint/node_modules/has-ansi/license | 21 + .../eslint/node_modules/has-ansi/package.json | 110 + tools/eslint/node_modules/has-ansi/readme.md | 36 + tools/eslint/node_modules/inflight/LICENSE | 15 + tools/eslint/node_modules/inflight/README.md | 37 + .../eslint/node_modules/inflight/inflight.js | 44 + .../eslint/node_modules/inflight/package.json | 88 + tools/eslint/node_modules/inherits/LICENSE | 15 + .../node_modules => }/inherits/README.md | 0 .../node_modules => }/inherits/inherits.js | 0 .../inherits/inherits_browser.js | 0 .../eslint/node_modules/inherits/package.json | 81 + tools/eslint/node_modules/inquirer/README.md | 48 +- .../node_modules/inquirer/lib/inquirer.js | 38 +- .../inquirer/lib/objects/choice.js | 34 +- .../inquirer/lib/objects/choices.js | 149 +- .../inquirer/lib/objects/separator.js | 32 +- .../node_modules/inquirer/lib/prompts/base.js | 166 +- .../inquirer/lib/prompts/checkbox.js | 161 +- .../inquirer/lib/prompts/confirm.js | 19 +- .../inquirer/lib/prompts/expand.js | 69 +- .../inquirer/lib/prompts/input.js | 31 +- .../node_modules/inquirer/lib/prompts/list.js | 108 +- .../inquirer/lib/prompts/password.js | 83 +- .../inquirer/lib/prompts/rawlist.js | 62 +- .../node_modules/inquirer/lib/ui/baseUI.js | 63 +- .../inquirer/lib/ui/bottom-bar.js | 33 +- .../node_modules/inquirer/lib/ui/prompt.js | 126 +- .../node_modules/inquirer/lib/utils/events.js | 41 +- .../inquirer/lib/utils/paginator.js | 38 + .../inquirer/lib/utils/readline.js | 51 + .../inquirer/lib/utils/screen-manager.js | 134 + .../node_modules/inquirer/lib/utils/tty.js | 130 - .../node_modules/inquirer/lib/utils/utils.js | 110 +- .../inquirer/node_modules/ansi-regex/index.js | 4 - .../node_modules/ansi-regex/package.json | 86 - .../node_modules/ansi-regex/readme.md | 33 - .../node_modules/cli-width/.npmignore | 3 - .../inquirer/node_modules/cli-width/README.md | 28 - .../inquirer/node_modules/cli-width/index.js | 20 - .../node_modules/cli-width/package.json | 49 - .../node_modules/cli-width/test/index.js | 40 - .../inquirer/node_modules/figures/index.js | 87 - .../node_modules/figures/package.json | 67 - .../inquirer/node_modules/figures/readme.md | 34 - .../inquirer/node_modules/lodash/README.md | 120 - .../node_modules/lodash/array/chunk.js | 47 - .../node_modules/lodash/array/difference.js | 28 - .../node_modules/lodash/array/flatten.js | 32 - .../node_modules/lodash/array/indexOf.js | 54 - .../node_modules/lodash/array/intersection.js | 58 - .../node_modules/lodash/array/pull.js | 52 - .../node_modules/lodash/array/sortedIndex.js | 53 - .../node_modules/lodash/array/union.js | 24 - .../node_modules/lodash/array/uniq.js | 71 - .../node_modules/lodash/array/without.js | 27 - .../inquirer/node_modules/lodash/array/xor.js | 34 - .../inquirer/node_modules/lodash/chain.js | 15 - .../node_modules/lodash/chain/lodash.js | 123 - .../lodash/chain/wrapperCommit.js | 32 - .../node_modules/lodash/chain/wrapperPlant.js | 45 - .../lodash/chain/wrapperReverse.js | 38 - .../node_modules/lodash/collection/every.js | 66 - .../lodash/collection/includes.js | 60 - .../node_modules/lodash/collection/invoke.js | 42 - .../node_modules/lodash/collection/reduce.js | 43 - .../node_modules/lodash/collection/some.js | 67 - .../node_modules/lodash/collection/sortBy.js | 71 - .../lodash/collection/sortByOrder.js | 55 - .../inquirer/node_modules/lodash/function.js | 27 - .../node_modules/lodash/function/after.js | 48 - .../node_modules/lodash/function/ary.js | 34 - .../node_modules/lodash/function/before.js | 42 - .../node_modules/lodash/function/debounce.js | 187 - .../node_modules/lodash/function/defer.js | 25 - .../node_modules/lodash/function/delay.js | 26 - .../node_modules/lodash/function/memoize.js | 80 - .../node_modules/lodash/function/rearg.js | 40 - .../node_modules/lodash/function/restParam.js | 58 - .../node_modules/lodash/function/spread.js | 44 - .../node_modules/lodash/function/throttle.js | 72 - .../node_modules/lodash/function/wrap.js | 33 - .../inquirer/node_modules/lodash/index.js | 12235 --------------- .../lodash/internal/LazyWrapper.js | 27 - .../node_modules/lodash/internal/arraySum.js | 18 - .../node_modules/lodash/internal/baseClone.js | 128 - .../lodash/internal/baseCreate.js | 23 - .../lodash/internal/baseDifference.js | 52 - .../lodash/internal/baseFlatten.js | 43 - .../lodash/internal/baseIsEqualDeep.js | 102 - .../node_modules/lodash/internal/baseMerge.js | 56 - .../lodash/internal/baseMergeDeep.js | 67 - .../lodash/internal/baseRandom.js | 20 - .../lodash/internal/baseToString.js | 16 - .../node_modules/lodash/internal/baseUniq.js | 57 - .../lodash/internal/baseWrapperValue.js | 37 - .../lodash/internal/binaryIndexBy.js | 59 - .../lodash/internal/bufferClone.js | 55 - .../lodash/internal/compareAscending.js | 16 - .../lodash/internal/compareMultiple.js | 43 - .../lodash/internal/composeArgs.js | 34 - .../lodash/internal/createAggregator.js | 40 - .../lodash/internal/createAssigner.js | 44 - .../lodash/internal/createCache.js | 22 - .../lodash/internal/createCtorWrapper.js | 35 - .../lodash/internal/createCurry.js | 23 - .../lodash/internal/createExtremum.js | 32 - .../lodash/internal/createFlow.js | 69 - .../lodash/internal/createHybridWrapper.js | 111 - .../lodash/internal/createPadding.js | 31 - .../lodash/internal/createPartial.js | 20 - .../lodash/internal/createPartialWrapper.js | 43 - .../lodash/internal/createWrapper.js | 86 - .../lodash/internal/equalByTag.js | 48 - .../lodash/internal/escapeStringChar.js | 23 - .../lodash/internal/getFuncName.js | 25 - .../node_modules/lodash/internal/getView.js | 33 - .../node_modules/lodash/internal/isIndex.js | 24 - .../lodash/internal/isLaziable.js | 26 - .../node_modules/lodash/internal/isLength.js | 20 - .../node_modules/lodash/internal/lazyClone.js | 27 - .../node_modules/lodash/internal/lazyValue.js | 81 - .../lodash/internal/shimIsPlainObject.js | 50 - .../lodash/internal/sortedUniq.js | 29 - .../node_modules/lodash/lang/clone.js | 70 - .../node_modules/lodash/lang/cloneDeep.js | 55 - .../node_modules/lodash/lang/isArguments.js | 36 - .../node_modules/lodash/lang/isArray.js | 40 - .../node_modules/lodash/lang/isBoolean.js | 35 - .../node_modules/lodash/lang/isDate.js | 35 - .../node_modules/lodash/lang/isElement.js | 41 - .../node_modules/lodash/lang/isEmpty.js | 47 - .../node_modules/lodash/lang/isEqual.js | 54 - .../node_modules/lodash/lang/isError.js | 36 - .../node_modules/lodash/lang/isFinite.js | 38 - .../node_modules/lodash/lang/isFunction.js | 42 - .../node_modules/lodash/lang/isMatch.js | 49 - .../node_modules/lodash/lang/isNative.js | 57 - .../node_modules/lodash/lang/isNumber.js | 41 - .../node_modules/lodash/lang/isPlainObject.js | 61 - .../node_modules/lodash/lang/isRegExp.js | 35 - .../node_modules/lodash/lang/isString.js | 35 - .../node_modules/lodash/lang/isTypedArray.js | 74 - .../inquirer/node_modules/lodash/math.js | 6 - .../inquirer/node_modules/lodash/math/max.js | 56 - .../inquirer/node_modules/lodash/math/min.js | 56 - .../inquirer/node_modules/lodash/math/sum.js | 52 - .../node_modules/lodash/number/inRange.js | 47 - .../node_modules/lodash/number/random.js | 70 - .../inquirer/node_modules/lodash/object.js | 30 - .../node_modules/lodash/object/assign.js | 43 - .../node_modules/lodash/object/create.js | 47 - .../node_modules/lodash/object/defaults.js | 32 - .../node_modules/lodash/object/get.js | 33 - .../node_modules/lodash/object/invert.js | 60 - .../node_modules/lodash/object/keys.js | 45 - .../node_modules/lodash/object/merge.js | 54 - .../node_modules/lodash/object/pick.js | 42 - .../node_modules/lodash/object/result.js | 49 - .../node_modules/lodash/object/set.js | 55 - .../node_modules/lodash/object/transform.js | 61 - .../inquirer/node_modules/lodash/package.json | 94 - .../lodash/string/escapeRegExp.js | 32 - .../node_modules/lodash/string/pad.js | 49 - .../node_modules/lodash/string/parseInt.js | 67 - .../node_modules/lodash/string/repeat.js | 49 - .../node_modules/lodash/string/template.js | 226 - .../node_modules/lodash/string/trunc.js | 105 - .../node_modules/lodash/string/words.js | 38 - .../inquirer/node_modules/lodash/support.js | 34 - .../node_modules/lodash/utility/attempt.js | 32 - .../node_modules/lodash/utility/callback.js | 53 - .../node_modules/lodash/utility/mixin.js | 89 - .../node_modules/lodash/utility/propertyOf.js | 30 - .../node_modules/lodash/utility/range.js | 68 - .../node_modules/lodash/utility/times.js | 62 - .../inquirer/node_modules/readline2/README.md | 32 - .../inquirer/node_modules/readline2/index.js | 171 - .../readline2/node_modules/.bin/strip-ansi | 1 - .../node_modules/mute-stream/LICENSE | 27 - .../node_modules/mute-stream/package.json | 55 - .../node_modules/mute-stream/test/basic.js | 207 - .../readline2/node_modules/strip-ansi/cli.js | 47 - .../node_modules/strip-ansi/index.js | 6 - .../node_modules/strip-ansi/package.json | 89 - .../node_modules/strip-ansi/readme.md | 43 - .../node_modules/readline2/package.json | 63 - .../inquirer/node_modules/rx/.coveralls.yml | 2 - .../inquirer/node_modules/rx/.jamignore | 14 - .../inquirer/node_modules/rx/.jscsrc | 54 - .../inquirer/node_modules/rx/.jscsrc.todo | 19 - .../inquirer/node_modules/rx/authors.txt | 3 - .../inquirer/node_modules/rx/bower.json | 37 - .../inquirer/node_modules/rx/component.json | 62 - .../node_modules/rx/dist/rx.aggregates.js | 838 -- .../node_modules/rx/dist/rx.aggregates.map | 1 - .../node_modules/rx/dist/rx.aggregates.min.js | 3 - .../node_modules/rx/dist/rx.all.compat.js | 10945 -------------- .../node_modules/rx/dist/rx.all.compat.map | 1 - .../node_modules/rx/dist/rx.all.compat.min.js | 7 - .../inquirer/node_modules/rx/dist/rx.all.js | 10723 -------------- .../inquirer/node_modules/rx/dist/rx.all.map | 1 - .../node_modules/rx/dist/rx.all.min.js | 6 - .../node_modules/rx/dist/rx.async.compat.js | 586 - .../node_modules/rx/dist/rx.async.compat.map | 1 - .../rx/dist/rx.async.compat.min.js | 3 - .../inquirer/node_modules/rx/dist/rx.async.js | 509 - .../node_modules/rx/dist/rx.async.map | 1 - .../node_modules/rx/dist/rx.async.min.js | 3 - .../node_modules/rx/dist/rx.backpressure.js | 580 - .../node_modules/rx/dist/rx.backpressure.map | 1 - .../rx/dist/rx.backpressure.min.js | 3 - .../node_modules/rx/dist/rx.binding.js | 519 - .../node_modules/rx/dist/rx.binding.map | 1 - .../node_modules/rx/dist/rx.binding.min.js | 3 - .../node_modules/rx/dist/rx.coincidence.js | 815 - .../node_modules/rx/dist/rx.coincidence.map | 1 - .../rx/dist/rx.coincidence.min.js | 3 - .../node_modules/rx/dist/rx.compat.js | 5778 -------- .../node_modules/rx/dist/rx.compat.map | 1 - .../node_modules/rx/dist/rx.compat.min.js | 5 - .../node_modules/rx/dist/rx.experimental.js | 597 - .../node_modules/rx/dist/rx.experimental.map | 1 - .../rx/dist/rx.experimental.min.js | 3 - .../node_modules/rx/dist/rx.joinpatterns.js | 313 - .../node_modules/rx/dist/rx.joinpatterns.map | 1 - .../rx/dist/rx.joinpatterns.min.js | 3 - .../inquirer/node_modules/rx/dist/rx.js | 5587 ------- .../node_modules/rx/dist/rx.lite.compat.js | 6529 -------- .../node_modules/rx/dist/rx.lite.compat.map | 1 - .../rx/dist/rx.lite.compat.min.js | 5 - .../rx/dist/rx.lite.extras.compat.js | 630 - .../rx/dist/rx.lite.extras.compat.map | 1 - .../rx/dist/rx.lite.extras.compat.min.js | 3 - .../node_modules/rx/dist/rx.lite.extras.js | 630 - .../node_modules/rx/dist/rx.lite.extras.map | 1 - .../rx/dist/rx.lite.extras.min.js | 3 - .../inquirer/node_modules/rx/dist/rx.lite.map | 1 - .../node_modules/rx/dist/rx.lite.min.js | 6 - .../inquirer/node_modules/rx/dist/rx.map | 1 - .../inquirer/node_modules/rx/dist/rx.min.js | 6 - .../node_modules/rx/dist/rx.sorting.js | 72 - .../node_modules/rx/dist/rx.sorting.map | 1 - .../node_modules/rx/dist/rx.sorting.min.js | 3 - .../node_modules/rx/dist/rx.testing.js | 530 - .../node_modules/rx/dist/rx.testing.map | 1 - .../node_modules/rx/dist/rx.testing.min.js | 3 - .../inquirer/node_modules/rx/dist/rx.time.js | 1168 -- .../inquirer/node_modules/rx/dist/rx.time.map | 1 - .../node_modules/rx/dist/rx.time.min.js | 3 - .../node_modules/rx/dist/rx.virtualtime.js | 313 - .../node_modules/rx/dist/rx.virtualtime.map | 1 - .../rx/dist/rx.virtualtime.min.js | 3 - .../inquirer/node_modules/rx/index.js | 14 - .../inquirer/node_modules/rx/license.txt | 15 - .../inquirer/node_modules/rx/logos/logo.png | Bin 12929 -> 0 bytes .../inquirer/node_modules/rx/package.json | 80 - .../inquirer/node_modules/rx/readme.md | 447 - .../inquirer/node_modules/rx/ts/rx-lite.d.ts | 695 - .../node_modules/rx/ts/rx.aggregates.d.ts | 61 - .../inquirer/node_modules/rx/ts/rx.all.d.ts | 20 - .../node_modules/rx/ts/rx.async-lite.d.ts | 72 - .../node_modules/rx/ts/rx.async-tests.ts | 84 - .../inquirer/node_modules/rx/ts/rx.async.d.ts | 43 - .../rx/ts/rx.backpressure-lite.d.ts | 48 - .../rx/ts/rx.backpressure-tests.ts | 22 - .../node_modules/rx/ts/rx.backpressure.d.ts | 11 - .../node_modules/rx/ts/rx.binding-lite.d.ts | 73 - .../node_modules/rx/ts/rx.binding.d.ts | 11 - .../rx/ts/rx.coincidence-lite.d.ts | 34 - .../node_modules/rx/ts/rx.coincidence.d.ts | 36 - .../inquirer/node_modules/rx/ts/rx.d.ts | 67 - .../node_modules/rx/ts/rx.experimental.d.ts | 321 - .../node_modules/rx/ts/rx.joinpatterns.d.ts | 60 - .../inquirer/node_modules/rx/ts/rx.lite.d.ts | 15 - .../node_modules/rx/ts/rx.testing.d.ts | 64 - .../node_modules/rx/ts/rx.time-lite.d.ts | 47 - .../inquirer/node_modules/rx/ts/rx.time.d.ts | 66 - .../node_modules/rx/ts/rx.virtualtime.d.ts | 41 - .../inquirer/node_modules/through/.travis.yml | 5 - .../inquirer/node_modules/through/LICENSE.MIT | 24 - .../inquirer/node_modules/through/index.js | 108 - .../node_modules/through/package.json | 66 - .../node_modules/through/readme.markdown | 64 - .../node_modules/through/test/async.js | 28 - .../node_modules/through/test/auto-destroy.js | 30 - .../node_modules/through/test/buffering.js | 71 - .../inquirer/node_modules/through/test/end.js | 45 - .../node_modules/through/test/index.js | 133 - .../eslint/node_modules/inquirer/package.json | 117 +- tools/eslint/node_modules/is-buffer/.zuul.yml | 18 + tools/eslint/node_modules/is-buffer/LICENSE | 21 + tools/eslint/node_modules/is-buffer/README.md | 49 + tools/eslint/node_modules/is-buffer/index.js | 17 + .../node_modules/is-buffer/package.json | 99 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 100 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/is-my-json-valid/.npmignore | 2 - .../node_modules/is-my-json-valid/.travis.yml | 3 - .../node_modules/is-my-json-valid/README.md | 2 +- .../node_modules/is-my-json-valid/index.js | 34 +- .../node_modules/generate-function/.npmignore | 1 - .../generate-function/.travis.yml | 3 - .../generate-function/package.json | 53 - .../node_modules/generate-function/test.js | 33 - .../generate-object-property/.npmignore | 1 - .../generate-object-property/.travis.yml | 3 - .../node_modules/is-property/.npmignore | 17 - .../node_modules/is-property/README.md | 28 - .../node_modules/is-property/package.json | 59 - .../generate-object-property/package.json | 51 - .../generate-object-property/test.js | 12 - .../node_modules/jsonpointer/.travis.yml | 6 - .../node_modules/jsonpointer/README.md | 31 - .../node_modules/jsonpointer/package.json | 61 - .../node_modules/jsonpointer/test.js | 100 - .../node_modules/xtend/.jshintrc | 30 - .../node_modules/xtend/.npmignore | 1 - .../node_modules/xtend/immutable.js | 17 - .../node_modules/xtend/mutable.js | 15 - .../node_modules/xtend/package.json | 88 - .../node_modules/xtend/test.js | 63 - .../is-my-json-valid/package.json | 105 +- .../is-my-json-valid/test/fixtures/cosmic.js | 84 - .../json-schema-draft4/additionalItems.json | 82 - .../additionalProperties.json | 88 - .../test/json-schema-draft4/allOf.json | 112 - .../test/json-schema-draft4/anyOf.json | 68 - .../test/json-schema-draft4/bignum.json | 107 - .../test/json-schema-draft4/default.json | 49 - .../test/json-schema-draft4/definitions.json | 32 - .../test/json-schema-draft4/dependencies.json | 113 - .../test/json-schema-draft4/enum.json | 72 - .../test/json-schema-draft4/format.json | 143 - .../test/json-schema-draft4/items.json | 46 - .../test/json-schema-draft4/maxItems.json | 28 - .../test/json-schema-draft4/maxLength.json | 28 - .../json-schema-draft4/maxProperties.json | 28 - .../test/json-schema-draft4/maximum.json | 42 - .../test/json-schema-draft4/minItems.json | 28 - .../test/json-schema-draft4/minLength.json | 28 - .../json-schema-draft4/minProperties.json | 28 - .../test/json-schema-draft4/minimum.json | 42 - .../test/json-schema-draft4/multipleOf.json | 60 - .../test/json-schema-draft4/not.json | 96 - .../json-schema-draft4/nullAndFormat.json | 18 - .../test/json-schema-draft4/oneOf.json | 68 - .../test/json-schema-draft4/pattern.json | 23 - .../json-schema-draft4/patternProperties.json | 110 - .../test/json-schema-draft4/properties.json | 92 - .../test/json-schema-draft4/ref.json | 128 - .../test/json-schema-draft4/refRemote.json | 74 - .../test/json-schema-draft4/required.json | 39 - .../test/json-schema-draft4/type.json | 330 - .../test/json-schema-draft4/uniqueItems.json | 79 - .../is-my-json-valid/test/json-schema.js | 23 - .../is-my-json-valid/test/misc.js | 429 - .../eslint/node_modules/is-path-cwd/index.js | 6 + .../node_modules/is-path-cwd/package.json | 88 + .../eslint/node_modules/is-path-cwd/readme.md | 28 + .../node_modules/is-path-in-cwd/index.js | 6 + .../node_modules/is-path-in-cwd/package.json | 92 + .../node_modules/is-path-in-cwd/readme.md | 28 + .../node_modules/is-path-inside/index.js | 14 + .../node_modules/is-path-inside/package.json | 90 + .../node_modules/is-path-inside/readme.md | 31 + .../node_modules => }/is-property/LICENSE | 0 .../eslint/node_modules/is-property/README.md | 28 + .../is-property/is-property.js | 0 .../node_modules/is-property/package.json | 84 + .../eslint/node_modules/is-resolvable/LICENSE | 20 + .../node_modules/is-resolvable/README.md | 68 + .../node_modules/is-resolvable/index.js | 26 + .../node_modules/is-resolvable/package.json | 96 + .../node_modules => }/isarray/README.md | 0 .../node_modules/isarray/build/build.js | 208 + .../node_modules => }/isarray/index.js | 0 .../eslint/node_modules/isarray/package.json | 79 + .../eslint/node_modules/js-yaml/CHANGELOG.md | 299 - tools/eslint/node_modules/js-yaml/README.md | 11 +- tools/eslint/node_modules/js-yaml/bower.json | 23 - .../node_modules/js-yaml/dist/js-yaml.js | 848 +- .../node_modules/js-yaml/dist/js-yaml.min.js | 3 + .../js-yaml/examples/custom_types.js | 103 - .../js-yaml/examples/custom_types.yml | 18 - .../node_modules/js-yaml/examples/dumper.js | 32 - .../node_modules/js-yaml/examples/dumper.json | 22 - .../js-yaml/examples/sample_document.js | 19 - .../js-yaml/examples/sample_document.yml | 197 - .../node_modules/js-yaml/lib/js-yaml.js | 2 +- .../js-yaml/lib/js-yaml/dumper.js | 38 +- .../js-yaml/lib/js-yaml/exception.js | 33 +- .../js-yaml/lib/js-yaml/loader.js | 24 +- .../js-yaml/lib/js-yaml/type/binary.js | 4 +- .../js-yaml/lib/js-yaml/type/float.js | 15 +- .../js-yaml/lib/js-yaml/type/js/function.js | 4 +- .../js-yaml/lib/js-yaml/type/js/regexp.js | 1 - .../js-yaml/lib/js-yaml/type/timestamp.js | 7 +- .../node_modules/argparse/CHANGELOG.md | 136 - .../js-yaml/node_modules/argparse/README.md | 243 - .../argparse/examples/arguments.js | 36 - .../node_modules/argparse/examples/choice.js | 22 - .../argparse/examples/constants.js | 59 - .../node_modules/argparse/examples/help.js | 13 - .../node_modules/argparse/examples/nargs.js | 33 - .../node_modules/argparse/examples/parents.js | 28 - .../argparse/examples/prefix_chars.js | 23 - .../argparse/examples/sub_commands.js | 49 - .../node_modules/argparse/examples/sum.js | 35 - .../argparse/examples/testformatters.js | 270 - .../argparse/lib/argument/group.js | 75 - .../argparse/node_modules/lodash/README.md | 120 - .../argparse/node_modules/lodash/array.js | 44 - .../node_modules/lodash/array/chunk.js | 47 - .../node_modules/lodash/array/compact.js | 30 - .../node_modules/lodash/array/difference.js | 28 - .../node_modules/lodash/array/drop.js | 39 - .../node_modules/lodash/array/dropRight.js | 40 - .../lodash/array/dropRightWhile.js | 59 - .../node_modules/lodash/array/dropWhile.js | 59 - .../node_modules/lodash/array/fill.js | 44 - .../node_modules/lodash/array/findIndex.js | 53 - .../lodash/array/findLastIndex.js | 53 - .../node_modules/lodash/array/first.js | 22 - .../node_modules/lodash/array/flatten.js | 32 - .../node_modules/lodash/array/flattenDeep.js | 21 - .../node_modules/lodash/array/head.js | 1 - .../node_modules/lodash/array/indexOf.js | 54 - .../node_modules/lodash/array/initial.js | 20 - .../node_modules/lodash/array/intersection.js | 58 - .../node_modules/lodash/array/last.js | 19 - .../node_modules/lodash/array/lastIndexOf.js | 60 - .../node_modules/lodash/array/object.js | 1 - .../node_modules/lodash/array/pull.js | 52 - .../node_modules/lodash/array/pullAt.js | 40 - .../node_modules/lodash/array/remove.js | 64 - .../node_modules/lodash/array/rest.js | 21 - .../node_modules/lodash/array/slice.js | 30 - .../node_modules/lodash/array/sortedIndex.js | 53 - .../lodash/array/sortedLastIndex.js | 25 - .../node_modules/lodash/array/tail.js | 1 - .../node_modules/lodash/array/take.js | 39 - .../node_modules/lodash/array/takeRight.js | 40 - .../lodash/array/takeRightWhile.js | 59 - .../node_modules/lodash/array/takeWhile.js | 59 - .../node_modules/lodash/array/union.js | 24 - .../node_modules/lodash/array/uniq.js | 71 - .../node_modules/lodash/array/unique.js | 1 - .../node_modules/lodash/array/unzip.js | 47 - .../node_modules/lodash/array/unzipWith.js | 41 - .../node_modules/lodash/array/without.js | 27 - .../argparse/node_modules/lodash/array/xor.js | 34 - .../argparse/node_modules/lodash/array/zip.js | 21 - .../node_modules/lodash/array/zipObject.js | 43 - .../node_modules/lodash/array/zipWith.js | 36 - .../argparse/node_modules/lodash/chain.js | 15 - .../node_modules/lodash/chain/chain.js | 35 - .../node_modules/lodash/chain/commit.js | 1 - .../node_modules/lodash/chain/lodash.js | 123 - .../node_modules/lodash/chain/plant.js | 1 - .../node_modules/lodash/chain/reverse.js | 1 - .../argparse/node_modules/lodash/chain/run.js | 1 - .../argparse/node_modules/lodash/chain/tap.js | 29 - .../node_modules/lodash/chain/thru.js | 26 - .../node_modules/lodash/chain/toJSON.js | 1 - .../node_modules/lodash/chain/toString.js | 1 - .../node_modules/lodash/chain/value.js | 1 - .../node_modules/lodash/chain/valueOf.js | 1 - .../node_modules/lodash/chain/wrapperChain.js | 32 - .../lodash/chain/wrapperCommit.js | 32 - .../node_modules/lodash/chain/wrapperPlant.js | 45 - .../lodash/chain/wrapperReverse.js | 38 - .../lodash/chain/wrapperToString.js | 17 - .../node_modules/lodash/chain/wrapperValue.js | 20 - .../node_modules/lodash/collection.js | 44 - .../node_modules/lodash/collection/all.js | 1 - .../node_modules/lodash/collection/any.js | 1 - .../node_modules/lodash/collection/at.js | 29 - .../node_modules/lodash/collection/collect.js | 1 - .../lodash/collection/contains.js | 1 - .../node_modules/lodash/collection/countBy.js | 54 - .../node_modules/lodash/collection/detect.js | 1 - .../node_modules/lodash/collection/each.js | 1 - .../lodash/collection/eachRight.js | 1 - .../node_modules/lodash/collection/every.js | 66 - .../node_modules/lodash/collection/filter.js | 61 - .../node_modules/lodash/collection/find.js | 56 - .../lodash/collection/findLast.js | 25 - .../lodash/collection/findWhere.js | 37 - .../node_modules/lodash/collection/foldl.js | 1 - .../node_modules/lodash/collection/foldr.js | 1 - .../node_modules/lodash/collection/forEach.js | 37 - .../lodash/collection/forEachRight.js | 26 - .../node_modules/lodash/collection/groupBy.js | 59 - .../node_modules/lodash/collection/include.js | 1 - .../lodash/collection/includes.js | 60 - .../node_modules/lodash/collection/indexBy.js | 53 - .../node_modules/lodash/collection/inject.js | 1 - .../node_modules/lodash/collection/invoke.js | 42 - .../node_modules/lodash/collection/map.js | 68 - .../node_modules/lodash/collection/max.js | 1 - .../node_modules/lodash/collection/min.js | 1 - .../lodash/collection/partition.js | 66 - .../node_modules/lodash/collection/pluck.js | 31 - .../node_modules/lodash/collection/reduce.js | 43 - .../lodash/collection/reduceRight.js | 29 - .../node_modules/lodash/collection/reject.js | 50 - .../node_modules/lodash/collection/sample.js | 50 - .../node_modules/lodash/collection/select.js | 1 - .../node_modules/lodash/collection/shuffle.js | 24 - .../node_modules/lodash/collection/size.js | 30 - .../node_modules/lodash/collection/some.js | 67 - .../node_modules/lodash/collection/sortBy.js | 71 - .../lodash/collection/sortByAll.js | 52 - .../lodash/collection/sortByOrder.js | 55 - .../node_modules/lodash/collection/sum.js | 1 - .../node_modules/lodash/collection/where.js | 37 - .../argparse/node_modules/lodash/date.js | 3 - .../argparse/node_modules/lodash/date/now.js | 24 - .../argparse/node_modules/lodash/function.js | 27 - .../node_modules/lodash/function/after.js | 48 - .../node_modules/lodash/function/ary.js | 34 - .../node_modules/lodash/function/backflow.js | 1 - .../node_modules/lodash/function/before.js | 42 - .../node_modules/lodash/function/bind.js | 56 - .../node_modules/lodash/function/bindAll.js | 50 - .../node_modules/lodash/function/bindKey.js | 66 - .../node_modules/lodash/function/compose.js | 1 - .../node_modules/lodash/function/curry.js | 51 - .../lodash/function/curryRight.js | 48 - .../node_modules/lodash/function/debounce.js | 187 - .../node_modules/lodash/function/defer.js | 25 - .../node_modules/lodash/function/delay.js | 26 - .../node_modules/lodash/function/flow.js | 25 - .../node_modules/lodash/function/flowRight.js | 25 - .../node_modules/lodash/function/memoize.js | 80 - .../node_modules/lodash/function/negate.js | 32 - .../node_modules/lodash/function/once.js | 24 - .../node_modules/lodash/function/partial.js | 43 - .../lodash/function/partialRight.js | 42 - .../node_modules/lodash/function/rearg.js | 40 - .../node_modules/lodash/function/restParam.js | 58 - .../node_modules/lodash/function/spread.js | 44 - .../node_modules/lodash/function/throttle.js | 72 - .../node_modules/lodash/function/wrap.js | 33 - .../argparse/node_modules/lodash/index.js | 12235 --------------- .../lodash/internal/LazyWrapper.js | 27 - .../lodash/internal/LodashWrapper.js | 21 - .../node_modules/lodash/internal/MapCache.js | 24 - .../node_modules/lodash/internal/SetCache.js | 29 - .../node_modules/lodash/internal/arrayCopy.js | 20 - .../node_modules/lodash/internal/arrayEach.js | 22 - .../lodash/internal/arrayEachRight.js | 21 - .../lodash/internal/arrayEvery.js | 23 - .../lodash/internal/arrayExtremum.js | 30 - .../lodash/internal/arrayFilter.js | 25 - .../node_modules/lodash/internal/arrayMap.js | 21 - .../lodash/internal/arrayReduce.js | 26 - .../lodash/internal/arrayReduceRight.js | 24 - .../node_modules/lodash/internal/arraySome.js | 23 - .../node_modules/lodash/internal/arraySum.js | 18 - .../lodash/internal/assignDefaults.js | 13 - .../lodash/internal/assignOwnDefaults.js | 26 - .../lodash/internal/assignWith.js | 32 - .../lodash/internal/baseAssign.js | 19 - .../node_modules/lodash/internal/baseAt.js | 32 - .../lodash/internal/baseCallback.js | 35 - .../node_modules/lodash/internal/baseClone.js | 128 - .../lodash/internal/baseCompareAscending.js | 34 - .../node_modules/lodash/internal/baseCopy.js | 23 - .../lodash/internal/baseCreate.js | 23 - .../node_modules/lodash/internal/baseDelay.js | 21 - .../lodash/internal/baseDifference.js | 52 - .../node_modules/lodash/internal/baseEach.js | 15 - .../lodash/internal/baseEachRight.js | 15 - .../node_modules/lodash/internal/baseEvery.js | 22 - .../lodash/internal/baseExtremum.js | 29 - .../node_modules/lodash/internal/baseFill.js | 31 - .../lodash/internal/baseFilter.js | 22 - .../node_modules/lodash/internal/baseFind.js | 25 - .../lodash/internal/baseFindIndex.js | 23 - .../lodash/internal/baseFlatten.js | 43 - .../node_modules/lodash/internal/baseFor.js | 17 - .../node_modules/lodash/internal/baseForIn.js | 17 - .../lodash/internal/baseForOwn.js | 17 - .../lodash/internal/baseForOwnRight.js | 17 - .../lodash/internal/baseForRight.js | 15 - .../lodash/internal/baseFunctions.js | 27 - .../node_modules/lodash/internal/baseGet.js | 29 - .../lodash/internal/baseIndexOf.js | 27 - .../lodash/internal/baseIsEqual.js | 28 - .../lodash/internal/baseIsEqualDeep.js | 102 - .../lodash/internal/baseIsFunction.js | 15 - .../lodash/internal/baseIsMatch.js | 52 - .../lodash/internal/baseLodash.js | 10 - .../node_modules/lodash/internal/baseMap.js | 23 - .../lodash/internal/baseMatches.js | 30 - .../lodash/internal/baseMatchesProperty.js | 45 - .../node_modules/lodash/internal/baseMerge.js | 56 - .../lodash/internal/baseMergeDeep.js | 67 - .../lodash/internal/baseProperty.js | 14 - .../lodash/internal/basePropertyDeep.js | 19 - .../lodash/internal/basePullAt.js | 30 - .../lodash/internal/baseRandom.js | 20 - .../lodash/internal/baseReduce.js | 24 - .../lodash/internal/baseSetData.js | 17 - .../node_modules/lodash/internal/baseSlice.js | 32 - .../node_modules/lodash/internal/baseSome.js | 23 - .../lodash/internal/baseSortBy.js | 21 - .../lodash/internal/baseSortByOrder.js | 31 - .../node_modules/lodash/internal/baseSum.js | 20 - .../lodash/internal/baseToString.js | 16 - .../node_modules/lodash/internal/baseUniq.js | 57 - .../lodash/internal/baseValues.js | 22 - .../node_modules/lodash/internal/baseWhile.js | 24 - .../lodash/internal/baseWrapperValue.js | 37 - .../lodash/internal/binaryIndex.js | 39 - .../lodash/internal/binaryIndexBy.js | 59 - .../lodash/internal/bindCallback.js | 39 - .../lodash/internal/bufferClone.js | 55 - .../lodash/internal/cacheIndexOf.js | 19 - .../node_modules/lodash/internal/cachePush.js | 20 - .../lodash/internal/charsLeftIndex.js | 18 - .../lodash/internal/charsRightIndex.js | 17 - .../lodash/internal/compareAscending.js | 16 - .../lodash/internal/compareMultiple.js | 43 - .../lodash/internal/composeArgs.js | 34 - .../lodash/internal/composeArgsRight.js | 36 - .../lodash/internal/createAggregator.js | 40 - .../lodash/internal/createAssigner.js | 44 - .../lodash/internal/createBaseEach.js | 31 - .../lodash/internal/createBaseFor.js | 27 - .../lodash/internal/createBindWrapper.js | 22 - .../lodash/internal/createCache.js | 22 - .../lodash/internal/createCompounder.js | 26 - .../lodash/internal/createCtorWrapper.js | 35 - .../lodash/internal/createCurry.js | 23 - .../lodash/internal/createExtremum.js | 32 - .../lodash/internal/createFind.js | 25 - .../lodash/internal/createFindIndex.js | 21 - .../lodash/internal/createFindKey.js | 18 - .../lodash/internal/createFlow.js | 69 - .../lodash/internal/createForEach.js | 20 - .../lodash/internal/createForIn.js | 20 - .../lodash/internal/createForOwn.js | 19 - .../lodash/internal/createHybridWrapper.js | 111 - .../lodash/internal/createObjectMapper.js | 26 - .../lodash/internal/createPadDir.js | 18 - .../lodash/internal/createPadding.js | 31 - .../lodash/internal/createPartial.js | 20 - .../lodash/internal/createPartialWrapper.js | 43 - .../lodash/internal/createReduce.js | 22 - .../lodash/internal/createSortedIndex.js | 20 - .../lodash/internal/createWrapper.js | 86 - .../lodash/internal/deburrLetter.js | 33 - .../lodash/internal/equalArrays.js | 51 - .../lodash/internal/equalByTag.js | 48 - .../lodash/internal/equalObjects.js | 67 - .../lodash/internal/escapeHtmlChar.js | 22 - .../lodash/internal/escapeStringChar.js | 23 - .../node_modules/lodash/internal/getData.js | 15 - .../lodash/internal/getFuncName.js | 25 - .../node_modules/lodash/internal/getLength.js | 15 - .../lodash/internal/getMatchData.js | 21 - .../node_modules/lodash/internal/getNative.js | 16 - .../node_modules/lodash/internal/getView.js | 33 - .../lodash/internal/indexOfNaN.js | 23 - .../lodash/internal/initCloneArray.js | 26 - .../lodash/internal/initCloneByTag.js | 63 - .../lodash/internal/initCloneObject.js | 16 - .../lodash/internal/invokePath.js | 26 - .../lodash/internal/isArrayLike.js | 15 - .../node_modules/lodash/internal/isIndex.js | 24 - .../lodash/internal/isIterateeCall.js | 28 - .../node_modules/lodash/internal/isKey.js | 28 - .../lodash/internal/isLaziable.js | 26 - .../node_modules/lodash/internal/isLength.js | 20 - .../lodash/internal/isObjectLike.js | 12 - .../node_modules/lodash/internal/isSpace.js | 14 - .../lodash/internal/isStrictComparable.js | 15 - .../node_modules/lodash/internal/lazyClone.js | 27 - .../lodash/internal/lazyReverse.js | 23 - .../node_modules/lodash/internal/lazyValue.js | 81 - .../node_modules/lodash/internal/mapDelete.js | 14 - .../node_modules/lodash/internal/mapGet.js | 14 - .../node_modules/lodash/internal/mapHas.js | 20 - .../node_modules/lodash/internal/mapSet.js | 18 - .../node_modules/lodash/internal/mergeData.js | 89 - .../node_modules/lodash/internal/metaMap.js | 9 - .../lodash/internal/pickByArray.js | 28 - .../lodash/internal/pickByCallback.js | 22 - .../node_modules/lodash/internal/reEscape.js | 4 - .../lodash/internal/reEvaluate.js | 4 - .../lodash/internal/reInterpolate.js | 4 - .../node_modules/lodash/internal/realNames.js | 4 - .../node_modules/lodash/internal/reorder.js | 29 - .../lodash/internal/replaceHolders.js | 28 - .../node_modules/lodash/internal/setData.js | 41 - .../lodash/internal/shimIsPlainObject.js | 50 - .../node_modules/lodash/internal/shimKeys.js | 41 - .../lodash/internal/sortedUniq.js | 29 - .../lodash/internal/toIterable.js | 22 - .../node_modules/lodash/internal/toObject.js | 14 - .../node_modules/lodash/internal/toPath.js | 28 - .../lodash/internal/trimmedLeftIndex.js | 19 - .../lodash/internal/trimmedRightIndex.js | 18 - .../lodash/internal/unescapeHtmlChar.js | 22 - .../lodash/internal/wrapperClone.js | 18 - .../argparse/node_modules/lodash/lang.js | 32 - .../node_modules/lodash/lang/clone.js | 70 - .../node_modules/lodash/lang/cloneDeep.js | 55 - .../argparse/node_modules/lodash/lang/eq.js | 1 - .../argparse/node_modules/lodash/lang/gt.js | 25 - .../argparse/node_modules/lodash/lang/gte.js | 25 - .../node_modules/lodash/lang/isArguments.js | 36 - .../node_modules/lodash/lang/isArray.js | 40 - .../node_modules/lodash/lang/isBoolean.js | 35 - .../node_modules/lodash/lang/isDate.js | 35 - .../node_modules/lodash/lang/isElement.js | 41 - .../node_modules/lodash/lang/isEmpty.js | 47 - .../node_modules/lodash/lang/isEqual.js | 54 - .../node_modules/lodash/lang/isError.js | 36 - .../node_modules/lodash/lang/isFinite.js | 38 - .../node_modules/lodash/lang/isFunction.js | 42 - .../node_modules/lodash/lang/isMatch.js | 49 - .../node_modules/lodash/lang/isNaN.js | 34 - .../node_modules/lodash/lang/isNative.js | 57 - .../node_modules/lodash/lang/isNull.js | 21 - .../node_modules/lodash/lang/isNumber.js | 41 - .../node_modules/lodash/lang/isObject.js | 28 - .../node_modules/lodash/lang/isPlainObject.js | 61 - .../node_modules/lodash/lang/isRegExp.js | 35 - .../node_modules/lodash/lang/isString.js | 35 - .../node_modules/lodash/lang/isTypedArray.js | 74 - .../node_modules/lodash/lang/isUndefined.js | 21 - .../argparse/node_modules/lodash/lang/lt.js | 25 - .../argparse/node_modules/lodash/lang/lte.js | 25 - .../node_modules/lodash/lang/toArray.js | 32 - .../node_modules/lodash/lang/toPlainObject.js | 31 - .../argparse/node_modules/lodash/math.js | 6 - .../argparse/node_modules/lodash/math/add.js | 19 - .../argparse/node_modules/lodash/math/max.js | 56 - .../argparse/node_modules/lodash/math/min.js | 56 - .../argparse/node_modules/lodash/math/sum.js | 52 - .../argparse/node_modules/lodash/number.js | 4 - .../node_modules/lodash/number/inRange.js | 47 - .../node_modules/lodash/number/random.js | 70 - .../argparse/node_modules/lodash/object.js | 30 - .../node_modules/lodash/object/assign.js | 43 - .../node_modules/lodash/object/create.js | 47 - .../node_modules/lodash/object/defaults.js | 32 - .../node_modules/lodash/object/extend.js | 1 - .../node_modules/lodash/object/findKey.js | 54 - .../node_modules/lodash/object/findLastKey.js | 54 - .../node_modules/lodash/object/forIn.js | 33 - .../node_modules/lodash/object/forInRight.js | 31 - .../node_modules/lodash/object/forOwn.js | 33 - .../node_modules/lodash/object/forOwnRight.js | 31 - .../node_modules/lodash/object/functions.js | 23 - .../node_modules/lodash/object/get.js | 33 - .../node_modules/lodash/object/has.js | 57 - .../node_modules/lodash/object/invert.js | 60 - .../node_modules/lodash/object/keys.js | 45 - .../node_modules/lodash/object/keysIn.js | 64 - .../node_modules/lodash/object/mapKeys.js | 25 - .../node_modules/lodash/object/mapValues.js | 46 - .../node_modules/lodash/object/merge.js | 54 - .../node_modules/lodash/object/methods.js | 1 - .../node_modules/lodash/object/omit.js | 47 - .../node_modules/lodash/object/pairs.js | 33 - .../node_modules/lodash/object/pick.js | 42 - .../node_modules/lodash/object/result.js | 49 - .../node_modules/lodash/object/set.js | 55 - .../node_modules/lodash/object/transform.js | 61 - .../node_modules/lodash/object/values.js | 33 - .../node_modules/lodash/object/valuesIn.js | 31 - .../argparse/node_modules/lodash/package.json | 94 - .../argparse/node_modules/lodash/string.js | 25 - .../node_modules/lodash/string/camelCase.js | 27 - .../node_modules/lodash/string/capitalize.js | 21 - .../node_modules/lodash/string/deburr.js | 29 - .../node_modules/lodash/string/endsWith.js | 40 - .../node_modules/lodash/string/escape.js | 48 - .../lodash/string/escapeRegExp.js | 32 - .../node_modules/lodash/string/kebabCase.js | 26 - .../node_modules/lodash/string/pad.js | 49 - .../node_modules/lodash/string/padLeft.js | 27 - .../node_modules/lodash/string/padRight.js | 27 - .../node_modules/lodash/string/parseInt.js | 67 - .../node_modules/lodash/string/repeat.js | 49 - .../node_modules/lodash/string/snakeCase.js | 26 - .../node_modules/lodash/string/startCase.js | 26 - .../node_modules/lodash/string/startsWith.js | 36 - .../node_modules/lodash/string/template.js | 226 - .../lodash/string/templateSettings.js | 67 - .../node_modules/lodash/string/trim.js | 42 - .../node_modules/lodash/string/trimLeft.js | 36 - .../node_modules/lodash/string/trimRight.js | 36 - .../node_modules/lodash/string/trunc.js | 105 - .../node_modules/lodash/string/unescape.js | 33 - .../node_modules/lodash/string/words.js | 38 - .../argparse/node_modules/lodash/support.js | 34 - .../argparse/node_modules/lodash/utility.js | 18 - .../node_modules/lodash/utility/attempt.js | 32 - .../node_modules/lodash/utility/callback.js | 53 - .../node_modules/lodash/utility/constant.js | 23 - .../node_modules/lodash/utility/identity.js | 20 - .../node_modules/lodash/utility/iteratee.js | 1 - .../node_modules/lodash/utility/matches.js | 33 - .../lodash/utility/matchesProperty.js | 32 - .../node_modules/lodash/utility/method.js | 33 - .../node_modules/lodash/utility/methodOf.js | 32 - .../node_modules/lodash/utility/mixin.js | 89 - .../node_modules/lodash/utility/noop.js | 19 - .../node_modules/lodash/utility/property.js | 31 - .../node_modules/lodash/utility/propertyOf.js | 30 - .../node_modules/lodash/utility/range.js | 68 - .../node_modules/lodash/utility/times.js | 62 - .../node_modules/lodash/utility/uniqueId.js | 27 - .../node_modules/sprintf-js/.npmignore | 1 - .../argparse/node_modules/sprintf-js/LICENSE | 24 - .../node_modules/sprintf-js/README.md | 82 - .../node_modules/sprintf-js/bower.json | 14 - .../node_modules/sprintf-js/demo/angular.html | 20 - .../sprintf-js/dist/sprintf.min.js | 4 - .../sprintf-js/dist/sprintf.min.map | 1 - .../node_modules/sprintf-js/gruntfile.js | 36 - .../node_modules/sprintf-js/package.json | 51 - .../node_modules/sprintf-js/test/test.js | 72 - .../node_modules/argparse/package.json | 62 - .../js-yaml/node_modules/esprima/ChangeLog | 111 - .../js-yaml/node_modules/esprima/LICENSE.BSD | 2 + .../js-yaml/node_modules/esprima/README.md | 14 +- .../node_modules/esprima/bin/esparse.js | 3 +- .../node_modules/esprima/bin/esvalidate.js | 2 +- .../js-yaml/node_modules/esprima/esprima.js | 1194 +- .../js-yaml/node_modules/esprima/package.json | 188 +- .../js-yaml/node_modules/esprima/test/run.js | 66 - .../node_modules/esprima/test/runner.js | 475 - .../eslint/node_modules/js-yaml/package.json | 122 +- .../LICENSE | 0 .../json-stable-stringify/index.js | 83 + .../json-stable-stringify/package.json | 95 + .../json-stable-stringify/readme.markdown | 130 + .../node_modules/jsonify/README.markdown | 34 + tools/eslint/node_modules/jsonify/index.js | 2 + .../eslint/node_modules/jsonify/lib/parse.js | 273 + .../node_modules/jsonify/lib/stringify.js | 154 + .../eslint/node_modules/jsonify/package.json | 82 + .../eslint/node_modules/jsonpointer/README.md | 32 + .../jsonpointer/jsonpointer.js | 17 +- .../node_modules/jsonpointer/package.json | 91 + tools/eslint/node_modules/kind-of/LICENSE | 22 + tools/eslint/node_modules/kind-of/README.md | 212 + tools/eslint/node_modules/kind-of/index.js | 84 + .../eslint/node_modules/kind-of/package.json | 115 + tools/eslint/node_modules/lazy-cache/LICENSE | 21 + .../eslint/node_modules/lazy-cache/README.md | 128 + tools/eslint/node_modules/lazy-cache/index.js | 67 + .../node_modules/lazy-cache/package.json | 105 + .../node_modules => }/levn/LICENSE | 0 .../node_modules => }/levn/README.md | 0 .../node_modules => }/levn/lib/cast.js | 0 .../node_modules => }/levn/lib/coerce.js | 0 .../node_modules => }/levn/lib/index.js | 0 .../levn/lib/parse-string.js | 0 .../node_modules => }/levn/lib/parse.js | 0 tools/eslint/node_modules/levn/package.json | 103 + .../lodash._arraycopy/LICENSE.txt | 22 + .../node_modules/lodash._arraycopy/README.md | 20 + .../node_modules/lodash._arraycopy/index.js | 29 + .../lodash._arraycopy/package.json | 100 + .../lodash._arrayeach/LICENSE.txt | 22 + .../node_modules/lodash._arrayeach/README.md | 20 + .../node_modules/lodash._arrayeach/index.js | 31 + .../lodash._arrayeach/package.json | 100 + .../node_modules/lodash._arraymap/LICENSE.txt | 22 + .../node_modules/lodash._arraymap/README.md | 20 + .../node_modules/lodash._arraymap/index.js | 30 + .../lodash._arraymap/package.json | 99 + .../lodash => lodash._baseassign}/LICENSE.txt | 0 .../node_modules/lodash._baseassign/README.md | 20 + .../node_modules/lodash._baseassign/index.js | 27 + .../lodash._baseassign/package.json | 118 + .../LICENSE.txt => lodash._baseclone/LICENSE} | 0 .../node_modules/lodash._baseclone/README.md | 20 + .../node_modules/lodash._baseclone/index.js | 271 + .../lodash._baseclone/package.json | 122 + .../node_modules/lodash._basecopy/LICENSE.txt | 22 + .../node_modules/lodash._basecopy/README.md | 20 + .../node_modules/lodash._basecopy/index.js | 32 + .../lodash._basecopy/package.json | 116 + .../lodash._basedifference/LICENSE | 22 + .../lodash._basedifference/README.md | 20 + .../lodash._basedifference/index.js | 63 + .../lodash._basedifference/package.json | 119 + .../node_modules/lodash._baseflatten/LICENSE | 22 + .../lodash._baseflatten/README.md | 20 + .../node_modules/lodash._baseflatten/index.js | 131 + .../lodash._baseflatten/package.json | 118 + .../node_modules/lodash._basefor/LICENSE.txt | 22 + .../node_modules/lodash._basefor/README.md | 20 + .../node_modules/lodash._basefor/index.js | 86 + .../node_modules/lodash._basefor/package.json | 117 + .../lodash._baseindexof/LICENSE.txt | 22 + .../lodash._baseindexof/README.md | 20 + .../node_modules/lodash._baseindexof/index.js | 57 + .../lodash._baseindexof/package.json | 115 + .../lodash._bindcallback/LICENSE.txt | 22 + .../lodash._bindcallback/README.md | 20 + .../lodash._bindcallback/index.js | 65 + .../lodash._bindcallback/package.json | 117 + .../lodash._cacheindexof/LICENSE.txt | 22 + .../lodash._cacheindexof/README.md | 20 + .../lodash._cacheindexof/index.js | 53 + .../lodash._cacheindexof/package.json | 115 + .../lodash._createassigner/LICENSE.txt | 22 + .../lodash._createassigner/README.md | 20 + .../lodash._createassigner/index.js | 52 + .../lodash._createassigner/package.json | 119 + .../node_modules/lodash._createcache/LICENSE | 22 + .../lodash._createcache/README.md | 20 + .../node_modules/lodash._createcache/index.js | 91 + .../lodash._createcache/package.json | 117 + .../node_modules/lodash._getnative/LICENSE | 22 + .../node_modules/lodash._getnative/README.md | 20 + .../node_modules/lodash._getnative/index.js | 137 + .../lodash._getnative/package.json | 113 + .../lodash._isiterateecall/LICENSE.txt | 22 + .../lodash._isiterateecall/README.md | 20 + .../lodash._isiterateecall/index.js | 132 + .../lodash._isiterateecall/package.json | 115 + .../lodash._pickbyarray/LICENSE.txt | 22 + .../lodash._pickbyarray/README.md | 20 + .../node_modules/lodash._pickbyarray/index.js | 73 + .../lodash._pickbyarray/package.json | 115 + .../lodash._pickbycallback/LICENSE.txt | 22 + .../lodash._pickbycallback/README.md | 20 + .../lodash._pickbycallback/index.js | 44 + .../lodash._pickbycallback/package.json | 102 + .../node_modules/lodash.clonedeep/LICENSE | 22 + .../node_modules/lodash.clonedeep/README.md | 20 + .../node_modules/lodash.clonedeep/index.js | 63 + .../lodash.clonedeep/package.json | 124 + .../node_modules/lodash.isarguments/LICENSE | 22 + .../node_modules/lodash.isarguments/README.md | 20 + .../node_modules/lodash.isarguments/index.js | 106 + .../lodash.isarguments/package.json | 125 + .../node_modules/lodash.isarray/LICENSE | 22 + .../node_modules/lodash.isarray/README.md | 20 + .../node_modules/lodash.isarray/index.js | 180 + .../node_modules/lodash.isarray/package.json | 125 + .../node_modules/lodash.isplainobject/LICENSE | 22 + .../lodash.isplainobject/README.md | 20 + .../lodash.isplainobject/index.js | 103 + .../lodash.isplainobject/package.json | 125 + .../lodash.istypedarray/LICENSE.txt | 22 + .../lodash.istypedarray/README.md | 20 + .../node_modules/lodash.istypedarray/index.js | 110 + .../lodash.istypedarray/package.json | 121 + tools/eslint/node_modules/lodash.keys/LICENSE | 22 + .../eslint/node_modules/lodash.keys/README.md | 20 + .../eslint/node_modules/lodash.keys/index.js | 236 + .../node_modules/lodash.keys/package.json | 127 + .../node_modules/lodash.keysin/LICENSE.txt | 22 + .../node_modules/lodash.keysin/README.md | 20 + .../node_modules/lodash.keysin/index.js | 132 + .../node_modules/lodash.keysin/package.json | 128 + .../eslint/node_modules/lodash.merge/LICENSE | 22 + .../node_modules/lodash.merge/README.md | 20 + .../eslint/node_modules/lodash.merge/index.js | 266 + .../node_modules/lodash.merge/package.json | 133 + .../node_modules/lodash.omit/LICENSE.txt | 22 + .../eslint/node_modules/lodash.omit/README.md | 20 + .../eslint/node_modules/lodash.omit/index.js | 60 + .../node_modules/lodash.omit/package.json | 130 + .../node_modules/lodash.restparam/LICENSE.txt | 22 + .../node_modules/lodash.restparam/README.md | 20 + .../node_modules/lodash.restparam/index.js | 67 + .../lodash.restparam/package.json | 122 + .../lodash.toplainobject/LICENSE.txt | 22 + .../lodash.toplainobject/README.md | 20 + .../lodash.toplainobject/index.js | 39 + .../lodash.toplainobject/package.json | 108 + tools/eslint/node_modules/lodash/LICENSE | 22 + tools/eslint/node_modules/lodash/README.md | 121 + .../node_modules => }/lodash/array.js | 0 .../eslint/node_modules/lodash/array/chunk.js | 46 + .../node_modules => }/lodash/array/compact.js | 0 .../node_modules/lodash/array/difference.js | 29 + .../node_modules => }/lodash/array/drop.js | 0 .../lodash/array/dropRight.js | 0 .../lodash/array/dropRightWhile.js | 0 .../lodash/array/dropWhile.js | 0 .../node_modules => }/lodash/array/fill.js | 0 .../lodash/array/findIndex.js | 0 .../lodash/array/findLastIndex.js | 0 .../node_modules => }/lodash/array/first.js | 0 .../node_modules/lodash/array/flatten.js | 32 + .../lodash/array/flattenDeep.js | 0 .../node_modules => }/lodash/array/head.js | 0 .../node_modules/lodash/array/indexOf.js | 53 + .../node_modules => }/lodash/array/initial.js | 0 .../node_modules/lodash/array/intersection.js | 58 + .../node_modules => }/lodash/array/last.js | 0 .../lodash/array/lastIndexOf.js | 0 .../node_modules => }/lodash/array/object.js | 0 .../eslint/node_modules/lodash/array/pull.js | 52 + .../node_modules => }/lodash/array/pullAt.js | 0 .../node_modules => }/lodash/array/remove.js | 0 .../node_modules => }/lodash/array/rest.js | 0 .../node_modules => }/lodash/array/slice.js | 0 .../node_modules/lodash/array/sortedIndex.js | 53 + .../lodash/array/sortedLastIndex.js | 0 .../node_modules => }/lodash/array/tail.js | 0 .../node_modules => }/lodash/array/take.js | 0 .../lodash/array/takeRight.js | 0 .../lodash/array/takeRightWhile.js | 0 .../lodash/array/takeWhile.js | 0 .../eslint/node_modules/lodash/array/union.js | 24 + .../eslint/node_modules/lodash/array/uniq.js | 71 + .../node_modules => }/lodash/array/unique.js | 0 .../node_modules => }/lodash/array/unzip.js | 0 .../lodash/array/unzipWith.js | 0 .../node_modules/lodash/array/without.js | 27 + tools/eslint/node_modules/lodash/array/xor.js | 35 + .../node_modules => }/lodash/array/zip.js | 0 .../lodash/array/zipObject.js | 0 .../node_modules => }/lodash/array/zipWith.js | 0 tools/eslint/node_modules/lodash/chain.js | 16 + .../node_modules => }/lodash/chain/chain.js | 0 .../node_modules => }/lodash/chain/commit.js | 0 .../node_modules/lodash/chain/concat.js | 1 + .../node_modules/lodash/chain/lodash.js | 125 + .../node_modules => }/lodash/chain/plant.js | 0 .../node_modules => }/lodash/chain/reverse.js | 0 .../node_modules => }/lodash/chain/run.js | 0 .../node_modules => }/lodash/chain/tap.js | 0 .../node_modules => }/lodash/chain/thru.js | 0 .../node_modules => }/lodash/chain/toJSON.js | 0 .../lodash/chain/toString.js | 0 .../node_modules => }/lodash/chain/value.js | 0 .../node_modules => }/lodash/chain/valueOf.js | 0 .../lodash/chain/wrapperChain.js | 0 .../lodash/chain/wrapperCommit.js | 32 + .../lodash/chain/wrapperConcat.js | 34 + .../node_modules/lodash/chain/wrapperPlant.js | 45 + .../lodash/chain/wrapperReverse.js | 43 + .../lodash/chain/wrapperToString.js | 0 .../lodash/chain/wrapperValue.js | 0 .../node_modules => }/lodash/collection.js | 0 .../lodash/collection/all.js | 0 .../lodash/collection/any.js | 0 .../node_modules => }/lodash/collection/at.js | 0 .../lodash/collection/collect.js | 0 .../lodash/collection/contains.js | 0 .../lodash/collection/countBy.js | 0 .../lodash/collection/detect.js | 0 .../lodash/collection/each.js | 0 .../lodash/collection/eachRight.js | 0 .../node_modules/lodash/collection/every.js | 66 + .../lodash/collection/filter.js | 0 .../lodash/collection/find.js | 0 .../lodash/collection/findLast.js | 0 .../lodash/collection/findWhere.js | 0 .../lodash/collection/foldl.js | 0 .../lodash/collection/foldr.js | 0 .../lodash/collection/forEach.js | 0 .../lodash/collection/forEachRight.js | 0 .../lodash/collection/groupBy.js | 0 .../lodash/collection/include.js | 0 .../lodash/collection/includes.js | 57 + .../lodash/collection/indexBy.js | 0 .../lodash/collection/inject.js | 0 .../node_modules/lodash/collection/invoke.js | 42 + .../lodash/collection/map.js | 0 .../lodash/collection/max.js | 0 .../lodash/collection/min.js | 0 .../lodash/collection/partition.js | 0 .../lodash/collection/pluck.js | 0 .../node_modules/lodash/collection/reduce.js | 44 + .../lodash/collection/reduceRight.js | 0 .../lodash/collection/reject.js | 0 .../lodash/collection/sample.js | 0 .../lodash/collection/select.js | 0 .../lodash/collection/shuffle.js | 0 .../lodash/collection/size.js | 0 .../node_modules/lodash/collection/some.js | 67 + .../node_modules/lodash/collection/sortBy.js | 71 + .../lodash/collection/sortByAll.js | 0 .../lodash/collection/sortByOrder.js | 55 + .../lodash/collection/sum.js | 0 .../lodash/collection/where.js | 0 .../node_modules => }/lodash/date.js | 0 .../node_modules => }/lodash/date/now.js | 0 tools/eslint/node_modules/lodash/function.js | 28 + .../node_modules/lodash/function/after.js | 48 + .../node_modules/lodash/function/ary.js | 34 + .../lodash/function/backflow.js | 0 .../node_modules/lodash/function/before.js | 42 + .../node_modules => }/lodash/function/bind.js | 0 .../lodash/function/bindAll.js | 0 .../lodash/function/bindKey.js | 0 .../lodash/function/compose.js | 0 .../lodash/function/curry.js | 0 .../lodash/function/curryRight.js | 0 .../node_modules/lodash/function/debounce.js | 181 + .../node_modules/lodash/function/defer.js | 25 + .../node_modules/lodash/function/delay.js | 26 + .../node_modules => }/lodash/function/flow.js | 0 .../lodash/function/flowRight.js | 0 .../node_modules/lodash/function/memoize.js | 80 + .../node_modules/lodash/function/modArgs.js | 58 + .../lodash/function/negate.js | 0 .../node_modules => }/lodash/function/once.js | 0 .../lodash/function/partial.js | 0 .../lodash/function/partialRight.js | 0 .../node_modules/lodash/function/rearg.js | 40 + .../node_modules/lodash/function/restParam.js | 58 + .../node_modules/lodash/function/spread.js | 44 + .../node_modules/lodash/function/throttle.js | 62 + .../node_modules/lodash/function/wrap.js | 33 + tools/eslint/node_modules/lodash/index.js | 12351 ++++++++++++++++ .../lodash/internal/LazyWrapper.js | 26 + .../lodash/internal/LodashWrapper.js | 0 .../lodash/internal/MapCache.js | 0 .../lodash/internal/SetCache.js | 0 .../lodash/internal/arrayConcat.js | 25 + .../lodash/internal/arrayCopy.js | 0 .../lodash/internal/arrayEach.js | 0 .../lodash/internal/arrayEachRight.js | 0 .../lodash/internal/arrayEvery.js | 0 .../lodash/internal/arrayExtremum.js | 0 .../lodash/internal/arrayFilter.js | 0 .../lodash/internal/arrayMap.js | 0 .../node_modules/lodash/internal/arrayPush.js | 20 + .../lodash/internal/arrayReduce.js | 0 .../lodash/internal/arrayReduceRight.js | 0 .../lodash/internal/arraySome.js | 0 .../node_modules/lodash/internal/arraySum.js | 20 + .../lodash/internal/assignDefaults.js | 0 .../lodash/internal/assignOwnDefaults.js | 0 .../lodash/internal/assignWith.js | 0 .../lodash/internal/baseAssign.js | 0 .../lodash/internal/baseAt.js | 0 .../lodash/internal/baseCallback.js | 0 .../node_modules/lodash/internal/baseClone.js | 128 + .../lodash/internal/baseCompareAscending.js | 0 .../lodash/internal/baseCopy.js | 0 .../lodash/internal/baseCreate.js | 23 + .../lodash/internal/baseDelay.js | 0 .../lodash/internal/baseDifference.js | 55 + .../lodash/internal/baseEach.js | 0 .../lodash/internal/baseEachRight.js | 0 .../lodash/internal/baseEvery.js | 0 .../lodash/internal/baseExtremum.js | 0 .../lodash/internal/baseFill.js | 0 .../lodash/internal/baseFilter.js | 0 .../lodash/internal/baseFind.js | 0 .../lodash/internal/baseFindIndex.js | 0 .../lodash/internal/baseFlatten.js | 41 + .../lodash/internal/baseFor.js | 0 .../lodash/internal/baseForIn.js | 0 .../lodash/internal/baseForOwn.js | 0 .../lodash/internal/baseForOwnRight.js | 0 .../lodash/internal/baseForRight.js | 0 .../lodash/internal/baseFunctions.js | 0 .../lodash/internal/baseGet.js | 0 .../lodash/internal/baseIndexOf.js | 0 .../lodash/internal/baseIsEqual.js | 0 .../lodash/internal/baseIsEqualDeep.js | 102 + .../lodash/internal/baseIsFunction.js | 0 .../lodash/internal/baseIsMatch.js | 0 .../lodash/internal/baseLodash.js | 0 .../lodash/internal/baseMap.js | 0 .../lodash/internal/baseMatches.js | 0 .../lodash/internal/baseMatchesProperty.js | 0 .../node_modules/lodash/internal/baseMerge.js | 56 + .../lodash/internal/baseMergeDeep.js | 67 + .../lodash/internal/baseProperty.js | 0 .../lodash/internal/basePropertyDeep.js | 0 .../lodash/internal/basePullAt.js | 0 .../lodash/internal/baseRandom.js | 18 + .../lodash/internal/baseReduce.js | 0 .../lodash/internal/baseSetData.js | 0 .../lodash/internal/baseSlice.js | 0 .../lodash/internal/baseSome.js | 0 .../lodash/internal/baseSortBy.js | 0 .../lodash/internal/baseSortByOrder.js | 0 .../lodash/internal/baseSum.js | 0 .../lodash/internal/baseToString.js | 13 + .../node_modules/lodash/internal/baseUniq.js | 60 + .../lodash/internal/baseValues.js | 0 .../lodash/internal/baseWhile.js | 0 .../lodash/internal/baseWrapperValue.js | 29 + .../lodash/internal/binaryIndex.js | 0 .../lodash/internal/binaryIndexBy.js | 57 + .../lodash/internal/bindCallback.js | 0 .../lodash/internal/bufferClone.js | 20 + .../lodash/internal/cacheIndexOf.js | 0 .../lodash/internal/cachePush.js | 0 .../lodash/internal/charsLeftIndex.js | 0 .../lodash/internal/charsRightIndex.js | 0 .../lodash/internal/compareAscending.js | 16 + .../lodash/internal/compareMultiple.js | 44 + .../lodash/internal/composeArgs.js | 34 + .../lodash/internal/composeArgsRight.js | 0 .../lodash/internal/createAggregator.js | 35 + .../lodash/internal/createAssigner.js | 41 + .../lodash/internal/createBaseEach.js | 0 .../lodash/internal/createBaseFor.js | 0 .../lodash/internal/createBindWrapper.js | 0 .../lodash/internal/createCache.js | 21 + .../lodash/internal/createCompounder.js | 0 .../lodash/internal/createCtorWrapper.js | 37 + .../lodash/internal/createCurry.js | 23 + .../lodash/internal/createDefaults.js | 22 + .../lodash/internal/createExtremum.js | 33 + .../lodash/internal/createFind.js | 0 .../lodash/internal/createFindIndex.js | 0 .../lodash/internal/createFindKey.js | 0 .../lodash/internal/createFlow.js | 74 + .../lodash/internal/createForEach.js | 0 .../lodash/internal/createForIn.js | 0 .../lodash/internal/createForOwn.js | 0 .../lodash/internal/createHybridWrapper.js | 111 + .../lodash/internal/createObjectMapper.js | 0 .../lodash/internal/createPadDir.js | 0 .../lodash/internal/createPadding.js | 29 + .../lodash/internal/createPartial.js | 20 + .../lodash/internal/createPartialWrapper.js | 43 + .../lodash/internal/createReduce.js | 0 .../lodash/internal/createRound.js | 23 + .../lodash/internal/createSortedIndex.js | 0 .../lodash/internal/createWrapper.js | 86 + .../lodash/internal/deburrLetter.js | 0 .../lodash/internal/equalArrays.js | 0 .../lodash/internal/equalByTag.js | 48 + .../lodash/internal/equalObjects.js | 0 .../lodash/internal/escapeHtmlChar.js | 0 .../lodash/internal/escapeRegExpChar.js | 38 + .../lodash/internal/escapeStringChar.js | 22 + .../lodash/internal/getData.js | 0 .../lodash/internal/getFuncName.js | 25 + .../lodash/internal/getLength.js | 0 .../lodash/internal/getMatchData.js | 0 .../lodash/internal/getNative.js | 0 .../node_modules/lodash/internal/getView.js | 33 + .../lodash/internal/indexOfNaN.js | 0 .../lodash/internal/initCloneArray.js | 0 .../lodash/internal/initCloneByTag.js | 0 .../lodash/internal/initCloneObject.js | 0 .../lodash/internal/invokePath.js | 0 .../lodash/internal/isArrayLike.js | 0 .../node_modules/lodash/internal/isIndex.js | 24 + .../lodash/internal/isIterateeCall.js | 0 .../lodash/internal/isKey.js | 0 .../lodash/internal/isLaziable.js | 27 + .../node_modules/lodash/internal/isLength.js | 20 + .../lodash/internal/isObjectLike.js | 0 .../lodash/internal/isSpace.js | 0 .../lodash/internal/isStrictComparable.js | 0 .../node_modules/lodash/internal/lazyClone.js | 23 + .../lodash/internal/lazyReverse.js | 0 .../node_modules/lodash/internal/lazyValue.js | 72 + .../lodash/internal/mapDelete.js | 0 .../lodash/internal/mapGet.js | 0 .../lodash/internal/mapHas.js | 0 .../lodash/internal/mapSet.js | 0 .../lodash/internal/mergeData.js | 0 .../lodash/internal/mergeDefaults.js | 15 + .../lodash/internal/metaMap.js | 0 .../lodash/internal/pickByArray.js | 0 .../lodash/internal/pickByCallback.js | 0 .../lodash/internal/reEscape.js | 0 .../lodash/internal/reEvaluate.js | 0 .../lodash/internal/reInterpolate.js | 0 .../lodash/internal/realNames.js | 0 .../lodash/internal/reorder.js | 0 .../lodash/internal/replaceHolders.js | 0 .../lodash/internal/setData.js | 0 .../lodash/internal/shimKeys.js | 0 .../lodash/internal/sortedUniq.js | 29 + .../lodash/internal/toIterable.js | 0 .../lodash/internal/toObject.js | 0 .../lodash/internal/toPath.js | 0 .../lodash/internal/trimmedLeftIndex.js | 0 .../lodash/internal/trimmedRightIndex.js | 0 .../lodash/internal/unescapeHtmlChar.js | 0 .../lodash/internal/wrapperClone.js | 0 .../node_modules => }/lodash/lang.js | 0 .../eslint/node_modules/lodash/lang/clone.js | 70 + .../node_modules/lodash/lang/cloneDeep.js | 55 + .../node_modules => }/lodash/lang/eq.js | 0 .../node_modules => }/lodash/lang/gt.js | 0 .../node_modules => }/lodash/lang/gte.js | 0 .../node_modules/lodash/lang/isArguments.js | 34 + .../node_modules/lodash/lang/isArray.js | 40 + .../node_modules/lodash/lang/isBoolean.js | 35 + .../eslint/node_modules/lodash/lang/isDate.js | 35 + .../node_modules/lodash/lang/isElement.js | 24 + .../node_modules/lodash/lang/isEmpty.js | 47 + .../node_modules/lodash/lang/isEqual.js | 54 + .../node_modules/lodash/lang/isError.js | 36 + .../node_modules/lodash/lang/isFinite.js | 35 + .../node_modules/lodash/lang/isFunction.js | 38 + .../node_modules/lodash/lang/isMatch.js | 49 + .../node_modules => }/lodash/lang/isNaN.js | 0 .../node_modules/lodash/lang/isNative.js | 48 + .../node_modules => }/lodash/lang/isNull.js | 0 .../node_modules/lodash/lang/isNumber.js | 41 + .../node_modules => }/lodash/lang/isObject.js | 0 .../node_modules/lodash/lang/isPlainObject.js | 71 + .../node_modules/lodash/lang/isRegExp.js | 35 + .../node_modules/lodash/lang/isString.js | 35 + .../node_modules/lodash/lang/isTypedArray.js | 74 + .../lodash/lang/isUndefined.js | 0 .../node_modules => }/lodash/lang/lt.js | 0 .../node_modules => }/lodash/lang/lte.js | 0 .../node_modules => }/lodash/lang/toArray.js | 0 .../lodash/lang/toPlainObject.js | 0 tools/eslint/node_modules/lodash/math.js | 9 + .../node_modules => }/lodash/math/add.js | 0 tools/eslint/node_modules/lodash/math/ceil.js | 25 + .../eslint/node_modules/lodash/math/floor.js | 25 + tools/eslint/node_modules/lodash/math/max.js | 56 + tools/eslint/node_modules/lodash/math/min.js | 56 + .../eslint/node_modules/lodash/math/round.js | 25 + tools/eslint/node_modules/lodash/math/sum.js | 50 + .../node_modules => }/lodash/number.js | 0 .../node_modules/lodash/number/inRange.js | 47 + .../node_modules/lodash/number/random.js | 70 + tools/eslint/node_modules/lodash/object.js | 31 + .../node_modules/lodash/object/assign.js | 43 + .../node_modules/lodash/object/create.js | 47 + .../node_modules/lodash/object/defaults.js | 25 + .../lodash/object/defaultsDeep.js | 25 + .../node_modules => }/lodash/object/extend.js | 0 .../lodash/object/findKey.js | 0 .../lodash/object/findLastKey.js | 0 .../node_modules => }/lodash/object/forIn.js | 0 .../lodash/object/forInRight.js | 0 .../node_modules => }/lodash/object/forOwn.js | 0 .../lodash/object/forOwnRight.js | 0 .../lodash/object/functions.js | 0 .../eslint/node_modules/lodash/object/get.js | 33 + .../node_modules => }/lodash/object/has.js | 0 .../node_modules/lodash/object/invert.js | 60 + .../eslint/node_modules/lodash/object/keys.js | 45 + .../node_modules => }/lodash/object/keysIn.js | 0 .../lodash/object/mapKeys.js | 0 .../lodash/object/mapValues.js | 0 .../node_modules/lodash/object/merge.js | 54 + .../lodash/object/methods.js | 0 .../node_modules => }/lodash/object/omit.js | 0 .../node_modules => }/lodash/object/pairs.js | 0 .../eslint/node_modules/lodash/object/pick.js | 42 + .../node_modules/lodash/object/result.js | 49 + .../eslint/node_modules/lodash/object/set.js | 55 + .../node_modules/lodash/object/transform.js | 61 + .../node_modules => }/lodash/object/values.js | 0 .../lodash/object/valuesIn.js | 0 tools/eslint/node_modules/lodash/package.json | 122 + .../node_modules => }/lodash/string.js | 0 .../lodash/string/camelCase.js | 0 .../lodash/string/capitalize.js | 0 .../node_modules => }/lodash/string/deburr.js | 0 .../lodash/string/endsWith.js | 0 .../node_modules => }/lodash/string/escape.js | 0 .../lodash/string/escapeRegExp.js | 32 + .../lodash/string/kebabCase.js | 0 .../eslint/node_modules/lodash/string/pad.js | 47 + .../lodash/string/padLeft.js | 0 .../lodash/string/padRight.js | 0 .../node_modules/lodash/string/parseInt.js | 46 + .../node_modules/lodash/string/repeat.js | 47 + .../lodash/string/snakeCase.js | 0 .../lodash/string/startCase.js | 0 .../lodash/string/startsWith.js | 0 .../node_modules/lodash/string/template.js | 226 + .../lodash/string/templateSettings.js | 0 .../node_modules => }/lodash/string/trim.js | 0 .../lodash/string/trimLeft.js | 0 .../lodash/string/trimRight.js | 0 .../node_modules/lodash/string/trunc.js | 105 + .../lodash/string/unescape.js | 0 .../node_modules/lodash/string/words.js | 38 + tools/eslint/node_modules/lodash/support.js | 10 + .../node_modules => }/lodash/utility.js | 0 .../node_modules/lodash/utility/attempt.js | 32 + .../node_modules/lodash/utility/callback.js | 53 + .../lodash/utility/constant.js | 0 .../lodash/utility/identity.js | 0 .../lodash/utility/iteratee.js | 0 .../lodash/utility/matches.js | 0 .../lodash/utility/matchesProperty.js | 0 .../lodash/utility/method.js | 0 .../lodash/utility/methodOf.js | 0 .../node_modules/lodash/utility/mixin.js | 82 + .../node_modules => }/lodash/utility/noop.js | 0 .../lodash/utility/property.js | 0 .../node_modules/lodash/utility/propertyOf.js | 30 + .../node_modules/lodash/utility/range.js | 66 + .../node_modules/lodash/utility/times.js | 60 + .../lodash/utility/uniqueId.js | 0 tools/eslint/node_modules/longest/LICENSE | 21 + tools/eslint/node_modules/longest/README.md | 65 + tools/eslint/node_modules/longest/index.js | 37 + .../eslint/node_modules/longest/package.json | 96 + .../eslint/node_modules/minimatch/browser.js | 1113 -- .../node_modules/minimatch/minimatch.js | 59 +- .../node_modules/brace-expansion/.npmignore | 2 - .../node_modules/brace-expansion/.travis.yml | 3 - .../node_modules/brace-expansion/README.md | 121 - .../node_modules/brace-expansion/example.js | 8 - .../node_modules/brace-expansion/index.js | 191 - .../node_modules/balanced-match/.npmignore | 2 - .../node_modules/balanced-match/.travis.yml | 4 - .../node_modules/balanced-match/README.md | 80 - .../node_modules/balanced-match/example.js | 5 - .../node_modules/balanced-match/index.js | 38 - .../node_modules/balanced-match/package.json | 73 - .../balanced-match/test/balanced.js | 56 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/package.json | 83 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/brace-expansion/package.json | 75 - .../brace-expansion/test/bash-comparison.js | 32 - .../brace-expansion/test/bash-results.txt | 1075 -- .../brace-expansion/test/cases.txt | 182 - .../brace-expansion/test/dollar.js | 9 - .../brace-expansion/test/empty-option.js | 10 - .../brace-expansion/test/generate.sh | 24 - .../test/negative-increment.js | 15 - .../brace-expansion/test/nested.js | 16 - .../brace-expansion/test/order.js | 10 - .../node_modules/brace-expansion/test/pad.js | 13 - .../brace-expansion/test/same-type.js | 7 - .../brace-expansion/test/sequence.js | 50 - .../node_modules/minimatch/package.json | 107 +- .../wordwrap => minimist}/LICENSE | 0 tools/eslint/node_modules/minimist/index.js | 187 + .../eslint/node_modules/minimist/package.json | 94 + .../minimist/readme.markdown | 0 tools/eslint/node_modules/mkdirp/.travis.yml | 8 - .../node_modules/mkdirp/examples/pow.js | 6 - .../mkdirp/node_modules/minimist/.travis.yml | 4 - .../node_modules/minimist/example/parse.js | 2 - .../mkdirp/node_modules/minimist/index.js | 187 - .../mkdirp/node_modules/minimist/package.json | 68 - .../mkdirp/node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 16 - .../mkdirp/node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/parse.js | 318 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - tools/eslint/node_modules/mkdirp/package.json | 100 +- .../eslint/node_modules/mkdirp/test/chmod.js | 41 - .../node_modules/mkdirp/test/clobber.js | 38 - .../eslint/node_modules/mkdirp/test/mkdirp.js | 28 - .../node_modules/mkdirp/test/opts_fs.js | 29 - .../node_modules/mkdirp/test/opts_fs_sync.js | 27 - tools/eslint/node_modules/mkdirp/test/perm.js | 32 - .../node_modules/mkdirp/test/perm_sync.js | 36 - tools/eslint/node_modules/mkdirp/test/race.js | 37 - tools/eslint/node_modules/mkdirp/test/rel.js | 32 - .../eslint/node_modules/mkdirp/test/return.js | 25 - .../node_modules/mkdirp/test/return_sync.js | 24 - tools/eslint/node_modules/mkdirp/test/root.js | 19 - tools/eslint/node_modules/mkdirp/test/sync.js | 32 - .../eslint/node_modules/mkdirp/test/umask.js | 28 - .../node_modules/mkdirp/test/umask_sync.js | 32 - .../{debug/node_modules => }/ms/LICENSE | 0 .../{debug/node_modules => }/ms/README.md | 0 .../{debug/node_modules => }/ms/index.js | 0 tools/eslint/node_modules/ms/package.json | 74 + tools/eslint/node_modules/mute-stream/LICENSE | 15 + .../node_modules => }/mute-stream/README.md | 0 .../node_modules => }/mute-stream/mute.js | 0 .../node_modules/mute-stream/package.json | 82 + .../node_modules/number-is-nan/index.js | 4 + .../eslint/node_modules/number-is-nan/license | 21 + .../node_modules/number-is-nan/package.json | 94 + .../node_modules/number-is-nan/readme.md | 30 + .../node_modules/object-assign/index.js | 29 +- .../node_modules/object-assign/package.json | 123 +- tools/eslint/node_modules/once/LICENSE | 15 + tools/eslint/node_modules/once/README.md | 51 + tools/eslint/node_modules/once/once.js | 21 + tools/eslint/node_modules/once/package.json | 92 + tools/eslint/node_modules/onetime/index.js | 31 + tools/eslint/node_modules/onetime/license | 21 + .../eslint/node_modules/onetime/package.json | 89 + tools/eslint/node_modules/onetime/readme.md | 52 + tools/eslint/node_modules/optimist/LICENSE | 21 + tools/eslint/node_modules/optimist/index.js | 343 + .../eslint/node_modules/optimist/package.json | 89 + .../node_modules/optimist/readme.markdown | 513 + .../eslint/node_modules/optionator/README.md | 66 +- .../node_modules/optionator/lib/index.js | 19 +- .../node_modules/deep-is/.npmignore | 1 - .../node_modules/deep-is/.travis.yml | 6 - .../node_modules/deep-is/example/cmp.js | 11 - .../node_modules/deep-is/package.json | 86 - .../node_modules/deep-is/test/NaN.js | 16 - .../node_modules/deep-is/test/cmp.js | 23 - .../node_modules/deep-is/test/neg-vs-pos-0.js | 15 - .../node_modules/fast-levenshtein/.npmignore | 4 - .../node_modules/fast-levenshtein/.travis.yml | 16 - .../fast-levenshtein/CONTRIBUTING.md | 22 - .../fast-levenshtein/Gruntfile.js | 81 - .../node_modules/fast-levenshtein/LICENSE.md | 25 - .../fast-levenshtein/benchmark/speed.js | 182 - .../node_modules/fast-levenshtein/bower.json | 30 - .../fast-levenshtein/levenshtein.min.js | 2 - .../fast-levenshtein/package.json | 62 - .../fast-levenshtein/test/mocha.opts | 2 - .../fast-levenshtein/test/tests.js | 171 - .../fast-levenshtein/test/text1.txt | 1 - .../fast-levenshtein/test/text2.txt | 1 - .../optionator/node_modules/levn/package.json | 78 - .../node_modules/prelude-ls/CHANGELOG.md | 99 - .../node_modules/prelude-ls/package.json | 80 - .../node_modules/type-check/README.md | 210 - .../node_modules/type-check/lib/index.js | 16 - .../node_modules/type-check/package.json | 71 - .../node_modules/wordwrap/example/center.js | 10 - .../node_modules/wordwrap/example/meat.js | 3 - .../optionator/node_modules/wordwrap/index.js | 76 - .../node_modules/wordwrap/package.json | 63 - .../node_modules/wordwrap/test/break.js | 30 - .../node_modules/wordwrap/test/idleness.txt | 63 - .../node_modules/wordwrap/test/wrap.js | 31 - .../node_modules/optionator/package.json | 128 +- tools/eslint/node_modules/os-homedir/index.js | 24 + tools/eslint/node_modules/os-homedir/license | 21 + .../node_modules/os-homedir/package.json | 96 + .../eslint/node_modules/os-homedir/readme.md | 33 + .../path-is-absolute/package.json | 116 +- .../node_modules/path-is-inside/LICENSE.txt | 19 + .../node_modules/path-is-inside/README.md | 35 + .../path-is-inside/lib/path-is-inside.js | 28 + .../node_modules/path-is-inside/package.json | 83 + tools/eslint/node_modules/pify/index.js | 68 + tools/eslint/node_modules/pify/license | 21 + tools/eslint/node_modules/pify/package.json | 105 + tools/eslint/node_modules/pify/readme.md | 119 + .../node_modules/pinkie-promise/index.js | 3 + .../node_modules/pinkie-promise/license | 21 + .../node_modules/pinkie-promise/package.json | 91 + .../node_modules/pinkie-promise/readme.md | 28 + tools/eslint/node_modules/pinkie/index.js | 292 + tools/eslint/node_modules/pinkie/license | 21 + tools/eslint/node_modules/pinkie/package.json | 92 + tools/eslint/node_modules/pinkie/readme.md | 83 + .../node_modules => }/prelude-ls/LICENSE | 0 .../node_modules => }/prelude-ls/README.md | 0 .../node_modules => }/prelude-ls/lib/Func.js | 0 .../node_modules => }/prelude-ls/lib/List.js | 0 .../node_modules => }/prelude-ls/lib/Num.js | 0 .../node_modules => }/prelude-ls/lib/Obj.js | 0 .../node_modules => }/prelude-ls/lib/Str.js | 0 .../node_modules => }/prelude-ls/lib/index.js | 0 .../node_modules/prelude-ls/package.json | 108 + .../process-nextick-args/index.js | 20 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 71 + .../process-nextick-args/readme.md | 18 + .../node_modules/read-json-sync/LICENSE | 20 + .../node_modules/read-json-sync/README.md | 44 + .../node_modules/read-json-sync/index.js | 11 + .../node_modules/read-json-sync/package.json | 95 + .../readable-stream/.zuul.yml | 0 .../node_modules => }/readable-stream/LICENSE | 0 .../node_modules/readable-stream/README.md | 36 + .../readable-stream/duplex.js | 0 .../readable-stream/lib/_stream_duplex.js | 0 .../lib/_stream_passthrough.js | 0 .../readable-stream/lib/_stream_readable.js | 63 +- .../readable-stream/lib/_stream_transform.js | 0 .../readable-stream/lib/_stream_writable.js | 30 +- .../node_modules/readable-stream/package.json | 101 + .../readable-stream/passthrough.js | 0 .../readable-stream/readable.js | 0 .../readable-stream/transform.js | 0 .../readable-stream/writable.js | 0 tools/eslint/node_modules/readline2/README.md | 33 + tools/eslint/node_modules/readline2/index.js | 126 + .../node_modules/readline2/package.json | 89 + .../eslint/node_modules/repeat-string/LICENSE | 24 + .../node_modules/repeat-string/README.md | 94 + .../node_modules/repeat-string/index.js | 66 + .../node_modules/repeat-string/package.json | 105 + .../node_modules/restore-cursor/index.js | 9 + .../node_modules/restore-cursor/license | 21 + .../node_modules/restore-cursor/package.json | 101 + .../node_modules/restore-cursor/readme.md | 25 + tools/eslint/node_modules/right-align/LICENSE | 21 + .../eslint/node_modules/right-align/README.md | 77 + .../eslint/node_modules/right-align/index.js | 16 + .../node_modules/right-align/package.json | 93 + tools/eslint/node_modules/rimraf/LICENSE | 15 + tools/eslint/node_modules/rimraf/README.md | 101 + tools/eslint/node_modules/rimraf/bin.js | 40 + .../rimraf/node_modules/glob/LICENSE | 15 + .../rimraf/node_modules/glob/README.md | 359 + .../rimraf/node_modules/glob/common.js | 226 + .../rimraf/node_modules/glob/glob.js | 765 + .../rimraf/node_modules/glob/package.json | 98 + .../rimraf/node_modules/glob/sync.js | 460 + tools/eslint/node_modules/rimraf/package.json | 93 + tools/eslint/node_modules/rimraf/rimraf.js | 335 + tools/eslint/node_modules/run-async/LICENSE | 21 + tools/eslint/node_modules/run-async/README.md | 50 + tools/eslint/node_modules/run-async/index.js | 25 + .../node_modules/run-async/package.json | 79 + .../eslint/node_modules/rx-lite/package.json | 88 + tools/eslint/node_modules/rx-lite/readme.md | 174 + .../rx/dist => rx-lite}/rx.lite.js | 2077 +-- tools/eslint/node_modules/rx-lite/rx.lite.map | 1 + .../node_modules/rx-lite/rx.lite.min.js | 5 + .../node_modules/shelljs/.documentup.json | 6 + tools/eslint/node_modules/shelljs/LICENSE | 26 + tools/eslint/node_modules/shelljs/README.md | 579 + tools/eslint/node_modules/shelljs/RELEASE.md | 9 + tools/eslint/node_modules/shelljs/bin/shjs | 51 + tools/eslint/node_modules/shelljs/global.js | 3 + tools/eslint/node_modules/shelljs/make.js | 56 + .../eslint/node_modules/shelljs/package.json | 88 + .../shelljs/scripts/generate-docs.js | 21 + .../node_modules/shelljs/scripts/run-tests.js | 50 + tools/eslint/node_modules/shelljs/shell.js | 159 + tools/eslint/node_modules/shelljs/src/cat.js | 43 + tools/eslint/node_modules/shelljs/src/cd.js | 19 + .../eslint/node_modules/shelljs/src/chmod.js | 208 + .../eslint/node_modules/shelljs/src/common.js | 203 + tools/eslint/node_modules/shelljs/src/cp.js | 204 + tools/eslint/node_modules/shelljs/src/dirs.js | 191 + tools/eslint/node_modules/shelljs/src/echo.js | 20 + .../eslint/node_modules/shelljs/src/error.js | 10 + tools/eslint/node_modules/shelljs/src/exec.js | 216 + tools/eslint/node_modules/shelljs/src/find.js | 51 + tools/eslint/node_modules/shelljs/src/grep.js | 52 + tools/eslint/node_modules/shelljs/src/ln.js | 53 + tools/eslint/node_modules/shelljs/src/ls.js | 126 + .../eslint/node_modules/shelljs/src/mkdir.js | 68 + tools/eslint/node_modules/shelljs/src/mv.js | 80 + tools/eslint/node_modules/shelljs/src/popd.js | 1 + .../eslint/node_modules/shelljs/src/pushd.js | 1 + tools/eslint/node_modules/shelljs/src/pwd.js | 11 + tools/eslint/node_modules/shelljs/src/rm.js | 163 + tools/eslint/node_modules/shelljs/src/sed.js | 43 + .../node_modules/shelljs/src/tempdir.js | 56 + tools/eslint/node_modules/shelljs/src/test.js | 85 + tools/eslint/node_modules/shelljs/src/to.js | 29 + .../eslint/node_modules/shelljs/src/toEnd.js | 29 + .../eslint/node_modules/shelljs/src/which.js | 83 + .../eslint/node_modules/source-map/README.md | 510 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 21 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 107 + .../source-map/lib/source-map/base64-vlq.js | 146 + .../source-map/lib/source-map/base64.js | 73 + .../lib/source-map/binary-search.js | 117 + .../source-map/lib/source-map/mapping-list.js | 86 + .../source-map/lib/source-map/quick-sort.js | 120 + .../lib/source-map/source-map-consumer.js | 1077 ++ .../lib/source-map/source-map-generator.js | 399 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 370 + .../node_modules/source-map/package.json | 226 + tools/eslint/node_modules/sprintf-js/LICENSE | 24 + .../eslint/node_modules/sprintf-js/README.md | 88 + .../sprintf-js/dist/angular-sprintf.min.js | 0 .../dist/angular-sprintf.min.js.map} | 0 .../sprintf-js/dist/angular-sprintf.min.map | 1 + .../sprintf-js/dist/sprintf.min.js | 4 + .../sprintf-js/dist/sprintf.min.js.map | 1 + .../sprintf-js/dist/sprintf.min.map | 1 + .../node_modules/sprintf-js/package.json | 78 + .../sprintf-js/src/angular-sprintf.js | 0 .../sprintf-js/src/sprintf.js | 35 +- .../node_modules => }/string_decoder/LICENSE | 0 .../string_decoder/README.md | 0 .../node_modules => }/string_decoder/index.js | 0 .../node_modules/string_decoder/package.json | 79 + .../node_modules => }/strip-ansi/index.js | 0 tools/eslint/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 111 + .../eslint/node_modules/strip-ansi/readme.md | 33 + .../node_modules/strip-json-comments/cli.js | 4 +- .../node_modules/strip-json-comments/license | 21 + .../strip-json-comments/package.json | 134 +- .../strip-json-comments/readme.md | 10 +- .../strip-json-comments.js | 20 +- .../node_modules/supports-color/index.js | 50 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 105 + .../node_modules/supports-color/readme.md | 36 + .../node_modules/text-table/.travis.yml | 4 - .../node_modules/text-table/example/align.js | 8 - .../node_modules/text-table/example/center.js | 8 - .../text-table/example/dotalign.js | 9 - .../text-table/example/doubledot.js | 11 - .../node_modules/text-table/example/table.js | 6 - .../node_modules/text-table/package.json | 116 +- .../node_modules/text-table/test/align.js | 18 - .../text-table/test/ansi-colors.js | 32 - .../node_modules/text-table/test/center.js | 18 - .../node_modules/text-table/test/dotalign.js | 20 - .../node_modules/text-table/test/doubledot.js | 24 - .../node_modules/text-table/test/table.js | 14 - .../node_modules => }/through/LICENSE.APACHE2 | 0 tools/eslint/node_modules/through/LICENSE.MIT | 24 + tools/eslint/node_modules/through/index.js | 107 + .../eslint/node_modules/through/package.json | 92 + .../node_modules/through/readme.markdown | 64 + tools/eslint/node_modules/tryit/README.md | 56 + tools/eslint/node_modules/tryit/package.json | 80 + tools/eslint/node_modules/tryit/tryit.js | 14 + .../node_modules => }/type-check/LICENSE | 0 .../eslint/node_modules/type-check/README.md | 210 + .../node_modules => }/type-check/lib/check.js | 2 +- .../node_modules/type-check/lib/index.js | 16 + .../type-check/lib/parse-type.js | 2 +- .../node_modules/type-check/package.json | 94 + .../node_modules => }/typedarray/LICENSE | 0 .../node_modules => }/typedarray/index.js | 0 .../node_modules/typedarray/package.json | 105 + .../typedarray/readme.markdown | 0 tools/eslint/node_modules/uglify-js/LICENSE | 29 + tools/eslint/node_modules/uglify-js/README.md | 790 + .../uglify-js/bin/extract-props.js | 77 + .../node_modules/uglify-js/bin/uglifyjs | 571 + .../eslint/node_modules/uglify-js/lib/ast.js | 1014 ++ .../node_modules/uglify-js/lib/compress.js | 2534 ++++ .../node_modules/uglify-js/lib/mozilla-ast.js | 537 + .../node_modules/uglify-js/lib/output.js | 1371 ++ .../node_modules/uglify-js/lib/parse.js | 1501 ++ .../node_modules/uglify-js/lib/propmangle.js | 223 + .../node_modules/uglify-js/lib/scope.js | 617 + .../node_modules/uglify-js/lib/sourcemap.js | 92 + .../node_modules/uglify-js/lib/transform.js | 218 + .../node_modules/uglify-js/lib/utils.js | 310 + .../uglify-js/node_modules/async/LICENSE | 19 + .../uglify-js/node_modules/async/README.md | 1425 ++ .../uglify-js/node_modules/async/lib/async.js | 958 ++ .../uglify-js/node_modules/async/package.json | 86 + .../node_modules/source-map/README.md | 729 + .../source-map/dist/source-map.debug.js | 3006 ++++ .../source-map/dist/source-map.js | 3005 ++++ .../source-map/dist/source-map.min.js | 2 + .../source-map/dist/source-map.min.js.map | 1 + .../node_modules/source-map/lib/array-set.js | 104 + .../node_modules/source-map/lib/base64-vlq.js | 141 + .../node_modules/source-map/lib/base64.js | 68 + .../source-map/lib/binary-search.js | 112 + .../source-map/lib/mapping-list.js | 80 + .../node_modules/source-map/lib/quick-sort.js | 115 + .../source-map/lib/source-map-consumer.js | 1082 ++ .../source-map/lib/source-map-generator.js | 396 + .../source-map/lib/source-node.js | 408 + .../node_modules/source-map/lib/util.js | 369 + .../node_modules/source-map/package.json | 240 + .../node_modules/source-map/source-map.js | 8 + .../node_modules/uglify-js/package.json | 109 + .../uglify-js/tools/domprops.json | 5603 +++++++ .../node_modules/uglify-js/tools/exports.js | 17 + .../node_modules/uglify-js/tools/node.js | 236 + .../node_modules/uglify-js/tools/props.html | 61 + .../node_modules/uglify-to-browserify/LICENSE | 19 + .../uglify-to-browserify/README.md | 15 + .../uglify-to-browserify/index.js | 49 + .../uglify-to-browserify/package.json | 72 + tools/eslint/node_modules/user-home/cli.js | 26 - tools/eslint/node_modules/user-home/index.js | 15 +- .../node_modules/user-home/package.json | 119 +- tools/eslint/node_modules/user-home/readme.md | 19 +- .../node_modules => }/util-deprecate/LICENSE | 0 .../util-deprecate/README.md | 0 .../node_modules/util-deprecate/browser.js | 67 + .../node_modules => }/util-deprecate/node.js | 0 .../node_modules/util-deprecate/package.json | 81 + .../node_modules/window-size/LICENSE-MIT | 22 + .../eslint/node_modules/window-size/README.md | 26 + .../eslint/node_modules/window-size/index.js | 33 + .../node_modules/window-size/package.json | 81 + tools/eslint/node_modules/wordwrap/LICENSE | 18 + .../node_modules/wordwrap/README.markdown | 70 + tools/eslint/node_modules/wordwrap/index.js | 76 + .../eslint/node_modules/wordwrap/package.json | 90 + tools/eslint/node_modules/wrappy/LICENSE | 15 + tools/eslint/node_modules/wrappy/README.md | 36 + tools/eslint/node_modules/wrappy/package.json | 78 + tools/eslint/node_modules/wrappy/wrappy.js | 33 + tools/eslint/node_modules/write/LICENSE | 21 + tools/eslint/node_modules/write/README.md | 101 + tools/eslint/node_modules/write/index.js | 93 + tools/eslint/node_modules/write/package.json | 97 + .../eslint/node_modules/xml-escape/.npmignore | 15 - .../node_modules/xml-escape/package.json | 81 +- tools/eslint/node_modules/xml-escape/test.js | 7 - .../node_modules => }/xtend/LICENCE | 0 .../node_modules => }/xtend/Makefile | 0 .../node_modules => }/xtend/README.md | 0 tools/eslint/node_modules/xtend/immutable.js | 19 + tools/eslint/node_modules/xtend/mutable.js | 17 + tools/eslint/node_modules/xtend/package.json | 109 + tools/eslint/node_modules/yargs/LICENSE | 21 + tools/eslint/node_modules/yargs/README.md | 926 ++ .../node_modules/yargs/completion.sh.hbs | 22 + tools/eslint/node_modules/yargs/index.js | 504 + .../node_modules/yargs/lib/completion.js | 71 + tools/eslint/node_modules/yargs/lib/parser.js | 448 + tools/eslint/node_modules/yargs/lib/usage.js | 314 + .../node_modules/yargs/lib/validation.js | 196 + tools/eslint/node_modules/yargs/package.json | 145 + tools/eslint/package.json | 196 +- 4279 files changed, 146115 insertions(+), 151089 deletions(-) create mode 100644 tools/eslint/conf/blank-script.json create mode 100644 tools/eslint/conf/json-schema-schema.json create mode 100644 tools/eslint/conf/replacements.json create mode 100644 tools/eslint/lib/ast-utils.js delete mode 100644 tools/eslint/lib/config-initializer.js delete mode 100644 tools/eslint/lib/config-validator.js create mode 100644 tools/eslint/lib/config/config-file.js create mode 100644 tools/eslint/lib/config/config-initializer.js create mode 100644 tools/eslint/lib/config/config-ops.js create mode 100644 tools/eslint/lib/config/config-validator.js create mode 100644 tools/eslint/lib/formatters/html-template.html create mode 100644 tools/eslint/lib/formatters/html.js create mode 100644 tools/eslint/lib/formatters/json.js create mode 100644 tools/eslint/lib/formatters/unix.js create mode 100644 tools/eslint/lib/logging.js create mode 100644 tools/eslint/lib/rules/arrow-body-style.js create mode 100644 tools/eslint/lib/rules/arrow-parens.js create mode 100644 tools/eslint/lib/rules/arrow-spacing.js create mode 100644 tools/eslint/lib/rules/block-spacing.js create mode 100644 tools/eslint/lib/rules/callback-return.js delete mode 100644 tools/eslint/lib/rules/generator-star.js create mode 100644 tools/eslint/lib/rules/global-require.js delete mode 100644 tools/eslint/lib/rules/global-strict.js create mode 100644 tools/eslint/lib/rules/id-length.js create mode 100644 tools/eslint/lib/rules/id-match.js create mode 100644 tools/eslint/lib/rules/init-declarations.js create mode 100644 tools/eslint/lib/rules/jsx-quotes.js create mode 100644 tools/eslint/lib/rules/no-arrow-condition.js create mode 100644 tools/eslint/lib/rules/no-case-declarations.js create mode 100644 tools/eslint/lib/rules/no-class-assign.js delete mode 100644 tools/eslint/lib/rules/no-comma-dangle.js create mode 100644 tools/eslint/lib/rules/no-const-assign.js create mode 100644 tools/eslint/lib/rules/no-dupe-class-members.js delete mode 100644 tools/eslint/lib/rules/no-empty-class.js create mode 100644 tools/eslint/lib/rules/no-empty-pattern.js delete mode 100644 tools/eslint/lib/rules/no-extra-strict.js create mode 100644 tools/eslint/lib/rules/no-implicit-coercion.js create mode 100644 tools/eslint/lib/rules/no-invalid-this.js create mode 100644 tools/eslint/lib/rules/no-magic-numbers.js create mode 100644 tools/eslint/lib/rules/no-negated-condition.js delete mode 100644 tools/eslint/lib/rules/no-reserved-keys.js create mode 100644 tools/eslint/lib/rules/no-restricted-syntax.js delete mode 100644 tools/eslint/lib/rules/no-space-before-semi.js create mode 100644 tools/eslint/lib/rules/no-useless-call.js create mode 100644 tools/eslint/lib/rules/no-useless-concat.js delete mode 100644 tools/eslint/lib/rules/no-wrap-func.js create mode 100644 tools/eslint/lib/rules/prefer-arrow-callback.js create mode 100644 tools/eslint/lib/rules/prefer-reflect.js create mode 100644 tools/eslint/lib/rules/prefer-spread.js create mode 100644 tools/eslint/lib/rules/prefer-template.js create mode 100644 tools/eslint/lib/rules/require-jsdoc.js create mode 100644 tools/eslint/lib/rules/require-yield.js delete mode 100644 tools/eslint/lib/rules/space-after-function-name.js delete mode 100644 tools/eslint/lib/rules/space-before-function-parentheses.js create mode 100644 tools/eslint/lib/rules/space-before-keywords.js delete mode 100644 tools/eslint/lib/rules/space-in-brackets.js delete mode 100644 tools/eslint/lib/rules/spaced-line-comment.js create mode 100644 tools/eslint/lib/testers/event-generator-tester.js create mode 100644 tools/eslint/lib/testers/rule-tester.js create mode 100644 tools/eslint/lib/util/comment-event-generator.js create mode 100644 tools/eslint/lib/util/estraverse.js create mode 100644 tools/eslint/lib/util/glob-util.js create mode 100644 tools/eslint/lib/util/keywords.js create mode 100644 tools/eslint/lib/util/node-event-generator.js create mode 100644 tools/eslint/lib/util/rule-fixer.js create mode 100644 tools/eslint/lib/util/source-code-fixer.js create mode 100644 tools/eslint/lib/util/source-code.js delete mode 100644 tools/eslint/lib/util/traverse.js create mode 120000 tools/eslint/node_modules/.bin/handlebars create mode 120000 tools/eslint/node_modules/.bin/rimraf create mode 120000 tools/eslint/node_modules/.bin/shjs create mode 120000 tools/eslint/node_modules/.bin/uglifyjs delete mode 120000 tools/eslint/node_modules/.bin/user-home create mode 100644 tools/eslint/node_modules/align-text/LICENSE create mode 100644 tools/eslint/node_modules/align-text/README.md create mode 100644 tools/eslint/node_modules/align-text/index.js create mode 100644 tools/eslint/node_modules/align-text/package.json create mode 100644 tools/eslint/node_modules/amdefine/LICENSE create mode 100644 tools/eslint/node_modules/amdefine/README.md create mode 100644 tools/eslint/node_modules/amdefine/amdefine.js create mode 100644 tools/eslint/node_modules/amdefine/intercept.js create mode 100644 tools/eslint/node_modules/amdefine/package.json create mode 100644 tools/eslint/node_modules/ansi-escapes/index.js rename tools/eslint/node_modules/{chalk/node_modules/ansi-styles => ansi-escapes}/license (100%) create mode 100644 tools/eslint/node_modules/ansi-escapes/package.json create mode 100644 tools/eslint/node_modules/ansi-escapes/readme.md create mode 100644 tools/eslint/node_modules/ansi-regex/index.js rename tools/eslint/node_modules/{chalk/node_modules/has-ansi => ansi-regex}/license (100%) create mode 100644 tools/eslint/node_modules/ansi-regex/package.json create mode 100644 tools/eslint/node_modules/ansi-regex/readme.md create mode 100644 tools/eslint/node_modules/ansi-styles/index.js rename tools/eslint/node_modules/{chalk/node_modules/has-ansi/node_modules/ansi-regex => ansi-styles}/license (100%) create mode 100644 tools/eslint/node_modules/ansi-styles/package.json create mode 100644 tools/eslint/node_modules/ansi-styles/readme.md rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/LICENSE (100%) create mode 100644 tools/eslint/node_modules/argparse/README.md rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/index.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/append.js (99%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/append/constant.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/count.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/help.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/store.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/store/constant.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/store/false.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/store/true.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/subparsers.js (99%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action/version.js (99%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/action_container.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/argparse.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/argument/error.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/argument/exclusive.js (99%) create mode 100644 tools/eslint/node_modules/argparse/lib/argument/group.js rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/argument_parser.js (99%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/const.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/help/added_formatters.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/help/formatter.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules => }/argparse/lib/namespace.js (100%) create mode 100644 tools/eslint/node_modules/argparse/package.json create mode 100644 tools/eslint/node_modules/array-union/index.js create mode 100644 tools/eslint/node_modules/array-union/package.json create mode 100644 tools/eslint/node_modules/array-union/readme.md create mode 100644 tools/eslint/node_modules/array-uniq/index.js create mode 100644 tools/eslint/node_modules/array-uniq/package.json create mode 100644 tools/eslint/node_modules/array-uniq/readme.md create mode 100644 tools/eslint/node_modules/arrify/index.js rename tools/eslint/node_modules/{chalk/node_modules/strip-ansi/node_modules/ansi-regex => arrify}/license (100%) create mode 100644 tools/eslint/node_modules/arrify/package.json create mode 100644 tools/eslint/node_modules/arrify/readme.md create mode 100644 tools/eslint/node_modules/async/LICENSE create mode 100644 tools/eslint/node_modules/async/README.md create mode 100644 tools/eslint/node_modules/async/dist/async.js create mode 100644 tools/eslint/node_modules/async/dist/async.min.js create mode 100644 tools/eslint/node_modules/async/lib/async.js create mode 100644 tools/eslint/node_modules/async/package.json create mode 100644 tools/eslint/node_modules/balanced-match/LICENSE.md rename tools/eslint/node_modules/{minimatch/node_modules/brace-expansion/node_modules => }/balanced-match/Makefile (98%) create mode 100644 tools/eslint/node_modules/balanced-match/README.md create mode 100644 tools/eslint/node_modules/balanced-match/example.js create mode 100644 tools/eslint/node_modules/balanced-match/index.js create mode 100644 tools/eslint/node_modules/balanced-match/package.json create mode 100644 tools/eslint/node_modules/brace-expansion/README.md create mode 100644 tools/eslint/node_modules/brace-expansion/example.js create mode 100644 tools/eslint/node_modules/brace-expansion/index.js create mode 100644 tools/eslint/node_modules/brace-expansion/package.json create mode 100644 tools/eslint/node_modules/camelcase/index.js rename tools/eslint/node_modules/{chalk/node_modules/supports-color => camelcase}/license (100%) create mode 100644 tools/eslint/node_modules/camelcase/package.json create mode 100644 tools/eslint/node_modules/camelcase/readme.md create mode 100644 tools/eslint/node_modules/center-align/LICENSE create mode 100644 tools/eslint/node_modules/center-align/README.md create mode 100644 tools/eslint/node_modules/center-align/index.js create mode 100644 tools/eslint/node_modules/center-align/package.json create mode 100644 tools/eslint/node_modules/center-align/utils.js delete mode 120000 tools/eslint/node_modules/chalk/node_modules/.bin/has-ansi delete mode 120000 tools/eslint/node_modules/chalk/node_modules/.bin/strip-ansi delete mode 120000 tools/eslint/node_modules/chalk/node_modules/.bin/supports-color delete mode 100644 tools/eslint/node_modules/chalk/node_modules/ansi-styles/index.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/ansi-styles/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/ansi-styles/readme.md delete mode 100755 tools/eslint/node_modules/chalk/node_modules/has-ansi/cli.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/has-ansi/readme.md delete mode 100755 tools/eslint/node_modules/chalk/node_modules/strip-ansi/cli.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md delete mode 100644 tools/eslint/node_modules/chalk/node_modules/strip-ansi/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/strip-ansi/readme.md delete mode 100755 tools/eslint/node_modules/chalk/node_modules/supports-color/cli.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/supports-color/index.js delete mode 100644 tools/eslint/node_modules/chalk/node_modules/supports-color/package.json delete mode 100644 tools/eslint/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 tools/eslint/node_modules/cli-cursor/index.js rename tools/eslint/node_modules/{inquirer/node_modules/ansi-regex => cli-cursor}/license (100%) create mode 100644 tools/eslint/node_modules/cli-cursor/package.json create mode 100644 tools/eslint/node_modules/cli-cursor/readme.md create mode 100644 tools/eslint/node_modules/cli-width/LICENSE create mode 100644 tools/eslint/node_modules/cli-width/README.md create mode 100644 tools/eslint/node_modules/cli-width/index.js create mode 100644 tools/eslint/node_modules/cli-width/package.json create mode 100644 tools/eslint/node_modules/cliui/.coveralls.yml create mode 100644 tools/eslint/node_modules/cliui/LICENSE.txt create mode 100644 tools/eslint/node_modules/cliui/README.md create mode 100644 tools/eslint/node_modules/cliui/index.js rename tools/eslint/node_modules/{optionator => cliui}/node_modules/wordwrap/README.markdown (100%) create mode 100644 tools/eslint/node_modules/cliui/node_modules/wordwrap/index.js create mode 100644 tools/eslint/node_modules/cliui/node_modules/wordwrap/package.json create mode 100644 tools/eslint/node_modules/cliui/package.json create mode 100644 tools/eslint/node_modules/code-point-at/index.js create mode 100644 tools/eslint/node_modules/code-point-at/license create mode 100644 tools/eslint/node_modules/code-point-at/package.json create mode 100644 tools/eslint/node_modules/code-point-at/readme.md rename tools/eslint/node_modules/{minimatch/node_modules/brace-expansion/node_modules => }/concat-map/LICENSE (100%) rename tools/eslint/node_modules/{minimatch/node_modules/brace-expansion/node_modules => }/concat-map/README.markdown (100%) rename tools/eslint/node_modules/{minimatch/node_modules/brace-expansion/node_modules => }/concat-map/index.js (100%) create mode 100644 tools/eslint/node_modules/concat-map/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/inherits/LICENSE delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/inherits/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/inherits/test.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/.npmignore delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/.travis.yml delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/README.md delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/doc/stream.markdown delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/readable-stream/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/typedarray/.travis.yml delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/typedarray/example/tarray.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/typedarray/package.json delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js delete mode 100644 tools/eslint/node_modules/concat-stream/node_modules/typedarray/test/tarray.js create mode 100644 tools/eslint/node_modules/core-util-is/LICENSE rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/core-util-is/README.md (100%) rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/core-util-is/float.patch (100%) create mode 100644 tools/eslint/node_modules/core-util-is/lib/util.js create mode 100644 tools/eslint/node_modules/core-util-is/package.json rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/d/.lint (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map => d}/LICENCE (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/d/README.md (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/d/auto-bind.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/d/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/d/lazy.js (100%) create mode 100644 tools/eslint/node_modules/d/package.json delete mode 100644 tools/eslint/node_modules/debug/.jshintrc delete mode 100644 tools/eslint/node_modules/debug/.npmignore delete mode 100644 tools/eslint/node_modules/debug/History.md delete mode 100644 tools/eslint/node_modules/debug/bower.json delete mode 100644 tools/eslint/node_modules/debug/component.json delete mode 100644 tools/eslint/node_modules/debug/node_modules/ms/.npmignore delete mode 100644 tools/eslint/node_modules/debug/node_modules/ms/package.json create mode 100644 tools/eslint/node_modules/decamelize/index.js create mode 100644 tools/eslint/node_modules/decamelize/license create mode 100644 tools/eslint/node_modules/decamelize/package.json create mode 100644 tools/eslint/node_modules/decamelize/readme.md rename tools/eslint/node_modules/{optionator/node_modules => }/deep-is/LICENSE (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/deep-is/README.markdown (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/deep-is/index.js (100%) create mode 100644 tools/eslint/node_modules/deep-is/package.json create mode 100644 tools/eslint/node_modules/del/index.js create mode 100644 tools/eslint/node_modules/del/license create mode 100644 tools/eslint/node_modules/del/package.json create mode 100644 tools/eslint/node_modules/del/readme.md delete mode 100644 tools/eslint/node_modules/doctrine/.jshintrc delete mode 100644 tools/eslint/node_modules/doctrine/.npmignore delete mode 100644 tools/eslint/node_modules/doctrine/.scripted delete mode 100644 tools/eslint/node_modules/doctrine/.travis.yml delete mode 100644 tools/eslint/node_modules/doctrine/CONTRIBUTING.md delete mode 100644 tools/eslint/node_modules/doctrine/coverage/coverage-final.json delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/base.css delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/index.html delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.css delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.js delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/sort-arrow-sprite.png delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov-report/sorter.js delete mode 100644 tools/eslint/node_modules/doctrine/coverage/lcov.info delete mode 100644 tools/eslint/node_modules/doctrine/eslint.json delete mode 100644 tools/eslint/node_modules/doctrine/gulpfile.js delete mode 100644 tools/eslint/node_modules/doctrine/node_modules/isarray/README.md delete mode 100644 tools/eslint/node_modules/doctrine/node_modules/isarray/build/build.js delete mode 100644 tools/eslint/node_modules/doctrine/node_modules/isarray/component.json delete mode 100644 tools/eslint/node_modules/doctrine/node_modules/isarray/index.js delete mode 100644 tools/eslint/node_modules/doctrine/node_modules/isarray/package.json delete mode 100644 tools/eslint/node_modules/doctrine/test/midstream.js delete mode 100644 tools/eslint/node_modules/doctrine/test/parse.js delete mode 100644 tools/eslint/node_modules/doctrine/test/strict.js delete mode 100644 tools/eslint/node_modules/doctrine/test/stringify.js delete mode 100644 tools/eslint/node_modules/doctrine/test/test.html delete mode 100644 tools/eslint/node_modules/doctrine/test/unwrap.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/.lint (100%) create mode 100644 tools/eslint/node_modules/es5-ext/.lintignore rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/LICENSE (100%) create mode 100644 tools/eslint/node_modules/es5-ext/README.md rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/@@iterator/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/@@iterator/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/@@iterator/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/@@iterator/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/_compare-by-length.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/binary-search.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/clear.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/compact.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/concat/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/concat/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/concat/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/concat/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/contains.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/copy-within/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/copy-within/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/copy-within/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/copy-within/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/diff.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/e-index-of.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/e-last-index-of.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/entries/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/entries/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/entries/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/entries/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/exclusion.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/fill/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/fill/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/fill/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/fill/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/filter/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/filter/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/filter/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/filter/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find-index/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find-index/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find-index/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find-index/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/find/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/first-index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/first.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/flatten.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/array/#/for-each-right.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/group.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/indexes-of.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/intersection.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/is-copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/is-uniq.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/keys/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/keys/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/keys/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/keys/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/last-index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/last.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/map/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/map/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/map/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/map/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/remove.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/separate.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/slice/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/slice/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/slice/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/slice/shim.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/array/#/some-right.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/splice/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/splice/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/splice/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/splice/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/uniq.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/values/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/values/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/values/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/#/values/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/_is-extensible.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/_sub-array-dummy-safe.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/_sub-array-dummy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/from/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/from/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/from/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/from/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/generate.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/is-plain-array.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/of/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/of/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/of/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/of/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/to-array.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/array/valid-array.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/boolean/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/boolean/is-boolean.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/days-in-month.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/floor-day.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/floor-month.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/floor-year.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/format.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/is-date.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/date/valid-date.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/#/throw.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/custom.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/is-error.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/error/valid-error.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/compose.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/curry.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/lock.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/not.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/partial.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/spread.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/#/to-string-tokens.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/_define-length.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/constant.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/identity.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/invoke.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/is-arguments.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/is-function.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/noop.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/pluck.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/function/valid-function.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/global.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/iterable/for-each.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/iterable/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/iterable/is.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/iterable/validate-object.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/iterable/validate.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/_pack-ieee754.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/_unpack-ieee754.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/acosh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/acosh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/acosh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/acosh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/asinh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/asinh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/asinh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/asinh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/atanh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/atanh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/atanh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/atanh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cbrt/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cbrt/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cbrt/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cbrt/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/clz32/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/clz32/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/clz32/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/clz32/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cosh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cosh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cosh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/cosh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/expm1/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/expm1/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/expm1/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/expm1/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/fround/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/fround/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/fround/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/fround/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/hypot/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/hypot/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/hypot/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/hypot/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/imul/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/imul/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/imul/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/imul/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log10/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log10/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log10/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log10/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log1p/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log1p/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log1p/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log1p/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log2/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log2/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log2/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/log2/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sign/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sign/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sign/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sign/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sinh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sinh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sinh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/sinh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/tanh/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/tanh/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/tanh/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/tanh/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/trunc/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/trunc/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/trunc/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/math/trunc/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/#/pad.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/epsilon/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/epsilon/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/epsilon/is-implemented.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/number/index.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-finite/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-finite/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-finite/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-finite/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-integer/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-integer/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-integer/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-integer/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-nan/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-nan/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-nan/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-nan/shim.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/number/is-natural.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-number.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-safe-integer/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-safe-integer/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-safe-integer/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/is-safe-integer/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/max-safe-integer/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/max-safe-integer/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/max-safe-integer/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/min-safe-integer/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/min-safe-integer/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/min-safe-integer/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/to-integer.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/to-pos-integer.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/number/to-uint32.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/_iterate.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/assign/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/assign/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/assign/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/assign/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/clear.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/compact.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/compare.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/copy-deep.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/count.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/create.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/ensure-natural-number-value.js create mode 100644 tools/eslint/node_modules/es5-ext/object/ensure-natural-number.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/eq.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/every.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/filter.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/find-key.js create mode 100644 tools/eslint/node_modules/es5-ext/object/find.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/first-key.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/flatten.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/for-each.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/get-property-names.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/index.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-array-like.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-callable.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-copy-deep.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-empty.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/object/is-number-value.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-object.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is-plain-object.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/is.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/key-of.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/keys/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/keys/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/keys/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/keys/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/map-keys.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/map.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/mixin-prototypes.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/mixin.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/normalize-options.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/primitive-set.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/safe-traverse.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/serialize.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/set-prototype-of/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/set-prototype-of/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/set-prototype-of/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/set-prototype-of/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/some.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/to-array.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/unserialize.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/valid-callable.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/valid-object.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/valid-value.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/validate-array-like-object.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/validate-array-like.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/validate-stringifiable-value.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/object/validate-stringifiable.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/package.json rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/is-sticky.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/is-unicode.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/match/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/match/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/match/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/match/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/replace/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/replace/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/replace/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/replace/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/search/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/search/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/search/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/search/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/split/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/split/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/split/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/split/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/sticky/implement.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/#/unicode/implement.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/escape.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/is-reg-exp.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/reg-exp/valid-reg-exp.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/@@iterator/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/@@iterator/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/@@iterator/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/@@iterator/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/at.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/camel-to-hyphen.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/capitalize.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/case-insensitive-compare.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/code-point-at/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/code-point-at/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/code-point-at/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/code-point-at/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/contains/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/contains/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/contains/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/contains/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/ends-with/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/ends-with/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/ends-with/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/ends-with/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/hyphen-to-camel.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/indent.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/string/#/index.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/last.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/normalize/_data.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/normalize/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/normalize/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/normalize/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/normalize/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/pad.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/plain-replace-all.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/plain-replace.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/repeat/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/repeat/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/repeat/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/repeat/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/starts-with/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/starts-with/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/starts-with/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/#/starts-with/shim.js (100%) create mode 100644 tools/eslint/node_modules/es5-ext/string/#/uncapitalize.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/format-method.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/from-code-point/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/from-code-point/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/from-code-point/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/from-code-point/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/is-string.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/random-uniq.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/raw/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/raw/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/raw/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es5-ext/string/raw/shim.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/#/chain.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/.lint (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol => es6-iterator}/LICENSE (100%) create mode 100644 tools/eslint/node_modules/es6-iterator/README.md rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/array.js (100%) create mode 100644 tools/eslint/node_modules/es6-iterator/for-of.js create mode 100644 tools/eslint/node_modules/es6-iterator/get.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/index.js (100%) create mode 100644 tools/eslint/node_modules/es6-iterator/is-iterable.js create mode 100644 tools/eslint/node_modules/es6-iterator/package.json rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/string.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-iterator/valid-iterable.js (100%) create mode 100644 tools/eslint/node_modules/es6-map/.lint rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/d/LICENCE => es6-map/LICENSE} (100%) create mode 100644 tools/eslint/node_modules/es6-map/README.md rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/index.js (100%) create mode 100644 tools/eslint/node_modules/es6-map/is-implemented.js create mode 100644 tools/eslint/node_modules/es6-map/is-map.js create mode 100644 tools/eslint/node_modules/es6-map/is-native-implemented.js rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/lib/iterator-kinds.js (100%) rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/lib/iterator.js (100%) rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/lib/primitive-iterator.js (100%) create mode 100644 tools/eslint/node_modules/es6-map/package.json create mode 100644 tools/eslint/node_modules/es6-map/polyfill.js create mode 100644 tools/eslint/node_modules/es6-map/primitive/index.js rename tools/eslint/node_modules/{escope/node_modules => }/es6-map/valid-map.js (100%) create mode 100644 tools/eslint/node_modules/es6-set/.lint rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es6-set/LICENCE => es6-set/LICENSE} (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/README.md (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/ext/copy.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/ext/every.js (100%) create mode 100644 tools/eslint/node_modules/es6-set/ext/filter.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/ext/get-first.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/ext/get-last.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/ext/some.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/index.js (100%) create mode 100644 tools/eslint/node_modules/es6-set/is-implemented.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/is-native-implemented.js (100%) create mode 100644 tools/eslint/node_modules/es6-set/is-set.js create mode 100644 tools/eslint/node_modules/es6-set/lib/iterator.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/lib/primitive-iterator.js (100%) create mode 100644 tools/eslint/node_modules/es6-set/package.json create mode 100644 tools/eslint/node_modules/es6-set/polyfill.js create mode 100644 tools/eslint/node_modules/es6-set/primitive/index.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/es6-set/valid-set.js (100%) create mode 100644 tools/eslint/node_modules/es6-symbol/.lint rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es6-iterator => es6-symbol}/LICENSE (100%) create mode 100644 tools/eslint/node_modules/es6-symbol/README.md rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/implement.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/index.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/is-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/is-native-implemented.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/is-symbol.js (100%) create mode 100644 tools/eslint/node_modules/es6-symbol/package.json create mode 100644 tools/eslint/node_modules/es6-symbol/polyfill.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es5-ext/node_modules => }/es6-symbol/validate-symbol.js (100%) create mode 100644 tools/eslint/node_modules/es6-weak-map/.lint rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules/es6-symbol/LICENCE => es6-weak-map/LICENSE} (100%) create mode 100644 tools/eslint/node_modules/es6-weak-map/README.md rename tools/eslint/node_modules/{escope/node_modules => }/es6-weak-map/implement.js (100%) create mode 100644 tools/eslint/node_modules/es6-weak-map/index.js create mode 100644 tools/eslint/node_modules/es6-weak-map/is-implemented.js create mode 100644 tools/eslint/node_modules/es6-weak-map/is-native-implemented.js rename tools/eslint/node_modules/{escope/node_modules => }/es6-weak-map/is-weak-map.js (100%) create mode 100644 tools/eslint/node_modules/es6-weak-map/package.json create mode 100644 tools/eslint/node_modules/es6-weak-map/polyfill.js rename tools/eslint/node_modules/{escope/node_modules => }/es6-weak-map/valid-weak-map.js (100%) delete mode 100644 tools/eslint/node_modules/escope/.jshintrc delete mode 100644 tools/eslint/node_modules/escope/CONTRIBUTING.md delete mode 100644 tools/eslint/node_modules/escope/bower.json delete mode 100644 tools/eslint/node_modules/escope/gulpfile.js create mode 100644 tools/eslint/node_modules/escope/lib/pattern-visitor.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/is-map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/auto-bind.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/lazy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lintignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/for-each-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/some-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/_iterate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/__tad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/_compare-by-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/binary-search.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/contains.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/diff.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-last-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/exclusion.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/for-each-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/group.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/indexes-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/intersection.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/remove.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/separate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/some-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/__scopes.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_is-extensible.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/generate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/is-plain-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/valid-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/boolean/is-boolean.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/days-in-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-day.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-year.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/format.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/is-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/valid-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/#/throw.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/custom.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/is-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/valid-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/compose.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/curry.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/lock.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/not.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/partial.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/spread.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/to-string-tokens.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/_define-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/constant.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/identity.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/invoke.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-arguments.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/noop.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/pluck.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/valid-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/global.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_pack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_unpack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-number.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-pos-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-uint32.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/_iterate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/count.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/create.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/eq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/every.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/filter.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/first-key.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/get-property-names.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-empty.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-plain-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/key-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map-keys.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin-prototypes.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/normalize-options.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/primitive-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/safe-traverse.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/serialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/some.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/unserialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/escape.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/at.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/capitalize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/indent.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/_data.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace-all.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/format-method.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/is-string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/random-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/for-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/get.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/is-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/LICENSE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/validate-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/validate-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/#/chain.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/for-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/get.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/is-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/valid-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/iterator.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/primitive/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/every.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-first.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/some.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/iterator.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/primitive-iterator.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/primitive/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/valid-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/valid-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/many-on.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/single-on.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/all-off.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/has-listeners.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/pipe.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/unify.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/primitive/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/is-map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator-kinds.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/primitive-iterator.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/primitive/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-map/test/valid-map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/LICENCE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/LICENCE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/auto-bind.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/lazy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/lazy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/global.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/get.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.lint delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/README.md delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/implement.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/index.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-native-implemented.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-weak-map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/polyfill.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/valid-weak-map.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/esrecurse/gulpfile.coffee delete mode 100644 tools/eslint/node_modules/escope/node_modules/esrecurse/package.json delete mode 100644 tools/eslint/node_modules/escope/node_modules/estraverse/.jshintrc delete mode 100644 tools/eslint/node_modules/escope/node_modules/estraverse/gulpfile.js delete mode 100644 tools/eslint/node_modules/escope/node_modules/estraverse/package.json create mode 100644 tools/eslint/node_modules/escope/src/pattern-visitor.js delete mode 100644 tools/eslint/node_modules/espree/test/compat.js delete mode 100644 tools/eslint/node_modules/espree/test/reflect.js delete mode 100644 tools/eslint/node_modules/espree/test/run.js delete mode 100644 tools/eslint/node_modules/espree/test/runner.js delete mode 100644 tools/eslint/node_modules/espree/test/test.js rename tools/eslint/node_modules/{escope/node_modules => }/esrecurse/README.md (100%) rename tools/eslint/node_modules/{escope/node_modules => }/esrecurse/esrecurse.js (100%) rename tools/eslint/node_modules/{escope => esrecurse}/node_modules/estraverse/LICENSE.BSD (100%) rename tools/eslint/node_modules/{escope => esrecurse}/node_modules/estraverse/README.md (100%) rename tools/eslint/node_modules/{escope => esrecurse}/node_modules/estraverse/estraverse.js (100%) create mode 100644 tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json create mode 100644 tools/eslint/node_modules/esrecurse/package.json delete mode 100644 tools/eslint/node_modules/estraverse-fb/.npmignore delete mode 100644 tools/eslint/node_modules/estraverse-fb/.travis.yml delete mode 100644 tools/eslint/node_modules/estraverse-fb/test.js delete mode 100644 tools/eslint/node_modules/estraverse/.jshintrc delete mode 100644 tools/eslint/node_modules/estraverse/gulpfile.js create mode 100644 tools/eslint/node_modules/esutils/LICENSE.BSD create mode 100644 tools/eslint/node_modules/esutils/README.md create mode 100644 tools/eslint/node_modules/esutils/lib/ast.js create mode 100644 tools/eslint/node_modules/esutils/lib/code.js create mode 100644 tools/eslint/node_modules/esutils/lib/keyword.js create mode 100644 tools/eslint/node_modules/esutils/lib/utils.js create mode 100644 tools/eslint/node_modules/esutils/package.json rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/.lint (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/.testignore (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/LICENSE (100%) create mode 100644 tools/eslint/node_modules/event-emitter/README.md rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/all-off.js (100%) create mode 100644 tools/eslint/node_modules/event-emitter/emit-error.js rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/has-listeners.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/index.js (100%) create mode 100644 tools/eslint/node_modules/event-emitter/package.json rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/pipe.js (100%) rename tools/eslint/node_modules/{escope/node_modules/es6-map/node_modules => }/event-emitter/unify.js (100%) create mode 100644 tools/eslint/node_modules/exit-hook/index.js create mode 100644 tools/eslint/node_modules/exit-hook/package.json create mode 100644 tools/eslint/node_modules/exit-hook/readme.md create mode 100644 tools/eslint/node_modules/fast-levenshtein/LICENSE.md rename tools/eslint/node_modules/{optionator/node_modules => }/fast-levenshtein/README.md (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/fast-levenshtein/levenshtein.js (99%) create mode 100644 tools/eslint/node_modules/fast-levenshtein/package.json create mode 100644 tools/eslint/node_modules/figures/index.js create mode 100644 tools/eslint/node_modules/figures/license create mode 100644 tools/eslint/node_modules/figures/package.json create mode 100644 tools/eslint/node_modules/figures/readme.md create mode 100644 tools/eslint/node_modules/file-entry-cache/LICENSE create mode 100644 tools/eslint/node_modules/file-entry-cache/README.md create mode 100644 tools/eslint/node_modules/file-entry-cache/cache.js create mode 100644 tools/eslint/node_modules/file-entry-cache/changelog.md create mode 100644 tools/eslint/node_modules/file-entry-cache/package.json create mode 100644 tools/eslint/node_modules/flat-cache/LICENSE create mode 100644 tools/eslint/node_modules/flat-cache/README.md create mode 100644 tools/eslint/node_modules/flat-cache/cache.js create mode 100644 tools/eslint/node_modules/flat-cache/changelog.md create mode 100644 tools/eslint/node_modules/flat-cache/package.json rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-function/README.md (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-function/example.js (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-function/index.js (100%) create mode 100644 tools/eslint/node_modules/generate-function/package.json rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-object-property/LICENSE (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-object-property/README.md (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/generate-object-property/index.js (100%) create mode 100644 tools/eslint/node_modules/generate-object-property/package.json create mode 100644 tools/eslint/node_modules/glob/LICENSE create mode 100644 tools/eslint/node_modules/glob/README.md create mode 100644 tools/eslint/node_modules/glob/common.js create mode 100644 tools/eslint/node_modules/glob/glob.js create mode 100644 tools/eslint/node_modules/glob/package.json create mode 100644 tools/eslint/node_modules/glob/sync.js create mode 100644 tools/eslint/node_modules/globby/index.js create mode 100644 tools/eslint/node_modules/globby/license create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/LICENSE create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/README.md create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/common.js create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/glob.js create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/package.json create mode 100644 tools/eslint/node_modules/globby/node_modules/glob/sync.js create mode 100644 tools/eslint/node_modules/globby/package.json create mode 100644 tools/eslint/node_modules/globby/readme.md create mode 100644 tools/eslint/node_modules/graceful-fs/LICENSE create mode 100644 tools/eslint/node_modules/graceful-fs/README.md create mode 100644 tools/eslint/node_modules/graceful-fs/fs.js create mode 100644 tools/eslint/node_modules/graceful-fs/graceful-fs.js create mode 100644 tools/eslint/node_modules/graceful-fs/legacy-streams.js create mode 100644 tools/eslint/node_modules/graceful-fs/package.json create mode 100644 tools/eslint/node_modules/graceful-fs/polyfills.js create mode 100644 tools/eslint/node_modules/handlebars/.istanbul.yml create mode 100644 tools/eslint/node_modules/handlebars/FAQ.md create mode 100644 tools/eslint/node_modules/handlebars/LICENSE create mode 100644 tools/eslint/node_modules/handlebars/README.markdown create mode 100755 tools/eslint/node_modules/handlebars/bin/handlebars create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars.runtime.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/base.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/base.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/exception.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/each.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/if.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/log.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/with.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/logger.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/no-conflict.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/runtime.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/safe-string.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/handlebars/utils.js create mode 100644 tools/eslint/node_modules/handlebars/dist/amd/precompiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars.runtime.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/base.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/exception.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/logger.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/runtime.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/safe-string.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/handlebars/utils.js create mode 100644 tools/eslint/node_modules/handlebars/dist/cjs/precompiler.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.amd.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.amd.min.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.min.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.min.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.runtime.js create mode 100644 tools/eslint/node_modules/handlebars/dist/handlebars.runtime.min.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars.runtime.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/base.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/ast.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/base.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/code-gen.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/compiler.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/parser.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/printer.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/visitor.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/decorators.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/decorators/inline.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/exception.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/each.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/if.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/lookup.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/helpers/with.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/logger.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/no-conflict.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/runtime.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/safe-string.js create mode 100644 tools/eslint/node_modules/handlebars/lib/handlebars/utils.js create mode 100644 tools/eslint/node_modules/handlebars/lib/index.js create mode 100644 tools/eslint/node_modules/handlebars/lib/precompiler.js create mode 100644 tools/eslint/node_modules/handlebars/package.json create mode 100755 tools/eslint/node_modules/handlebars/print-script create mode 100644 tools/eslint/node_modules/handlebars/release-notes.md create mode 100644 tools/eslint/node_modules/handlebars/runtime.js rename tools/eslint/node_modules/{chalk/node_modules => }/has-ansi/index.js (100%) create mode 100644 tools/eslint/node_modules/has-ansi/license create mode 100644 tools/eslint/node_modules/has-ansi/package.json create mode 100644 tools/eslint/node_modules/has-ansi/readme.md create mode 100644 tools/eslint/node_modules/inflight/LICENSE create mode 100644 tools/eslint/node_modules/inflight/README.md create mode 100644 tools/eslint/node_modules/inflight/inflight.js create mode 100644 tools/eslint/node_modules/inflight/package.json create mode 100644 tools/eslint/node_modules/inherits/LICENSE rename tools/eslint/node_modules/{concat-stream/node_modules => }/inherits/README.md (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/inherits/inherits.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/inherits/inherits_browser.js (100%) create mode 100644 tools/eslint/node_modules/inherits/package.json create mode 100644 tools/eslint/node_modules/inquirer/lib/utils/paginator.js create mode 100644 tools/eslint/node_modules/inquirer/lib/utils/readline.js create mode 100644 tools/eslint/node_modules/inquirer/lib/utils/screen-manager.js delete mode 100644 tools/eslint/node_modules/inquirer/lib/utils/tty.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/cli-width/.npmignore delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/cli-width/README.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/cli-width/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/cli-width/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/cli-width/test/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/figures/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/figures/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/figures/readme.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/README.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/chunk.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/difference.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/flatten.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/indexOf.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/intersection.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/pull.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedIndex.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/union.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/uniq.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/without.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/array/xor.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/chain.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/chain/lodash.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperCommit.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperPlant.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperReverse.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/every.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/includes.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/invoke.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduce.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/some.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortBy.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByOrder.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/after.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/ary.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/before.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/debounce.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/defer.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/delay.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/memoize.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/rearg.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/restParam.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/spread.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/throttle.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/function/wrap.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/LazyWrapper.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/arraySum.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseClone.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseCreate.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseDifference.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseFlatten.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseIsEqualDeep.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseMerge.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseMergeDeep.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseRandom.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseToString.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseUniq.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/baseWrapperValue.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/binaryIndexBy.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/bufferClone.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/compareAscending.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/compareMultiple.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/composeArgs.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createAggregator.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createAssigner.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createCache.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createCtorWrapper.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createCurry.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createExtremum.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createFlow.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createHybridWrapper.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createPadding.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createPartial.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createPartialWrapper.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/createWrapper.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/equalByTag.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/escapeStringChar.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/getView.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/isIndex.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/isLaziable.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/isLength.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/lazyClone.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/lazyValue.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/shimIsPlainObject.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/internal/sortedUniq.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/clone.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/cloneDeep.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isArguments.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isArray.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isBoolean.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isDate.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isElement.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isEmpty.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isEqual.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isError.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isFinite.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isFunction.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isMatch.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isNative.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isNumber.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isPlainObject.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isRegExp.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isString.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/lang/isTypedArray.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/math.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/math/max.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/math/min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/math/sum.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/number/inRange.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/number/random.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/assign.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/create.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/defaults.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/get.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/invert.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/keys.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/merge.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/pick.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/result.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/set.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/object/transform.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/escapeRegExp.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/pad.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/parseInt.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/repeat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/template.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/trunc.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/string/words.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/support.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/attempt.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/callback.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/mixin.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/propertyOf.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/range.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/lodash/utility/times.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/README.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/index.js delete mode 120000 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/.bin/strip-ansi delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/mute-stream/LICENSE delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/mute-stream/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/mute-stream/test/basic.js delete mode 100755 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/strip-ansi/cli.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/strip-ansi/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/strip-ansi/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/node_modules/strip-ansi/readme.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/readline2/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/.coveralls.yml delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/.jamignore delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/.jscsrc delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/.jscsrc.todo delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/authors.txt delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/bower.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/component.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.aggregates.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.aggregates.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.aggregates.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.compat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.compat.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.compat.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.all.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.compat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.compat.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.compat.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.async.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.backpressure.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.backpressure.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.backpressure.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.binding.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.binding.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.binding.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.coincidence.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.coincidence.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.coincidence.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.compat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.compat.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.compat.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.experimental.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.experimental.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.experimental.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.joinpatterns.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.joinpatterns.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.joinpatterns.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.compat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.compat.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.compat.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.compat.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.compat.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.compat.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.sorting.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.sorting.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.sorting.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.testing.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.testing.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.testing.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.time.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.time.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.time.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.virtualtime.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.virtualtime.map delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.virtualtime.min.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/license.txt delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/logos/logo.png delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/readme.md delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.aggregates.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.all.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-tests.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-tests.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.experimental.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.joinpatterns.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.testing.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time-lite.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.virtualtime.d.ts delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/.travis.yml delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.MIT delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/index.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/package.json delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/readme.markdown delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/test/async.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/test/auto-destroy.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/test/buffering.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/test/end.js delete mode 100644 tools/eslint/node_modules/inquirer/node_modules/through/test/index.js create mode 100644 tools/eslint/node_modules/is-buffer/.zuul.yml create mode 100644 tools/eslint/node_modules/is-buffer/LICENSE create mode 100644 tools/eslint/node_modules/is-buffer/README.md create mode 100644 tools/eslint/node_modules/is-buffer/index.js create mode 100644 tools/eslint/node_modules/is-buffer/package.json create mode 100644 tools/eslint/node_modules/is-fullwidth-code-point/index.js create mode 100644 tools/eslint/node_modules/is-fullwidth-code-point/license create mode 100644 tools/eslint/node_modules/is-fullwidth-code-point/package.json create mode 100644 tools/eslint/node_modules/is-fullwidth-code-point/readme.md delete mode 100644 tools/eslint/node_modules/is-my-json-valid/.npmignore delete mode 100644 tools/eslint/node_modules/is-my-json-valid/.travis.yml delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/package.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/test.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.npmignore delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/immutable.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/mutable.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/package.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/test.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/fixtures/cosmic.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/default.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/format.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/items.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/not.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/required.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/type.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/json-schema.js delete mode 100644 tools/eslint/node_modules/is-my-json-valid/test/misc.js create mode 100644 tools/eslint/node_modules/is-path-cwd/index.js create mode 100644 tools/eslint/node_modules/is-path-cwd/package.json create mode 100644 tools/eslint/node_modules/is-path-cwd/readme.md create mode 100644 tools/eslint/node_modules/is-path-in-cwd/index.js create mode 100644 tools/eslint/node_modules/is-path-in-cwd/package.json create mode 100644 tools/eslint/node_modules/is-path-in-cwd/readme.md create mode 100644 tools/eslint/node_modules/is-path-inside/index.js create mode 100644 tools/eslint/node_modules/is-path-inside/package.json create mode 100644 tools/eslint/node_modules/is-path-inside/readme.md rename tools/eslint/node_modules/{is-my-json-valid/node_modules/generate-object-property/node_modules => }/is-property/LICENSE (100%) create mode 100644 tools/eslint/node_modules/is-property/README.md rename tools/eslint/node_modules/{is-my-json-valid/node_modules/generate-object-property/node_modules => }/is-property/is-property.js (100%) create mode 100644 tools/eslint/node_modules/is-property/package.json create mode 100644 tools/eslint/node_modules/is-resolvable/LICENSE create mode 100755 tools/eslint/node_modules/is-resolvable/README.md create mode 100755 tools/eslint/node_modules/is-resolvable/index.js create mode 100644 tools/eslint/node_modules/is-resolvable/package.json rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/isarray/README.md (100%) create mode 100644 tools/eslint/node_modules/isarray/build/build.js rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/isarray/index.js (100%) create mode 100644 tools/eslint/node_modules/isarray/package.json delete mode 100644 tools/eslint/node_modules/js-yaml/CHANGELOG.md delete mode 100644 tools/eslint/node_modules/js-yaml/bower.json create mode 100644 tools/eslint/node_modules/js-yaml/dist/js-yaml.min.js delete mode 100644 tools/eslint/node_modules/js-yaml/examples/custom_types.js delete mode 100644 tools/eslint/node_modules/js-yaml/examples/custom_types.yml delete mode 100644 tools/eslint/node_modules/js-yaml/examples/dumper.js delete mode 100644 tools/eslint/node_modules/js-yaml/examples/dumper.json delete mode 100644 tools/eslint/node_modules/js-yaml/examples/sample_document.js delete mode 100644 tools/eslint/node_modules/js-yaml/examples/sample_document.yml delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/CHANGELOG.md delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/README.md delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/arguments.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/constants.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/help.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/nargs.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/parents.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js delete mode 100755 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/README.md delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/chunk.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/compact.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/difference.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/drop.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRightWhile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropWhile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/fill.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findLastIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/first.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flatten.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flattenDeep.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/head.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/indexOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/initial.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/intersection.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/last.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/lastIndexOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/object.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pull.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pullAt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/remove.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/rest.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/slice.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedLastIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/tail.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/take.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRightWhile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeWhile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/union.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/uniq.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unique.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzip.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzipWith.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/without.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/xor.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zip.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipWith.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/chain.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/commit.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/lodash.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/plant.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/reverse.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/run.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/tap.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/thru.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toJSON.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toString.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/value.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/valueOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperChain.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperCommit.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperPlant.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperReverse.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperToString.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperValue.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/all.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/any.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/at.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/collect.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/contains.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/countBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/detect.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/each.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/eachRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/every.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/filter.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/find.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findLast.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findWhere.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldl.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldr.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEach.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEachRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/groupBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/include.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/includes.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/indexBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/inject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/invoke.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/map.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/max.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/min.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/partition.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/pluck.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduce.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sample.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/select.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/shuffle.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/size.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/some.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByAll.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByOrder.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/where.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date/now.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/after.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/ary.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/backflow.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/before.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bind.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindAll.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindKey.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/compose.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curry.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curryRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/debounce.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/defer.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/delay.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flow.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flowRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/memoize.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/negate.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/once.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partial.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partialRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/rearg.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/restParam.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/spread.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/throttle.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/wrap.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/index.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/LazyWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/LodashWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/MapCache.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/SetCache.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayCopy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayEach.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayEachRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayEvery.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayExtremum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayFilter.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayMap.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduce.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arraySome.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arraySum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignDefaults.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignWith.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseAssign.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseAt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCallback.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseClone.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCopy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCreate.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseDelay.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseDifference.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseEach.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseEachRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseEvery.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseExtremum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFill.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFilter.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFind.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFindIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFlatten.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFor.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseForIn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseForOwn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseForOwnRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseForRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseFunctions.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseGet.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseIndexOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseIsEqual.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseIsEqualDeep.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseIsFunction.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseIsMatch.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseLodash.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseMap.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseMatches.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseMatchesProperty.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseMerge.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseMergeDeep.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseProperty.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/basePropertyDeep.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/basePullAt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseRandom.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseReduce.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSetData.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSlice.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSome.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSortByOrder.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseSum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseToString.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseUniq.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseValues.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseWhile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseWrapperValue.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/binaryIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/binaryIndexBy.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/bindCallback.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/bufferClone.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/cacheIndexOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/cachePush.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/charsLeftIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/charsRightIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/compareAscending.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/compareMultiple.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/composeArgs.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/composeArgsRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createAggregator.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createAssigner.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createBaseEach.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createBaseFor.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createBindWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createCache.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createCompounder.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createCtorWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createCurry.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createExtremum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createFind.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createFindIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createFindKey.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createFlow.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createForEach.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createForIn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createForOwn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createHybridWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createObjectMapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createPadDir.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createPadding.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createPartial.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createPartialWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createReduce.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createWrapper.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/deburrLetter.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/equalArrays.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/equalByTag.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/equalObjects.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/escapeHtmlChar.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/escapeStringChar.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getData.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getLength.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getMatchData.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getNative.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getView.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/initCloneArray.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/initCloneByTag.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/initCloneObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/invokePath.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isArrayLike.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isIterateeCall.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isKey.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLaziable.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isLength.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isObjectLike.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isSpace.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/isStrictComparable.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/lazyClone.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/lazyReverse.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/lazyValue.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/mapDelete.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/mapGet.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/mapHas.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/mapSet.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/mergeData.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/metaMap.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/pickByArray.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/pickByCallback.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/reEscape.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/reEvaluate.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/reInterpolate.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/realNames.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/reorder.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/replaceHolders.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/setData.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/shimIsPlainObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/shimKeys.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/sortedUniq.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/toIterable.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/toObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/toPath.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/trimmedLeftIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/trimmedRightIndex.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/wrapperClone.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/clone.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/cloneDeep.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/eq.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/gt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/gte.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isArguments.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isArray.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isBoolean.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isDate.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isElement.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isEmpty.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isEqual.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isError.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isFinite.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isFunction.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isMatch.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNaN.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNative.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNull.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isNumber.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isPlainObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isRegExp.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isString.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isTypedArray.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/isUndefined.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/lt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/lte.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/toArray.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/lang/toPlainObject.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/math.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/math/add.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/math/max.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/math/min.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/math/sum.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/number.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/number/inRange.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/number/random.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/assign.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/create.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/defaults.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/extend.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/findKey.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/findLastKey.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/forIn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/forInRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/forOwn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/forOwnRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/functions.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/get.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/has.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/invert.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/keys.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/keysIn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/mapKeys.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/mapValues.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/merge.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/methods.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/omit.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/pairs.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/pick.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/result.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/set.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/transform.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/values.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/object/valuesIn.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/package.json delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/camelCase.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/capitalize.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/deburr.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/endsWith.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/escape.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/escapeRegExp.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/kebabCase.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/pad.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/padLeft.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/padRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/parseInt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/repeat.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/snakeCase.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/startCase.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/startsWith.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/template.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/templateSettings.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/trim.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/trimLeft.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/trimRight.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/trunc.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/unescape.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/words.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/support.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/attempt.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/callback.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/constant.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/identity.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/iteratee.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/matches.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/matchesProperty.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/method.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/methodOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/mixin.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/noop.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/property.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/propertyOf.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/range.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/times.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/utility/uniqueId.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/.npmignore delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/LICENSE delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/README.md delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/bower.json delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/demo/angular.html delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.map delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/gruntfile.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/package.json delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/test/test.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/argparse/package.json delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/esprima/ChangeLog delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/esprima/test/run.js delete mode 100644 tools/eslint/node_modules/js-yaml/node_modules/esprima/test/runner.js rename tools/eslint/node_modules/{mkdirp/node_modules/minimist => json-stable-stringify}/LICENSE (100%) create mode 100644 tools/eslint/node_modules/json-stable-stringify/index.js create mode 100644 tools/eslint/node_modules/json-stable-stringify/package.json create mode 100644 tools/eslint/node_modules/json-stable-stringify/readme.markdown create mode 100644 tools/eslint/node_modules/jsonify/README.markdown create mode 100644 tools/eslint/node_modules/jsonify/index.js create mode 100644 tools/eslint/node_modules/jsonify/lib/parse.js create mode 100644 tools/eslint/node_modules/jsonify/lib/stringify.js create mode 100644 tools/eslint/node_modules/jsonify/package.json create mode 100644 tools/eslint/node_modules/jsonpointer/README.md rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/jsonpointer/jsonpointer.js (79%) create mode 100644 tools/eslint/node_modules/jsonpointer/package.json create mode 100644 tools/eslint/node_modules/kind-of/LICENSE create mode 100644 tools/eslint/node_modules/kind-of/README.md create mode 100644 tools/eslint/node_modules/kind-of/index.js create mode 100644 tools/eslint/node_modules/kind-of/package.json create mode 100644 tools/eslint/node_modules/lazy-cache/LICENSE create mode 100644 tools/eslint/node_modules/lazy-cache/README.md create mode 100644 tools/eslint/node_modules/lazy-cache/index.js create mode 100644 tools/eslint/node_modules/lazy-cache/package.json rename tools/eslint/node_modules/{optionator/node_modules => }/levn/LICENSE (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/README.md (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/lib/cast.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/lib/coerce.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/lib/index.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/lib/parse-string.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/levn/lib/parse.js (100%) create mode 100644 tools/eslint/node_modules/levn/package.json create mode 100644 tools/eslint/node_modules/lodash._arraycopy/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._arraycopy/README.md create mode 100644 tools/eslint/node_modules/lodash._arraycopy/index.js create mode 100644 tools/eslint/node_modules/lodash._arraycopy/package.json create mode 100644 tools/eslint/node_modules/lodash._arrayeach/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._arrayeach/README.md create mode 100644 tools/eslint/node_modules/lodash._arrayeach/index.js create mode 100644 tools/eslint/node_modules/lodash._arrayeach/package.json create mode 100644 tools/eslint/node_modules/lodash._arraymap/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._arraymap/README.md create mode 100644 tools/eslint/node_modules/lodash._arraymap/index.js create mode 100644 tools/eslint/node_modules/lodash._arraymap/package.json rename tools/eslint/node_modules/{inquirer/node_modules/lodash => lodash._baseassign}/LICENSE.txt (100%) create mode 100644 tools/eslint/node_modules/lodash._baseassign/README.md create mode 100644 tools/eslint/node_modules/lodash._baseassign/index.js create mode 100644 tools/eslint/node_modules/lodash._baseassign/package.json rename tools/eslint/node_modules/{js-yaml/node_modules/argparse/node_modules/lodash/LICENSE.txt => lodash._baseclone/LICENSE} (100%) create mode 100644 tools/eslint/node_modules/lodash._baseclone/README.md create mode 100644 tools/eslint/node_modules/lodash._baseclone/index.js create mode 100644 tools/eslint/node_modules/lodash._baseclone/package.json create mode 100644 tools/eslint/node_modules/lodash._basecopy/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._basecopy/README.md create mode 100644 tools/eslint/node_modules/lodash._basecopy/index.js create mode 100644 tools/eslint/node_modules/lodash._basecopy/package.json create mode 100644 tools/eslint/node_modules/lodash._basedifference/LICENSE create mode 100644 tools/eslint/node_modules/lodash._basedifference/README.md create mode 100644 tools/eslint/node_modules/lodash._basedifference/index.js create mode 100644 tools/eslint/node_modules/lodash._basedifference/package.json create mode 100644 tools/eslint/node_modules/lodash._baseflatten/LICENSE create mode 100644 tools/eslint/node_modules/lodash._baseflatten/README.md create mode 100644 tools/eslint/node_modules/lodash._baseflatten/index.js create mode 100644 tools/eslint/node_modules/lodash._baseflatten/package.json create mode 100644 tools/eslint/node_modules/lodash._basefor/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._basefor/README.md create mode 100644 tools/eslint/node_modules/lodash._basefor/index.js create mode 100644 tools/eslint/node_modules/lodash._basefor/package.json create mode 100644 tools/eslint/node_modules/lodash._baseindexof/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._baseindexof/README.md create mode 100644 tools/eslint/node_modules/lodash._baseindexof/index.js create mode 100644 tools/eslint/node_modules/lodash._baseindexof/package.json create mode 100644 tools/eslint/node_modules/lodash._bindcallback/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._bindcallback/README.md create mode 100644 tools/eslint/node_modules/lodash._bindcallback/index.js create mode 100644 tools/eslint/node_modules/lodash._bindcallback/package.json create mode 100644 tools/eslint/node_modules/lodash._cacheindexof/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._cacheindexof/README.md create mode 100644 tools/eslint/node_modules/lodash._cacheindexof/index.js create mode 100644 tools/eslint/node_modules/lodash._cacheindexof/package.json create mode 100644 tools/eslint/node_modules/lodash._createassigner/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._createassigner/README.md create mode 100644 tools/eslint/node_modules/lodash._createassigner/index.js create mode 100644 tools/eslint/node_modules/lodash._createassigner/package.json create mode 100644 tools/eslint/node_modules/lodash._createcache/LICENSE create mode 100644 tools/eslint/node_modules/lodash._createcache/README.md create mode 100644 tools/eslint/node_modules/lodash._createcache/index.js create mode 100644 tools/eslint/node_modules/lodash._createcache/package.json create mode 100644 tools/eslint/node_modules/lodash._getnative/LICENSE create mode 100644 tools/eslint/node_modules/lodash._getnative/README.md create mode 100644 tools/eslint/node_modules/lodash._getnative/index.js create mode 100644 tools/eslint/node_modules/lodash._getnative/package.json create mode 100644 tools/eslint/node_modules/lodash._isiterateecall/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._isiterateecall/README.md create mode 100644 tools/eslint/node_modules/lodash._isiterateecall/index.js create mode 100644 tools/eslint/node_modules/lodash._isiterateecall/package.json create mode 100644 tools/eslint/node_modules/lodash._pickbyarray/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._pickbyarray/README.md create mode 100644 tools/eslint/node_modules/lodash._pickbyarray/index.js create mode 100644 tools/eslint/node_modules/lodash._pickbyarray/package.json create mode 100644 tools/eslint/node_modules/lodash._pickbycallback/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash._pickbycallback/README.md create mode 100644 tools/eslint/node_modules/lodash._pickbycallback/index.js create mode 100644 tools/eslint/node_modules/lodash._pickbycallback/package.json create mode 100644 tools/eslint/node_modules/lodash.clonedeep/LICENSE create mode 100644 tools/eslint/node_modules/lodash.clonedeep/README.md create mode 100644 tools/eslint/node_modules/lodash.clonedeep/index.js create mode 100644 tools/eslint/node_modules/lodash.clonedeep/package.json create mode 100644 tools/eslint/node_modules/lodash.isarguments/LICENSE create mode 100644 tools/eslint/node_modules/lodash.isarguments/README.md create mode 100644 tools/eslint/node_modules/lodash.isarguments/index.js create mode 100644 tools/eslint/node_modules/lodash.isarguments/package.json create mode 100644 tools/eslint/node_modules/lodash.isarray/LICENSE create mode 100644 tools/eslint/node_modules/lodash.isarray/README.md create mode 100644 tools/eslint/node_modules/lodash.isarray/index.js create mode 100644 tools/eslint/node_modules/lodash.isarray/package.json create mode 100644 tools/eslint/node_modules/lodash.isplainobject/LICENSE create mode 100644 tools/eslint/node_modules/lodash.isplainobject/README.md create mode 100644 tools/eslint/node_modules/lodash.isplainobject/index.js create mode 100644 tools/eslint/node_modules/lodash.isplainobject/package.json create mode 100644 tools/eslint/node_modules/lodash.istypedarray/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash.istypedarray/README.md create mode 100644 tools/eslint/node_modules/lodash.istypedarray/index.js create mode 100644 tools/eslint/node_modules/lodash.istypedarray/package.json create mode 100644 tools/eslint/node_modules/lodash.keys/LICENSE create mode 100644 tools/eslint/node_modules/lodash.keys/README.md create mode 100644 tools/eslint/node_modules/lodash.keys/index.js create mode 100644 tools/eslint/node_modules/lodash.keys/package.json create mode 100644 tools/eslint/node_modules/lodash.keysin/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash.keysin/README.md create mode 100644 tools/eslint/node_modules/lodash.keysin/index.js create mode 100644 tools/eslint/node_modules/lodash.keysin/package.json create mode 100644 tools/eslint/node_modules/lodash.merge/LICENSE create mode 100644 tools/eslint/node_modules/lodash.merge/README.md create mode 100644 tools/eslint/node_modules/lodash.merge/index.js create mode 100644 tools/eslint/node_modules/lodash.merge/package.json create mode 100644 tools/eslint/node_modules/lodash.omit/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash.omit/README.md create mode 100644 tools/eslint/node_modules/lodash.omit/index.js create mode 100644 tools/eslint/node_modules/lodash.omit/package.json create mode 100644 tools/eslint/node_modules/lodash.restparam/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash.restparam/README.md create mode 100644 tools/eslint/node_modules/lodash.restparam/index.js create mode 100644 tools/eslint/node_modules/lodash.restparam/package.json create mode 100644 tools/eslint/node_modules/lodash.toplainobject/LICENSE.txt create mode 100644 tools/eslint/node_modules/lodash.toplainobject/README.md create mode 100644 tools/eslint/node_modules/lodash.toplainobject/index.js create mode 100644 tools/eslint/node_modules/lodash.toplainobject/package.json create mode 100644 tools/eslint/node_modules/lodash/LICENSE create mode 100644 tools/eslint/node_modules/lodash/README.md rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/chunk.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/compact.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/difference.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/drop.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/dropRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/dropRightWhile.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/dropWhile.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/fill.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/findIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/findLastIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/first.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/flatten.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/flattenDeep.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/head.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/indexOf.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/initial.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/intersection.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/last.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/lastIndexOf.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/object.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/pull.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/pullAt.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/remove.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/rest.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/slice.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/sortedIndex.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/sortedLastIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/tail.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/take.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/takeRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/takeRightWhile.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/takeWhile.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/union.js create mode 100644 tools/eslint/node_modules/lodash/array/uniq.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/unique.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/unzip.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/unzipWith.js (100%) create mode 100644 tools/eslint/node_modules/lodash/array/without.js create mode 100644 tools/eslint/node_modules/lodash/array/xor.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/zip.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/zipObject.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/array/zipWith.js (100%) create mode 100644 tools/eslint/node_modules/lodash/chain.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/chain.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/commit.js (100%) create mode 100644 tools/eslint/node_modules/lodash/chain/concat.js create mode 100644 tools/eslint/node_modules/lodash/chain/lodash.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/plant.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/reverse.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/run.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/tap.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/thru.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/toJSON.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/toString.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/value.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/valueOf.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/wrapperChain.js (100%) create mode 100644 tools/eslint/node_modules/lodash/chain/wrapperCommit.js create mode 100644 tools/eslint/node_modules/lodash/chain/wrapperConcat.js create mode 100644 tools/eslint/node_modules/lodash/chain/wrapperPlant.js create mode 100644 tools/eslint/node_modules/lodash/chain/wrapperReverse.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/wrapperToString.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/chain/wrapperValue.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/all.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/any.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/at.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/collect.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/contains.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/countBy.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/detect.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/each.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/eachRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/every.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/filter.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/find.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/findLast.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/findWhere.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/foldl.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/foldr.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/forEach.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/forEachRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/groupBy.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/include.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/includes.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/indexBy.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/inject.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/invoke.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/map.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/max.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/min.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/partition.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/pluck.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/reduce.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/reduceRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/reject.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/sample.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/select.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/shuffle.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/size.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/some.js create mode 100644 tools/eslint/node_modules/lodash/collection/sortBy.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/sortByAll.js (100%) create mode 100644 tools/eslint/node_modules/lodash/collection/sortByOrder.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/sum.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/collection/where.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/date.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/date/now.js (100%) create mode 100644 tools/eslint/node_modules/lodash/function.js create mode 100644 tools/eslint/node_modules/lodash/function/after.js create mode 100644 tools/eslint/node_modules/lodash/function/ary.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/backflow.js (100%) create mode 100644 tools/eslint/node_modules/lodash/function/before.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/bind.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/bindAll.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/bindKey.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/compose.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/curry.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/curryRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/function/debounce.js create mode 100644 tools/eslint/node_modules/lodash/function/defer.js create mode 100644 tools/eslint/node_modules/lodash/function/delay.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/flow.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/flowRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/function/memoize.js create mode 100644 tools/eslint/node_modules/lodash/function/modArgs.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/negate.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/once.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/partial.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/function/partialRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/function/rearg.js create mode 100644 tools/eslint/node_modules/lodash/function/restParam.js create mode 100644 tools/eslint/node_modules/lodash/function/spread.js create mode 100644 tools/eslint/node_modules/lodash/function/throttle.js create mode 100644 tools/eslint/node_modules/lodash/function/wrap.js create mode 100644 tools/eslint/node_modules/lodash/index.js create mode 100644 tools/eslint/node_modules/lodash/internal/LazyWrapper.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/LodashWrapper.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/MapCache.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/SetCache.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/arrayConcat.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayCopy.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayEach.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayEachRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayEvery.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayExtremum.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayFilter.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayMap.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/arrayPush.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayReduce.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arrayReduceRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/arraySome.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/arraySum.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/assignDefaults.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/assignOwnDefaults.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/assignWith.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseAssign.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseAt.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseCallback.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseClone.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseCompareAscending.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseCopy.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseCreate.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseDelay.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseDifference.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseEach.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseEachRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseEvery.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseExtremum.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFill.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFilter.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFind.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFindIndex.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseFlatten.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFor.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseForIn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseForOwn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseForOwnRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseForRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseFunctions.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseGet.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseIndexOf.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseIsEqual.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseIsEqualDeep.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseIsFunction.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseIsMatch.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseLodash.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseMap.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseMatches.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseMatchesProperty.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseMerge.js create mode 100644 tools/eslint/node_modules/lodash/internal/baseMergeDeep.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseProperty.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/basePropertyDeep.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/basePullAt.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseRandom.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseReduce.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSetData.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSlice.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSome.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSortBy.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSortByOrder.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseSum.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseToString.js create mode 100644 tools/eslint/node_modules/lodash/internal/baseUniq.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseValues.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/baseWhile.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/baseWrapperValue.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/binaryIndex.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/binaryIndexBy.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/bindCallback.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/bufferClone.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/cacheIndexOf.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/cachePush.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/charsLeftIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/charsRightIndex.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/compareAscending.js create mode 100644 tools/eslint/node_modules/lodash/internal/compareMultiple.js create mode 100644 tools/eslint/node_modules/lodash/internal/composeArgs.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/composeArgsRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createAggregator.js create mode 100644 tools/eslint/node_modules/lodash/internal/createAssigner.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createBaseEach.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createBaseFor.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createBindWrapper.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createCache.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createCompounder.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createCtorWrapper.js create mode 100644 tools/eslint/node_modules/lodash/internal/createCurry.js create mode 100644 tools/eslint/node_modules/lodash/internal/createDefaults.js create mode 100644 tools/eslint/node_modules/lodash/internal/createExtremum.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createFind.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createFindIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createFindKey.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createFlow.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createForEach.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createForIn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createForOwn.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createHybridWrapper.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createObjectMapper.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createPadDir.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createPadding.js create mode 100644 tools/eslint/node_modules/lodash/internal/createPartial.js create mode 100644 tools/eslint/node_modules/lodash/internal/createPartialWrapper.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createReduce.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createRound.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/createSortedIndex.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/createWrapper.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/deburrLetter.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/equalArrays.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/equalByTag.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/equalObjects.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/escapeHtmlChar.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/escapeRegExpChar.js create mode 100644 tools/eslint/node_modules/lodash/internal/escapeStringChar.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/getData.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/getFuncName.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/getLength.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/getMatchData.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/getNative.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/getView.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/indexOfNaN.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/initCloneArray.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/initCloneByTag.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/initCloneObject.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/invokePath.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isArrayLike.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/isIndex.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isIterateeCall.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isKey.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/isLaziable.js create mode 100644 tools/eslint/node_modules/lodash/internal/isLength.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isObjectLike.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isSpace.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/isStrictComparable.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/lazyClone.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/lazyReverse.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/lazyValue.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/mapDelete.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/mapGet.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/mapHas.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/mapSet.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/mergeData.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/mergeDefaults.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/metaMap.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/pickByArray.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/pickByCallback.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/reEscape.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/reEvaluate.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/reInterpolate.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/realNames.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/reorder.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/replaceHolders.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/setData.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/shimKeys.js (100%) create mode 100644 tools/eslint/node_modules/lodash/internal/sortedUniq.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/toIterable.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/toObject.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/toPath.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/trimmedLeftIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/trimmedRightIndex.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/unescapeHtmlChar.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/internal/wrapperClone.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang.js (100%) create mode 100644 tools/eslint/node_modules/lodash/lang/clone.js create mode 100644 tools/eslint/node_modules/lodash/lang/cloneDeep.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/eq.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/gt.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/gte.js (100%) create mode 100644 tools/eslint/node_modules/lodash/lang/isArguments.js create mode 100644 tools/eslint/node_modules/lodash/lang/isArray.js create mode 100644 tools/eslint/node_modules/lodash/lang/isBoolean.js create mode 100644 tools/eslint/node_modules/lodash/lang/isDate.js create mode 100644 tools/eslint/node_modules/lodash/lang/isElement.js create mode 100644 tools/eslint/node_modules/lodash/lang/isEmpty.js create mode 100644 tools/eslint/node_modules/lodash/lang/isEqual.js create mode 100644 tools/eslint/node_modules/lodash/lang/isError.js create mode 100644 tools/eslint/node_modules/lodash/lang/isFinite.js create mode 100644 tools/eslint/node_modules/lodash/lang/isFunction.js create mode 100644 tools/eslint/node_modules/lodash/lang/isMatch.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/isNaN.js (100%) create mode 100644 tools/eslint/node_modules/lodash/lang/isNative.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/isNull.js (100%) create mode 100644 tools/eslint/node_modules/lodash/lang/isNumber.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/isObject.js (100%) create mode 100644 tools/eslint/node_modules/lodash/lang/isPlainObject.js create mode 100644 tools/eslint/node_modules/lodash/lang/isRegExp.js create mode 100644 tools/eslint/node_modules/lodash/lang/isString.js create mode 100644 tools/eslint/node_modules/lodash/lang/isTypedArray.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/isUndefined.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/lt.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/lte.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/toArray.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/lang/toPlainObject.js (100%) create mode 100644 tools/eslint/node_modules/lodash/math.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/math/add.js (100%) create mode 100644 tools/eslint/node_modules/lodash/math/ceil.js create mode 100644 tools/eslint/node_modules/lodash/math/floor.js create mode 100644 tools/eslint/node_modules/lodash/math/max.js create mode 100644 tools/eslint/node_modules/lodash/math/min.js create mode 100644 tools/eslint/node_modules/lodash/math/round.js create mode 100644 tools/eslint/node_modules/lodash/math/sum.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/number.js (100%) create mode 100644 tools/eslint/node_modules/lodash/number/inRange.js create mode 100644 tools/eslint/node_modules/lodash/number/random.js create mode 100644 tools/eslint/node_modules/lodash/object.js create mode 100644 tools/eslint/node_modules/lodash/object/assign.js create mode 100644 tools/eslint/node_modules/lodash/object/create.js create mode 100644 tools/eslint/node_modules/lodash/object/defaults.js create mode 100644 tools/eslint/node_modules/lodash/object/defaultsDeep.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/extend.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/findKey.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/findLastKey.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/forIn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/forInRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/forOwn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/forOwnRight.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/functions.js (100%) create mode 100644 tools/eslint/node_modules/lodash/object/get.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/has.js (100%) create mode 100644 tools/eslint/node_modules/lodash/object/invert.js create mode 100644 tools/eslint/node_modules/lodash/object/keys.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/keysIn.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/mapKeys.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/mapValues.js (100%) create mode 100644 tools/eslint/node_modules/lodash/object/merge.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/methods.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/omit.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/pairs.js (100%) create mode 100644 tools/eslint/node_modules/lodash/object/pick.js create mode 100644 tools/eslint/node_modules/lodash/object/result.js create mode 100644 tools/eslint/node_modules/lodash/object/set.js create mode 100644 tools/eslint/node_modules/lodash/object/transform.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/values.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/object/valuesIn.js (100%) create mode 100644 tools/eslint/node_modules/lodash/package.json rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/camelCase.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/capitalize.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/deburr.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/endsWith.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/escape.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/escapeRegExp.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/kebabCase.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/pad.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/padLeft.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/padRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/parseInt.js create mode 100644 tools/eslint/node_modules/lodash/string/repeat.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/snakeCase.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/startCase.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/startsWith.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/template.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/templateSettings.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/trim.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/trimLeft.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/trimRight.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/trunc.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/string/unescape.js (100%) create mode 100644 tools/eslint/node_modules/lodash/string/words.js create mode 100644 tools/eslint/node_modules/lodash/support.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility.js (100%) create mode 100644 tools/eslint/node_modules/lodash/utility/attempt.js create mode 100644 tools/eslint/node_modules/lodash/utility/callback.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/constant.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/identity.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/iteratee.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/matches.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/matchesProperty.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/method.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/methodOf.js (100%) create mode 100644 tools/eslint/node_modules/lodash/utility/mixin.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/noop.js (100%) rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/property.js (100%) create mode 100644 tools/eslint/node_modules/lodash/utility/propertyOf.js create mode 100644 tools/eslint/node_modules/lodash/utility/range.js create mode 100644 tools/eslint/node_modules/lodash/utility/times.js rename tools/eslint/node_modules/{inquirer/node_modules => }/lodash/utility/uniqueId.js (100%) create mode 100644 tools/eslint/node_modules/longest/LICENSE create mode 100644 tools/eslint/node_modules/longest/README.md create mode 100644 tools/eslint/node_modules/longest/index.js create mode 100644 tools/eslint/node_modules/longest/package.json delete mode 100644 tools/eslint/node_modules/minimatch/browser.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/.npmignore delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/.travis.yml delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/README.md delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/example.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/index.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/package.json delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/nested.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/order.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/pad.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js delete mode 100644 tools/eslint/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js rename tools/eslint/node_modules/{optionator/node_modules/wordwrap => minimist}/LICENSE (100%) create mode 100644 tools/eslint/node_modules/minimist/index.js create mode 100644 tools/eslint/node_modules/minimist/package.json rename tools/eslint/node_modules/{mkdirp/node_modules => }/minimist/readme.markdown (100%) delete mode 100644 tools/eslint/node_modules/mkdirp/.travis.yml delete mode 100644 tools/eslint/node_modules/mkdirp/examples/pow.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/.travis.yml delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/example/parse.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/index.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/package.json delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/dash.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/default_bool.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/dotted.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/long.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/parse.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/short.js delete mode 100644 tools/eslint/node_modules/mkdirp/node_modules/minimist/test/whitespace.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/chmod.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/clobber.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/mkdirp.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/opts_fs.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/opts_fs_sync.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/perm.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/perm_sync.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/race.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/rel.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/return.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/return_sync.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/root.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/sync.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/umask.js delete mode 100644 tools/eslint/node_modules/mkdirp/test/umask_sync.js rename tools/eslint/node_modules/{debug/node_modules => }/ms/LICENSE (100%) rename tools/eslint/node_modules/{debug/node_modules => }/ms/README.md (100%) rename tools/eslint/node_modules/{debug/node_modules => }/ms/index.js (100%) create mode 100644 tools/eslint/node_modules/ms/package.json create mode 100644 tools/eslint/node_modules/mute-stream/LICENSE rename tools/eslint/node_modules/{inquirer/node_modules/readline2/node_modules => }/mute-stream/README.md (100%) rename tools/eslint/node_modules/{inquirer/node_modules/readline2/node_modules => }/mute-stream/mute.js (100%) create mode 100644 tools/eslint/node_modules/mute-stream/package.json create mode 100644 tools/eslint/node_modules/number-is-nan/index.js create mode 100644 tools/eslint/node_modules/number-is-nan/license create mode 100644 tools/eslint/node_modules/number-is-nan/package.json create mode 100644 tools/eslint/node_modules/number-is-nan/readme.md create mode 100644 tools/eslint/node_modules/once/LICENSE create mode 100644 tools/eslint/node_modules/once/README.md create mode 100644 tools/eslint/node_modules/once/once.js create mode 100644 tools/eslint/node_modules/once/package.json create mode 100644 tools/eslint/node_modules/onetime/index.js create mode 100644 tools/eslint/node_modules/onetime/license create mode 100644 tools/eslint/node_modules/onetime/package.json create mode 100644 tools/eslint/node_modules/onetime/readme.md create mode 100644 tools/eslint/node_modules/optimist/LICENSE create mode 100644 tools/eslint/node_modules/optimist/index.js create mode 100644 tools/eslint/node_modules/optimist/package.json create mode 100644 tools/eslint/node_modules/optimist/readme.markdown delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/.npmignore delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/.travis.yml delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/example/cmp.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/test/NaN.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/test/cmp.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/deep-is/test/neg-vs-pos-0.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/.npmignore delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/.travis.yml delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/CONTRIBUTING.md delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/Gruntfile.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/LICENSE.md delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/benchmark/speed.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/bower.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/levenshtein.min.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/test/mocha.opts delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/test/tests.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/test/text1.txt delete mode 100644 tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/test/text2.txt delete mode 100644 tools/eslint/node_modules/optionator/node_modules/levn/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/prelude-ls/CHANGELOG.md delete mode 100644 tools/eslint/node_modules/optionator/node_modules/prelude-ls/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/type-check/README.md delete mode 100644 tools/eslint/node_modules/optionator/node_modules/type-check/lib/index.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/type-check/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/example/center.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/example/meat.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/index.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/package.json delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/test/break.js delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/test/idleness.txt delete mode 100644 tools/eslint/node_modules/optionator/node_modules/wordwrap/test/wrap.js create mode 100644 tools/eslint/node_modules/os-homedir/index.js create mode 100644 tools/eslint/node_modules/os-homedir/license create mode 100644 tools/eslint/node_modules/os-homedir/package.json create mode 100644 tools/eslint/node_modules/os-homedir/readme.md create mode 100644 tools/eslint/node_modules/path-is-inside/LICENSE.txt create mode 100644 tools/eslint/node_modules/path-is-inside/README.md create mode 100644 tools/eslint/node_modules/path-is-inside/lib/path-is-inside.js create mode 100644 tools/eslint/node_modules/path-is-inside/package.json create mode 100644 tools/eslint/node_modules/pify/index.js create mode 100644 tools/eslint/node_modules/pify/license create mode 100644 tools/eslint/node_modules/pify/package.json create mode 100644 tools/eslint/node_modules/pify/readme.md create mode 100644 tools/eslint/node_modules/pinkie-promise/index.js create mode 100644 tools/eslint/node_modules/pinkie-promise/license create mode 100644 tools/eslint/node_modules/pinkie-promise/package.json create mode 100644 tools/eslint/node_modules/pinkie-promise/readme.md create mode 100644 tools/eslint/node_modules/pinkie/index.js create mode 100644 tools/eslint/node_modules/pinkie/license create mode 100644 tools/eslint/node_modules/pinkie/package.json create mode 100644 tools/eslint/node_modules/pinkie/readme.md rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/LICENSE (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/README.md (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/Func.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/List.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/Num.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/Obj.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/Str.js (100%) rename tools/eslint/node_modules/{optionator/node_modules => }/prelude-ls/lib/index.js (100%) create mode 100644 tools/eslint/node_modules/prelude-ls/package.json create mode 100644 tools/eslint/node_modules/process-nextick-args/index.js create mode 100644 tools/eslint/node_modules/process-nextick-args/license.md create mode 100644 tools/eslint/node_modules/process-nextick-args/package.json create mode 100644 tools/eslint/node_modules/process-nextick-args/readme.md create mode 100755 tools/eslint/node_modules/read-json-sync/LICENSE create mode 100755 tools/eslint/node_modules/read-json-sync/README.md create mode 100755 tools/eslint/node_modules/read-json-sync/index.js create mode 100644 tools/eslint/node_modules/read-json-sync/package.json rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/.zuul.yml (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/LICENSE (100%) create mode 100644 tools/eslint/node_modules/readable-stream/README.md rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/duplex.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/lib/_stream_duplex.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/lib/_stream_passthrough.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/lib/_stream_readable.js (94%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/lib/_stream_transform.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/lib/_stream_writable.js (95%) create mode 100644 tools/eslint/node_modules/readable-stream/package.json rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/passthrough.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/readable.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/transform.js (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/readable-stream/writable.js (100%) create mode 100644 tools/eslint/node_modules/readline2/README.md create mode 100644 tools/eslint/node_modules/readline2/index.js create mode 100644 tools/eslint/node_modules/readline2/package.json create mode 100644 tools/eslint/node_modules/repeat-string/LICENSE create mode 100644 tools/eslint/node_modules/repeat-string/README.md create mode 100644 tools/eslint/node_modules/repeat-string/index.js create mode 100644 tools/eslint/node_modules/repeat-string/package.json create mode 100644 tools/eslint/node_modules/restore-cursor/index.js create mode 100644 tools/eslint/node_modules/restore-cursor/license create mode 100644 tools/eslint/node_modules/restore-cursor/package.json create mode 100644 tools/eslint/node_modules/restore-cursor/readme.md create mode 100644 tools/eslint/node_modules/right-align/LICENSE create mode 100644 tools/eslint/node_modules/right-align/README.md create mode 100644 tools/eslint/node_modules/right-align/index.js create mode 100644 tools/eslint/node_modules/right-align/package.json create mode 100644 tools/eslint/node_modules/rimraf/LICENSE create mode 100644 tools/eslint/node_modules/rimraf/README.md create mode 100755 tools/eslint/node_modules/rimraf/bin.js create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/LICENSE create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/README.md create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/common.js create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/glob.js create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/package.json create mode 100644 tools/eslint/node_modules/rimraf/node_modules/glob/sync.js create mode 100644 tools/eslint/node_modules/rimraf/package.json create mode 100644 tools/eslint/node_modules/rimraf/rimraf.js create mode 100644 tools/eslint/node_modules/run-async/LICENSE create mode 100644 tools/eslint/node_modules/run-async/README.md create mode 100644 tools/eslint/node_modules/run-async/index.js create mode 100644 tools/eslint/node_modules/run-async/package.json create mode 100644 tools/eslint/node_modules/rx-lite/package.json create mode 100644 tools/eslint/node_modules/rx-lite/readme.md rename tools/eslint/node_modules/{inquirer/node_modules/rx/dist => rx-lite}/rx.lite.js (83%) create mode 100644 tools/eslint/node_modules/rx-lite/rx.lite.map create mode 100644 tools/eslint/node_modules/rx-lite/rx.lite.min.js create mode 100644 tools/eslint/node_modules/shelljs/.documentup.json create mode 100644 tools/eslint/node_modules/shelljs/LICENSE create mode 100644 tools/eslint/node_modules/shelljs/README.md create mode 100644 tools/eslint/node_modules/shelljs/RELEASE.md create mode 100755 tools/eslint/node_modules/shelljs/bin/shjs create mode 100644 tools/eslint/node_modules/shelljs/global.js create mode 100644 tools/eslint/node_modules/shelljs/make.js create mode 100644 tools/eslint/node_modules/shelljs/package.json create mode 100755 tools/eslint/node_modules/shelljs/scripts/generate-docs.js create mode 100755 tools/eslint/node_modules/shelljs/scripts/run-tests.js create mode 100644 tools/eslint/node_modules/shelljs/shell.js create mode 100644 tools/eslint/node_modules/shelljs/src/cat.js create mode 100644 tools/eslint/node_modules/shelljs/src/cd.js create mode 100644 tools/eslint/node_modules/shelljs/src/chmod.js create mode 100644 tools/eslint/node_modules/shelljs/src/common.js create mode 100644 tools/eslint/node_modules/shelljs/src/cp.js create mode 100644 tools/eslint/node_modules/shelljs/src/dirs.js create mode 100644 tools/eslint/node_modules/shelljs/src/echo.js create mode 100644 tools/eslint/node_modules/shelljs/src/error.js create mode 100644 tools/eslint/node_modules/shelljs/src/exec.js create mode 100644 tools/eslint/node_modules/shelljs/src/find.js create mode 100644 tools/eslint/node_modules/shelljs/src/grep.js create mode 100644 tools/eslint/node_modules/shelljs/src/ln.js create mode 100644 tools/eslint/node_modules/shelljs/src/ls.js create mode 100644 tools/eslint/node_modules/shelljs/src/mkdir.js create mode 100644 tools/eslint/node_modules/shelljs/src/mv.js create mode 100644 tools/eslint/node_modules/shelljs/src/popd.js create mode 100644 tools/eslint/node_modules/shelljs/src/pushd.js create mode 100644 tools/eslint/node_modules/shelljs/src/pwd.js create mode 100644 tools/eslint/node_modules/shelljs/src/rm.js create mode 100644 tools/eslint/node_modules/shelljs/src/sed.js create mode 100644 tools/eslint/node_modules/shelljs/src/tempdir.js create mode 100644 tools/eslint/node_modules/shelljs/src/test.js create mode 100644 tools/eslint/node_modules/shelljs/src/to.js create mode 100644 tools/eslint/node_modules/shelljs/src/toEnd.js create mode 100644 tools/eslint/node_modules/shelljs/src/which.js create mode 100644 tools/eslint/node_modules/source-map/README.md create mode 100644 tools/eslint/node_modules/source-map/build/assert-shim.js create mode 100644 tools/eslint/node_modules/source-map/build/mini-require.js create mode 100644 tools/eslint/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 tools/eslint/node_modules/source-map/build/prefix-utils.jsm create mode 100644 tools/eslint/node_modules/source-map/build/suffix-browser.js create mode 100644 tools/eslint/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 tools/eslint/node_modules/source-map/build/suffix-utils.jsm create mode 100644 tools/eslint/node_modules/source-map/build/test-prefix.js create mode 100644 tools/eslint/node_modules/source-map/build/test-suffix.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/array-set.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/base64.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/quick-sort.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/source-node.js create mode 100644 tools/eslint/node_modules/source-map/lib/source-map/util.js create mode 100644 tools/eslint/node_modules/source-map/package.json create mode 100644 tools/eslint/node_modules/sprintf-js/LICENSE create mode 100644 tools/eslint/node_modules/sprintf-js/README.md rename tools/eslint/node_modules/{js-yaml/node_modules/argparse/node_modules => }/sprintf-js/dist/angular-sprintf.min.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/angular-sprintf.min.map => sprintf-js/dist/angular-sprintf.min.js.map} (100%) create mode 100644 tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map create mode 100644 tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js create mode 100644 tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map create mode 100644 tools/eslint/node_modules/sprintf-js/dist/sprintf.min.map create mode 100644 tools/eslint/node_modules/sprintf-js/package.json rename tools/eslint/node_modules/{js-yaml/node_modules/argparse/node_modules => }/sprintf-js/src/angular-sprintf.js (100%) rename tools/eslint/node_modules/{js-yaml/node_modules/argparse/node_modules => }/sprintf-js/src/sprintf.js (83%) rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/string_decoder/LICENSE (100%) rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/string_decoder/README.md (100%) rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/string_decoder/index.js (100%) create mode 100644 tools/eslint/node_modules/string_decoder/package.json rename tools/eslint/node_modules/{chalk/node_modules => }/strip-ansi/index.js (100%) create mode 100644 tools/eslint/node_modules/strip-ansi/license create mode 100644 tools/eslint/node_modules/strip-ansi/package.json create mode 100644 tools/eslint/node_modules/strip-ansi/readme.md create mode 100644 tools/eslint/node_modules/strip-json-comments/license create mode 100644 tools/eslint/node_modules/supports-color/index.js create mode 100644 tools/eslint/node_modules/supports-color/license create mode 100644 tools/eslint/node_modules/supports-color/package.json create mode 100644 tools/eslint/node_modules/supports-color/readme.md delete mode 100644 tools/eslint/node_modules/text-table/.travis.yml delete mode 100644 tools/eslint/node_modules/text-table/example/align.js delete mode 100644 tools/eslint/node_modules/text-table/example/center.js delete mode 100644 tools/eslint/node_modules/text-table/example/dotalign.js delete mode 100644 tools/eslint/node_modules/text-table/example/doubledot.js delete mode 100644 tools/eslint/node_modules/text-table/example/table.js delete mode 100644 tools/eslint/node_modules/text-table/test/align.js delete mode 100644 tools/eslint/node_modules/text-table/test/ansi-colors.js delete mode 100644 tools/eslint/node_modules/text-table/test/center.js delete mode 100644 tools/eslint/node_modules/text-table/test/dotalign.js delete mode 100644 tools/eslint/node_modules/text-table/test/doubledot.js delete mode 100644 tools/eslint/node_modules/text-table/test/table.js rename tools/eslint/node_modules/{inquirer/node_modules => }/through/LICENSE.APACHE2 (100%) create mode 100644 tools/eslint/node_modules/through/LICENSE.MIT create mode 100644 tools/eslint/node_modules/through/index.js create mode 100644 tools/eslint/node_modules/through/package.json create mode 100644 tools/eslint/node_modules/through/readme.markdown create mode 100644 tools/eslint/node_modules/tryit/README.md create mode 100644 tools/eslint/node_modules/tryit/package.json create mode 100644 tools/eslint/node_modules/tryit/tryit.js rename tools/eslint/node_modules/{optionator/node_modules => }/type-check/LICENSE (100%) create mode 100644 tools/eslint/node_modules/type-check/README.md rename tools/eslint/node_modules/{optionator/node_modules => }/type-check/lib/check.js (99%) create mode 100644 tools/eslint/node_modules/type-check/lib/index.js rename tools/eslint/node_modules/{optionator/node_modules => }/type-check/lib/parse-type.js (99%) create mode 100644 tools/eslint/node_modules/type-check/package.json rename tools/eslint/node_modules/{concat-stream/node_modules => }/typedarray/LICENSE (100%) rename tools/eslint/node_modules/{concat-stream/node_modules => }/typedarray/index.js (100%) create mode 100644 tools/eslint/node_modules/typedarray/package.json rename tools/eslint/node_modules/{concat-stream/node_modules => }/typedarray/readme.markdown (100%) create mode 100644 tools/eslint/node_modules/uglify-js/LICENSE create mode 100644 tools/eslint/node_modules/uglify-js/README.md create mode 100755 tools/eslint/node_modules/uglify-js/bin/extract-props.js create mode 100755 tools/eslint/node_modules/uglify-js/bin/uglifyjs create mode 100644 tools/eslint/node_modules/uglify-js/lib/ast.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/compress.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/output.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/parse.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/propmangle.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/scope.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/sourcemap.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/transform.js create mode 100644 tools/eslint/node_modules/uglify-js/lib/utils.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/async/LICENSE create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/async/README.md create mode 100755 tools/eslint/node_modules/uglify-js/node_modules/async/lib/async.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/async/package.json create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/README.md create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/array-set.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-node.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/util.js create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/package.json create mode 100644 tools/eslint/node_modules/uglify-js/node_modules/source-map/source-map.js create mode 100644 tools/eslint/node_modules/uglify-js/package.json create mode 100644 tools/eslint/node_modules/uglify-js/tools/domprops.json create mode 100644 tools/eslint/node_modules/uglify-js/tools/exports.js create mode 100644 tools/eslint/node_modules/uglify-js/tools/node.js create mode 100644 tools/eslint/node_modules/uglify-js/tools/props.html create mode 100644 tools/eslint/node_modules/uglify-to-browserify/LICENSE create mode 100644 tools/eslint/node_modules/uglify-to-browserify/README.md create mode 100644 tools/eslint/node_modules/uglify-to-browserify/index.js create mode 100644 tools/eslint/node_modules/uglify-to-browserify/package.json delete mode 100755 tools/eslint/node_modules/user-home/cli.js rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/util-deprecate/LICENSE (100%) rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/util-deprecate/README.md (100%) create mode 100644 tools/eslint/node_modules/util-deprecate/browser.js rename tools/eslint/node_modules/{concat-stream/node_modules/readable-stream/node_modules => }/util-deprecate/node.js (100%) create mode 100644 tools/eslint/node_modules/util-deprecate/package.json create mode 100644 tools/eslint/node_modules/window-size/LICENSE-MIT create mode 100644 tools/eslint/node_modules/window-size/README.md create mode 100644 tools/eslint/node_modules/window-size/index.js create mode 100644 tools/eslint/node_modules/window-size/package.json create mode 100644 tools/eslint/node_modules/wordwrap/LICENSE create mode 100644 tools/eslint/node_modules/wordwrap/README.markdown create mode 100644 tools/eslint/node_modules/wordwrap/index.js create mode 100644 tools/eslint/node_modules/wordwrap/package.json create mode 100644 tools/eslint/node_modules/wrappy/LICENSE create mode 100644 tools/eslint/node_modules/wrappy/README.md create mode 100644 tools/eslint/node_modules/wrappy/package.json create mode 100644 tools/eslint/node_modules/wrappy/wrappy.js create mode 100644 tools/eslint/node_modules/write/LICENSE create mode 100644 tools/eslint/node_modules/write/README.md create mode 100644 tools/eslint/node_modules/write/index.js create mode 100644 tools/eslint/node_modules/write/package.json delete mode 100644 tools/eslint/node_modules/xml-escape/.npmignore delete mode 100644 tools/eslint/node_modules/xml-escape/test.js rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/xtend/LICENCE (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/xtend/Makefile (100%) rename tools/eslint/node_modules/{is-my-json-valid/node_modules => }/xtend/README.md (100%) create mode 100644 tools/eslint/node_modules/xtend/immutable.js create mode 100644 tools/eslint/node_modules/xtend/mutable.js create mode 100644 tools/eslint/node_modules/xtend/package.json create mode 100644 tools/eslint/node_modules/yargs/LICENSE create mode 100644 tools/eslint/node_modules/yargs/README.md create mode 100644 tools/eslint/node_modules/yargs/completion.sh.hbs create mode 100644 tools/eslint/node_modules/yargs/index.js create mode 100644 tools/eslint/node_modules/yargs/lib/completion.js create mode 100644 tools/eslint/node_modules/yargs/lib/parser.js create mode 100644 tools/eslint/node_modules/yargs/lib/usage.js create mode 100644 tools/eslint/node_modules/yargs/lib/validation.js create mode 100644 tools/eslint/node_modules/yargs/package.json diff --git a/tools/eslint/README.md b/tools/eslint/README.md index bb4cc9c8e5a270..099a0dfd3554f3 100644 --- a/tools/eslint/README.md +++ b/tools/eslint/README.md @@ -31,6 +31,31 @@ After that, you can run ESLint on any JavaScript file: eslint test.js test2.js +## Configuration + +After running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this: + +```json +{ + "rules": { + "semi": [2, "always"], + "quotes": [2, "double"] + } +} +``` + +The names `"semi"` and `"quotes"` are the names of [rules](http://eslint.org/docs/rules) in ESLint. The number is the error level of the rule and can be one of the three values: + +* `0` - turn the rule off +* `1` - turn the rule on as a warning (doesn't affect exit code) +* `2` - turn the rule on as an error (exit code will be 1) + +The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](http://eslint.org/docs/user-guide/configuring)). + +## Sponsors + +* Development is sponsored by [Box](https://box.com) + ## Team These folks keep the project moving and are resources for help: @@ -38,10 +63,17 @@ These folks keep the project moving and are resources for help: * Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead * Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin)) - reviewer * Brandon Mills ([@btmills](https://github.com/btmills)) - reviewer +* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps)) - reviewer * Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma)) - committer -* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps)) - committer * Jamund Ferguson ([@xjamundx](https://github.com/xjamundx)) - committer +* Ian VanSchooten ([@ianvs](https://github.com/ianvs)) - committer +* Toru Nagashima ([@mysticatea](https://github.com/mysticatea)) - committer +* Burak Yiğit Kaya ([@byk](https://github.com/byk)) - committer +* Alberto Rodríguez ([@alberto](https://github.com/alberto)) - committer + +## Releases +We have scheduled releases every two weeks on Friday or Saturday. ## Frequently Asked Questions @@ -67,23 +99,6 @@ If you are using both JSHint and JSCS on your files, then using just ESLint will ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both. -### Who is using ESLint? - -The following projects are using ESLint to validate their JavaScript: - -* [Drupal](https://www.drupal.org/node/2274223) -* [Esprima](https://github.com/ariya/esprima) -* [io.js](https://github.com/iojs/io.js/commit/f9dd34d301ab385ae316769b85ef916f9b70b6f6) -* [WebKit](https://bugs.webkit.org/show_bug.cgi?id=125048) - -In addition, the following companies are using ESLint internally to validate their JavaScript: - -* [Box](https://box.com) -* [CustomInk](https://customink.com) -* [Fitbit](http://www.fitbit.com) -* [HolidayCheck](http://holidaycheck.de) -* [the native web](http://www.thenativeweb.io) - ### What about ECMAScript 6 support? ESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 support through [configuration](http://eslint.org/docs/user-guide/configuring). @@ -102,10 +117,10 @@ Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](ht [npm-image]: https://img.shields.io/npm/v/eslint.svg?style=flat-square -[npm-url]: https://npmjs.org/package/eslint +[npm-url]: https://www.npmjs.com/package/eslint [travis-image]: https://img.shields.io/travis/eslint/eslint/master.svg?style=flat-square [travis-url]: https://travis-ci.org/eslint/eslint [coveralls-image]: https://img.shields.io/coveralls/eslint/eslint/master.svg?style=flat-square [coveralls-url]: https://coveralls.io/r/eslint/eslint?branch=master -[downloads-image]: http://img.shields.io/npm/dm/eslint.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/eslint +[downloads-image]: https://img.shields.io/npm/dm/eslint.svg?style=flat-square +[downloads-url]: https://www.npmjs.com/package/eslint diff --git a/tools/eslint/bin/eslint.js b/tools/eslint/bin/eslint.js index 5e0cc800c8c603..8c7bce905351be 100755 --- a/tools/eslint/bin/eslint.js +++ b/tools/eslint/bin/eslint.js @@ -1,11 +1,39 @@ #!/usr/bin/env node -var concat = require("concat-stream"), - configInit = require("../lib/config-initializer"), - cli = require("../lib/cli"); + +/** + * @fileoverview Main CLI that is run via the eslint command. + * @author Nicholas C. Zakas + * @copyright 2013 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ var exitCode = 0, useStdIn = (process.argv.indexOf("--stdin") > -1), - init = (process.argv.indexOf("--init") > -1); + init = (process.argv.indexOf("--init") > -1), + debug = (process.argv.indexOf("--debug") > -1); + +// must do this initialization *before* other requires in order to work +if (debug) { + require("debug").enable("eslint:*"); +} + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +// now we can safely include the other modules that use debug +var concat = require("concat-stream"), + cli = require("../lib/cli"); + +//------------------------------------------------------------------------------ +// Execution +//------------------------------------------------------------------------------ if (useStdIn) { process.stdin.pipe(concat({ encoding: "string" }, function(text) { @@ -18,13 +46,13 @@ if (useStdIn) { } })); } else if (init) { + var configInit = require("../lib/config/config-initializer"); configInit.initializeConfig(function(err) { if (err) { exitCode = 1; console.error(err.message); console.error(err.stack); } else { - console.log("Successfully created .eslintrc file in " + process.cwd()); exitCode = 0; } }); diff --git a/tools/eslint/conf/blank-script.json b/tools/eslint/conf/blank-script.json new file mode 100644 index 00000000000000..d7d7d37ba89472 --- /dev/null +++ b/tools/eslint/conf/blank-script.json @@ -0,0 +1,21 @@ +{ + "type": "Program", + "body": [], + "sourceType": "script", + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 0, + "column": 0 + }, + "end": { + "line": 0, + "column": 0 + } + }, + "comments": [], + "tokens": [] +} diff --git a/tools/eslint/conf/environments.js b/tools/eslint/conf/environments.js index 5b01dc7ad6b37a..f66aebcd5b0bc0 100644 --- a/tools/eslint/conf/environments.js +++ b/tools/eslint/conf/environments.js @@ -5,8 +5,16 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + var globals = require("globals"); +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + module.exports = { builtin: globals.builtin, browser: { @@ -16,16 +24,12 @@ module.exports = { globals: globals.node, ecmaFeatures: { globalReturn: true - }, - rules: { - "no-catch-shadow": 0, - "no-console": 0, - "no-mixed-requires": 2, - "no-new-require": 2, - "no-path-concat": 2, - "no-process-exit": 2, - "global-strict": [0, "always"], - "handle-callback-err": [2, "err"] + } + }, + commonjs: { + globals: globals.commonjs, + ecmaFeatures: { + globalReturn: true } }, worker: { @@ -40,12 +44,18 @@ module.exports = { jasmine: { globals: globals.jasmine }, + jest: { + globals: globals.jest + }, phantomjs: { - globals: globals.phantom + globals: globals.phantomjs }, jquery: { globals: globals.jquery }, + qunit: { + globals: globals.qunit + }, prototypejs: { globals: globals.prototypejs }, @@ -58,9 +68,24 @@ module.exports = { mongo: { globals: globals.mongo }, + protractor: { + globals: globals.protractor + }, applescript: { globals: globals.applescript }, + nashorn: { + globals: globals.nashorn + }, + serviceworker: { + globals: globals.serviceworker + }, + embertest: { + globals: globals.embertest + }, + webextensions: { + globals: globals.webextensions + }, es6: { ecmaFeatures: { arrowFunctions: true, @@ -81,7 +106,9 @@ module.exports = { objectLiteralDuplicateProperties: true, generators: true, destructuring: true, - classes: true + classes: true, + spread: true, + newTarget: true } } }; diff --git a/tools/eslint/conf/eslint.json b/tools/eslint/conf/eslint.json index 28dc73ca09fb56..4984ba8f7af423 100644 --- a/tools/eslint/conf/eslint.json +++ b/tools/eslint/conf/eslint.json @@ -1,186 +1,196 @@ { - "ecmaFeatures": {}, "parser": "espree", - "env": { - "browser": false, - "node": false, - "amd": false, - "mocha": false, - "jasmine": false - }, - + "ecmaFeatures": {}, "rules": { - "no-alert": 2, - "no-array-constructor": 2, + "no-alert": 0, + "no-array-constructor": 0, + "no-arrow-condition": 0, "no-bitwise": 0, - "no-caller": 2, - "no-catch-shadow": 2, - "no-comma-dangle": 0, + "no-caller": 0, + "no-case-declarations": 0, + "no-catch-shadow": 0, + "no-class-assign": 0, "no-cond-assign": 2, "no-console": 2, + "no-const-assign": 0, "no-constant-condition": 2, "no-continue": 0, "no-control-regex": 2, "no-debugger": 2, "no-delete-var": 2, "no-div-regex": 0, + "no-dupe-class-members": 0, "no-dupe-keys": 2, "no-dupe-args": 2, "no-duplicate-case": 2, "no-else-return": 0, "no-empty": 2, - "no-empty-class": 0, "no-empty-character-class": 2, - "no-empty-label": 2, + "no-empty-label": 0, + "no-empty-pattern": 0, "no-eq-null": 0, - "no-eval": 2, + "no-eval": 0, "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, + "no-extend-native": 0, + "no-extra-bind": 0, "no-extra-boolean-cast": 2, "no-extra-parens": 0, "no-extra-semi": 2, - "no-extra-strict": 2, "no-fallthrough": 2, "no-floating-decimal": 0, "no-func-assign": 2, - "no-implied-eval": 2, + "no-implicit-coercion": 0, + "no-implied-eval": 0, "no-inline-comments": 0, "no-inner-declarations": [2, "functions"], "no-invalid-regexp": 2, + "no-invalid-this": 0, "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, + "no-iterator": 0, + "no-label-var": 0, + "no-labels": 0, + "no-lone-blocks": 0, "no-lonely-if": 0, - "no-loop-func": 2, + "no-loop-func": 0, "no-mixed-requires": [0, false], "no-mixed-spaces-and-tabs": [2, false], "linebreak-style": [0, "unix"], - "no-multi-spaces": 2, - "no-multi-str": 2, + "no-multi-spaces": 0, + "no-multi-str": 0, "no-multiple-empty-lines": [0, {"max": 2}], - "no-native-reassign": 2, + "no-native-reassign": 0, + "no-negated-condition": 0, "no-negated-in-lhs": 2, "no-nested-ternary": 0, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, + "no-new": 0, + "no-new-func": 0, + "no-new-object": 0, "no-new-require": 0, - "no-new-wrappers": 2, + "no-new-wrappers": 0, "no-obj-calls": 2, "no-octal": 2, - "no-octal-escape": 2, + "no-octal-escape": 0, "no-param-reassign": 0, "no-path-concat": 0, "no-plusplus": 0, "no-process-env": 0, - "no-process-exit": 2, - "no-proto": 2, + "no-process-exit": 0, + "no-proto": 0, "no-redeclare": 2, "no-regex-spaces": 2, - "no-reserved-keys": 0, "no-restricted-modules": 0, - "no-return-assign": 2, - "no-script-url": 2, + "no-restricted-syntax": 0, + "no-return-assign": 0, + "no-script-url": 0, "no-self-compare": 0, - "no-sequences": 2, - "no-shadow": 2, - "no-shadow-restricted-names": 2, - "no-space-before-semi": 0, - "no-spaced-func": 2, + "no-sequences": 0, + "no-shadow": 0, + "no-shadow-restricted-names": 0, + "no-spaced-func": 0, "no-sparse-arrays": 2, "no-sync": 0, "no-ternary": 0, - "no-trailing-spaces": 2, + "no-trailing-spaces": 0, "no-this-before-super": 0, "no-throw-literal": 0, "no-undef": 2, - "no-undef-init": 2, + "no-undef-init": 0, "no-undefined": 0, "no-unexpected-multiline": 0, - "no-underscore-dangle": 2, + "no-underscore-dangle": 0, "no-unneeded-ternary": 0, "no-unreachable": 2, - "no-unused-expressions": 2, + "no-unused-expressions": 0, "no-unused-vars": [2, {"vars": "all", "args": "after-used"}], - "no-use-before-define": 2, + "no-use-before-define": 0, + "no-useless-call": 0, + "no-useless-concat": 0, "no-void": 0, "no-var": 0, - "prefer-const": 0, "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], - "no-with": 2, - "no-wrap-func": 2, + "no-with": 0, + "no-magic-numbers": 0, "array-bracket-spacing": [0, "never"], + "arrow-body-style": [0, "as-needed"], + "arrow-parens": 0, + "arrow-spacing": 0, "accessor-pairs": 0, "block-scoped-var": 0, + "block-spacing": 0, "brace-style": [0, "1tbs"], - "camelcase": 2, + "callback-return": 0, + "camelcase": 0, "comma-dangle": [2, "never"], - "comma-spacing": 2, + "comma-spacing": 0, "comma-style": 0, "complexity": [0, 11], "computed-property-spacing": [0, "never"], - "consistent-return": 2, + "consistent-return": 0, "consistent-this": [0, "that"], "constructor-super": 0, - "curly": [2, "all"], + "curly": [0, "all"], "default-case": 0, "dot-location": 0, - "dot-notation": [2, { "allowKeywords": true }], - "eol-last": 2, - "eqeqeq": 2, + "dot-notation": [0, { "allowKeywords": true }], + "eol-last": 0, + "eqeqeq": 0, "func-names": 0, "func-style": [0, "declaration"], - "generator-star": 0, "generator-star-spacing": 0, - "global-strict": [2, "never"], + "global-require": 0, "guard-for-in": 0, "handle-callback-err": 0, + "id-length": 0, "indent": 0, - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], + "init-declarations": 0, + "jsx-quotes": [0, "prefer-double"], + "key-spacing": [0, { "beforeColon": false, "afterColon": true }], "lines-around-comment": 0, "max-depth": [0, 4], "max-len": [0, 80, 4], "max-nested-callbacks": [0, 2], "max-params": [0, 3], "max-statements": [0, 10], - "new-cap": 2, - "new-parens": 2, + "new-cap": 0, + "new-parens": 0, "newline-after-var": 0, "object-curly-spacing": [0, "never"], "object-shorthand": 0, - "one-var": 0, + "one-var": [0, "always"], "operator-assignment": [0, "always"], "operator-linebreak": 0, "padded-blocks": 0, + "prefer-arrow-callback": 0, + "prefer-const": 0, + "prefer-spread": 0, + "prefer-reflect": 0, + "prefer-template": 0, "quote-props": 0, - "quotes": [2, "double"], + "quotes": [0, "double"], "radix": 0, - "semi": 2, - "semi-spacing": [2, {"before": false, "after": true}], + "id-match": 0, + "require-jsdoc": 0, + "require-yield": 0, + "semi": 0, + "semi-spacing": [0, {"before": false, "after": true}], "sort-vars": 0, - "space-after-function-name": [0, "never"], "space-after-keywords": [0, "always"], + "space-before-keywords": [0, "always"], "space-before-blocks": [0, "always"], "space-before-function-paren": [0, "always"], - "space-before-function-parentheses": [0, "always"], - "space-in-brackets": [0, "never"], "space-in-parens": [0, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], + "space-infix-ops": 0, + "space-return-throw-case": 0, + "space-unary-ops": [0, { "words": true, "nonwords": false }], "spaced-comment": 0, - "spaced-line-comment": [0, "always"], - "strict": 2, + "strict": 0, "use-isnan": 2, "valid-jsdoc": 0, "valid-typeof": 2, "vars-on-top": 0, "wrap-iife": 0, "wrap-regex": 0, - "yoda": [2, "never"] + "yoda": [0, "never"] } } diff --git a/tools/eslint/conf/json-schema-schema.json b/tools/eslint/conf/json-schema-schema.json new file mode 100644 index 00000000000000..85eb502a680ed0 --- /dev/null +++ b/tools/eslint/conf/json-schema-schema.json @@ -0,0 +1,150 @@ +{ + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + }, + "simpleTypes": { + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": [ "maximum" ], + "exclusiveMinimum": [ "minimum" ] + }, + "default": {} +} diff --git a/tools/eslint/conf/replacements.json b/tools/eslint/conf/replacements.json new file mode 100644 index 00000000000000..34a09d53366e7b --- /dev/null +++ b/tools/eslint/conf/replacements.json @@ -0,0 +1,17 @@ +{ + "rules": { + "generator-star": ["generator-star-spacing"], + "global-strict": ["strict"], + "no-comma-dangle": ["comma-dangle"], + "no-empty-class": ["no-empty-character-class"], + "no-extra-strict": ["strict"], + "no-reserved-keys": ["quote-props"], + "no-space-before-semi": ["semi-spacing"], + "no-wrap-func": ["no-extra-parens"], + "space-after-function-name": ["space-before-function-paren"], + "space-before-function-parentheses": ["space-before-function-paren"], + "space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"], + "space-unary-word-ops": ["space-unary-ops"], + "spaced-line-comment": ["spaced-comment"] + } +} diff --git a/tools/eslint/lib/api.js b/tools/eslint/lib/api.js index 160319ef59adf2..664e9a5b40ee95 100644 --- a/tools/eslint/lib/api.js +++ b/tools/eslint/lib/api.js @@ -7,7 +7,7 @@ module.exports = { linter: require("./eslint"), - cli: require("./cli"), CLIEngine: require("./cli-engine"), - validator: require("./config-validator") + RuleTester: require("./testers/rule-tester"), + SourceCode: require("./util/source-code") }; diff --git a/tools/eslint/lib/ast-utils.js b/tools/eslint/lib/ast-utils.js new file mode 100644 index 00000000000000..397d8da429e748 --- /dev/null +++ b/tools/eslint/lib/ast-utils.js @@ -0,0 +1,154 @@ +/** + * @fileoverview Common utils for AST. + * @author Gyandeep Singh + * @copyright 2015 Gyandeep Singh. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var esutils = require("esutils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks reference if is non initializer and writable. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {boolean} Success/Failure + * @private + */ +function isModifyingReference(reference, index, references) { + var identifier = reference.identifier; + + return (identifier && + reference.init === false && + reference.isWrite() && + // Destructuring assignments can have multiple default value, + // so possibly there are multiple writeable references for the same identifier. + (index === 0 || references[index - 1].identifier !== identifier) + ); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + + /** + * Determines whether two adjacent tokens are on the same line. + * @param {Object} left - The left token object. + * @param {Object} right - The right token object. + * @returns {boolean} Whether or not the tokens are on the same line. + * @public + */ + isTokenOnSameLine: function(left, right) { + return left.loc.end.line === right.loc.start.line; + }, + + /** + * Checks whether or not a node is `null` or `undefined`. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a `null` or `undefined`. + * @public + */ + isNullOrUndefined: function(node) { + return ( + (node.type === "Literal" && node.value === null) || + (node.type === "Identifier" && node.name === "undefined") || + (node.type === "UnaryExpression" && node.operator === "void") + ); + }, + + /** + * Checks whether or not a given node is a string literal. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a string literal. + */ + isStringLiteral: function(node) { + return ( + (node.type === "Literal" && typeof node.value === "string") || + node.type === "TemplateLiteral" + ); + }, + + /** + * Gets references which are non initializer and writable. + * @param {Reference[]} references - An array of references. + * @returns {Reference[]} An array of only references which are non initializer and writable. + * @public + */ + getModifyingReferences: function(references) { + return references.filter(isModifyingReference); + }, + + /** + * Validate that a string passed in is surrounded by the specified character + * @param {string} val The text to check. + * @param {string} character The character to see if it's surrounded by. + * @returns {boolean} True if the text is surrounded by the character, false if not. + * @private + */ + isSurroundedBy: function(val, character) { + return val[0] === character && val[val.length - 1] === character; + }, + + /** + * Returns whether the provided node is an ESLint directive comment or not + * @param {LineComment|BlockComment} node The node to be checked + * @returns {boolean} `true` if the node is an ESLint directive comment + */ + isDirectiveComment: function(node) { + var comment = node.value.trim(); + return ( + node.type === "Line" && comment.indexOf("eslint-") === 0 || + node.type === "Block" && ( + comment.indexOf("global ") === 0 || + comment.indexOf("eslint ") === 0 || + comment.indexOf("eslint-") === 0 + ) + ); + }, + + /** + * Gets the trailing statement of a given node. + * + * if (code) + * consequent; + * + * When taking this `IfStatement`, returns `consequent;` statement. + * + * @param {ASTNode} A node to get. + * @returns {ASTNode|null} The trailing statement's node. + */ + getTrailingStatement: esutils.ast.trailingStatement, + + /** + * Finds the variable by a given name in a given scope and its upper scopes. + * + * @param {escope.Scope} initScope - A scope to start find. + * @param {string} name - A variable name to find. + * @returns {escope.Variable|null} A found variable or `null`. + */ + getVariableByName: function(initScope, name) { + var scope = initScope; + while (scope) { + var variable = scope.set.get(name); + if (variable) { + return variable; + } + + scope = scope.upper; + } + + return null; + } +}; diff --git a/tools/eslint/lib/cli-engine.js b/tools/eslint/lib/cli-engine.js index fce73c6bba7297..3fff395cdee466 100644 --- a/tools/eslint/lib/cli-engine.js +++ b/tools/eslint/lib/cli-engine.js @@ -2,6 +2,7 @@ * @fileoverview Main CLI object. * @author Nicholas C. Zakas * @copyright 2014 Nicholas C. Zakas. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -21,14 +22,23 @@ var fs = require("fs"), assign = require("object-assign"), debug = require("debug"), + shell = require("shelljs"), rules = require("./rules"), eslint = require("./eslint"), - traverse = require("./util/traverse"), IgnoredPaths = require("./ignored-paths"), Config = require("./config"), util = require("./util"), - validator = require("./config-validator"); + fileEntryCache = require("file-entry-cache"), + globUtil = require("./util/glob-util"), + SourceCodeFixer = require("./util/source-code-fixer"), + validator = require("./config/config-validator"), + stringify = require("json-stable-stringify"), + + crypto = require( "crypto" ), + pkg = require("../package.json"); + +var DEFAULT_PARSER = require("../conf/eslint.json").parser; //------------------------------------------------------------------------------ // Typedefs @@ -38,8 +48,7 @@ var fs = require("fs"), * The options to configure a CLI engine with. * @typedef {Object} CLIEngineOptions * @property {string} configFile The configuration file to use. - * @property {boolean} reset True disables all default rules and environments. - * @property {boolean|object} baseConfig Base config object. False disables all default rules and environments. + * @property {boolean|object} baseConfig Base config object. True enables recommend rules and environments. * @property {boolean} ignore False disables use of .eslintignore. * @property {string[]} rulePaths An array of directories to load custom rules from. * @property {boolean} useEslintrc False disables looking for .eslintrc @@ -70,8 +79,7 @@ var fs = require("fs"), var defaultOptions = { configFile: null, - reset: false, - baseConfig: require(path.resolve(__dirname, "..", "conf", "eslint.json")), + baseConfig: false, rulePaths: [], useEslintrc: true, envs: [], @@ -79,7 +87,16 @@ var defaultOptions = { rules: {}, extensions: [".js"], ignore: true, - ignorePath: null + ignorePath: null, + parser: DEFAULT_PARSER, + cache: false, + // in order to honor the cacheFile option if specified + // this option should not have a default value otherwise + // it will always be used + cacheLocation: "", + cacheFile: ".eslintcache", + fix: false, + allowInlineConfig: true }, loadedPlugins = Object.create(null); @@ -96,7 +113,7 @@ debug = debug("eslint:cli-engine"); */ function loadPlugins(pluginNames) { if (pluginNames) { - pluginNames.forEach(function (pluginName) { + pluginNames.forEach(function(pluginName) { var pluginNamespace = util.getNamespace(pluginName), pluginNameWithoutNamespace = util.removeNameSpace(pluginName), pluginNameWithoutPrefix = util.removePluginPrefix(pluginNameWithoutNamespace), @@ -159,10 +176,12 @@ function calculateStatsPerRun(results) { * @param {string} text The source code to check. * @param {Object} configHelper The configuration options for ESLint. * @param {string} filename An optional string representing the texts filename. + * @param {boolean} fix Indicates if fixes should be processed. + * @param {boolean} allowInlineConfig Allow/ignore comments that change config. * @returns {Result} The results for linting on this text. * @private */ -function processText(text, configHelper, filename) { +function processText(text, configHelper, filename, fix, allowInlineConfig) { // clear all existing settings for a new file eslint.reset(); @@ -172,7 +191,8 @@ function processText(text, configHelper, filename) { messages, stats, fileExtension = path.extname(filename), - processor; + processor, + fixedResult; if (filename) { filePath = path.resolve(filename); @@ -191,24 +211,48 @@ function processText(text, configHelper, filename) { } if (processor) { + debug("Using processor"); var parsedBlocks = processor.preprocess(text, filename); var unprocessedMessages = []; parsedBlocks.forEach(function(block) { - unprocessedMessages.push(eslint.verify(block, config, filename)); + unprocessedMessages.push(eslint.verify(block, config, { + filename: filename, + allowInlineConfig: allowInlineConfig + })); }); + + // TODO(nzakas): Figure out how fixes might work for processors + messages = processor.postprocess(unprocessedMessages, filename); + } else { - messages = eslint.verify(text, config, filename); + + messages = eslint.verify(text, config, { + filename: filename, + allowInlineConfig: allowInlineConfig + }); + + if (fix) { + debug("Generating fixed text for " + filename); + fixedResult = SourceCodeFixer.applyFixes(eslint.getSourceCode(), messages); + messages = fixedResult.messages; + } } stats = calculateStatsPerFile(messages); - return { + var result = { filePath: filename, messages: messages, errorCount: stats.errorCount, warningCount: stats.warningCount }; + + if (fixedResult && fixedResult.fixed) { + result.output = fixedResult.output; + } + + return result; } /** @@ -216,14 +260,17 @@ function processText(text, configHelper, filename) { * exist, so no need to check that here. * @param {string} filename The filename of the file being checked. * @param {Object} configHelper The configuration options for ESLint. + * @param {Object} options The CLIEngine options object. * @returns {Result} The results for linting on this file. * @private */ -function processFile(filename, configHelper) { +function processFile(filename, configHelper, options) { + + var text = fs.readFileSync(path.resolve(filename), "utf8"), + result = processText(text, configHelper, filename, options.fix, options.allowInlineConfig); - var text = fs.readFileSync(path.resolve(filename), "utf8"); + return result; - return processText(text, configHelper, filename); } /** @@ -234,7 +281,7 @@ function processFile(filename, configHelper) { */ function createIgnoreResult(filePath) { return { - filePath: filePath, + filePath: path.resolve(filePath), messages: [ { fatal: false, @@ -247,6 +294,90 @@ function createIgnoreResult(filePath) { }; } + +/** + * Checks if the given message is an error message. + * @param {object} message The message to check. + * @returns {boolean} Whether or not the message is an error message. + * @private + */ +function isErrorMessage(message) { + return message.severity === 2; +} + +/** + * create a md5Hash of a given string + * @param {string} str the string to calculate the hash for + * @returns {string} the calculated hash + */ +function md5Hash(str) { + return crypto + .createHash("md5") + .update(str, "utf8") + .digest("hex"); +} + +/** + * return the cacheFile to be used by eslint, based on whether the provided parameter is + * a directory or looks like a directory (ends in `path.sep`), in which case the file + * name will be the `cacheFile/.cache_hashOfCWD` + * + * if cacheFile points to a file or looks like a file then in will just use that file + * + * @param {string} cacheFile The name of file to be used to store the cache + * @returns {string} the resolved path to the cache file + */ +function getCacheFile(cacheFile) { + // make sure the path separators are normalized for the environment/os + // keeping the trailing path separator if present + cacheFile = path.normalize(cacheFile); + + var resolvedCacheFile = path.resolve(cacheFile); + var looksLikeADirectory = cacheFile[cacheFile.length - 1 ] === path.sep; + + /** + * return the name for the cache file in case the provided parameter is a directory + * @returns {string} the resolved path to the cacheFile + */ + function getCacheFileForDirectory() { + return path.join(resolvedCacheFile, ".cache_" + md5Hash(process.cwd())); + } + + var fileStats; + + try { + fileStats = fs.lstatSync(resolvedCacheFile); + } catch (ex) { + fileStats = null; + } + + + // in case the file exists we need to verify if the provided path + // is a directory or a file. If it is a directory we want to create a file + // inside that directory + if (fileStats) { + // is a directory or is a file, but the original file the user provided + // looks like a directory but `path.resolve` removed the `last path.sep` + // so we need to still treat this like a directory + if (fileStats.isDirectory() || looksLikeADirectory) { + return getCacheFileForDirectory(); + } + // is file so just use that file + return resolvedCacheFile; + } + + // here we known the file or directory doesn't exist, + // so we will try to infer if its a directory if it looks like a directory + // for the current operating system. + + // if the last character passed is a path separator we assume is a directory + if (looksLikeADirectory) { + return getCacheFileForDirectory(); + } + + return resolvedCacheFile; +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -264,6 +395,20 @@ function CLIEngine(options) { */ this.options = assign(Object.create(defaultOptions), options || {}); + + var cacheFile = getCacheFile(this.options.cacheLocation || this.options.cacheFile); + + /** + * cache used to not operate on files that haven't changed since last successful + * execution (e.g. file passed with no errors and no warnings + * @type {Object} + */ + this._fileCache = fileEntryCache.create(cacheFile); // eslint-disable-line no-underscore-dangle + + if (!this.options.cache) { + this._fileCache.destroy(); // eslint-disable-line no-underscore-dangle + } + // load in additional rules if (this.options.rulePaths) { this.options.rulePaths.forEach(function(rulesdir) { @@ -277,6 +422,79 @@ function CLIEngine(options) { }.bind(this)); } +/** + * Returns the formatter representing the given format or null if no formatter + * with the given name can be found. + * @param {string} [format] The name of the format to load or the path to a + * custom formatter. + * @returns {Function} The formatter function or null if not found. + */ +CLIEngine.getFormatter = function(format) { + + var formatterPath; + + // default is stylish + format = format || "stylish"; + + // only strings are valid formatters + if (typeof format === "string") { + + // replace \ with / for Windows compatibility + format = format.replace(/\\/g, "/"); + + // if there's a slash, then it's a file + if (format.indexOf("/") > -1) { + formatterPath = path.resolve(process.cwd(), format); + } else { + formatterPath = "./formatters/" + format; + } + + try { + return require(formatterPath); + } catch (ex) { + return null; + } + + } else { + return null; + } +}; + +/** + * Returns results that only contains errors. + * @param {LintResult[]} results The results to filter. + * @returns {LintResult[]} The filtered results. + */ +CLIEngine.getErrorResults = function(results) { + var filtered = []; + + results.forEach(function(result) { + var filteredMessages = result.messages.filter(isErrorMessage); + + if (filteredMessages.length > 0) { + filtered.push({ + filePath: result.filePath, + messages: filteredMessages + }); + } + }); + + return filtered; +}; + +/** + * Outputs fixes from the given results to files. + * @param {Object} report The report object created by CLIEngine. + * @returns {void} + */ +CLIEngine.outputFixes = function(report) { + report.results.filter(function(result) { + return result.hasOwnProperty("output"); + }).forEach(function(result) { + fs.writeFileSync(result.filePath, result.output); + }); +}; + CLIEngine.prototype = { constructor: CLIEngine, @@ -295,37 +513,137 @@ CLIEngine.prototype = { loadedPlugins[pluginNameWithoutPrefix] = pluginobject; }, + /** + * Resolves the patterns passed into executeOnFiles() into glob-based patterns + * for easier handling. + * @param {string[]} patterns The file patterns passed on the command line. + * @returns {string[]} The equivalent glob patterns. + */ + resolveFileGlobPatterns: function(patterns) { + return globUtil.resolveFileGlobPatterns(patterns, this.options.extensions); + }, + /** * Executes the current configuration on an array of file and directory names. - * @param {string[]} files An array of file and directory names. + * @param {string[]} patterns An array of file and directory names. * @returns {Object} The results for all files that were linted. */ - executeOnFiles: function(files) { - + executeOnFiles: function(patterns) { var results = [], - processed = [], + processed = {}, options = this.options, + fileCache = this._fileCache, // eslint-disable-line no-underscore-dangle configHelper = new Config(options), - ignoredPaths = IgnoredPaths.load(options), - exclude = ignoredPaths.contains.bind(ignoredPaths), - stats; + stats, + startTime, + prevConfig; // the previous configuration used + + startTime = Date.now(); + + patterns = this.resolveFileGlobPatterns(patterns); + + /** + * Calculates the hash of the config file used to validate a given file + * @param {string} filename The path of the file to retrieve a config object for to calculate the hash + * @returns {string} the hash of the config + */ + function hashOfConfigFor(filename) { + var config = configHelper.getConfig(filename); + + if (!prevConfig) { + prevConfig = {}; + } + + // reuse the previously hashed config if the config hasn't changed + if (prevConfig.config !== config) { + // config changed so we need to calculate the hash of the config + // and the hash of the plugins being used + prevConfig.config = config; + + var eslintVersion = pkg.version; + + prevConfig.hash = md5Hash(eslintVersion + "_" + stringify(config)); + } + + return prevConfig.hash; + } - traverse({ - files: files, - extensions: options.extensions, - exclude: options.ignore ? exclude : false - }, function(filename) { + /** + * Executes the linter on a file defined by the `filename`. Skips + * unsupported file extensions and any files that are already linted. + * @param {string} filename The resolved filename of the file to be linted + * @returns {void} + */ + function executeOnFile(filename) { + var hashOfConfig; + + if (processed[filename]) { + return; + } + + if (options.cache) { + // get the descriptor for this file + // with the metadata and the flag that determines if + // the file has changed + var descriptor = fileCache.getFileDescriptor(filename); + var meta = descriptor.meta || {}; + + hashOfConfig = hashOfConfigFor(filename); + + var changed = descriptor.changed || meta.hashOfConfig !== hashOfConfig; + if (!changed) { + debug("Skipping file since hasn't changed: " + filename); + + // Adding the filename to the processed hashmap + // so the reporting is not affected (showing a warning about .eslintignore being used + // when it is not really used) + + processed[filename] = true; + + // Add the the cached results (always will be 0 error and 0 warnings) + // cause we don't save to cache files that failed + // to guarantee that next execution will process those files as well + results.push(descriptor.meta.results); + + // move to the next file + return; + } + } debug("Processing " + filename); - processed.push(filename); - results.push(processFile(filename, configHelper)); - }); + processed[filename] = true; + + var res = processFile(filename, configHelper, options); + + if (options.cache) { + // if a file contains errors or warnings we don't want to + // store the file in the cache so we can guarantee that + // next execution will also operate on this file + if ( res.errorCount > 0 || res.warningCount > 0 ) { + debug("File has problems, skipping it: " + filename); + // remove the entry from the cache + fileCache.removeEntry( filename ); + } else { + // since the file passed we store the result here + // TODO: check this as we might not need to store the + // successful runs as it will always should be 0 error 0 warnings + descriptor.meta.hashOfConfig = hashOfConfig; + descriptor.meta.results = res; + } + } + + results.push(res); + } + + // Lint each desired file + globUtil.listFilesToProcess(patterns, options).forEach(executeOnFile); // only warn for files explicitly passed on the command line if (options.ignore) { - files.forEach(function(file) { - if (fs.statSync(path.resolve(file)).isFile() && processed.indexOf(file) === -1) { + patterns.forEach(function(file) { + var fullPath = path.resolve(file); + if (shell.test("-f", fullPath) && !processed[fullPath]) { results.push(createIgnoreResult(file)); } }); @@ -333,6 +651,13 @@ CLIEngine.prototype = { stats = calculateStatsPerRun(results); + if (options.cache) { + // persist the cache to disk + fileCache.reconcile(); + } + + debug("Linting complete in: " + (Date.now() - startTime) + "ms"); + return { results: results, errorCount: stats.errorCount, @@ -358,7 +683,7 @@ CLIEngine.prototype = { if (filename && options.ignore && exclude(filename)) { results.push(createIgnoreResult(filename)); } else { - results.push(processText(text, configHelper, filename)); + results.push(processText(text, configHelper, filename, options.fix, options.allowInlineConfig)); } stats = calculateStatsPerRun(results); @@ -387,7 +712,7 @@ CLIEngine.prototype = { * @param {string} filePath The path of the file to check. * @returns {boolean} Whether or not the given path is ignored. */ - isPathIgnored: function (filePath) { + isPathIgnored: function(filePath) { var ignoredPaths; if (this.options.ignore) { @@ -398,43 +723,7 @@ CLIEngine.prototype = { return false; }, - /** - * Returns the formatter representing the given format or null if no formatter - * with the given name can be found. - * @param {string} [format] The name of the format to load or the path to a - * custom formatter. - * @returns {Function} The formatter function or null if not found. - */ - getFormatter: function(format) { - - var formatterPath; - - // default is stylish - format = format || "stylish"; - - // only strings are valid formatters - if (typeof format === "string") { - - // replace \ with / for Windows compatibility - format = format.replace(/\\/g, "/"); - - // if there's a slash, then it's a file - if (format.indexOf("/") > -1) { - formatterPath = path.resolve(process.cwd(), format); - } else { - formatterPath = "./formatters/" + format; - } - - try { - return require(formatterPath); - } catch (ex) { - return null; - } - - } else { - return null; - } - } + getFormatter: CLIEngine.getFormatter }; diff --git a/tools/eslint/lib/cli.js b/tools/eslint/lib/cli.js index a6d08caf956da1..22013678663658 100644 --- a/tools/eslint/lib/cli.js +++ b/tools/eslint/lib/cli.js @@ -22,7 +22,8 @@ var fs = require("fs"), options = require("./options"), CLIEngine = require("./cli-engine"), - mkdirp = require("mkdirp"); + mkdirp = require("mkdirp"), + log = require("./logging"); //------------------------------------------------------------------------------ // Helpers @@ -48,8 +49,13 @@ function translateOptions(cliOptions) { ignorePattern: cliOptions.ignorePattern, configFile: cliOptions.config, rulePaths: cliOptions.rulesdir, - reset: cliOptions.reset, - useEslintrc: cliOptions.eslintrc + useEslintrc: cliOptions.eslintrc, + parser: cliOptions.parser, + cache: cliOptions.cache, + cacheFile: cliOptions.cacheFile, + cacheLocation: cliOptions.cacheLocation, + fix: cliOptions.fix, + allowInlineConfig: cliOptions.inlineConfig }; } @@ -69,7 +75,7 @@ function printResults(engine, results, format, outputFile) { formatter = engine.getFormatter(format); if (!formatter) { - console.error("Could not find formatter '%s'.", format); + log.error("Could not find formatter '%s'.", format); return false; } @@ -80,7 +86,7 @@ function printResults(engine, results, format, outputFile) { filePath = path.resolve(process.cwd(), outputFile); if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) { - console.error("Cannot write to output file path, it is a directory: %s", outputFile); + log.error("Cannot write to output file path, it is a directory: %s", outputFile); return false; } @@ -88,11 +94,11 @@ function printResults(engine, results, format, outputFile) { mkdirp.sync(path.dirname(filePath)); fs.writeFileSync(filePath, output); } catch (ex) { - console.error("There was a problem writing the output file:\n%s", ex); + log.error("There was a problem writing the output file:\n%s", ex); return false; } } else { - console.log(output); + log.info(output); } } @@ -100,37 +106,6 @@ function printResults(engine, results, format, outputFile) { } -/** - * Checks if the given message is an error message. - * @param {object} message The message to check. - * @returns {boolean} Whether or not the message is an error message. - */ -function isErrorMessage(message) { - return message.severity === 2; -} - -/** - * Returns results that only contains errors. - * @param {LintResult[]} results The results to filter. - * @returns {LintResult[]} The filtered results. - */ -function getErrorResults(results) { - var filtered = []; - - results.forEach(function (result) { - var filteredMessages = result.messages.filter(isErrorMessage); - - if (filteredMessages.length > 0) { - filtered.push({ - filePath: result.filePath, - messages: filteredMessages - }); - } - }); - - return filtered; -} - //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -151,13 +126,14 @@ var cli = { var currentOptions, files, - result, - engine; + report, + engine, + tooManyWarnings; try { currentOptions = options.parse(args); } catch (error) { - console.error(error.message); + log.error(error.message); return 1; } @@ -165,24 +141,43 @@ var cli = { if (currentOptions.version) { // version from package.json - console.log("v" + require("../package.json").version); + log.info("v" + require("../package.json").version); } else if (currentOptions.help || (!files.length && !text)) { - console.log(options.generateHelp()); + log.info(options.generateHelp()); } else { - engine = new CLIEngine(translateOptions(currentOptions)); debug("Running on " + (text ? "text" : "files")); - result = text ? engine.executeOnText(text, currentOptions.stdinFilename) : engine.executeOnFiles(files); + // disable --fix for piped-in code until we know how to do it correctly + if (text && currentOptions.fix) { + log.error("The --fix option is not available for piped-in code."); + return 1; + } + + engine = new CLIEngine(translateOptions(currentOptions)); + + report = text ? engine.executeOnText(text, currentOptions.stdinFilename) : engine.executeOnFiles(files); + if (currentOptions.fix) { + debug("Fix mode enabled - applying fixes"); + CLIEngine.outputFixes(report); + } + if (currentOptions.quiet) { - result.results = getErrorResults(result.results); + debug("Quiet mode enabled - filtering out warnings"); + report.results = CLIEngine.getErrorResults(report.results); } - if (printResults(engine, result.results, currentOptions.format, currentOptions.outputFile)) { - return result.errorCount ? 1 : 0; + if (printResults(engine, report.results, currentOptions.format, currentOptions.outputFile)) { + tooManyWarnings = currentOptions.maxWarnings >= 0 && report.warningCount > currentOptions.maxWarnings; + + if (!report.errorCount && tooManyWarnings) { + log.error("ESLint found too many warnings (maximum: %s).", currentOptions.maxWarnings); + } + + return (report.errorCount || tooManyWarnings) ? 1 : 0; } else { return 1; } diff --git a/tools/eslint/lib/config-initializer.js b/tools/eslint/lib/config-initializer.js deleted file mode 100644 index 56723cd5baf442..00000000000000 --- a/tools/eslint/lib/config-initializer.js +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @fileoverview Config initialization wizard. - * @author Ilya Volodin - * @copyright 2015 Ilya Volodin. All rights reserved. - */ - -"use strict"; - -var exec = require("child_process").exec, - fs = require("fs"), - inquirer = require("inquirer"), - yaml = require("js-yaml"); - -/* istanbul ignore next: hard to test fs function */ -/** - * Create .eslintrc file in the current working directory - * @param {object} config object that contains user's answers - * @param {bool} isJson should config file be json or yaml - * @param {function} callback function to call once the file is written. - * @returns {void} - */ -function writeFile(config, isJson, callback) { - try { - fs.writeFileSync("./.eslintrc", isJson ? JSON.stringify(config, null, 4) : yaml.safeDump(config)); - } catch (e) { - callback(e); - return; - } - if (config.plugins && config.plugins.indexOf("react") >= 0) { - exec("npm i eslint-plugin-react --save-dev", callback); - } else { - callback(); - } -} - -/** - * process user's answers and create config object - * @param {object} answers answers received from inquirer - * @returns {object} config object - */ -function processAnswers(answers) { - var config = {rules: {}, env: {}}; - config.rules.indent = [2, answers.indent]; - config.rules.quotes = [2, answers.quotes]; - config.rules["linebreak-style"] = [2, answers.linebreak]; - config.rules.semi = [2, answers.semi ? "always" : "never"]; - if (answers.es6) { - config.env.es6 = true; - } - answers.env.forEach(function(env) { - config.env[env] = true; - }); - if (answers.jsx) { - config.ecmaFeatures = {jsx: true}; - if (answers.react) { - config.plugins = ["react"]; - } - } - return config; -} - -/* istanbul ignore next: no need to test inquirer*/ -/** - * Ask use a few questions on command prompt - * @param {function} callback callback function when file has been written - * @returns {void} - */ -function promptUser(callback) { - inquirer.prompt([ - { - type: "list", - name: "indent", - message: "What style of indentation do you use?", - default: "tabs", - choices: [{name: "Tabs", value: "tab"}, {name: "Spaces", value: 4}] - }, - { - type: "list", - name: "quotes", - message: "What quotes do you use for strings?", - default: "double", - choices: [{name: "Double", value: "double"}, {name: "Single", value: "single"}] - }, - { - type: "list", - name: "linebreak", - message: "What line endings do you use?", - default: "unix", - choices: [{name: "Unix", value: "unix"}, {name: "Windows", value: "windows"}] - }, - { - type: "confirm", - name: "semi", - message: "Do you require semicolons?", - default: true - }, - { - type: "confirm", - name: "es6", - message: "Are you using ECMAScript 6 features?", - default: false - }, - { - type: "checkbox", - name: "env", - message: "Where will your code run?", - default: ["browser"], - choices: [{name: "Node", value: "node"}, {name: "Browser", value: "browser"}] - }, - { - type: "confirm", - name: "jsx", - message: "Do you use JSX?", - default: false - }, - { - type: "confirm", - name: "react", - message: "Do you use React", - default: false, - when: function (answers) { - return answers.jsx; - } - }, - { - type: "list", - name: "format", - message: "What format do you want your config file to be in?", - default: "JSON", - choices: ["JSON", "YAML"] - } - ], function(answers) { - var config = processAnswers(answers); - writeFile(config, answers.format === "JSON", callback); - }); -} - -var init = { - processAnswers: processAnswers, - initializeConfig: /* istanbul ignore next */ function(callback) { - promptUser(callback); - } -}; - -module.exports = init; diff --git a/tools/eslint/lib/config-validator.js b/tools/eslint/lib/config-validator.js deleted file mode 100644 index cece433c7cce00..00000000000000 --- a/tools/eslint/lib/config-validator.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * @fileoverview Validates configs. - * @author Brandon Mills - * @copyright 2015 Brandon Mills - */ - -"use strict"; - -var rules = require("./rules"), - schemaValidator = require("is-my-json-valid"); - -var validators = { - rules: Object.create(null) -}; - -/** - * Gets a complete options schema for a rule. - * @param {string} id The rule's unique name. - * @returns {object} JSON Schema for the rule's options. - */ -function getRuleOptionsSchema(id) { - var rule = rules.get(id), - schema = rule && rule.schema; - - if (!schema) { - return { - "type": "array", - "items": [ - { - "enum": [0, 1, 2] - } - ], - "minItems": 1 - }; - } - - // Given a tuple of schemas, insert warning level at the beginning - if (Array.isArray(schema)) { - return { - "type": "array", - "items": [ - { - "enum": [0, 1, 2] - } - ].concat(schema), - "minItems": 1, - "maxItems": schema.length + 1 - }; - } - - // Given a full schema, leave it alone - return schema; -} - -/** - * Validates a rule's options against its schema. - * @param {string} id The rule's unique name. - * @param {array|number} options The given options for the rule. - * @param {string} source The name of the configuration source. - * @returns {void} - */ -function validateRuleOptions(id, options, source) { - var validateRule = validators.rules[id], - message; - - if (!validateRule) { - validateRule = schemaValidator(getRuleOptionsSchema(id), { verbose: true }); - validators.rules[id] = validateRule; - } - - if (typeof options === "number") { - options = [options]; - } - - validateRule(options); - - if (validateRule.errors) { - message = [ - source, ":\n", - "\tConfiguration for rule \"", id, "\" is invalid:\n" - ]; - validateRule.errors.forEach(function (error) { - message.push( - "\tValue \"", error.value, "\" ", error.message, ".\n" - ); - }); - - throw new Error(message.join("")); - } -} - -/** - * Validates an entire config object. - * @param {object} config The config object to validate. - * @param {string} source The location to report with any errors. - * @returns {void} - */ -function validate(config, source) { - if (typeof config.rules === "object") { - Object.keys(config.rules).forEach(function (id) { - validateRuleOptions(id, config.rules[id], source); - }); - } -} - -module.exports = { - getRuleOptionsSchema: getRuleOptionsSchema, - validate: validate, - validateRuleOptions: validateRuleOptions -}; diff --git a/tools/eslint/lib/config.js b/tools/eslint/lib/config.js index a4f8d0e87cd011..3eb174e72d5306 100644 --- a/tools/eslint/lib/config.js +++ b/tools/eslint/lib/config.js @@ -2,8 +2,9 @@ * @fileoverview Responsible for loading config files * @author Seth McLaughlin * @copyright 2014 Nicholas C. Zakas. All rights reserved. - * @copyright 2013 Seth McLaughlin. All rights reserved. * @copyright 2014 Michael McLaughlin. All rights reserved. + * @copyright 2013 Seth McLaughlin. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -11,27 +12,22 @@ // Requirements //------------------------------------------------------------------------------ -var fs = require("fs"), - path = require("path"), - environments = require("../conf/environments"), +var path = require("path"), + ConfigOps = require("./config/config-ops"), + ConfigFile = require("./config/config-file"), util = require("./util"), FileFinder = require("./file-finder"), - stripComments = require("strip-json-comments"), - assign = require("object-assign"), debug = require("debug"), - yaml = require("js-yaml"), userHome = require("user-home"), - isAbsolutePath = require("path-is-absolute"), - validator = require("./config-validator"); + isResolvable = require("is-resolvable"), + pathIsInside = require("path-is-inside"); //------------------------------------------------------------------------------ // Constants //------------------------------------------------------------------------------ -var LOCAL_CONFIG_FILENAME = ".eslintrc", - PACKAGE_CONFIG_FILENAME = "package.json", - PACKAGE_CONFIG_FIELD_NAME = "eslintConfig", - PERSONAL_CONFIG_PATH = userHome ? path.join(userHome, LOCAL_CONFIG_FILENAME) : null; +var PACKAGE_CONFIG_FILENAME = "package.json", + PERSONAL_CONFIG_DIR = userHome || null; //------------------------------------------------------------------------------ // Private @@ -46,97 +42,40 @@ var loadedPlugins = Object.create(null); debug = debug("eslint:config"); /** - * Determines if a given string represents a filepath or not using the same - * conventions as require(), meaning that the first character must be nonalphanumeric - * and not the @ sign which is used for scoped packages to be considered a file path. - * @param {string} filePath The string to check. - * @returns {boolean} True if it's a filepath, false if not. + * Check if item is an javascript object + * @param {*} item object to check for + * @returns {boolean} True if its an object * @private */ -function isFilePath(filePath) { - return isAbsolutePath(filePath) || !/\w|@/.test(filePath[0]); +function isObject(item) { + return typeof item === "object" && !Array.isArray(item) && item !== null; } /** * Load and parse a JSON config object from a file. - * @param {string} filePath the path to the JSON config file + * @param {string|Object} configToLoad the path to the JSON config file or the config object itself. * @returns {Object} the parsed config object (empty object if there was a parse error) * @private */ -function loadConfig(filePath) { - var config = {}; +function loadConfig(configToLoad) { + var config = {}, + filePath = ""; - if (filePath) { + if (configToLoad) { - if (isFilePath(filePath)) { - try { - config = yaml.safeLoad(stripComments(fs.readFileSync(filePath, "utf8"))) || {}; - } catch (e) { - debug("Error reading YAML file: " + filePath); - e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; - throw e; - } + if (isObject(configToLoad)) { + config = configToLoad; - if (path.basename(filePath) === PACKAGE_CONFIG_FILENAME) { - config = config[PACKAGE_CONFIG_FIELD_NAME] || {}; + if (config.extends) { + config = ConfigFile.applyExtends(config, filePath); } - } else { - - // it's a package - if (filePath.indexOf("eslint-config-") === -1) { - if (filePath.indexOf("@") === 0) { - // for scoped packages, insert the eslint-config after the first / - filePath = filePath.replace(/^([^\/]+\/)(.*)$/, "$1eslint-config-$2"); - } else { - filePath = "eslint-config-" + filePath; - } - } - - config = util.mergeConfigs(config, require(filePath)); + filePath = configToLoad; + config = ConfigFile.load(filePath); } - validator.validate(config, filePath); - - // If an `extends` property is defined, it represents a configuration file to use as - // a "parent". Load the referenced file and merge the configuration recursively. - if (config.extends) { - var configExtends = config.extends; - - if (!Array.isArray(config.extends)) { - configExtends = [config.extends]; - } - - // Make the last element in an array take the highest precedence - config = configExtends.reduceRight(function (previousValue, parentPath) { - - if (isFilePath(parentPath)) { - // If the `extends` path is relative, use the directory of the current configuration - // file as the reference point. Otherwise, use as-is. - parentPath = (!isAbsolutePath(parentPath) ? - path.join(path.dirname(filePath), parentPath) : - parentPath - ); - } - - try { - return util.mergeConfigs(loadConfig(parentPath), previousValue); - } catch (e) { - // If the file referenced by `extends` failed to load, add the path to the - // configuration file that referenced it to the error message so the user is - // able to see where it was referenced from, then re-throw - e.message += "\nReferenced from: " + filePath; - throw e; - } - - }, config); - - } - - } - return config; } @@ -148,7 +87,7 @@ function loadConfig(filePath) { function getPluginsConfig(pluginNames) { var pluginConfig = {}; - pluginNames.forEach(function (pluginName) { + pluginNames.forEach(function(pluginName) { var pluginNamespace = util.getNamespace(pluginName), pluginNameWithoutNamespace = util.removeNameSpace(pluginName), pluginNameWithoutPrefix = util.removePluginPrefix(pluginNameWithoutNamespace), @@ -159,7 +98,7 @@ function getPluginsConfig(pluginNames) { try { plugin = require(pluginNamespace + util.PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix); loadedPlugins[pluginNameWithoutPrefix] = plugin; - } catch(err) { + } catch (err) { debug("Failed to load plugin configuration for " + pluginNameWithoutPrefix + ". Proceeding without it."); plugin = { rulesConfig: {}}; } @@ -175,7 +114,7 @@ function getPluginsConfig(pluginNames) { rules[pluginNameWithoutPrefix + "/" + item] = plugin.rulesConfig[item]; }); - pluginConfig = util.mergeConfigs(pluginConfig, rules); + pluginConfig = ConfigOps.merge(pluginConfig, rules); }); return {rules: pluginConfig}; @@ -187,11 +126,16 @@ function getPluginsConfig(pluginNames) { * @private */ function getPersonalConfig() { - var config = {}; + var config = {}, + filename; + + if (PERSONAL_CONFIG_DIR) { + filename = ConfigFile.getFilenameForDirectory(PERSONAL_CONFIG_DIR); - if (PERSONAL_CONFIG_PATH && fs.existsSync(PERSONAL_CONFIG_PATH)) { - debug("Using personal config"); - config = loadConfig(PERSONAL_CONFIG_PATH); + if (filename) { + debug("Using personal config"); + config = loadConfig(filename); + } } return config; @@ -210,76 +154,45 @@ function getLocalConfig(thisConfig, directory) { localConfigFile, config = {}, localConfigFiles = thisConfig.findLocalConfigFiles(directory), - numFiles = localConfigFiles.length; + numFiles = localConfigFiles.length, + rootPath, + projectConfigPath = ConfigFile.getFilenameForDirectory(process.cwd()); for (i = 0; i < numFiles; i++) { localConfigFile = localConfigFiles[i]; - // Don't consider the personal config file in the home directory. - if (localConfigFile === PERSONAL_CONFIG_PATH) { + // Don't consider the personal config file in the home directory, + // except if the home directory is the same as the current working directory + if (path.dirname(localConfigFile) === PERSONAL_CONFIG_DIR && localConfigFile !== projectConfigPath) { + continue; + } + + // If root flag is set, don't consider file if it is above root + if (rootPath && !pathIsInside(path.dirname(localConfigFile), rootPath)) { continue; } debug("Loading " + localConfigFile); localConfig = loadConfig(localConfigFile); - // Don't consider a local config file found if the config is empty. - if (!Object.keys(localConfig).length) { + // Don't consider a local config file found if the config is null + if (!localConfig) { continue; } + // Check for root flag + if (localConfig.root === true) { + rootPath = path.dirname(localConfigFile); + } + found = true; debug("Using " + localConfigFile); - config = util.mergeConfigs(localConfig, config); + config = ConfigOps.merge(localConfig, config); } // Use the personal config file if there are no other local config files found. - return found ? config : util.mergeConfigs(config, getPersonalConfig()); -} - -/** - * Creates an environment config based on the specified environments. - * @param {Object} envs The environment settings. - * @param {boolean} reset The value of the command line reset option. If true, - * rules are not automatically merged into the config. - * @returns {Object} A configuration object with the appropriate rules and globals - * set. - * @private - */ -function createEnvironmentConfig(envs, reset) { - - var envConfig = { - globals: {}, - env: envs || {}, - rules: {}, - ecmaFeatures: {} - }; - - if (envs) { - Object.keys(envs).filter(function (name) { - return envs[name]; - }).forEach(function(name) { - var environment = environments[name]; - - if (environment) { - - if (!reset && environment.rules) { - assign(envConfig.rules, environment.rules); - } - - if (environment.globals) { - assign(envConfig.globals, environment.globals); - } - - if (environment.ecmaFeatures) { - assign(envConfig.ecmaFeatures, environment.ecmaFeatures); - } - } - }); - } - - return envConfig; + return found ? config : ConfigOps.merge(config, getPersonalConfig()); } //------------------------------------------------------------------------------ @@ -301,26 +214,18 @@ function Config(options) { this.ignore = options.ignore; this.ignorePath = options.ignorePath; this.cache = {}; + this.parser = options.parser; - if (options.reset || options.baseConfig === false) { - // If `options.reset` is truthy or `options.baseConfig` is set to `false`, - // disable all default rules and environments - this.baseConfig = { rules: {} }; - } else { - // If `options.baseConfig` is an object, just use it, - // otherwise use default base config from `conf/eslint.json` - this.baseConfig = options.baseConfig || - require(path.resolve(__dirname, "..", "conf", "eslint.json")); - } + this.baseConfig = options.baseConfig ? loadConfig(options.baseConfig) : { rules: {} }; this.useEslintrc = (options.useEslintrc !== false); - this.env = (options.envs || []).reduce(function (envs, name) { + this.env = (options.envs || []).reduce(function(envs, name) { envs[name] = true; return envs; }, {}); - this.globals = (options.globals || []).reduce(function (globals, def) { + this.globals = (options.globals || []).reduce(function(globals, def) { // Default "foo" to false and handle "foo:false" and "foo:true" var parts = def.split(":"); globals[parts[0]] = (parts.length > 1 && parts[1] === "true"); @@ -332,7 +237,11 @@ function Config(options) { if (useConfig) { debug("Using command line config " + useConfig); - this.useSpecificConfig = loadConfig(path.resolve(process.cwd(), useConfig)); + if (isResolvable(useConfig) || isResolvable("eslint-config-" + useConfig) || useConfig.charAt(0) === "@") { + this.useSpecificConfig = loadConfig(useConfig); + } else { + this.useSpecificConfig = loadConfig(path.resolve(process.cwd(), useConfig)); + } } } @@ -342,7 +251,7 @@ function Config(options) { * @param {string} filePath a file in whose directory we start looking for a local config * @returns {Object} config object */ -Config.prototype.getConfig = function (filePath) { +Config.prototype.getConfig = function(filePath) { var config, userConfig, directory = filePath ? path.dirname(filePath) : process.cwd(), @@ -367,43 +276,42 @@ Config.prototype.getConfig = function (filePath) { } // Step 2: Create a copy of the baseConfig - config = util.mergeConfigs({}, this.baseConfig); - - // Step 3: Merge in environment-specific globals and rules from .eslintrc files - config = util.mergeConfigs(config, createEnvironmentConfig(userConfig.env, this.options.reset)); + config = ConfigOps.merge({parser: this.parser}, this.baseConfig); - // Step 4: Merge in the user-specified configuration from .eslintrc and package.json - config = util.mergeConfigs(config, userConfig); + // Step 3: Merge in the user-specified configuration from .eslintrc and package.json + config = ConfigOps.merge(config, userConfig); - // Step 5: Merge in command line config file + // Step 4: Merge in command line config file if (this.useSpecificConfig) { debug("Merging command line config file"); - if (this.useSpecificConfig.env) { - config = util.mergeConfigs(config, createEnvironmentConfig(this.useSpecificConfig.env, this.options.reset)); - } - - config = util.mergeConfigs(config, this.useSpecificConfig); + config = ConfigOps.merge(config, this.useSpecificConfig); } - // Step 6: Merge in command line environments + // Step 5: Merge in command line environments debug("Merging command line environment settings"); - config = util.mergeConfigs(config, createEnvironmentConfig(this.env, this.options.reset)); + config = ConfigOps.merge(config, ConfigOps.createEnvironmentConfig(this.env)); - // Step 7: Merge in command line rules + // Step 6: Merge in command line rules if (this.options.rules) { debug("Merging command line rules"); - config = util.mergeConfigs(config, { rules: this.options.rules }); + config = ConfigOps.merge(config, { rules: this.options.rules }); } - // Step 8: Merge in command line globals - config = util.mergeConfigs(config, { globals: this.globals }); + // Step 7: Merge in command line globals + config = ConfigOps.merge(config, { globals: this.globals }); + // Step 8: Merge in command line plugins + if (this.options.plugins) { + debug("Merging command line plugins"); + pluginConfig = getPluginsConfig(this.options.plugins); + config = ConfigOps.merge(config, { plugins: this.options.plugins }); + } // Step 9: Merge in plugin specific rules in reverse if (config.plugins) { pluginConfig = getPluginsConfig(config.plugins); - config = util.mergeConfigs(pluginConfig, config); + config = ConfigOps.merge(pluginConfig, config); } this.cache[directory] = config; @@ -416,10 +324,10 @@ Config.prototype.getConfig = function (filePath) { * @param {string} directory The directory to start searching from. * @returns {string[]} The paths of local config files found. */ -Config.prototype.findLocalConfigFiles = function (directory) { +Config.prototype.findLocalConfigFiles = function(directory) { if (!this.localConfigFinder) { - this.localConfigFinder = new FileFinder(LOCAL_CONFIG_FILENAME, PACKAGE_CONFIG_FILENAME); + this.localConfigFinder = new FileFinder(ConfigFile.CONFIG_FILES, PACKAGE_CONFIG_FILENAME); } return this.localConfigFinder.findAllInDirectoryAndParents(directory); diff --git a/tools/eslint/lib/config/config-file.js b/tools/eslint/lib/config/config-file.js new file mode 100644 index 00000000000000..aaffb6fba3ce3f --- /dev/null +++ b/tools/eslint/lib/config/config-file.js @@ -0,0 +1,440 @@ +/** + * @fileoverview Helper to locate and load configuration files. + * @author Nicholas C. Zakas + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/* eslint no-use-before-define: 0 */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var debug = require("debug"), + fs = require("fs"), + path = require("path"), + ConfigOps = require("./config-ops"), + validator = require("./config-validator"), + stripComments = require("strip-json-comments"), + isAbsolutePath = require("path-is-absolute"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +var CONFIG_FILES = [ + ".eslintrc.js", + ".eslintrc.yaml", + ".eslintrc.yml", + ".eslintrc.json", + ".eslintrc" +]; + +debug = debug("eslint:config-file"); + +/** + * Convenience wrapper for synchronously reading file contents. + * @param {string} filePath The filename to read. + * @returns {string} The file contents. + * @private + */ +function readFile(filePath) { + return fs.readFileSync(filePath, "utf8"); +} + +/** + * Determines if a given string represents a filepath or not using the same + * conventions as require(), meaning that the first character must be nonalphanumeric + * and not the @ sign which is used for scoped packages to be considered a file path. + * @param {string} filePath The string to check. + * @returns {boolean} True if it's a filepath, false if not. + * @private + */ +function isFilePath(filePath) { + return isAbsolutePath(filePath) || !/\w|@/.test(filePath.charAt(0)); +} + +/** + * Loads a YAML configuration from a file. + * @param {string} filePath The filename to load. + * @returns {Object} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadYAMLConfigFile(filePath) { + debug("Loading YAML config file: " + filePath); + + // lazy load YAML to improve performance when not used + var yaml = require("js-yaml"); + + try { + // empty YAML file can be null, so always use + return yaml.safeLoad(readFile(filePath)) || {}; + } catch (e) { + debug("Error reading YAML file: " + filePath); + e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a JSON configuration from a file. + * @param {string} filePath The filename to load. + * @returns {Object} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSONConfigFile(filePath) { + debug("Loading JSON config file: " + filePath); + + try { + return JSON.parse(stripComments(readFile(filePath))); + } catch (e) { + debug("Error reading JSON file: " + filePath); + e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a legacy (.eslintrc) configuration from a file. + * @param {string} filePath The filename to load. + * @returns {Object} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadLegacyConfigFile(filePath) { + debug("Loading config file: " + filePath); + + // lazy load YAML to improve performance when not used + var yaml = require("js-yaml"); + + try { + return yaml.safeLoad(stripComments(readFile(filePath))) || {}; + } catch (e) { + debug("Error reading YAML file: " + filePath); + e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a JavaScript configuration from a file. + * @param {string} filePath The filename to load. + * @returns {Object} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSConfigFile(filePath) { + debug("Loading JS config file: " + filePath); + try { + return require(filePath); + } catch (e) { + debug("Error reading JavaScript file: " + filePath); + e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a configuration from a package.json file. + * @param {string} filePath The filename to load. + * @returns {Object} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadPackageJSONConfigFile(filePath) { + debug("Loading package.json config file: " + filePath); + try { + return require(filePath).eslintConfig || null; + } catch (e) { + debug("Error reading package.json file: " + filePath); + e.message = "Cannot read config file: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a JavaScript configuration from a package. + * @param {string} filePath The package name to load. + * @returns {Object} The configuration object from the package. + * @throws {Error} If the package cannot be read. + * @private + */ +function loadPackage(filePath) { + debug("Loading config package: " + filePath); + try { + return require(filePath); + } catch (e) { + debug("Error reading package: " + filePath); + e.message = "Cannot read config package: " + filePath + "\nError: " + e.message; + throw e; + } +} + +/** + * Loads a configuration file regardless of the source. Inspects the file path + * to determine the correctly way to load the config file. + * @param {string} filePath The path to the configuration. + * @returns {Object} The configuration information. + * @private + */ +function loadConfigFile(filePath) { + var config; + + if (isFilePath(filePath)) { + switch (path.extname(filePath)) { + case ".js": + config = loadJSConfigFile(filePath); + break; + + case ".json": + if (path.basename(filePath) === "package.json") { + config = loadPackageJSONConfigFile(filePath); + if (config === null) { + return null; + } + } else { + config = loadJSONConfigFile(filePath); + } + break; + + case ".yaml": + case ".yml": + config = loadYAMLConfigFile(filePath); + break; + + default: + config = loadLegacyConfigFile(filePath); + } + } else { + config = loadPackage(filePath); + } + + return ConfigOps.merge(ConfigOps.createEmptyConfig(), config); +} + +/** + * Writes a configuration file in JSON format. + * @param {Object} config The configuration object to write. + * @param {string} filePath The filename to write to. + * @returns {void} + * @private + */ +function writeJSONConfigFile(config, filePath) { + debug("Writing JSON config file: " + filePath); + + var content = JSON.stringify(config, null, 4); + fs.writeFileSync(filePath, content, "utf8"); +} + +/** + * Writes a configuration file in YAML format. + * @param {Object} config The configuration object to write. + * @param {string} filePath The filename to write to. + * @returns {void} + * @private + */ +function writeYAMLConfigFile(config, filePath) { + debug("Writing YAML config file: " + filePath); + + // lazy load YAML to improve performance when not used + var yaml = require("js-yaml"); + + var content = yaml.safeDump(config); + fs.writeFileSync(filePath, content, "utf8"); +} + +/** + * Writes a configuration file in JavaScript format. + * @param {Object} config The configuration object to write. + * @param {string} filePath The filename to write to. + * @returns {void} + * @private + */ +function writeJSConfigFile(config, filePath) { + debug("Writing JS config file: " + filePath); + + var content = "module.exports = " + JSON.stringify(config, null, 4) + ";"; + fs.writeFileSync(filePath, content, "utf8"); +} + +/** + * Writes a configuration file. + * @param {Object} config The configuration object to write. + * @param {string} filePath The filename to write to. + * @returns {void} + * @throws {Error} When an unknown file type is specified. + * @private + */ +function write(config, filePath) { + switch (path.extname(filePath)) { + case ".js": + writeJSConfigFile(config, filePath); + break; + + case ".json": + writeJSONConfigFile(config, filePath); + break; + + case ".yaml": + case ".yml": + writeYAMLConfigFile(config, filePath); + break; + + default: + throw new Error("Can't write to unknown file type."); + } +} + +/** + * Applies values from the "extends" field in a configuration file. + * @param {Object} config The configuration information. + * @param {string} filePath The file path from which the configuration information + * was loaded. + * @returns {Object} A new configuration object with all of the "extends" fields + * loaded and merged. + * @private + */ +function applyExtends(config, filePath) { + var configExtends = config.extends; + + // normalize into an array for easier handling + if (!Array.isArray(config.extends)) { + configExtends = [config.extends]; + } + + // Make the last element in an array take the highest precedence + config = configExtends.reduceRight(function(previousValue, parentPath) { + + if (parentPath === "eslint:recommended") { + // Add an explicit substitution for eslint:recommended to conf/eslint.json + // this lets us use the eslint.json file as the recommended rules + parentPath = path.resolve(__dirname, "../../conf/eslint.json"); + } else if (isFilePath(parentPath)) { + // If the `extends` path is relative, use the directory of the current configuration + // file as the reference point. Otherwise, use as-is. + parentPath = (!isAbsolutePath(parentPath) ? + path.join(path.dirname(filePath), parentPath) : + parentPath + ); + } + + try { + debug("Loading " + parentPath); + return ConfigOps.merge(load(parentPath), previousValue); + } catch (e) { + // If the file referenced by `extends` failed to load, add the path to the + // configuration file that referenced it to the error message so the user is + // able to see where it was referenced from, then re-throw + e.message += "\nReferenced from: " + filePath; + throw e; + } + + }, config); + + return config; +} + +/** + * Resolves a configuration file path into the fully-formed path, whether filename + * or package name. + * @param {string} filePath The filepath to resolve. + * @returns {string} A path that can be used directly to load the configuration. + * @private + */ +function resolve(filePath) { + + if (isFilePath(filePath)) { + return path.resolve(filePath); + } else { + + // it's a package + + if (filePath.charAt(0) === "@") { + // it's a scoped package + + // package name is "eslint-config", or just a username + var scopedPackageShortcutRegex = /^(@[^\/]+)(?:\/(?:eslint-config)?)?$/; + if (scopedPackageShortcutRegex.test(filePath)) { + filePath = filePath.replace(scopedPackageShortcutRegex, "$1/eslint-config"); + } else if (filePath.split("/")[1].indexOf("eslint-config-") !== 0) { + // for scoped packages, insert the eslint-config after the first / + filePath = filePath.replace(/^@([^\/]+)\/(.*)$/, "@$1/eslint-config-$2"); + } + } else if (filePath.indexOf("eslint-config-") !== 0) { + filePath = "eslint-config-" + filePath; + } + + return filePath; + } + +} + +/** + * Loads a configuration file from the given file path. + * @param {string} filePath The filename or package name to load the configuration + * information from. + * @returns {Object} The configuration information. + * @private + */ +function load(filePath) { + + var resolvedPath = resolve(filePath), + config = loadConfigFile(resolvedPath); + + if (config) { + + // validate the configuration before continuing + validator.validate(config, filePath); + + // If an `extends` property is defined, it represents a configuration file to use as + // a "parent". Load the referenced file and merge the configuration recursively. + if (config.extends) { + config = applyExtends(config, filePath); + } + + if (config.env) { + // Merge in environment-specific globals and ecmaFeatures. + config = ConfigOps.applyEnvironments(config); + } + + } + + return config; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + + load: load, + resolve: resolve, + write: write, + applyExtends: applyExtends, + CONFIG_FILES: CONFIG_FILES, + + /** + * Retrieves the configuration filename for a given directory. It loops over all + * of the valid configuration filenames in order to find the first one that exists. + * @param {string} directory The directory to check for a config file. + * @returns {?string} The filename of the configuration file for the directory + * or null if there is no configuration file in the directory. + */ + getFilenameForDirectory: function(directory) { + + var filename; + + for (var i = 0, len = CONFIG_FILES.length; i < len; i++) { + filename = path.join(directory, CONFIG_FILES[i]); + if (fs.existsSync(filename)) { + return filename; + } + } + + return null; + } +}; diff --git a/tools/eslint/lib/config/config-initializer.js b/tools/eslint/lib/config/config-initializer.js new file mode 100644 index 00000000000000..526c56d9ae805b --- /dev/null +++ b/tools/eslint/lib/config/config-initializer.js @@ -0,0 +1,241 @@ +/** + * @fileoverview Config initialization wizard. + * @author Ilya Volodin + * @copyright 2015 Ilya Volodin. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var exec = require("child_process").exec, + inquirer = require("inquirer"), + ConfigFile = require("./config-file"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/* istanbul ignore next: hard to test fs function */ +/** + * Create .eslintrc file in the current working directory + * @param {object} config object that contains user's answers + * @param {string} format The file format to write to. + * @param {function} callback function to call once the file is written. + * @returns {void} + */ +function writeFile(config, format, callback) { + + // default is .js + var extname = ".js"; + if (format === "YAML") { + extname = ".yml"; + } else if (format === "JSON") { + extname = ".json"; + } + + + try { + ConfigFile.write(config, "./.eslintrc" + extname); + console.log("Successfully created .eslintrc" + extname + " file in " + process.cwd()); + } catch (e) { + callback(e); + return; + } + + // install any external configs as well as any included plugins + if (config.extends && config.extends.indexOf("eslint") === -1) { + console.log("Installing additional dependencies"); + exec("npm i eslint-config-" + config.extends + " --save-dev", function(err) { + + if (err) { + return callback(err); + } + + // TODO: consider supporting more than 1 plugin though it's required yet. + exec("npm i eslint-plugin-" + config.plugins[0] + " --save-dev", callback); + }); + return; + } + + // install the react plugin if it was explictly chosen + if (config.plugins && config.plugins.indexOf("react") >= 0) { + console.log("Installing React plugin"); + exec("npm i eslint-plugin-react --save-dev", callback); + return; + } + callback(); +} + +/** + * process user's answers and create config object + * @param {object} answers answers received from inquirer + * @returns {object} config object + */ +function processAnswers(answers) { + var config = {rules: {}, env: {}, extends: "eslint:recommended"}; + config.rules.indent = [2, answers.indent]; + config.rules.quotes = [2, answers.quotes]; + config.rules["linebreak-style"] = [2, answers.linebreak]; + config.rules.semi = [2, answers.semi ? "always" : "never"]; + if (answers.es6) { + config.env.es6 = true; + } + answers.env.forEach(function(env) { + config.env[env] = true; + }); + if (answers.jsx) { + config.ecmaFeatures = {jsx: true}; + if (answers.react) { + config.plugins = ["react"]; + config.ecmaFeatures.experimentalObjectRestSpread = true; + } + } + return config; +} + +/** + * process user's style guide of choice and return an appropriate config object. + * @param {string} guide name of the chosen style guide + * @returns {object} config object + */ +function getConfigForStyleGuide(guide) { + var guides = { + google: {extends: "google"}, + airbnb: {extends: "airbnb", plugins: ["react"]}, + standard: {extends: "standard", plugins: ["standard"]} + }; + if (!guides[guide]) { + throw new Error("You referenced an unsupported guide."); + } + return guides[guide]; +} + +/* istanbul ignore next: no need to test inquirer*/ +/** + * Ask use a few questions on command prompt + * @param {function} callback callback function when file has been written + * @returns {void} + */ +function promptUser(callback) { + inquirer.prompt([ + { + type: "list", + name: "source", + message: "How would you like to configure ESLint?", + default: "prompt", + choices: [{name: "Answer questions about your style", value: "prompt"}, {name: "Use a popular style guide", value: "guide"}] + }, + { + type: "list", + name: "styleguide", + message: "Which style guide do you want to follow?", + choices: [{name: "Google", value: "google"}, {name: "AirBnB", value: "airbnb"}, {name: "Standard", value: "standard"}], + when: function(answers) { + return answers.source === "guide"; + } + }, + { + type: "list", + name: "format", + message: "What format do you want your config file to be in?", + default: "JavaScript", + choices: ["JavaScript", "YAML", "JSON"], + when: function(answers) { + return answers.source === "guide"; + } + } + ], function(earlyAnswers) { + + // early exit if you are using a style guide + if (earlyAnswers.source === "guide") { + writeFile(getConfigForStyleGuide(earlyAnswers.styleguide), earlyAnswers.format, callback); + return; + } + + // continue with the style questions otherwise... + inquirer.prompt([ + { + type: "list", + name: "indent", + message: "What style of indentation do you use?", + default: "tabs", + choices: [{name: "Tabs", value: "tab"}, {name: "Spaces", value: 4}] + }, + { + type: "list", + name: "quotes", + message: "What quotes do you use for strings?", + default: "double", + choices: [{name: "Double", value: "double"}, {name: "Single", value: "single"}] + }, + { + type: "list", + name: "linebreak", + message: "What line endings do you use?", + default: "unix", + choices: [{name: "Unix", value: "unix"}, {name: "Windows", value: "windows"}] + }, + { + type: "confirm", + name: "semi", + message: "Do you require semicolons?", + default: true + }, + { + type: "confirm", + name: "es6", + message: "Are you using ECMAScript 6 features?", + default: false + }, + { + type: "checkbox", + name: "env", + message: "Where will your code run?", + default: ["browser"], + choices: [{name: "Node", value: "node"}, {name: "Browser", value: "browser"}] + }, + { + type: "confirm", + name: "jsx", + message: "Do you use JSX?", + default: false + }, + { + type: "confirm", + name: "react", + message: "Do you use React", + default: false, + when: function(answers) { + return answers.jsx; + } + }, + { + type: "list", + name: "format", + message: "What format do you want your config file to be in?", + default: "JavaScript", + choices: ["JavaScript", "YAML", "JSON"] + } + ], function(answers) { + var config = processAnswers(answers); + writeFile(config, answers.format, callback); + }); + }); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +var init = { + getConfigForStyleGuide: getConfigForStyleGuide, + processAnswers: processAnswers, + initializeConfig: /* istanbul ignore next */ function(callback) { + promptUser(callback); + } +}; + +module.exports = init; diff --git a/tools/eslint/lib/config/config-ops.js b/tools/eslint/lib/config/config-ops.js new file mode 100644 index 00000000000000..fa9436bc572761 --- /dev/null +++ b/tools/eslint/lib/config/config-ops.js @@ -0,0 +1,186 @@ +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var debug = require("debug"), + environments = require("../../conf/environments"), + assign = require("object-assign"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +debug = debug("eslint:config-ops"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + + /** + * Creates an empty configuration object suitable for merging as a base. + * @returns {Object} A configuration object. + */ + createEmptyConfig: function() { + return { + globals: {}, + env: {}, + rules: {}, + ecmaFeatures: {} + }; + }, + + /** + * Creates an environment config based on the specified environments. + * @param {Object} env The environment settings. + * @returns {Object} A configuration object with the appropriate rules and globals + * set. + */ + createEnvironmentConfig: function(env) { + + var envConfig = this.createEmptyConfig(); + + if (env) { + + envConfig.env = env; + + Object.keys(env).filter(function(name) { + return env[name]; + }).forEach(function(name) { + var environment = environments[name]; + + if (environment) { + debug("Creating config for environment " + name); + if (environment.globals) { + assign(envConfig.globals, environment.globals); + } + + if (environment.ecmaFeatures) { + assign(envConfig.ecmaFeatures, environment.ecmaFeatures); + } + } + }); + } + + return envConfig; + }, + + /** + * Given a config with environment settings, applies the globals and + * ecmaFeatures to the configuration and returns the result. + * @param {Object} config The configuration information. + * @returns {Object} The updated configuration information. + */ + applyEnvironments: function(config) { + if (config.env && typeof config.env === "object") { + debug("Apply environment settings to config"); + return this.merge(this.createEnvironmentConfig(config.env), config); + } + + return config; + }, + + /** + * Merges two config objects. This will not only add missing keys, but will also modify values to match. + * @param {Object} target config object + * @param {Object} src config object. Overrides in this config object will take priority over base. + * @param {boolean} [combine] Whether to combine arrays or not + * @param {boolean} [isRule] Whether its a rule + * @returns {Object} merged config object. + */ + merge: function deepmerge(target, src, combine, isRule) { + /* + The MIT License (MIT) + + Copyright (c) 2012 Nicholas Fisher + + 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 code is taken from deepmerge repo (https://github.com/KyleAMathews/deepmerge) and modified to meet our needs. + var array = Array.isArray(src) || Array.isArray(target); + var dst = array && [] || {}; + + combine = !!combine; + isRule = !!isRule; + if (array) { + target = target || []; + if (isRule && src.length > 1) { + dst = dst.concat(src); + } else { + dst = dst.concat(target); + } + if (typeof src !== "object" && !Array.isArray(src)) { + src = [src]; + } + Object.keys(src).forEach(function(e, i) { + e = src[i]; + if (typeof dst[i] === "undefined") { + dst[i] = e; + } else if (typeof e === "object") { + if (isRule) { + dst[i] = e; + } else { + dst[i] = deepmerge(target[i], e, combine, isRule); + } + } else { + if (!combine) { + dst[i] = e; + } else { + if (dst.indexOf(e) === -1) { + dst.push(e); + } + } + } + }); + } else { + if (target && typeof target === "object") { + Object.keys(target).forEach(function(key) { + dst[key] = target[key]; + }); + } + Object.keys(src).forEach(function(key) { + if (Array.isArray(src[key]) || Array.isArray(target[key])) { + dst[key] = deepmerge(target[key], src[key], key === "plugins", isRule); + } else if (typeof src[key] !== "object" || !src[key]) { + dst[key] = src[key]; + } else { + if (!target[key]) { + dst[key] = src[key]; + } else { + dst[key] = deepmerge(target[key], src[key], combine, key === "rules"); + } + } + }); + } + + return dst; + } + + +}; diff --git a/tools/eslint/lib/config/config-validator.js b/tools/eslint/lib/config/config-validator.js new file mode 100644 index 00000000000000..89e9a70e374e81 --- /dev/null +++ b/tools/eslint/lib/config/config-validator.js @@ -0,0 +1,163 @@ +/** + * @fileoverview Validates configs. + * @author Brandon Mills + * @copyright 2015 Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var rules = require("../rules"), + environments = require("../../conf/environments"), + schemaValidator = require("is-my-json-valid"); + +var validators = { + rules: Object.create(null) +}; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * Gets a complete options schema for a rule. + * @param {string} id The rule's unique name. + * @returns {object} JSON Schema for the rule's options. + */ +function getRuleOptionsSchema(id) { + var rule = rules.get(id), + schema = rule && rule.schema; + + if (!schema) { + return { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + } + ], + "minItems": 1 + }; + } + + // Given a tuple of schemas, insert warning level at the beginning + if (Array.isArray(schema)) { + return { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + } + ].concat(schema), + "minItems": 1, + "maxItems": schema.length + 1 + }; + } + + // Given a full schema, leave it alone + return schema; +} + +/** + * Validates a rule's options against its schema. + * @param {string} id The rule's unique name. + * @param {array|number} options The given options for the rule. + * @param {string} source The name of the configuration source. + * @returns {void} + */ +function validateRuleOptions(id, options, source) { + var validateRule = validators.rules[id], + message; + + if (!validateRule) { + validateRule = schemaValidator(getRuleOptionsSchema(id), { verbose: true }); + validators.rules[id] = validateRule; + } + + if (typeof options === "number") { + options = [options]; + } + + validateRule(options); + + if (validateRule.errors) { + message = [ + source, ":\n", + "\tConfiguration for rule \"", id, "\" is invalid:\n" + ]; + validateRule.errors.forEach(function(error) { + if (error.field === "data[\"0\"]") { // better error for severity + message.push( + "\tSeverity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed \"", error.value, "\").\n"); + } else { + message.push( + "\tValue \"", error.value, "\" ", error.message, ".\n" + ); + } + }); + + throw new Error(message.join("")); + } +} + +/** + * Validates an environment object + * @param {object} environment The environment config object to validate. + * @param {string} source The location to report with any errors. + * @returns {void} + */ +function validateEnvironment(environment, source) { + + // not having an environment is ok + if (!environment) { + return; + } + + if (Array.isArray(environment)) { + throw new Error("Environment must not be an array"); + } + + if (typeof environment === "object") { + Object.keys(environment).forEach(function(env) { + if (!environments[env]) { + var message = [ + source, ":\n", + "\tEnvironment key \"", env, "\" is unknown\n" + ]; + throw new Error(message.join("")); + } + }); + } else { + throw new Error("Environment must be an object"); + } +} + +/** + * Validates an entire config object. + * @param {object} config The config object to validate. + * @param {string} source The location to report with any errors. + * @returns {void} + */ +function validate(config, source) { + + if (typeof config.rules === "object") { + Object.keys(config.rules).forEach(function(id) { + validateRuleOptions(id, config.rules[id], source); + }); + } + + validateEnvironment(config.env, source); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + getRuleOptionsSchema: getRuleOptionsSchema, + validate: validate, + validateRuleOptions: validateRuleOptions +}; diff --git a/tools/eslint/lib/eslint.js b/tools/eslint/lib/eslint.js index 28f6d036d86ac0..12f8c3e2ab7aee 100644 --- a/tools/eslint/lib/eslint.js +++ b/tools/eslint/lib/eslint.js @@ -1,6 +1,8 @@ /** * @fileoverview Main ESLint object. * @author Nicholas C. Zakas + * @copyright 2013 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; @@ -8,18 +10,24 @@ // Requirements //------------------------------------------------------------------------------ -var estraverse = require("estraverse-fb"), +var estraverse = require("./util/estraverse"), escope = require("escope"), environments = require("../conf/environments"), + blankScriptAST = require("../conf/blank-script.json"), assign = require("object-assign"), rules = require("./rules"), - util = require("./util"), RuleContext = require("./rule-context"), timing = require("./timing"), - createTokenStore = require("./token-store.js"), + SourceCode = require("./util/source-code"), + NodeEventGenerator = require("./util/node-event-generator"), + CommentEventGenerator = require("./util/comment-event-generator"), EventEmitter = require("events").EventEmitter, - escapeRegExp = require("escape-string-regexp"), - validator = require("./config-validator"); + ConfigOps = require("./config/config-ops"), + validator = require("./config/config-validator"), + replacements = require("../conf/replacements.json"), + assert = require("assert"); + +var DEFAULT_PARSER = require("../conf/eslint.json").parser; //------------------------------------------------------------------------------ // Helpers @@ -29,9 +37,10 @@ var estraverse = require("estraverse-fb"), * Parses a list of "name:boolean_value" or/and "name" options divided by comma or * whitespace. * @param {string} string The string to parse. + * @param {Comment} comment The comment node which has the string. * @returns {Object} Result map object of names and boolean values */ -function parseBooleanConfig(string) { +function parseBooleanConfig(string, comment) { var items = {}; // Collapse whitespace around : to make parsing easier string = string.replace(/\s*:\s*/g, ":"); @@ -48,7 +57,10 @@ function parseBooleanConfig(string) { name = name.substring(0, pos); } - items[name] = (value === "true"); + items[name] = { + value: (value === "true"), + comment: comment + }; }); return items; @@ -66,14 +78,14 @@ function parseJsonConfig(string, location, messages) { string = string.replace(/([a-zA-Z0-9\-\/]+):/g, "\"$1\":").replace(/(\]|[0-9])\s+(?=")/, "$1,"); try { items = JSON.parse("{" + string + "}"); - } catch(ex) { + } catch (ex) { messages.push({ fatal: true, severity: 2, message: "Failed to parse JSON from '" + string + "': " + ex.message, line: location.start.line, - column: location.start.column + column: location.start.column + 1 }); } @@ -100,25 +112,6 @@ function parseListConfig(string) { return items; } -/** - * @param {Scope} scope The scope object to check. - * @param {string} name The name of the variable to look up. - * @returns {Variable} The variable object if found or null if not. - */ -function getVariable(scope, name) { - var variable = null; - scope.variables.some(function(v) { - if (v.name === name) { - variable = v; - return true; - } else { - return false; - } - - }); - return variable; -} - /** * Ensures that variables representing built-in properties of the Global Object, * and any globals declared by special block comments, are present in the global @@ -130,12 +123,13 @@ function getVariable(scope, name) { */ function addDeclaredGlobals(program, globalScope, config) { var declaredGlobals = {}, + exportedGlobals = {}, explicitGlobals = {}, builtin = environments.builtin; assign(declaredGlobals, builtin); - Object.keys(config.env).forEach(function (name) { + Object.keys(config.env).forEach(function(name) { if (config.env[name]) { var environmentGlobals = environments[name] && environments[name].globals; if (environmentGlobals) { @@ -144,27 +138,39 @@ function addDeclaredGlobals(program, globalScope, config) { } }); + assign(exportedGlobals, config.exported); assign(declaredGlobals, config.globals); assign(explicitGlobals, config.astGlobals); Object.keys(declaredGlobals).forEach(function(name) { - var variable = getVariable(globalScope, name); + var variable = globalScope.set.get(name); if (!variable) { variable = new escope.Variable(name, globalScope); variable.eslintExplicitGlobal = false; globalScope.variables.push(variable); + globalScope.set.set(name, variable); } variable.writeable = declaredGlobals[name]; }); Object.keys(explicitGlobals).forEach(function(name) { - var variable = getVariable(globalScope, name); + var variable = globalScope.set.get(name); if (!variable) { variable = new escope.Variable(name, globalScope); variable.eslintExplicitGlobal = true; + variable.eslintExplicitGlobalComment = explicitGlobals[name].comment; globalScope.variables.push(variable); + globalScope.set.set(name, variable); + } + variable.writeable = explicitGlobals[name].value; + }); + + // mark all exported variables as such + Object.keys(exportedGlobals).forEach(function(name) { + var variable = globalScope.set.get(name); + if (variable) { + variable.eslintUsed = true; } - variable.writeable = explicitGlobals[name]; }); } @@ -240,11 +246,12 @@ function enableReporting(reportingConfig, start, rulesToEnable) { * @param {Object} config The existing configuration data. * @param {Object[]} reportingConfig The existing reporting configuration data. * @param {Object[]} messages The messages queue. - * @returns {void} + * @returns {object} Modified config object */ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messages) { var commentConfig = { + exported: {}, astGlobals: {}, rules: {}, env: {} @@ -254,16 +261,20 @@ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messa ast.comments.forEach(function(comment) { var value = comment.value.trim(); - var match = /^(eslint-\w+|eslint-\w+-\w+|eslint|globals?)(\s|$)/.exec(value); + var match = /^(eslint-\w+|eslint-\w+-\w+|eslint|exported|globals?)(\s|$)/.exec(value); if (match) { value = value.substring(match.index + match[1].length); if (comment.type === "Block") { switch (match[1]) { + case "exported": + assign(commentConfig.exported, parseBooleanConfig(value, comment)); + break; + case "globals": case "global": - assign(commentConfig.astGlobals, parseBooleanConfig(value)); + assign(commentConfig.astGlobals, parseBooleanConfig(value, comment)); break; case "eslint-env": @@ -300,14 +311,14 @@ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messa }); // apply environment configs - Object.keys(commentConfig.env).forEach(function (name) { + Object.keys(commentConfig.env).forEach(function(name) { if (environments[name]) { - util.mergeConfigs(commentConfig, environments[name]); + commentConfig = ConfigOps.merge(commentConfig, environments[name]); } }); assign(commentConfig.rules, commentRules); - util.mergeConfigs(config, commentConfig); + return ConfigOps.merge(config, commentConfig); } /** @@ -363,7 +374,7 @@ function prepareConfig(config) { // merge in environment ecmaFeatures if (typeof config.env === "object") { Object.keys(config.env).forEach(function(env) { - if (config.env[env] && environments[env].ecmaFeatures) { + if (config.env[env] && environments[env] && environments[env].ecmaFeatures) { assign(ecmaFeatures, environments[env].ecmaFeatures); } }); @@ -371,11 +382,11 @@ function prepareConfig(config) { preparedConfig = { rules: copiedRules, - parser: config.parser || "espree", - globals: util.mergeConfigs({}, config.globals), - env: util.mergeConfigs({}, config.env || {}), - settings: util.mergeConfigs({}, config.settings || {}), - ecmaFeatures: util.mergeConfigs(ecmaFeatures, config.ecmaFeatures || {}) + parser: config.parser || DEFAULT_PARSER, + globals: ConfigOps.merge({}, config.globals), + env: ConfigOps.merge({}, config.env || {}), + settings: ConfigOps.merge({}, config.settings || {}), + ecmaFeatures: ConfigOps.merge(ecmaFeatures, config.ecmaFeatures || {}) }; // can't have global return inside of modules @@ -386,6 +397,63 @@ function prepareConfig(config) { return preparedConfig; } +/** + * Provide a stub rule with a given message + * @param {string} message The message to be displayed for the rule + * @returns {Function} Stub rule function + */ +function createStubRule(message) { + + /** + * Creates a fake rule object + * @param {object} context context object for each rule + * @returns {object} collection of node to listen on + */ + function createRuleModule(context) { + return { + Program: function(node) { + context.report(node, message); + } + }; + } + + if (message) { + return createRuleModule; + } else { + throw new Error("No message passed to stub rule"); + } +} + +/** + * Provide a rule replacement message + * @param {string} ruleId Name of the rule + * @returns {string} Message detailing rule replacement + */ +function getRuleReplacementMessage(ruleId) { + if (ruleId in replacements.rules) { + var newRules = replacements.rules[ruleId]; + return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", "); + } +} + +var eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)\*\//g; + +/** + * Checks whether or not there is a comment which has "eslint-env *" in a given text. + * @param {string} text - A source code text to check. + * @returns {object|null} A result of parseListConfig() with "eslint-env *" comment. + */ +function findEslintEnv(text) { + var match, retv; + + eslintEnvPattern.lastIndex = 0; + while ((match = eslintEnvPattern.exec(text))) { + retv = assign(retv || {}, parseListConfig(match[1])); + } + + return retv; +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -398,19 +466,14 @@ module.exports = (function() { var api = Object.create(new EventEmitter()), messages = [], - currentText = null, - currentTextLines = [], currentConfig = null, - currentTokens = null, currentScopes = null, scopeMap = null, scopeManager = null, currentFilename = null, controller = null, reportingConfig = [], - commentLocsEnter = [], - commentLocsExit = [], - currentAST = null; + sourceCode = null; /** * Parses text into an AST. Moved out here because the try-catch prevents @@ -464,56 +527,16 @@ module.exports = (function() { fatal: true, severity: 2, - message: message, + message: "Parsing error: " + message, line: ex.lineNumber, - column: ex.column + column: ex.column + 1 }); return null; } } - /** - * Check collection of comments to prevent double event for comment as - * leading and trailing, then emit event if passing - * @param {ASTNode[]} comments Collection of comment nodes - * @param {Object[]} locs List of locations of previous comment nodes - * @param {string} eventName Event name postfix - * @returns {void} - */ - function emitComments(comments, locs, eventName) { - - if (comments.length) { - comments.forEach(function(node) { - if (locs.indexOf(node.loc) >= 0) { - locs.splice(locs.indexOf(node.loc), 1); - } else { - locs.push(node.loc); - api.emit(node.type + eventName, node); - } - }); - } - } - - /** - * Shortcut to check and emit enter of comment nodes - * @param {ASTNode[]} comments Collection of comment nodes - * @returns {void} - */ - function emitCommentsEnter(comments) { - emitComments(comments, commentLocsEnter, "Comment"); - } - - /** - * Shortcut to check and emit exit of comment nodes - * @param {ASTNode[]} comments Collection of comment nodes - * @returns {void} - */ - function emitCommentsExit(comments) { - emitComments(comments, commentLocsExit, "Comment:exit"); - } - /** * Get the severity level of a rule (0 - none, 1 - warning, 2 - error) * Returns 0 if the rule config is not valid (an Array or a number) @@ -553,103 +576,139 @@ module.exports = (function() { api.reset = function() { this.removeAllListeners(); messages = []; - currentAST = null; currentConfig = null; - currentText = null; - currentTextLines = []; - currentTokens = null; currentScopes = null; scopeMap = null; scopeManager = null; controller = null; reportingConfig = []; - commentLocsEnter = []; - commentLocsExit = []; + sourceCode = null; }; /** * Verifies the text against the rules specified by the second argument. - * @param {string} text The JavaScript text to verify. + * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object. * @param {Object} config An object whose keys specify the rules to use. - * @param {string=} filename The optional filename of the file being checked. - * If this is not set, the filename will default to '' in the rule context. - * @param {boolean=} saveState Indicates if the state from the last run should be saved. + * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked. + * If this is not set, the filename will default to '' in the rule context. If + * an object, then it has "filename", "saveState", and "allowInlineConfig" properties. + * @param {boolean} [saveState] Indicates if the state from the last run should be saved. * Mostly useful for testing purposes. + * @param {boolean} [filenameOrOptions.allowInlineConfig] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied. + * Useful if you want to validate JS without comments overriding rules. * @returns {Object[]} The results as an array of messages or null if no messages. */ - api.verify = function(text, config, filename, saveState) { + api.verify = function(textOrSourceCode, config, filenameOrOptions, saveState) { var ast, shebang, ecmaFeatures, - ecmaVersion; - - // set the current parsed filename - currentFilename = filename; + ecmaVersion, + allowInlineConfig, + text = (typeof textOrSourceCode === "string") ? textOrSourceCode : null; + + // evaluate arguments + if (typeof filenameOrOptions === "object") { + currentFilename = filenameOrOptions.filename; + allowInlineConfig = filenameOrOptions.allowInlineConfig; + saveState = filenameOrOptions.saveState; + } else { + currentFilename = filenameOrOptions; + } if (!saveState) { this.reset(); } - // there's no input, just exit here - if (text.trim().length === 0) { - currentText = text; - return messages; + // search and apply "eslint-env *". + var envInFile = findEslintEnv(text || textOrSourceCode.text); + if (envInFile) { + if (!config || !config.env) { + config = assign({}, config || {}, {env: envInFile}); + } else { + config = assign({}, config); + config.env = assign({}, config.env, envInFile); + } } // process initial config to make it safe to extend config = prepareConfig(config || {}); - ast = parse(text.replace(/^#!([^\r\n]+)/, function(match, captured) { - shebang = captured; - return "//" + captured; - }), config); + // only do this for text + if (text !== null) { + + // there's no input, just exit here + if (text.trim().length === 0) { + sourceCode = new SourceCode(text, blankScriptAST); + return messages; + } + + ast = parse(text.replace(/^#!([^\r\n]+)/, function(match, captured) { + shebang = captured; + return "//" + captured; + }), config); + + if (ast) { + sourceCode = new SourceCode(text, ast); + } + + } else { + sourceCode = textOrSourceCode; + ast = sourceCode.ast; + } // if espree failed to parse the file, there's no sense in setting up rules if (ast) { - currentAST = ast; - // parse global comments and modify config - modifyConfigsFromComments(filename, ast, config, reportingConfig, messages); + if (allowInlineConfig !== false) { + config = modifyConfigsFromComments(currentFilename, ast, config, reportingConfig, messages); + } // enable appropriate rules Object.keys(config.rules).filter(function(key) { return getRuleSeverity(config.rules[key]) > 0; }).forEach(function(key) { - - var ruleCreator = rules.get(key), - severity = getRuleSeverity(config.rules[key]), - options = getRuleOptions(config.rules[key]), + var ruleCreator, + severity, + options, rule; - if (ruleCreator) { - try { - rule = ruleCreator(new RuleContext( - key, api, severity, options, - config.settings, config.ecmaFeatures - )); - - // add all the node types as listeners - Object.keys(rule).forEach(function(nodeType) { - api.on(nodeType, timing.enabled - ? timing.time(key, rule[nodeType]) - : rule[nodeType] - ); - }); - } catch(ex) { - ex.message = "Error while loading rule '" + key + "': " + ex.message; - throw ex; + ruleCreator = rules.get(key); + if (!ruleCreator) { + var replacementMsg = getRuleReplacementMessage(key); + if (replacementMsg) { + ruleCreator = createStubRule(replacementMsg); + } else { + ruleCreator = createStubRule("Definition for rule '" + key + "' was not found"); } + rules.define(key, ruleCreator); + } - } else { - throw new Error("Definition for rule '" + key + "' was not found."); + severity = getRuleSeverity(config.rules[key]); + options = getRuleOptions(config.rules[key]); + + try { + rule = ruleCreator(new RuleContext( + key, api, severity, options, + config.settings, config.ecmaFeatures + )); + + // add all the node types as listeners + Object.keys(rule).forEach(function(nodeType) { + api.on(nodeType, timing.enabled + ? timing.time(key, rule[nodeType]) + : rule[nodeType] + ); + }); + } catch (ex) { + ex.message = "Error while loading rule '" + key + "': " + ex.message; + throw ex; } }); // save config so rules can access as necessary currentConfig = config; - currentText = text; controller = new estraverse.Controller(); ecmaFeatures = currentConfig.ecmaFeatures; @@ -672,7 +731,7 @@ module.exports = (function() { * lookup in getScope. */ scopeMap = []; - currentScopes.forEach(function (scope, index) { + currentScopes.forEach(function(scope, index) { var range = scope.block.range[0]; // Sometimes two scopes are returned for a given node. This is @@ -682,21 +741,6 @@ module.exports = (function() { } }); - /* - * Split text here into array of lines so - * it's not being done repeatedly - * by individual rules. - */ - currentTextLines = currentText.split(/\r\n|\r|\n|\u2028|\u2029/g); - - // Freezing so array isn't accidentally changed by a rule. - Object.freeze(currentTextLines); - - currentTokens = createTokenStore(ast.tokens); - Object.keys(currentTokens).forEach(function(method) { - api[method] = currentTokens[method]; - }); - // augment global scope with declared global variables addDeclaredGlobals(ast, currentScopes[0], currentConfig); @@ -709,6 +753,9 @@ module.exports = (function() { } } + var eventGenerator = new NodeEventGenerator(api); + eventGenerator = new CommentEventGenerator(eventGenerator, sourceCode); + /* * Each node has a type property. Whenever a particular type of node is found, * an event is fired. This allows any listeners to automatically be informed @@ -716,21 +763,11 @@ module.exports = (function() { */ controller.traverse(ast, { enter: function(node, parent) { - - var comments = api.getComments(node); - - emitCommentsEnter(comments.leading); node.parent = parent; - api.emit(node.type, node); - emitCommentsEnter(comments.trailing); + eventGenerator.enterNode(node); }, leave: function(node) { - - var comments = api.getComments(node); - - emitCommentsExit(comments.trailing); - api.emit(node.type + ":exit", node); - emitCommentsExit(comments.leading); + eventGenerator.leaveNode(node); } }); @@ -761,167 +798,98 @@ module.exports = (function() { * @param {string} message The actual message. * @param {Object} opts Optional template data which produces a formatted message * with symbols being replaced by this object's values. + * @param {Object} fix A fix command description. * @returns {void} */ - api.report = function(ruleId, severity, node, location, message, opts) { + api.report = function(ruleId, severity, node, location, message, opts, fix) { + if (node) { + assert.strictEqual(typeof node, "object", "Node must be an object"); + } if (typeof location === "string") { + assert.ok(node, "Node must be provided when reporting error if location is not provided"); + + fix = opts; opts = message; message = location; location = node.loc.start; } - - Object.keys(opts || {}).forEach(function (key) { - var rx = new RegExp(escapeRegExp("{{" + key + "}}"), "g"); - message = message.replace(rx, opts[key]); - }); + // else, assume location was provided, so node may be omitted if (isDisabledByReportingConfig(reportingConfig, ruleId, location)) { return; } - messages.push({ + if (opts) { + message = message.replace(/\{\{\s*(.+?)\s*\}\}/g, function(fullMatch, term) { + if (term in opts) { + return opts[term]; + } + + // Preserve old behavior: If parameter name not provided, don't replace it. + return fullMatch; + }); + } + + var problem = { ruleId: ruleId, severity: severity, message: message, line: location.line, - column: location.column, - nodeType: node.type, - source: currentTextLines[location.line - 1] || "" - }); - }; + column: location.column + 1, // switch to 1-base instead of 0-base + nodeType: node && node.type, + source: sourceCode.lines[location.line - 1] || "" + }; - /** - * Gets the source code for the given node. - * @param {ASTNode=} node The AST node to get the text for. - * @param {int=} beforeCount The number of characters before the node to retrieve. - * @param {int=} afterCount The number of characters after the node to retrieve. - * @returns {string} The text representing the AST node. - */ - api.getSource = function(node, beforeCount, afterCount) { - if (node) { - return (currentText !== null) ? currentText.slice(Math.max(node.range[0] - (beforeCount || 0), 0), - node.range[1] + (afterCount || 0)) : null; - } else { - return currentText; + // ensure there's range and text properties, otherwise it's not a valid fix + if (fix && Array.isArray(fix.range) && (typeof fix.text === "string")) { + problem.fix = fix; } + messages.push(problem); }; /** - * Gets the entire source text split into an array of lines. - * @returns {Array} The source text as an array of lines. + * Gets the SourceCode object representing the parsed source. + * @returns {SourceCode} The SourceCode object. */ - api.getSourceLines = function() { - return currentTextLines; + api.getSourceCode = function() { + return sourceCode; }; - /** - * Retrieves an array containing all comments in the source code. - * @returns {ASTNode[]} An array of comment nodes. - */ - api.getAllComments = function() { - return currentAST.comments; + // methods that exist on SourceCode object + var externalMethods = { + getSource: "getText", + getSourceLines: "getLines", + getAllComments: "getAllComments", + getNodeByRangeIndex: "getNodeByRangeIndex", + getComments: "getComments", + getJSDocComment: "getJSDocComment", + getFirstToken: "getFirstToken", + getFirstTokens: "getFirstTokens", + getLastToken: "getLastToken", + getLastTokens: "getLastTokens", + getTokenAfter: "getTokenAfter", + getTokenBefore: "getTokenBefore", + getTokenByRangeStart: "getTokenByRangeStart", + getTokens: "getTokens", + getTokensAfter: "getTokensAfter", + getTokensBefore: "getTokensBefore", + getTokensBetween: "getTokensBetween" }; - /** - * Gets all comments for the given node. - * @param {ASTNode} node The AST node to get the comments for. - * @returns {Object} The list of comments indexed by their position. - */ - api.getComments = function(node) { - - var leadingComments = node.leadingComments || [], - trailingComments = node.trailingComments || []; - - /* - * espree adds a "comments" array on Program nodes rather than - * leadingComments/trailingComments. Comments are only left in the - * Program node comments array if there is no executable code. - */ - if (node.type === "Program") { - if (node.body.length === 0) { - leadingComments = node.comments; - } - } - - return { - leading: leadingComments, - trailing: trailingComments - }; - }; - - /** - * Retrieves the JSDoc comment for a given node. - * @param {ASTNode} node The AST node to get the comment for. - * @returns {ASTNode} The BlockComment node containing the JSDoc for the - * given node or null if not found. - */ - api.getJSDocComment = function(node) { - - var parent = node.parent, - line = node.loc.start.line; - - /** - * Finds a JSDoc comment node in an array of comment nodes. - * @param {ASTNode[]} comments The array of comment nodes to search. - * @returns {ASTNode} The node if found, null if not. - * @private - */ - function findJSDocComment(comments) { - - if (comments) { - for (var i = comments.length - 1; i >= 0; i--) { - if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") { + // copy over methods + Object.keys(externalMethods).forEach(function(methodName) { + var exMethodName = externalMethods[methodName]; - if (line - comments[i].loc.end.line <= 1) { - return comments[i]; - } else { - break; - } - } - } + // All functions expected to have less arguments than 5. + api[methodName] = function(a, b, c, d, e) { + if (sourceCode) { + return sourceCode[exMethodName](a, b, c, d, e); } - return null; - } - - /** - * Check to see if its a ES6 export declaration - * @param {ASTNode} astNode - any node - * @returns {boolean} whether the given node represents a export declaration - */ - function looksLikeExport(astNode) { - return astNode.type === "ExportDefaultDeclaration" || astNode.type === "ExportNamedDeclaration" || - astNode.type === "ExportAllDeclaration" || astNode.type === "ExportSpecifier"; - } - - switch (node.type) { - case "FunctionDeclaration": - if (looksLikeExport(parent)) { - return findJSDocComment(parent.leadingComments); - } else { - return findJSDocComment(node.leadingComments); - } - break; - - case "ArrowFunctionExpression": - case "FunctionExpression": - - if (parent.type !== "CallExpression" || parent.callee !== node) { - while (parent && !parent.leadingComments && !/Function/.test(parent.type)) { - parent = parent.parent; - } - - return parent && (parent.type !== "FunctionDeclaration") ? findJSDocComment(parent.leadingComments) : null; - } - - // falls through - - default: - return null; - } - }; + }; + }); /** * Gets nodes that are ancestors of current node. @@ -931,32 +899,6 @@ module.exports = (function() { return controller.parents(); }; - /** - * Gets the deepest node containing a range index. - * @param {int} index Range index of the desired node. - * @returns {ASTNode} [description] - */ - api.getNodeByRangeIndex = function(index) { - var result = null; - - estraverse.traverse(controller.root, { - enter: function (node) { - if (node.range[0] <= index && index < node.range[1]) { - result = node; - } else { - this.skip(); - } - }, - leave: function (node) { - if (node === result) { - this.break(); - } - } - }); - - return result; - }; - /** * Gets the scope for the current node. * @returns {Object} An object representing the current node's scope. @@ -968,17 +910,23 @@ module.exports = (function() { // Don't do this for Program nodes - they have no parents if (parents.length) { - // if current node is function declaration, add it to the list + // if current node introduces a scope, add it to the list var current = controller.current(); - if (["FunctionDeclaration", "FunctionExpression", - "ArrowFunctionExpression", "SwitchStatement"].indexOf(current.type) >= 0) { - parents.push(current); + if (currentConfig.ecmaFeatures.blockBindings) { + if (["BlockStatement", "SwitchStatement", "CatchClause", "FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(current.type) >= 0) { + parents.push(current); + } + } else { + if (["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(current.type) >= 0) { + parents.push(current); + } } // Ascend the current node's parents for (var i = parents.length - 1; i >= 0; --i) { - scope = scopeManager.acquire(parents[i]); + // Get the innermost scope + scope = scopeManager.acquire(parents[i], true); if (scope) { if (scope.type === "function-expression-name") { return scope.childScopes[0]; @@ -1067,6 +1015,29 @@ module.exports = (function() { return require("../conf/eslint.json"); }; + /** + * Gets variables that are declared by a specified node. + * + * The variables are its `defs[].node` or `defs[].parent` is same as the specified node. + * Specifically, below: + * + * - `VariableDeclaration` - variables of its all declarators. + * - `VariableDeclarator` - variables. + * - `FunctionDeclaration`/`FunctionExpression` - its function name and parameters. + * - `ArrowFunctionExpression` - its parameters. + * - `ClassDeclaration`/`ClassExpression` - its class name. + * - `CatchClause` - variables of its exception. + * - `ImportDeclaration` - variables of its all specifiers. + * - `ImportSpecifier`/`ImportDefaultSpecifier`/`ImportNamespaceSpecifier` - a variable. + * - others - always an empty array. + * + * @param {ASTNode} node A node to get. + * @returns {escope.Variable[]} Variables that are declared by the node. + */ + api.getDeclaredVariables = function(node) { + return (scopeManager && scopeManager.getDeclaredVariables(node)) || []; + }; + return api; }()); diff --git a/tools/eslint/lib/file-finder.js b/tools/eslint/lib/file-finder.js index f4b8a5ce7aaf75..4f64a3f7a0a159 100644 --- a/tools/eslint/lib/file-finder.js +++ b/tools/eslint/lib/file-finder.js @@ -2,6 +2,8 @@ * @fileoverview Util class to find config files. * @author Aliaksei Shytkin * @copyright 2014 Michael McLaughlin. All rights reserved. + * @copyright 2014 Aliaksei Shytkin. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -54,13 +56,14 @@ function FileFinder() { * @param {string} directory The directory to start the search from. * @returns {string} Path of the file found, or an empty string if not found. */ -FileFinder.prototype.findInDirectoryOrParents = function (directory) { +FileFinder.prototype.findInDirectoryOrParents = function(directory) { var cache = this.cache, child, dirs, filePath, i, name, + names, searched; if (!directory) { @@ -74,20 +77,26 @@ FileFinder.prototype.findInDirectoryOrParents = function (directory) { dirs = []; searched = 0; name = this.fileNames[0]; + names = Array.isArray(name) ? name : [name]; - while (directory !== child) { - dirs[searched++] = directory; + (function() { + while (directory !== child) { + dirs[searched++] = directory; - if (getDirectoryEntries(directory).indexOf(name) !== -1 && fs.statSync(path.resolve(directory, name)).isFile()) { - filePath = path.resolve(directory, name); - break; - } + for (var k = 0, found = false; k < names.length && !found; k++) { - child = directory; + if (getDirectoryEntries(directory).indexOf(names[k]) !== -1 && fs.statSync(path.resolve(directory, names[k])).isFile()) { + filePath = path.resolve(directory, names[k]); + return; + } + } - // Assign parent directory to directory. - directory = path.dirname(directory); - } + child = directory; + + // Assign parent directory to directory. + directory = path.dirname(directory); + } + }()); for (i = 0; i < searched; i++) { cache[dirs[i]] = filePath; @@ -105,7 +114,7 @@ FileFinder.prototype.findInDirectoryOrParents = function (directory) { * @param {string} directory The directory to start the search from. * @returns {string[]} The file paths found. */ -FileFinder.prototype.findAllInDirectoryAndParents = function (directory) { +FileFinder.prototype.findAllInDirectoryAndParents = function(directory) { var cache = this.cache, child, dirs, @@ -137,14 +146,24 @@ FileFinder.prototype.findAllInDirectoryAndParents = function (directory) { for (i = 0; i < fileNamesCount; i++) { name = fileNames[i]; - if (getDirectoryEntries(directory).indexOf(name) !== -1 && fs.statSync(path.resolve(directory, name)).isFile()) { - filePath = path.resolve(directory, name); + // convert to an array for easier handling + if (!Array.isArray(name)) { + name = [name]; + } - // Add the file path to the cache of each directory searched. - for (j = 0; j < searched; j++) { - cache[dirs[j]].push(filePath); + for (var k = 0, found = false; k < name.length && !found; k++) { + + if (getDirectoryEntries(directory).indexOf(name[k]) !== -1 && fs.statSync(path.resolve(directory, name[k])).isFile()) { + filePath = path.resolve(directory, name[k]); + found = true; + + // Add the file path to the cache of each directory searched. + for (j = 0; j < searched; j++) { + cache[dirs[j]].push(filePath); + } } } + } child = directory; diff --git a/tools/eslint/lib/formatters/checkstyle.js b/tools/eslint/lib/formatters/checkstyle.js index 5e98c8b1312b6d..dc40a2a3fe56ae 100644 --- a/tools/eslint/lib/formatters/checkstyle.js +++ b/tools/eslint/lib/formatters/checkstyle.js @@ -8,6 +8,12 @@ // Helper Functions //------------------------------------------------------------------------------ +/** + * Returns the severity of warning or error + * @param {object} message message object to examine + * @returns {string} severity level + * @private + */ function getMessageType(message) { if (message.fatal || message.severity === 2) { return "error"; @@ -16,6 +22,12 @@ function getMessageType(message) { } } +/** + * Returns the escaped value for a character + * @param {string} s string to examine + * @returns {string} severity level + * @private + */ function xmlEscape(s) { return ("" + s).replace(/[<>&"']/g, function(c) { switch (c) { @@ -55,7 +67,8 @@ module.exports = function(results) { "column=\"" + xmlEscape(message.column) + "\" " + "severity=\"" + xmlEscape(getMessageType(message)) + "\" " + "message=\"" + xmlEscape(message.message) + - (message.ruleId ? " (" + message.ruleId + ")" : "") + "\" />"; + (message.ruleId ? " (" + message.ruleId + ")" : "") + "\" " + + "source=\"" + (message.ruleId ? xmlEscape("eslint.rules." + message.ruleId) : "") + "\" />"; }); output += ""; diff --git a/tools/eslint/lib/formatters/compact.js b/tools/eslint/lib/formatters/compact.js index b7c2fc7e25f4cf..f1eb83aec35f39 100644 --- a/tools/eslint/lib/formatters/compact.js +++ b/tools/eslint/lib/formatters/compact.js @@ -8,6 +8,12 @@ // Helper Functions //------------------------------------------------------------------------------ +/** + * Returns the severity of warning or error + * @param {object} message message object to examine + * @returns {string} severity level + * @private + */ function getMessageType(message) { if (message.fatal || message.severity === 2) { return "Error"; diff --git a/tools/eslint/lib/formatters/html-template.html b/tools/eslint/lib/formatters/html-template.html new file mode 100644 index 00000000000000..f63a0a815b06b6 --- /dev/null +++ b/tools/eslint/lib/formatters/html-template.html @@ -0,0 +1,130 @@ + + + ESLint Report + + + +
+

ESLint Report

+
+ {{renderText totalErrors totalWarnings}} - Generated on {{date}} +
+
+ + + {{#each results}} + + + + {{#each this.messages}} + + + {{getSeverity this.severity}} + + + + {{/each}} + {{/each}} + +
+ [+] {{this.filePath}} + {{renderText this.errorCount this.warningCount}} +
+ + + \ No newline at end of file diff --git a/tools/eslint/lib/formatters/html.js b/tools/eslint/lib/formatters/html.js new file mode 100644 index 00000000000000..435894d208b42e --- /dev/null +++ b/tools/eslint/lib/formatters/html.js @@ -0,0 +1,88 @@ +/** + * @fileoverview HTML reporter + * @author Julian Laval + * @copyright 2015 Julian Laval. All rights reserved. + */ +"use strict"; + +var handlebars = require("handlebars").create(); +var fs = require("fs"); +var path = require("path"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Given a word and a count, append an s if count is not one. + * @param {string} word A word in its singular form. + * @param {int} count A number controlling whether word should be pluralized. + * @returns {string} The original word with an s on the end if count is not one. + */ +function pluralize(word, count) { + return (count === 1 ? word : word + "s"); +} + +/** + * Renders text along the template of x problems (x errors, x warnings) + * @param {string} totalErrors Total errors + * @param {string} totalWarnings Total warnings + * @returns {string} The formatted string, pluralized where necessary + */ +handlebars.registerHelper("renderText", function(totalErrors, totalWarnings) { + var totalProblems = totalErrors + totalWarnings; + var renderedText = totalProblems + " " + pluralize("problem", totalProblems); + if (totalProblems !== 0) { + renderedText += " (" + totalErrors + " " + pluralize("error", totalErrors) + ", " + totalWarnings + " " + pluralize("warning", totalWarnings) + ")"; + } + return renderedText; +}); + +/** + * Get the color based on whether there are errors/warnings... + * @param {string} totalErrors Total errors + * @param {string} totalWarnings Total warnings + * @returns {int} The color code (0 = green, 1 = yellow, 2 = red) + */ +handlebars.registerHelper("getColor", function(totalErrors, totalWarnings) { + if (totalErrors !== 0) { + return 2; + } else if (totalWarnings !== 0) { + return 1; + } + return 0; +}); + +/** + * Get the HTML row content based on the severity of the message + * @param {int} severity Severity of the message + * @returns {string} The generated HTML row + */ +handlebars.registerHelper("getSeverity", function(severity) { + // Return warning else error + return new handlebars.SafeString((severity === 1) ? "Warning" : "Error"); +}); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + var template = fs.readFileSync(path.join(__dirname, "html-template.html"), "utf-8"); + + var data = { + date: new Date(), + totalErrors: 0, + totalWarnings: 0, + results: results + }; + + // Iterate over results to get totals + results.forEach(function(result) { + data.totalErrors += result.errorCount; + data.totalWarnings += result.warningCount; + }); + + return handlebars.compile(template)(data); +}; diff --git a/tools/eslint/lib/formatters/json.js b/tools/eslint/lib/formatters/json.js new file mode 100644 index 00000000000000..c1101970efa468 --- /dev/null +++ b/tools/eslint/lib/formatters/json.js @@ -0,0 +1,14 @@ +/** + * @fileoverview JSON reporter + * @author Burak Yigit Kaya aka BYK + * @copyright 2015 Burak Yigit Kaya. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + return JSON.stringify(results); +}; diff --git a/tools/eslint/lib/formatters/junit.js b/tools/eslint/lib/formatters/junit.js index 7ee94135f6a84f..3d4a1db19cf8ec 100644 --- a/tools/eslint/lib/formatters/junit.js +++ b/tools/eslint/lib/formatters/junit.js @@ -10,6 +10,12 @@ var xmlescape = require("xml-escape"); // Helper Functions //------------------------------------------------------------------------------ +/** + * Returns the severity of warning or error + * @param {object} message message object to examine + * @returns {string} severity level + * @private + */ function getMessageType(message) { if (message.fatal || message.severity === 2) { return "Error"; diff --git a/tools/eslint/lib/formatters/unix.js b/tools/eslint/lib/formatters/unix.js new file mode 100644 index 00000000000000..2782b0cd0e3568 --- /dev/null +++ b/tools/eslint/lib/formatters/unix.js @@ -0,0 +1,59 @@ +/** + * @fileoverview unix-style formatter. + * @author oshi-shinobu + * @copyright 2015 oshi-shinobu. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ + +/** + * Returns a canonical error level string based upon the error message passed in. + * @param {object} message Individual error message provided by eslint + * @returns {String} Error level string + */ +function getMessageType(message) { + if (message.fatal || message.severity === 2) { + return "Error"; + } else { + return "Warning"; + } +} + + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + var output = "", + total = 0; + + results.forEach(function(result) { + + var messages = result.messages; + total += messages.length; + + messages.forEach(function(message) { + + output += result.filePath + ":"; + output += (message.line || 0) + ":"; + output += (message.column || 0) + ":"; + output += " " + message.message + " "; + output += "[" + getMessageType(message) + + (message.ruleId ? "/" + message.ruleId : "") + "]"; + output += "\n"; + + }); + + }); + + if (total > 0) { + output += "\n" + total + " problem" + (total !== 1 ? "s" : ""); + } + + return output; +}; diff --git a/tools/eslint/lib/ignored-paths.js b/tools/eslint/lib/ignored-paths.js index 6d57da2776d16c..cbf67488c5ef5c 100644 --- a/tools/eslint/lib/ignored-paths.js +++ b/tools/eslint/lib/ignored-paths.js @@ -35,6 +35,12 @@ var ESLINT_IGNORE_FILENAME = ".eslintignore"; function loadIgnoreFile(filepath) { var ignorePatterns = []; + /** + * Check if string is not empty + * @param {string} line string to examine + * @returns {boolean} True is its not empty + * @private + */ function nonEmpty(line) { return line.trim() !== "" && line[0] !== "#"; } @@ -85,7 +91,7 @@ function IgnoredPaths(patterns) { * @param {Object} options object containing 'ignore' and 'ignorePath' properties * @returns {IgnoredPaths} object, with patterns loaded from the ignore file */ -IgnoredPaths.load = function (options) { +IgnoredPaths.load = function(options) { var patterns; options = options || {}; @@ -97,7 +103,7 @@ IgnoredPaths.load = function (options) { } if (options.ignorePattern) { - patterns.push(options.ignorePattern); + patterns = patterns.concat(options.ignorePattern); } return new IgnoredPaths(patterns); @@ -108,7 +114,7 @@ IgnoredPaths.load = function (options) { * @param {string} filepath Path to check * @returns {boolean} true if the file path matches one or more patterns, false otherwise */ -IgnoredPaths.prototype.contains = function (filepath) { +IgnoredPaths.prototype.contains = function(filepath) { if (this.patterns === null) { throw new Error("No ignore patterns loaded, call 'load' first"); } diff --git a/tools/eslint/lib/load-rules.js b/tools/eslint/lib/load-rules.js index 62183f344d3b68..68bf144cc705af 100644 --- a/tools/eslint/lib/load-rules.js +++ b/tools/eslint/lib/load-rules.js @@ -33,7 +33,7 @@ module.exports = function(rulesDir) { if (path.extname(file) !== ".js") { return; } - rules[file.slice(0, -3)] = require(path.join(rulesDir, file)); + rules[file.slice(0, -3)] = path.join(rulesDir, file); }); return rules; }; diff --git a/tools/eslint/lib/logging.js b/tools/eslint/lib/logging.js new file mode 100644 index 00000000000000..b5e7260519dc72 --- /dev/null +++ b/tools/eslint/lib/logging.js @@ -0,0 +1,25 @@ +/** + * @fileoverview Handle logging for Eslint + * @author Gyandeep Singh + * @copyright 2015 Gyandeep Singh. All rights reserved. + */ +"use strict"; + +/* istanbul ignore next */ +module.exports = { + /** + * Cover for console.log + * @returns {void} + */ + info: function() { + console.log.apply(console, Array.prototype.slice.call(arguments)); + }, + + /** + * Cover for console.error + * @returns {void} + */ + error: function() { + console.error.apply(console, Array.prototype.slice.call(arguments)); + } +}; diff --git a/tools/eslint/lib/options.js b/tools/eslint/lib/options.js index 58111090b6e191..3fee3854b0c4b3 100644 --- a/tools/eslint/lib/options.js +++ b/tools/eslint/lib/options.js @@ -1,6 +1,7 @@ /** * @fileoverview Options configuration for optionator. * @author George Zahariev + * See LICENSE in root directory for full license. */ "use strict"; @@ -19,114 +20,190 @@ module.exports = optionator({ prepend: "eslint [options] file.js [file.js] [dir]", concatRepeatedArrays: true, mergeRepeatedObjects: true, - options: [{ - heading: "Options" - }, { - option: "help", - alias: "h", - type: "Boolean", - description: "Show help" - }, { - option: "config", - alias: "c", - type: "path::String", - description: "Use configuration from this file" - }, { - option: "rulesdir", - type: "[path::String]", - description: "Use additional rules from this directory" - }, { - option: "format", - alias: "f", - type: "String", - default: "stylish", - description: "Use a specific output format" - }, { - option: "version", - alias: "v", - type: "Boolean", - description: "Outputs the version number" - }, { - option: "reset", - type: "Boolean", - default: "false", - description: "Set all default rules to off" - }, { - option: "eslintrc", - type: "Boolean", - default: "true", - description: "Disable use of configuration from .eslintrc" - }, { - option: "env", - type: "[String]", - description: "Specify environments" - }, { - option: "ext", - type: "[String]", - default: ".js", - description: "Specify JavaScript file extensions" - }, { - option: "plugin", - type: "[String]", - description: "Specify plugins" - }, { - option: "global", - type: "[String]", - description: "Define global variables" - }, { - option: "rule", - type: "Object", - description: "Specify rules" - }, - { - option: "ignore-path", - type: "path::String", - description: "Specify path of ignore file" - }, - { - option: "ignore", - type: "Boolean", - default: "true", - description: "Disable use of .eslintignore" - }, - { - option: "ignore-pattern", - type: "String", - description: "Pattern of files to ignore (in addition to those in .eslintignore)" - }, - { - option: "color", - type: "Boolean", - default: "true", - description: "Disable color in piped output" - }, - { - option: "output-file", - alias: "o", - type: "path::String", - description: "Specify file to write report to" - }, - { - option: "quiet", - type: "Boolean", - default: "false", - description: "Report errors only" - }, - { - option: "stdin", - type: "Boolean", - default: "false", - description: "Lint code provided on " - }, - { - option: "stdin-filename", - type: "String", - description: "Specify filename to process STDIN as" - }, - { - option: "init", - type: "Boolean", - default: "false", - description: "Run config initialization wizard" - }] + options: [ + { + heading: "Basic configuration" + }, + { + option: "config", + alias: "c", + type: "path::String", + description: "Use configuration from this file or shareable config" + }, + { + option: "eslintrc", + type: "Boolean", + default: "true", + description: "Disable use of configuration from .eslintrc" + }, + { + option: "env", + type: "[String]", + description: "Specify environments" + }, + { + option: "ext", + type: "[String]", + default: ".js", + description: "Specify JavaScript file extensions" + }, + { + option: "global", + type: "[String]", + description: "Define global variables" + }, + { + option: "parser", + type: "String", + default: "espree", + description: "Specify the parser to be used" + }, + { + heading: "Caching" + }, + { + option: "cache", + type: "Boolean", + default: "false", + description: "Only check changed files" + }, + { + option: "cache-file", + type: "path::String", + default: ".eslintcache", + description: "Path to the cache file. Deprecated: use --cache-location" + }, + { + option: "cache-location", + type: "path::String", + description: "Path to the cache file or directory" + }, + { + heading: "Specifying rules and plugins" + }, + { + option: "rulesdir", + type: "[path::String]", + description: "Use additional rules from this directory" + }, + { + option: "plugin", + type: "[String]", + description: "Specify plugins" + }, + { + option: "rule", + type: "Object", + description: "Specify rules" + }, + { + heading: "Ignoring files" + }, + { + option: "ignore-path", + type: "path::String", + description: "Specify path of ignore file" + }, + { + option: "ignore", + type: "Boolean", + default: "true", + description: "Disable use of .eslintignore" + }, + { + option: "ignore-pattern", + type: "[String]", + description: "Pattern of files to ignore (in addition to those in .eslintignore)" + }, + { + heading: "Using stdin" + }, + { + option: "stdin", + type: "Boolean", + default: "false", + description: "Lint code provided on " + }, + { + option: "stdin-filename", + type: "String", + description: "Specify filename to process STDIN as" + }, + { + heading: "Handling warnings" + }, + { + option: "quiet", + type: "Boolean", + default: "false", + description: "Report errors only" + }, + { + option: "max-warnings", + type: "Number", + default: "-1", + description: "Number of warnings to trigger nonzero exit code" + }, + { + heading: "Output" + }, + { + option: "output-file", + alias: "o", + type: "path::String", + description: "Specify file to write report to" + }, + { + option: "format", + alias: "f", + type: "String", + default: "stylish", + description: "Use a specific output format" + }, + { + option: "color", + type: "Boolean", + default: "true", + description: "Disable color in piped output" + }, + { + heading: "Miscellaneous" + }, + { + option: "init", + type: "Boolean", + default: "false", + description: "Run config initialization wizard" + }, + { + option: "fix", + type: "Boolean", + default: false, + description: "Automatically fix problems" + }, + { + option: "debug", + type: "Boolean", + default: false, + description: "Output debugging information" + }, + { + option: "help", + alias: "h", + type: "Boolean", + description: "Show help" + }, + { + option: "version", + alias: "v", + type: "Boolean", + description: "Outputs the version number" + }, + { + option: "inline-config", + type: "Boolean", + default: "true", + description: "Allow comments to change eslint config/rules" + } + ] }); diff --git a/tools/eslint/lib/rule-context.js b/tools/eslint/lib/rule-context.js index 0513685f6d6acb..847f2fb788107f 100644 --- a/tools/eslint/lib/rule-context.js +++ b/tools/eslint/lib/rule-context.js @@ -1,37 +1,61 @@ /** * @fileoverview RuleContext utility for rules * @author Nicholas C. Zakas + * @copyright 2013 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var RuleFixer = require("./util/rule-fixer"); + //------------------------------------------------------------------------------ // Constants //------------------------------------------------------------------------------ var PASSTHROUGHS = [ - "getAllComments", - "getAncestors", - "getComments", - "getFilename", - "getFirstToken", - "getFirstTokens", - "getJSDocComment", - "getLastToken", - "getLastTokens", - "getNodeByRangeIndex", - "getScope", - "getSource", - "getSourceLines", - "getTokenAfter", - "getTokenBefore", - "getTokenByRangeStart", - "getTokens", - "getTokensAfter", - "getTokensBefore", - "getTokensBetween", - "markVariableAsUsed", - "isMarkedAsUsed" - ]; + "getAllComments", + "getAncestors", + "getComments", + "getDeclaredVariables", + "getFilename", + "getFirstToken", + "getFirstTokens", + "getJSDocComment", + "getLastToken", + "getLastTokens", + "getNodeByRangeIndex", + "getScope", + "getSource", + "getSourceLines", + "getTokenAfter", + "getTokenBefore", + "getTokenByRangeStart", + "getTokens", + "getTokensAfter", + "getTokensBefore", + "getTokensBetween", + "markVariableAsUsed", + "isMarkedAsUsed" +]; + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** + * An error message description + * @typedef {Object} MessageDescriptor + * @property {string} nodeType The type of node. + * @property {Location} loc The location of the problem. + * @property {string} message The problem message. + * @property {Object} [data] Optional data to use to fill in placeholders in the + * message. + * @property {Function} fix The function to call that creates a fix command. + */ //------------------------------------------------------------------------------ // Rule Definition @@ -87,15 +111,47 @@ function RuleContext(ruleId, eslint, severity, options, settings, ecmaFeatures) /** * Passthrough to eslint.report() that automatically assigns the rule ID and severity. - * @param {ASTNode} node The AST node related to the message. + * @param {ASTNode|MessageDescriptor} nodeOrDescriptor The AST node related to the message or a message + * descriptor. * @param {Object=} location The location of the error. * @param {string} message The message to display to the user. * @param {Object} opts Optional template data which produces a formatted message * with symbols being replaced by this object's values. * @returns {void} */ - this.report = function(node, location, message, opts) { - eslint.report(ruleId, severity, node, location, message, opts); + this.report = function(nodeOrDescriptor, location, message, opts) { + + var descriptor, + fix = null; + + // check to see if it's a new style call + if (arguments.length === 1) { + descriptor = nodeOrDescriptor; + + // if there's a fix specified, get it + if (typeof descriptor.fix === "function") { + fix = descriptor.fix(new RuleFixer()); + } + + eslint.report( + ruleId, severity, descriptor.node, + descriptor.loc || descriptor.node.loc.start, + descriptor.message, descriptor.data, fix + ); + + return; + } + + // old style call + eslint.report(ruleId, severity, nodeOrDescriptor, location, message, opts); + }; + + /** + * Passthrough to eslint.getSourceCode(). + * @returns {SourceCode} The SourceCode object for the code. + */ + this.getSourceCode = function() { + return eslint.getSourceCode(); }; } diff --git a/tools/eslint/lib/rules.js b/tools/eslint/lib/rules.js index eef942fcf15473..aafdbafefd18f7 100644 --- a/tools/eslint/lib/rules.js +++ b/tools/eslint/lib/rules.js @@ -31,8 +31,6 @@ function define(ruleId, ruleModule) { rules[ruleId] = ruleModule; } -exports.define = define; - /** * Loads and registers all rules from passed rules directory. * @param {String} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`. @@ -45,39 +43,49 @@ function load(rulesDir) { }); } -exports.load = load; - /** * Registers all given rules of a plugin. * @param {Object} pluginRules A key/value map of rule definitions. * @param {String} pluginName The name of the plugin without prefix (`eslint-plugin-`). * @returns {void} */ -exports.import = function (pluginRules, pluginName) { - Object.keys(pluginRules).forEach(function (ruleId) { +function importPlugin(pluginRules, pluginName) { + Object.keys(pluginRules).forEach(function(ruleId) { var qualifiedRuleId = pluginName + "/" + ruleId, rule = pluginRules[ruleId]; define(qualifiedRuleId, rule); }); -}; +} /** * Access rule handler by id (file name). * @param {String} ruleId Rule id (file name). * @returns {Function} Rule handler. */ -exports.get = function(ruleId) { - return rules[ruleId]; -}; +function get(ruleId) { + if (typeof rules[ruleId] === "string") { + return require(rules[ruleId]); + } else { + return rules[ruleId]; + } +} /** * Reset rules storage. * Should be used only in tests. * @returns {void} */ -exports.testClear = function() { +function testClear() { rules = Object.create(null); +} + +module.exports = { + define: define, + load: load, + import: importPlugin, + get: get, + testClear: testClear }; //------------------------------------------------------------------------------ diff --git a/tools/eslint/lib/rules/accessor-pairs.js b/tools/eslint/lib/rules/accessor-pairs.js index 42734acf9a2fa5..e15ab3bef34374 100644 --- a/tools/eslint/lib/rules/accessor-pairs.js +++ b/tools/eslint/lib/rules/accessor-pairs.js @@ -6,6 +6,62 @@ "use strict"; +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is an `Identifier` node which was named a given name. + * @param {ASTNode} node - A node to check. + * @param {string} name - An expected name of the node. + * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected. + */ +function isIdentifier(node, name) { + return node.type === "Identifier" && node.name === name; +} + +/** + * Checks whether or not a given node is an argument of a specified method call. + * @param {ASTNode} node - A node to check. + * @param {number} index - An expected index of the node in arguments. + * @param {string} object - An expected name of the object of the method. + * @param {string} property - An expected name of the method. + * @returns {boolean} `true` if the node is an argument of the specified method call. + */ +function isArgumentOfMethodCall(node, index, object, property) { + var parent = node.parent; + return ( + parent.type === "CallExpression" && + parent.callee.type === "MemberExpression" && + parent.callee.computed === false && + isIdentifier(parent.callee.object, object) && + isIdentifier(parent.callee.property, property) && + parent.arguments[index] === node + ); +} + +/** + * Checks whether or not a given node is a property descriptor. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a property descriptor. + */ +function isPropertyDescriptor(node) { + // Object.defineProperty(obj, "foo", {set: ...}) + if (isArgumentOfMethodCall(node, 2, "Object", "defineProperty") || + isArgumentOfMethodCall(node, 2, "Reflect", "defineProperty") + ) { + return true; + } + + // Object.defineProperties(obj, {foo: {set: ...}}) + // Object.create(proto, {foo: {set: ...}}) + node = node.parent.parent; + return node.type === "ObjectExpression" && ( + isArgumentOfMethodCall(node, 1, "Object", "create") || + isArgumentOfMethodCall(node, 1, "Object", "defineProperties") + ); +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -24,10 +80,19 @@ module.exports = function(context) { function checkLonelySetGet(node) { var isSetPresent = false; var isGetPresent = false; - var propLength = node.properties.length; + var isDescriptor = isPropertyDescriptor(node); - for (var i = 0; i < propLength; i++) { - var propToCheck = node.properties[i].kind === "init" ? node.properties[i].key.name : node.properties[i].kind; + for (var i = 0, end = node.properties.length; i < end; i++) { + var property = node.properties[i]; + + var propToCheck = ""; + if (property.kind === "init") { + if (isDescriptor && !property.computed) { + propToCheck = property.key.name; + } + } else { + propToCheck = property.kind; + } switch (propToCheck) { case "set": @@ -55,7 +120,7 @@ module.exports = function(context) { } return { - "ObjectExpression": function (node) { + "ObjectExpression": function(node) { if (checkSetWithoutGet || checkGetWithoutSet) { checkLonelySetGet(node); } @@ -63,3 +128,18 @@ module.exports = function(context) { }; }; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "getWithoutSet": { + "type": "boolean" + }, + "setWithoutGet": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/array-bracket-spacing.js b/tools/eslint/lib/rules/array-bracket-spacing.js index eaec76e294d08d..25c8ac3936032b 100644 --- a/tools/eslint/lib/rules/array-bracket-spacing.js +++ b/tools/eslint/lib/rules/array-bracket-spacing.js @@ -8,12 +8,15 @@ */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - var spaced = context.options[0] === "always"; + var spaced = context.options[0] === "always", + sourceCode = context.getSourceCode(); /** * Determines whether an option is set, relative to the spacing option. @@ -23,7 +26,7 @@ module.exports = function(context) { * @returns {boolean} Whether or not the property is excluded. */ function isOptionSet(option) { - return context.options[1] != null ? context.options[1][option] === !spaced : false; + return context.options[1] ? context.options[1][option] === !spaced : false; } var options = { @@ -37,26 +40,6 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Determines whether two adjacent tokens are on the same line. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not the tokens are on the same line. - */ - function isSameLine(left, right) { - return left.loc.start.line === right.loc.start.line; - } - /** * Reports that there shouldn't be a space after the first token * @param {ASTNode} node - The node to report in the event of an error. @@ -64,8 +47,15 @@ module.exports = function(context) { * @returns {void} */ function reportNoBeginningSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space after '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "There should be no space after '" + token.value + "'", + fix: function(fixer) { + var nextToken = context.getSourceCode().getTokenAfter(token); + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); } /** @@ -75,8 +65,15 @@ module.exports = function(context) { * @returns {void} */ function reportNoEndingSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space before '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "There should be no space before '" + token.value + "'", + fix: function(fixer) { + var previousToken = context.getSourceCode().getTokenBefore(token); + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); } /** @@ -86,8 +83,14 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredBeginningSpace(node, token) { - context.report(node, token.loc.start, - "A space is required after '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "A space is required after '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); } /** @@ -97,8 +100,32 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredEndingSpace(node, token) { - context.report(node, token.loc.start, - "A space is required before '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "A space is required before '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + + /** + * Determines if a node is an object type + * @param {ASTNode} node - The node to check. + * @returns {boolean} Whether or not the node is an object type. + */ + function isObjectType(node) { + return node && (node.type === "ObjectExpression" || node.type === "ObjectPattern"); + } + + /** + * Determines if a node is an array type + * @param {ASTNode} node - The node to check. + * @returns {boolean} Whether or not the node is an array type. + */ + function isArrayType(node) { + return node && (node.type === "ArrayExpression" || node.type === "ArrayPattern"); } /** @@ -107,41 +134,43 @@ module.exports = function(context) { * @returns {void} */ function validateArraySpacing(node) { - if (node.elements.length === 0) { + if (options.spaced && node.elements.length === 0) { return; } var first = context.getFirstToken(node), second = context.getFirstToken(node, 1), penultimate = context.getLastToken(node, 1), - last = context.getLastToken(node); + last = context.getLastToken(node), + firstElement = node.elements[0], + lastElement = node.elements[node.elements.length - 1]; var openingBracketMustBeSpaced = - options.objectsInArraysException && second.value === "{" || - options.arraysInArraysException && second.value === "[" || + options.objectsInArraysException && isObjectType(firstElement) || + options.arraysInArraysException && isArrayType(firstElement) || options.singleElementException && node.elements.length === 1 ? !options.spaced : options.spaced; var closingBracketMustBeSpaced = - options.objectsInArraysException && penultimate.value === "}" || - options.arraysInArraysException && penultimate.value === "]" || + options.objectsInArraysException && isObjectType(lastElement) || + options.arraysInArraysException && isArrayType(lastElement) || options.singleElementException && node.elements.length === 1 ? !options.spaced : options.spaced; - if (isSameLine(first, second)) { - if (openingBracketMustBeSpaced && !isSpaced(first, second)) { + if (astUtils.isTokenOnSameLine(first, second)) { + if (openingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(first, second)) { reportRequiredBeginningSpace(node, first); } - if (!openingBracketMustBeSpaced && isSpaced(first, second)) { + if (!openingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(first, second)) { reportNoBeginningSpace(node, first); } } - if (isSameLine(penultimate, last)) { - if (closingBracketMustBeSpaced && !isSpaced(penultimate, last)) { + if (first !== penultimate && astUtils.isTokenOnSameLine(penultimate, last)) { + if (closingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(penultimate, last)) { reportRequiredEndingSpace(node, last); } - if (!closingBracketMustBeSpaced && isSpaced(penultimate, last)) { + if (!closingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(penultimate, last)) { reportNoEndingSpace(node, last); } } diff --git a/tools/eslint/lib/rules/arrow-body-style.js b/tools/eslint/lib/rules/arrow-body-style.js new file mode 100644 index 00000000000000..92c8dc33a33ee7 --- /dev/null +++ b/tools/eslint/lib/rules/arrow-body-style.js @@ -0,0 +1,71 @@ +/** + * @fileoverview Rule to require braces in arrow function body. + * @author Alberto Rodríguez + * @copyright 2015 Alberto Rodríguez. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var always = context.options[0] === "always"; + var asNeeded = !context.options[0] || context.options[0] === "as-needed"; + + /** + * Determines whether a arrow function body needs braces + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function validate(node) { + var arrowBody = node.body; + if (arrowBody.type === "BlockStatement") { + var blockBody = arrowBody.body; + + if (blockBody.length > 1) { + return; + } + + if (blockBody.length === 0) { + var hasComments = context.getComments(arrowBody).trailing.length > 0; + if (hasComments) { + return; + } + + context.report({ + node: node, + loc: arrowBody.loc.start, + message: "Unexpected empty block in arrow body." + }); + } else { + if (asNeeded && blockBody[0].type === "ReturnStatement") { + context.report({ + node: node, + loc: arrowBody.loc.start, + message: "Unexpected block statement surrounding arrow body." + }); + } + } + } else { + if (always) { + context.report({ + node: node, + loc: arrowBody.loc.start, + message: "Expected block statement surrounding arrow body." + }); + } + } + } + + return { + "ArrowFunctionExpression": validate + }; +}; + +module.exports.schema = [ + { + "enum": ["always", "as-needed"] + } +]; diff --git a/tools/eslint/lib/rules/arrow-parens.js b/tools/eslint/lib/rules/arrow-parens.js new file mode 100644 index 00000000000000..2332dda12134c2 --- /dev/null +++ b/tools/eslint/lib/rules/arrow-parens.js @@ -0,0 +1,52 @@ +/** + * @fileoverview Rule to require parens in arrow function arguments. + * @author Jxck + * @copyright 2015 Jxck. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var message = "Expected parentheses around arrow function argument."; + var asNeededMessage = "Unexpected parentheses around single function argument"; + var asNeeded = context.options[0] === "as-needed"; + + /** + * Determines whether a arrow function argument end with `)` + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function parens(node) { + var token = context.getFirstToken(node); + + // as-needed: x => x + if (asNeeded && node.params.length === 1 && node.params[0].type === "Identifier") { + if (token.type === "Punctuator" && token.value === "(") { + context.report(node, asNeededMessage); + } + return; + } + + if (token.type === "Identifier") { + var after = context.getTokenAfter(token); + + // (x) => x + if (after.value !== ")") { + context.report(node, message); + } + } + } + + return { + "ArrowFunctionExpression": parens + }; +}; + +module.exports.schema = [ + { + "enum": ["always", "as-needed"] + } +]; diff --git a/tools/eslint/lib/rules/arrow-spacing.js b/tools/eslint/lib/rules/arrow-spacing.js new file mode 100644 index 00000000000000..c1b1d73fea21db --- /dev/null +++ b/tools/eslint/lib/rules/arrow-spacing.js @@ -0,0 +1,124 @@ +/** + * @fileoverview Rule to require parens in arrow function arguments. + * @author Jxck + * @copyright 2015 Jxck. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + // merge rules with default + var rule = { before: true, after: true }; + var option = context.options[0] || {}; + rule.before = option.before !== false; + rule.after = option.after !== false; + + /** + * Get tokens of arrow(`=>`) and before/after arrow. + * @param {ASTNode} node The arrow function node. + * @returns {Object} Tokens of arrow and before/after arrow. + */ + function getTokens(node) { + var t = context.getFirstToken(node); + var before; + while (t.type !== "Punctuator" || t.value !== "=>") { + before = t; + t = context.getTokenAfter(t); + } + var after = context.getTokenAfter(t); + return { before: before, arrow: t, after: after }; + } + + /** + * Count spaces before/after arrow(`=>`) token. + * @param {Object} tokens Tokens before/after arrow. + * @returns {Object} count of space before/after arrow. + */ + function countSpaces(tokens) { + var before = tokens.arrow.range[0] - tokens.before.range[1]; + var after = tokens.after.range[0] - tokens.arrow.range[1]; + return { before: before, after: after }; + } + + /** + * Determines whether space(s) before after arrow(`=>`) is satisfy rule. + * if before/after value is `true`, there should be space(s). + * if before/after value is `false`, there should be no space. + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function spaces(node) { + var tokens = getTokens(node); + var countSpace = countSpaces(tokens); + + if (rule.before) { + // should be space(s) before arrow + if (countSpace.before === 0) { + context.report({ + node: tokens.before, + message: "Missing space before =>", + fix: function(fixer) { + return fixer.insertTextBefore(tokens.arrow, " "); + } + }); + } + } else { + // should be no space before arrow + if (countSpace.before > 0) { + context.report({ + node: tokens.before, + message: "Unexpected space before =>", + fix: function(fixer) { + return fixer.removeRange([tokens.before.range[1], tokens.arrow.range[0]]); + } + }); + } + } + + if (rule.after) { + // should be space(s) after arrow + if (countSpace.after === 0) { + context.report({ + node: tokens.after, + message: "Missing space after =>", + fix: function(fixer) { + return fixer.insertTextAfter(tokens.arrow, " "); + } + }); + } + } else { + // should be no space after arrow + if (countSpace.after > 0) { + context.report({ + node: tokens.after, + message: "Unexpected space after =>", + fix: function(fixer) { + return fixer.removeRange([tokens.arrow.range[1], tokens.after.range[0]]); + } + }); + } + } + } + + return { + "ArrowFunctionExpression": spaces + }; +}; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "before": { + "type": "boolean" + }, + "after": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/block-scoped-var.js b/tools/eslint/lib/rules/block-scoped-var.js index a463b12daf61bf..1c6b05538808ef 100644 --- a/tools/eslint/lib/rules/block-scoped-var.js +++ b/tools/eslint/lib/rules/block-scoped-var.js @@ -1,318 +1,140 @@ /** * @fileoverview Rule to check for "block scoped" variables by binding context * @author Matt DuVall + * @copyright 2015 Toru Nagashima. All rights reserved. + * @copyright 2015 Mathieu M-Gosselin. All rights reserved. */ "use strict"; //------------------------------------------------------------------------------ -// Rule Definition +// Helpers //------------------------------------------------------------------------------ -module.exports = function(context) { - - var scopeStack = []; - - //-------------------------------------------------------------------------- - // Helpers - //-------------------------------------------------------------------------- - - /** - * Determines whether an identifier is in declaration position or is a non-declaration reference. - * @param {ASTNode} id The identifier. - * @param {ASTNode} parent The identifier's parent AST node. - * @returns {Boolean} true when the identifier is in declaration position. - */ - function isDeclaration(id, parent) { - switch (parent.type) { - case "FunctionDeclaration": - case "FunctionExpression": - return parent.params.indexOf(id) > -1 || id === parent.id; - - case "VariableDeclarator": - return id === parent.id; +/** + * Collects unresolved references from the global scope, then creates a map to references from its name. + * @param {RuleContext} context - The current context. + * @returns {object} A map object. Its key is the variable names. Its value is the references of each variable. + */ +function collectUnresolvedReferences(context) { + var unresolved = Object.create(null); + var references = context.getScope().through; - case "CatchClause": - return id === parent.param; + for (var i = 0; i < references.length; ++i) { + var reference = references[i]; + var name = reference.identifier.name; - default: - return false; + if (name in unresolved === false) { + unresolved[name] = []; } + unresolved[name].push(reference); } - /** - * Determines whether an identifier is in property position. - * @param {ASTNode} id The identifier. - * @param {ASTNode} parent The identifier's parent AST node. - * @returns {Boolean} true when the identifier is in property position. - */ - function isProperty(id, parent) { - switch (parent.type) { - case "MemberExpression": - return id === parent.property && !parent.computed; + return unresolved; +} - case "Property": - return id === parent.key; - - default: - return false; - } - } +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ - /** - * Pushes a new scope object on the scope stack. - * @returns {void} - */ - function pushScope() { - scopeStack.push([]); - } +module.exports = function(context) { + var unresolvedReferences = Object.create(null); + var stack = []; /** - * Removes the topmost scope object from the scope stack. + * Makes a block scope. + * @param {ASTNode} node - A node of a scope. * @returns {void} */ - function popScope() { - scopeStack.pop(); + function enterScope(node) { + stack.push(node.range); } /** - * Declares the given names in the topmost scope object. - * @param {[String]} names A list of names to declare. + * Pops the last block scope. * @returns {void} */ - function declare(names) { - [].push.apply(scopeStack[scopeStack.length - 1], names); + function exitScope() { + stack.pop(); } - //-------------------------------------------------------------------------- - // Public API - //-------------------------------------------------------------------------- - /** - * Declares all relevant identifiers for module imports. - * @param {ASTNode} node The AST node representing an import. + * Reports a given reference. + * @param {escope.Reference} reference - A reference to report. * @returns {void} - * @private */ - function declareImports(node) { - declare([node.local.name]); - - if (node.imported && node.imported.name !== node.local.name) { - declare([node.imported.name]); - } + function report(reference) { + var identifier = reference.identifier; + context.report( + identifier, + "\"{{name}}\" used outside of binding context.", + {name: identifier.name}); } /** - * Declares all relevant identifiers for classes. - * @param {ASTNode} node The AST node representing a class. + * Finds and reports references which are outside of valid scopes. + * @param {ASTNode} node - A node to get variables. * @returns {void} - * @private */ - function declareClass(node) { - - if (node.id) { - declare([node.id.name]); + function checkForVariables(node) { + if (node.kind !== "var") { + return; } - pushScope(); - } - - /** - * Declares all relevant identifiers for classes. - * @param {ASTNode} node The AST node representing a class. - * @returns {void} - * @private - */ - function declareClassMethod(node) { - pushScope(); + var isGlobal = context.getScope().type === "global"; - declare([node.key.name]); - } + // Defines a predicate to check whether or not a given reference is outside of valid scope. + var scopeRange = stack[stack.length - 1]; - /** - * Add declarations based on the type of node being passed. - * @param {ASTNode} node The node containing declarations. - * @returns {void} - * @private - */ - function declareByNodeType(node) { - - var declarations = []; - - switch (node.type) { - case "Identifier": - declarations.push(node.name); - break; - - case "ObjectPattern": - node.properties.forEach(function(property) { - declarations.push(property.key.name); - if (property.value) { - declarations.push(property.value.name); - } - }); - break; - - case "ArrayPattern": - node.elements.forEach(function(element) { - if (element) { - declarations.push(element.name); - } - }); - break; - - case "AssignmentPattern": - declareByNodeType(node.left); - break; - - case "RestElement": - declareByNodeType(node.argument); - break; - - // no default + /** + * Check if a reference is out of scope + * @param {ASTNode} reference node to examine + * @returns {boolean} True is its outside the scope + * @private + */ + function isOutsideOfScope(reference) { + var idRange = reference.identifier.range; + return idRange[0] < scopeRange[0] || idRange[1] > scopeRange[1]; } - declare(declarations); + // Gets declared variables, and checks its references. + var variables = context.getDeclaredVariables(node); + for (var i = 0; i < variables.length; ++i) { + var variable = variables[i]; + var references = variable.references; - } - - /** - * Adds declarations of the function parameters and pushes the scope - * @param {ASTNode} node The node containing declarations. - * @returns {void} - * @private - */ - function functionHandler(node) { - pushScope(); - - node.params.forEach(function(param) { - declareByNodeType(param); - }); - - declare(node.rest ? [node.rest.name] : []); - declare(["arguments"]); - } - - /** - * Adds declaration of the function name in its parent scope then process the function - * @param {ASTNode} node The node containing declarations. - * @returns {void} - * @private - */ - function functionDeclarationHandler(node) { - declare(node.id ? [node.id.name] : []); - functionHandler(node); - } - - /** - * Process function declarations and declares its name in its own scope - * @param {ASTNode} node The node containing declarations. - * @returns {void} - * @private - */ - function functionExpressionHandler(node) { - functionHandler(node); - declare(node.id ? [node.id.name] : []); - } - - function variableDeclarationHandler(node) { - node.declarations.forEach(function(declaration) { - declareByNodeType(declaration.id); - }); + // Global variables are not resolved. + // In this case, use unresolved references. + if (isGlobal && variable.name in unresolvedReferences) { + references = unresolvedReferences[variable.name]; + } + // Reports. + references.filter(isOutsideOfScope).forEach(report); + } } return { - "Program": function() { - var scope = context.getScope(); - scopeStack = [scope.variables.map(function(v) { - return v.name; - })]; - - // global return creates another scope - if (context.ecmaFeatures.globalReturn) { - scope = scope.childScopes[0]; - scopeStack.push(scope.variables.map(function(v) { - return v.name; - })); - } - }, - - "ImportSpecifier": declareImports, - "ImportDefaultSpecifier": declareImports, - "ImportNamespaceSpecifier": declareImports, - - "BlockStatement": function(node) { - var statements = node.body; - pushScope(); - statements.forEach(function(stmt) { - if (stmt.type === "VariableDeclaration") { - variableDeclarationHandler(stmt); - } else if (stmt.type === "FunctionDeclaration") { - declare([stmt.id.name]); - } - }); + "Program": function(node) { + unresolvedReferences = collectUnresolvedReferences(context); + stack = [node.range]; }, - "VariableDeclaration": function (node) { - variableDeclarationHandler(node); - }, - - "BlockStatement:exit": popScope, - - "CatchClause": function(node) { - pushScope(); - declare([node.param.name]); - }, - "CatchClause:exit": popScope, - - "FunctionDeclaration": functionDeclarationHandler, - "FunctionDeclaration:exit": popScope, - - "ClassDeclaration": declareClass, - "ClassDeclaration:exit": popScope, - - "ClassExpression": declareClass, - "ClassExpression:exit": popScope, - - "MethodDefinition": declareClassMethod, - "MethodDefinition:exit": popScope, - - "FunctionExpression": functionExpressionHandler, - "FunctionExpression:exit": popScope, - - // Arrow functions cannot have names - "ArrowFunctionExpression": functionHandler, - "ArrowFunctionExpression:exit": popScope, - - "ForStatement": function() { - pushScope(); - }, - "ForStatement:exit": popScope, - - "ForInStatement": function() { - pushScope(); - }, - "ForInStatement:exit": popScope, - - "ForOfStatement": function() { - pushScope(); - }, - "ForOfStatement:exit": popScope, - - "Identifier": function(node) { - var ancestor = context.getAncestors().pop(); - if (isDeclaration(node, ancestor) || isProperty(node, ancestor) || ancestor.type === "LabeledStatement") { - return; - } - - for (var i = 0, l = scopeStack.length; i < l; i++) { - if (scopeStack[i].indexOf(node.name) > -1) { - return; - } - } - - context.report(node, "\"" + node.name + "\" used outside of binding context."); - } + // Manages scopes. + "BlockStatement": enterScope, + "BlockStatement:exit": exitScope, + "ForStatement": enterScope, + "ForStatement:exit": exitScope, + "ForInStatement": enterScope, + "ForInStatement:exit": exitScope, + "ForOfStatement": enterScope, + "ForOfStatement:exit": exitScope, + "SwitchStatement": enterScope, + "SwitchStatement:exit": exitScope, + "CatchClause": enterScope, + "CatchClause:exit": exitScope, + + // Finds and reports references which are outside of valid scope. + "VariableDeclaration": checkForVariables }; }; diff --git a/tools/eslint/lib/rules/block-spacing.js b/tools/eslint/lib/rules/block-spacing.js new file mode 100644 index 00000000000000..d7bbbf11a2b7d2 --- /dev/null +++ b/tools/eslint/lib/rules/block-spacing.js @@ -0,0 +1,119 @@ +/** + * @fileoverview A rule to disallow or enforce spaces inside of single line blocks. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +var util = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var always = (context.options[0] !== "never"), + message = always ? "Requires a space" : "Unexpected space(s)", + sourceCode = context.getSourceCode(); + + /** + * Gets the open brace token from a given node. + * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get. + * @returns {Token} The token of the open brace. + */ + function getOpenBrace(node) { + if (node.type === "SwitchStatement") { + if (node.cases.length > 0) { + return context.getTokenBefore(node.cases[0]); + } + return context.getLastToken(node, 1); + } + return context.getFirstToken(node); + } + + /** + * Checks whether or not: + * - given tokens are on same line. + * - there is/isn't a space between given tokens. + * @param {Token} left - A token to check. + * @param {Token} right - The token which is next to `left`. + * @returns {boolean} + * When the option is `"always"`, `true` if there are one or more spaces between given tokens. + * When the option is `"never"`, `true` if there are not any spaces between given tokens. + * If given tokens are not on same line, it's always `true`. + */ + function isValid(left, right) { + return ( + !util.isTokenOnSameLine(left, right) || + sourceCode.isSpaceBetweenTokens(left, right) === always + ); + } + + /** + * Reports invalid spacing style inside braces. + * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get. + * @returns {void} + */ + function checkSpacingInsideBraces(node) { + // Gets braces and the first/last token of content. + var openBrace = getOpenBrace(node); + var closeBrace = context.getLastToken(node); + var firstToken = sourceCode.getTokenOrCommentAfter(openBrace); + var lastToken = sourceCode.getTokenOrCommentBefore(closeBrace); + + // Skip if the node is invalid or empty. + if (openBrace.type !== "Punctuator" || + openBrace.value !== "{" || + closeBrace.type !== "Punctuator" || + closeBrace.value !== "}" || + firstToken === closeBrace + ) { + return; + } + + // Skip line comments for option never + if (!always && firstToken.type === "Line") { + return; + } + + // Check. + if (!isValid(openBrace, firstToken)) { + context.report({ + node: node, + loc: openBrace.loc.start, + message: message + " after \"{\".", + fix: function(fixer) { + if (always) { + return fixer.insertTextBefore(firstToken, " "); + } + + return fixer.removeRange([openBrace.range[1], firstToken.range[0]]); + } + }); + } + if (!isValid(lastToken, closeBrace)) { + context.report({ + node: node, + loc: closeBrace.loc.start, + message: message + " before \"}\".", + fix: function(fixer) { + if (always) { + return fixer.insertTextAfter(lastToken, " "); + } + + return fixer.removeRange([lastToken.range[1], closeBrace.range[0]]); + } + }); + } + } + + return { + BlockStatement: checkSpacingInsideBraces, + SwitchStatement: checkSpacingInsideBraces + }; +}; + +module.exports.schema = [ + {enum: ["always", "never"]} +]; diff --git a/tools/eslint/lib/rules/brace-style.js b/tools/eslint/lib/rules/brace-style.js index 2e56377f05001b..a64d0c7811e1eb 100644 --- a/tools/eslint/lib/rules/brace-style.js +++ b/tools/eslint/lib/rules/brace-style.js @@ -14,10 +14,11 @@ module.exports = function(context) { var params = context.options[1] || {}; var OPEN_MESSAGE = "Opening curly brace does not appear on the same line as controlling statement.", + OPEN_MESSAGE_ALLMAN = "Opening curly brace appears on the same line as controlling statement.", BODY_MESSAGE = "Statement inside of curly braces should be on next line.", CLOSE_MESSAGE = "Closing curly brace does not appear on the same line as the subsequent block.", CLOSE_MESSAGE_SINGLE = "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - CLOSE_MESSAGE_STROUSTRUP = "Closing curly brace appears on the same line as the subsequent block."; + CLOSE_MESSAGE_STROUSTRUP_ALLMAN = "Closing curly brace appears on the same line as the subsequent block."; //-------------------------------------------------------------------------- // Helpers @@ -57,28 +58,30 @@ module.exports = function(context) { return function(node) { [].forEach.call(blockProperties, function(blockProp) { var block = node[blockProp], previousToken, curlyToken, curlyTokenEnd, curlyTokensOnSameLine; - block = node[blockProp]; - if (isBlock(block)) { + if (!isBlock(block)) { + return; + } - previousToken = context.getTokenBefore(block); - curlyToken = context.getFirstToken(block); - curlyTokenEnd = context.getLastToken(block); - curlyTokensOnSameLine = curlyToken.loc.start.line === curlyTokenEnd.loc.start.line; + previousToken = context.getTokenBefore(block); + curlyToken = context.getFirstToken(block); + curlyTokenEnd = context.getLastToken(block); + curlyTokensOnSameLine = curlyToken.loc.start.line === curlyTokenEnd.loc.start.line; - if (previousToken.loc.start.line !== curlyToken.loc.start.line) { - context.report(node, OPEN_MESSAGE); - } else if (block.body.length && params.allowSingleLine) { + if (style !== "allman" && previousToken.loc.start.line !== curlyToken.loc.start.line) { + context.report(node, OPEN_MESSAGE); + } else if (style === "allman" && previousToken.loc.start.line === curlyToken.loc.start.line && !params.allowSingleLine) { + context.report(node, OPEN_MESSAGE_ALLMAN); + } - if (curlyToken.loc.start.line === block.body[0].loc.start.line && !curlyTokensOnSameLine) { - context.report(block.body[0], BODY_MESSAGE); - } else if (curlyTokenEnd.loc.start.line === block.body[block.body.length - 1].loc.start.line && !curlyTokensOnSameLine) { - context.report(block.body[block.body.length - 1], CLOSE_MESSAGE_SINGLE); - } + if (!block.body.length || curlyTokensOnSameLine && params.allowSingleLine) { + return; + } - } else if (block.body.length && curlyToken.loc.start.line === block.body[0].loc.start.line) { - context.report(block.body[0], BODY_MESSAGE); - } + if (curlyToken.loc.start.line === block.body[0].loc.start.line) { + context.report(block.body[0], BODY_MESSAGE); + } else if (curlyTokenEnd.loc.start.line === block.body[block.body.length - 1].loc.start.line) { + context.report(block.body[block.body.length - 1], CLOSE_MESSAGE_SINGLE); } }); }; @@ -106,13 +109,13 @@ module.exports = function(context) { tokens = context.getTokensBefore(node.alternate, 2); if (style === "1tbs") { - if (tokens[0].loc.start.line !== tokens[1].loc.start.line && isCurlyPunctuator(tokens[0]) ) { + if (tokens[0].loc.start.line !== tokens[1].loc.start.line && + node.consequent.type === "BlockStatement" && + isCurlyPunctuator(tokens[0]) ) { context.report(node.alternate, CLOSE_MESSAGE); } - } else if (style === "stroustrup") { - if (tokens[0].loc.start.line === tokens[1].loc.start.line) { - context.report(node.alternate, CLOSE_MESSAGE_STROUSTRUP); - } + } else if (tokens[0].loc.start.line === tokens[1].loc.start.line) { + context.report(node.alternate, CLOSE_MESSAGE_STROUSTRUP_ALLMAN); } } @@ -136,10 +139,8 @@ module.exports = function(context) { if (tokens[0].loc.start.line !== tokens[1].loc.start.line) { context.report(node.finalizer, CLOSE_MESSAGE); } - } else if (style === "stroustrup") { - if (tokens[0].loc.start.line === tokens[1].loc.start.line) { - context.report(node.finalizer, CLOSE_MESSAGE_STROUSTRUP); - } + } else if (tokens[0].loc.start.line === tokens[1].loc.start.line) { + context.report(node.finalizer, CLOSE_MESSAGE_STROUSTRUP_ALLMAN); } } } @@ -161,9 +162,9 @@ module.exports = function(context) { if (previousToken.loc.start.line !== firstToken.loc.start.line) { context.report(node, CLOSE_MESSAGE); } - } else if (style === "stroustrup") { + } else { if (previousToken.loc.start.line === firstToken.loc.start.line) { - context.report(node, CLOSE_MESSAGE_STROUSTRUP); + context.report(node, CLOSE_MESSAGE_STROUSTRUP_ALLMAN); } } } @@ -179,14 +180,14 @@ module.exports = function(context) { var tokens; if (node.cases && node.cases.length) { tokens = context.getTokensBefore(node.cases[0], 2); - if (tokens[0].loc.start.line !== tokens[1].loc.start.line) { - context.report(node, OPEN_MESSAGE); - } } else { tokens = context.getLastTokens(node, 3); - if (tokens[0].loc.start.line !== tokens[1].loc.start.line) { - context.report(node, OPEN_MESSAGE); - } + } + + if (style !== "allman" && tokens[0].loc.start.line !== tokens[1].loc.start.line) { + context.report(node, OPEN_MESSAGE); + } else if (style === "allman" && tokens[0].loc.start.line === tokens[1].loc.start.line) { + context.report(node, OPEN_MESSAGE_ALLMAN); } } @@ -214,7 +215,7 @@ module.exports = function(context) { module.exports.schema = [ { - "enum": ["1tbs", "stroustrup"] + "enum": ["1tbs", "stroustrup", "allman"] }, { "type": "object", diff --git a/tools/eslint/lib/rules/callback-return.js b/tools/eslint/lib/rules/callback-return.js new file mode 100644 index 00000000000000..d2a5d5febc04d3 --- /dev/null +++ b/tools/eslint/lib/rules/callback-return.js @@ -0,0 +1,142 @@ +/** + * @fileoverview Enforce return after a callback. + * @author Jamund Ferguson + * @copyright 2015 Jamund Ferguson. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + var callbacks = context.options[0] || ["callback", "cb", "next"]; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Find the closest parent matching a list of types. + * @param {ASTNode} node The node whose parents we are searching + * @param {Array} types The node types to match + * @returns {ASTNode} The matched node or undefined. + */ + function findClosestParentOfType(node, types) { + if (!node.parent) { + return null; + } + if (types.indexOf(node.parent.type) === -1) { + return findClosestParentOfType(node.parent, types); + } + return node.parent; + } + + /** + * Check to see if a CallExpression is in our callback list. + * @param {ASTNode} node The node to check against our callback names list. + * @returns {Boolean} Whether or not this function matches our callback name. + */ + function isCallback(node) { + return node.callee.type === "Identifier" && callbacks.indexOf(node.callee.name) > -1; + } + + /** + * Determines whether or not the callback is part of a callback expression. + * @param {ASTNode} node The callback node + * @param {ASTNode} parentNode The expression node + * @returns {boolean} Whether or not this is part of a callback expression + */ + function isCallbackExpression(node, parentNode) { + + // ensure the parent node exists and is an expression + if (!parentNode || parentNode.type !== "ExpressionStatement") { + return false; + } + + // cb() + if (parentNode.expression === node) { + return true; + } + + // special case for cb && cb() and similar + if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") { + if (parentNode.expression.right === node) { + return true; + } + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + "CallExpression": function(node) { + + // if we"re not a callback we can return + if (!isCallback(node)) { + return; + } + + // find the closest block, return or loop + var closestBlock = findClosestParentOfType(node, ["BlockStatement", "ReturnStatement", "ArrowFunctionExpression"]) || {}, + lastItem, parentType; + + // if our parent is a return we know we're ok + if (closestBlock.type === "ReturnStatement" ) { + return; + } + + // arrow functions don't always have blocks and implicitly return + if (closestBlock.type === "ArrowFunctionExpression") { + return; + } + + // block statements are part of functions and most if statements + if (closestBlock.type === "BlockStatement") { + + // find the last item in the block + lastItem = closestBlock.body[closestBlock.body.length - 1]; + + // if the callback is the last thing in a block that might be ok + if (isCallbackExpression(node, lastItem)) { + + parentType = closestBlock.parent.type; + + // but only if the block is part of a function + if (parentType === "FunctionExpression" || + parentType === "FunctionDeclaration" || + parentType === "ArrowFunctionExpression" + ) { + return; + } + + } + + // ending a block with a return is also ok + if (lastItem.type === "ReturnStatement") { + + // but only if the callback is immediately before + if (isCallbackExpression(node, closestBlock.body[closestBlock.body.length - 2])) { + return; + } + } + + } + + // as long as you're the child of a function at this point you should be asked to return + if (findClosestParentOfType(node, ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"])) { + context.report(node, "Expected return with your callback function."); + } + + } + + }; +}; + +module.exports.schema = [{ + type: "array", + items: { type: "string" } +}]; diff --git a/tools/eslint/lib/rules/comma-dangle.js b/tools/eslint/lib/rules/comma-dangle.js index 1c8f79ea9e0a16..d1755e2ab560a7 100644 --- a/tools/eslint/lib/rules/comma-dangle.js +++ b/tools/eslint/lib/rules/comma-dangle.js @@ -1,60 +1,203 @@ /** * @fileoverview Rule to forbid or enforce dangling commas. * @author Ian Christian Myers + * @copyright 2015 Toru Nagashima * @copyright 2015 Mathias Schreck * @copyright 2013 Ian Christian Myers + * See LICENSE file in root directory for full license. */ "use strict"; +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the last element of a given array. + * + * @param {*[]} xs - An array to get. + * @returns {*} The last element, or undefined. + */ +function getLast(xs) { + if (xs.length === 0) { + return null; + } + return xs[xs.length - 1]; +} + +/** + * Checks whether or not a trailing comma is allowed in a given node. + * `ArrayPattern` which has `RestElement` disallows it. + * + * @param {ASTNode} node - A node to check. + * @param {ASTNode} lastItem - The node of the last element in the given node. + * @returns {boolean} `true` if a trailing comma is allowed. + */ +function isTrailingCommaAllowed(node, lastItem) { + switch (node.type) { + case "ArrayPattern": + // TODO(t-nagashima): Remove SpreadElement after https://github.com/eslint/espree/issues/194 was fixed. + return ( + lastItem.type !== "RestElement" && + lastItem.type !== "SpreadElement" + ); + + // TODO(t-nagashima): Remove this case after https://github.com/eslint/espree/issues/195 was fixed. + case "ArrayExpression": + return ( + node.parent.type !== "ForOfStatement" || + node.parent.left !== node || + lastItem.type !== "SpreadElement" + ); + + default: + return true; + } +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { - var allowDangle = context.options[0]; - var forbidDangle = allowDangle !== "always-multiline" && allowDangle !== "always"; +module.exports = function(context) { + var mode = context.options[0]; var UNEXPECTED_MESSAGE = "Unexpected trailing comma."; var MISSING_MESSAGE = "Missing trailing comma."; /** - * Checks the given node for trailing comma and reports violations. - * @param {ASTNode} node The node of an ObjectExpression or ArrayExpression + * Checks whether or not a given node is multiline. + * This rule handles a given node as multiline when the closing parenthesis + * and the last element are not on the same line. + * + * @param {ASTNode} node - A ndoe to check. + * @returns {boolean} `true` if the node is multiline. + */ + function isMultiline(node) { + var lastItem = getLast(node.properties || node.elements || node.specifiers); + if (!lastItem) { + return false; + } + + var sourceCode = context.getSourceCode(), + penultimateToken = sourceCode.getLastToken(lastItem), + lastToken = sourceCode.getLastToken(node); + + if (lastToken.value === ",") { + penultimateToken = lastToken; + lastToken = sourceCode.getTokenAfter(lastToken); + } + + return lastToken.loc.end.line !== penultimateToken.loc.end.line; + } + + /** + * Reports a trailing comma if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. * @returns {void} */ - function checkForTrailingComma(node) { - var items = node.properties || node.elements, - length = items.length, - lastTokenOnNewLine, - lastItem, - penultimateToken, - hasDanglingComma; - - if (length) { - lastItem = items[length - 1]; - if (lastItem) { - penultimateToken = context.getLastToken(node, 1); - hasDanglingComma = penultimateToken.value === ","; - - if (forbidDangle && hasDanglingComma) { - context.report(lastItem, penultimateToken.loc.start, UNEXPECTED_MESSAGE); - } else if (allowDangle === "always-multiline") { - lastTokenOnNewLine = node.loc.end.line !== penultimateToken.loc.end.line; - if (hasDanglingComma && !lastTokenOnNewLine) { - context.report(lastItem, penultimateToken.loc.start, UNEXPECTED_MESSAGE); - } else if (!hasDanglingComma && lastTokenOnNewLine) { - context.report(lastItem, penultimateToken.loc.end, MISSING_MESSAGE); - } - } else if (allowDangle === "always" && !hasDanglingComma) { - context.report(lastItem, lastItem.loc.end, MISSING_MESSAGE); - } - } + function forbidTrailingComma(node) { + var lastItem = getLast(node.properties || node.elements || node.specifiers); + if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) { + return; } + + var sourceCode = context.getSourceCode(), + trailingToken; + + // last item can be surrounded by parentheses for object and array literals + if (node.type === "ObjectExpression" || node.type === "ArrayExpression") { + trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node)); + } else { + trailingToken = sourceCode.getTokenAfter(lastItem); + } + + if (trailingToken.value === ",") { + context.report( + lastItem, + trailingToken.loc.start, + UNEXPECTED_MESSAGE); + } + } + + /** + * Reports the last element of a given node if it does not have a trailing + * comma. + * + * If a given node is `ArrayPattern` which has `RestElement`, the trailing + * comma is disallowed, so report if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function forceTrailingComma(node) { + var lastItem = getLast(node.properties || node.elements || node.specifiers); + if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) { + return; + } + if (!isTrailingCommaAllowed(node, lastItem)) { + forbidTrailingComma(node); + return; + } + + var sourceCode = context.getSourceCode(), + trailingToken; + + // last item can be surrounded by parentheses for object and array literals + if (node.type === "ObjectExpression" || node.type === "ArrayExpression") { + trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node)); + } else { + trailingToken = sourceCode.getTokenAfter(lastItem); + } + + if (trailingToken.value !== ",") { + context.report( + lastItem, + lastItem.loc.end, + MISSING_MESSAGE); + } + } + + /** + * If a given node is multiline, reports the last element of a given node + * when it does not have a trailing comma. + * Otherwise, reports a trailing comma if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function forceTrailingCommaIfMultiline(node) { + if (isMultiline(node)) { + forceTrailingComma(node); + } else { + forbidTrailingComma(node); + } + } + + // Chooses a checking function. + var checkForTrailingComma; + if (mode === "always") { + checkForTrailingComma = forceTrailingComma; + } else if (mode === "always-multiline") { + checkForTrailingComma = forceTrailingCommaIfMultiline; + } else { + checkForTrailingComma = forbidTrailingComma; } return { "ObjectExpression": checkForTrailingComma, - "ArrayExpression": checkForTrailingComma + "ObjectPattern": checkForTrailingComma, + "ArrayExpression": checkForTrailingComma, + "ArrayPattern": checkForTrailingComma, + "ImportDeclaration": checkForTrailingComma, + "ExportNamedDeclaration": checkForTrailingComma }; }; diff --git a/tools/eslint/lib/rules/comma-spacing.js b/tools/eslint/lib/rules/comma-spacing.js index 5204801504a2e5..de7da6aff6a120 100644 --- a/tools/eslint/lib/rules/comma-spacing.js +++ b/tools/eslint/lib/rules/comma-spacing.js @@ -5,12 +5,17 @@ */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { + var sourceCode = context.getSourceCode(); + var tokensAndComments = sourceCode.tokensAndComments; + var options = { before: context.options[0] ? !!context.options[0].before : false, after: context.options[0] ? !!context.options[0].after : true @@ -20,47 +25,8 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - // the index of the last comment that was checked - var lastCommentIndex = 0; - var allComments; - - /** - * Determines the length of comment between 2 tokens - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {number} Length of comment in between tokens - */ - function getCommentLengthBetweenTokens(left, right) { - return allComments.reduce(function(val, comment) { - if (left.range[1] <= comment.range[0] && comment.range[1] <= right.range[0]) { - val = val + comment.range[1] - comment.range[0]; - } - return val; - }, 0); - } - - /** - * Determines whether two adjacent tokens have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - var punctuationLength = context.getTokensBetween(left, right).length; // the length of any parenthesis - var commentLenth = getCommentLengthBetweenTokens(left, right); - return (left.range[1] + punctuationLength + commentLenth) < right.range[0]; - } - - /** - * Checks whether two tokens are on the same line. - * @param {ASTNode} left The leftmost token. - * @param {ASTNode} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } + // list of comma tokens to ignore for the check of leading whitespace + var commaTokensToIgnore = []; /** * Determines if a given token is a comma operator. @@ -76,13 +42,39 @@ module.exports = function(context) { * Reports a spacing error with an appropriate message. * @param {ASTNode} node The binary expression node to report. * @param {string} dir Is the error "before" or "after" the comma? + * @param {ASTNode} otherNode The node at the left or right of `node` * @returns {void} * @private */ - function report(node, dir) { - context.report(node, options[dir] ? - "A space is required " + dir + " ','." : - "There should be no space " + dir + " ','."); + function report(node, dir, otherNode) { + context.report({ + node: node, + fix: function(fixer) { + if (options[dir]) { + if (dir === "before") { + return fixer.insertTextBefore(node, " "); + } else { + return fixer.insertTextAfter(node, " "); + } + } else { + var start, end; + var newText = ""; + + if (dir === "before") { + start = otherNode.range[1]; + end = node.range[0]; + } else { + start = node.range[1]; + end = otherNode.range[0]; + } + + return fixer.replaceTextRange([start, end], newText); + } + }, + message: options[dir] ? + "A space is required " + dir + " ','." : + "There should be no space " + dir + " ','." + }); } /** @@ -96,47 +88,46 @@ module.exports = function(context) { * @private */ function validateCommaItemSpacing(tokens, reportItem) { - if (tokens.left && isSameLine(tokens.left, tokens.comma) && - (options.before !== isSpaced(tokens.left, tokens.comma)) + if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) && + (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma)) ) { - report(reportItem, "before"); + report(reportItem, "before", tokens.left); + } + + if (tokens.right && !options.after && tokens.right.type === "Line") { + return false; } - if (tokens.right && isSameLine(tokens.comma, tokens.right) && - (options.after !== isSpaced(tokens.comma, tokens.right)) + + if (tokens.right && astUtils.isTokenOnSameLine(tokens.comma, tokens.right) && + (options.after !== sourceCode.isSpaceBetweenTokens(tokens.comma, tokens.right)) ) { - report(reportItem, "after"); + report(reportItem, "after", tokens.right); } } /** - * Determines if a given source index is in a comment or not by checking - * the index against the comment range. Since the check goes straight - * through the file, once an index is passed a certain comment, we can - * go to the next comment to check that. - * @param {int} index The source index to check. - * @param {ASTNode[]} comments An array of comment nodes. - * @returns {boolean} True if the index is within a comment, false if not. - * @private + * Adds null elements of the given ArrayExpression or ArrayPattern node to the ignore list. + * @param {ASTNode} node An ArrayExpression or ArrayPattern node. + * @returns {void} */ - function isIndexInComment(index, comments) { - - var comment; + function addNullElementsToIgnoreList(node) { + var previousToken = context.getFirstToken(node); - while (lastCommentIndex < comments.length) { + node.elements.forEach(function(element) { + var token; - comment = comments[lastCommentIndex]; + if (element === null) { + token = context.getTokenAfter(previousToken); - if (comment.range[0] <= index && index < comment.range[1]) { - return true; - } else if (index > comment.range[1]) { - lastCommentIndex++; + if (isComma(token)) { + commaTokensToIgnore.push(token); + } } else { - break; + token = context.getTokenAfter(element); } - } - - return false; + previousToken = token; + }); } //-------------------------------------------------------------------------- @@ -144,33 +135,34 @@ module.exports = function(context) { //-------------------------------------------------------------------------- return { - "Program": function() { + "Program:exit": function() { - var source = context.getSource(), - pattern = /,/g, - commaToken, - previousToken, + var previousToken, nextToken; - allComments = context.getAllComments(); - while (pattern.test(source)) { - - // do not flag anything inside of comments - if (!isIndexInComment(pattern.lastIndex, allComments)) { - commaToken = context.getTokenByRangeStart(pattern.lastIndex - 1); - - if (commaToken && commaToken.type !== "JSXText") { - previousToken = context.getTokenBefore(commaToken); - nextToken = context.getTokenAfter(commaToken); - validateCommaItemSpacing({ - comma: commaToken, - left: isComma(previousToken) ? null : previousToken, - right: isComma(nextToken) ? null : nextToken - }, commaToken); - } + tokensAndComments.forEach(function(token, i) { + + if (!isComma(token)) { + return; } - } - } + + if (token && token.type === "JSXText") { + return; + } + + previousToken = tokensAndComments[i - 1]; + nextToken = tokensAndComments[i + 1]; + + validateCommaItemSpacing({ + comma: token, + left: isComma(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken, + right: isComma(nextToken) ? null : nextToken + }, token); + }); + }, + "ArrayExpression": addNullElementsToIgnoreList, + "ArrayPattern": addNullElementsToIgnoreList + }; }; diff --git a/tools/eslint/lib/rules/comma-style.js b/tools/eslint/lib/rules/comma-style.js index 52e0ac47b0fa81..af001372c55249 100644 --- a/tools/eslint/lib/rules/comma-style.js +++ b/tools/eslint/lib/rules/comma-style.js @@ -7,6 +7,8 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -24,17 +26,6 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - /** - * Checks whether two tokens are on the same line. - * @param {ASTNode} left The leftmost token. - * @param {ASTNode} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } - /** * Determines if a given token is a comma operator. * @param {ASTNode} token The token to check. @@ -57,13 +48,13 @@ module.exports = function(context) { function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) { // if single line - if (isSameLine(commaToken, currentItemToken) && - isSameLine(previousItemToken, commaToken)) { + if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) && + astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { return; - } else if (!isSameLine(commaToken, currentItemToken) && - !isSameLine(previousItemToken, commaToken)) { + } else if (!astUtils.isTokenOnSameLine(commaToken, currentItemToken) && + !astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { // lone comma context.report(reportItem, { @@ -71,11 +62,11 @@ module.exports = function(context) { column: commaToken.loc.start.column }, "Bad line breaking before and after ','."); - } else if (style === "first" && !isSameLine(commaToken, currentItemToken)) { + } else if (style === "first" && !astUtils.isTokenOnSameLine(commaToken, currentItemToken)) { context.report(reportItem, "',' should be placed first."); - } else if (style === "last" && isSameLine(commaToken, currentItemToken)) { + } else if (style === "last" && astUtils.isTokenOnSameLine(commaToken, currentItemToken)) { context.report(reportItem, { line: commaToken.loc.end.line, diff --git a/tools/eslint/lib/rules/complexity.js b/tools/eslint/lib/rules/complexity.js index b4e52784cbd237..e8dd3cf9920b6a 100644 --- a/tools/eslint/lib/rules/complexity.js +++ b/tools/eslint/lib/rules/complexity.js @@ -21,18 +21,28 @@ module.exports = function(context) { // Using a stack to store complexity (handling nested functions) var fns = []; - // When parsing a new function, store it in our function stack + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ function startFunction() { fns.push(1); } + /** + * Evaluate the node at the end of function + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function endFunction(node) { var complexity = fns.pop(), name = "anonymous"; if (node.id) { name = node.id.name; - } else if (node.parent.type === "MethodDefinition") { + } else if (node.parent.type === "MethodDefinition" || node.parent.type === "Property") { name = node.parent.key.name; } @@ -41,12 +51,23 @@ module.exports = function(context) { } } + /** + * Increase the complexity of the function in context + * @returns {void} + * @private + */ function increaseComplexity() { if (fns.length) { fns[fns.length - 1] ++; } } + /** + * Increase the switch complexity in context + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function increaseSwitchComplexity(node) { // Avoiding `default` if (node.test) { @@ -54,6 +75,12 @@ module.exports = function(context) { } } + /** + * Increase the logical path complexity in context + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function increaseLogicalComplexity(node) { // Avoiding && if (node.operator === "||") { diff --git a/tools/eslint/lib/rules/computed-property-spacing.js b/tools/eslint/lib/rules/computed-property-spacing.js index 653a40eb0411a2..6462dfb90ee8f3 100644 --- a/tools/eslint/lib/rules/computed-property-spacing.js +++ b/tools/eslint/lib/rules/computed-property-spacing.js @@ -5,57 +5,54 @@ */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { + var sourceCode = context.getSourceCode(); var propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never" //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Determines whether two adjacent tokens are on the same line. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not the tokens are on the same line. - */ - function isSameLine(left, right) { - return left.loc.start.line === right.loc.start.line; - } - /** * Reports that there shouldn't be a space after the first token * @param {ASTNode} node - The node to report in the event of an error. * @param {Token} token - The token to use for the report. + * @param {Token} tokenAfter - The token after `token`. * @returns {void} */ - function reportNoBeginningSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space after '" + token.value + "'"); + function reportNoBeginningSpace(node, token, tokenAfter) { + context.report({ + node: node, + loc: token.loc.start, + message: "There should be no space after '" + token.value + "'", + fix: function(fixer) { + return fixer.removeRange([token.range[1], tokenAfter.range[0]]); + } + }); } /** * Reports that there shouldn't be a space before the last token * @param {ASTNode} node - The node to report in the event of an error. * @param {Token} token - The token to use for the report. + * @param {Token} tokenBefore - The token before `token`. * @returns {void} */ - function reportNoEndingSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space before '" + token.value + "'"); + function reportNoEndingSpace(node, token, tokenBefore) { + context.report({ + node: node, + loc: token.loc.start, + message: "There should be no space before '" + token.value + "'", + fix: function(fixer) { + return fixer.removeRange([tokenBefore.range[1], token.range[0]]); + } + }); } /** @@ -65,8 +62,14 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredBeginningSpace(node, token) { - context.report(node, token.loc.start, - "A space is required after '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "A space is required after '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); } /** @@ -76,8 +79,14 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredEndingSpace(node, token) { - context.report(node, token.loc.start, - "A space is required before '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "A space is required before '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); } /** @@ -99,26 +108,26 @@ module.exports = function(context) { last = context.getLastToken(property), after = context.getTokenAfter(property); - if (isSameLine(before, first)) { + if (astUtils.isTokenOnSameLine(before, first)) { if (propertyNameMustBeSpaced) { - if (!isSpaced(before, first) && isSameLine(before, first)) { + if (!sourceCode.isSpaceBetweenTokens(before, first) && astUtils.isTokenOnSameLine(before, first)) { reportRequiredBeginningSpace(node, before); } } else { - if (isSpaced(before, first)) { - reportNoBeginningSpace(node, before); + if (sourceCode.isSpaceBetweenTokens(before, first)) { + reportNoBeginningSpace(node, before, first); } } } - if (isSameLine(last, after)) { + if (astUtils.isTokenOnSameLine(last, after)) { if (propertyNameMustBeSpaced) { - if (!isSpaced(last, after) && isSameLine(last, after)) { + if (!sourceCode.isSpaceBetweenTokens(last, after) && astUtils.isTokenOnSameLine(last, after)) { reportRequiredEndingSpace(node, after); } } else { - if (isSpaced(last, after)) { - reportNoEndingSpace(node, after); + if (sourceCode.isSpaceBetweenTokens(last, after)) { + reportNoEndingSpace(node, after, last); } } } diff --git a/tools/eslint/lib/rules/consistent-this.js b/tools/eslint/lib/rules/consistent-this.js index bcf7fefb051c1a..81dc8473e625a8 100644 --- a/tools/eslint/lib/rules/consistent-this.js +++ b/tools/eslint/lib/rules/consistent-this.js @@ -53,39 +53,35 @@ module.exports = function(context) { */ function ensureWasAssigned() { var scope = context.getScope(); + var variable = scope.set.get(alias); + if (!variable) { + return; + } + + if (variable.defs.some(function(def) { + return def.node.type === "VariableDeclarator" && + def.node.init !== null; + })) { + return; + } - scope.variables.some(function (variable) { - var lookup; - - if (variable.name === alias) { - if (variable.defs.some(function (def) { - return def.node.type === "VariableDeclarator" && - def.node.init !== null; - })) { - return true; - } - - lookup = scope.type === "global" ? scope : variable; - - // The alias has been declared and not assigned: check it was - // assigned later in the same scope. - if (!lookup.references.some(function (reference) { - var write = reference.writeExpr; - - if (reference.from === scope && - write && write.type === "ThisExpression" && - write.parent.operator === "=") { - return true; - } - })) { - variable.defs.map(function (def) { - return def.node; - }).forEach(reportBadAssignment); - } + var lookup = (variable.references.length === 0 && scope.type === "global") ? scope : variable; + // The alias has been declared and not assigned: check it was + // assigned later in the same scope. + if (!lookup.references.some(function(reference) { + var write = reference.writeExpr; + + if (reference.from === scope && + write && write.type === "ThisExpression" && + write.parent.operator === "=") { return true; } - }); + })) { + variable.defs.map(function(def) { + return def.node; + }).forEach(reportBadAssignment); + } } return { @@ -93,7 +89,7 @@ module.exports = function(context) { "FunctionExpression:exit": ensureWasAssigned, "FunctionDeclaration:exit": ensureWasAssigned, - "VariableDeclarator": function (node) { + "VariableDeclarator": function(node) { var id = node.id; var isDestructuring = id.type === "ArrayPattern" || id.type === "ObjectPattern"; @@ -103,7 +99,7 @@ module.exports = function(context) { } }, - "AssignmentExpression": function (node) { + "AssignmentExpression": function(node) { if (node.left.type === "Identifier") { checkAssignment(node, node.left.name, node.right); } diff --git a/tools/eslint/lib/rules/constructor-super.js b/tools/eslint/lib/rules/constructor-super.js index a8c77a15a5e950..217d90b9c13f4d 100644 --- a/tools/eslint/lib/rules/constructor-super.js +++ b/tools/eslint/lib/rules/constructor-super.js @@ -18,7 +18,7 @@ module.exports = function(context) { * @returns {ClassDeclaration|ClassExpression|null} the found class node or `null`. */ function getClassInAncestor(node) { - while (node != null) { + while (node) { if (node.type === "ClassDeclaration" || node.type === "ClassExpression") { return node; } @@ -34,7 +34,7 @@ module.exports = function(context) { * @returns {boolean} whether or not a node is the null literal. */ function isNullLiteral(node) { - return node != null && node.type === "Literal" && node.value === null; + return node && node.type === "Literal" && node.value === null; } /** @@ -43,7 +43,7 @@ module.exports = function(context) { * @returns {boolean} whether or not the current traversal context is on constructors. */ function isOnConstructor(item) { - return item != null && item.scope === context.getScope().variableScope.upper.variableScope; + return item && item.scope === context.getScope().variableScope.upper.variableScope; } // A stack for checking context. @@ -78,7 +78,7 @@ module.exports = function(context) { var classNode = getClassInAncestor(node); /* istanbul ignore if */ - if (classNode == null) { + if (!classNode) { return; } diff --git a/tools/eslint/lib/rules/curly.js b/tools/eslint/lib/rules/curly.js index df7ad4c570310e..dacd9c5ec5e198 100644 --- a/tools/eslint/lib/rules/curly.js +++ b/tools/eslint/lib/rules/curly.js @@ -1,9 +1,16 @@ /** * @fileoverview Rule to flag statements without curly braces * @author Nicholas C. Zakas + * @copyright 2015 Ivan Nikulin. All rights reserved. */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -12,6 +19,8 @@ module.exports = function(context) { var multiOnly = (context.options[0] === "multi"); var multiLine = (context.options[0] === "multi-line"); + var multiOrNest = (context.options[0] === "multi-or-nest"); + var consistent = (context.options[1] === "consistent"); //-------------------------------------------------------------------------- // Helpers @@ -30,45 +39,189 @@ module.exports = function(context) { } /** - * Checks the body of a node to see if it's a block statement. Depending on - * the rule options, reports the appropriate problems. + * Determines if a given node is a one-liner. + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node is a one-liner. + * @private + */ + function isOneLiner(node) { + var first = context.getFirstToken(node), + last = context.getLastToken(node); + + return first.loc.start.line === last.loc.end.line; + } + + /** + * Gets the `else` keyword token of a given `IfStatement` node. + * @param {ASTNode} node - A `IfStatement` node to get. + * @returns {Token} The `else` keyword token. + */ + function getElseKeyword(node) { + var sourceCode = context.getSourceCode(); + var token = sourceCode.getTokenAfter(node.consequent); + + while (token.type !== "Keyword" || token.value !== "else") { + token = sourceCode.getTokenAfter(token); + } + + return token; + } + + /** + * Checks a given IfStatement node requires braces of the consequent chunk. + * This returns `true` when below: + * + * 1. The given node has the `alternate` node. + * 2. There is a `IfStatement` which doesn't have `alternate` node in the + * trailing statement chain of the `consequent` node. + * + * @param {ASTNode} node - A IfStatement node to check. + * @returns {boolean} `true` if the node requires braces of the consequent chunk. + */ + function requiresBraceOfConsequent(node) { + if (node.alternate && node.consequent.type === "BlockStatement") { + if (node.consequent.body.length >= 2) { + return true; + } + + node = node.consequent.body[0]; + while (node) { + if (node.type === "IfStatement" && !node.alternate) { + return true; + } + node = astUtils.getTrailingStatement(node); + } + } + + return false; + } + + /** + * Reports "Expected { after ..." error + * @param {ASTNode} node The node to report. + * @param {string} name The name to report. + * @param {string} suffix Additional string to add to the end of a report. + * @returns {void} + * @private + */ + function reportExpectedBraceError(node, name, suffix) { + context.report({ + node: node, + loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + message: "Expected { after '{{name}}'{{suffix}}.", + data: { + name: name, + suffix: (suffix ? " " + suffix : "") + } + }); + } + + /** + * Reports "Unnecessary { after ..." error + * @param {ASTNode} node The node to report. + * @param {string} name The name to report. + * @param {string} suffix Additional string to add to the end of a report. + * @returns {void} + * @private + */ + function reportUnnecessaryBraceError(node, name, suffix) { + context.report({ + node: node, + loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + message: "Unnecessary { after '{{name}}'{{suffix}}.", + data: { + name: name, + suffix: (suffix ? " " + suffix : "") + } + }); + } + + /** + * Prepares to check the body of a node to see if it's a block statement. * @param {ASTNode} node The node to report if there's a problem. * @param {ASTNode} body The body node to check for blocks. * @param {string} name The name to report if there's a problem. * @param {string} suffix Additional string to add to the end of a report. - * @returns {void} + * @returns {object} a prepared check object, with "actual", "expected", "check" properties. + * "actual" will be `true` or `false` whether the body is already a block statement. + * "expected" will be `true` or `false` if the body should be a block statement or not, or + * `null` if it doesn't matter, depending on the rule options. It can be modified to change + * the final behavior of "check". + * "check" will be a function reporting appropriate problems depending on the other + * properties. */ - function checkBody(node, body, name, suffix) { + function prepareCheck(node, body, name, suffix) { var hasBlock = (body.type === "BlockStatement"); + var expected = null; - if (multiOnly) { + if (node.type === "IfStatement" && node.consequent === body && requiresBraceOfConsequent(node)) { + expected = true; + } else if (multiOnly) { if (hasBlock && body.body.length === 1) { - context.report(node, "Unnecessary { after '{{name}}'{{suffix}}.", - { - name: name, - suffix: (suffix ? " " + suffix : "") - } - ); + expected = false; } } else if (multiLine) { - if (!hasBlock && !isCollapsedOneLiner(body)) { - context.report(node, "Expected { after '{{name}}'{{suffix}}.", - { - name: name, - suffix: (suffix ? " " + suffix : "") - } - ); + if (!isCollapsedOneLiner(body)) { + expected = true; + } + } else if (multiOrNest) { + if (hasBlock && body.body.length === 1 && isOneLiner(body.body[0])) { + expected = false; + } else if (!isOneLiner(body)) { + expected = true; } } else { - if (!hasBlock) { - context.report(node, "Expected { after '{{name}}'{{suffix}}.", - { - name: name, - suffix: (suffix ? " " + suffix : "") + expected = true; + } + + return { + actual: hasBlock, + expected: expected, + check: function() { + if (this.expected !== null && this.expected !== this.actual) { + if (this.expected) { + reportExpectedBraceError(node, name, suffix); + } else { + reportUnnecessaryBraceError(node, name, suffix); } - ); + } + } + }; + } + + /** + * Prepares to check the bodies of a "if", "else if" and "else" chain. + * @param {ASTNode} node The first IfStatement node of the chain. + * @returns {object[]} prepared checks for each body of the chain. See `prepareCheck` for more + * information. + */ + function prepareIfChecks(node) { + var preparedChecks = []; + do { + preparedChecks.push(prepareCheck(node, node.consequent, "if", "condition")); + if (node.alternate && node.alternate.type !== "IfStatement") { + preparedChecks.push(prepareCheck(node, node.alternate, "else")); + break; } + node = node.alternate; + } while (node); + + if (consistent) { + // If any node should have or already have braces, make sure they all have braces. + // If all nodes shouldn't have braces, make sure they don't. + var expected = preparedChecks.some(function(preparedCheck) { + if (preparedCheck.expected !== null) { + return preparedCheck.expected; + } + return preparedCheck.actual; + }); + + preparedChecks.forEach(function(preparedCheck) { + preparedCheck.expected = expected; + }); } + + return preparedChecks; } //-------------------------------------------------------------------------- @@ -76,34 +229,66 @@ module.exports = function(context) { //-------------------------------------------------------------------------- return { - "IfStatement": function(node) { - - checkBody(node, node.consequent, "if", "condition"); - - if (node.alternate && node.alternate.type !== "IfStatement") { - checkBody(node, node.alternate, "else"); + if (node.parent.type !== "IfStatement") { + prepareIfChecks(node).forEach(function(preparedCheck) { + preparedCheck.check(); + }); } - }, "WhileStatement": function(node) { - checkBody(node, node.body, "while", "condition"); + prepareCheck(node, node.body, "while", "condition").check(); }, - "DoWhileStatement": function (node) { - checkBody(node, node.body, "do"); + "DoWhileStatement": function(node) { + prepareCheck(node, node.body, "do").check(); }, "ForStatement": function(node) { - checkBody(node, node.body, "for", "condition"); + prepareCheck(node, node.body, "for", "condition").check(); + }, + + "ForInStatement": function(node) { + prepareCheck(node, node.body, "for-in").check(); + }, + + "ForOfStatement": function(node) { + prepareCheck(node, node.body, "for-of").check(); } }; - }; -module.exports.schema = [ - { - "enum": ["all", "multi", "multi-line"] - } -]; +module.exports.schema = { + "anyOf": [ + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["all"] + } + ], + "minItems": 1, + "maxItems": 2 + }, + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["multi", "multi-line", "multi-or-nest"] + }, + { + "enum": ["consistent"] + } + ], + "minItems": 1, + "maxItems": 3 + } + ] +}; diff --git a/tools/eslint/lib/rules/dot-location.js b/tools/eslint/lib/rules/dot-location.js index 6e83b984887293..403ffe2d5e7767 100644 --- a/tools/eslint/lib/rules/dot-location.js +++ b/tools/eslint/lib/rules/dot-location.js @@ -6,27 +6,18 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { var config = context.options[0], // default to onObject if no preference is passed onObject = config === "object" || !config; - /** - * Checks whether two tokens are on the same line. - * @param {Object} left The leftmost token. - * @param {Object} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } - /** * Reports if the dot between object and property is on the correct loccation. * @param {ASTNode} obj The object owning the property. @@ -39,10 +30,10 @@ module.exports = function (context) { if (dot.type === "Punctuator" && dot.value === ".") { if (onObject) { - if (!isSameLine(obj, dot)) { + if (!astUtils.isTokenOnSameLine(obj, dot)) { context.report(node, dot.loc.start, "Expected dot to be on same line as object."); } - } else if (!isSameLine(dot, prop)) { + } else if (!astUtils.isTokenOnSameLine(dot, prop)) { context.report(node, dot.loc.start, "Expected dot to be on same line as property."); } } @@ -61,3 +52,9 @@ module.exports = function (context) { "MemberExpression": checkNode }; }; + +module.exports.schema = [ + { + "enum": ["object", "property"] + } +]; diff --git a/tools/eslint/lib/rules/dot-notation.js b/tools/eslint/lib/rules/dot-notation.js index 2198cd75470f37..255d08ada67394 100644 --- a/tools/eslint/lib/rules/dot-notation.js +++ b/tools/eslint/lib/rules/dot-notation.js @@ -9,67 +9,7 @@ //------------------------------------------------------------------------------ var validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/; -var keywords = [ - "this", - "function", - "if", - "return", - "var", - "else", - "for", - "new", - "in", - "typeof", - "while", - "case", - "break", - "try", - "catch", - "delete", - "throw", - "switch", - "continue", - "default", - "instanceof", - "do", - "void", - "finally", - "with", - "debugger", - "implements", - "interface", - "package", - "private", - "protected", - "public", - "static", - "class", - "enum", - "export", - "extends", - "import", - "super", - "true", - "false", - "null", - "abstract", - "boolean", - "byte", - "char", - "const", - "double", - "final", - "float", - "goto", - "int", - "long", - "native", - "short", - "synchronized", - "throws", - "transient", - "volatile" -]; +var keywords = require("../util/keywords"); module.exports = function(context) { var options = context.options[0] || {}; diff --git a/tools/eslint/lib/rules/eol-last.js b/tools/eslint/lib/rules/eol-last.js index 2f68b8a7df1e2c..ebc4a596e3d1ca 100644 --- a/tools/eslint/lib/rules/eol-last.js +++ b/tools/eslint/lib/rules/eol-last.js @@ -18,8 +18,10 @@ module.exports = function(context) { "Program": function checkBadEOF(node) { // Get the whole source code, not for node only. - var src = context.getSource(), location = {column: 1}; - + var src = context.getSource(), + location = {column: 1}, + linebreakStyle = context.options[0] || "unix", + linebreak = linebreakStyle === "unix" ? "\n" : "\r\n"; if (src.length === 0) { return; } @@ -27,7 +29,14 @@ module.exports = function(context) { if (src[src.length - 1] !== "\n") { // file is not newline-terminated location.line = src.split(/\n/g).length; - context.report(node, location, "Newline required at end of file but not found."); + context.report({ + node: node, + loc: location, + message: "Newline required at end of file but not found.", + fix: function(fixer) { + return fixer.insertTextAfterRange([0, src.length], linebreak); + } + }); } } @@ -35,4 +44,8 @@ module.exports = function(context) { }; -module.exports.schema = []; +module.exports.schema = [ + { + "enum": ["unix", "windows"] + } +]; diff --git a/tools/eslint/lib/rules/eqeqeq.js b/tools/eslint/lib/rules/eqeqeq.js index 1576d6c1ab500c..f4ef2e5ed7a866 100644 --- a/tools/eslint/lib/rules/eqeqeq.js +++ b/tools/eslint/lib/rules/eqeqeq.js @@ -1,6 +1,8 @@ /** * @fileoverview Rule to flag statements that use != and == instead of !== and === * @author Nicholas C. Zakas + * @copyright 2013 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; @@ -11,6 +13,12 @@ module.exports = function(context) { + var sourceCode = context.getSourceCode(), + replacements = { + "==": "===", + "!=": "!==" + }; + /** * Checks if an expression is a typeof expression * @param {ASTNode} node The node to check @@ -71,7 +79,7 @@ module.exports = function(context) { } if (context.options[0] === "smart" && (isTypeOfBinary(node) || - areLiteralsAndSameType(node)) || isNullCheck(node)) { + areLiteralsAndSameType(node) || isNullCheck(node))) { return; } @@ -79,11 +87,27 @@ module.exports = function(context) { return; } - context.report( - node, getOperatorLocation(node), - "Expected '{{op}}=' and instead saw '{{op}}'.", - {op: node.operator} - ); + context.report({ + node: node, + loc: getOperatorLocation(node), + message: "Expected '{{op}}=' and instead saw '{{op}}'.", + data: { op: node.operator }, + fix: function(fixer) { + var tokens = sourceCode.getTokensBetween(node.left, node.right), + opToken, + i; + + for (i = 0; i < tokens.length; ++i) { + if (tokens[i].value === node.operator) { + opToken = tokens[i]; + break; + } + } + + return fixer.replaceTextRange(opToken.range, replacements[node.operator]); + } + }); + } }; diff --git a/tools/eslint/lib/rules/func-style.js b/tools/eslint/lib/rules/func-style.js index c9d64b6d00bff4..3a26aa3e9956c4 100644 --- a/tools/eslint/lib/rules/func-style.js +++ b/tools/eslint/lib/rules/func-style.js @@ -12,38 +12,73 @@ module.exports = function(context) { var style = context.options[0], - enforceDeclarations = (style === "declaration"); + allowArrowFunctions = context.options[1] && context.options[1].allowArrowFunctions === true, + enforceDeclarations = (style === "declaration"), + stack = []; - return { + var nodesToCheck = { + "Program": function() { + stack = []; + }, "FunctionDeclaration": function(node) { + stack.push(false); + if (!enforceDeclarations) { context.report(node, "Expected a function expression."); } }, + "FunctionDeclaration:exit": function() { + stack.pop(); + }, - "FunctionExpression": function() { - var parent = context.getAncestors().pop(); + "FunctionExpression": function(node) { + stack.push(false); - if (enforceDeclarations && parent.type === "VariableDeclarator") { - context.report(parent, "Expected a function declaration."); + if (enforceDeclarations && node.parent.type === "VariableDeclarator") { + context.report(node.parent, "Expected a function declaration."); } }, + "FunctionExpression:exit": function() { + stack.pop(); + }, - "ArrowFunctionExpression": function() { - var parent = context.getAncestors().pop(); - - if (enforceDeclarations && parent.type === "VariableDeclarator") { - context.report(parent, "Expected a function declaration."); + "ThisExpression": function() { + if (stack.length > 0) { + stack[stack.length - 1] = true; } } - }; + if (!allowArrowFunctions) { + nodesToCheck.ArrowFunctionExpression = function() { + stack.push(false); + }; + + nodesToCheck["ArrowFunctionExpression:exit"] = function(node) { + var hasThisExpr = stack.pop(); + + if (enforceDeclarations && !hasThisExpr && node.parent.type === "VariableDeclarator") { + context.report(node.parent, "Expected a function declaration."); + } + }; + } + + return nodesToCheck; + }; module.exports.schema = [ { "enum": ["declaration", "expression"] + }, + { + "type": "object", + "properties": { + "allowArrowFunctions": { + "type": "boolean" + } + }, + "additionalProperties": false } ]; diff --git a/tools/eslint/lib/rules/generator-star-spacing.js b/tools/eslint/lib/rules/generator-star-spacing.js index 1769f300449bce..210638a4ec1adb 100644 --- a/tools/eslint/lib/rules/generator-star-spacing.js +++ b/tools/eslint/lib/rules/generator-star-spacing.js @@ -14,7 +14,7 @@ module.exports = function(context) { var mode = (function(option) { - if (option == null || typeof option === "string") { + if (!option || typeof option === "string") { return { before: { before: true, after: false }, after: { before: false, after: true }, @@ -36,14 +36,24 @@ module.exports = function(context) { */ function checkSpacing(side, leftToken, rightToken) { if (!!(rightToken.range[0] - leftToken.range[1]) !== mode[side]) { - context.report( - leftToken.value === "*" ? leftToken : rightToken, - "{{type}} space {{side}} *.", - { - type: mode[side] ? "Missing" : "Unexpected", - side: side + var after = leftToken.value === "*"; + var spaceRequired = mode[side]; + var node = after ? leftToken : rightToken; + var type = spaceRequired ? "Missing" : "Unexpected"; + var message = type + " space " + side + " *."; + context.report({ + node: node, + message: message, + fix: function(fixer) { + if (spaceRequired) { + if (after) { + return fixer.insertTextAfter(node, " "); + } + return fixer.insertTextBefore(node, " "); + } + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); } - ); + }); } } diff --git a/tools/eslint/lib/rules/generator-star.js b/tools/eslint/lib/rules/generator-star.js deleted file mode 100644 index d6f3d2cdc58b6f..00000000000000 --- a/tools/eslint/lib/rules/generator-star.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @fileoverview Rule to check for the position of the * in your generator functions - * @author Jamund Ferguson - * @copyright 2014 Jamund Ferguson. All rights reserved. - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - var position = context.options[0] || "end"; - - /** - * Check the position of the star compared to the expected position. - * @param {ASTNode} node - the entire function node - * @returns {void} - */ - function checkStarPosition(node) { - var starToken; - - if (!node.generator) { - return; - } - - // Blocked, pending decision to fix or work around in eslint/espree#36 - if (context.getAncestors().pop().method) { - return; - } - - starToken = context.getFirstToken(node, 1); - - // check for function *name() {} - if (position === "end") { - - // * starts where the next identifier begins - if (starToken.range[1] !== context.getTokenAfter(starToken).range[0]) { - context.report(node, "Expected a space before *."); - } - } - - // check for function* name() {} - if (position === "start") { - - // * begins where the previous identifier ends - if (starToken.range[0] !== context.getTokenBefore(starToken).range[1]) { - context.report(node, "Expected no space before *."); - } - } - - // check for function * name() {} - if (position === "middle") { - - // must be a space before and afer the * - if (starToken.range[0] <= context.getTokenBefore(starToken).range[1] || - starToken.range[1] >= context.getTokenAfter(starToken).range[0]) { - context.report(node, "Expected spaces around *."); - } - } - } - - return { - "FunctionDeclaration": checkStarPosition, - "FunctionExpression": checkStarPosition - }; - -}; - -module.exports.schema = [ - { - "enum": ["start", "middle", "end"] - } -]; diff --git a/tools/eslint/lib/rules/global-require.js b/tools/eslint/lib/rules/global-require.js new file mode 100644 index 00000000000000..f09657ee16f769 --- /dev/null +++ b/tools/eslint/lib/rules/global-require.js @@ -0,0 +1,35 @@ +/** + * @fileoverview Rule for disallowing require() outside of the top-level module context + * @author Jamund Ferguson + * @copyright 2015 Jamund Ferguson. All rights reserved. + */ + +"use strict"; + +var ACCEPTABLE_PARENTS = [ + "AssignmentExpression", + "VariableDeclarator", + "MemberExpression", + "ExpressionStatement", + "CallExpression", + "ConditionalExpression", + "Program", + "VariableDeclaration" +]; + +module.exports = function(context) { + return { + "CallExpression": function(node) { + if (node.callee.name === "require") { + var isGoodRequire = context.getAncestors().every(function(parent) { + return ACCEPTABLE_PARENTS.indexOf(parent.type) > -1; + }); + if (!isGoodRequire) { + context.report(node, "Unexpected require()."); + } + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/global-strict.js b/tools/eslint/lib/rules/global-strict.js deleted file mode 100644 index 97980f6fed2364..00000000000000 --- a/tools/eslint/lib/rules/global-strict.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @fileoverview Rule to flag or require global strict mode. - * @author Nicholas C. Zakas - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - var mode = context.options[0]; - - if (mode === "always") { - - return { - "Program": function(node) { - if (node.body.length > 0) { - var statement = node.body[0]; - - if (!(statement.type === "ExpressionStatement" && statement.expression.value === "use strict")) { - context.report(node, "Use the global form of \"use strict\"."); - } - } - } - }; - - } else { // mode = "never" - - return { - "ExpressionStatement": function(node) { - var parent = context.getAncestors().pop(); - - if (node.expression.value === "use strict" && parent.type === "Program") { - context.report(node, "Use the function form of \"use strict\"."); - } - } - }; - - } - -}; - -module.exports.schema = [ - { - "enum": ["always", "never"] - } -]; diff --git a/tools/eslint/lib/rules/handle-callback-err.js b/tools/eslint/lib/rules/handle-callback-err.js index 438ea93c074f22..600a04fcfa8ef9 100644 --- a/tools/eslint/lib/rules/handle-callback-err.js +++ b/tools/eslint/lib/rules/handle-callback-err.js @@ -44,7 +44,7 @@ module.exports = function(context) { * @returns {array} All parameters of the given scope. */ function getParameters(scope) { - return scope.variables.filter(function (variable) { + return scope.variables.filter(function(variable) { return variable.defs[0] && variable.defs[0].type === "Parameter"; }); } diff --git a/tools/eslint/lib/rules/id-length.js b/tools/eslint/lib/rules/id-length.js new file mode 100644 index 00000000000000..0ea42e14ef4bda --- /dev/null +++ b/tools/eslint/lib/rules/id-length.js @@ -0,0 +1,106 @@ +/** + * @fileoverview Rule that warns when identifier names are shorter or longer + * than the values provided in configuration. + * @author Burak Yigit Kaya aka BYK + * @copyright 2015 Burak Yigit Kaya. All rights reserved. + * @copyright 2015 Mathieu M-Gosselin. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var options = context.options[0] || {}; + var minLength = typeof options.min !== "undefined" ? options.min : 2; + var maxLength = typeof options.max !== "undefined" ? options.max : Infinity; + var properties = options.properties !== "never"; + var exceptions = (options.exceptions ? options.exceptions : []) + .reduce(function(obj, item) { + obj[item] = true; + + return obj; + }, {}); + + var SUPPORTED_EXPRESSIONS = { + "MemberExpression": properties && function(parent) { + return !parent.computed && ( + // regular property assignment + parent.parent.left === parent || ( + // or the last identifier in an ObjectPattern destructuring + parent.parent.type === "Property" && parent.parent.value === parent && + parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent + ) + ); + }, + "AssignmentPattern": function(parent, node) { + return parent.left === node; + }, + "VariableDeclarator": function(parent, node) { + return parent.id === node; + }, + "Property": properties && function(parent, node) { + return parent.key === node; + }, + "ImportDefaultSpecifier": true, + "RestElement": true, + "FunctionExpression": true, + "ArrowFunctionExpression": true, + "ClassDeclaration": true, + "FunctionDeclaration": true, + "MethodDefinition": true, + "CatchClause": true + }; + + return { + Identifier: function(node) { + var name = node.name; + var parent = node.parent; + + var isShort = name.length < minLength; + var isLong = name.length > maxLength; + if (!(isShort || isLong) || exceptions[name]) { + return; // Nothing to report + } + + var isValidExpression = SUPPORTED_EXPRESSIONS[parent.type]; + + if (isValidExpression && (isValidExpression === true || isValidExpression(parent, node))) { + context.report( + node, + isShort ? + "Identifier name '{{name}}' is too short. (< {{min}})" : + "Identifier name '{{name}}' is too long. (> {{max}})", + { name: name, min: minLength, max: maxLength } + ); + } + } + }; +}; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + }, + "exceptions": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "properties": { + "enum": ["always", "never"] + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/id-match.js b/tools/eslint/lib/rules/id-match.js new file mode 100644 index 00000000000000..416689c56835b0 --- /dev/null +++ b/tools/eslint/lib/rules/id-match.js @@ -0,0 +1,129 @@ +/** + * @fileoverview Rule to flag non-matching identifiers + * @author Matthieu Larcher + * @copyright 2015 Matthieu Larcher. All rights reserved. + * See LICENSE in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + var pattern = context.options[0] || "^.+$", + regexp = new RegExp(pattern); + + var options = context.options[1] || {}, + properties = options.properties; + + // cast to boolean and default to false + properties = !!properties; + + + /** + * Checks if a string matches the provided pattern + * @param {String} name The string to check. + * @returns {boolean} if the string is a match + * @private + */ + function isInvalid(name) { + return !regexp.test(name); + } + + /** + * Verifies if we should report an error or not based on the effective + * parent node and the identifier name. + * @param {ASTNode} effectiveParent The effective parent node of the node to be reported + * @param {String} name The identifier name of the identifier node + * @returns {boolean} whether an error should be reported or not + */ + function shouldReport(effectiveParent, name) { + return effectiveParent.type !== "CallExpression" + && effectiveParent.type !== "NewExpression" && + isInvalid(name); + } + + /** + * Reports an AST node as a rule violation. + * @param {ASTNode} node The node to report. + * @returns {void} + * @private + */ + function report(node) { + context.report(node, "Identifier '{{name}}' does not match the pattern '{{pattern}}'.", { + name: node.name, + pattern: pattern + }); + } + + return { + + "Identifier": function(node) { + var name = node.name, + effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent; + + // MemberExpressions get special rules + if (node.parent.type === "MemberExpression") { + // return early if properties is false + if (!properties) { + return; + } + + // Always check object names + if (node.parent.object.type === "Identifier" && + node.parent.object.name === node.name) { + if (isInvalid(name)) { + report(node); + } + + // Report AssignmentExpressions only if they are the left side of the assignment + } else if (effectiveParent.type === "AssignmentExpression" && + (effectiveParent.right.type !== "MemberExpression" || + effectiveParent.left.type === "MemberExpression" && + effectiveParent.left.property.name === node.name)) { + if (isInvalid(name)) { + report(node); + } + } + + // Properties have their own rules + } else if (node.parent.type === "Property") { + // return early if properties is false + if (!properties) { + return; + } + + if (shouldReport(effectiveParent, name)) { + report(node); + } + + // Report anything that is a match and not a CallExpression + } else if (shouldReport(effectiveParent, name)) { + report(node); + } + } + + }; + +}; + +module.exports.schema = [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "properties": { + "type": "boolean" + } + } + } +]; diff --git a/tools/eslint/lib/rules/indent.js b/tools/eslint/lib/rules/indent.js index d0cf27cca344c5..b69539b227a602 100644 --- a/tools/eslint/lib/rules/indent.js +++ b/tools/eslint/lib/rules/indent.js @@ -1,463 +1,677 @@ /** * @fileoverview This option sets a specific tab width for your code - * This rule has been ported and modified from JSCS. - * @author Dmitriy Shekhovtsov - * @copyright 2015 Dmitriy Shekhovtsov. All rights reserved. - * @copyright 2013 Dulin Marat and other 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. - */ -/*eslint no-use-before-define:[2, "nofunc"]*/ + + * This rule has been ported and modified from nodeca. + * @author Vitaly Puzrin + * @author Gyandeep Singh + * @copyright 2015 Vitaly Puzrin. All rights reserved. + * @copyright 2015 Gyandeep Singh. All rights reserved. + Copyright (C) 2014 by Vitaly Puzrin + + 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"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +var util = require("util"); +var assign = require("object-assign"); -module.exports = function (context) { - // indentation defaults: 4 spaces - var indentChar = " "; - var indentSize = 4; - var options = {indentSwitchCase: false}; +module.exports = function(context) { + + var MESSAGE = "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."; + var DEFAULT_VARIABLE_INDENT = 1; - var lines = null; - var indentStack = [0]; - var linesToCheck = null; - var breakIndents = null; + var indentType = "space"; + var indentSize = 4; + var options = { + SwitchCase: 0, + VariableDeclarator: { + var: DEFAULT_VARIABLE_INDENT, + let: DEFAULT_VARIABLE_INDENT, + const: DEFAULT_VARIABLE_INDENT + } + }; if (context.options.length) { if (context.options[0] === "tab") { - indentChar = "\t"; indentSize = 1; + indentType = "tab"; } else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") { indentSize = context.options[0]; + indentType = "space"; } if (context.options[1]) { var opts = context.options[1]; - options.indentSwitchCase = opts.indentSwitchCase === true; + options.SwitchCase = opts.SwitchCase || 0; + var variableDeclaratorRules = opts.VariableDeclarator; + if (typeof variableDeclaratorRules === "number") { + options.VariableDeclarator = { + var: variableDeclaratorRules, + let: variableDeclaratorRules, + const: variableDeclaratorRules + }; + } else if (typeof variableDeclaratorRules === "object") { + assign(options.VariableDeclarator, variableDeclaratorRules); + } } } - var blockParents = [ - "IfStatement", - "WhileStatement", - "DoWhileStatement", - "ForStatement", - "ForInStatement", - "ForOfStatement", - "FunctionDeclaration", - "FunctionExpression", - "ArrowExpression", - "CatchClause", - "WithStatement" - ]; - - var indentableNodes = { - BlockStatement: "body", - Program: "body", - ObjectExpression: "properties", - ArrayExpression: "elements", - SwitchStatement: "cases" + var indentPattern = { + normal: indentType === "space" ? /^ +/ : /^\t+/, + excludeCommas: indentType === "space" ? /^[ ,]+/ : /^[\t,]+/ }; - if (options.indentSwitchCase) { - indentableNodes.SwitchCase = "consequent"; - } - - //-------------------------------------------------------------------------- - // Helpers - //-------------------------------------------------------------------------- + var caseIndentStore = {}; /** - * Mark line to be checked - * @param {Number} line - line number + * Reports a given indent violation and properly pluralizes the message + * @param {ASTNode} node Node violating the indent rule + * @param {int} needed Expected indentation character count + * @param {int} gotten Indentation character count in the actual node/code + * @param {Object=} loc Error line and column location + * @param {boolean} isLastNodeCheck Is the error for last node check * @returns {void} */ - function markCheckLine(line) { - linesToCheck[line].check = true; - } + function report(node, needed, gotten, loc, isLastNodeCheck) { + var msgContext = { + needed: needed, + type: indentType, + characters: needed === 1 ? "character" : "characters", + gotten: gotten + }; + var indentChar = indentType === "space" ? " " : "\t"; + + /** + * Responsible for fixing the indentation issue fix + * @returns {Function} function to be executed by the fixer + * @private + */ + function getFixerFunction() { + var rangeToFix = []; + + if (needed > gotten) { + var spaces = "" + new Array(needed - gotten + 1).join(indentChar); // replace with repeat in future + + if (isLastNodeCheck === true) { + rangeToFix = [ + node.range[1] - 1, + node.range[1] - 1 + ]; + } else { + rangeToFix = [ + node.range[0], + node.range[0] + ]; + } - /** - * Mark line with targeted node to be checked - * @param {ASTNode} checkNode - targeted node - * @returns {void} - */ - function markCheck(checkNode) { - markCheckLine(checkNode.loc.start.line - 1); - } + return function(fixer) { + return fixer.insertTextBeforeRange(rangeToFix, spaces); + }; + } else { + if (isLastNodeCheck === true) { + rangeToFix = [ + node.range[1] - (gotten - needed) - 1, + node.range[1] - 1 + ]; + } else { + rangeToFix = [ + node.range[0] - (gotten - needed), + node.range[0] + ]; + } - /** - * Sets pushing indent of current node - * @param {ASTNode} node - targeted node - * @param {Number} indents - indents count to push - * @returns {void} - */ - function markPush(node, indents) { - linesToCheck[node.loc.start.line - 1].push.push(indents); + return function(fixer) { + return fixer.removeRange(rangeToFix); + }; + } + } + + if (loc) { + context.report({ + node: node, + loc: loc, + message: MESSAGE, + data: msgContext, + fix: getFixerFunction() + }); + } else { + context.report({ + node: node, + message: MESSAGE, + data: msgContext, + fix: getFixerFunction() + }); + } } /** - * Marks line as outdent, end of block statement for example - * @param {ASTNode} node - targeted node - * @param {Number} outdents - count of outedents in targeted line - * @returns {void} + * Get node indent + * @param {ASTNode|Token} node Node to examine + * @param {boolean} [byLastLine=false] get indent of node's last line + * @param {boolean} [excludeCommas=false] skip comma on start of line + * @returns {int} Indent */ - function markPop(node, outdents) { - linesToCheck[node.loc.end.line - 1].pop.push(outdents); + function getNodeIndent(node, byLastLine, excludeCommas) { + var token = byLastLine ? context.getLastToken(node) : context.getFirstToken(node); + var src = context.getSource(token, token.loc.start.column); + var regExp = excludeCommas ? indentPattern.excludeCommas : indentPattern.normal; + var indent = regExp.exec(src); + + return indent ? indent[0].length : 0; } /** - * Set alt push for current node - * @param {ASTNode} node - targeted node - * @returns {void} + * Checks node is the first in its own start line. By default it looks by start line. + * @param {ASTNode} node The node to check + * @param {boolean} [byEndLocation=false] Lookup based on start position or end + * @returns {boolean} true if its the first in the its start line */ - function markPushAlt(node) { - linesToCheck[node.loc.start.line - 1].pushAltLine.push(node.loc.end.line - 1); + function isNodeFirstInLine(node, byEndLocation) { + var firstToken = byEndLocation === true ? context.getLastToken(node, 1) : context.getTokenBefore(node), + startLine = byEndLocation === true ? node.loc.end.line : node.loc.start.line, + endLine = firstToken ? firstToken.loc.end.line : -1; + + return startLine !== endLine; } /** - * Marks end of node block to be checked - * and marks targeted node as indent pushing - * @param {ASTNode} pushNode - targeted node - * @param {Number} indents - indent count to push + * Check indent for nodes list + * @param {ASTNode[]} nodes list of node objects + * @param {int} indent needed indent + * @param {boolean} [excludeCommas=false] skip comma on start of line * @returns {void} */ - function markPushAndEndCheck(pushNode, indents) { - markPush(pushNode, indents); - markCheckLine(pushNode.loc.end.line - 1); + function checkNodesIndent(nodes, indent, excludeCommas) { + nodes.forEach(function(node) { + var nodeIndent = getNodeIndent(node, false, excludeCommas); + if ( + node.type !== "ArrayExpression" && node.type !== "ObjectExpression" && + nodeIndent !== indent && isNodeFirstInLine(node) + ) { + report(node, indent, nodeIndent); + } + }); } /** - * Mark node as switch case statement - * and set push\pop indentation changes - * @param {ASTNode} caseNode - targeted node - * @param {ASTNode[]} children - consequent child nodes of case node + * Check last node line indent this detects, that block closed correctly + * @param {ASTNode} node Node to examine + * @param {int} lastLineIndent needed indent * @returns {void} */ - function markCase(caseNode, children) { - var outdentNode = getCaseOutdent(children); - - if (outdentNode) { - // If a case statement has a `break` as a direct child and it is the - // first one encountered, use it as the example for all future case indentation - if (breakIndents === null) { - breakIndents = (caseNode.loc.start.column === outdentNode.loc.start.column) ? 1 : 0; - } - markPop(outdentNode, breakIndents); - } else { - markPop(caseNode, 0); + function checkLastNodeLineIndent(node, lastLineIndent) { + var lastToken = context.getLastToken(node); + var endIndent = getNodeIndent(lastToken, true); + + if (endIndent !== lastLineIndent && isNodeFirstInLine(node, true)) { + report( + node, + lastLineIndent, + endIndent, + { line: lastToken.loc.start.line, column: lastToken.loc.start.column }, + true + ); } } /** - * Mark child nodes to be checked later of targeted node, - * only if child node not in same line as targeted one - * (if child and parent nodes wrote in single line) - * @param {ASTNode} node - targeted node + * Check first node line indent is correct + * @param {ASTNode} node Node to examine + * @param {int} firstLineIndent needed indent * @returns {void} */ - function markChildren(node) { - getChildren(node).forEach(function(childNode) { - if (childNode.loc.start.line !== node.loc.start.line || node.type === "Program") { - markCheck(childNode); - } - }); + function checkFirstNodeLineIndent(node, firstLineIndent) { + var startIndent = getNodeIndent(node, false); + if (startIndent !== firstLineIndent && isNodeFirstInLine(node)) { + report( + node, + firstLineIndent, + startIndent, + { line: node.loc.start.line, column: node.loc.start.column } + ); + } } /** - * Mark child block as scope pushing and mark to check - * @param {ASTNode} node - target node - * @param {String} property - target node property containing child - * @returns {void} + * Returns the VariableDeclarator based on the current node + * if not present then return null + * @param {ASTNode} node node to examine + * @returns {ASTNode|void} if found then node otherwise null */ - function markAlternateBlockStatement(node, property) { - var child = node[property]; - if (child && child.type === "BlockStatement") { - markCheck(child); + function getVariableDeclaratorNode(node) { + var parent = node.parent; + + while (parent.type !== "VariableDeclarator" && parent.type !== "Program") { + parent = parent.parent; } + + return parent.type === "VariableDeclarator" ? parent : null; } /** - * Checks whether node is multiline or single line - * @param {ASTNode} node - target node - * @returns {boolean} - is multiline node + * Check to see if the node is part of the multi-line variable declaration. + * Also if its on the same line as the varNode + * @param {ASTNode} node node to check + * @param {ASTNode} varNode variable declaration node to check against + * @returns {boolean} True if all the above condition satisfy */ - function isMultiline(node) { - return node.loc.start.line !== node.loc.end.line; + function isNodeInVarOnTop(node, varNode) { + return varNode && + varNode.parent.loc.start.line === node.loc.start.line && + varNode.parent.declarations.length > 1; } /** - * Get switch case statement outdent node if any - * @param {ASTNode[]} caseChildren - case statement childs - * @returns {ASTNode} - outdent node + * Check to see if the argument before the callee node is multi-line and + * there should only be 1 argument before the callee node + * @param {ASTNode} node node to check + * @returns {boolean} True if arguments are multi-line */ - function getCaseOutdent(caseChildren) { - var outdentNode; - caseChildren.some(function(node) { - if (node.type === "BreakStatement") { - outdentNode = node; - return true; - } - }); + function isArgBeforeCalleeNodeMultiline(node) { + var parent = node.parent; + + if (parent.arguments.length >= 2 && parent.arguments[1] === node) { + return parent.arguments[0].loc.end.line > parent.arguments[0].loc.start.line; + } - return outdentNode; + return false; } /** - * Returns block containing node - * @param {ASTNode} node - targeted node - * @returns {ASTNode} - block node + * Check indent for function block content + * @param {ASTNode} node node to examine + * @returns {void} */ - function getBlockNodeToMark(node) { - var parent = node.parent; + function checkIndentInFunctionBlock(node) { + + // Search first caller in chain. + // Ex.: + // + // Models <- Identifier + // .User + // .find() + // .exec(function() { + // // function body + // }); + // + // Looks for 'Models' + var calleeNode = node.parent; // FunctionExpression + var indent; + + if (calleeNode.parent && + (calleeNode.parent.type === "Property" || + calleeNode.parent.type === "ArrayExpression")) { + // If function is part of array or object, comma can be put at left + indent = getNodeIndent(calleeNode, false, true); + } else { + // If function is standalone, simple calculate indent + indent = getNodeIndent(calleeNode); + } + + if (calleeNode.parent.type === "CallExpression") { + var calleeParent = calleeNode.parent; - // The parent of an else is the entire if/else block. To avoid over indenting - // in the case of a non-block if with a block else, mark push where the else starts, - // not where the if starts! - if (parent.type === "IfStatement" && parent.alternate === node) { - return node; + if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") { + if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) { + indent = getNodeIndent(calleeParent); + } + } else { + if (isArgBeforeCalleeNodeMultiline(calleeNode) && + calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line && + !isNodeFirstInLine(calleeNode)) { + indent = getNodeIndent(calleeParent); + } + } } - // The end line to check of a do while statement needs to be the location of the - // closing curly brace, not the while statement, to avoid marking the last line of - // a multiline while as a line to check. - if (parent.type === "DoWhileStatement") { - return node; + // function body indent should be indent + indent size + indent += indentSize; + + // check if the node is inside a variable + var parentVarNode = getVariableDeclaratorNode(node); + if (parentVarNode && isNodeInVarOnTop(node, parentVarNode)) { + indent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind]; } - // Detect bare blocks: a block whose parent doesn"t expect blocks in its syntax specifically. - if (blockParents.indexOf(parent.type) === -1) { - return node; + if (node.body.length > 0) { + checkNodesIndent(node.body, indent); } - return parent; + checkLastNodeLineIndent(node, indent - indentSize); } + /** - * Get node's children - * @param {ASTNode} node - current node - * @returns {ASTNode[]} - children + * Checks if the given node starts and ends on the same line + * @param {ASTNode} node The node to check + * @returns {boolean} Whether or not the block starts and ends on the same line. */ - function getChildren(node) { - var childrenProperty = indentableNodes[node.type]; - return node[childrenProperty]; + function isSingleLineNode(node) { + var lastToken = context.getLastToken(node), + startLine = node.loc.start.line, + endLine = lastToken.loc.end.line; + + return startLine === endLine; } /** - * Gets indentation in line `i` - * @param {Number} i - number of line to get indentation - * @returns {Number} - count of indentation symbols + * Check to see if the first element inside an array is an object and on the same line as the node + * If the node is not an array then it will return false. + * @param {ASTNode} node node to check + * @returns {boolean} success/failure */ - function getIndentationFromLine(i) { - var rNotIndentChar = new RegExp("[^" + indentChar + "]"); - var firstContent = lines[i].search(rNotIndentChar); - if (firstContent === -1) { - firstContent = lines[i].length; + function isFirstArrayElementOnSameLine(node) { + if (node.type === "ArrayExpression" && node.elements[0]) { + return node.elements[0].loc.start.line === node.loc.start.line && node.elements[0].type === "ObjectExpression"; + } else { + return false; } - return firstContent; } /** - * Compares expected and actual indentation - * and reports any violations - * @param {ASTNode} node - node used only for reporting + * Check indent for array block content or object block content + * @param {ASTNode} node node to examine * @returns {void} */ - function checkIndentations(node) { - linesToCheck.forEach(function(line, i) { - var actualIndentation = getIndentationFromLine(i); - var expectedIndentation = getExpectedIndentation(line, actualIndentation); - - if (line.check) { - - if (actualIndentation !== expectedIndentation) { - context.report(node, - {line: i + 1, column: expectedIndentation}, - "Expected indentation of " + expectedIndentation + " characters."); - // correct the indentation so that future lines - // can be validated appropriately - actualIndentation = expectedIndentation; + function checkIndentInArrayOrObjectBlock(node) { + // Skip inline + if (isSingleLineNode(node)) { + return; + } + + var elements = (node.type === "ArrayExpression") ? node.elements : node.properties; + + // filter out empty elements example would be [ , 2] so remove first element as espree considers it as null + elements = elements.filter(function(elem) { + return elem !== null; + }); + + // Skip if first element is in same line with this node + if (elements.length > 0 && elements[0].loc.start.line === node.loc.start.line) { + return; + } + + var nodeIndent; + var elementsIndent; + var parentVarNode = getVariableDeclaratorNode(node); + + // TODO - come up with a better strategy in future + if (isNodeFirstInLine(node)) { + var parent = node.parent; + var effectiveParent = parent; + + if (parent.type === "MemberExpression") { + if (isNodeFirstInLine(parent)) { + effectiveParent = parent.parent.parent; + } else { + effectiveParent = parent.parent; } } + nodeIndent = getNodeIndent(effectiveParent); + if (parentVarNode && parentVarNode.loc.start.line !== node.loc.start.line) { + if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) { + nodeIndent = nodeIndent + (indentSize * options.VariableDeclarator[parentVarNode.parent.kind]); + } else if (parent.loc.start.line !== node.loc.start.line && parentVarNode === parentVarNode.parent.declarations[0]) { + nodeIndent = nodeIndent + indentSize; + } + } else if (!parentVarNode && !isFirstArrayElementOnSameLine(parent) && effectiveParent.type !== "MemberExpression" && effectiveParent.type !== "ExpressionStatement" && effectiveParent.type !== "AssignmentExpression" && effectiveParent.type !== "Property") { + nodeIndent = nodeIndent + indentSize; + } + + elementsIndent = nodeIndent + indentSize; + + checkFirstNodeLineIndent(node, nodeIndent); + } else { + nodeIndent = getNodeIndent(node); + elementsIndent = nodeIndent + indentSize; + } + + // check if the node is a multiple variable declaration, if yes then make sure indentation takes into account + // variable indentation concept + if (isNodeInVarOnTop(node, parentVarNode)) { + elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind]; + } + + // Comma can be placed before property name + checkNodesIndent(elements, elementsIndent, true); - if (line.push.length) { - pushExpectedIndentations(line, actualIndentation); + if (elements.length > 0) { + // Skip last block line check if last item in same line + if (elements[elements.length - 1].loc.end.line === node.loc.end.line) { + return; } - }); + } + + checkLastNodeLineIndent(node, elementsIndent - indentSize); } /** - * Counts expected indentation for given line number - * @param {Number} line - line number - * @param {Number} actual - actual indentation - * @returns {number} - expected indentation + * Check if the node or node body is a BlockStatement or not + * @param {ASTNode} node node to test + * @returns {boolean} True if it or its body is a block statement */ - function getExpectedIndentation(line, actual) { - var outdent = indentSize * Math.max.apply(null, line.pop); + function isNodeBodyBlock(node) { + return node.type === "BlockStatement" || (node.body && node.body.type === "BlockStatement") || + (node.consequent && node.consequent.type === "BlockStatement"); + } - var idx = indentStack.length - 1; - var expected = indentStack[idx]; + /** + * Check indentation for blocks + * @param {ASTNode} node node to check + * @returns {void} + */ + function blockIndentationCheck(node) { + // Skip inline blocks + if (isSingleLineNode(node)) { + return; + } - if (!Array.isArray(expected)) { - expected = [expected]; + if (node.parent && ( + node.parent.type === "FunctionExpression" || + node.parent.type === "FunctionDeclaration" || + node.parent.type === "ArrowFunctionExpression" + )) { + checkIndentInFunctionBlock(node); + return; } - expected = expected.map(function(value) { - if (line.pop.length) { - value -= outdent; - } + var indent; + var nodesToCheck = []; - return value; - }).reduce(function(previous, current) { - // when the expected is an array, resolve the value - // back into a Number by checking both values are the actual indentation - return actual === current ? current : previous; - }); + // For this statements we should check indent from statement begin + // (not from block begin) + var statementsWithProperties = [ + "IfStatement", "WhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "DoWhileStatement" + ]; + + if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) { + indent = getNodeIndent(node.parent); + } else { + indent = getNodeIndent(node); + } - indentStack[idx] = expected; + if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") { + nodesToCheck = [node.consequent]; + } else if (util.isArray(node.body)) { + nodesToCheck = node.body; + } else { + nodesToCheck = [node.body]; + } - line.pop.forEach(function() { - indentStack.pop(); - }); + if (nodesToCheck.length > 0) { + checkNodesIndent(nodesToCheck, indent + indentSize); + } - return expected; + if (node.type === "BlockStatement") { + checkLastNodeLineIndent(node, indent); + } + } + + /** + * Filter out the elements which are on the same line of each other or the node. + * basically have only 1 elements from each line except the variable declaration line. + * @param {ASTNode} node Variable declaration node + * @returns {ASTNode[]} Filtered elements + */ + function filterOutSameLineVars(node) { + return node.declarations.reduce(function(finalCollection, elem) { + var lastElem = finalCollection[finalCollection.length - 1]; + + if ((elem.loc.start.line !== node.loc.start.line && !lastElem) || + (lastElem && lastElem.loc.start.line !== elem.loc.start.line)) { + finalCollection.push(elem); + } + + return finalCollection; + }, []); } /** - * Store in stack expected indentations - * @param {Number} line - current line - * @param {Number} actualIndentation - actual indentation at current line + * Check indentation for variable declarations + * @param {ASTNode} node node to examine * @returns {void} */ - function pushExpectedIndentations(line, actualIndentation) { - var indents = Math.max.apply(null, line.push); - var expected = actualIndentation + (indentSize * indents); - - // when a line has alternate indentations, push an array of possible values - // on the stack, to be resolved when checked against an actual indentation - if (line.pushAltLine.length) { - expected = [expected]; - line.pushAltLine.forEach(function(altLine) { - expected.push(getIndentationFromLine(altLine) + (indentSize * indents)); - }); + function checkIndentInVariableDeclarations(node) { + var elements = filterOutSameLineVars(node); + var nodeIndent = getNodeIndent(node); + var lastElement = elements[elements.length - 1]; + + var elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind]; + + // Comma can be placed before declaration + checkNodesIndent(elements, elementsIndent, true); + + // Only check the last line if there is any token after the last item + if (context.getLastToken(node).loc.end.line <= lastElement.loc.end.line) { + return; } - line.push.forEach(function() { - indentStack.push(expected); - }); + var tokenBeforeLastElement = context.getTokenBefore(lastElement); + + if (tokenBeforeLastElement.value === ",") { + // Special case for comma-first syntax where the semicolon is indented + checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement)); + } else { + checkLastNodeLineIndent(node, elementsIndent - indentSize); + } } - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- + /** + * Check and decide whether to check for indentation for blockless nodes + * Scenarios are for or while statements without braces around them + * @param {ASTNode} node node to examine + * @returns {void} + */ + function blockLessNodes(node) { + if (node.body.type !== "BlockStatement") { + blockIndentationCheck(node); + } + } - return { - "Program": function (node) { - lines = context.getSourceLines(); - linesToCheck = lines.map(function () { - return { - push: [], - pushAltLine: [], - pop: [], - check: false - }; - }); + /** + * Returns the expected indentation for the case statement + * @param {ASTNode} node node to examine + * @param {int} [switchIndent] indent for switch statement + * @returns {int} indent size + */ + function expectedCaseIndent(node, switchIndent) { + var switchNode = (node.type === "SwitchStatement") ? node : node.parent; + var caseIndent; - if (!isMultiline(node)) { - return; + if (caseIndentStore[switchNode.loc.start.line]) { + return caseIndentStore[switchNode.loc.start.line]; + } else { + if (typeof switchIndent === "undefined") { + switchIndent = getNodeIndent(switchNode); } - markChildren(node); - }, - "Program:exit": function (node) { - checkIndentations(node); - }, - - "BlockStatement": function (node) { - if (!isMultiline(node)) { - return; + if (switchNode.cases.length > 0 && options.SwitchCase === 0) { + caseIndent = switchIndent; + } else { + caseIndent = switchIndent + (indentSize * options.SwitchCase); } - markChildren(node); - markPop(node, 1); + caseIndentStore[switchNode.loc.start.line] = caseIndent; + return caseIndent; + } + } - markPushAndEndCheck(getBlockNodeToMark(node), 1); + return { + "Program": function(node) { + if (node.body.length > 0) { + // Root nodes should have no indent + checkNodesIndent(node.body, getNodeIndent(node)); + } }, - "IfStatement": function (node) { - markAlternateBlockStatement(node, "alternate"); - }, + "BlockStatement": blockIndentationCheck, - "TryStatement": function (node) { - markAlternateBlockStatement(node, "handler"); - markAlternateBlockStatement(node, "finalizer"); - }, + "WhileStatement": blockLessNodes, - "SwitchStatement": function (node) { - if (!isMultiline(node)) { - return; - } + "ForStatement": blockLessNodes, - var indents = 1; - var children = getChildren(node); + "ForInStatement": blockLessNodes, - if (children.length && node.loc.start.column === children[0].loc.start.column) { - indents = 0; - } + "ForOfStatement": blockLessNodes, - markChildren(node); - markPop(node, indents); - markPushAndEndCheck(node, indents); - }, + "DoWhileStatement": blockLessNodes, - "SwitchCase": function (node) { - if (!options.indentSwitchCase) { - return; + "IfStatement": function(node) { + if (node.consequent.type !== "BlockStatement" && node.consequent.loc.start.line > node.loc.start.line) { + blockIndentationCheck(node); } + }, - if (!isMultiline(node)) { - return; + "VariableDeclaration": function(node) { + if (node.declarations[node.declarations.length - 1].loc.start.line > node.declarations[0].loc.start.line) { + checkIndentInVariableDeclarations(node); } + }, - var children = getChildren(node); + "ObjectExpression": function(node) { + checkIndentInArrayOrObjectBlock(node); + }, - if (children.length === 1 && children[0].type === "BlockStatement") { - return; - } + "ArrayExpression": function(node) { + checkIndentInArrayOrObjectBlock(node); + }, - markPush(node, 1); - markCheck(node); - markChildren(node); + "SwitchStatement": function(node) { + // Switch is not a 'BlockStatement' + var switchIndent = getNodeIndent(node); + var caseIndent = expectedCaseIndent(node, switchIndent); + checkNodesIndent(node.cases, caseIndent); - markCase(node, children); - }, - // indentations inside of function expressions can be offset from - // either the start of the function or the end of the function, therefore - // mark all starting lines of functions as potential indentations - "FunctionDeclaration": function (node) { - markPushAlt(node); + checkLastNodeLineIndent(node, switchIndent); }, - "FunctionExpression": function (node) { - markPushAlt(node); + + "SwitchCase": function(node) { + // Skip inline cases + if (isSingleLineNode(node)) { + return; + } + var caseIndent = expectedCaseIndent(node); + checkNodesIndent(node.consequent, caseIndent + indentSize); } }; @@ -477,8 +691,22 @@ module.exports.schema = [ { "type": "object", "properties": { - "indentSwitchCase": { - "type": "boolean" + "SwitchCase": { + "type": "integer" + }, + "VariableDeclarator": { + "type": ["integer", "object"], + "properties": { + "var": { + "type": "integer" + }, + "let": { + "type": "integer" + }, + "const": { + "type": "integer" + } + } } }, "additionalProperties": false diff --git a/tools/eslint/lib/rules/init-declarations.js b/tools/eslint/lib/rules/init-declarations.js new file mode 100644 index 00000000000000..f10e91ccaef538 --- /dev/null +++ b/tools/eslint/lib/rules/init-declarations.js @@ -0,0 +1,120 @@ +/** + * @fileoverview A rule to control the style of variable initializations. + * @author Colin Ihrig + * @copyright 2015 Colin Ihrig. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a for loop. + * @param {ASTNode} block - A node to check. + * @returns {boolean} `true` when the node is a for loop. + */ +function isForLoop(block) { + return block.type === "ForInStatement" || + block.type === "ForOfStatement" || + block.type === "ForStatement"; +} + +/** + * Checks whether or not a given declarator node has its initializer. + * @param {ASTNode} node - A declarator node to check. + * @returns {boolean} `true` when the node has its initializer. + */ +function isInitialized(node) { + var declaration = node.parent; + var block = declaration.parent; + + if (isForLoop(block)) { + if (block.type === "ForStatement") { + return block.init === declaration; + } + return block.left === declaration; + } + return Boolean(node.init); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + var MODE_ALWAYS = "always", + MODE_NEVER = "never"; + + var mode = context.options[0] || MODE_ALWAYS; + var params = context.options[1] || {}; + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + "VariableDeclaration:exit": function(node) { + + var kind = node.kind, + declarations = node.declarations; + + for (var i = 0; i < declarations.length; ++i) { + var declaration = declarations[i], + id = declaration.id, + initialized = isInitialized(declaration), + isIgnoredForLoop = params.ignoreForLoopInit && isForLoop(node.parent); + if (id.type !== "Identifier") { + continue; + } + + if (mode === MODE_ALWAYS && !initialized) { + context.report(declaration, "Variable '" + id.name + "' should be initialized on declaration."); + } else if (mode === MODE_NEVER && kind !== "const" && initialized && !isIgnoredForLoop) { + context.report(declaration, "Variable '" + id.name + "' should not be initialized on declaration."); + } + } + } + }; +}; + +module.exports.schema = { + "anyOf": [ + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["always"] + } + ], + "minItems": 1, + "maxItems": 2 + }, + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["never"] + }, + { + "type": "object", + "properties": { + "ignoreForLoopInit": { + "type": "boolean" + } + }, + "additionalProperties": false + } + ], + "minItems": 1, + "maxItems": 3 + } + ] +}; diff --git a/tools/eslint/lib/rules/jsx-quotes.js b/tools/eslint/lib/rules/jsx-quotes.js new file mode 100644 index 00000000000000..dba716069903d7 --- /dev/null +++ b/tools/eslint/lib/rules/jsx-quotes.js @@ -0,0 +1,63 @@ +/** + * @fileoverview A rule to ensure consistent quotes used in jsx syntax. + * @author Mathias Schreck + * @copyright 2015 Mathias Schreck + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +var QUOTE_SETTINGS = { + "prefer-double": { + quote: "\"", + description: "singlequote" + }, + "prefer-single": { + quote: "'", + description: "doublequote" + } +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var quoteOption = context.options[0] || "prefer-double", + setting = QUOTE_SETTINGS[quoteOption]; + + /** + * Checks if the given string literal node uses the expected quotes + * @param {ASTNode} node - A string literal node. + * @returns {boolean} Whether or not the string literal used the expected quotes. + * @public + */ + function usesExpectedQuotes(node) { + return node.value.indexOf(setting.quote) !== -1 || astUtils.isSurroundedBy(node.raw, setting.quote); + } + + return { + "JSXAttribute": function(node) { + var attributeValue = node.value; + + if (attributeValue && astUtils.isStringLiteral(attributeValue) && !usesExpectedQuotes(attributeValue)) { + context.report(attributeValue, "Unexpected usage of {{description}}.", setting); + } + } + }; +}; + +module.exports.schema = [ + { + "enum": [ "prefer-single", "prefer-double" ] + } +]; diff --git a/tools/eslint/lib/rules/key-spacing.js b/tools/eslint/lib/rules/key-spacing.js index 5ba944ea4ed5e7..a3d3a8904fd132 100644 --- a/tools/eslint/lib/rules/key-spacing.js +++ b/tools/eslint/lib/rules/key-spacing.js @@ -94,9 +94,27 @@ module.exports = function(context) { var options = context.options[0] || {}, align = options.align, + mode = options.mode || "strict", beforeColon = +!!options.beforeColon, // Defaults to false afterColon = +!(options.afterColon === false); // Defaults to true + /** + * Starting from the given a node (a property.key node here) looks forward + * until it finds the last token before a colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The last token before a colon punctuator. + */ + function getLastTokenBeforeColon(node) { + var prevNode; + + while (node && (node.type !== "Punctuator" || node.value !== ":")) { + prevNode = node; + node = context.getTokenAfter(node); + } + + return prevNode; + } + /** * Gets an object literal property's key as the identifier name or string value. * @param {ASTNode} property Property node whose key to retrieve. @@ -127,7 +145,9 @@ module.exports = function(context) { firstTokenAfterColon = context.getTokenAfter(key, 1), location = side === "key" ? key.loc.start : firstTokenAfterColon.loc.start; - if (diff && !(expected && containsLineTerminator(whitespace))) { + if ((diff && mode === "strict" || diff < 0 && mode === "minimum") && + !(expected && containsLineTerminator(whitespace)) + ) { context.report(property[side], location, messages[side], { error: diff > 0 ? "Extra" : "Missing", computed: property.computed ? "computed " : "", @@ -143,26 +163,17 @@ module.exports = function(context) { * @returns {int} Width of the key. */ function getKeyWidth(property) { - var key = property.key, - startToken, endToken; + var startToken, endToken; - // [computed]: value - if (property.computed) { - startToken = context.getTokenBefore(key); - endToken = context.getTokenAfter(key); - return endToken.range[1] - startToken.range[0]; + // Ignore shorthand methods and properties, as they have no colon + if (property.method || property.shorthand) { + return 0; } - // name: value - if (key.type === "Identifier") { - return key.name.length; - } + startToken = context.getFirstToken(property); + endToken = getLastTokenBeforeColon(property.key); - // "literal": value - // 42: value - if (key.type === "Literal") { - return key.raw.length; - } + return endToken.range[1] - startToken.range[0]; } /** @@ -297,7 +308,7 @@ module.exports = function(context) { } else { // Strictly obey beforeColon and afterColon in each property return { - "Property": function (node) { + "Property": function(node) { verifySpacing(node); } }; @@ -313,6 +324,9 @@ module.exports.schema = [ "align": { "enum": ["colon", "value"] }, + "mode": { + "enum": ["strict", "minimum"] + }, "beforeColon": { "type": "boolean" }, diff --git a/tools/eslint/lib/rules/linebreak-style.js b/tools/eslint/lib/rules/linebreak-style.js index b9afe7a4ba7965..29a9dfb7f0555a 100644 --- a/tools/eslint/lib/rules/linebreak-style.js +++ b/tools/eslint/lib/rules/linebreak-style.js @@ -12,26 +12,61 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { + var EXPECTED_LF_MSG = "Expected linebreaks to be 'LF' but found 'CRLF'.", EXPECTED_CRLF_MSG = "Expected linebreaks to be 'CRLF' but found 'LF'."; + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Builds a fix function that replaces text at the specified range in the source text. + * @param {int[]} range The range to replace + * @param {string} text The text to insert. + * @returns {function} Fixer function + * @private + */ + function createFix(range, text) { + return function(fixer) { + return fixer.replaceTextRange(range, text); + }; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + return { "Program": function checkForlinebreakStyle(node) { var linebreakStyle = context.options[0] || "unix", expectedLF = linebreakStyle === "unix", - linebreaks = context.getSource().match(/\r\n|\r|\n|\u2028|\u2029/g), - lineOfError = -1; + expectedLFChars = expectedLF ? "\n" : "\r\n", + source = context.getSource(), + pattern = /\r\n|\r|\n|\u2028|\u2029/g, + match, + index, + range; - if (linebreaks !== null) { - lineOfError = linebreaks.indexOf(expectedLF ? "\r\n" : "\n"); - } + var i = 0; + while ((match = pattern.exec(source)) !== null) { + i++; + if (match[0] === expectedLFChars) { + continue; + } - if (lineOfError !== -1) { - context.report(node, { - line: lineOfError + 1, - column: context.getSourceLines()[lineOfError].length - }, expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG); + index = match.index; + range = [index, index + match[0].length]; + context.report({ + node: node, + loc: { + line: i, + column: context.getSourceLines()[i - 1].length + }, + message: expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG, + fix: createFix(range, expectedLFChars) + }); } } }; diff --git a/tools/eslint/lib/rules/lines-around-comment.js b/tools/eslint/lib/rules/lines-around-comment.js index 655d83765923dd..e2416fc59ead42 100644 --- a/tools/eslint/lib/rules/lines-around-comment.js +++ b/tools/eslint/lib/rules/lines-around-comment.js @@ -1,10 +1,22 @@ /** * @fileoverview Enforces empty lines around comments. * @author Jamund Ferguson + * @copyright 2015 Mathieu M-Gosselin. All rights reserved. * @copyright 2015 Jamund Ferguson. All rights reserved. + * @copyright 2015 Gyandeep Singh. All rights reserved. */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var assign = require("object-assign"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + /** * Return an array with with any line numbers that are empty. * @param {Array} lines An array of each line of the file. @@ -31,7 +43,7 @@ function getEmptyLineNums(lines) { */ function getCommentLineNums(comments) { var lines = []; - comments.forEach(function (token) { + comments.forEach(function(token) { var start = token.loc.start.line; var end = token.loc.end.line; lines.push(start, end); @@ -55,7 +67,7 @@ function contains(val, array) { module.exports = function(context) { - var options = context.options[0] || {}; + var options = context.options[0] ? assign({}, context.options[0]) : {}; options.beforeLineComment = options.beforeLineComment || false; options.afterLineComment = options.afterLineComment || false; options.beforeBlockComment = typeof options.beforeBlockComment !== "undefined" ? options.beforeBlockComment : true; @@ -63,60 +75,139 @@ module.exports = function(context) { options.allowBlockStart = options.allowBlockStart || false; options.allowBlockEnd = options.allowBlockEnd || false; + var sourceCode = context.getSourceCode(); /** - * Returns whether or not comments are not on lines starting with or ending with code + * Returns whether or not comments are on lines starting with or ending with code * @param {ASTNode} node The comment node to check. * @returns {boolean} True if the comment is not alone. */ function codeAroundComment(node) { + var token; - var lines = context.getSourceLines(); + token = node; + do { + token = sourceCode.getTokenOrCommentBefore(token); + } while (token && (token.type === "Block" || token.type === "Line")); - // Get the whole line and cut it off at the start of the comment - var startLine = lines[node.loc.start.line - 1]; - var endLine = lines[node.loc.end.line - 1]; + if (token && token.loc.end.line === node.loc.start.line) { + return true; + } - var preamble = startLine.slice(0, node.loc.start.column).trim(); + token = node; + do { + token = sourceCode.getTokenOrCommentAfter(token); + } while (token && (token.type === "Block" || token.type === "Line")); - // Also check after the comment - var postamble = endLine.slice(node.loc.end.column).trim(); + if (token && token.loc.start.line === node.loc.end.line) { + return true; + } - // Should be false if there was only whitespace around the comment - return !!(preamble || postamble); + return false; } /** - * Returns whether or not comments are at the block start or not. + * Returns whether or not comments are inside a node type or not. * @param {ASTNode} node The Comment node. - * @returns {boolean} True if the comment is at block start. + * @param {ASTNode} parent The Comment parent node. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is inside nodeType. */ - function isCommentAtBlockStart(node) { + function isCommentInsideNodeType(node, parent, nodeType) { + return parent.type === nodeType || + (parent.body && parent.body.type === nodeType) || + (parent.consequent && parent.consequent.type === nodeType); + } + + /** + * Returns whether or not comments are at the parent start or not. + * @param {ASTNode} node The Comment node. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is at parent start. + */ + function isCommentAtParentStart(node, nodeType) { var ancestors = context.getAncestors(); var parent; if (ancestors.length) { parent = ancestors.pop(); } - return parent && (parent.type === "BlockStatement" || parent.body.type === "BlockStatement") && + + return parent && isCommentInsideNodeType(node, parent, nodeType) && node.loc.start.line - parent.loc.start.line === 1; } /** - * Returns whether or not comments are at the block end or not. + * Returns whether or not comments are at the parent end or not. * @param {ASTNode} node The Comment node. - * @returns {boolean} True if the comment is at block end. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is at parent end. */ - function isCommentAtBlockEnd(node) { + function isCommentAtParentEnd(node, nodeType) { var ancestors = context.getAncestors(); var parent; if (ancestors.length) { parent = ancestors.pop(); } - return parent && (parent.type === "BlockStatement" || parent.body.type === "BlockStatement") && + + return parent && isCommentInsideNodeType(node, parent, nodeType) && parent.loc.end.line - node.loc.end.line === 1; } + /** + * Returns whether or not comments are at the block start or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at block start. + */ + function isCommentAtBlockStart(node) { + return isCommentAtParentStart(node, "ClassBody") || isCommentAtParentStart(node, "BlockStatement"); + } + + /** + * Returns whether or not comments are at the block end or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at block end. + */ + function isCommentAtBlockEnd(node) { + return isCommentAtParentEnd(node, "ClassBody") || isCommentAtParentEnd(node, "BlockStatement"); + } + + /** + * Returns whether or not comments are at the object start or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at object start. + */ + function isCommentAtObjectStart(node) { + return isCommentAtParentStart(node, "ObjectExpression") || isCommentAtParentStart(node, "ObjectPattern"); + } + + /** + * Returns whether or not comments are at the object end or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at object end. + */ + function isCommentAtObjectEnd(node) { + return isCommentAtParentEnd(node, "ObjectExpression") || isCommentAtParentEnd(node, "ObjectPattern"); + } + + /** + * Returns whether or not comments are at the array start or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at array start. + */ + function isCommentAtArrayStart(node) { + return isCommentAtParentStart(node, "ArrayExpression") || isCommentAtParentStart(node, "ArrayPattern"); + } + + /** + * Returns whether or not comments are at the array end or not. + * @param {ASTNode} node The Comment node. + * @returns {boolean} True if the comment is at array end. + */ + function isCommentAtArrayEnd(node) { + return isCommentAtParentEnd(node, "ArrayExpression") || isCommentAtParentEnd(node, "ArrayPattern"); + } + /** * Checks if a comment node has lines around it (ignores inline comments) * @param {ASTNode} node The Comment node. @@ -142,7 +233,14 @@ module.exports = function(context) { commentIsNotAlone = codeAroundComment(node); var blockStartAllowed = options.allowBlockStart && isCommentAtBlockStart(node), - blockEndAllowed = options.allowBlockEnd && isCommentAtBlockEnd(node); + blockEndAllowed = options.allowBlockEnd && isCommentAtBlockEnd(node), + objectStartAllowed = options.allowObjectStart && isCommentAtObjectStart(node), + objectEndAllowed = options.allowObjectEnd && isCommentAtObjectEnd(node), + arrayStartAllowed = options.allowArrayStart && isCommentAtArrayStart(node), + arrayEndAllowed = options.allowArrayEnd && isCommentAtArrayEnd(node); + + var exceptionStartAllowed = blockStartAllowed || objectStartAllowed || arrayStartAllowed; + var exceptionEndAllowed = blockEndAllowed || objectEndAllowed || arrayEndAllowed; // ignore top of the file and bottom of the file if (prevLineNum < 1) { @@ -158,12 +256,12 @@ module.exports = function(context) { } // check for newline before - if (!blockStartAllowed && before && !contains(prevLineNum, commentAndEmptyLines)) { + if (!exceptionStartAllowed && before && !contains(prevLineNum, commentAndEmptyLines)) { context.report(node, "Expected line before comment."); } // check for newline after - if (!blockEndAllowed && after && !contains(nextLineNum, commentAndEmptyLines)) { + if (!exceptionEndAllowed && after && !contains(nextLineNum, commentAndEmptyLines)) { context.report(node, "Expected line after comment."); } @@ -217,6 +315,18 @@ module.exports.schema = [ }, "allowBlockEnd": { "type": "boolean" + }, + "allowObjectStart": { + "type": "boolean" + }, + "allowObjectEnd": { + "type": "boolean" + }, + "allowArrayStart": { + "type": "boolean" + }, + "allowArrayEnd": { + "type": "boolean" } }, "additionalProperties": false diff --git a/tools/eslint/lib/rules/max-depth.js b/tools/eslint/lib/rules/max-depth.js index 5b630ed2e5a650..a0159e1ccb5b2e 100644 --- a/tools/eslint/lib/rules/max-depth.js +++ b/tools/eslint/lib/rules/max-depth.js @@ -19,14 +19,30 @@ module.exports = function(context) { var functionStack = [], maxDepth = context.options[0] || 4; + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ function startFunction() { functionStack.push(0); } + /** + * When parsing is done then pop out the reference + * @returns {void} + * @private + */ function endFunction() { functionStack.pop(); } + /** + * Save the block and Evaluate the node + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function pushBlock(node) { var len = ++functionStack[functionStack.length - 1]; @@ -36,6 +52,11 @@ module.exports = function(context) { } } + /** + * Pop the saved block + * @returns {void} + * @private + */ function popBlock() { functionStack[functionStack.length - 1]--; } diff --git a/tools/eslint/lib/rules/max-len.js b/tools/eslint/lib/rules/max-len.js index 8d0400dcea64c1..13cf73c68b322d 100644 --- a/tools/eslint/lib/rules/max-len.js +++ b/tools/eslint/lib/rules/max-len.js @@ -11,6 +11,12 @@ //------------------------------------------------------------------------------ module.exports = function(context) { + // takes some ideas from http://tools.ietf.org/html/rfc3986#appendix-B, however: + // - They're matching an entire string that we know is a URI + // - We're matching part of a string where we think there *might* be a URL + // - We're only concerned about URLs, as picking out any URI would cause too many false positives + // - We don't care about matching the entire URL, any small segment is fine + var URL_REGEXP = /[^:/?#]:\/\/[^?#]/; /** * Creates a string that is made up of repeating a given string a certain @@ -32,23 +38,91 @@ module.exports = function(context) { return result; } - var tabWidth = context.options[1] || 4; - var maxLength = context.options[0] || 80, + tabWidth = context.options[1] || 4, + ignoreOptions = context.options[2] || {}, + ignorePattern = ignoreOptions.ignorePattern || null, + ignoreComments = ignoreOptions.ignoreComments || false, + ignoreUrls = ignoreOptions.ignoreUrls || false, tabString = stringRepeat(" ", tabWidth); + if (ignorePattern) { + ignorePattern = new RegExp(ignorePattern); + } + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- + + /** + * Tells if a given comment is trailing: it starts on the current line and + * extends to or past the end of the current line. + * @param {string} line The source line we want to check for a trailing comment on + * @param {number} lineNumber The one-indexed line number for line + * @param {ASTNode} comment The comment to inspect + * @returns {boolean} If the comment is trailing on the given line + */ + function isTrailingComment(line, lineNumber, comment) { + return comment && + (comment.loc.start.line <= lineNumber && lineNumber <= comment.loc.end.line) && + (comment.loc.end.line > lineNumber || comment.loc.end.column === line.length); + } + + /** + * Gets the line after the comment and any remaining trailing whitespace is + * stripped. + * @param {string} line The source line with a trailing comment + * @param {number} lineNumber The one-indexed line number this is on + * @param {ASTNode} comment The comment to remove + * @returns {string} Line without comment and trailing whitepace + */ + function stripTrailingComment(line, lineNumber, comment) { + if (comment.loc.start.line < lineNumber) { + // this entire line is a comment + return ""; + } else { + // loc.column is zero-indexed + return line.slice(0, comment.loc.start.column).replace(/\s+$/, ""); + } + } + + /** + * Check the program for max length + * @param {ASTNode} node Node to examine + * @returns {void} + * @private + */ function checkProgramForMaxLength(node) { - var lines = context.getSourceLines(); + // split (honors line-ending) + var lines = context.getSourceLines(), + // list of comments to ignore + comments = ignoreComments ? context.getAllComments() : [], + // we iterate over comments in parallel with the lines + commentsIndex = 0; - // Replace the tabs - // Split (honors line-ending) - // Iterate lines.forEach(function(line, i) { + // i is zero-indexed, line numbers are one-indexed + var lineNumber = i + 1; + // we can short-circuit the comment checks if we're already out of comments to check + if (commentsIndex < comments.length) { + // iterate over comments until we find one past the current line + do { + var comment = comments[++commentsIndex]; + } while (comment && comment.loc.start.line <= lineNumber); + // and step back by one + comment = comments[--commentsIndex]; + if (isTrailingComment(line, lineNumber, comment)) { + line = stripTrailingComment(line, lineNumber, comment); + } + } + if (ignorePattern && ignorePattern.test(line) || + ignoreUrls && URL_REGEXP.test(line)) { + // ignore this line + return; + } + // replace the tabs if (line.replace(/\t/g, tabString).length > maxLength) { - context.report(node, { line: i + 1, col: 1 }, "Line " + (i + 1) + " exceeds the maximum line length of " + maxLength + "."); + context.report(node, { line: lineNumber, column: 0 }, "Line " + (i + 1) + " exceeds the maximum line length of " + maxLength + "."); } }); } @@ -72,5 +146,20 @@ module.exports.schema = [ { "type": "integer", "minimum": 0 + }, + { + "type": "object", + "properties": { + "ignorePattern": { + "type": "string" + }, + "ignoreComments": { + "type": "boolean" + }, + "ignoreUrls": { + "type": "boolean" + } + }, + "additionalProperties": false } ]; diff --git a/tools/eslint/lib/rules/max-nested-callbacks.js b/tools/eslint/lib/rules/max-nested-callbacks.js index 2caff10764a455..10753bddf00dec 100644 --- a/tools/eslint/lib/rules/max-nested-callbacks.js +++ b/tools/eslint/lib/rules/max-nested-callbacks.js @@ -16,7 +16,7 @@ module.exports = function(context) { // Constants //-------------------------------------------------------------------------- - var THRESHOLD = context.options[0]; + var THRESHOLD = context.options[0] || 10; //-------------------------------------------------------------------------- // Helpers diff --git a/tools/eslint/lib/rules/max-statements.js b/tools/eslint/lib/rules/max-statements.js index 8c7f4fd31b15f2..35a4960e92d4d0 100644 --- a/tools/eslint/lib/rules/max-statements.js +++ b/tools/eslint/lib/rules/max-statements.js @@ -19,10 +19,21 @@ module.exports = function(context) { var functionStack = [], maxStatements = context.options[0] || 10; + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ function startFunction() { functionStack.push(0); } + /** + * Evaluate the node at the end of function + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function endFunction(node) { var count = functionStack.pop(); @@ -32,6 +43,12 @@ module.exports = function(context) { } } + /** + * Increment the count of the functions + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function countStatements(node) { functionStack[functionStack.length - 1] += node.body.length; } diff --git a/tools/eslint/lib/rules/new-cap.js b/tools/eslint/lib/rules/new-cap.js index 3f47d9a5edb82e..9518b1eff0c0aa 100644 --- a/tools/eslint/lib/rules/new-cap.js +++ b/tools/eslint/lib/rules/new-cap.js @@ -7,6 +7,16 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var assign = require("object-assign"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + var CAPS_ALLOWED = [ "Array", "Boolean", @@ -28,6 +38,7 @@ var CAPS_ALLOWED = [ * @returns {string[]} Returns obj[key] if it's an Array, otherwise `fallback` */ function checkArray(obj, key, fallback) { + /* istanbul ignore if */ if (Object.prototype.hasOwnProperty.call(obj, key) && !Array.isArray(obj[key])) { throw new TypeError(key + ", if provided, must be an Array"); } @@ -66,9 +77,10 @@ function calculateCapIsNewExceptions(config) { module.exports = function(context) { - var config = context.options[0] || {}; + var config = context.options[0] ? assign({}, context.options[0]) : {}; config.newIsCap = config.newIsCap !== false; config.capIsNew = config.capIsNew !== false; + var skipProperties = config.properties === false; var newIsCapExceptions = checkArray(config, "newIsCapExceptions", []).reduce(invert, {}); @@ -134,15 +146,17 @@ module.exports = function(context) { * @returns {Boolean} Returns true if the callee may be capitalized */ function isCapAllowed(allowedMap, node, calleeName) { - if (allowedMap[calleeName]) { + if (allowedMap[calleeName] || allowedMap[context.getSource(node.callee)]) { return true; } + if (calleeName === "UTC" && node.callee.type === "MemberExpression") { // allow if callee is Date.UTC return node.callee.object.type === "Identifier" && node.callee.object.name === "Date"; } - return false; + + return skipProperties && node.callee.type === "MemberExpression"; } /** @@ -217,6 +231,9 @@ module.exports.schema = [ "items": { "type": "string" } + }, + "properties": { + "type": "boolean" } }, "additionalProperties": false diff --git a/tools/eslint/lib/rules/newline-after-var.js b/tools/eslint/lib/rules/newline-after-var.js index e1ade14bdeda97..9e7d8599319c6f 100644 --- a/tools/eslint/lib/rules/newline-after-var.js +++ b/tools/eslint/lib/rules/newline-after-var.js @@ -3,6 +3,7 @@ * @author Gopal Venkatesan * @copyright 2015 Gopal Venkatesan. All rights reserved. * @copyright 2015 Casey Visco. All rights reserved. + * @copyright 2015 Ian VanSchooten. All rights reserved. */ "use strict"; @@ -20,10 +21,11 @@ module.exports = function(context) { // be treated as "always" and the only special case is "never" var mode = context.options[0] === "never" ? "never" : "always"; - // Cache line numbers of comments for faster lookup - var comments = context.getAllComments().map(function (token) { - return token.loc.start.line; - }); + // Cache starting and ending line numbers of comments for faster lookup + var commentEndLine = context.getAllComments().reduce(function(result, token) { + result[token.loc.start.line] = token.loc.end.line; + return result; + }, {}); //-------------------------------------------------------------------------- @@ -61,6 +63,42 @@ module.exports = function(context) { nodeType === "ExportDefaultDeclaration" || nodeType === "ExportAllDeclaration"; } + /** + * Determine if provided nodeType is a function specifier + * @private + * @param {string} nodeType - nodeType to test + * @returns {boolean} True if `nodeType` is a function specifier + */ + function isFunctionSpecifier(nodeType) { + return nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || + nodeType === "ArrowFunctionExpression"; + } + + /** + * Determine if provided node is the last of his parent + * @private + * @param {ASTNode} node - node to test + * @returns {boolean} True if `node` is last of his parent + */ + function isLastNode(node) { + return node.parent.body[node.parent.body.length - 1] === node; + } + + /** + * Determine if a token starts more than one line after a comment ends + * @param {token} token The token being checked + * @param {integer} commentStartLine The line number on which the comment starts + * @returns {boolean} True if `token` does not start immediately after a comment + */ + function hasBlankLineAfterComment(token, commentStartLine) { + var commentEnd = commentEndLine[commentStartLine]; + // If there's another comment, repeat check for blank line + if (commentEndLine[commentEnd + 1]) { + return hasBlankLineAfterComment(token, commentEnd + 1); + } + return (token.loc.start.line > commentEndLine[commentStartLine] + 1); + } + /** * Checks that a blank line exists after a variable declaration when mode is * set to "always", or checks that there is no blank line when mode is set @@ -97,15 +135,26 @@ module.exports = function(context) { return; } + // Ignore if it is last statement in a function + if (node.parent.parent && isFunctionSpecifier(node.parent.parent.type) && isLastNode(node)) { + return; + } + // Next statement is not a `var`... noNextLineToken = nextToken.loc.start.line > nextLineNum; - hasNextLineComment = comments.indexOf(nextLineNum) >= 0; + hasNextLineComment = (typeof commentEndLine[nextLineNum] !== "undefined"); if (mode === "never" && noNextLineToken && !hasNextLineComment) { context.report(node, NEVER_MESSAGE, { identifier: node.name }); } - if (mode === "always" && (!noNextLineToken || hasNextLineComment)) { + // Token on the next line, or comment without blank line + if ( + mode === "always" && ( + !noNextLineToken || + hasNextLineComment && !hasBlankLineAfterComment(nextToken, nextLineNum) + ) + ) { context.report(node, ALWAYS_MESSAGE, { identifier: node.name }); } } diff --git a/tools/eslint/lib/rules/no-alert.js b/tools/eslint/lib/rules/no-alert.js index 7d041eaf748b7c..bfe834b44a9af2 100644 --- a/tools/eslint/lib/rules/no-alert.js +++ b/tools/eslint/lib/rules/no-alert.js @@ -52,7 +52,7 @@ function getPropertyName(memberExpressionNode) { * @returns {Reference|undefined} Returns the found reference or undefined if none were found. */ function findReference(scope, node) { - var references = scope.references.filter(function (reference) { + var references = scope.references.filter(function(reference) { return reference.identifier.range[0] === node.range[0] && reference.identifier.range[1] === node.range[1]; }); @@ -69,9 +69,8 @@ function findReference(scope, node) { * @returns {boolean} Whether or not the name is shadowed globally. */ function isGloballyShadowed(globalScope, identifierName) { - return globalScope.variables.some(function (variable) { - return variable.name === identifierName && variable.defs.length > 0; - }); + var variable = globalScope.set.get(identifierName); + return Boolean(variable && variable.defs.length > 0); } /** @@ -120,7 +119,7 @@ module.exports = function(context) { return { - "Program": function () { + "Program": function() { globalScope = context.getScope(); }, diff --git a/tools/eslint/lib/rules/no-array-constructor.js b/tools/eslint/lib/rules/no-array-constructor.js index b7167a49e5914e..ecf5837228b12a 100644 --- a/tools/eslint/lib/rules/no-array-constructor.js +++ b/tools/eslint/lib/rules/no-array-constructor.js @@ -11,6 +11,12 @@ module.exports = function(context) { + /** + * Disallow construction of dense arrays using the Array constructor + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function check(node) { if ( node.arguments.length !== 1 && diff --git a/tools/eslint/lib/rules/no-arrow-condition.js b/tools/eslint/lib/rules/no-arrow-condition.js new file mode 100644 index 00000000000000..5e478652f63c95 --- /dev/null +++ b/tools/eslint/lib/rules/no-arrow-condition.js @@ -0,0 +1,88 @@ +/** + * @fileoverview A rule to warn against using arrow functions in conditions. + * @author Jxck + * @copyright 2015 Luke Karrys. All rights reserved. + * The MIT License (MIT) + + * Copyright (c) 2015 Jxck + + * 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"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is an arrow function expression. + * @param {ASTNode} node - node to test + * @returns {boolean} `true` if the node is an arrow function expression. + */ +function isArrowFunction(node) { + return node.test && node.test.type === "ArrowFunctionExpression"; +} + +/** + * Checks whether or not a node is a conditional expression. + * @param {ASTNode} node - node to test + * @returns {boolean} `true` if the node is a conditional expression. + */ +function isConditional(node) { + return node.body && node.body.type === "ConditionalExpression"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + /** + * Reports if a conditional statement is an arrow function. + * @param {ASTNode} node - A node to check and report. + * @returns {void} + */ + function checkCondition(node) { + if (isArrowFunction(node)) { + context.report(node, "Arrow function `=>` used inside {{statementType}} instead of comparison operator.", {statementType: node.type}); + } + } + + /** + * Reports if an arrow function contains an ambiguous conditional. + * @param {ASTNode} node - A node to check and report. + * @returns {void} + */ + function checkArrowFunc(node) { + if (isConditional(node)) { + context.report(node, "Arrow function used ambiguously with a conditional expression."); + } + } + + return { + "IfStatement": checkCondition, + "WhileStatement": checkCondition, + "ForStatement": checkCondition, + "ConditionalExpression": checkCondition, + "ArrowFunctionExpression": checkArrowFunc + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-case-declarations.js b/tools/eslint/lib/rules/no-case-declarations.js new file mode 100644 index 00000000000000..443328b89e5b2e --- /dev/null +++ b/tools/eslint/lib/rules/no-case-declarations.js @@ -0,0 +1,47 @@ +/** + * @fileoverview Rule to flag use of an lexical declarations inside a case clause + * @author Erik Arvidsson + * @copyright 2015 Erik Arvidsson. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + /** + * Checks whether or not a node is a lexical declaration. + * @param {ASTNode} node A direct child statement of a switch case. + * @returns {boolean} Whether or not the node is a lexical declaration. + */ + function isLexicalDeclaration(node) { + switch (node.type) { + case "FunctionDeclaration": + case "ClassDeclaration": + return true; + case "VariableDeclaration": + return node.kind !== "var"; + default: + return false; + } + } + + return { + "SwitchCase": function(node) { + for (var i = 0; i < node.consequent.length; i++) { + var statement = node.consequent[i]; + if (isLexicalDeclaration(statement)) { + context.report({ + node: node, + message: "Unexpected lexical declaration in case block." + }); + } + } + } + }; + +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-catch-shadow.js b/tools/eslint/lib/rules/no-catch-shadow.js index 5776cd1780cb95..88eeb02fa6182c 100644 --- a/tools/eslint/lib/rules/no-catch-shadow.js +++ b/tools/eslint/lib/rules/no-catch-shadow.js @@ -5,6 +5,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -15,20 +21,14 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- + /** + * Check if the parameters are been shadowed + * @param {object} scope current scope + * @param {string} name parameter name + * @returns {boolean} True is its been shadowed + */ function paramIsShadowing(scope, name) { - var found = scope.variables.some(function(variable) { - return variable.name === name; - }); - - if (found) { - return true; - } - - if (scope.upper) { - return paramIsShadowing(scope.upper, name); - } - - return false; + return astUtils.getVariableByName(scope, name) !== null; } //-------------------------------------------------------------------------- @@ -40,6 +40,12 @@ module.exports = function(context) { "CatchClause": function(node) { var scope = context.getScope(); + // When blockBindings is enabled, CatchClause creates its own scope + // so start from one upper scope to exclude the current node + if (scope.block === node) { + scope = scope.upper; + } + if (paramIsShadowing(scope, node.param.name)) { context.report(node, "Value of '{{name}}' may be overwritten in IE 8 and earlier.", { name: node.param.name }); diff --git a/tools/eslint/lib/rules/no-class-assign.js b/tools/eslint/lib/rules/no-class-assign.js new file mode 100644 index 00000000000000..fe3b56cdf12879 --- /dev/null +++ b/tools/eslint/lib/rules/no-class-assign.js @@ -0,0 +1,48 @@ +/** + * @fileoverview A rule to disallow modifying variables of class declarations + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(function(reference) { + context.report( + reference.identifier, + "`{{name}}` is a class.", + {name: reference.identifier.name}); + + }); + } + + /** + * Finds and reports references that are non initializer and writable. + * @param {ASTNode} node - A ClassDeclaration/ClassExpression node to check. + * @returns {void} + */ + function checkForClass(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + + return { + "ClassDeclaration": checkForClass, + "ClassExpression": checkForClass + }; + +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-comma-dangle.js b/tools/eslint/lib/rules/no-comma-dangle.js deleted file mode 100644 index 899529efe8a07e..00000000000000 --- a/tools/eslint/lib/rules/no-comma-dangle.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @fileoverview Rule to flag trailing commas in object literals. - * @author Ian Christian Myers - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - //------------------------------------------------------------------------- - // Helpers - //------------------------------------------------------------------------- - - function checkForTrailingComma(node) { - var items = node.properties || node.elements, - length = items.length, - lastItem, penultimateToken; - - if (length) { - lastItem = items[length - 1]; - if (lastItem) { - penultimateToken = context.getLastToken(node, 1); - if (penultimateToken.value === ",") { - context.report(lastItem, penultimateToken.loc.start, "Trailing comma."); - } - } - } - } - - //-------------------------------------------------------------------------- - // Public API - //-------------------------------------------------------------------------- - - return { - "ObjectExpression": checkForTrailingComma, - "ArrayExpression": checkForTrailingComma - }; - -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-cond-assign.js b/tools/eslint/lib/rules/no-cond-assign.js index 2dc6251e39eac4..c83afca0afe68c 100644 --- a/tools/eslint/lib/rules/no-cond-assign.js +++ b/tools/eslint/lib/rules/no-cond-assign.js @@ -38,11 +38,11 @@ module.exports = function(context) { function findConditionalAncestor(node) { var currentAncestor = node; - while ((currentAncestor = currentAncestor.parent)) { + do { if (isConditionalTestExpression(currentAncestor)) { return currentAncestor.parent; } - } + } while ((currentAncestor = currentAncestor.parent)); return null; } @@ -80,9 +80,19 @@ module.exports = function(context) { * @returns {void} */ function testForAssign(node) { - if (node.test && (node.test.type === "AssignmentExpression") && !isParenthesisedTwice(node.test)) { + if (node.test && + (node.test.type === "AssignmentExpression") && + (node.type === "ForStatement" ? + !isParenthesised(node.test) : + !isParenthesisedTwice(node.test) + ) + ) { // must match JSHint's error message - context.report(node, "Expected a conditional expression and instead saw an assignment."); + context.report({ + node: node, + loc: node.test.loc.start, + message: "Expected a conditional expression and instead saw an assignment." + }); } } diff --git a/tools/eslint/lib/rules/no-const-assign.js b/tools/eslint/lib/rules/no-const-assign.js new file mode 100644 index 00000000000000..47e73b802e66c3 --- /dev/null +++ b/tools/eslint/lib/rules/no-const-assign.js @@ -0,0 +1,41 @@ +/** + * @fileoverview A rule to disallow modifying variables that are declared using `const` + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(function(reference) { + context.report( + reference.identifier, + "`{{name}}` is constant.", + {name: reference.identifier.name}); + }); + } + + return { + "VariableDeclaration": function(node) { + if (node.kind === "const") { + context.getDeclaredVariables(node).forEach(checkVariable); + } + } + }; + +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-control-regex.js b/tools/eslint/lib/rules/no-control-regex.js index cd57f73451082c..29c27fa5decc80 100644 --- a/tools/eslint/lib/rules/no-control-regex.js +++ b/tools/eslint/lib/rules/no-control-regex.js @@ -11,6 +11,12 @@ module.exports = function(context) { + /** + * Get the regex expression + * @param {ASTNode} node node to evaluate + * @returns {*} Regex if found else null + * @private + */ function getRegExp(node) { if (node.value instanceof RegExp) { diff --git a/tools/eslint/lib/rules/no-dupe-args.js b/tools/eslint/lib/rules/no-dupe-args.js index cb6e558154c56b..80b52ca82ad015 100644 --- a/tools/eslint/lib/rules/no-dupe-args.js +++ b/tools/eslint/lib/rules/no-dupe-args.js @@ -2,6 +2,8 @@ * @fileoverview Rule to flag duplicate arguments * @author Jamund Ferguson * @copyright 2015 Jamund Ferguson. All rights reserved. + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; @@ -16,6 +18,15 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- + /** + * Checks whether or not a given definition is a parameter's. + * @param {escope.DefEntry} def - A definition to check. + * @returns {boolean} `true` if the definition is a parameter's. + */ + function isParameter(def) { + return def.type === "Parameter"; + } + /** * Determines if a given node has duplicate parameters. * @param {ASTNode} node The node to check. @@ -23,56 +34,29 @@ module.exports = function(context) { * @private */ function checkParams(node) { - var params = {}, - dups = {}; + var variables = context.getDeclaredVariables(node); + var keyMap = Object.create(null); + for (var i = 0; i < variables.length; ++i) { + var variable = variables[i]; - /** - * Marks a given param as either seen or duplicated. - * @param {string} name The name of the param to mark. - * @returns {void} - * @private - */ - function markParam(name) { - if (params.hasOwnProperty(name)) { - dups[name] = 1; - } else { - params[name] = 1; + // TODO(nagashima): Remove this duplication check after https://github.com/estools/escope/pull/79 + var key = "$" + variable.name; // to avoid __proto__. + if (!isParameter(variable.defs[0]) || keyMap[key]) { + continue; } - } - - // loop through and find each duplicate param - node.params.forEach(function(param) { - - switch (param.type) { - case "Identifier": - markParam(param.name); - break; - - case "ObjectPattern": - param.properties.forEach(function(property) { - markParam(property.key.name); - }); - break; - - case "ArrayPattern": - param.elements.forEach(function(element) { - - // Arrays can be sparse (unwanted arguments) - if (element !== null) { - markParam(element.name); - } - }); - break; - - // no default + keyMap[key] = true; + + // Checks and reports duplications. + var defs = variable.defs.filter(isParameter); + if (defs.length >= 2) { + context.report({ + node: node, + message: "Duplicate param '{{name}}'.", + data: {name: variable.name} + }); } - }); - - // log an error for each duplicate (not 2 for each) - Object.keys(dups).forEach(function(currentParam) { - context.report(node, "Duplicate param '{{key}}'.", { key: currentParam }); - }); + } } //-------------------------------------------------------------------------- diff --git a/tools/eslint/lib/rules/no-dupe-class-members.js b/tools/eslint/lib/rules/no-dupe-class-members.js new file mode 100644 index 00000000000000..c3adb2e2383c87 --- /dev/null +++ b/tools/eslint/lib/rules/no-dupe-class-members.js @@ -0,0 +1,82 @@ +/** + * @fileoverview A rule to disallow duplicate name in class members. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var stack = []; + + /** + * Gets state of a given member name. + * @param {string} name - A name of a member. + * @param {boolean} isStatic - A flag which specifies that is a static member. + * @returns {object} A state of a given member name. + * - retv.init {boolean} A flag which shows the name is declared as normal member. + * - retv.get {boolean} A flag which shows the name is declared as getter. + * - retv.set {boolean} A flag which shows the name is declared as setter. + */ + function getState(name, isStatic) { + var stateMap = stack[stack.length - 1]; + var key = "$" + name; // to avoid "__proto__". + + if (!stateMap[key]) { + stateMap[key] = { + nonStatic: {init: false, get: false, set: false}, + static: {init: false, get: false, set: false} + }; + } + + return stateMap[key][isStatic ? "static" : "nonStatic"]; + } + + return { + // Initializes the stack of state of member declarations. + "Program": function() { + stack = []; + }, + + // Initializes state of member declarations for the class. + "ClassBody": function() { + stack.push(Object.create(null)); + }, + + // Disposes the state for the class. + "ClassBody:exit": function() { + stack.pop(); + }, + + // Reports the node if its name has been declared already. + "MethodDefinition": function(node) { + if (node.computed) { + return; + } + + var name = node.key.name; + var state = getState(name, node.static); + var isDuplicate = false; + if (node.kind === "get") { + isDuplicate = (state.init || state.get); + state.get = true; + } else if (node.kind === "set") { + isDuplicate = (state.init || state.set); + state.set = true; + } else { + isDuplicate = (state.init || state.get || state.set); + state.init = true; + } + + if (isDuplicate) { + context.report(node, "Duplicate name \"{{name}}\".", {name: name}); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-dupe-keys.js b/tools/eslint/lib/rules/no-dupe-keys.js index 1f86c10d6ce187..e07f081b4b8570 100644 --- a/tools/eslint/lib/rules/no-dupe-keys.js +++ b/tools/eslint/lib/rules/no-dupe-keys.js @@ -22,13 +22,18 @@ module.exports = function(context) { var nodeProps = Object.create(null); node.properties.forEach(function(property) { + + if (property.type !== "Property") { + return; + } + var keyName = property.key.name || property.key.value, key = property.kind + "-" + keyName, checkProperty = (!property.computed || property.key.type === "Literal"); if (checkProperty) { if (nodeProps[key]) { - context.report(node, "Duplicate key '{{key}}'.", { key: keyName }); + context.report(node, property.loc.start, "Duplicate key '{{key}}'.", { key: keyName }); } else { nodeProps[key] = true; } diff --git a/tools/eslint/lib/rules/no-duplicate-case.js b/tools/eslint/lib/rules/no-duplicate-case.js index 978e63cade4241..72677f44d91c24 100644 --- a/tools/eslint/lib/rules/no-duplicate-case.js +++ b/tools/eslint/lib/rules/no-duplicate-case.js @@ -1,7 +1,9 @@ /** * @fileoverview Rule to disallow a duplicate case label. - * @author Dieter Oberkofler + * @author Dieter Oberkofler + * @author Burak Yigit Kaya * @copyright 2015 Dieter Oberkofler. All rights reserved. + * @copyright 2015 Burak Yigit Kaya. All rights reserved. */ "use strict"; @@ -12,56 +14,20 @@ module.exports = function(context) { - /** - * Get a hash value for the node - * @param {ASTNode} node The node. - * @returns {string} A hash value for the node. - * @private - */ - function getHash(node) { - if (node.type === "Literal") { - return node.type + typeof node.value + node.value; - } else if (node.type === "Identifier") { - return node.type + typeof node.name + node.name; - } else if (node.type === "MemberExpression") { - return node.type + getHash(node.object) + getHash(node.property); - } else if (node.type === "CallExpression") { - return node.type + getHash(node.callee) + node.arguments.map(getHash).join(""); - } else if (node.type === "BinaryExpression") { - return node.type + getHash(node.left) + node.operator + getHash(node.right); - } else if (node.type === "ConditionalExpression") { - return node.type + getHash(node.test) + getHash(node.consequent) + getHash(node.alternate); - } - } - - var switchStatement = []; - return { + "SwitchStatement": function(node) { + var mapping = {}; - "SwitchStatement": function(/*node*/) { - switchStatement.push({}); - }, - - "SwitchStatement:exit": function(/*node*/) { - switchStatement.pop(); - }, - - "SwitchCase": function(node) { - var currentSwitch = switchStatement[switchStatement.length - 1], - hashValue; - - if (node.test) { - hashValue = getHash(node.test); - if (typeof hashValue !== "undefined" && currentSwitch.hasOwnProperty(hashValue)) { - context.report(node, "Duplicate case label."); + node.cases.forEach(function(switchCase) { + var key = context.getSource(switchCase.test); + if (mapping[key]) { + context.report(switchCase, "Duplicate case label."); } else { - currentSwitch[hashValue] = true; + mapping[key] = switchCase; } - } + }); } - }; - }; module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-else-return.js b/tools/eslint/lib/rules/no-else-return.js index df674c4753c5b6..29b53842eb2a48 100644 --- a/tools/eslint/lib/rules/no-else-return.js +++ b/tools/eslint/lib/rules/no-else-return.js @@ -80,15 +80,30 @@ module.exports = function(context) { /** * Check the consequent/body node to make sure it is not * a ReturnStatement or an IfStatement that returns on both - * code paths. If it is, display the context report. + * code paths. * * @param {Node} node The consequent or body node * @param {Node} alternate The alternate node - * @returns {void} + * @returns {boolean} `true` if it is a Return/If node that always returns. + */ + function checkForReturnOrIf(node) { + return checkForReturn(node) || checkForIf(node); + } + + + /** + * Check whether a node returns in every codepath. + * @param {Node} node The node to be checked + * @returns {boolean} `true` if it returns on every codepath. */ - function checkForReturnOrIf(node, alternate) { - if (checkForReturn(node) || checkForIf(node)) { - displayReport(alternate); + function alwaysReturns(node) { + // If we have a BlockStatement, check each consequent body node. + if (node.type === "BlockStatement") { + return node.body.some(checkForReturnOrIf); + // If not a block statement, make sure the consequent isn't a ReturnStatement + // or an IfStatement with returns on both paths + } else { + return checkForReturnOrIf(node); } } @@ -98,23 +113,27 @@ module.exports = function(context) { return { - "IfStatement": function (node) { - // Don't bother finding a ReturnStatement, if there's no `else` - // or if the alternate is also an if (indicating an else if). - if (hasElse(node)) { - var consequent = node.consequent, - alternate = node.alternate; - // If we have a BlockStatement, check each consequent body node. - if (consequent.type === "BlockStatement") { - var body = consequent.body; - body.forEach(function (bodyNode) { - checkForReturnOrIf(bodyNode, alternate); - }); - // If not a block statement, make sure the consequent isn't a ReturnStatement - // or an IfStatement with returns on both paths - } else { - checkForReturnOrIf(consequent, alternate); + "IfStatement": function(node) { + var parent = context.getAncestors().pop(), + consequents, + alternate; + + // Only "top-level" if statements are checked, meaning the first `if` + // in a `if-else-if-...` chain. + if (parent.type === "IfStatement" && parent.alternate === node) { + return; + } + + for (consequents = []; node.type === "IfStatement"; node = node.alternate) { + if (!node.alternate) { + return; } + consequents.push(node.consequent); + alternate = node.alternate; + } + + if (consequents.every(alwaysReturns)) { + displayReport(alternate); } } diff --git a/tools/eslint/lib/rules/no-empty-character-class.js b/tools/eslint/lib/rules/no-empty-character-class.js index ccb01bd40c801e..b201da44f45627 100644 --- a/tools/eslint/lib/rules/no-empty-character-class.js +++ b/tools/eslint/lib/rules/no-empty-character-class.js @@ -41,3 +41,5 @@ module.exports = function(context) { }; }; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-empty-class.js b/tools/eslint/lib/rules/no-empty-class.js deleted file mode 100644 index 94564f44988830..00000000000000 --- a/tools/eslint/lib/rules/no-empty-class.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @fileoverview Rule to flag the use of empty character classes in regular expressions - * @author Ian Christian Myers - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/* -plain-English description of the following regexp: -0. `^` fix the match at the beginning of the string -1. `\/`: the `/` that begins the regexp -2. `([^\\[]|\\.|\[([^\\\]]|\\.)+\])*`: regexp contents; 0 or more of the following - 2.0. `[^\\[]`: any character that's not a `\` or a `[` (anything but escape sequences and character classes) - 2.1. `\\.`: an escape sequence - 2.2. `\[([^\\\]]|\\.)+\]`: a character class that isn't empty -3. `\/` the `/` that ends the regexp -4. `[gimy]*`: optional regexp flags -5. `$`: fix the match at the end of the string -*/ -var regex = /^\/([^\\[]|\\.|\[([^\\\]]|\\.)+\])*\/[gimy]*$/; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - return { - - "Literal": function(node) { - var token = context.getFirstToken(node); - if (token.type === "RegularExpression" && !regex.test(token.value)) { - context.report(node, "Empty class."); - } - } - - }; - -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-empty-label.js b/tools/eslint/lib/rules/no-empty-label.js index f15694f6d0dc8c..126560046d1e38 100644 --- a/tools/eslint/lib/rules/no-empty-label.js +++ b/tools/eslint/lib/rules/no-empty-label.js @@ -17,7 +17,7 @@ module.exports = function(context) { var type = node.body.type; if (type !== "ForStatement" && type !== "WhileStatement" && type !== "DoWhileStatement" && type !== "SwitchStatement" && type !== "ForInStatement" && type !== "ForOfStatement") { - context.report(node, "Unexpected label {{l}}", {l: node.label.name}); + context.report(node, "Unexpected label \"{{l}}\"", {l: node.label.name}); } } }; diff --git a/tools/eslint/lib/rules/no-empty-pattern.js b/tools/eslint/lib/rules/no-empty-pattern.js new file mode 100644 index 00000000000000..aa8515ad191317 --- /dev/null +++ b/tools/eslint/lib/rules/no-empty-pattern.js @@ -0,0 +1,28 @@ +/** + * @fileoverview Rule to disallow an empty pattern + * @author Alberto Rodríguez + * @copyright 2015 Alberto Rodríguez. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + return { + "ObjectPattern": function(node) { + if (node.properties.length === 0) { + context.report(node, "Unexpected empty object pattern."); + } + }, + "ArrayPattern": function(node) { + if (node.elements.length === 0) { + context.report(node, "Unexpected empty array pattern."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-ex-assign.js b/tools/eslint/lib/rules/no-ex-assign.js index e9fd94bb775bf4..e658e475b46b27 100644 --- a/tools/eslint/lib/rules/no-ex-assign.js +++ b/tools/eslint/lib/rules/no-ex-assign.js @@ -5,36 +5,31 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - var catchStack = []; + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(function(reference) { + context.report( + reference.identifier, + "Do not assign to the exception parameter."); + }); + } return { - "CatchClause": function(node) { - catchStack.push(node.param.name); - }, - - "CatchClause:exit": function() { - catchStack.pop(); - }, - - "AssignmentExpression": function(node) { - - if (catchStack.length > 0) { - - var exceptionName = catchStack[catchStack.length - 1]; - - if (node.left.name && node.left.name === exceptionName) { - context.report(node, "Do not assign to the exception parameter."); - } - } + context.getDeclaredVariables(node).forEach(checkVariable); } - }; }; diff --git a/tools/eslint/lib/rules/no-extend-native.js b/tools/eslint/lib/rules/no-extend-native.js index 28404194b4dd45..49e139a29b524c 100644 --- a/tools/eslint/lib/rules/no-extend-native.js +++ b/tools/eslint/lib/rules/no-extend-native.js @@ -9,11 +9,7 @@ // Requirements //------------------------------------------------------------------------------ -var BUILTINS = [ - "Object", "Function", "Array", "String", "Boolean", "Number", "Date", - "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", - "SyntaxError", "TypeError", "URIError" -]; +var globals = require("globals"); //------------------------------------------------------------------------------ // Rule Definition @@ -23,10 +19,12 @@ module.exports = function(context) { var config = context.options[0] || {}; var exceptions = config.exceptions || []; - var modifiedBuiltins = BUILTINS; + var modifiedBuiltins = Object.keys(globals.builtin).filter(function(builtin) { + return builtin[0].toUpperCase() === builtin[0]; + }); if (exceptions.length) { - modifiedBuiltins = BUILTINS.filter(function(builtIn) { + modifiedBuiltins = modifiedBuiltins.filter(function(builtIn) { return exceptions.indexOf(builtIn) === -1; }); } @@ -56,22 +54,21 @@ module.exports = function(context) { }); }, - // handle the Object.defineProperty(Array.prototype) case + // handle the Object.definePropert[y|ies](Array.prototype) case "CallExpression": function(node) { var callee = node.callee, subject, object; - // only worry about Object.defineProperty + // only worry about Object.definePropert[y|ies] if (callee.type === "MemberExpression" && callee.object.name === "Object" && - callee.property.name === "defineProperty") { + (callee.property.name === "defineProperty" || callee.property.name === "defineProperties")) { // verify the object being added to is a native prototype subject = node.arguments[0]; - object = subject.object; - + object = subject && subject.object; if (object && object.type === "Identifier" && (modifiedBuiltins.indexOf(object.name) > -1) && diff --git a/tools/eslint/lib/rules/no-extra-bind.js b/tools/eslint/lib/rules/no-extra-bind.js index 58ba05b74187df..6e16a53ac09914 100644 --- a/tools/eslint/lib/rules/no-extra-bind.js +++ b/tools/eslint/lib/rules/no-extra-bind.js @@ -2,6 +2,7 @@ * @fileoverview Rule to flag unnecessary bind calls * @author Bence Dányi * @copyright 2014 Bence Dányi. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -56,8 +57,10 @@ module.exports = function(context) { } }, "CallExpression:exit": function(node) { - var top = getTopScope(); - if (top.call === node && top.found === 0) { + var top = getTopScope(), + isArrowFunction = node.callee.type === "MemberExpression" && node.callee.object.type === "ArrowFunctionExpression"; + + if (top.call === node && (top.found === 0 || isArrowFunction)) { context.report(node, "The function binding is unnecessary."); scope.pop(); } diff --git a/tools/eslint/lib/rules/no-extra-boolean-cast.js b/tools/eslint/lib/rules/no-extra-boolean-cast.js index d27f3609a9a2a7..68c39fbb44f37f 100644 --- a/tools/eslint/lib/rules/no-extra-boolean-cast.js +++ b/tools/eslint/lib/rules/no-extra-boolean-cast.js @@ -12,7 +12,7 @@ module.exports = function(context) { return { - "UnaryExpression": function (node) { + "UnaryExpression": function(node) { var ancestors = context.getAncestors(), parent = ancestors.pop(), grandparent = ancestors.pop(); diff --git a/tools/eslint/lib/rules/no-extra-parens.js b/tools/eslint/lib/rules/no-extra-parens.js index 12b4c5d8761a51..29a716dd445b7d 100644 --- a/tools/eslint/lib/rules/no-extra-parens.js +++ b/tools/eslint/lib/rules/no-extra-parens.js @@ -2,6 +2,7 @@ * @fileoverview Disallow parenthesising higher precedence subexpressions. * @author Michael Ficarra * @copyright 2014 Michael Ficarra. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; @@ -74,6 +75,74 @@ module.exports = function(context) { return ruleApplies(node) && isParenthesisedTwice(node); } + /** + * Checks whether or not a given node is located at the head of ExpressionStatement. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is located at the head of ExpressionStatement. + */ + function isHeadOfExpressionStatement(node) { + var parent = node.parent; + while (parent) { + switch (parent.type) { + case "SequenceExpression": + if (parent.expressions[0] !== node || isParenthesised(node)) { + return false; + } + break; + + case "UnaryExpression": + case "UpdateExpression": + if (parent.prefix || isParenthesised(node)) { + return false; + } + break; + + case "BinaryExpression": + case "LogicalExpression": + if (parent.left !== node || isParenthesised(node)) { + return false; + } + break; + + case "ConditionalExpression": + if (parent.test !== node || isParenthesised(node)) { + return false; + } + break; + + case "CallExpression": + if (parent.callee !== node || isParenthesised(node)) { + return false; + } + break; + + case "MemberExpression": + if (parent.object !== node || isParenthesised(node)) { + return false; + } + break; + + case "ExpressionStatement": + return true; + + default: + return false; + } + + node = parent; + parent = parent.parent; + } + + /* istanbul ignore next */ + throw new Error("unreachable"); + } + + /** + * Get the precedence level based on the node type + * @param {ASTNode} node node to evaluate + * @returns {int} precedence level + * @private + */ function precedence(node) { switch (node.type) { @@ -149,17 +218,35 @@ module.exports = function(context) { return 18; } + /** + * Report the node + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function report(node) { var previousToken = context.getTokenBefore(node); context.report(node, previousToken.loc.start, "Gratuitous parentheses around expression."); } + /** + * Evaluate Unary update + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function dryUnaryUpdate(node) { if (hasExcessParens(node.argument) && precedence(node.argument) >= precedence(node)) { report(node.argument); } } + /** + * Evaluate a new call + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function dryCallNew(node) { if (hasExcessParens(node.callee) && precedence(node.callee) >= precedence(node) && !( node.type === "CallExpression" && @@ -182,6 +269,12 @@ module.exports = function(context) { } } + /** + * Evaluate binary logicals + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function dryBinaryLogical(node) { var prec = precedence(node); if (hasExcessParens(node.left) && precedence(node.left) >= prec) { @@ -239,11 +332,26 @@ module.exports = function(context) { }, "ExpressionStatement": function(node) { var firstToken; - if (hasExcessParens(node.expression) && node.expression.type !== "CallExpression") { + if (hasExcessParens(node.expression)) { firstToken = context.getFirstToken(node.expression); + // Pure object literals ({}) do not need parentheses but // member expressions do ({}.toString()) - if (firstToken.value !== "{" || node.expression.type === "ObjectExpression") { + if (( + firstToken.value !== "{" || + node.expression.type === "ObjectExpression" + ) && + // For such as `(function(){}.foo.bar)` + ( + firstToken.value !== "function" || + node.expression.type === "FunctionExpression" + ) && + // For such as `(class{}.foo.bar)` + ( + firstToken.value !== "class" || + node.expression.type === "ClassExpression" + ) + ) { report(node.expression); } } @@ -291,6 +399,11 @@ module.exports = function(context) { // RegExp literal is allowed to have parens (#1589) (node.object.type === "Literal" && node.object.regex) ) + ) && + !( + (node.object.type === "FunctionExpression" || node.object.type === "ClassExpression") && + isHeadOfExpressionStatement(node) && + !hasDoubleExcessParens(node.object) ) ) { report(node.object); diff --git a/tools/eslint/lib/rules/no-extra-semi.js b/tools/eslint/lib/rules/no-extra-semi.js index a3897ef2275073..04c1eca9b06b8d 100644 --- a/tools/eslint/lib/rules/no-extra-semi.js +++ b/tools/eslint/lib/rules/no-extra-semi.js @@ -17,7 +17,13 @@ module.exports = function(context) { * @returns {void} */ function report(nodeOrToken) { - context.report(nodeOrToken, "Unnecessary semicolon."); + context.report({ + node: nodeOrToken, + message: "Unnecessary semicolon.", + fix: function(fixer) { + return fixer.remove(nodeOrToken); + } + }); } /** @@ -40,11 +46,18 @@ module.exports = function(context) { return { /** - * Reports this empty statement. + * Reports this empty statement, except if the parent node is a loop. * @param {Node} node - A EmptyStatement node to be reported. * @returns {void} */ - "EmptyStatement": report, + "EmptyStatement": function(node) { + var parent = node.parent, + allowedParentTypes = ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]; + + if (allowedParentTypes.indexOf(parent.type) === -1) { + report(node); + } + }, /** * Checks tokens from the head of this class body to the first MethodDefinition or the end of this class body. diff --git a/tools/eslint/lib/rules/no-extra-strict.js b/tools/eslint/lib/rules/no-extra-strict.js deleted file mode 100644 index a6b3bc1855ee5b..00000000000000 --- a/tools/eslint/lib/rules/no-extra-strict.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @fileoverview Rule to flag unnecessary strict directives. - * @author Ian Christian Myers - * @copyright 2014 Ian Christian Myers. All rights reserved. - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - function directives(block) { - var ds = [], body = block.body, e, i, l; - - if (body) { - for (i = 0, l = body.length; i < l; ++i) { - e = body[i]; - - if ( - e.type === "ExpressionStatement" && - e.expression.type === "Literal" && - typeof e.expression.value === "string" - ) { - ds.push(e.expression); - } else { - break; - } - } - } - - return ds; - } - - function isStrict(directive) { - return directive.value === "use strict"; - } - - function checkForUnnecessaryUseStrict(node) { - var useStrictDirectives = directives(node).filter(isStrict), - scope, - upper; - - switch (useStrictDirectives.length) { - case 0: - break; - - case 1: - scope = context.getScope(); - upper = scope.upper; - - if (upper && upper.functionExpressionScope) { - upper = upper.upper; - } - - if (upper && upper.isStrict) { - context.report(useStrictDirectives[0], "Unnecessary 'use strict'."); - } - break; - - default: - context.report(useStrictDirectives[1], "Multiple 'use strict' directives."); - } - } - - return { - - "Program": checkForUnnecessaryUseStrict, - - "ArrowFunctionExpression": function(node) { - checkForUnnecessaryUseStrict(node.body); - }, - - "FunctionExpression": function(node) { - checkForUnnecessaryUseStrict(node.body); - }, - - "FunctionDeclaration": function(node) { - checkForUnnecessaryUseStrict(node.body); - } - }; - -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-fallthrough.js b/tools/eslint/lib/rules/no-fallthrough.js index e5974420385871..98334e3fc55e4e 100644 --- a/tools/eslint/lib/rules/no-fallthrough.js +++ b/tools/eslint/lib/rules/no-fallthrough.js @@ -5,7 +5,7 @@ "use strict"; -var FALLTHROUGH_COMMENT = /falls\sthrough/; +var FALLTHROUGH_COMMENT = /falls?\s?through/i; //------------------------------------------------------------------------------ // Rule Definition @@ -48,8 +48,7 @@ module.exports = function(context) { // check for comment if (!comment || !FALLTHROUGH_COMMENT.test(comment.value)) { - - context.report(switchData.lastCase, + context.report(node, "Expected a \"break\" statement before \"{{code}}\".", { code: node.test ? "case" : "default" }); } diff --git a/tools/eslint/lib/rules/no-func-assign.js b/tools/eslint/lib/rules/no-func-assign.js index a711f572a1f1f8..642d28792731c7 100644 --- a/tools/eslint/lib/rules/no-func-assign.js +++ b/tools/eslint/lib/rules/no-func-assign.js @@ -6,76 +6,80 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - //-------------------------------------------------------------------------- - // Helpers - //-------------------------------------------------------------------------- + var unresolved = Object.create(null); - /* - * Walk the scope chain looking for either a FunctionDeclaration or a - * VariableDeclaration with the same name as left-hand side of the - * AssignmentExpression. If we find the FunctionDeclaration first, then we - * warn, because a FunctionDeclaration is trying to become a Variable or a - * FunctionExpression. If we find a VariableDeclaration first, then we have - * a legitimate shadow variable. + /** + * Collects unresolved references from the global scope, then creates a map to references from its name. + * Usage of the map is explained at `checkVariable(variable)`. + * @returns {void} */ - function checkIfIdentifierIsFunction(scope, name) { - var variable, - def, - i, - j; - - // Loop over all of the identifiers available in scope. - for (i = 0; i < scope.variables.length; i++) { - variable = scope.variables[i]; - - // For each identifier, see if it was defined in _this_ scope. - for (j = 0; j < variable.defs.length; j++) { - def = variable.defs[j]; + function collectUnresolvedReferences() { + unresolved = Object.create(null); - // Identifier is a function and was declared in this scope - if (def.type === "FunctionName" && def.name.name === name) { - return true; - } + var references = context.getScope().through; + for (var i = 0; i < references.length; ++i) { + var reference = references[i]; + var name = reference.identifier.name; - // Identifier is a variable and was declared in this scope. This - // is a legitimate shadow variable. - if (def.name && def.name.name === name) { - return false; - } + if (name in unresolved === false) { + unresolved[name] = []; } + unresolved[name].push(reference); } - - // Check the upper scope. - if (scope.upper) { - return checkIfIdentifierIsFunction(scope.upper, name); - } - - // We've reached the global scope and haven't found anything. - return false; } - //-------------------------------------------------------------------------- - // Public API - //-------------------------------------------------------------------------- - - return { - - "AssignmentExpression": function(node) { - var scope = context.getScope(), - name = node.left.name; + /** + * Reports a reference if is non initializer and writable. + * @param {References} references - Collection of reference to check. + * @returns {void} + */ + function checkReference(references) { + astUtils.getModifyingReferences(references).forEach(function(reference) { + context.report( + reference.identifier, + "'{{name}}' is a function.", + {name: reference.identifier.name}); + }); + } - if (checkIfIdentifierIsFunction(scope, name)) { - context.report(node, "'{{name}}' is a function.", { name: name }); + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + if (variable.defs[0].type === "FunctionName") { + // If the function is in global scope, its references are not resolved (by escope's design). + // So when references of the function are nothing, this checks in unresolved. + if (variable.references.length > 0) { + checkReference(variable.references); + } else if (unresolved[variable.name]) { + checkReference(unresolved[variable.name]); } - } + } + /** + * Checks parameters of a given function node. + * @param {ASTNode} node - A function node to check. + * @returns {void} + */ + function checkForFunction(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + + return { + "Program": collectUnresolvedReferences, + "FunctionDeclaration": checkForFunction, + "FunctionExpression": checkForFunction }; }; diff --git a/tools/eslint/lib/rules/no-implicit-coercion.js b/tools/eslint/lib/rules/no-implicit-coercion.js new file mode 100644 index 00000000000000..595412b184c62f --- /dev/null +++ b/tools/eslint/lib/rules/no-implicit-coercion.js @@ -0,0 +1,220 @@ +/** + * @fileoverview A rule to disallow the type conversions with shorter notations. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +var INDEX_OF_PATTERN = /^(?:i|lastI)ndexOf$/; + +/** + * Parses and normalizes an option object. + * @param {object} options - An option object to parse. + * @returns {object} The parsed and normalized option object. + */ +function parseOptions(options) { + options = options || {}; + return { + boolean: "boolean" in options ? Boolean(options.boolean) : true, + number: "number" in options ? Boolean(options.number) : true, + string: "string" in options ? Boolean(options.string) : true + }; +} + +/** + * Checks whether or not a node is a double logical nigating. + * @param {ASTNode} node - An UnaryExpression node to check. + * @returns {boolean} Whether or not the node is a double logical nigating. + */ +function isDoubleLogicalNegating(node) { + return ( + node.operator === "!" && + node.argument.type === "UnaryExpression" && + node.argument.operator === "!" + ); +} + +/** + * Checks whether or not a node is a binary negating of `.indexOf()` method calling. + * @param {ASTNode} node - An UnaryExpression node to check. + * @returns {boolean} Whether or not the node is a binary negating of `.indexOf()` method calling. + */ +function isBinaryNegatingOfIndexOf(node) { + return ( + node.operator === "~" && + node.argument.type === "CallExpression" && + node.argument.callee.type === "MemberExpression" && + node.argument.callee.property.type === "Identifier" && + INDEX_OF_PATTERN.test(node.argument.callee.property.name) + ); +} + +/** + * Checks whether or not a node is a multiplying by one. + * @param {BinaryExpression} node - A BinaryExpression node to check. + * @returns {boolean} Whether or not the node is a multiplying by one. + */ +function isMultiplyByOne(node) { + return node.operator === "*" && ( + node.left.type === "Literal" && node.left.value === 1 || + node.right.type === "Literal" && node.right.value === 1 + ); +} + +/** + * Checks whether the result of a node is numeric or not + * @param {ASTNode} node The node to test + * @returns {boolean} true if the node is a number literal or a `Number()`, `parseInt` or `parseFloat` call + */ +function isNumeric(node) { + return ( + node.type === "Literal" && typeof node.value === "number" || + node.type === "CallExpression" && ( + node.callee.name === "Number" || + node.callee.name === "parseInt" || + node.callee.name === "parseFloat" + ) + ); +} + +/** + * Returns the first non-numeric operand in a BinaryExpression. Designed to be + * used from bottom to up since it walks up the BinaryExpression trees using + * node.parent to find the result. + * @param {BinaryExpression} node The BinaryExpression node to be walked up on + * @returns {ASTNode|undefined} The first non-numeric item in the BinaryExpression tree or undefined + */ +function getNonNumericOperand(node) { + var left = node.left, right = node.right; + + if (right.type !== "BinaryExpression" && !isNumeric(right)) { + return right; + } + + if (left.type !== "BinaryExpression" && !isNumeric(left)) { + return left; + } +} + +/** + * Checks whether or not a node is a concatenating with an empty string. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {boolean} Whether or not the node is a concatenating with an empty string. + */ +function isConcatWithEmptyString(node) { + return node.operator === "+" && ( + (node.left.type === "Literal" && node.left.value === "") || + (node.right.type === "Literal" && node.right.value === "") + ); +} + +/** + * Checks whether or not a node is appended with an empty string. + * @param {ASTNode} node - An AssignmentExpression node to check. + * @returns {boolean} Whether or not the node is appended with an empty string. + */ +function isAppendEmptyString(node) { + return node.operator === "+=" && node.right.type === "Literal" && node.right.value === ""; +} + +/** + * Gets a node that is the left or right operand of a node, is not the specified literal. + * @param {ASTNode} node - A BinaryExpression node to get. + * @param {any} value - A literal value to check. + * @returns {ASTNode} A node that is the left or right operand of the node, is not the specified literal. + */ +function getOtherOperand(node, value) { + if (node.left.type === "Literal" && node.left.value === value) { + return node.right; + } + return node.left; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var options = parseOptions(context.options[0]); + + return { + "UnaryExpression": function(node) { + // !!foo + if (options.boolean && isDoubleLogicalNegating(node)) { + context.report( + node, + "use `Boolean({{code}})` instead.", + {code: context.getSource(node.argument.argument)}); + } + + // ~foo.indexOf(bar) + if (options.boolean && isBinaryNegatingOfIndexOf(node)) { + context.report( + node, + "use `{{code}} !== -1` instead.", + {code: context.getSource(node.argument)}); + } + + // +foo + if (options.number && node.operator === "+" && !isNumeric(node.argument)) { + context.report( + node, + "use `Number({{code}})` instead.", + {code: context.getSource(node.argument)}); + } + }, + + // Use `:exit` to prevent double reporting + "BinaryExpression:exit": function(node) { + // 1 * foo + var nonNumericOperand = options.number && isMultiplyByOne(node) && getNonNumericOperand(node); + if (nonNumericOperand) { + context.report( + node, + "use `Number({{code}})` instead.", + {code: context.getSource(nonNumericOperand)}); + } + + // "" + foo + if (options.string && isConcatWithEmptyString(node)) { + context.report( + node, + "use `String({{code}})` instead.", + {code: context.getSource(getOtherOperand(node, ""))}); + } + }, + + "AssignmentExpression": function(node) { + // foo += "" + if (options.string && isAppendEmptyString(node)) { + context.report( + node, + "use `{{code}} = String({{code}})` instead.", + {code: context.getSource(getOtherOperand(node, ""))}); + } + } + }; +}; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "boolean" + }, + "string": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-implied-eval.js b/tools/eslint/lib/rules/no-implied-eval.js index 7fdc2f114ded38..971b7b4c765fc2 100644 --- a/tools/eslint/lib/rules/no-implied-eval.js +++ b/tools/eslint/lib/rules/no-implied-eval.js @@ -12,51 +12,86 @@ //------------------------------------------------------------------------------ module.exports = function(context) { - var IMPLIED_EVAL = /set(?:Timeout|Interval)/; + var CALLEE_RE = /set(?:Timeout|Interval)|execScript/; + + // Figures out if we should inspect a given binary expression. Is a stack of + // stacks, where the first element in each substack is a CallExpression. + var impliedEvalAncestorsStack = []; //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- /** - * Checks if the first argument of a given CallExpression node is a string literal. - * @param {ASTNode} node The CallExpression node the check. - * @returns {boolean} True if the first argument is a string literal, false if not. + * Get the last element of an array, without modifying arr, like pop(), but non-destructive. + * @param {array} arr What to inspect + * @returns {*} The last element of arr + * @private */ - function hasStringLiteralArgument(node) { - var firstArgument = node.arguments[0]; - - return firstArgument && firstArgument.type === "Literal" && typeof firstArgument.value === "string"; + function last(arr) { + return arr ? arr[arr.length - 1] : null; } /** - * Checks if the given MemberExpression node is window.setTimeout or window.setInterval. + * Checks if the given MemberExpression node is a potentially implied eval identifier on window. * @param {ASTNode} node The MemberExpression node to check. - * @returns {boolean} Whether or not the given node is window.set*. + * @returns {boolean} Whether or not the given node is potentially an implied eval. + * @private */ - function isSetMemberExpression(node) { + function isImpliedEvalMemberExpression(node) { var object = node.object, property = node.property, - hasSetPropertyName = IMPLIED_EVAL.test(property.name) || IMPLIED_EVAL.test(property.value); - - return object.name === "window" && hasSetPropertyName; + hasImpliedEvalName = CALLEE_RE.test(property.name) || CALLEE_RE.test(property.value); + return object.name === "window" && hasImpliedEvalName; } /** - * Determines if a node represents a call to setTimeout/setInterval with - * a string argument. - * @param {ASTNode} node The node to check. + * Determines if a node represents a call to a potentially implied eval. + * + * This checks the callee name and that there's an argument, but not the type of the argument. + * + * @param {ASTNode} node The CallExpression to check. * @returns {boolean} True if the node matches, false if not. * @private */ - function isImpliedEval(node) { + function isImpliedEvalCallExpression(node) { var isMemberExpression = (node.callee.type === "MemberExpression"), isIdentifier = (node.callee.type === "Identifier"), - isSetMethod = (isIdentifier && IMPLIED_EVAL.test(node.callee.name)) || - (isMemberExpression && isSetMemberExpression(node.callee)); + isImpliedEvalCallee = + (isIdentifier && CALLEE_RE.test(node.callee.name)) || + (isMemberExpression && isImpliedEvalMemberExpression(node.callee)); + + return isImpliedEvalCallee && node.arguments.length; + } - return isSetMethod && hasStringLiteralArgument(node); + /** + * Checks that the parent is a direct descendent of an potential implied eval CallExpression, and if the parent is a CallExpression, that we're the first argument. + * @param {ASTNode} node The node to inspect the parent of. + * @returns {boolean} Was the parent a direct descendent, and is the child therefore potentially part of a dangerous argument? + * @private + */ + function hasImpliedEvalParent(node) { + // make sure our parent is marked + return node.parent === last(last(impliedEvalAncestorsStack)) && + // if our parent is a CallExpression, make sure we're the first argument + (node.parent.type !== "CallExpression" || node === node.parent.arguments[0]); + } + + /** + * Checks if our parent is marked as part of an implied eval argument. If + * so, collapses the top of impliedEvalAncestorsStack and reports on the + * original CallExpression. + * @param {ASTNode} node The CallExpression to check. + * @returns {boolean} True if the node matches, false if not. + * @private + */ + function checkString(node) { + if (hasImpliedEvalParent(node)) { + // remove the entire substack, to avoid duplicate reports + var substack = impliedEvalAncestorsStack.pop(); + context.report(substack[0], "Implied eval. Consider passing a function instead of a string."); + } } //-------------------------------------------------------------------------- @@ -65,9 +100,41 @@ module.exports = function(context) { return { "CallExpression": function(node) { - if (isImpliedEval(node)) { - context.report(node, "Implied eval. Consider passing a function instead of a string."); + if (isImpliedEvalCallExpression(node)) { + // call expressions create a new substack + impliedEvalAncestorsStack.push([node]); } + }, + + "CallExpression:exit": function(node) { + if (node === last(last(impliedEvalAncestorsStack))) { + // destroys the entire sub-stack, rather than just using + // last(impliedEvalAncestorsStack).pop(), as a CallExpression is + // always the bottom of a impliedEvalAncestorsStack substack. + impliedEvalAncestorsStack.pop(); + } + }, + + "BinaryExpression": function(node) { + if (node.operator === "+" && hasImpliedEvalParent(node)) { + last(impliedEvalAncestorsStack).push(node); + } + }, + + "BinaryExpression:exit": function(node) { + if (node === last(last(impliedEvalAncestorsStack))) { + last(impliedEvalAncestorsStack).pop(); + } + }, + + "Literal": function(node) { + if (typeof node.value === "string") { + checkString(node); + } + }, + + "TemplateLiteral": function(node) { + checkString(node); } }; diff --git a/tools/eslint/lib/rules/no-inline-comments.js b/tools/eslint/lib/rules/no-inline-comments.js index 3941fd24c0fc21..4048802bc8c46a 100644 --- a/tools/eslint/lib/rules/no-inline-comments.js +++ b/tools/eslint/lib/rules/no-inline-comments.js @@ -5,6 +5,8 @@ */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -28,8 +30,11 @@ module.exports = function(context) { // Also check after the comment var postamble = endLine.slice(node.loc.end.column).trim(); + // Check that this comment isn't an ESLint directive + var isDirective = astUtils.isDirectiveComment(node); + // Should be empty if there was only whitespace around the comment - if (preamble || postamble) { + if (!isDirective && (preamble || postamble)) { context.report(node, "Unexpected comment inline with code."); } } diff --git a/tools/eslint/lib/rules/no-invalid-regexp.js b/tools/eslint/lib/rules/no-invalid-regexp.js index 63608c6c47497e..d46f9cb072e244 100644 --- a/tools/eslint/lib/rules/no-invalid-regexp.js +++ b/tools/eslint/lib/rules/no-invalid-regexp.js @@ -17,17 +17,29 @@ var espree = require("espree"); module.exports = function(context) { + /** + * Check if node is a string + * @param {ASTNode} node node to evaluate + * @returns {boolean} True if its a string + * @private + */ function isString(node) { return node && node.type === "Literal" && typeof node.value === "string"; } + /** + * Validate strings passed to the RegExp constructor + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function check(node) { if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) { var flags = isString(node.arguments[1]) ? node.arguments[1].value : ""; try { void new RegExp(node.arguments[0].value); - } catch(e) { + } catch (e) { context.report(node, e.message); } diff --git a/tools/eslint/lib/rules/no-invalid-this.js b/tools/eslint/lib/rules/no-invalid-this.js new file mode 100644 index 00000000000000..37c67de0b5d5e8 --- /dev/null +++ b/tools/eslint/lib/rules/no-invalid-this.js @@ -0,0 +1,350 @@ +/** + * @fileoverview A rule to disallow `this` keywords outside of classes or class-like objects. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +var thisTagPattern = /^[\s\*]*@this/m; +var anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/; +var bindOrCallOrApplyPattern = /^(?:bind|call|apply)$/; +var arrayOrTypedArrayPattern = /Array$/; +var arrayMethodPattern = /^(?:every|filter|find|findIndex|forEach|map|some)$/; + +/** + * Checks whether or not a node is a constructor. + * @param {ASTNode} node - A function node to check. + * @returns {boolean} Wehether or not a node is a constructor. + */ +function isES5Constructor(node) { + return ( + node.id && + node.id.name[0] === node.id.name[0].toLocaleUpperCase() + ); +} + +/** + * Finds a function node from ancestors of a node. + * @param {ASTNode} node - A start node to find. + * @returns {Node|null} A found function node. + */ +function getUpperFunction(node) { + while (node) { + if (anyFunctionPattern.test(node.type)) { + return node; + } + node = node.parent; + } + return null; +} + +/** + * Checks whether or not a node is callee. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is callee. + */ +function isCallee(node) { + return node.parent.type === "CallExpression" && node.parent.callee === node; +} + +/** + * Checks whether or not a node is `Reclect.apply`. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a `Reclect.apply`. + */ +function isReflectApply(node) { + return ( + node.type === "MemberExpression" && + node.object.type === "Identifier" && + node.object.name === "Reflect" && + node.property.type === "Identifier" && + node.property.name === "apply" && + node.computed === false + ); +} + +/** + * Checks whether or not a node is `Array.from`. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a `Array.from`. + */ +function isArrayFrom(node) { + return ( + node.type === "MemberExpression" && + node.object.type === "Identifier" && + arrayOrTypedArrayPattern.test(node.object.name) && + node.property.type === "Identifier" && + node.property.name === "from" && + node.computed === false + ); +} + +/** + * Checks whether or not a node is a method which has `thisArg`. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a method which has `thisArg`. + */ +function isMethodWhichHasThisArg(node) { + while (node) { + if (node.type === "Identifier") { + return arrayMethodPattern.test(node.name); + } + if (node.type === "MemberExpression" && !node.computed) { + node = node.property; + continue; + } + + break; + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var stack = [], + sourceCode = context.getSourceCode(); + + + /** + * Checks whether or not a node has a `@this` tag in its comments. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node has a `@this` tag in its comments. + */ + function hasJSDocThisTag(node) { + var jsdocComment = sourceCode.getJSDocComment(node); + if (jsdocComment && thisTagPattern.test(jsdocComment.value)) { + return true; + } + + // Checks `@this` in its leading comments for callbacks, + // because callbacks don't have its JSDoc comment. + // e.g. + // sinon.test(/* @this sinon.Sandbox */function() { this.spy(); }); + return sourceCode.getComments(node).leading.some(function(comment) { + return thisTagPattern.test(comment.value); + }); + } + + /** + * Checks whether or not a node has valid `this`. + * + * First, this checks the node: + * + * - The function name starts with uppercase (it's a constructor). + * - The function has a JSDoc comment that has a @this tag. + * + * Next, this checks the location of the node. + * If the location is below, this judges `this` is valid. + * + * - The location is on an object literal. + * - The location assigns to a property. + * - The location is on an ES2015 class. + * - The location calls its `bind`/`call`/`apply` method directly. + * - The function is a callback of array methods (such as `.forEach()`) if `thisArg` is given. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} A found function node. + */ + function hasValidThis(node) { + if (isES5Constructor(node) || hasJSDocThisTag(node)) { + return true; + } + + while (node) { + var parent = node.parent; + switch (parent.type) { + // Looks up the destination. + // e.g. + // obj.foo = nativeFoo || function foo() { ... }; + case "LogicalExpression": + case "ConditionalExpression": + node = parent; + break; + + // If the upper function is IIFE, checks the destination of the return value. + // e.g. + // obj.foo = (function() { + // // setup... + // return function foo() { ... }; + // })(); + case "ReturnStatement": + var func = getUpperFunction(parent); + if (func === null || !isCallee(func)) { + return false; + } + node = func.parent; + break; + + // e.g. + // var obj = { foo() { ... } }; + // var obj = { foo: function() { ... } }; + case "Property": + return true; + + // e.g. + // obj.foo = foo() { ... }; + case "AssignmentExpression": + return ( + parent.right === node && + parent.left.type === "MemberExpression" + ); + + // e.g. + // class A { constructor() { ... } } + // class A { foo() { ... } } + // class A { get foo() { ... } } + // class A { set foo() { ... } } + // class A { static foo() { ... } } + case "MethodDefinition": + return !parent.static; + + // e.g. + // var foo = function foo() { ... }.bind(obj); + // (function foo() { ... }).call(obj); + // (function foo() { ... }).apply(obj, []); + case "MemberExpression": + return ( + parent.object === node && + parent.property.type === "Identifier" && + bindOrCallOrApplyPattern.test(parent.property.name) && + isCallee(parent) && + parent.parent.arguments.length > 0 && + !astUtils.isNullOrUndefined(parent.parent.arguments[0]) + ); + + // e.g. + // Reflect.apply(function() {}, obj, []); + // Array.from([], function() {}, obj); + // list.forEach(function() {}, obj); + case "CallExpression": + if (isReflectApply(parent.callee)) { + return ( + parent.arguments.length === 3 && + parent.arguments[0] === node && + !astUtils.isNullOrUndefined(parent.arguments[1]) + ); + } + if (isArrayFrom(parent.callee)) { + return ( + parent.arguments.length === 3 && + parent.arguments[1] === node && + !astUtils.isNullOrUndefined(parent.arguments[2]) + ); + } + if (isMethodWhichHasThisArg(parent.callee)) { + return ( + parent.arguments.length === 2 && + parent.arguments[0] === node && + !astUtils.isNullOrUndefined(parent.arguments[1]) + ); + } + return false; + + // Otherwise `this` is invalid. + default: + return false; + } + } + + /* istanbul ignore next */ + throw new Error("unreachable"); + } + + /** + * Gets the current checking context. + * + * The return value has a flag that whether or not `this` keyword is valid. + * The flag is initialized when got at the first time. + * + * @returns {{valid: boolean}} + * an object which has a flag that whether or not `this` keyword is valid. + */ + stack.getCurrent = function() { + var current = this[this.length - 1]; + if (!current.init) { + current.init = true; + current.valid = hasValidThis(current.node); + } + return current; + }; + + /** + * Pushs new checking context into the stack. + * + * The checking context is not initialized yet. + * Because most functions don't have `this` keyword. + * When `this` keyword was found, the checking context is initialized. + * + * @param {ASTNode} node - A function node that was entered. + * @returns {void} + */ + function enterFunction(node) { + // `this` can be invalid only under strict mode. + stack.push({ + init: !context.getScope().isStrict, + node: node, + valid: true + }); + } + + /** + * Pops the current checking context from the stack. + * @returns {void} + */ + function exitFunction() { + stack.pop(); + } + + return { + // `this` is invalid only under strict mode. + // Modules is always strict mode. + "Program": function(node) { + var scope = context.getScope(); + var features = context.ecmaFeatures; + + stack.push({ + init: true, + node: node, + valid: !( + scope.isStrict || + features.modules || + (features.globalReturn && scope.childScopes[0].isStrict) + ) + }); + }, + "Program:exit": function() { + stack.pop(); + }, + + "FunctionDeclaration": enterFunction, + "FunctionDeclaration:exit": exitFunction, + "FunctionExpression": enterFunction, + "FunctionExpression:exit": exitFunction, + + // Reports if `this` of the current context is invalid. + "ThisExpression": function(node) { + var current = stack.getCurrent(); + if (current && !current.valid) { + context.report(node, "Unexpected `this`."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-irregular-whitespace.js b/tools/eslint/lib/rules/no-irregular-whitespace.js index bfb30b8667ba9f..b49f747b8a08be 100644 --- a/tools/eslint/lib/rules/no-irregular-whitespace.js +++ b/tools/eslint/lib/rules/no-irregular-whitespace.js @@ -28,7 +28,7 @@ module.exports = function(context) { var locStart = node.loc.start; var locEnd = node.loc.end; - errors = errors.filter(function (error) { + errors = errors.filter(function(error) { var errorLoc = error[1]; if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) { if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) { @@ -63,7 +63,7 @@ module.exports = function(context) { function checkForIrregularWhitespace(node) { var sourceLines = context.getSourceLines(); - sourceLines.forEach(function (sourceLine, lineIndex) { + sourceLines.forEach(function(sourceLine, lineIndex) { var lineNumber = lineIndex + 1, location, match; @@ -108,7 +108,7 @@ module.exports = function(context) { } return { - "Program": function (node) { + "Program": function(node) { /** * As we can easily fire warnings for all white space issues with all the source its simpler to fire them here * This means we can check all the application code without having to worry about issues caused in the parser tokens @@ -122,11 +122,11 @@ module.exports = function(context) { "Identifier": removeInvalidNodeErrors, "Literal": removeInvalidNodeErrors, - "Program:exit": function () { + "Program:exit": function() { // If we have any errors remaining report on them - errors.forEach(function (error) { - context.report.apply(this, error); + errors.forEach(function(error) { + context.report.apply(context, error); }); } }; diff --git a/tools/eslint/lib/rules/no-label-var.js b/tools/eslint/lib/rules/no-label-var.js index 8aa944e7a85b5b..20fbfc182df41f 100644 --- a/tools/eslint/lib/rules/no-label-var.js +++ b/tools/eslint/lib/rules/no-label-var.js @@ -5,6 +5,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -15,28 +21,15 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - function findIdentifier(scope, identifier) { - var found = false; - - scope.variables.forEach(function(variable) { - if (variable.name === identifier) { - found = true; - } - }); - - scope.references.forEach(function(reference) { - if (reference.identifier.name === identifier) { - found = true; - } - }); - - // If we have not found the identifier in this scope, check the parent - // scope. - if (scope.upper && !found) { - return findIdentifier(scope.upper, identifier); - } - - return found; + /** + * Check if the identifier is present inside current scope + * @param {object} scope current scope + * @param {string} name To evaluate + * @returns {boolean} True if its present + * @private + */ + function findIdentifier(scope, name) { + return astUtils.getVariableByName(scope, name) !== null; } //-------------------------------------------------------------------------- diff --git a/tools/eslint/lib/rules/no-loop-func.js b/tools/eslint/lib/rules/no-loop-func.js index e8f5262090be42..d82d6d7cc6a0cd 100644 --- a/tools/eslint/lib/rules/no-loop-func.js +++ b/tools/eslint/lib/rules/no-loop-func.js @@ -6,44 +6,104 @@ "use strict"; +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the containing loop node of a specified node. + * + * We don't need to check nested functions, so this ignores those. + * `Scope.through` contains references of nested functions. + * + * @param {ASTNode} node - An AST node to get. + * @returns {ASTNode|null} The containing loop node of the specified node, or `null`. + */ +function getContainingLoopNode(node) { + var parent = node.parent; + while (parent) { + switch (parent.type) { + case "WhileStatement": + case "DoWhileStatement": + return parent; + + case "ForStatement": + // `init` is outside of the loop. + if (parent.init !== node) { + return parent; + } + break; + + case "ForInStatement": + case "ForOfStatement": + // `right` is outside of the loop. + if (parent.right !== node) { + return parent; + } + break; + + case "ArrowFunctionExpression": + case "FunctionExpression": + case "FunctionDeclaration": + // We don't need to check nested functions. + return null; + + default: + break; + } + + node = parent; + parent = node.parent; + } + + return null; +} + +/** + * Checks whether or not a reference refers to a variable that is block-binding in the loop. + * @param {ASTNode} loopNode - A containing loop node. + * @param {escope.Reference} reference - A reference to check. + * @returns {boolean} Whether or not a reference refers to a variable that is block-binding in the loop. + */ +function isBlockBindingsInLoop(loopNode, reference) { + // A reference to a `let`/`const` variable always has a resolved variable. + var variable = reference.resolved; + var definition = variable && variable.defs[0]; + var declaration = definition && definition.parent; + + return ( + // Checks whether this is `let`/`const`. + declaration && + declaration.type === "VariableDeclaration" && + (declaration.kind === "let" || declaration.kind === "const") && + // Checks whether this is in the loop. + declaration.range[0] > loopNode.range[0] && + declaration.range[1] < loopNode.range[1] + ); +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { /** - * Reports if the given node has an ancestor node which is a loop. + * Reports such functions: + * + * - has an ancestor node which is a loop. + * - has a reference that refers to a variable that is block-binding in the loop. + * * @param {ASTNode} node The AST node to check. * @returns {boolean} Whether or not the node is within a loop. */ function checkForLoops(node) { - var ancestors = context.getAncestors(); - - /** - * Checks if the given node is a loop and current context is in the loop. - * @param {ASTNode} ancestor The AST node to check. - * @param {number} index The index of ancestor in ancestors. - * @returns {boolean} Whether or not the node is a loop and current context is in the loop. - */ - function isInLoop(ancestor, index) { - switch (ancestor.type) { - case "ForStatement": - return ancestor.init !== ancestors[index + 1]; - - case "ForInStatement": - case "ForOfStatement": - return ancestor.right !== ancestors[index + 1]; - - case "WhileStatement": - case "DoWhileStatement": - return true; - - default: - return false; - } + var loopNode = getContainingLoopNode(node); + if (!loopNode) { + return; } - if (ancestors.some(isInLoop)) { + var references = context.getScope().through; + if (references.length > 0 && !references.every(isBlockBindingsInLoop.bind(null, loopNode))) { context.report(node, "Don't make functions within a loop"); } } diff --git a/tools/eslint/lib/rules/no-magic-numbers.js b/tools/eslint/lib/rules/no-magic-numbers.js new file mode 100644 index 00000000000000..a88b08747f5b17 --- /dev/null +++ b/tools/eslint/lib/rules/no-magic-numbers.js @@ -0,0 +1,130 @@ +/** + * @fileoverview Rule to flag statements that use magic numbers (adapted from https://github.com/danielstjules/buddy.js) + * @author Vincent Lemeunier + * @copyright 2015 Vincent Lemeunier. All rights reserved. + * + * This rule was adapted from danielstjules/buddy.js + * The MIT License (MIT) + * + * Copyright (c) 2014 Daniel St. Jules + * + * 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. + * + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var config = context.options[0] || {}, + ignore = config.ignore || [0, 1, 2], + detectObjects = !!config.detectObjects, + enforceConst = !!config.enforceConst; + + /** + * Returns whether the node is number literal + * @param {Node} node - the node literal being evaluated + * @returns {boolean} true if the node is a number literal + */ + function isNumber(node) { + return typeof node.value === "number"; + } + + /** + * Returns whether the number should be ignored + * @param {number} num - the number + * @returns {boolean} true if the number should be ignored + */ + function shouldIgnoreNumber(num) { + return ignore.indexOf(num) !== -1; + } + + + return { + "Literal": function(node) { + var parent = node.parent, + value = node.value, + raw = node.raw, + okTypes = detectObjects ? [] : ["ObjectExpression", "Property", "AssignmentExpression"]; + + if (!isNumber(node)) { + return; + } + + if (parent.type === "UnaryExpression" && parent.operator === "-") { + node = parent; + parent = node.parent; + value = -value; + raw = "-" + raw; + } + + if (shouldIgnoreNumber(value)) { + return; + } + + // don't warn on parseInt() or Number.parseInt() radix + if (parent.type === "CallExpression" && node === parent.arguments[1] && + (parent.callee.name === "parseInt" || + parent.callee.type === "MemberExpression" && + parent.callee.object.name === "Number" && + parent.callee.property.name === "parseInt") + ) { + return; + } + + if (parent.type === "VariableDeclarator") { + if (enforceConst && parent.parent.kind !== "const") { + context.report({ + node: node, + message: "Number constants declarations must use 'const'" + }); + } + } else if (okTypes.indexOf(parent.type) === -1) { + context.report({ + node: node, + message: "No magic number: " + raw + }); + } + } + }; +}; + +module.exports.schema = [{ + "type": "object", + "properties": { + "detectObjects": { + "type": "boolean" + }, + "enforceConst": { + "type": "boolean" + }, + "ignore": { + "type": "array", + "items": { + "type": "number" + }, + "uniqueItems": true + } + }, + "additionalProperties": false +}]; diff --git a/tools/eslint/lib/rules/no-mixed-requires.js b/tools/eslint/lib/rules/no-mixed-requires.js index fe2309691c0a24..eca480f132b773 100644 --- a/tools/eslint/lib/rules/no-mixed-requires.js +++ b/tools/eslint/lib/rules/no-mixed-requires.js @@ -107,7 +107,7 @@ module.exports = function(context) { function isMixed(declarations) { var contains = {}; - declarations.forEach(function (declaration) { + declarations.forEach(function(declaration) { var type = getDeclarationType(declaration.init); contains[type] = true; }); @@ -127,7 +127,7 @@ module.exports = function(context) { function isGrouped(declarations) { var found = {}; - declarations.forEach(function (declaration) { + declarations.forEach(function(declaration) { if (getDeclarationType(declaration.init) === DECL_REQUIRE) { found[inferModuleType(declaration.init)] = true; } @@ -140,7 +140,13 @@ module.exports = function(context) { return { "VariableDeclaration": function(node) { - var grouping = !!context.options[0]; + var grouping = false; + + if (typeof context.options[0] === "object") { + grouping = context.options[0].grouping; + } else { + grouping = !!context.options[0]; + } if (isMixed(node.declarations)) { context.report( @@ -160,6 +166,19 @@ module.exports = function(context) { module.exports.schema = [ { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "grouping": { + "type": "boolean" + } + }, + "additionalProperties": false + } + ] } ]; diff --git a/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js index b6e29bacf21dac..6ce27dadc74905 100644 --- a/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js +++ b/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js @@ -3,6 +3,7 @@ * @author Jary Niebur * @copyright 2014 Nicholas C. Zakas. All rights reserved. * @copyright 2014 Jary Niebur. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -12,7 +13,8 @@ module.exports = function(context) { - var smartTabs; + var smartTabs, + ignoredLocs = []; switch (context.options[0]) { case true: // Support old syntax, maybe add deprecation warning here @@ -23,8 +25,35 @@ module.exports = function(context) { smartTabs = false; } - var COMMENT_START = /^\s*\/\*/, - MAYBE_COMMENT = /^\s*\*/; + /** + * Determines if a given line and column are before a location. + * @param {Location} loc The location object from an AST node. + * @param {int} line The line to check. + * @param {int} column The column to check. + * @returns {boolean} True if the line and column are before the location, false if not. + * @private + */ + function beforeLoc(loc, line, column) { + if (line < loc.start.line) { + return true; + } + return line === loc.start.line && column < loc.start.column; + } + + /** + * Determines if a given line and column are after a location. + * @param {Location} loc The location object from an AST node. + * @param {int} line The line to check. + * @param {int} column The column to check. + * @returns {boolean} True if the line and column are after the location, false if not. + * @private + */ + function afterLoc(loc, line, column) { + if (line > loc.end.line) { + return true; + } + return line === loc.end.line && column > loc.end.column; + } //-------------------------------------------------------------------------- // Public @@ -32,7 +61,11 @@ module.exports = function(context) { return { - "Program": function(node) { + "TemplateElement": function(node) { + ignoredLocs.push(node.loc); + }, + + "Program:exit": function(node) { /* * At least one space followed by a tab * or the reverse before non-tab/-space @@ -40,7 +73,24 @@ module.exports = function(context) { */ var regex = /^(?=[\t ]*(\t | \t))/, match, - lines = context.getSourceLines(); + lines = context.getSourceLines(), + comments = context.getAllComments(); + + comments.forEach(function(comment) { + ignoredLocs.push(comment.loc); + }); + + ignoredLocs.sort(function(first, second) { + if (beforeLoc(first, second.start.line, second.start.column)) { + return 1; + } + + if (beforeLoc(second, first.start.line, second.start.column)) { + return -1; + } + + return 0; + }); if (smartTabs) { /* @@ -54,11 +104,21 @@ module.exports = function(context) { match = regex.exec(line); if (match) { - - if (!MAYBE_COMMENT.test(line) && !COMMENT_START.test(lines[i - 1])) { - context.report(node, { line: i + 1, column: match.index + 1 }, "Mixed spaces and tabs."); + var lineNumber = i + 1, + column = match.index + 1; + + for (var j = 0; j < ignoredLocs.length; j++) { + if (beforeLoc(ignoredLocs[j], lineNumber, column)) { + continue; + } + if (afterLoc(ignoredLocs[j], lineNumber, column)) { + continue; + } + + return; } + context.report(node, { line: lineNumber, column: column }, "Mixed spaces and tabs."); } }); } diff --git a/tools/eslint/lib/rules/no-multi-spaces.js b/tools/eslint/lib/rules/no-multi-spaces.js index f4d469859bd5ce..c6177e32825c5b 100644 --- a/tools/eslint/lib/rules/no-multi-spaces.js +++ b/tools/eslint/lib/rules/no-multi-spaces.js @@ -20,7 +20,7 @@ module.exports = function(context) { lastCommentIndex = 0; if (options && options.exceptions) { - Object.keys(options.exceptions).forEach(function (key) { + Object.keys(options.exceptions).forEach(function(key) { if (options.exceptions[key]) { exceptions[key] = true; } else { @@ -72,24 +72,44 @@ module.exports = function(context) { allComments = context.getAllComments(), pattern = /[^\n\r\u2028\u2029 ] {2,}/g, // note: repeating space token, + previousToken, parent; + + /** + * Creates a fix function that removes the multiple spaces between the two tokens + * @param {RuleFixer} leftToken left token + * @param {RuleFixer} rightToken right token + * @returns {function} fix function + * @private + */ + function createFix(leftToken, rightToken) { + return function(fixer) { + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " "); + }; + } + while (pattern.test(source)) { // do not flag anything inside of comments if (!isIndexInComment(pattern.lastIndex, allComments)) { token = context.getTokenByRangeStart(pattern.lastIndex); - if (token) { + previousToken = context.getTokenBefore(token); + if (hasExceptions) { parent = context.getNodeByRangeIndex(pattern.lastIndex - 1); } if (!parent || !exceptions[parent.type]) { - context.report(token, token.loc.start, - "Multiple spaces found before '{{value}}'.", - { value: token.value }); + context.report({ + node: token, + loc: token.loc.start, + message: "Multiple spaces found before '{{value}}'.", + data: { value: token.value }, + fix: createFix(previousToken, token) + }); } } diff --git a/tools/eslint/lib/rules/no-multiple-empty-lines.js b/tools/eslint/lib/rules/no-multiple-empty-lines.js index 4b293fac301488..46080277bc377a 100644 --- a/tools/eslint/lib/rules/no-multiple-empty-lines.js +++ b/tools/eslint/lib/rules/no-multiple-empty-lines.js @@ -13,13 +13,15 @@ module.exports = function(context) { // Use options.max or 2 as default - var numLines = 2; + var max = 2, + maxEOF; // store lines that appear empty but really aren't var notEmpty = []; if (context.options.length) { - numLines = context.options[0].max; + max = context.options[0].max; + maxEOF = context.options[0].maxEOF; } //-------------------------------------------------------------------------- @@ -45,17 +47,28 @@ module.exports = function(context) { location, trimmedLines = lines.map(function(str) { return str.trim(); - }); + }), + firstOfEndingBlankLines; // add the notEmpty lines in there with a placeholder notEmpty.forEach(function(x, i) { trimmedLines[i] = x; }); - // swallow the final newline, as some editors add it automatically - // and we don't want it to cause an issue - if (trimmedLines[trimmedLines.length - 1] === "") { - trimmedLines = trimmedLines.slice(0, -1); + if (typeof maxEOF === "undefined") { + // swallow the final newline, as some editors add it + // automatically and we don't want it to cause an issue + if (trimmedLines[trimmedLines.length - 1] === "") { + trimmedLines = trimmedLines.slice(0, -1); + } + firstOfEndingBlankLines = trimmedLines.length; + } else { + // save the number of the first of the last blank lines + firstOfEndingBlankLines = trimmedLines.length; + while (trimmedLines[firstOfEndingBlankLines - 1] === "" + && firstOfEndingBlankLines > 0) { + firstOfEndingBlankLines--; + } } // Aggregate and count blank lines @@ -67,12 +80,22 @@ module.exports = function(context) { if (lastLocation === currentLocation - 1) { blankCounter++; } else { - if (blankCounter >= numLines) { - location = { - line: lastLocation + 1, - column: lines[lastLocation].length - }; - context.report(node, location, "Multiple blank lines not allowed."); + location = { + line: lastLocation + 1, + column: 1 + }; + if (lastLocation < firstOfEndingBlankLines) { + // within the file, not at the end + if (blankCounter >= max) { + context.report(node, location, + "More than " + max + " blank " + (max === 1 ? "line" : "lines") + " not allowed."); + } + } else { + // inside the last blank lines + if (blankCounter >= maxEOF) { + context.report(node, location, + "Too many blank lines at the end of file. Max of " + maxEOF + " allowed."); + } } // Finally, reset the blank counter @@ -90,6 +113,9 @@ module.exports.schema = [ "properties": { "max": { "type": "integer" + }, + "maxEOF": { + "type": "integer" } }, "required": ["max"], diff --git a/tools/eslint/lib/rules/no-native-reassign.js b/tools/eslint/lib/rules/no-native-reassign.js index 1cbbbcbb850f3c..78d8c971188593 100644 --- a/tools/eslint/lib/rules/no-native-reassign.js +++ b/tools/eslint/lib/rules/no-native-reassign.js @@ -11,35 +11,58 @@ module.exports = function(context) { - var NATIVE_OBJECTS = ["Array", "Boolean", "Date", "decodeURI", - "decodeURIComponent", "encodeURI", "encodeURIComponent", - "Error", "eval", "EvalError", "Function", "isFinite", - "isNaN", "JSON", "Math", "Number", "Object", "parseInt", - "parseFloat", "RangeError", "ReferenceError", "RegExp", - "String", "SyntaxError", "TypeError", "URIError", - "Map", "NaN", "Set", "WeakMap", "Infinity", "undefined"]; - var config = context.options[0] || {}; - var exceptions = config.exceptions || []; - var modifiedNativeObjects = NATIVE_OBJECTS; - - if (exceptions.length) { - modifiedNativeObjects = NATIVE_OBJECTS.filter(function(builtIn) { - return exceptions.indexOf(builtIn) === -1; - }); + var config = context.options[0]; + var exceptions = (config && config.exceptions) || []; + + /** + * Gets the names of writeable built-in variables. + * @param {escope.Scope} scope - A scope to get. + * @returns {object} A map that its key is variable names. + */ + function getBuiltinGlobals(scope) { + return scope.variables.reduce(function(retv, variable) { + if (variable.writeable === false && variable.name !== "__proto__") { + retv[variable.name] = true; + } + return retv; + }, Object.create(null)); } - return { + /** + * Reports if a given reference's name is same as native object's. + * @param {object} builtins - A map that its key is a variable name. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {void} + */ + function checkThroughReference(builtins, reference, index, references) { + var identifier = reference.identifier; - "AssignmentExpression": function(node) { - if (modifiedNativeObjects.indexOf(node.left.name) >= 0) { - context.report(node, node.left.name + " is a read-only native object."); - } - }, + if (identifier && + builtins[identifier.name] && + exceptions.indexOf(identifier.name) === -1 && + reference.init === false && + reference.isWrite() && + // Destructuring assignments can have multiple default value, + // so possibly there are multiple writeable references for the same identifier. + (index === 0 || references[index - 1].identifier !== identifier) + ) { + context.report( + identifier, + "{{name}} is a read-only native object.", + {name: identifier.name}); + } + } - "VariableDeclarator": function(node) { - if (modifiedNativeObjects.indexOf(node.id.name) >= 0) { - context.report(node, "Redefinition of '{{nativeObject}}'.", { nativeObject: node.id.name }); - } + return { + // Checks assignments of global variables. + // References to implicit global variables are not resolved, + // so those are in the `through` of the global scope. + "Program": function() { + var globalScope = context.getScope(); + var builtins = getBuiltinGlobals(globalScope); + globalScope.through.forEach(checkThroughReference.bind(null, builtins)); } }; @@ -51,9 +74,7 @@ module.exports.schema = [ "properties": { "exceptions": { "type": "array", - "items": { - "type": "string" - }, + "items": {"type": "string"}, "uniqueItems": true } }, diff --git a/tools/eslint/lib/rules/no-negated-condition.js b/tools/eslint/lib/rules/no-negated-condition.js new file mode 100644 index 00000000000000..0d5b283e54aef6 --- /dev/null +++ b/tools/eslint/lib/rules/no-negated-condition.js @@ -0,0 +1,74 @@ +/** + * @fileoverview Rule to disallow a negated condition + * @author Alberto Rodríguez + * @copyright 2015 Alberto Rodríguez. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + + /** + * Determines if a given node is an if-else without a condition on the else + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node has an else without an if. + * @private + */ + function hasElseWithoutCondition(node) { + return node.alternate && node.alternate.type !== "IfStatement"; + } + + /** + * Determines if a given node is a negated unary expression + * @param {Object} test The test object to check. + * @returns {boolean} True if the node is a negated unary expression. + * @private + */ + function isNegatedUnaryExpression(test) { + return test.type === "UnaryExpression" && test.operator === "!"; + } + + /** + * Determines if a given node is a negated binary expression + * @param {Test} test The test to check. + * @returns {boolean} True if the node is a negated binary expression. + * @private + */ + function isNegatedBinaryExpression(test) { + return test.type === "BinaryExpression" && + (test.operator === "!=" || test.operator === "!=="); + } + + /** + * Determines if a given node has a negated if expression + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node has a negated if expression. + * @private + */ + function isNegatedIf(node) { + return isNegatedUnaryExpression(node.test) || isNegatedBinaryExpression(node.test); + } + + return { + "IfStatement": function(node) { + if (!hasElseWithoutCondition(node)) { + return; + } + + if (isNegatedIf(node)) { + context.report(node, "Unexpected negated condition."); + } + }, + "ConditionalExpression": function(node) { + if (isNegatedIf(node)) { + context.report(node, "Unexpected negated condition."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-new-func.js b/tools/eslint/lib/rules/no-new-func.js index c7900e0c8f4b1f..dee7ec7f4d9892 100644 --- a/tools/eslint/lib/rules/no-new-func.js +++ b/tools/eslint/lib/rules/no-new-func.js @@ -11,13 +11,25 @@ module.exports = function(context) { - return { + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- - "NewExpression": function(node) { - if (node.callee.name === "Function") { - context.report(node, "The Function constructor is eval."); - } + /** + * Checks if the callee if the Function constructor, and if so, reports an issue. + * @param {ASTNode} node The node to check and report on + * @returns {void} + * @private + */ + function validateCallee(node) { + if (node.callee.name === "Function") { + context.report(node, "The Function constructor is eval."); } + } + + return { + "NewExpression": validateCallee, + "CallExpression": validateCallee }; }; diff --git a/tools/eslint/lib/rules/no-param-reassign.js b/tools/eslint/lib/rules/no-param-reassign.js index c425246535261c..6bfa681afb46b9 100644 --- a/tools/eslint/lib/rules/no-param-reassign.js +++ b/tools/eslint/lib/rules/no-param-reassign.js @@ -9,79 +9,128 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function(context) { +var stopNodePattern = /(?:Statement|Declaration|Function(?:Expression)?|Program)$/; - //-------------------------------------------------------------------------- - // Helpers - //-------------------------------------------------------------------------- +module.exports = function(context) { + var props = context.options[0] && Boolean(context.options[0].props); /** - * Finds the declaration for a given variable by name, searching up the scope tree. - * @param {Scope} scope The scope in which to search. - * @param {String} name The name of the variable. - * @returns {Variable} The declaration information for the given variable, or null if no declaration was found. + * Checks whether or not a reference modifies its variable. + * If the `props` option is `true`, this checks whether or not the reference modifies properties of its variable also. + * @param {Reference} reference - A reference to check. + * @returns {boolean} Whether or not the reference modifies its variable. */ - function findDeclaration(scope, name) { - var variables = scope.variables; + function isModifying(reference) { + if (reference.isWrite()) { + return true; + } + + // Checks whether its property is modified. + if (props) { + var node = reference.identifier; + var parent = node.parent; + while (parent && !stopNodePattern.test(parent.type)) { + switch (parent.type) { + // e.g. foo.a = 0; + case "AssignmentExpression": + return parent.left === node; + + // e.g. ++foo.a; + case "UpdateExpression": + return true; + + // e.g. delete foo.a; + case "UnaryExpression": + if (parent.operator === "delete") { + return true; + } + break; + + // EXCLUDES: e.g. cache.get(foo.a).b = 0; + case "CallExpression": + if (parent.callee !== node) { + return false; + } + break; - for (var i = 0; i < variables.length; i++) { - if (variables[i].name === name) { - return variables[i]; + // EXCLUDES: e.g. cache[foo.a] = 0; + case "MemberExpression": + if (parent.property === node) { + return false; + } + break; + + default: + break; + } + + node = parent; + parent = parent.parent; } } - if (scope.upper) { - return findDeclaration(scope.upper, name); - } else { - return null; - } + return false; } /** - * Determines if a given variable is declared as a function parameter. - * @param {Variable} variable The variable declaration. - * @returns {boolean} True if the variable is a function parameter, false otherwise. + * Reports a reference if is non initializer and writable. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {void} */ - function isParameter(variable) { - var defs = variable.defs; + function checkReference(reference, index, references) { + var identifier = reference.identifier; - for (var i = 0; i < defs.length; i++) { - if (defs[i].type === "Parameter") { - return true; - } + if (identifier && + !reference.init && + isModifying(reference) && + // Destructuring assignments can have multiple default value, + // so possibly there are multiple writeable references for the same identifier. + (index === 0 || references[index - 1].identifier !== identifier) + ) { + context.report( + identifier, + "Assignment to function parameter '{{name}}'.", + {name: identifier.name}); } - - return false; } /** - * Checks whether a given node is an assignment to a function parameter. - * If so, a linting error will be reported. - * @param {ASTNode} node The node to check. - * @param {String} name The name of the variable being assigned to. + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. * @returns {void} */ - function checkParameter(node, name) { - var declaration = findDeclaration(context.getScope(), name); - - if (declaration && isParameter(declaration)) { - context.report(node, "Assignment to function parameter '{{name}}'.", { name: name }); + function checkVariable(variable) { + if (variable.defs[0].type === "Parameter") { + variable.references.forEach(checkReference); } } - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- + /** + * Checks parameters of a given function node. + * @param {ASTNode} node - A function node to check. + * @returns {void} + */ + function checkForFunction(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } return { - "AssignmentExpression": function(node) { - checkParameter(node, node.left.name); - }, - - "UpdateExpression": function(node) { - checkParameter(node, node.argument.name); - } + // `:exit` is needed for the `node.parent` property of identifier nodes. + "FunctionDeclaration:exit": checkForFunction, + "FunctionExpression:exit": checkForFunction, + "ArrowFunctionExpression:exit": checkForFunction }; + }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "props": {"type": "boolean"} + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-plusplus.js b/tools/eslint/lib/rules/no-plusplus.js index de8e861034dddd..42df6a5f2d3d0b 100644 --- a/tools/eslint/lib/rules/no-plusplus.js +++ b/tools/eslint/lib/rules/no-plusplus.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag use of unary increment and decrement operators. * @author Ian Christian Myers + * @author Brody McKee (github.com/mrmckeb) */ "use strict"; @@ -11,9 +12,19 @@ module.exports = function(context) { + var config = context.options[0], + allowInForAfterthought = false; + + if (typeof config === "object") { + allowInForAfterthought = config.allowForLoopAfterthoughts === true; + } + return { "UpdateExpression": function(node) { + if (allowInForAfterthought && node.parent.type === "ForStatement") { + return; + } context.report(node, "Unary operator '" + node.operator + "' used."); } @@ -21,4 +32,14 @@ module.exports = function(context) { }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "allowForLoopAfterthoughts": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-redeclare.js b/tools/eslint/lib/rules/no-redeclare.js index 80a6783ad5a023..2911ecb2e66670 100644 --- a/tools/eslint/lib/rules/no-redeclare.js +++ b/tools/eslint/lib/rules/no-redeclare.js @@ -10,22 +10,31 @@ //------------------------------------------------------------------------------ module.exports = function(context) { + var options = { + builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals) + }; /** * Find variables in a given scope and flag redeclared ones. - * @param {Scope} scope An escope scope object. + * @param {Scope} scope - An escope scope object. * @returns {void} * @private */ function findVariablesInScope(scope) { scope.variables.forEach(function(variable) { - if (variable.identifiers && variable.identifiers.length > 1) { + var hasBuiltin = options.builtinGlobals && "writeable" in variable; + var count = (hasBuiltin ? 1 : 0) + variable.identifiers.length; + + if (count >= 2) { variable.identifiers.sort(function(a, b) { return a.range[1] - b.range[1]; }); - for (var i = 1, l = variable.identifiers.length; i < l; i++) { - context.report(variable.identifiers[i], "{{a}} is already defined", {a: variable.name}); + for (var i = (hasBuiltin ? 0 : 1), l = variable.identifiers.length; i < l; i++) { + context.report( + variable.identifiers[i], + "\"{{a}}\" is already defined", + {a: variable.name}); } } }); @@ -33,36 +42,52 @@ module.exports = function(context) { } /** - * Find variables in a given node's associated scope. - * @param {ASTNode} node The node to check. + * Find variables in the current scope. * @returns {void} * @private */ - function findVariables(node) { + function checkForGlobal() { var scope = context.getScope(); - findVariablesInScope(scope); - - // globalReturn means one extra scope to check - if (node.type === "Program" && context.ecmaFeatures.globalReturn) { + // Nodejs env or modules has a special scope. + if (context.ecmaFeatures.globalReturn || context.ecmaFeatures.modules) { findVariablesInScope(scope.childScopes[0]); + } else { + findVariablesInScope(scope); } } + /** + * Find variables in the current scope. + * @returns {void} + * @private + */ + function checkForBlock() { + findVariablesInScope(context.getScope()); + } + if (context.ecmaFeatures.blockBindings) { return { - "Program": findVariables, - "BlockStatement": findVariables, - "SwitchStatement": findVariables + "Program": checkForGlobal, + "BlockStatement": checkForBlock, + "SwitchStatement": checkForBlock }; } else { return { - "Program": findVariables, - "FunctionDeclaration": findVariables, - "FunctionExpression": findVariables, - "ArrowFunctionExpression": findVariables + "Program": checkForGlobal, + "FunctionDeclaration": checkForBlock, + "FunctionExpression": checkForBlock, + "ArrowFunctionExpression": checkForBlock }; } }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "builtinGlobals": {"type": "boolean"} + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-reserved-keys.js b/tools/eslint/lib/rules/no-reserved-keys.js deleted file mode 100644 index 9165442b59466a..00000000000000 --- a/tools/eslint/lib/rules/no-reserved-keys.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @fileoverview Rule to disallow reserved words being used as keys - * @author Emil Bay - * @copyright 2014 Emil Bay. All rights reserved. - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - var MESSAGE = "Reserved word '{{key}}' used as key."; - - var reservedWords = [ - "abstract", - "boolean", "break", "byte", - "case", "catch", "char", "class", "const", "continue", - "debugger", "default", "delete", "do", "double", - "else", "enum", "export", "extends", - "final", "finally", "float", "for", "function", - "goto", - "if", "implements", "import", "in", "instanceof", "int", "interface", - "long", - "native", "new", - "package", "private", "protected", "public", - "return", - "short", "static", "super", "switch", "synchronized", - "this", "throw", "throws", "transient", "try", "typeof", - "var", "void", "volatile", - "while", "with" - ]; - - return { - - "ObjectExpression": function(node) { - node.properties.forEach(function(property) { - - if (property.key.type === "Identifier") { - var keyName = property.key.name; - - if (reservedWords.indexOf("" + keyName) !== -1) { - context.report(node, MESSAGE, { key: keyName }); - } - } - - }); - - } - }; - -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-restricted-modules.js b/tools/eslint/lib/rules/no-restricted-modules.js index b2213ea00dbdc2..3266c75ad6fe0d 100644 --- a/tools/eslint/lib/rules/no-restricted-modules.js +++ b/tools/eslint/lib/rules/no-restricted-modules.js @@ -8,7 +8,7 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { // trim restricted module names var restrictedModules = context.options; @@ -57,7 +57,7 @@ module.exports = function (context) { } return { - "CallExpression": function (node) { + "CallExpression": function(node) { if (isRequireCall(node)) { var restrictedModuleName = getRestrictedModuleName(node); diff --git a/tools/eslint/lib/rules/no-restricted-syntax.js b/tools/eslint/lib/rules/no-restricted-syntax.js new file mode 100644 index 00000000000000..67eb7415faaa60 --- /dev/null +++ b/tools/eslint/lib/rules/no-restricted-syntax.js @@ -0,0 +1,46 @@ +/** + * @fileoverview Rule to flag use of certain node types + * @author Burak Yigit Kaya + * @copyright 2015 Burak Yigit Kaya. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +var nodeTypes = require("espree").Syntax; + +module.exports = function(context) { + /** + * Generates a warning from the provided node, saying that node type is not allowed. + * @param {ASTNode} node The node to warn on + * @returns {void} + */ + function warn(node) { + context.report(node, "Using \"{{type}}\" is not allowed.", node); + } + + return context.options.reduce(function(result, nodeType) { + result[nodeType] = warn; + + return result; + }, {}); + +}; + +module.exports.schema = { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": Object.keys(nodeTypes).map(function(k) { + return nodeTypes[k]; + }) + } + ], + "uniqueItems": true, + "minItems": 1 +}; diff --git a/tools/eslint/lib/rules/no-return-assign.js b/tools/eslint/lib/rules/no-return-assign.js index d3133357ad183d..767414c49ffbac 100644 --- a/tools/eslint/lib/rules/no-return-assign.js +++ b/tools/eslint/lib/rules/no-return-assign.js @@ -14,7 +14,7 @@ * @returns {boolean} Whether or not the node is an `AssignmentExpression`. */ function isAssignment(node) { - return node != null && node.type === "AssignmentExpression"; + return node && node.type === "AssignmentExpression"; } /** diff --git a/tools/eslint/lib/rules/no-script-url.js b/tools/eslint/lib/rules/no-script-url.js index 72521aecf1975a..9526061b24fe3e 100644 --- a/tools/eslint/lib/rules/no-script-url.js +++ b/tools/eslint/lib/rules/no-script-url.js @@ -2,8 +2,8 @@ * @fileoverview Rule to flag when using javascript: urls * @author Ilya Volodin */ -/*jshint scripturl: true */ -/*eslint no-script-url: 0*/ +/* jshint scripturl: true */ +/* eslint no-script-url: 0 */ "use strict"; diff --git a/tools/eslint/lib/rules/no-sequences.js b/tools/eslint/lib/rules/no-sequences.js index 9f7bfe3e7d14a2..538e36a12fc2a6 100644 --- a/tools/eslint/lib/rules/no-sequences.js +++ b/tools/eslint/lib/rules/no-sequences.js @@ -34,7 +34,7 @@ module.exports = function(context) { * @returns {boolean} True if parens around node belong to parent node. */ function requiresExtraParens(node) { - return node.parent && parenthesized[node.parent.type] != null && + return node.parent && parenthesized[node.parent.type] && node === node.parent[parenthesized[node.parent.type]]; } @@ -85,7 +85,8 @@ module.exports = function(context) { } } - context.report(node, "Unexpected use of comma operator."); + var child = context.getTokenAfter(node.expressions[0]); + context.report(node, child.loc.start, "Unexpected use of comma operator."); } }; diff --git a/tools/eslint/lib/rules/no-shadow-restricted-names.js b/tools/eslint/lib/rules/no-shadow-restricted-names.js index ff3d058ce41fd7..760c12cacdd3b9 100644 --- a/tools/eslint/lib/rules/no-shadow-restricted-names.js +++ b/tools/eslint/lib/rules/no-shadow-restricted-names.js @@ -13,6 +13,12 @@ module.exports = function(context) { var RESTRICTED = ["undefined", "NaN", "Infinity", "arguments", "eval"]; + /** + * Check if the node name is present inside the restricted list + * @param {ASTNode} id id to evaluate + * @returns {void} + * @private + */ function checkForViolation(id) { if (RESTRICTED.indexOf(id.name) > -1) { context.report(id, "Shadowing of global property \"" + id.name + "\"."); diff --git a/tools/eslint/lib/rules/no-shadow.js b/tools/eslint/lib/rules/no-shadow.js index 060c668d570600..35c5a04f2e6e08 100644 --- a/tools/eslint/lib/rules/no-shadow.js +++ b/tools/eslint/lib/rules/no-shadow.js @@ -6,6 +6,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -13,9 +19,21 @@ module.exports = function(context) { var options = { - hoist: (context.options[0] && context.options[0].hoist) || "functions" + builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals), + hoist: (context.options[0] && context.options[0].hoist) || "functions", + allow: (context.options[0] && context.options[0].allow) || [] }; + /** + * Check if variable name is allowed. + * + * @param {ASTNode} variable The variable to check. + * @returns {boolean} Whether or not the variable name is allowed. + */ + function isAllowed(variable) { + return options.allow.indexOf(variable.name) !== -1; + } + /** * Checks if a variable of the class name in the class scope of ClassDeclaration. * @@ -49,8 +67,8 @@ module.exports = function(context) { var inner = innerDef && innerDef.name.range; return ( - outer != null && - inner != null && + outer && + inner && outer[0] < inner[0] && inner[1] < outer[1] && ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") && @@ -79,85 +97,53 @@ module.exports = function(context) { var inner = getNameRange(variable); var outer = getNameRange(scopeVar); return ( - inner != null && - outer != null && + inner && + outer && inner[1] < outer[0] && // Excepts FunctionDeclaration if is {"hoist":"function"}. - (options.hoist !== "functions" || outerDef == null || outerDef.node.type !== "FunctionDeclaration") + (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration") ); } - /** - * Checks if a variable is contained in the list of given scope variables. - * @param {Object} variable The variable to check. - * @param {Array} scopeVars The scope variables to look for. - * @returns {boolean} Whether or not the variable is contains in the list of scope variables. - */ - function isContainedInScopeVars(variable, scopeVars) { - return scopeVars.some(function (scopeVar) { - return ( - scopeVar.identifiers.length > 0 && - variable.name === scopeVar.name && - !isDuplicatedClassNameVariable(scopeVar) && - !isOnInitializer(variable, scopeVar) && - !(options.hoist !== "all" && isInTdz(variable, scopeVar)) - ); - }); - } - - /** - * Checks if the given variables are shadowed in the given scope. - * @param {Array} variables The variables to look for - * @param {Object} scope The scope to be checked. - * @returns {Array} Variables which are not declared in the given scope. - */ - function checkShadowsInScope(variables, scope) { - - var passedVars = []; - - variables.forEach(function (variable) { - // "arguments" is a special case that has no identifiers (#1759) - if (variable.identifiers.length > 0 && isContainedInScopeVars(variable, scope.variables)) { - context.report( - variable.identifiers[0], - "{{name}} is already declared in the upper scope.", - {name: variable.name}); - } else { - passedVars.push(variable); - } - }); - - return passedVars; - } - /** * Checks the current context for shadowed variables. * @param {Scope} scope - Fixme * @returns {void} */ function checkForShadows(scope) { - var variables = scope.variables.filter(function(variable) { - return ( - // Skip "arguments". - variable.identifiers.length > 0 && - // Skip variables of a class name in the class scope of ClassDeclaration. - !isDuplicatedClassNameVariable(variable) - ); - }); - - // iterate through the array of variables and find duplicates with the upper scope - var upper = scope.upper; - while (upper && variables.length) { - variables = checkShadowsInScope(variables, upper); - upper = upper.upper; + var variables = scope.variables; + for (var i = 0; i < variables.length; ++i) { + var variable = variables[i]; + + // Skips "arguments" or variables of a class name in the class scope of ClassDeclaration. + if (variable.identifiers.length === 0 || + isDuplicatedClassNameVariable(variable) || + isAllowed(variable) + ) { + continue; + } + + // Gets shadowed variable. + var shadowed = astUtils.getVariableByName(scope.upper, variable.name); + if (shadowed && + (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) && + !isOnInitializer(variable, shadowed) && + !(options.hoist !== "all" && isInTdz(variable, shadowed)) + ) { + context.report({ + node: variable.identifiers[0], + message: "\"{{name}}\" is already declared in the upper scope.", + data: variable + }); + } } } return { - "Program:exit": function () { - var globalScope = context.getScope(), - stack = globalScope.childScopes.slice(), - scope; + "Program:exit": function() { + var globalScope = context.getScope(); + var stack = globalScope.childScopes.slice(); + var scope; while (stack.length) { scope = stack.pop(); @@ -173,9 +159,15 @@ module.exports.schema = [ { "type": "object", "properties": { - "hoist": { - "enum": ["all", "functions", "never"] + "builtinGlobals": {"type": "boolean"}, + "hoist": {"enum": ["all", "functions", "never"]}, + "allow": { + "type": "array", + "items": { + "type": "string" + } } - } + }, + "additionalProperties": false } ]; diff --git a/tools/eslint/lib/rules/no-space-before-semi.js b/tools/eslint/lib/rules/no-space-before-semi.js deleted file mode 100644 index 4c2fffd9027e55..00000000000000 --- a/tools/eslint/lib/rules/no-space-before-semi.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @fileoverview Rule to disallow whitespace before the semicolon - * @author Jonathan Kingston - * @copyright 2015 Mathias Schreck - * @copyright 2014 Jonathan Kingston - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Checks whether two tokens are on the same line. - * @param {Object} left The leftmost token. - * @param {Object} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } - - /** - * Checks if a given token has leading whitespace. - * @param {Object} token The token to check. - * @returns {boolean} True if the given token has leading space, false if not. - */ - function hasLeadingSpace(token) { - var tokenBefore = context.getTokenBefore(token); - return isSameLine(tokenBefore, token) && isSpaced(tokenBefore, token); - } - - /** - * Checks if the given token is a semicolon. - * @param {Token} token The token to check. - * @returns {boolean} Whether or not the given token is a semicolon. - */ - function isSemicolon(token) { - return token.type === "Punctuator" && token.value === ";"; - } - - /** - * Reports if the given token has leading space. - * @param {Token} token The semicolon token to check. - * @param {ASTNode} node The corresponding node of the token. - * @returns {void} - */ - function checkSemiTokenForLeadingSpace(token, node) { - if (isSemicolon(token) && hasLeadingSpace(token)) { - context.report(node, token.loc.start, "Unexpected whitespace before semicolon."); - } - } - - /** - * Checks leading space before the semicolon with the assumption that the last token is the semicolon. - * @param {ASTNode} node The node to check. - * @returns {void} - */ - function checkNode(node) { - var token = context.getLastToken(node); - checkSemiTokenForLeadingSpace(token, node); - } - - return { - "VariableDeclaration": checkNode, - "ExpressionStatement": checkNode, - "BreakStatement": checkNode, - "ContinueStatement": checkNode, - "DebuggerStatement": checkNode, - "ReturnStatement": checkNode, - "ThrowStatement": checkNode, - "ForStatement": function (node) { - if (node.init) { - checkSemiTokenForLeadingSpace(context.getTokenAfter(node.init), node); - } - - if (node.test) { - checkSemiTokenForLeadingSpace(context.getTokenAfter(node.test), node); - } - } - }; -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-spaced-func.js b/tools/eslint/lib/rules/no-spaced-func.js index cd3e8f975d3c8f..551a3c609717c5 100644 --- a/tools/eslint/lib/rules/no-spaced-func.js +++ b/tools/eslint/lib/rules/no-spaced-func.js @@ -11,19 +11,42 @@ module.exports = function(context) { + var sourceCode = context.getSourceCode(); + + /** + * Check if open space is present in a function name + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function detectOpenSpaces(node) { - var lastCalleeToken = context.getLastToken(node.callee); - var tokens = context.getTokens(node); - var i = tokens.indexOf(lastCalleeToken), l = tokens.length; - while (i < l && tokens[i].value !== "(") { - ++i; - } - if (i >= l) { - return; + var lastCalleeToken = sourceCode.getLastToken(node.callee), + prevToken = lastCalleeToken, + parenToken = sourceCode.getTokenAfter(lastCalleeToken); + + // advances to an open parenthesis. + while ( + parenToken && + parenToken.range[1] < node.range[1] && + parenToken.value !== "(" + ) { + prevToken = parenToken; + parenToken = sourceCode.getTokenAfter(parenToken); } + // look for a space between the callee and the open paren - if (tokens[i - 1].range[1] !== tokens[i].range[0]) { - context.report(node, "Unexpected space between function name and paren."); + if (parenToken && + parenToken.range[1] < node.range[1] && + sourceCode.isSpaceBetweenTokens(prevToken, parenToken) + ) { + context.report({ + node: node, + loc: lastCalleeToken.loc.start, + message: "Unexpected space between function name and paren.", + fix: function(fixer) { + return fixer.removeRange([prevToken.range[1], parenToken.range[0]]); + } + }); } } diff --git a/tools/eslint/lib/rules/no-sync.js b/tools/eslint/lib/rules/no-sync.js index c26e003f6ef2cb..481514b83d492b 100644 --- a/tools/eslint/lib/rules/no-sync.js +++ b/tools/eslint/lib/rules/no-sync.js @@ -3,7 +3,7 @@ * @author Matt DuVall */ -/*jshint node:true*/ +/* jshint node:true */ "use strict"; diff --git a/tools/eslint/lib/rules/no-this-before-super.js b/tools/eslint/lib/rules/no-this-before-super.js index bd0836eec78cd2..6f1225d63b9847 100644 --- a/tools/eslint/lib/rules/no-this-before-super.js +++ b/tools/eslint/lib/rules/no-this-before-super.js @@ -18,7 +18,7 @@ module.exports = function(context) { * @returns {ClassDeclaration|ClassExpression|null} the found class node, or `null`. */ function getClassInAncestor(node) { - while (node != null) { + while (node) { if (node.type === "ClassDeclaration" || node.type === "ClassExpression") { return node; } @@ -34,7 +34,7 @@ module.exports = function(context) { * @returns {boolean} whether or not a node is the null literal. */ function isNullLiteral(node) { - return node != null && node.type === "Literal" && node.value === null; + return node && node.type === "Literal" && node.value === null; } /** @@ -43,7 +43,7 @@ module.exports = function(context) { * @returns {boolean} whether or not a node is the callee of a call expression. */ function isCallee(node) { - return node != null && node.parent.type === "CallExpression" && node.parent.callee === node; + return node && node.parent.type === "CallExpression" && node.parent.callee === node; } /** @@ -53,7 +53,7 @@ module.exports = function(context) { */ function isBeforeSuperCalling(item) { return ( - item != null && + item && item.scope === context.getScope().variableScope.upper.variableScope && item.superCalled === false ); @@ -91,7 +91,7 @@ module.exports = function(context) { // Skip if it has no extends or `extends null`. var classNode = getClassInAncestor(node); - if (classNode == null || classNode.superClass == null || isNullLiteral(classNode.superClass)) { + if (!classNode || !classNode.superClass || isNullLiteral(classNode.superClass)) { return; } diff --git a/tools/eslint/lib/rules/no-throw-literal.js b/tools/eslint/lib/rules/no-throw-literal.js index a04784ae8f251c..1a0c01ab360690 100644 --- a/tools/eslint/lib/rules/no-throw-literal.js +++ b/tools/eslint/lib/rules/no-throw-literal.js @@ -1,11 +1,49 @@ /** * @fileoverview Rule to restrict what can be thrown as an exception. * @author Dieter Oberkofler + * @copyright 2015 Ian VanSchooten. All rights reserved. * @copyright 2015 Dieter Oberkofler. All rights reserved. */ "use strict"; +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Determine if a node has a possiblity to be an Error object + * @param {ASTNode} node ASTNode to check + * @returns {boolean} True if there is a chance it contains an Error obj + */ +function couldBeError(node) { + switch (node.type) { + case "Identifier": + case "CallExpression": + case "NewExpression": + case "MemberExpression": + case "TaggedTemplateExpression": + case "YieldExpression": + return true; // possibly an error object. + + case "AssignmentExpression": + return couldBeError(node.right); + + case "SequenceExpression": + var exprs = node.expressions; + return exprs.length !== 0 && couldBeError(exprs[exprs.length - 1]); + + case "LogicalExpression": + return couldBeError(node.left) || couldBeError(node.right); + + case "ConditionalExpression": + return couldBeError(node.consequent) || couldBeError(node.alternate); + + default: + return false; + } +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -15,9 +53,8 @@ module.exports = function(context) { return { "ThrowStatement": function(node) { - - if (node.argument.type === "Literal") { - context.report(node, "Do not throw a literal."); + if (!couldBeError(node.argument)) { + context.report(node, "Expected an object to be thrown."); } else if (node.argument.type === "Identifier") { if (node.argument.name === "undefined") { context.report(node, "Do not throw undefined."); diff --git a/tools/eslint/lib/rules/no-trailing-spaces.js b/tools/eslint/lib/rules/no-trailing-spaces.js index a54cfe8cce8033..ac3c975d6e3eba 100644 --- a/tools/eslint/lib/rules/no-trailing-spaces.js +++ b/tools/eslint/lib/rules/no-trailing-spaces.js @@ -13,11 +13,32 @@ module.exports = function(context) { var BLANK_CLASS = "[ \t\u00a0\u2000-\u200b\u2028\u2029\u3000]", SKIP_BLANK = "^" + BLANK_CLASS + "*$", - NONBLANK = BLANK_CLASS + "$"; + NONBLANK = BLANK_CLASS + "+$"; var options = context.options[0] || {}, skipBlankLines = options.skipBlankLines || false; + /** + * Report the error message + * @param {ASTNode} node node to report + * @param {int[]} location range information + * @param {int[]} fixRange Range based on the whole program + * @returns {void} + */ + function report(node, location, fixRange) { + // Passing node is a bit dirty, because message data will contain + // big text in `source`. But... who cares :) ? + // One more kludge will not make worse the bloody wizardry of this plugin. + context.report({ + node: node, + loc: location, + message: "Trailing spaces not allowed.", + fix: function(fixer) { + return fixer.removeRange(fixRange); + } + }); + } + //-------------------------------------------------------------------------- // Public @@ -33,11 +54,21 @@ module.exports = function(context) { var src = context.getSource(), re = new RegExp(NONBLANK), skipMatch = new RegExp(SKIP_BLANK), - matches, lines = src.split(/\r?\n/), location; + matches, lines = src.split(/\r?\n/), + linebreaks = context.getSource().match(/\r\n|\r|\n|\u2028|\u2029/g), + location, + totalLength = 0, + fixRange = []; for (var i = 0, ii = lines.length; i < ii; i++) { - matches = re.exec(lines[i]); + + // Always add linebreak length to line length to accommodate for line break (\n or \r\n) + // Because during the fix time they also reserve one spot in the array. + // Usually linebreak length is 2 for \r\n (CRLF) and 1 for \n (LF) + var linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1; + var lineLength = lines[i].length + linebreakLength; + if (matches) { // If the line has only whitespace, and skipBlankLines @@ -47,14 +78,15 @@ module.exports = function(context) { } location = { line: i + 1, - column: lines[i].length - matches[0].length + 1 + column: matches.index }; - // Passing node is a bit dirty, because message data will contain - // big text in `source`. But... who cares :) ? - // One more kludge will not make worse the bloody wizardry of this plugin. - context.report(node, location, "Trailing spaces not allowed."); + fixRange = [totalLength + location.column, totalLength + lineLength - linebreakLength]; + + report(node, location, fixRange); } + + totalLength += lineLength; } } diff --git a/tools/eslint/lib/rules/no-undef-init.js b/tools/eslint/lib/rules/no-undef-init.js index fc08c9b5088ac8..1348c641e362a8 100644 --- a/tools/eslint/lib/rules/no-undef-init.js +++ b/tools/eslint/lib/rules/no-undef-init.js @@ -1,6 +1,8 @@ /** * @fileoverview Rule to flag when initializing to undefined * @author Ilya Volodin + * @copyright 2013 Ilya Volodin. All rights reserved. + * See LICENSE in root directory for full license. */ "use strict"; @@ -14,10 +16,10 @@ module.exports = function(context) { return { "VariableDeclarator": function(node) { - var name = node.id.name; - var init = node.init && node.init.name; + var name = node.id.name, + init = node.init && node.init.name; - if (init === "undefined") { + if (init === "undefined" && node.parent.kind !== "const") { context.report(node, "It's not necessary to initialize '{{name}}' to undefined.", { name: name }); } } diff --git a/tools/eslint/lib/rules/no-undef.js b/tools/eslint/lib/rules/no-undef.js index 7e15cfaf21db28..988d677cd72e02 100644 --- a/tools/eslint/lib/rules/no-undef.js +++ b/tools/eslint/lib/rules/no-undef.js @@ -10,12 +10,20 @@ // Requirements //------------------------------------------------------------------------------ -// none! +var astUtils = require("../ast-utils"); //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Check if a variable is an implicit declaration + * @param {ASTNode} variable node to evaluate + * @returns {boolean} True if its an implicit declaration + * @private + */ function isImplicitGlobal(variable) { return variable.defs.every(function(def) { return def.type === "ImplicitGlobalVariable"; @@ -29,18 +37,13 @@ function isImplicitGlobal(variable) { * @returns {Variable} The variable, or null if ref refers to an undeclared variable. */ function getDeclaredGlobalVariable(scope, ref) { - var declaredGlobal = null; - scope.variables.some(function(variable) { - if (variable.name === ref.identifier.name) { - // If it's an implicit global, it must have a `writeable` field (indicating it was declared) - if (!isImplicitGlobal(variable) || {}.hasOwnProperty.call(variable, "writeable")) { - declaredGlobal = variable; - return true; - } - } - return false; - }); - return declaredGlobal; + var variable = astUtils.getVariableByName(scope, ref.identifier.name); + + // If it's an implicit global, it must have a `writeable` field (indicating it was declared) + if (variable && (!isImplicitGlobal(variable) || hasOwnProperty.call(variable, "writeable"))) { + return variable; + } + return null; } /** @@ -62,9 +65,12 @@ module.exports = function(context) { var NOT_DEFINED_MESSAGE = "\"{{name}}\" is not defined.", READ_ONLY_MESSAGE = "\"{{name}}\" is read only."; + var options = context.options[0]; + var considerTypeOf = options && options.typeof === true || false; + return { - "Program:exit": function(/*node*/) { + "Program:exit": function(/* node */) { var globalScope = context.getScope(); @@ -72,7 +78,7 @@ module.exports = function(context) { var variable = getDeclaredGlobalVariable(globalScope, ref), name = ref.identifier.name; - if (hasTypeOfOperator(ref.identifier)) { + if (hasTypeOfOperator(ref.identifier) && !considerTypeOf) { return; } @@ -89,4 +95,14 @@ module.exports = function(context) { }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "typeof": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-underscore-dangle.js b/tools/eslint/lib/rules/no-underscore-dangle.js index 38ad52f74fc4c2..4c11ff0387a99c 100644 --- a/tools/eslint/lib/rules/no-underscore-dangle.js +++ b/tools/eslint/lib/rules/no-underscore-dangle.js @@ -11,49 +11,99 @@ module.exports = function(context) { + var ALLOWED_VARIABLES = context.options[0] && context.options[0].allow ? context.options[0].allow : []; + //------------------------------------------------------------------------- // Helpers //------------------------------------------------------------------------- + /** + * Check if identifier is present inside the allowed option + * @param {string} identifier name of the node + * @returns {boolean} true if its is present + * @private + */ + function isAllowed(identifier) { + return ALLOWED_VARIABLES.some(function(ident) { + return ident === identifier; + }); + } + + /** + * Check if identifier has a underscore at the end + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is present + * @private + */ function hasTrailingUnderscore(identifier) { var len = identifier.length; return identifier !== "_" && (identifier[0] === "_" || identifier[len - 1] === "_"); } + /** + * Check if identifier is a special case member expression + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is a special case + * @private + */ function isSpecialCaseIdentifierForMemberExpression(identifier) { return identifier === "__proto__"; } + /** + * Check if identifier is a special case variable expression + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is a special case + * @private + */ function isSpecialCaseIdentifierInVariableExpression(identifier) { // Checks for the underscore library usage here return identifier === "_"; } + /** + * Check if function has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkForTrailingUnderscoreInFunctionDeclaration(node) { if (node.id) { var identifier = node.id.name; - if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier)) { + if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && !isAllowed(identifier)) { context.report(node, "Unexpected dangling \"_\" in \"" + identifier + "\"."); } } } + /** + * Check if variable expression has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkForTrailingUnderscoreInVariableExpression(node) { var identifier = node.id.name; if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && - !isSpecialCaseIdentifierInVariableExpression(identifier)) { + !isSpecialCaseIdentifierInVariableExpression(identifier) && !isAllowed(identifier)) { context.report(node, "Unexpected dangling \"_\" in \"" + identifier + "\"."); } } + /** + * Check if member expression has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkForTrailingUnderscoreInMemberExpression(node) { var identifier = node.property.name; if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && - !isSpecialCaseIdentifierForMemberExpression(identifier)) { + !isSpecialCaseIdentifierForMemberExpression(identifier) && !isAllowed(identifier)) { context.report(node, "Unexpected dangling \"_\" in \"" + identifier + "\"."); } } @@ -70,4 +120,17 @@ module.exports = function(context) { }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "allow": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-unneeded-ternary.js b/tools/eslint/lib/rules/no-unneeded-ternary.js index 6aa944673138d3..fcbff265f91db0 100644 --- a/tools/eslint/lib/rules/no-unneeded-ternary.js +++ b/tools/eslint/lib/rules/no-unneeded-ternary.js @@ -12,17 +12,8 @@ //------------------------------------------------------------------------------ module.exports = function(context) { - - /** - * Reports an AST node as a rule violation. - * @param {ASTNode} mainNode The node to report. - * @param {object} culpritNode - The token which has a problem - * @returns {void} - * @private - */ - function report(mainNode, culpritNode) { - context.report(mainNode, culpritNode.loc.start, "Unnecessary use of boolean literals in conditional expression"); - } + var options = context.options[0] || {}; + var defaultAssignment = options.defaultAssignment !== false; /** * Test if the node is a boolean literal @@ -34,15 +25,38 @@ module.exports = function(context) { return node.type === "Literal" && typeof node.value === "boolean"; } + /** + * Test if the node matches the pattern id ? id : expression + * @param {ASTNode} node - The ConditionalExpression to check. + * @returns {boolean} True if the pattern is matched, and false otherwise + * @private + */ + function matchesDefaultAssignment(node) { + return node.test.type === "Identifier" && + node.consequent.type === "Identifier" && + node.test.name === node.consequent.name; + } + return { "ConditionalExpression": function(node) { - if (isBooleanLiteral(node.alternate) && isBooleanLiteral(node.consequent)) { - report(node, node.consequent); + context.report(node, node.consequent.loc.start, "Unnecessary use of boolean literals in conditional expression"); + } else if (!defaultAssignment && matchesDefaultAssignment(node)) { + context.report(node, node.consequent.loc.start, "Unnecessary use of conditional expression for default assignment"); } } }; }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "defaultAssignment": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-unreachable.js b/tools/eslint/lib/rules/no-unreachable.js index 1f169a64d53b31..5da0ecd0c65848 100644 --- a/tools/eslint/lib/rules/no-unreachable.js +++ b/tools/eslint/lib/rules/no-unreachable.js @@ -8,7 +8,14 @@ // Helpers //------------------------------------------------------------------------------ - +/** + * Report the node + * @param {object} context Current context as passed to the rule + * @param {ASTNode} node node to evaluate + * @param {string} unreachableType Type of the statement + * @returns {void} + * @private + */ function report(context, node, unreachableType) { var keyword; switch (unreachableType) { @@ -51,7 +58,7 @@ module.exports = function(context) { }); } - /* + /** * Verifies that the given node is the last node or followed exclusively by * hoisted declarations * @param {ASTNode} node Node that should be the last node diff --git a/tools/eslint/lib/rules/no-unused-expressions.js b/tools/eslint/lib/rules/no-unused-expressions.js index f78cf30196be74..82e21c04e7c306 100644 --- a/tools/eslint/lib/rules/no-unused-expressions.js +++ b/tools/eslint/lib/rules/no-unused-expressions.js @@ -10,10 +10,13 @@ //------------------------------------------------------------------------------ module.exports = function(context) { + var config = context.options[0] || {}, + allowShortCircuit = config.allowShortCircuit || false, + allowTernary = config.allowTernary || false; /** * @param {ASTNode} node - any node - * @returns {Boolean} whether the given node structurally represents a directive + * @returns {boolean} whether the given node structurally represents a directive */ function looksLikeDirective(node) { return node.type === "ExpressionStatement" && @@ -45,7 +48,7 @@ module.exports = function(context) { /** * @param {ASTNode} node - any node * @param {ASTNode[]} ancestors - the given node's ancestors - * @returns {Boolean} whether the given node is considered a directive in its current position + * @returns {boolean} whether the given node is considered a directive in its current position */ function isDirective(node, ancestors) { var parent = ancestors[ancestors.length - 1], @@ -55,17 +58,31 @@ module.exports = function(context) { directives(parent).indexOf(node) >= 0; } - return { - "ExpressionStatement": function(node) { + /** + * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags. + * @param {ASTNode} node - any node + * @returns {boolean} whether the given node is a valid expression + */ + function isValidExpression(node) { + if (allowTernary) { + // Recursive check for ternary and logical expressions + if (node.type === "ConditionalExpression") { + return isValidExpression(node.consequent) && isValidExpression(node.alternate); + } + } + if (allowShortCircuit) { + if (node.type === "LogicalExpression") { + return isValidExpression(node.right); + } + } - var type = node.expression.type, - ancestors = context.getAncestors(); + return /^(?:Assignment|Call|New|Update|Yield)Expression$/.test(node.type) || + (node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0); + } - if ( - !/^(?:Assignment|Call|New|Update|Yield)Expression$/.test(type) && - (type !== "UnaryExpression" || ["delete", "void"].indexOf(node.expression.operator) < 0) && - !isDirective(node, ancestors) - ) { + return { + "ExpressionStatement": function(node) { + if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) { context.report(node, "Expected an assignment or function call and instead saw an expression."); } } @@ -73,4 +90,17 @@ module.exports = function(context) { }; -module.exports.schema = []; +module.exports.schema = [ + { + "type": "object", + "properties": { + "allowShortCircuit": { + "type": "boolean" + }, + "allowTernary": { + "type": "boolean" + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/no-unused-vars.js b/tools/eslint/lib/rules/no-unused-vars.js index 6b3b7f334e206f..ec7274b63e8e55 100644 --- a/tools/eslint/lib/rules/no-unused-vars.js +++ b/tools/eslint/lib/rules/no-unused-vars.js @@ -5,25 +5,41 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var escape = require("escape-string-regexp"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - var MESSAGE = "{{name}} is defined but never used"; + var MESSAGE = "\"{{name}}\" is defined but never used"; var config = { vars: "all", args: "after-used" }; - if (context.options[0]) { - if (typeof context.options[0] === "string") { - config.vars = context.options[0]; + var firstOption = context.options[0]; + + if (firstOption) { + if (typeof firstOption === "string") { + config.vars = firstOption; } else { - config.vars = context.options[0].vars || config.vars; - config.args = context.options[0].args || config.args; + config.vars = firstOption.vars || config.vars; + config.args = firstOption.args || config.args; + + if (firstOption.varsIgnorePattern) { + config.varsIgnorePattern = new RegExp(firstOption.varsIgnorePattern); + } + + if (firstOption.argsIgnorePattern) { + config.argsIgnorePattern = new RegExp(firstOption.argsIgnorePattern); + } } } @@ -31,7 +47,6 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - /** * Determines if a given variable is being exported from a module. * @param {Variable} variable - EScope variable object. @@ -47,7 +62,7 @@ module.exports = function(context) { var node = definition.node; if (node.type === "VariableDeclarator") { node = node.parent; - } else if (definition.type === "Parameter" && node.type === "FunctionDeclaration") { + } else if (definition.type === "Parameter") { return false; } @@ -77,7 +92,7 @@ module.exports = function(context) { function isSelfReference(ref, nodes) { var scope = ref.from; - while (scope != null) { + while (scope) { if (nodes.indexOf(scope.block) >= 0) { return true; } @@ -95,14 +110,14 @@ module.exports = function(context) { * @returns {boolean} True if the variable is used */ function isUsedVariable(variable, references) { - var functionNodes = variable.defs.filter(function (def) { - return def.type === "FunctionName"; - }).map(function (def) { - return def.node; - }), + var functionNodes = variable.defs.filter(function(def) { + return def.type === "FunctionName"; + }).map(function(def) { + return def.node; + }), isFunctionDefinition = functionNodes.length > 0; - return references.some(function (ref) { + return references.some(function(ref) { return isReadRef(ref) && !(isFunctionDefinition && isSelfReference(ref, functionNodes)); }); } @@ -156,7 +171,7 @@ module.exports = function(context) { if (scope.type === "class" && scope.block.id === variable.identifiers[0]) { continue; } - // skip function expression names + // skip function expression names and variables marked with markVariableAsUsed() if (scope.functionExpressionScope || variable.eslintUsed) { continue; } @@ -167,7 +182,7 @@ module.exports = function(context) { // explicit global variables don't have definitions. var def = variable.defs[0]; - if (def != null) { + if (def) { var type = def.type; // skip catch variables @@ -175,19 +190,31 @@ module.exports = function(context) { continue; } - // skip any setter argument - if (type === "Parameter" && def.node.parent.type === "Property" && def.node.parent.kind === "set") { - continue; - } - - // if "args" option is "none", skip any parameter - if (config.args === "none" && type === "Parameter") { - continue; - } - - // if "args" option is "after-used", skip all but the last parameter - if (config.args === "after-used" && type === "Parameter" && def.index < def.node.params.length - 1) { - continue; + if (type === "Parameter") { + // skip any setter argument + if (def.node.parent.type === "Property" && def.node.parent.kind === "set") { + continue; + } + + // if "args" option is "none", skip any parameter + if (config.args === "none") { + continue; + } + + // skip ignored parameters + if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) { + continue; + } + + // if "args" option is "after-used", skip all but the last parameter + if (config.args === "after-used" && def.index < def.node.params.length - 1) { + continue; + } + } else { + // skip ignored variables + if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) { + continue; + } } } @@ -206,6 +233,50 @@ module.exports = function(context) { return unusedVars; } + /** + * Gets the index of a given variable name in a given comment. + * @param {escope.Variable} variable - A variable to get. + * @param {ASTNode} comment - A comment node which includes the variable name. + * @returns {number} The index of the variable name's location. + */ + function getColumnInComment(variable, comment) { + var namePattern = new RegExp("[\\s,]" + escape(variable.name) + "(?:$|[\\s,:])", "g"); + + // To ignore the first text "global". + namePattern.lastIndex = comment.value.indexOf("global") + 6; + + // Search a given variable name. + var match = namePattern.exec(comment.value); + return match ? match.index + 1 : 0; + } + + /** + * Creates the correct location of a given variables. + * The location is at its name string in a `/*global` comment. + * + * @param {escope.Variable} variable - A variable to get its location. + * @returns {{line: number, column: number}} The location object for the variable. + */ + function getLocation(variable) { + var comment = variable.eslintExplicitGlobalComment; + var baseLoc = comment.loc.start; + var column = getColumnInComment(variable, comment); + var prefix = comment.value.slice(0, column); + var lineInComment = (prefix.match(/\n/g) || []).length; + + if (lineInComment > 0) { + column -= 1 + prefix.lastIndexOf("\n"); + } else { + // 2 is for `/*` + column += baseLoc.column + 2; + } + + return { + line: baseLoc.line + lineInComment, + column: column + }; + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -219,8 +290,10 @@ module.exports = function(context) { for (var i = 0, l = unusedVars.length; i < l; ++i) { var unusedVar = unusedVars[i]; - if (unusedVar.eslintExplicitGlobal) { - context.report(programNode, MESSAGE, unusedVar); + if (unusedVar.eslintUsed) { + continue; // explicitly exported variables + } else if (unusedVar.eslintExplicitGlobal) { + context.report(programNode, getLocation(unusedVar), MESSAGE, unusedVar); } else if (unusedVar.defs.length > 0) { context.report(unusedVar.identifiers[0], MESSAGE, unusedVar); } @@ -242,8 +315,14 @@ module.exports.schema = [ "vars": { "enum": ["all", "local"] }, + "varsIgnorePattern": { + "type": "string" + }, "args": { "enum": ["all", "after-used", "none"] + }, + "argsIgnorePattern": { + "type": "string" } } } diff --git a/tools/eslint/lib/rules/no-use-before-define.js b/tools/eslint/lib/rules/no-use-before-define.js index baf0780e711481..9518d9e50b1fab 100644 --- a/tools/eslint/lib/rules/no-use-before-define.js +++ b/tools/eslint/lib/rules/no-use-before-define.js @@ -6,6 +6,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Constants //------------------------------------------------------------------------------ @@ -18,26 +24,6 @@ var NO_FUNC = "nofunc"; module.exports = function(context) { - /** - * Finds variable declarations in a given scope. - * @param {string} name The variable name to find. - * @param {Scope} scope The scope to search in. - * @returns {Object} The variable declaration object. - * @private - */ - function findDeclaration(name, scope) { - // try searching in the current scope first - for (var i = 0, l = scope.variables.length; i < l; i++) { - if (scope.variables[i].name === name) { - return scope.variables[i]; - } - } - // check if there's upper scope and call recursivly till we find the variable - if (scope.upper) { - return findDeclaration(name, scope.upper); - } - } - /** * Finds and validates all variables in a given scope. * @param {Scope} scope The scope object. @@ -47,10 +33,17 @@ module.exports = function(context) { function findVariablesInScope(scope) { var typeOption = context.options[0]; + /** + * Report the node + * @param {object} reference reference object + * @param {ASTNode} declaration node to evaluate + * @returns {void} + * @private + */ function checkLocationAndReport(reference, declaration) { if (typeOption !== NO_FUNC || declaration.defs[0].type !== "FunctionName") { if (declaration.identifiers[0].range[1] > reference.identifier.range[1]) { - context.report(reference.identifier, "{{a}} was used before it was defined", {a: reference.identifier.name}); + context.report(reference.identifier, "\"{{a}}\" was used before it was defined", {a: reference.identifier.name}); } } } @@ -61,7 +54,7 @@ module.exports = function(context) { if (reference.resolved && reference.resolved.identifiers.length > 0) { checkLocationAndReport(reference, reference.resolved); } else { - var declaration = findDeclaration(reference.identifier.name, scope); + var declaration = astUtils.getVariableByName(scope, reference.identifier.name); // if there're no identifiers, this is a global environment variable if (declaration && declaration.identifiers.length !== 0) { checkLocationAndReport(reference, declaration); @@ -82,7 +75,7 @@ module.exports = function(context) { findVariablesInScope(scope); } - return { + var ruleDefinition = { "Program": function() { var scope = context.getScope(); findVariablesInScope(scope); @@ -91,11 +84,22 @@ module.exports = function(context) { if (context.ecmaFeatures.globalReturn || context.ecmaFeatures.modules) { findVariablesInScope(scope.childScopes[0]); } - }, - "FunctionExpression": findVariables, - "FunctionDeclaration": findVariables, - "ArrowFunctionExpression": findVariables + } }; + + if (context.ecmaFeatures.blockBindings) { + ruleDefinition.BlockStatement = ruleDefinition.SwitchStatement = findVariables; + + ruleDefinition.ArrowFunctionExpression = function(node) { + if (node.body.type !== "BlockStatement") { + findVariables(node); + } + }; + } else { + ruleDefinition.FunctionExpression = ruleDefinition.FunctionDeclaration = ruleDefinition.ArrowFunctionExpression = findVariables; + } + + return ruleDefinition; }; module.exports.schema = [ diff --git a/tools/eslint/lib/rules/no-useless-call.js b/tools/eslint/lib/rules/no-useless-call.js new file mode 100644 index 00000000000000..8af37d78911077 --- /dev/null +++ b/tools/eslint/lib/rules/no-useless-call.js @@ -0,0 +1,96 @@ +/** + * @fileoverview A rule to disallow unnecessary `.call()` and `.apply()`. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is a `.call()`/`.apply()`. + * @param {ASTNode} node - A CallExpression node to check. + * @returns {boolean} Whether or not the node is a `.call()`/`.apply()`. + */ +function isCallOrNonVariadicApply(node) { + return ( + node.callee.type === "MemberExpression" && + node.callee.property.type === "Identifier" && + node.callee.computed === false && + ( + (node.callee.property.name === "call" && node.arguments.length >= 1) || + (node.callee.property.name === "apply" && node.arguments.length === 2 && node.arguments[1].type === "ArrayExpression") + ) + ); +} + +/** + * Checks whether or not the tokens of two given nodes are same. + * @param {ASTNode} left - A node 1 to compare. + * @param {ASTNode} right - A node 2 to compare. + * @param {RuleContext} context - The ESLint rule context object. + * @returns {boolean} the source code for the given node. + */ +function equalTokens(left, right, context) { + var tokensL = context.getTokens(left); + var tokensR = context.getTokens(right); + + if (tokensL.length !== tokensR.length) { + return false; + } + for (var i = 0; i < tokensL.length; ++i) { + if (tokensL[i].type !== tokensR[i].type || + tokensL[i].value !== tokensR[i].value + ) { + return false; + } + } + + return true; +} + +/** + * Checks whether or not `thisArg` is not changed by `.call()`/`.apply()`. + * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function. + * @param {ASTNode} thisArg - The node that is given to the first argument of the `.call()`/`.apply()`. + * @param {RuleContext} context - The ESLint rule context object. + * @returns {boolean} Whether or not `thisArg` is not changed by `.call()`/`.apply()`. + */ +function isValidThisArg(expectedThis, thisArg, context) { + if (!expectedThis) { + return astUtils.isNullOrUndefined(thisArg); + } + return equalTokens(expectedThis, thisArg, context); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + return { + "CallExpression": function(node) { + if (!isCallOrNonVariadicApply(node)) { + return; + } + + var applied = node.callee.object; + var expectedThis = (applied.type === "MemberExpression") ? applied.object : null; + var thisArg = node.arguments[0]; + + if (isValidThisArg(expectedThis, thisArg, context)) { + context.report( + node, + "unnecessary \".{{name}}()\".", + {name: node.callee.property.name}); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-useless-concat.js b/tools/eslint/lib/rules/no-useless-concat.js new file mode 100644 index 00000000000000..6f230a96d3385a --- /dev/null +++ b/tools/eslint/lib/rules/no-useless-concat.js @@ -0,0 +1,89 @@ +/** + * @fileoverview disallow unncessary concatenation of template strings + * @author Henry Zhu + * @copyright 2015 Henry Zhu. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a concatenation. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a concatenation. + */ +function isConcatenation(node) { + return node.type === "BinaryExpression" && node.operator === "+"; +} + +/** + * Get's the right most node on the left side of a BinaryExpression with + operator. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {ASTNode} node + */ +function getLeft(node) { + var left = node.left; + while (isConcatenation(left)) { + left = left.right; + } + return left; +} + +/** + * Get's the left most node on the right side of a BinaryExpression with + operator. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {ASTNode} node + */ +function getRight(node) { + var right = node.right; + while (isConcatenation(right)) { + right = right.left; + } + return right; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + return { + BinaryExpression: function(node) { + // check if not concatenation + if (node.operator !== "+") { + return; + } + + // account for the `foo + "a" + "b"` case + var left = getLeft(node); + var right = getRight(node); + + if (astUtils.isStringLiteral(left) && + astUtils.isStringLiteral(right) && + astUtils.isTokenOnSameLine(left, right) + ) { + // move warning location to operator + var operatorToken = context.getTokenAfter(left); + while (operatorToken.value !== "+") { + operatorToken = context.getTokenAfter(operatorToken); + } + + context.report( + node, + operatorToken.loc.start, + "Unexpected string concatenation of literals."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/no-var.js b/tools/eslint/lib/rules/no-var.js index 53d9cc27ae122b..05cb6e99eca58e 100644 --- a/tools/eslint/lib/rules/no-var.js +++ b/tools/eslint/lib/rules/no-var.js @@ -13,7 +13,7 @@ module.exports = function(context) { return { - "VariableDeclaration": function (node) { + "VariableDeclaration": function(node) { if (node.kind === "var") { context.report(node, "Unexpected var, use let or const instead."); } diff --git a/tools/eslint/lib/rules/no-warning-comments.js b/tools/eslint/lib/rules/no-warning-comments.js index 5e842bc754f927..65768fe74f9e58 100644 --- a/tools/eslint/lib/rules/no-warning-comments.js +++ b/tools/eslint/lib/rules/no-warning-comments.js @@ -5,15 +5,18 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { var configuration = context.options[0] || {}, warningTerms = configuration.terms || ["todo", "fixme", "xxx"], location = configuration.location || "start", + selfConfigRegEx = /\bno-warning-comments\b/, warningRegExps; /** @@ -54,7 +57,7 @@ module.exports = function (context) { function commentContainsWarningTerm(comment) { var matches = []; - warningRegExps.forEach(function (regex, index) { + warningRegExps.forEach(function(regex, index) { if (regex.test(comment)) { matches.push(warningTerms[index]); } @@ -69,10 +72,14 @@ module.exports = function (context) { * @returns {void} undefined. */ function checkComment(node) { + if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) { + return; + } + var matches = commentContainsWarningTerm(node.value); - matches.forEach(function (matchedTerm) { - context.report(node, "Unexpected " + matchedTerm + " comment."); + matches.forEach(function(matchedTerm) { + context.report(node, "Unexpected \"" + matchedTerm + "\" comment."); }); } diff --git a/tools/eslint/lib/rules/no-wrap-func.js b/tools/eslint/lib/rules/no-wrap-func.js deleted file mode 100644 index d69a743c98e565..00000000000000 --- a/tools/eslint/lib/rules/no-wrap-func.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @fileoverview Rule to flag wrapping non-iife in parens - * @author Ilya Volodin - * @copyright 2013 Ilya Volodin. All rights reserved. - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - /** - * Checks a function expression to see if its surrounded by parens. - * @param {ASTNode} node The node to check. - * @returns {void} - * @private - */ - function checkFunction(node) { - var previousToken, nextToken, isCall; - - if (node.type === "ArrowFunctionExpression" && - /(?:Call|New|Logical|Binary|Conditional|Update)Expression/.test(node.parent.type) - ) { - return; - } - - // (function() {}).foo - if (node.parent.type === "MemberExpression" && node.parent.object === node) { - return; - } - - // (function(){})() - isCall = /CallExpression|NewExpression/.test(node.parent.type); - if (isCall && node.parent.callee === node) { - return; - } - - previousToken = context.getTokenBefore(node); - nextToken = context.getTokenAfter(node); - - // f(function(){}) and new f(function(){}) - if (isCall) { - - // if the previousToken is right after the callee - if (node.parent.callee.range[1] === previousToken.range[0]) { - return; - } - } - - if (previousToken.value === "(" && nextToken.value === ")") { - context.report(node, "Wrapping non-IIFE function literals in parens is unnecessary."); - } - } - - return { - "ArrowFunctionExpression": checkFunction, - "FunctionExpression": checkFunction - }; - -}; - -module.exports.schema = []; diff --git a/tools/eslint/lib/rules/object-curly-spacing.js b/tools/eslint/lib/rules/object-curly-spacing.js index d4d200d36ee619..a3c68c5d89ed97 100644 --- a/tools/eslint/lib/rules/object-curly-spacing.js +++ b/tools/eslint/lib/rules/object-curly-spacing.js @@ -5,15 +5,20 @@ * @copyright 2014 Michael Ficarra. No rights reserved. * @copyright 2014 Vignesh Anand. All rights reserved. * @copyright 2015 Jamund Ferguson. All rights reserved. + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - var spaced = context.options[0] === "always"; + var spaced = context.options[0] === "always", + sourceCode = context.getSourceCode(); /** * Determines whether an option is set, relative to the spacing option. @@ -23,7 +28,7 @@ module.exports = function(context) { * @returns {boolean} Whether or not the property is excluded. */ function isOptionSet(option) { - return context.options[1] != null ? context.options[1][option] === !spaced : false; + return context.options[1] ? context.options[1][option] === !spaced : false; } var options = { @@ -36,26 +41,6 @@ module.exports = function(context) { // Helpers //-------------------------------------------------------------------------- - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Determines whether two adjacent tokens are on the same line. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not the tokens are on the same line. - */ - function isSameLine(left, right) { - return left.loc.start.line === right.loc.start.line; - } - /** * Reports that there shouldn't be a space after the first token * @param {ASTNode} node - The node to report in the event of an error. @@ -63,8 +48,15 @@ module.exports = function(context) { * @returns {void} */ function reportNoBeginningSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space after '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.end, + message: "There should be no space after '" + token.value + "'", + fix: function(fixer) { + var nextToken = context.getSourceCode().getTokenAfter(token); + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); } /** @@ -74,8 +66,15 @@ module.exports = function(context) { * @returns {void} */ function reportNoEndingSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space before '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "There should be no space before '" + token.value + "'", + fix: function(fixer) { + var previousToken = context.getSourceCode().getTokenBefore(token); + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); } /** @@ -85,8 +84,14 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredBeginningSpace(node, token) { - context.report(node, token.loc.start, - "A space is required after '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.end, + message: "A space is required after '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); } /** @@ -96,8 +101,14 @@ module.exports = function(context) { * @returns {void} */ function reportRequiredEndingSpace(node, token) { - context.report(node, token.loc.start, - "A space is required before '" + token.value + "'"); + context.report({ + node: node, + loc: token.loc.start, + message: "A space is required before '" + token.value + "'", + fix: function(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); } /** @@ -113,101 +124,124 @@ module.exports = function(context) { var closingCurlyBraceMustBeSpaced = options.arraysInObjectsException && penultimate.value === "]" || options.objectsInObjectsException && penultimate.value === "}" - ? !options.spaced : options.spaced; + ? !options.spaced : options.spaced, + firstSpaced, lastSpaced; - if (isSameLine(first, second)) { - if (options.spaced && !isSpaced(first, second)) { + if (astUtils.isTokenOnSameLine(first, second)) { + firstSpaced = sourceCode.isSpaceBetweenTokens(first, second); + if (options.spaced && !firstSpaced) { reportRequiredBeginningSpace(node, first); } - if (!options.spaced && isSpaced(first, second)) { + if (!options.spaced && firstSpaced) { reportNoBeginningSpace(node, first); } } - if (isSameLine(penultimate, last)) { - if (closingCurlyBraceMustBeSpaced && !isSpaced(penultimate, last)) { + if (astUtils.isTokenOnSameLine(penultimate, last)) { + lastSpaced = sourceCode.isSpaceBetweenTokens(penultimate, last); + if (closingCurlyBraceMustBeSpaced && !lastSpaced) { reportRequiredEndingSpace(node, last); } - if (!closingCurlyBraceMustBeSpaced && isSpaced(penultimate, last)) { + if (!closingCurlyBraceMustBeSpaced && lastSpaced) { reportNoEndingSpace(node, last); } } } - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- + /** + * Reports a given object node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ObjectExpression or ObjectPattern node to check. + * @returns {void} + */ + function checkForObject(node) { + if (node.properties.length === 0) { + return; + } - return { + var first = sourceCode.getFirstToken(node), + last = sourceCode.getLastToken(node), + second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); - // var {x} = y; - ObjectPattern: function(node) { - var firstSpecifier = node.properties[0], - lastSpecifier = node.properties[node.properties.length - 1]; - - var first = context.getTokenBefore(firstSpecifier), - second = context.getFirstToken(firstSpecifier), - penultimate = context.getLastToken(lastSpecifier), - last = context.getTokenAfter(lastSpecifier); - - // support trailing commas - if (last.value === ",") { - penultimate = last; - last = context.getTokenAfter(last); - } + validateBraceSpacing(node, first, second, penultimate, last); + } - validateBraceSpacing(node, first, second, penultimate, last); - }, + /** + * Reports a given import node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ImportDeclaration node to check. + * @returns {void} + */ + function checkForImport(node) { + if (node.specifiers.length === 0) { + return; + } - // import {y} from 'x'; - ImportDeclaration: function(node) { + var firstSpecifier = node.specifiers[0], + lastSpecifier = node.specifiers[node.specifiers.length - 1]; - var firstSpecifier = node.specifiers[0], - lastSpecifier = node.specifiers[node.specifiers.length - 1]; + if (lastSpecifier.type !== "ImportSpecifier") { + return; + } + if (firstSpecifier.type !== "ImportSpecifier") { + firstSpecifier = node.specifiers[1]; + } - // don't do anything for namespace or default imports - if (firstSpecifier && lastSpecifier && firstSpecifier.type === "ImportSpecifier" && lastSpecifier.type === "ImportSpecifier") { - var first = context.getTokenBefore(firstSpecifier), - second = context.getFirstToken(firstSpecifier), - penultimate = context.getLastToken(lastSpecifier), - last = context.getTokenAfter(lastSpecifier); + var first = sourceCode.getTokenBefore(firstSpecifier), + last = sourceCode.getTokenAfter(lastSpecifier); - validateBraceSpacing(node, first, second, penultimate, last); - } + // to support a trailing comma. + if (last.value === ",") { + last = sourceCode.getTokenAfter(last); + } - }, + var second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); - // export {name} from 'yo'; - ExportNamedDeclaration: function(node) { - if (!node.specifiers.length) { - return; - } + validateBraceSpacing(node, first, second, penultimate, last); + } - var firstSpecifier = node.specifiers[0], - lastSpecifier = node.specifiers[node.specifiers.length - 1], - first = context.getTokenBefore(firstSpecifier), - second = context.getFirstToken(firstSpecifier), - penultimate = context.getLastToken(lastSpecifier), - last = context.getTokenAfter(lastSpecifier); + /** + * Reports a given export node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ExportNamedDeclaration node to check. + * @returns {void} + */ + function checkForExport(node) { + if (node.specifiers.length === 0) { + return; + } - validateBraceSpacing(node, first, second, penultimate, last); + var firstSpecifier = node.specifiers[0], + lastSpecifier = node.specifiers[node.specifiers.length - 1], + first = sourceCode.getTokenBefore(firstSpecifier), + last = sourceCode.getTokenAfter(lastSpecifier); - }, + // to support a trailing comma. + if (last.value === ",") { + last = sourceCode.getTokenAfter(last); + } - // var y = {x: 'y'} - ObjectExpression: function(node) { - if (node.properties.length === 0) { - return; - } + var second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); - var first = context.getFirstToken(node), - second = context.getFirstToken(node, 1), - penultimate = context.getLastToken(node, 1), - last = context.getLastToken(node); + validateBraceSpacing(node, first, second, penultimate, last); + } - validateBraceSpacing(node, first, second, penultimate, last); - } + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + // var {x} = y; + ObjectPattern: checkForObject, + + // var y = {x: 'y'} + ObjectExpression: checkForObject, + // import {y} from 'x'; + ImportDeclaration: checkForImport, + + // export {name} from 'yo'; + ExportNamedDeclaration: checkForExport }; }; diff --git a/tools/eslint/lib/rules/object-shorthand.js b/tools/eslint/lib/rules/object-shorthand.js index 6244332e4f73cd..078f842ffd8466 100644 --- a/tools/eslint/lib/rules/object-shorthand.js +++ b/tools/eslint/lib/rules/object-shorthand.js @@ -44,11 +44,12 @@ module.exports = function(context) { return; } - if (node.kind === "get" || node.kind === "set") { + // getters, setters and computed properties are ignored + if (node.kind === "get" || node.kind === "set" || node.computed) { return; } - if (node.value.type === "FunctionExpression" && node.value.id == null && APPLY_TO_METHODS) { + if (node.value.type === "FunctionExpression" && !node.value.id && APPLY_TO_METHODS) { // {x: function(){}} should be written as {x() {}} context.report(node, "Expected method shorthand."); diff --git a/tools/eslint/lib/rules/one-var.js b/tools/eslint/lib/rules/one-var.js index 1457e826cccd33..55c81143930337 100644 --- a/tools/eslint/lib/rules/one-var.js +++ b/tools/eslint/lib/rules/one-var.js @@ -18,7 +18,7 @@ module.exports = function(context) { var MODE_ALWAYS = "always", MODE_NEVER = "never"; - var mode = context.options[0]; + var mode = context.options[0] || MODE_ALWAYS; var options = { }; @@ -217,6 +217,8 @@ module.exports = function(context) { "ArrowFunctionExpression": startFunction, "BlockStatement": startBlock, "ForStatement": startBlock, + "ForInStatement": startBlock, + "ForOfStatement": startBlock, "SwitchStatement": startBlock, "VariableDeclaration": function(node) { @@ -263,6 +265,8 @@ module.exports = function(context) { }, "ForStatement:exit": endBlock, + "ForOfStatement:exit": endBlock, + "ForInStatement:exit": endBlock, "SwitchStatement:exit": endBlock, "BlockStatement:exit": endBlock, "Program:exit": endFunction, diff --git a/tools/eslint/lib/rules/operator-linebreak.js b/tools/eslint/lib/rules/operator-linebreak.js index c70b09ad5c922a..d23032ea4a70fb 100644 --- a/tools/eslint/lib/rules/operator-linebreak.js +++ b/tools/eslint/lib/rules/operator-linebreak.js @@ -6,37 +6,41 @@ "use strict"; +var assign = require("object-assign"), + astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { - var style = context.options[0] || "after"; + var usedDefaultGlobal = !context.options[0]; + var globalStyle = context.options[0] || "after"; + var options = context.options[1] || {}; + var styleOverrides = options.overrides ? assign({}, options.overrides) : {}; + + if (usedDefaultGlobal && !styleOverrides["?"]) { + styleOverrides["?"] = "before"; + } + + if (usedDefaultGlobal && !styleOverrides[":"]) { + styleOverrides[":"] = "before"; + } //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- - /** - * Checks whether two tokens are on the same line. - * @param {ASTNode} left The leftmost token. - * @param {ASTNode} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } - /** * Checks the operator placement - * @param {ASTNode} node The binary operator node to check + * @param {ASTNode} node The node to check + * @param {ASTNode} leftSide The node that comes before the operator in `node` * @private * @returns {void} */ - function validateBinaryExpression(node) { - var leftToken = context.getLastToken(node.left || node.id); + function validateNode(node, leftSide) { + var leftToken = context.getLastToken(leftSide); var operatorToken = context.getTokenAfter(leftToken); // When the left part of a binary expression is a single expression wrapped in @@ -51,15 +55,16 @@ module.exports = function(context) { var rightToken = context.getTokenAfter(operatorToken); var operator = operatorToken.value; + var style = styleOverrides[operator] || globalStyle; // if single line - if (isSameLine(leftToken, operatorToken) && - isSameLine(operatorToken, rightToken)) { + if (astUtils.isTokenOnSameLine(leftToken, operatorToken) && + astUtils.isTokenOnSameLine(operatorToken, rightToken)) { return; - } else if (!isSameLine(leftToken, operatorToken) && - !isSameLine(operatorToken, rightToken)) { + } else if (!astUtils.isTokenOnSameLine(leftToken, operatorToken) && + !astUtils.isTokenOnSameLine(operatorToken, rightToken)) { // lone operator context.report(node, { @@ -67,14 +72,14 @@ module.exports = function(context) { column: operatorToken.loc.end.column }, "Bad line breaking before and after '" + operator + "'."); - } else if (style === "before" && isSameLine(leftToken, operatorToken)) { + } else if (style === "before" && astUtils.isTokenOnSameLine(leftToken, operatorToken)) { context.report(node, { line: operatorToken.loc.end.line, column: operatorToken.loc.end.column }, "'" + operator + "' should be placed at the beginning of the line."); - } else if (style === "after" && isSameLine(operatorToken, rightToken)) { + } else if (style === "after" && astUtils.isTokenOnSameLine(operatorToken, rightToken)) { context.report(node, { line: operatorToken.loc.end.line, @@ -91,6 +96,15 @@ module.exports = function(context) { } } + /** + * Validates a binary expression using `validateNode` + * @param {BinaryExpression|LogicalExpression|AssignmentExpression} node node to be validated + * @returns {void} + */ + function validateBinaryExpression(node) { + validateNode(node, node.left); + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -99,16 +113,35 @@ module.exports = function(context) { "BinaryExpression": validateBinaryExpression, "LogicalExpression": validateBinaryExpression, "AssignmentExpression": validateBinaryExpression, - "VariableDeclarator": function (node) { + "VariableDeclarator": function(node) { if (node.init) { - validateBinaryExpression(node); + validateNode(node, node.id); } + }, + "ConditionalExpression": function(node) { + validateNode(node, node.test); + validateNode(node, node.consequent); } }; }; module.exports.schema = [ { - "enum": ["after", "before", "none"] + "enum": ["after", "before", "none", null] + }, + { + "type": "object", + "properties": { + "overrides": { + "type": "object", + "properties": { + "anyOf": { + "type": "string", + "enum": ["after", "before", "none"] + } + } + } + }, + "additionalProperties": false } ]; diff --git a/tools/eslint/lib/rules/padded-blocks.js b/tools/eslint/lib/rules/padded-blocks.js index edb44637bea92f..56e6a7822844f5 100644 --- a/tools/eslint/lib/rules/padded-blocks.js +++ b/tools/eslint/lib/rules/padded-blocks.js @@ -10,12 +10,36 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { var requirePadding = context.options[0] !== "never"; var ALWAYS_MESSAGE = "Block must be padded by blank lines.", NEVER_MESSAGE = "Block must not be padded by blank lines."; + /** + * Retrieves an array of all comments defined inside the given node. + * @param {ASTNode} node The AST node. + * @returns {ASTNode[]} An array of comment nodes. + */ + function getCommentsInNode(node) { + var allComments = context.getAllComments(); + + return allComments.filter(function(comment) { + return node.range[0] < comment.range[0] && + node.range[1] > comment.range[1]; + }); + } + + /** + * Checks if the location of a node or token is before the location of another node or token + * @param {ASTNode|Token} a The node or token to check if its location is before b. + * @param {ASTNode|Token} b The node or token which will be compared with a. + * @returns {boolean} True if a is located before b. + */ + function isLocatedBefore(a, b) { + return a.range[1] < b.range[0]; + } + /** * Checks if the given non empty block node has a blank line before its first child node. * @param {ASTNode} node The AST node of a BlockStatement. @@ -26,10 +50,11 @@ module.exports = function (context) { first = node.body[0], firstLine = first.loc.start.line, expectedFirstLine = blockStart + 2, - leadingComments = context.getComments(first).leading; + comments = getCommentsInNode(node), + firstComment = comments[0]; - if (leadingComments.length > 0) { - firstLine = leadingComments[0].loc.start.line; + if (firstComment && isLocatedBefore(firstComment, first)) { + firstLine = firstComment.loc.start.line; } return expectedFirstLine <= firstLine; @@ -43,12 +68,14 @@ module.exports = function (context) { function isBlockBottomPadded(node) { var blockEnd = node.loc.end.line, last = node.body[node.body.length - 1], - lastLine = context.getLastToken(last).loc.end.line, + lastToken = context.getLastToken(last), + lastLine = lastToken.loc.end.line, expectedLastLine = blockEnd - 2, - trailingComments = context.getComments(last).trailing; + comments = getCommentsInNode(node), + lastComment = comments[comments.length - 1]; - if (trailingComments.length > 0) { - lastLine = trailingComments[trailingComments.length - 1].loc.end.line; + if (lastComment && isLocatedBefore(lastToken, lastComment)) { + lastLine = lastComment.loc.end.line; } return lastLine <= expectedLastLine; diff --git a/tools/eslint/lib/rules/prefer-arrow-callback.js b/tools/eslint/lib/rules/prefer-arrow-callback.js new file mode 100644 index 00000000000000..f7f26ca2581b99 --- /dev/null +++ b/tools/eslint/lib/rules/prefer-arrow-callback.js @@ -0,0 +1,206 @@ +/** + * @fileoverview A rule to suggest using arrow functions as callbacks. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given variable is a function name. + * @param {escope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is a function name. + */ +function isFunctionName(variable) { + return variable && variable.defs[0].type === "FunctionName"; +} + +/** + * Checks whether or not a given MetaProperty node equals to a given value. + * @param {ASTNode} node - A MetaProperty node to check. + * @param {string} metaName - The name of `MetaProperty.meta`. + * @param {string} propertyName - The name of `MetaProperty.property`. + * @returns {boolean} `true` if the node is the specific value. + */ +function checkMetaProperty(node, metaName, propertyName) { + // TODO: Remove this if block after https://github.com/eslint/espree/issues/206 was fixed. + if (typeof node.meta === "string") { + return node.meta === metaName && node.property === propertyName; + } + return node.meta.name === metaName && node.property.name === propertyName; +} + +/** + * Gets the variable object of `arguments` which is defined implicitly. + * @param {escope.Scope} scope - A scope to get. + * @returns {escope.Variable} The found variable object. + */ +function getVariableOfArguments(scope) { + var variables = scope.variables; + for (var i = 0; i < variables.length; ++i) { + var variable = variables[i]; + if (variable.name === "arguments") { + // If there was a parameter which is named "arguments", the implicit "arguments" is not defined. + // So does fast return with null. + return (variable.identifiers.length === 0) ? variable : null; + } + } + + /* istanbul ignore next */ + return null; +} + +/** + * Checkes whether or not a given node is a callback. + * @param {ASTNode} node - A node to check. + * @returns {object} + * {boolean} retv.isCallback - `true` if the node is a callback. + * {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`. + */ +function getCallbackInfo(node) { + var retv = {isCallback: false, isLexicalThis: false}; + var parent = node.parent; + while (node) { + switch (parent.type) { + // Checks parents recursively. + case "LogicalExpression": + case "ConditionalExpression": + break; + + // Checks whether the parent node is `.bind(this)` call. + case "MemberExpression": + if (parent.object === node && + !parent.property.computed && + parent.property.type === "Identifier" && + parent.property.name === "bind" && + parent.parent.type === "CallExpression" && + parent.parent.callee === parent + ) { + retv.isLexicalThis = ( + parent.parent.arguments.length === 1 && + parent.parent.arguments[0].type === "ThisExpression" + ); + node = parent; + parent = parent.parent; + } else { + return retv; + } + break; + + // Checks whether the node is a callback. + case "CallExpression": + case "NewExpression": + if (parent.callee !== node) { + retv.isCallback = true; + } + return retv; + + default: + return retv; + } + + node = parent; + parent = parent.parent; + } + + /* istanbul ignore next */ + throw new Error("unreachable"); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + // {Array<{this: boolean, super: boolean, meta: boolean}>} + // - this - A flag which shows there are one or more ThisExpression. + // - super - A flag which shows there are one or more Super. + // - meta - A flag which shows there are one or more MethProperty. + var stack = []; + + /** + * Pushes new function scope with all `false` flags. + * @returns {void} + */ + function enterScope() { + stack.push({this: false, super: false, meta: false}); + } + + /** + * Pops a function scope from the stack. + * @returns {{this: boolean, super: boolean, meta: boolean}} The information of the last scope. + */ + function exitScope() { + return stack.pop(); + } + + return { + // Reset internal state. + Program: function() { + stack = []; + }, + + // If there are below, it cannot replace with arrow functions merely. + ThisExpression: function() { + var info = stack[stack.length - 1]; + if (info) { + info.this = true; + } + }, + Super: function() { + var info = stack[stack.length - 1]; + if (info) { + info.super = true; + } + }, + MetaProperty: function(node) { + var info = stack[stack.length - 1]; + if (info && checkMetaProperty(node, "new", "target")) { + info.meta = true; + } + }, + + // To skip nested scopes. + FunctionDeclaration: enterScope, + "FunctionDeclaration:exit": exitScope, + + // Main. + FunctionExpression: enterScope, + "FunctionExpression:exit": function(node) { + var scopeInfo = exitScope(); + + // Skip generators. + if (node.generator) { + return; + } + + // Skip recursive functions. + var nameVar = context.getDeclaredVariables(node)[0]; + if (isFunctionName(nameVar) && nameVar.references.length > 0) { + return; + } + + // Skip if it's using arguments. + var variable = getVariableOfArguments(context.getScope()); + if (variable && variable.references.length > 0) { + return; + } + + // Reports if it's a callback which can replace with arrows. + var callbackInfo = getCallbackInfo(node); + if (callbackInfo.isCallback && + (!scopeInfo.this || callbackInfo.isLexicalThis) && + !scopeInfo.super && + !scopeInfo.meta + ) { + context.report(node, "Unexpected function expression."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/prefer-const.js b/tools/eslint/lib/rules/prefer-const.js index ee7eba14b7b6a4..64c239132d159a 100644 --- a/tools/eslint/lib/rules/prefer-const.js +++ b/tools/eslint/lib/rules/prefer-const.js @@ -50,8 +50,8 @@ module.exports = function(context) { var references = variable.references; var identifier = variable.identifiers[0]; - if (statement != null && - identifier != null && + if (statement && + identifier && declaration.type === "VariableDeclaration" && declaration.kind === "let" && (statement.type !== "ForStatement" || statement.init !== declaration) && @@ -75,7 +75,7 @@ module.exports = function(context) { var pushAll = Function.apply.bind(Array.prototype.push); return { - "Program:exit": function () { + "Program:exit": function() { var stack = [context.getScope()]; while (stack.length) { var scope = stack.pop(); diff --git a/tools/eslint/lib/rules/prefer-reflect.js b/tools/eslint/lib/rules/prefer-reflect.js new file mode 100644 index 00000000000000..4d320614bb0d2d --- /dev/null +++ b/tools/eslint/lib/rules/prefer-reflect.js @@ -0,0 +1,100 @@ +/** + * @fileoverview Rule to suggest using "Reflect" api over Function/Object methods + * @author Keith Cirkel + * @copyright 2015 Keith Cirkel. All rights reserved. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var existingNames = { + "apply": "Function.prototype.apply", + "call": "Function.prototype.call", + "defineProperty": "Object.defineProperty", + "getOwnPropertyDescriptor": "Object.getOwnPropertyDescriptor", + "getPrototypeOf": "Object.getPrototypeOf", + "setPrototypeOf": "Object.setPrototypeOf", + "isExtensible": "Object.isExtensible", + "getOwnPropertyNames": "Object.getOwnPropertyNames", + "preventExtensions": "Object.preventExtensions" + }; + + var reflectSubsitutes = { + "apply": "Reflect.apply", + "call": "Reflect.apply", + "defineProperty": "Reflect.defineProperty", + "getOwnPropertyDescriptor": "Reflect.getOwnPropertyDescriptor", + "getPrototypeOf": "Reflect.getPrototypeOf", + "setPrototypeOf": "Reflect.setPrototypeOf", + "isExtensible": "Reflect.isExtensible", + "getOwnPropertyNames": "Reflect.getOwnPropertyNames", + "preventExtensions": "Reflect.preventExtensions" + }; + + var exceptions = (context.options[0] || {}).exceptions || []; + + /** + * Reports the Reflect violation based on the `existing` and `substitute` + * @param {Object} node The node that violates the rule. + * @param {string} existing The existing method name that has been used. + * @param {string} substitute The Reflect substitute that should be used. + * @returns {void} + */ + function report(node, existing, substitute) { + context.report(node, "Avoid using {{existing}}, instead use {{substitute}}", { + existing: existing, + substitute: substitute + }); + } + + return { + "CallExpression": function(node) { + var methodName = (node.callee.property || {}).name; + var isReflectCall = (node.callee.object || {}).name === "Reflect"; + var hasReflectSubsitute = reflectSubsitutes.hasOwnProperty(methodName); + var userConfiguredException = exceptions.indexOf(methodName) !== -1; + if (hasReflectSubsitute && !isReflectCall && !userConfiguredException) { + report(node, existingNames[methodName], reflectSubsitutes[methodName]); + } + }, + "UnaryExpression": function(node) { + var isDeleteOperator = node.operator === "delete"; + var targetsIdentifier = node.argument.type === "Identifier"; + var userConfiguredException = exceptions.indexOf("delete") !== -1; + if (isDeleteOperator && !targetsIdentifier && !userConfiguredException) { + report(node, "the delete keyword", "Reflect.deleteProperty"); + } + } + }; + +}; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "exceptions": { + "type": "array", + "items": { + "enum": [ + "apply", + "call", + "delete", + "defineProperty", + "getOwnPropertyDescriptor", + "getPrototypeOf", + "setPrototypeOf", + "isExtensible", + "getOwnPropertyNames", + "preventExtensions" + ] + }, + "uniqueItems": true + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/prefer-spread.js b/tools/eslint/lib/rules/prefer-spread.js new file mode 100644 index 00000000000000..fe4e2603bfbee1 --- /dev/null +++ b/tools/eslint/lib/rules/prefer-spread.js @@ -0,0 +1,92 @@ +/** + * @fileoverview A rule to suggest using of the spread operator instead of `.apply()`. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is a `.apply()` for variadic. + * @param {ASTNode} node - A CallExpression node to check. + * @returns {boolean} Whether or not the node is a `.apply()` for variadic. + */ +function isVariadicApplyCalling(node) { + return ( + node.callee.type === "MemberExpression" && + node.callee.property.type === "Identifier" && + node.callee.property.name === "apply" && + node.callee.computed === false && + node.arguments.length === 2 && + node.arguments[1].type !== "ArrayExpression" + ); +} + +/** + * Checks whether or not the tokens of two given nodes are same. + * @param {ASTNode} left - A node 1 to compare. + * @param {ASTNode} right - A node 2 to compare. + * @param {RuleContext} context - The ESLint rule context object. + * @returns {boolean} the source code for the given node. + */ +function equalTokens(left, right, context) { + var tokensL = context.getTokens(left); + var tokensR = context.getTokens(right); + + if (tokensL.length !== tokensR.length) { + return false; + } + for (var i = 0; i < tokensL.length; ++i) { + if (tokensL[i].type !== tokensR[i].type || + tokensL[i].value !== tokensR[i].value + ) { + return false; + } + } + + return true; +} + +/** + * Checks whether or not `thisArg` is not changed by `.apply()`. + * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function. + * @param {ASTNode} thisArg - The node that is given to the first argument of the `.apply()`. + * @param {RuleContext} context - The ESLint rule context object. + * @returns {boolean} Whether or not `thisArg` is not changed by `.apply()`. + */ +function isValidThisArg(expectedThis, thisArg, context) { + if (!expectedThis) { + return astUtils.isNullOrUndefined(thisArg); + } + return equalTokens(expectedThis, thisArg, context); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + return { + "CallExpression": function(node) { + if (!isVariadicApplyCalling(node)) { + return; + } + + var applied = node.callee.object; + var expectedThis = (applied.type === "MemberExpression") ? applied.object : null; + var thisArg = node.arguments[0]; + + if (isValidThisArg(expectedThis, thisArg, context)) { + context.report(node, "use the spread operator instead of the \".apply()\"."); + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/prefer-template.js b/tools/eslint/lib/rules/prefer-template.js new file mode 100644 index 00000000000000..7cb4e03e79c4d8 --- /dev/null +++ b/tools/eslint/lib/rules/prefer-template.js @@ -0,0 +1,96 @@ +/** + * @fileoverview A rule to suggest using template literals instead of string concatenation. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a concatenation. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a concatenation. + */ +function isConcatenation(node) { + return node.type === "BinaryExpression" && node.operator === "+"; +} + +/** + * Gets the top binary expression node for concatenation in parents of a given node. + * @param {ASTNode} node - A node to get. + * @returns {ASTNode} the top binary expression node in parents of a given node. + */ +function getTopConcatBinaryExpression(node) { + while (isConcatenation(node.parent)) { + node = node.parent; + } + return node; +} + +/** + * Checks whether or not a given binary expression has non string literals. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node has non string literals. + */ +function hasNonStringLiteral(node) { + if (isConcatenation(node)) { + // `left` is deeper than `right` normally. + return hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left); + } + return !astUtils.isStringLiteral(node); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var done = Object.create(null); + + /** + * Reports if a given node is string concatenation with non string literals. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function checkForStringConcat(node) { + if (!astUtils.isStringLiteral(node) || !isConcatenation(node.parent)) { + return; + } + + var topBinaryExpr = getTopConcatBinaryExpression(node.parent); + + // Checks whether or not this node had been checked already. + if (done[topBinaryExpr.range[0]]) { + return; + } + done[topBinaryExpr.range[0]] = true; + + if (hasNonStringLiteral(topBinaryExpr)) { + context.report( + topBinaryExpr, + "Unexpected string concatenation."); + } + } + + return { + Program: function() { + done = Object.create(null); + }, + + Literal: checkForStringConcat, + TemplateLiteral: checkForStringConcat + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/quote-props.js b/tools/eslint/lib/rules/quote-props.js index 225dbfe8f86acf..29ce2370417949 100644 --- a/tools/eslint/lib/rules/quote-props.js +++ b/tools/eslint/lib/rules/quote-props.js @@ -2,6 +2,7 @@ * @fileoverview Rule to flag non-quoted property names in object literals. * @author Mathias Bynens * @copyright 2014 Brandon Mills. All rights reserved. + * @copyright 2015 Tomasz Olędzki. All rights reserved. */ "use strict"; @@ -9,7 +10,8 @@ // Requirements //------------------------------------------------------------------------------ -var espree = require("espree"); +var espree = require("espree"), + keywords = require("../util/keywords"); //------------------------------------------------------------------------------ // Rule Definition @@ -17,17 +19,53 @@ var espree = require("espree"); module.exports = function(context) { - var MODE = context.options[0]; + var MODE = context.options[0], + KEYWORDS = context.options[1] && context.options[1].keywords, + CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false, + NUMBERS = context.options[1] && context.options[1].numbers, + + MESSAGE_UNNECESSARY = "Unnecessarily quoted property `{{property}}` found.", + MESSAGE_UNQUOTED = "Unquoted property `{{property}}` found.", + MESSAGE_NUMERIC = "Unquoted number literal `{{property}}` used as key.", + MESSAGE_RESERVED = "Unquoted reserved word `{{property}}` used as key."; + + + /** + * Checks whether a certain string constitutes an ES3 token + * @param {string} tokenStr - The string to be checked. + * @returns {boolean} `true` if it is an ES3 token. + */ + function isKeyword(tokenStr) { + return keywords.indexOf(tokenStr) >= 0; + } + + /** + * Checks if an espree-tokenized key has redundant quotes (i.e. whether quotes are unnecessary) + * @param {espreeTokens} tokens The espree-tokenized node key + * @param {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked + * @returns {boolean} Whether or not a key has redundant quotes. + * @private + */ + function areQuotesRedundant(tokens, skipNumberLiterals) { + return tokens.length === 1 && + (["Identifier", "Keyword", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 || + (tokens[0].type === "Numeric" && !skipNumberLiterals && "" + +tokens[0].value === tokens[0].value)); + } /** * Ensures that a property's key is quoted only when necessary * @param {ASTNode} node Property AST node * @returns {void} */ - function asNeeded(node) { + function checkUnnecessaryQuotes(node) { var key = node.key, + isKeywordToken, tokens; + if (node.method || node.computed || node.shorthand) { + return; + } + if (key.type === "Literal" && typeof key.value === "string") { try { tokens = espree.tokenize(key.value); @@ -35,12 +73,23 @@ module.exports = function(context) { return; } - if (tokens.length === 1 && - (["Identifier", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 || - (tokens[0].type === "Numeric" && "" + +tokens[0].value === tokens[0].value)) - ) { - context.report(node, "Unnecessarily quoted property `{{value}}` found.", key); + if (tokens.length !== 1) { + return; + } + + isKeywordToken = isKeyword(tokens[0].value); + + if (isKeywordToken && KEYWORDS) { + return; } + + if (CHECK_UNNECESSARY && areQuotesRedundant(tokens, NUMBERS)) { + context.report(node, MESSAGE_UNNECESSARY, {property: key.value}); + } + } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) { + context.report(node, MESSAGE_RESERVED, {property: key.name}); + } else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") { + context.report(node, MESSAGE_NUMERIC, {property: key.value}); } } @@ -49,24 +98,131 @@ module.exports = function(context) { * @param {ASTNode} node Property AST node * @returns {void} */ - function always(node) { + function checkOmittedQuotes(node) { var key = node.key; - if (!node.method && !(key.type === "Literal" && typeof key.value === "string")) { - context.report(node, "Unquoted property `{{key}}` found.", { - key: key.name || key.value + if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) { + context.report(node, MESSAGE_UNQUOTED, { + property: key.name || key.value }); } } + /** + * Ensures that an object's keys are consistently quoted, optionally checks for redundancy of quotes + * @param {ASTNode} node Property AST node + * @param {boolean} checkQuotesRedundancy Whether to check quotes' redundancy + * @returns {void} + */ + function checkConsistency(node, checkQuotesRedundancy) { + var quotes = false, + lackOfQuotes = false, + necessaryQuotes = false; + + node.properties.forEach(function(property) { + var key = property.key, + tokens; + + if (!key || property.method || property.computed || property.shorthand) { + return; + } + + if (key.type === "Literal" && typeof key.value === "string") { + + quotes = true; + + if (checkQuotesRedundancy) { + try { + tokens = espree.tokenize(key.value); + } catch (e) { + necessaryQuotes = true; + return; + } + + necessaryQuotes = necessaryQuotes || !areQuotesRedundant(tokens) || KEYWORDS && isKeyword(tokens[0].value); + } + } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) { + necessaryQuotes = true; + context.report(node, "Properties should be quoted as `{{property}}` is a reserved word.", {property: key.name}); + } else { + lackOfQuotes = true; + } + + if (quotes && lackOfQuotes) { + context.report(node, "Inconsistently quoted property `{{key}}` found.", { + key: key.name || key.value + }); + } + }); + + if (checkQuotesRedundancy && quotes && !necessaryQuotes) { + context.report(node, "Properties shouldn't be quoted as all quotes are redundant."); + } + } + return { - "Property": MODE === "as-needed" ? asNeeded : always + "Property": function(node) { + if (MODE === "always" || !MODE) { + checkOmittedQuotes(node); + } + if (MODE === "as-needed") { + checkUnnecessaryQuotes(node); + } + }, + "ObjectExpression": function(node) { + if (MODE === "consistent") { + checkConsistency(node, false); + } + if (MODE === "consistent-as-needed") { + checkConsistency(node, true); + } + } }; }; -module.exports.schema = [ - { - "enum": ["always", "as-needed"] - } -]; +module.exports.schema = { + "anyOf": [ + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["always", "as-needed", "consistent", "consistent-as-needed"] + } + ], + "minItems": 1, + "maxItems": 2 + }, + { + "type": "array", + "items": [ + { + "enum": [0, 1, 2] + }, + { + "enum": ["always", "as-needed", "consistent", "consistent-as-needed"] + }, + { + "type": "object", + "properties": { + "keywords": { + "type": "boolean" + }, + "unnecessary": { + "type": "boolean" + }, + "numbers": { + "type": "boolean" + } + }, + "additionalProperties": false + } + ], + "minItems": 1, + "maxItems": 3 + } + ] +}; diff --git a/tools/eslint/lib/rules/quotes.js b/tools/eslint/lib/rules/quotes.js index 7d4626b9aedc13..6f12add2fdfe6f 100644 --- a/tools/eslint/lib/rules/quotes.js +++ b/tools/eslint/lib/rules/quotes.js @@ -1,10 +1,18 @@ /** * @fileoverview A rule to choose between single and double quote marks * @author Matt DuVall , Brandon Payton + * @copyright 2013 Matt DuVall. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Constants //------------------------------------------------------------------------------ @@ -26,34 +34,126 @@ var QUOTE_SETTINGS = { description: "backtick" } }; +/** + * Switches quoting of javascript string between ' " and ` + * escaping and unescaping as necessary. + * Only escaping of the minimal set of characters is changed. + * Note: escaping of newlines when switching from backtick to other quotes is not handled. + * @param {string} str - A string to convert. + * @returns {string} The string with changed quotes. + * @private + */ +QUOTE_SETTINGS.double.convert = +QUOTE_SETTINGS.single.convert = +QUOTE_SETTINGS.backtick.convert = function(str) { + var newQuote = this.quote; + var oldQuote = str[0]; + if (newQuote === oldQuote) { + return str; + } + return newQuote + str.slice(1, -1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g, function(match, escaped, newline) { + if (escaped === oldQuote || oldQuote === "`" && escaped === "${") { + return escaped; // unescape + } + if (match === newQuote || newQuote === "`" && match === "${") { + return "\\" + match; // escape + } + if (newline && oldQuote === "`") { + return "\\n"; // escape newlines + } + return match; + }) + newQuote; +}; -var AVOID_ESCAPE = "avoid-escape"; +var AVOID_ESCAPE = "avoid-escape", + FUNCTION_TYPE = /^(?:Arrow)?Function(?:Declaration|Expression)$/; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { + /** + * Determines if a given node is part of JSX syntax. + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node is a JSX node, false if not. + * @private + */ + function isJSXElement(node) { + return node.type.indexOf("JSX") === 0; + } /** - * Validate that a string passed in is surrounded by the specified character - * @param {string} val The text to check. - * @param {string} character The character to see if it's surrounded by. - * @returns {boolean} True if the text is surrounded by the character, false if not. + * Checks whether or not a given node is a directive. + * The directive is a `ExpressionStatement` which has only a string literal. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a directive. * @private */ - function isSurroundedBy(val, character) { - return val[0] === character && val[val.length - 1] === character; + function isDirective(node) { + return ( + node.type === "ExpressionStatement" && + node.expression.type === "Literal" && + typeof node.expression.value === "string" + ); } /** - * Determines if a given node is part of JSX syntax. - * @param {ASTNode} node The node to check. - * @returns {boolean} True if the node is a JSX node, false if not. + * Checks whether or not a given node is a part of directive prologues. + * See also: http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a part of directive prologues. * @private */ - function isJSXElement(node) { - return node.type.indexOf("JSX") === 0; + function isPartOfDirectivePrologue(node) { + var block = node.parent.parent; + if (block.type !== "Program" && (block.type !== "BlockStatement" || !FUNCTION_TYPE.test(block.parent.type))) { + return false; + } + + // Check the node is at a prologue. + for (var i = 0; i < block.body.length; ++i) { + var statement = block.body[i]; + + if (statement === node.parent) { + return true; + } + if (!isDirective(statement)) { + break; + } + } + + return false; + } + + /** + * Checks whether or not a given node is allowed as non backtick. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is allowed as non backtick. + * @private + */ + function isAllowedAsNonBacktick(node) { + var parent = node.parent; + + switch (parent.type) { + // Directive Prologues. + case "ExpressionStatement": + return isPartOfDirectivePrologue(node); + + // LiteralPropertyName. + case "Property": + return parent.key === node && !parent.computed; + + // ModuleSpecifier. + case "ImportDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": + return parent.source === node; + + // Others don't allow. + default: + return false; + } } return { @@ -67,14 +167,20 @@ module.exports = function(context) { isValid; if (settings && typeof val === "string") { - isValid = isJSXElement(node.parent) || isSurroundedBy(rawVal, settings.quote); + isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) || isJSXElement(node.parent) || astUtils.isSurroundedBy(rawVal, settings.quote); if (!isValid && avoidEscape) { - isValid = isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0; + isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0; } if (!isValid) { - context.report(node, "Strings must use " + settings.description + "."); + context.report({ + node: node, + message: "Strings must use " + settings.description + ".", + fix: function(fixer) { + return fixer.replaceText(node, settings.convert(node.raw)); + } + }); } } } diff --git a/tools/eslint/lib/rules/radix.js b/tools/eslint/lib/rules/radix.js index ac93b9e60788f3..9ec5231fddad1b 100644 --- a/tools/eslint/lib/rules/radix.js +++ b/tools/eslint/lib/rules/radix.js @@ -11,31 +11,66 @@ module.exports = function(context) { + var MODE_ALWAYS = "always", + MODE_AS_NEEDED = "as-needed"; + + var mode = context.options[0] || MODE_ALWAYS; + return { "CallExpression": function(node) { var radix; - if (node.callee.name === "parseInt") { + if (!(node.callee.name === "parseInt" || ( + node.callee.type === "MemberExpression" && + node.callee.object.name === "Number" && + node.callee.property.name === "parseInt" + ) + )) { + return; + } - if (node.arguments.length < 2) { - context.report(node, "Missing radix parameter."); - } else { + if (node.arguments.length === 0) { + context.report({ + node: node, + message: "Missing parameters." + }); + } else if (node.arguments.length < 2 && mode === MODE_ALWAYS) { + context.report({ + node: node, + message: "Missing radix parameter." + }); + } else if (node.arguments.length > 1 && mode === MODE_AS_NEEDED && + (node.arguments[1] && node.arguments[1].type === "Literal" && + node.arguments[1].value === 10) + ) { + context.report({ + node: node, + message: "Redundant radix parameter." + }); + } else { - radix = node.arguments[1]; + radix = node.arguments[1]; - // don't allow non-numeric literals or undefined - if ((radix.type === "Literal" && typeof radix.value !== "number") || - (radix.type === "Identifier" && radix.name === "undefined") - ) { - context.report(node, "Invalid radix parameter."); - } + // don't allow non-numeric literals or undefined + if (radix && + ((radix.type === "Literal" && typeof radix.value !== "number") || + (radix.type === "Identifier" && radix.name === "undefined")) + ) { + context.report({ + node: node, + message: "Invalid radix parameter." + }); } - } + } }; }; -module.exports.schema = []; +module.exports.schema = [ + { + "enum": ["always", "as-needed"] + } +]; diff --git a/tools/eslint/lib/rules/require-jsdoc.js b/tools/eslint/lib/rules/require-jsdoc.js new file mode 100644 index 00000000000000..79379140bc79e6 --- /dev/null +++ b/tools/eslint/lib/rules/require-jsdoc.js @@ -0,0 +1,97 @@ +/** + * @fileoverview Rule to check for jsdoc presence. + * @author Gyandeep Singh + * @copyright 2015 Gyandeep Singh. All rights reserved. + */ +"use strict"; + +var assign = require("object-assign"); + +module.exports = function(context) { + var source = context.getSourceCode(); + var DEFAULT_OPTIONS = { + "FunctionDeclaration": true, + "MethodDefinition": false, + "ClassDeclaration": false + }; + var options = assign(DEFAULT_OPTIONS, context.options[0] && context.options[0].require || {}); + + /** + * Report the error message + * @param {ASTNode} node node to report + * @returns {void} + */ + function report(node) { + context.report(node, "Missing JSDoc comment."); + } + + /** + * Check if the jsdoc comment is present for class methods + * @param {ASTNode} node node to examine + * @returns {void} + */ + function checkClassMethodJsDoc(node) { + if (node.parent.type === "MethodDefinition") { + var jsdocComment = source.getJSDocComment(node); + + if (!jsdocComment) { + report(node); + } + } + } + + /** + * Check if the jsdoc comment is present or not. + * @param {ASTNode} node node to examine + * @returns {void} + */ + function checkJsDoc(node) { + var jsdocComment = source.getJSDocComment(node); + + if (!jsdocComment) { + report(node); + } + } + + return { + "FunctionDeclaration": function(node) { + if (options.FunctionDeclaration) { + checkJsDoc(node); + } + }, + "FunctionExpression": function(node) { + if (options.MethodDefinition) { + checkClassMethodJsDoc(node); + } + }, + "ClassDeclaration": function(node) { + if (options.ClassDeclaration) { + checkJsDoc(node); + } + } + }; +}; + +module.exports.schema = [ + { + "type": "object", + "properties": { + "require": { + "type": "object", + "properties": { + "ClassDeclaration": { + "type": "boolean" + }, + "MethodDefinition": { + "type": "boolean" + }, + "FunctionDeclaration": { + "type": "boolean" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } +]; diff --git a/tools/eslint/lib/rules/require-yield.js b/tools/eslint/lib/rules/require-yield.js new file mode 100644 index 00000000000000..f7a0d40c58fac5 --- /dev/null +++ b/tools/eslint/lib/rules/require-yield.js @@ -0,0 +1,62 @@ +/** + * @fileoverview Rule to flag the generator functions that does not have yield. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = function(context) { + var stack = []; + + /** + * If the node is a generator function, start counting `yield` keywords. + * @param {Node} node - A function node to check. + * @returns {void} + */ + function beginChecking(node) { + if (node.generator) { + stack.push(0); + } + } + + /** + * If the node is a generator function, end counting `yield` keywords, then + * reports result. + * @param {Node} node - A function node to check. + * @returns {void} + */ + function endChecking(node) { + if (!node.generator) { + return; + } + + var countYield = stack.pop(); + if (countYield === 0 && node.body.body.length > 0) { + context.report( + node, + "This generator function does not have `yield`."); + } + } + + return { + "FunctionDeclaration": beginChecking, + "FunctionDeclaration:exit": endChecking, + "FunctionExpression": beginChecking, + "FunctionExpression:exit": endChecking, + + // Increases the count of `yield` keyword. + "YieldExpression": function() { + /* istanbul ignore else */ + if (stack.length > 0) { + stack[stack.length - 1] += 1; + } + } + }; +}; + +module.exports.schema = []; diff --git a/tools/eslint/lib/rules/semi-spacing.js b/tools/eslint/lib/rules/semi-spacing.js index fddebfcf3296fa..7164d5b6aeb235 100644 --- a/tools/eslint/lib/rules/semi-spacing.js +++ b/tools/eslint/lib/rules/semi-spacing.js @@ -6,15 +6,18 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { var config = context.options[0], requireSpaceBefore = false, - requireSpaceAfter = true; + requireSpaceAfter = true, + sourceCode = context.getSourceCode(); if (typeof config === "object") { if (config.hasOwnProperty("before")) { @@ -25,27 +28,6 @@ module.exports = function (context) { } } - /** - * Determines whether two adjacent tokens have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Checks whether two tokens are on the same line. - * @param {Object} left The leftmost token. - * @param {Object} right The rightmost token. - * @returns {boolean} True if the tokens are on the same line, false if not. - * @private - */ - function isSameLine(left, right) { - return left.loc.end.line === right.loc.start.line; - } - /** * Checks if a given token has leading whitespace. * @param {Object} token The token to check. @@ -53,7 +35,7 @@ module.exports = function (context) { */ function hasLeadingSpace(token) { var tokenBefore = context.getTokenBefore(token); - return tokenBefore && isSameLine(tokenBefore, token) && isSpaced(tokenBefore, token); + return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token); } /** @@ -63,7 +45,7 @@ module.exports = function (context) { */ function hasTrailingSpace(token) { var tokenAfter = context.getTokenAfter(token); - return tokenAfter && isSameLine(token, tokenAfter) && isSpaced(token, tokenAfter); + return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter); } /** @@ -73,7 +55,31 @@ module.exports = function (context) { */ function isLastTokenInCurrentLine(token) { var tokenAfter = context.getTokenAfter(token); - return !(tokenAfter && isSameLine(token, tokenAfter)); + return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter)); + } + + /** + * Checks if the given token is the first token in its line + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the token is the first in its line. + */ + function isFirstTokenInCurrentLine(token) { + var tokenBefore = context.getTokenBefore(token); + return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore)); + } + + /** + * Checks if the next token of a given token is a closing parenthesis. + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the next token of a given token is a closing parenthesis. + */ + function isBeforeClosingParen(token) { + var nextToken = context.getTokenAfter(token); + return ( + nextToken && + nextToken.type === "Punctuator" && + (nextToken.value === "}" || nextToken.value === ")") + ); } /** @@ -107,7 +113,7 @@ module.exports = function (context) { } } - if (!isLastTokenInCurrentLine(token)) { + if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) { if (hasTrailingSpace(token)) { if (!requireSpaceAfter) { context.report(node, location, "Unexpected whitespace after semicolon."); @@ -139,7 +145,7 @@ module.exports = function (context) { "DebuggerStatement": checkNode, "ReturnStatement": checkNode, "ThrowStatement": checkNode, - "ForStatement": function (node) { + "ForStatement": function(node) { if (node.init) { checkSemicolonSpacing(context.getTokenAfter(node.init), node); } diff --git a/tools/eslint/lib/rules/semi.js b/tools/eslint/lib/rules/semi.js index 7cd19632f55ba3..f20902b5deb43a 100644 --- a/tools/eslint/lib/rules/semi.js +++ b/tools/eslint/lib/rules/semi.js @@ -1,17 +1,21 @@ /** * @fileoverview Rule to flag missing semicolons. * @author Nicholas C. Zakas + * @copyright 2013 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ + module.exports = function(context) { var OPT_OUT_PATTERN = /[\[\(\/\+\-]/; // One of [(/+- - var always = context.options[0] !== "never"; + var always = context.options[0] !== "never", + sourceCode = context.getSourceCode(); //-------------------------------------------------------------------------- // Helpers @@ -23,8 +27,32 @@ module.exports = function(context) { * @returns {void} */ function report(node) { - var message = always ? "Missing semicolon." : "Extra semicolon."; - context.report(node, context.getLastToken(node).loc.end, message); + var message, + fix, + lastToken = sourceCode.getLastToken(node), + loc = lastToken.loc; + + if (always) { + message = "Missing semicolon."; + loc = loc.end; + fix = function(fixer) { + return fixer.insertTextAfter(lastToken, ";"); + }; + } else { + message = "Extra semicolon."; + loc = loc.start; + fix = function(fixer) { + return fixer.remove(lastToken); + }; + } + + context.report({ + node: node, + loc: loc, + message: message, + fix: fix + }); + } /** @@ -110,17 +138,18 @@ module.exports = function(context) { "ExpressionStatement": checkForSemicolon, "ReturnStatement": checkForSemicolon, "ThrowStatement": checkForSemicolon, + "DoWhileStatement": checkForSemicolon, "DebuggerStatement": checkForSemicolon, "BreakStatement": checkForSemicolon, "ContinueStatement": checkForSemicolon, "ImportDeclaration": checkForSemicolon, "ExportAllDeclaration": checkForSemicolon, - "ExportNamedDeclaration": function (node) { + "ExportNamedDeclaration": function(node) { if (!node.declaration) { checkForSemicolon(node); } }, - "ExportDefaultDeclaration": function (node) { + "ExportDefaultDeclaration": function(node) { if (!/(?:Class|Function)Declaration/.test(node.declaration.type)) { checkForSemicolon(node); } diff --git a/tools/eslint/lib/rules/sort-vars.js b/tools/eslint/lib/rules/sort-vars.js index 0a699f2ccda3a4..9aa85c8cbd09e2 100644 --- a/tools/eslint/lib/rules/sort-vars.js +++ b/tools/eslint/lib/rules/sort-vars.js @@ -17,6 +17,10 @@ module.exports = function(context) { return { "VariableDeclaration": function(node) { node.declarations.reduce(function(memo, decl) { + if (decl.id.type === "ObjectPattern" || decl.id.type === "ArrayPattern") { + return memo; + } + var lastVariableName = memo.id.name, currenVariableName = decl.id.name; diff --git a/tools/eslint/lib/rules/space-after-function-name.js b/tools/eslint/lib/rules/space-after-function-name.js deleted file mode 100644 index 15d2286a2ad552..00000000000000 --- a/tools/eslint/lib/rules/space-after-function-name.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @fileoverview Rule to enforce consistent spacing after function names - * @author Roberto Vidal - * @copyright 2014 Roberto Vidal. All rights reserved. - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - var requiresSpace = context.options[0] === "always"; - - /** - * Reports if the give named function node has the correct spacing after its name - * - * @param {ASTNode} node The node to which the potential problem belongs. - * @returns {void} - */ - function check(node) { - var tokens = context.getFirstTokens(node, 3), - hasSpace = tokens[1].range[1] < tokens[2].range[0]; - - if (hasSpace !== requiresSpace) { - context.report(node, "Function name \"{{name}}\" must {{not}}be followed by whitespace.", { - name: node.id.name, - not: requiresSpace ? "" : "not " - }); - } - } - - return { - "FunctionDeclaration": check, - "FunctionExpression": function (node) { - if (node.id) { - check(node); - } - } - }; - -}; - -module.exports.schema = [ - { - "enum": ["always", "never"] - } -]; diff --git a/tools/eslint/lib/rules/space-after-keywords.js b/tools/eslint/lib/rules/space-after-keywords.js index 007f80ca7158a8..eeed6d2a60a675 100644 --- a/tools/eslint/lib/rules/space-after-keywords.js +++ b/tools/eslint/lib/rules/space-after-keywords.js @@ -23,13 +23,45 @@ module.exports = function(context) { * @returns {void} */ function checkTokens(node, left, right) { + if (right.type !== "Punctuator") { + return; + } + var hasSpace = left.range[1] < right.range[0], value = left.value; if (hasSpace !== requiresSpace) { - context.report(node, "Keyword \"{{value}}\" must {{not}}be followed by whitespace.", { - value: value, - not: requiresSpace ? "" : "not " + context.report({ + node: node, + loc: left.loc.end, + message: "Keyword \"{{value}}\" must {{not}}be followed by whitespace.", + data: { + value: value, + not: requiresSpace ? "" : "not " + }, + fix: function(fixer) { + if (requiresSpace) { + return fixer.insertTextAfter(left, " "); + } else { + return fixer.removeRange([left.range[1], right.range[0]]); + } + } + }); + } else if (left.loc.end.line !== right.loc.start.line) { + context.report({ + node: node, + loc: left.loc.end, + message: "Keyword \"{{value}}\" must not be followed by a newline.", + data: { + value: value + }, + fix: function(fixer) { + var text = ""; + if (requiresSpace) { + text = " "; + } + return fixer.replaceTextRange([left.range[1], right.range[0]], text); + } }); } } @@ -45,7 +77,7 @@ module.exports = function(context) { } return { - "IfStatement": function (node) { + "IfStatement": function(node) { check(node); // check the `else` if (node.alternate && node.alternate.type !== "IfStatement") { @@ -56,21 +88,21 @@ module.exports = function(context) { "ForOfStatement": check, "ForInStatement": check, "WhileStatement": check, - "DoWhileStatement": function (node) { + "DoWhileStatement": function(node) { check(node); // check the `while` var whileTokens = context.getTokensAfter(node.body, 2); checkTokens(node, whileTokens[0], whileTokens[1]); }, "SwitchStatement": check, - "TryStatement": function (node) { + "TryStatement": function(node) { check(node); // check the `finally` if (node.finalizer) { checkTokens(node.finalizer, context.getTokenBefore(node.finalizer), context.getFirstToken(node.finalizer)); } }, - "CatchStatement": check, + "CatchClause": check, "WithStatement": check }; }; diff --git a/tools/eslint/lib/rules/space-before-blocks.js b/tools/eslint/lib/rules/space-before-blocks.js index 799770537dd122..24c1d9b31b6ce4 100644 --- a/tools/eslint/lib/rules/space-before-blocks.js +++ b/tools/eslint/lib/rules/space-before-blocks.js @@ -6,31 +6,34 @@ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { - var requireSpace = context.options[0] !== "never"; +module.exports = function(context) { + var config = context.options[0], + sourceCode = context.getSourceCode(), + checkFunctions = true, + checkKeywords = true; - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; + if (typeof config === "object") { + checkFunctions = config.functions !== "never"; + checkKeywords = config.keywords !== "never"; + } else if (config === "never") { + checkFunctions = false; + checkKeywords = false; } /** - * Determines whether two adjacent tokens are on the same line. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not the tokens are on the same line. + * Checks whether or not a given token is an arrow operator (=>). + * + * @param {Token} token - A token to check. + * @returns {boolean} `true` if the token is an arrow operator. */ - function isSameLine(left, right) { - return left.loc.start.line === right.loc.start.line; + function isArrow(token) { + return token.type === "Punctuator" && token.value === "=>"; } /** @@ -40,18 +43,38 @@ module.exports = function (context) { */ function checkPrecedingSpace(node) { var precedingToken = context.getTokenBefore(node), - hasSpace; + hasSpace, + parent, + requireSpace; - if (precedingToken && isSameLine(precedingToken, node)) { - hasSpace = isSpaced(precedingToken, node); + if (precedingToken && !isArrow(precedingToken) && astUtils.isTokenOnSameLine(precedingToken, node)) { + hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node); + parent = context.getAncestors().pop(); + if (parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration") { + requireSpace = checkFunctions; + } else { + requireSpace = checkKeywords; + } if (requireSpace) { if (!hasSpace) { - context.report(node, "Missing space before opening brace."); + context.report({ + node: node, + message: "Missing space before opening brace.", + fix: function(fixer) { + return fixer.insertTextBefore(node, " "); + } + }); } } else { if (hasSpace) { - context.report(node, "Unexpected space before opening brace."); + context.report({ + node: node, + message: "Unexpected space before opening brace.", + fix: function(fixer) { + return fixer.removeRange([precedingToken.range[1], node.range[0]]); + } + }); } } } @@ -79,6 +102,7 @@ module.exports = function (context) { return { "BlockStatement": checkPrecedingSpace, + "ClassBody": checkPrecedingSpace, "SwitchStatement": checkSpaceBeforeCaseBlock }; @@ -86,6 +110,22 @@ module.exports = function (context) { module.exports.schema = [ { - "enum": ["always", "never"] + "oneOf": [ + { + "enum": ["always", "never"] + }, + { + "type": "object", + "properties": { + "keywords": { + "enum": ["always", "never"] + }, + "functions": { + "enum": ["always", "never"] + } + }, + "additionalProperties": false + } + ] } ]; diff --git a/tools/eslint/lib/rules/space-before-function-paren.js b/tools/eslint/lib/rules/space-before-function-paren.js index fde281c88cb37b..b96acb6678c42e 100644 --- a/tools/eslint/lib/rules/space-before-function-paren.js +++ b/tools/eslint/lib/rules/space-before-function-paren.js @@ -2,6 +2,7 @@ * @fileoverview Rule to validate spacing before function paren. * @author Mathias Schreck * @copyright 2015 Mathias Schreck + * See LICENSE in root directory for full license. */ "use strict"; @@ -12,6 +13,7 @@ module.exports = function(context) { var configuration = context.options[0], + sourceCode = context.getSourceCode(), requireAnonymousFunctionSpacing = true, requireNamedFunctionSpacing = true; @@ -23,16 +25,6 @@ module.exports = function(context) { requireNamedFunctionSpacing = false; } - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - /** * Determines whether a function has a name. * @param {ASTNode} node The function node. @@ -45,7 +37,7 @@ module.exports = function(context) { return true; } - parent = context.getAncestors().pop(); + parent = node.parent; return parent.type === "MethodDefinition" || (parent.type === "Property" && ( @@ -63,7 +55,6 @@ module.exports = function(context) { */ function validateSpacingBeforeParentheses(node) { var isNamed = isNamedFunction(node), - tokens, leftToken, rightToken, location; @@ -72,40 +63,34 @@ module.exports = function(context) { return; } - tokens = context.getTokens(node); - - if (node.generator) { - if (node.id) { - leftToken = tokens[2]; - rightToken = tokens[3]; - } else { - // Object methods are named but don't have an id - leftToken = context.getTokenBefore(node); - rightToken = tokens[0]; - } - } else if (isNamed) { - if (node.id) { - leftToken = tokens[1]; - rightToken = tokens[2]; - } else { - // Object methods are named but don't have an id - leftToken = context.getTokenBefore(node); - rightToken = tokens[0]; - } - } else { - leftToken = tokens[0]; - rightToken = tokens[1]; + rightToken = sourceCode.getFirstToken(node); + while (rightToken.value !== "(") { + rightToken = sourceCode.getTokenAfter(rightToken); } - + leftToken = context.getTokenBefore(rightToken); location = leftToken.loc.end; - if (isSpaced(leftToken, rightToken)) { + if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) { if ((isNamed && !requireNamedFunctionSpacing) || (!isNamed && !requireAnonymousFunctionSpacing)) { - context.report(node, location, "Unexpected space before function parentheses."); + context.report({ + node: node, + loc: location, + message: "Unexpected space before function parentheses.", + fix: function(fixer) { + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); } } else { if ((isNamed && requireNamedFunctionSpacing) || (!isNamed && requireAnonymousFunctionSpacing)) { - context.report(node, location, "Missing space before function parentheses."); + context.report({ + node: node, + loc: location, + message: "Missing space before function parentheses.", + fix: function(fixer) { + return fixer.insertTextAfter(leftToken, " "); + } + }); } } } diff --git a/tools/eslint/lib/rules/space-before-function-parentheses.js b/tools/eslint/lib/rules/space-before-function-parentheses.js deleted file mode 100644 index 9d275c62887756..00000000000000 --- a/tools/eslint/lib/rules/space-before-function-parentheses.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @fileoverview Rule to validate spacing before function parentheses. - * @author Mathias Schreck - * @copyright 2015 Mathias Schreck - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - var configuration = context.options[0], - requireAnonymousFunctionSpacing = true, - requireNamedFunctionSpacing = true; - - if (typeof configuration === "object") { - requireAnonymousFunctionSpacing = configuration.anonymous !== "never"; - requireNamedFunctionSpacing = configuration.named !== "never"; - } else if (configuration === "never") { - requireAnonymousFunctionSpacing = false; - requireNamedFunctionSpacing = false; - } - - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Determines whether a function has a name. - * @param {ASTNode} node The function node. - * @returns {boolean} Whether the function has a name. - */ - function isNamedFunction(node) { - var parent; - - if (node.id) { - return true; - } - - parent = context.getAncestors().pop(); - return parent.type === "MethodDefinition" || - (parent.type === "Property" && - ( - parent.kind === "get" || - parent.kind === "set" || - parent.method - ) - ); - } - - /** - * Validates the spacing before function parentheses. - * @param {ASTNode} node The node to be validated. - * @returns {void} - */ - function validateSpacingBeforeParentheses(node) { - var isNamed = isNamedFunction(node), - tokens, - leftToken, - rightToken, - location; - - if (node.generator && !isNamed) { - return; - } - - tokens = context.getTokens(node); - - if (node.generator) { - if (node.id) { - leftToken = tokens[2]; - rightToken = tokens[3]; - } else { - // Object methods are named but don't have an id - leftToken = context.getTokenBefore(node); - rightToken = tokens[0]; - } - } else if (isNamed) { - if (node.id) { - leftToken = tokens[1]; - rightToken = tokens[2]; - } else { - // Object methods are named but don't have an id - leftToken = context.getTokenBefore(node); - rightToken = tokens[0]; - } - } else { - leftToken = tokens[0]; - rightToken = tokens[1]; - } - - location = leftToken.loc.end; - - if (isSpaced(leftToken, rightToken)) { - if ((isNamed && !requireNamedFunctionSpacing) || (!isNamed && !requireAnonymousFunctionSpacing)) { - context.report(node, location, "Unexpected space before function parentheses."); - } - } else { - if ((isNamed && requireNamedFunctionSpacing) || (!isNamed && requireAnonymousFunctionSpacing)) { - context.report(node, location, "Missing space before function parentheses."); - } - } - } - - return { - "FunctionDeclaration": validateSpacingBeforeParentheses, - "FunctionExpression": validateSpacingBeforeParentheses - }; -}; - -module.exports.schema = [ - { - "oneOf": [ - { - "enum": ["always", "never"] - }, - { - "type": "object", - "properties": { - "anonymous": { - "enum": ["always", "never"] - }, - "named": { - "enum": ["always", "never"] - } - }, - "additionalProperties": false - } - ] - } -]; diff --git a/tools/eslint/lib/rules/space-before-keywords.js b/tools/eslint/lib/rules/space-before-keywords.js new file mode 100644 index 00000000000000..cba8cffa5fd15e --- /dev/null +++ b/tools/eslint/lib/rules/space-before-keywords.js @@ -0,0 +1,214 @@ +/** + * @fileoverview Require or disallow spaces before keywords + * @author Marko Raatikka + * @copyright 2015 Marko Raatikka. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +var ERROR_MSG_SPACE_EXPECTED = "Missing space before keyword \"{{keyword}}\"."; +var ERROR_MSG_NO_SPACE_EXPECTED = "Unexpected space before keyword \"{{keyword}}\"."; + +module.exports = function(context) { + + var sourceCode = context.getSourceCode(); + + var SPACE_REQUIRED = context.options[0] !== "never"; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Report the error message + * @param {ASTNode} node node to report + * @param {string} message Error message to be displayed + * @param {object} data Data object for the rule message + * @returns {void} + */ + function report(node, message, data) { + context.report({ + node: node, + message: message, + data: data, + fix: function(fixer) { + if (SPACE_REQUIRED) { + return fixer.insertTextBefore(node, " "); + } else { + var tokenBefore = context.getTokenBefore(node); + return fixer.removeRange([tokenBefore.range[1], node.range[0]]); + } + } + }); + } + + /** + * Check if a token meets the criteria + * + * @param {ASTNode} node The node to check + * @param {Object} left The left-hand side token of the node + * @param {Object} right The right-hand side token of the node + * @param {Object} options See check() + * @returns {void} + */ + function checkTokens(node, left, right, options) { + + if (!left) { + return; + } + + if (left.type === "Keyword") { + return; + } + + if (!SPACE_REQUIRED && typeof options.requireSpace === "undefined") { + return; + } + + options = options || {}; + options.allowedPrecedingChars = options.allowedPrecedingChars || [ "{" ]; + options.requireSpace = typeof options.requireSpace === "undefined" ? SPACE_REQUIRED : options.requireSpace; + + var hasSpace = sourceCode.isSpaceBetweenTokens(left, right); + var spaceOk = hasSpace === options.requireSpace; + + if (spaceOk) { + return; + } + + if (!astUtils.isTokenOnSameLine(left, right)) { + if (!options.requireSpace) { + report(node, ERROR_MSG_NO_SPACE_EXPECTED, { keyword: right.value }); + } + return; + } + + if (!options.requireSpace) { + report(node, ERROR_MSG_NO_SPACE_EXPECTED, { keyword: right.value }); + return; + } + + if (options.allowedPrecedingChars.indexOf(left.value) !== -1) { + return; + } + + report(node, ERROR_MSG_SPACE_EXPECTED, { keyword: right.value }); + + } + + /** + * Get right and left tokens of a node and check to see if they meet the given criteria + * + * @param {ASTNode} node The node to check + * @param {Object} options Options to validate the node against + * @param {Array} options.allowedPrecedingChars Characters that can precede the right token + * @param {Boolean} options.requireSpace Whether or not the right token needs to be + * preceded by a space + * @returns {void} + */ + function check(node, options) { + + options = options || {}; + + var left = context.getTokenBefore(node); + var right = context.getFirstToken(node); + + checkTokens(node, left, right, options); + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + "IfStatement": function(node) { + // if + check(node); + // else + if (node.alternate) { + var tokens = context.getTokensBefore(node.alternate, 2); + if (tokens[0].value === "}") { + check(tokens[1], { requireSpace: SPACE_REQUIRED }); + } + } + }, + "ForStatement": check, + "ForInStatement": check, + "WhileStatement": check, + "DoWhileStatement": function(node) { + var whileNode = context.getTokenAfter(node.body); + // do + check(node); + // while + check(whileNode, { requireSpace: SPACE_REQUIRED }); + }, + "SwitchStatement": function(node) { + // switch + check(node); + // case/default + node.cases.forEach(function(caseNode) { + check(caseNode); + }); + }, + "ThrowStatement": check, + "TryStatement": function(node) { + // try + check(node); + // finally + if (node.finalizer) { + check(context.getTokenBefore(node.finalizer), { requireSpace: SPACE_REQUIRED }); + } + }, + "CatchClause": function(node) { + check(node, { requireSpace: SPACE_REQUIRED }); + }, + "WithStatement": check, + "VariableDeclaration": function(node) { + check(node, { allowedPrecedingChars: [ "(", "{" ] }); + }, + "ReturnStatement": check, + "BreakStatement": check, + "LabeledStatement": check, + "ContinueStatement": check, + "FunctionDeclaration": check, + "FunctionExpression": function(node) { + var left = context.getTokenBefore(node); + var right = context.getFirstToken(node); + + // If it's a method, a getter, or a setter, the first token is not the `function` keyword. + if (right.type !== "Keyword") { + return; + } + + checkTokens(node, left, right, { allowedPrecedingChars: [ "(", "{", "[" ] }); + }, + "YieldExpression": function(node) { + check(node, { allowedPrecedingChars: [ "(", "{" ] }); + }, + "ForOfStatement": check, + "ClassBody": function(node) { + + // Find the 'class' token + while (node.value !== "class") { + node = context.getTokenBefore(node); + } + + check(node); + } + }; + +}; + +module.exports.schema = [ + { + "enum": ["always", "never"] + } +]; diff --git a/tools/eslint/lib/rules/space-in-brackets.js b/tools/eslint/lib/rules/space-in-brackets.js deleted file mode 100644 index aac889c95d262c..00000000000000 --- a/tools/eslint/lib/rules/space-in-brackets.js +++ /dev/null @@ -1,305 +0,0 @@ -/** - * @fileoverview Disallows or enforces spaces inside of brackets. - * @author Ian Christian Myers - * @copyright 2014 Brandyn Bennett. All rights reserved. - * @copyright 2014 Michael Ficarra. No rights reserved. - * @copyright 2014 Vignesh Anand. All rights reserved. - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - var spaced = context.options[0] === "always"; - - /** - * Determines whether an option is set, relative to the spacing option. - * If spaced is "always", then check whether option is set to false. - * If spaced is "never", then check whether option is set to true. - * @param {Object} option - The option to exclude. - * @returns {boolean} Whether or not the property is excluded. - */ - function isOptionSet(option) { - return context.options[1] != null ? context.options[1][option] === !spaced : false; - } - - var options = { - spaced: spaced, - singleElementException: isOptionSet("singleValue"), - objectsInArraysException: isOptionSet("objectsInArrays"), - arraysInArraysException: isOptionSet("arraysInArrays"), - arraysInObjectsException: isOptionSet("arraysInObjects"), - objectsInObjectsException: isOptionSet("objectsInObjects"), - propertyNameException: isOptionSet("propertyName") - }; - - //-------------------------------------------------------------------------- - // Helpers - //-------------------------------------------------------------------------- - - /** - * Determines whether two adjacent tokens are have whitespace between them. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not there is space between the tokens. - */ - function isSpaced(left, right) { - return left.range[1] < right.range[0]; - } - - /** - * Determines whether two adjacent tokens are on the same line. - * @param {Object} left - The left token object. - * @param {Object} right - The right token object. - * @returns {boolean} Whether or not the tokens are on the same line. - */ - function isSameLine(left, right) { - return left.loc.start.line === right.loc.start.line; - } - - /** - * Reports that there shouldn't be a space after the first token - * @param {ASTNode} node - The node to report in the event of an error. - * @param {Token} token - The token to use for the report. - * @returns {void} - */ - function reportNoBeginningSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space after '" + token.value + "'"); - } - - /** - * Reports that there shouldn't be a space before the last token - * @param {ASTNode} node - The node to report in the event of an error. - * @param {Token} token - The token to use for the report. - * @returns {void} - */ - function reportNoEndingSpace(node, token) { - context.report(node, token.loc.start, - "There should be no space before '" + token.value + "'"); - } - - /** - * Reports that there should be a space after the first token - * @param {ASTNode} node - The node to report in the event of an error. - * @param {Token} token - The token to use for the report. - * @returns {void} - */ - function reportRequiredBeginningSpace(node, token) { - context.report(node, token.loc.start, - "A space is required after '" + token.value + "'"); - } - - /** - * Reports that there should be a space before the last token - * @param {ASTNode} node - The node to report in the event of an error. - * @param {Token} token - The token to use for the report. - * @returns {void} - */ - function reportRequiredEndingSpace(node, token) { - context.report(node, token.loc.start, - "A space is required before '" + token.value + "'"); - } - - - /** - * Determines if spacing in curly braces is valid. - * @param {ASTNode} node The AST node to check. - * @param {Token} first The first token to check (should be the opening brace) - * @param {Token} second The second token to check (should be first after the opening brace) - * @param {Token} penultimate The penultimate token to check (should be last before closing brace) - * @param {Token} last The last token to check (should be closing brace) - * @returns {void} - */ - function validateBraceSpacing(node, first, second, penultimate, last) { - var closingCurlyBraceMustBeSpaced = - options.arraysInObjectsException && penultimate.value === "]" || - options.objectsInObjectsException && penultimate.value === "}" - ? !options.spaced : options.spaced; - - if (isSameLine(first, second)) { - if (options.spaced && !isSpaced(first, second)) { - reportRequiredBeginningSpace(node, first); - } - if (!options.spaced && isSpaced(first, second)) { - reportNoBeginningSpace(node, first); - } - } - - if (isSameLine(penultimate, last)) { - if (closingCurlyBraceMustBeSpaced && !isSpaced(penultimate, last)) { - reportRequiredEndingSpace(node, last); - } - if (!closingCurlyBraceMustBeSpaced && isSpaced(penultimate, last)) { - reportNoEndingSpace(node, last); - } - } - } - - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- - - return { - - MemberExpression: function(node) { - if (!node.computed) { - return; - } - - var property = node.property, - before = context.getTokenBefore(property), - first = context.getFirstToken(property), - last = context.getLastToken(property), - after = context.getTokenAfter(property); - - var propertyNameMustBeSpaced = options.propertyNameException ? - !options.spaced : options.spaced; - - if (isSameLine(before, first)) { - if (propertyNameMustBeSpaced) { - if (!isSpaced(before, first) && isSameLine(before, first)) { - reportRequiredBeginningSpace(node, before); - } - } else { - if (isSpaced(before, first)) { - reportNoBeginningSpace(node, before); - } - } - } - - if (isSameLine(last, after)) { - if (propertyNameMustBeSpaced) { - if (!isSpaced(last, after) && isSameLine(last, after)) { - reportRequiredEndingSpace(node, after); - } - } else { - if (isSpaced(last, after)) { - reportNoEndingSpace(node, after); - } - } - } - }, - - ArrayExpression: function(node) { - if (node.elements.length === 0) { - return; - } - - var first = context.getFirstToken(node), - second = context.getFirstToken(node, 1), - penultimate = context.getLastToken(node, 1), - last = context.getLastToken(node); - - var openingBracketMustBeSpaced = - options.objectsInArraysException && second.value === "{" || - options.arraysInArraysException && second.value === "[" || - options.singleElementException && node.elements.length === 1 - ? !options.spaced : options.spaced; - - var closingBracketMustBeSpaced = - options.objectsInArraysException && penultimate.value === "}" || - options.arraysInArraysException && penultimate.value === "]" || - options.singleElementException && node.elements.length === 1 - ? !options.spaced : options.spaced; - - if (isSameLine(first, second)) { - if (openingBracketMustBeSpaced && !isSpaced(first, second)) { - reportRequiredBeginningSpace(node, first); - } - if (!openingBracketMustBeSpaced && isSpaced(first, second)) { - reportNoBeginningSpace(node, first); - } - } - - if (isSameLine(penultimate, last)) { - if (closingBracketMustBeSpaced && !isSpaced(penultimate, last)) { - reportRequiredEndingSpace(node, last); - } - if (!closingBracketMustBeSpaced && isSpaced(penultimate, last)) { - reportNoEndingSpace(node, last); - } - } - }, - - ImportDeclaration: function(node) { - - var firstSpecifier = node.specifiers[0], - lastSpecifier = node.specifiers[node.specifiers.length - 1]; - - // don't do anything for namespace or default imports - if (firstSpecifier && lastSpecifier && firstSpecifier.type === "ImportSpecifier" && lastSpecifier.type === "ImportSpecifier") { - var first = context.getTokenBefore(firstSpecifier), - second = context.getFirstToken(firstSpecifier), - penultimate = context.getLastToken(lastSpecifier), - last = context.getTokenAfter(lastSpecifier); - - validateBraceSpacing(node, first, second, penultimate, last); - } - - }, - - ExportNamedDeclaration: function(node) { - if (!node.specifiers.length) { - return; - } - - var firstSpecifier = node.specifiers[0], - lastSpecifier = node.specifiers[node.specifiers.length - 1], - first = context.getTokenBefore(firstSpecifier), - second = context.getFirstToken(firstSpecifier), - penultimate = context.getLastToken(lastSpecifier), - last = context.getTokenAfter(lastSpecifier); - - validateBraceSpacing(node, first, second, penultimate, last); - - }, - - ObjectExpression: function(node) { - if (node.properties.length === 0) { - return; - } - - var first = context.getFirstToken(node), - second = context.getFirstToken(node, 1), - penultimate = context.getLastToken(node, 1), - last = context.getLastToken(node); - - validateBraceSpacing(node, first, second, penultimate, last); - } - - }; - -}; - -module.exports.schema = [ - { - "enum": ["always", "never"] - }, - { - "type": "object", - "properties": { - "singleValue": { - "type": "boolean" - }, - "objectsInArrays": { - "type": "boolean" - }, - "arraysInArrays": { - "type": "boolean" - }, - "arraysInObjects": { - "type": "boolean" - }, - "objectsInObjects": { - "type": "boolean" - }, - "propertyName": { - "type": "boolean" - } - }, - "additionalProperties": false - } -]; diff --git a/tools/eslint/lib/rules/space-in-parens.js b/tools/eslint/lib/rules/space-in-parens.js index 407d763b322953..789acdbdea1d0c 100644 --- a/tools/eslint/lib/rules/space-in-parens.js +++ b/tools/eslint/lib/rules/space-in-parens.js @@ -6,6 +6,8 @@ */ "use strict"; +var astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -14,249 +16,205 @@ module.exports = function(context) { var MISSING_SPACE_MESSAGE = "There must be a space inside this paren.", REJECTED_SPACE_MESSAGE = "There should be no spaces inside this paren.", - exceptionsArray = (context.options.length === 2) ? context.options[1].exceptions : [], + ALWAYS = context.options[0] === "always", + + exceptionsArrayOptions = (context.options.length === 2) ? context.options[1].exceptions : [], options = {}, - rejectedSpaceRegExp, - missingSpaceRegExp, - spaceChecks; - - if (exceptionsArray && exceptionsArray.length) { - options.braceException = exceptionsArray.indexOf("{}") !== -1 || false; - options.bracketException = exceptionsArray.indexOf("[]") !== -1 || false; - options.parenException = exceptionsArray.indexOf("()") !== -1 || false; - options.empty = exceptionsArray.indexOf("empty") !== -1 || false; + exceptions; + + if (exceptionsArrayOptions.length) { + options.braceException = exceptionsArrayOptions.indexOf("{}") !== -1; + options.bracketException = exceptionsArrayOptions.indexOf("[]") !== -1; + options.parenException = exceptionsArrayOptions.indexOf("()") !== -1; + options.empty = exceptionsArrayOptions.indexOf("empty") !== -1; } /** - * Used with the `never` option to produce, given the exception options, - * two regular expressions to check for missing and rejected spaces. + * Produces an object with the opener and closer exception values * @param {Object} opts The exception options - * @returns {Object} `missingSpace` and `rejectedSpace` regular expressions + * @returns {Object} `openers` and `closers` exception values * @private */ - function getNeverChecks(opts) { - var missingSpaceOpeners = [], - missingSpaceClosers = [], - rejectedSpaceOpeners = ["\\s"], - rejectedSpaceClosers = ["\\s"], - missingSpaceCheck, - rejectedSpaceCheck; - - // Populate openers and closers - if (opts.braceException) { - missingSpaceOpeners.push("\\{"); - missingSpaceClosers.push("\\}"); - rejectedSpaceOpeners.push("\\{"); - rejectedSpaceClosers.push("\\}"); - } - if (opts.bracketException) { - missingSpaceOpeners.push("\\["); - missingSpaceClosers.push("\\]"); - rejectedSpaceOpeners.push("\\["); - rejectedSpaceClosers.push("\\]"); - } - if (opts.parenException) { - missingSpaceOpeners.push("\\("); - missingSpaceClosers.push("\\)"); - rejectedSpaceOpeners.push("\\("); - rejectedSpaceClosers.push("\\)"); - } - if (opts.empty) { - missingSpaceOpeners.push("\\)"); - missingSpaceClosers.push("\\("); - rejectedSpaceOpeners.push("\\)"); - rejectedSpaceClosers.push("\\("); + function getExceptions() { + var openers = [], + closers = []; + if (options.braceException) { + openers.push("{"); + closers.push("}"); } - if (missingSpaceOpeners.length) { - missingSpaceCheck = "\\((" + missingSpaceOpeners.join("|") + ")"; - if (missingSpaceClosers.length) { - missingSpaceCheck += "|"; - } + if (options.bracketException) { + openers.push("["); + closers.push("]"); } - if (missingSpaceClosers.length) { - missingSpaceCheck += "(" + missingSpaceClosers.join("|") + ")\\)"; - } - - // compose the rejected regexp - rejectedSpaceCheck = "\\( +[^" + rejectedSpaceOpeners.join("") + "]"; - rejectedSpaceCheck += "|[^" + rejectedSpaceClosers.join("") + "] +\\)"; - return { - // e.g. \((\{)|(\})\) --- where {} is an exception - missingSpace: missingSpaceCheck || ".^", - // e.g. \( +[^ \n\r\{]|[^ \n\r\}] +\) --- where {} is an exception - rejectedSpace: rejectedSpaceCheck - }; - } - - /** - * Used with the `always` option to produce, given the exception options, - * two regular expressions to check for missing and rejected spaces. - * @param {Object} opts The exception options - * @returns {Object} `missingSpace` and `rejectedSpace` regular expressions - * @private - */ - function getAlwaysChecks(opts) { - var missingSpaceOpeners = ["\\s", "\\)"], - missingSpaceClosers = ["\\s", "\\("], - rejectedSpaceOpeners = [], - rejectedSpaceClosers = [], - missingSpaceCheck, - rejectedSpaceCheck; - - // Populate openers and closers - if (opts.braceException) { - missingSpaceOpeners.push("\\{"); - missingSpaceClosers.push("\\}"); - rejectedSpaceOpeners.push(" \\{"); - rejectedSpaceClosers.push("\\} "); - } - if (opts.bracketException) { - missingSpaceOpeners.push("\\["); - missingSpaceClosers.push("\\]"); - rejectedSpaceOpeners.push(" \\["); - rejectedSpaceClosers.push("\\] "); + if (options.parenException) { + openers.push("("); + closers.push(")"); } - if (opts.parenException) { - missingSpaceOpeners.push("\\("); - missingSpaceClosers.push("\\)"); - rejectedSpaceOpeners.push(" \\("); - rejectedSpaceClosers.push("\\) "); - } - if (opts.empty) { - rejectedSpaceOpeners.push(" \\)"); - rejectedSpaceClosers.push("\\( "); - } - - // compose the allowed regexp - missingSpaceCheck = "\\([^" + missingSpaceOpeners.join("") + "]"; - missingSpaceCheck += "|[^" + missingSpaceClosers.join("") + "]\\)"; - // compose the rejected regexp - if (rejectedSpaceOpeners.length) { - rejectedSpaceCheck = "\\((" + rejectedSpaceOpeners.join("|") + ")"; - if (rejectedSpaceClosers.length) { - rejectedSpaceCheck += "|"; - } - } - if (rejectedSpaceClosers.length) { - rejectedSpaceCheck += "(" + rejectedSpaceClosers.join("|") + ")\\)"; + if (options.empty) { + openers.push(")"); + closers.push("("); } return { - // e.g. \([^ \)\r\n\{]|[^ \(\r\n\}]\) --- where {} is an exception - missingSpace: missingSpaceCheck, - // e.g. \(( \{})|(\} )\) --- where {} is an excpetion - rejectedSpace: rejectedSpaceCheck || ".^" + openers: openers, + closers: closers }; } - spaceChecks = (context.options[0] === "always") ? getAlwaysChecks(options) : getNeverChecks(options); - missingSpaceRegExp = new RegExp(spaceChecks.missingSpace, "mg"); - rejectedSpaceRegExp = new RegExp(spaceChecks.rejectedSpace, "mg"); - - //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- - - var skipRanges = []; + var sourceCode = context.getSourceCode(); /** - * Adds the range of a node to the set to be skipped when checking parens - * @param {ASTNode} node The node to skip - * @returns {void} - * @private + * Determines if a token is one of the exceptions for the opener paren + * @param {Object} token The token to check + * @returns {boolean} True if the token is one of the exceptions for the opener paren */ - function addSkipRange(node) { - skipRanges.push(node.range); + function isOpenerException(token) { + return token.type === "Punctuator" && exceptions.openers.indexOf(token.value) >= 0; } /** - * Sorts the skipRanges array. Must be called before shouldSkip - * @returns {void} - * @private + * Determines if a token is one of the exceptions for the closer paren + * @param {Object} token The token to check + * @returns {boolean} True if the token is one of the exceptions for the closer paren */ - function sortSkipRanges() { - skipRanges.sort(function (a, b) { - return a[0] - b[0]; - }); + function isCloserException(token) { + return token.type === "Punctuator" && exceptions.closers.indexOf(token.value) >= 0; } /** - * Checks if a certain position in the source should be skipped - * @param {Number} pos The 0-based index in the source - * @returns {boolean} whether the position should be skipped - * @private + * Determines if an opener paren should have a missing space after it + * @param {Object} left The paren token + * @param {Object} right The token after it + * @returns {boolean} True if the paren should have a space */ - function shouldSkip(pos) { - var i, len, range; - for (i = 0, len = skipRanges.length; i < len; i += 1) { - range = skipRanges[i]; - if (pos < range[0]) { - break; - } else if (pos < range[1]) { - return true; + function shouldOpenerHaveSpace(left, right) { + if (sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } + + if (ALWAYS) { + if (right.type === "Punctuator" && right.value === ")") { + return false; } + return !isOpenerException(right); + } else { + return isOpenerException(right); } - return false; } + /** + * Determines if an closer paren should have a missing space after it + * @param {Object} left The token before the paren + * @param {Object} right The paren token + * @returns {boolean} True if the paren should have a space + */ + function shouldCloserHaveSpace(left, right) { + if (left.type === "Punctuator" && left.value === "(") { + return false; + } - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- - - return { + if (sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } - "Program:exit": function checkParenSpaces(node) { + if (ALWAYS) { + return !isCloserException(left); + } else { + return isCloserException(left); + } + } - var nextMatch, - nextLine, - column, - line = 1, - source = context.getSource(), - pos = 0; + /** + * Determines if an opener paren should not have an existing space after it + * @param {Object} left The paren token + * @param {Object} right The token after it + * @returns {boolean} True if the paren should reject the space + */ + function shouldOpenerRejectSpace(left, right) { + if (right.type === "Line") { + return false; + } - function checkMatch(match, message) { - if (source.charAt(match.index) !== "(") { - // Matched a closing paren pattern - match.index += 1; - } + if (!astUtils.isTokenOnSameLine(left, right)) { + return false; + } - if (!shouldSkip(match.index)) { - while ((nextLine = source.indexOf("\n", pos)) !== -1 && nextLine < match.index) { - pos = nextLine + 1; - line += 1; - } - column = match.index - pos; + if (!sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } - context.report(node, { line: line, column: column }, message); - } - } + if (ALWAYS) { + return isOpenerException(right); + } else { + return !isOpenerException(right); + } + } - sortSkipRanges(); + /** + * Determines if an closer paren should not have an existing space after it + * @param {Object} left The token before the paren + * @param {Object} right The paren token + * @returns {boolean} True if the paren should reject the space + */ + function shouldCloserRejectSpace(left, right) { + if (left.type === "Punctuator" && left.value === "(") { + return false; + } - while ((nextMatch = rejectedSpaceRegExp.exec(source)) !== null) { - checkMatch(nextMatch, REJECTED_SPACE_MESSAGE); - } + if (!astUtils.isTokenOnSameLine(left, right)) { + return false; + } - while ((nextMatch = missingSpaceRegExp.exec(source)) !== null) { - checkMatch(nextMatch, MISSING_SPACE_MESSAGE); - } + if (!sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } - }, + if (ALWAYS) { + return isCloserException(left); + } else { + return !isCloserException(left); + } + } + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- - // These nodes can contain parentheses that this rule doesn't care about + return { + "Program": function checkParenSpaces(node) { + var tokens, prevToken, nextToken; + exceptions = getExceptions(); + tokens = sourceCode.tokensAndComments; - LineComment: addSkipRange, + tokens.forEach(function(token, i) { + prevToken = tokens[i - 1]; + nextToken = tokens[i + 1]; - BlockComment: addSkipRange, + if (token.type !== "Punctuator") { + return; + } - Literal: addSkipRange + if (token.value !== "(" && token.value !== ")") { + return; + } + if (token.value === "(" && shouldOpenerHaveSpace(token, nextToken)) { + context.report(node, token.loc.end, MISSING_SPACE_MESSAGE); + } else if (token.value === "(" && shouldOpenerRejectSpace(token, nextToken)) { + context.report(node, token.loc.end, REJECTED_SPACE_MESSAGE); + } else if (token.value === ")" && shouldCloserHaveSpace(prevToken, token)) { + context.report(node, token.loc.end, MISSING_SPACE_MESSAGE); + } else if (token.value === ")" && shouldCloserRejectSpace(prevToken, token)) { + context.report(node, token.loc.end, REJECTED_SPACE_MESSAGE); + } + }); + } }; }; diff --git a/tools/eslint/lib/rules/space-infix-ops.js b/tools/eslint/lib/rules/space-infix-ops.js index 4c094c7280c114..8d696e65b9f6e5 100644 --- a/tools/eslint/lib/rules/space-infix-ops.js +++ b/tools/eslint/lib/rules/space-infix-ops.js @@ -48,9 +48,36 @@ module.exports = function(context) { * @private */ function report(mainNode, culpritToken) { - context.report(mainNode, culpritToken.loc.start, "Infix operators must be spaced."); + context.report({ + node: mainNode, + loc: culpritToken.loc.start, + message: "Infix operators must be spaced.", + fix: function(fixer) { + var previousToken = context.getTokenBefore(culpritToken); + var afterToken = context.getTokenAfter(culpritToken); + var fixString = ""; + + if (culpritToken.range[0] - previousToken.range[1] === 0) { + fixString = " "; + } + + fixString += culpritToken.value; + + if (afterToken.range[0] - culpritToken.range[1] === 0) { + fixString += " "; + } + + return fixer.replaceText(culpritToken, fixString); + } + }); } + /** + * Check if the node is binary then report + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkBinary(node) { var nonSpacedNode = getFirstNonSpacedToken(node.left, node.right); @@ -61,6 +88,12 @@ module.exports = function(context) { } } + /** + * Check if the node is conditional + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkConditional(node) { var nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent); var nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate); @@ -72,6 +105,12 @@ module.exports = function(context) { } } + /** + * Check if the node is a variable + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function checkVar(node) { var nonSpacedNode; @@ -85,6 +124,7 @@ module.exports = function(context) { return { "AssignmentExpression": checkBinary, + "AssignmentPattern": checkBinary, "BinaryExpression": checkBinary, "LogicalExpression": checkBinary, "ConditionalExpression": checkConditional, diff --git a/tools/eslint/lib/rules/space-return-throw-case.js b/tools/eslint/lib/rules/space-return-throw-case.js index 8b1bb984cf46a7..2c2816088bdf13 100644 --- a/tools/eslint/lib/rules/space-return-throw-case.js +++ b/tools/eslint/lib/rules/space-return-throw-case.js @@ -10,12 +10,24 @@ module.exports = function(context) { + /** + * Check if the node for spaces + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ function check(node) { var tokens = context.getFirstTokens(node, 2), value = tokens[0].value; if (tokens[0].range[1] >= tokens[1].range[0]) { - context.report(node, "Keyword \"" + value + "\" must be followed by whitespace."); + context.report({ + node: node, + message: "Keyword \"" + value + "\" must be followed by whitespace.", + fix: function(fixer) { + return fixer.insertTextAfterRange(tokens[0].range, " "); + } + }); } } diff --git a/tools/eslint/lib/rules/space-unary-ops.js b/tools/eslint/lib/rules/space-unary-ops.js index 48d146b779b134..5dfae954e96bd3 100644 --- a/tools/eslint/lib/rules/space-unary-ops.js +++ b/tools/eslint/lib/rules/space-unary-ops.js @@ -17,12 +17,13 @@ module.exports = function(context) { //-------------------------------------------------------------------------- /** - * Check if the parent unary operator is "!" in order to know if it's "!!" convert to Boolean or just "!" negation + * Check if the node is the first "!" in a "!!" convert to Boolean expression * @param {ASTnode} node AST node - * @returns {boolean} Whether or not the parent is unary "!" operator + * @returns {boolean} Whether or not the node is first "!" in "!!" */ - function isParentUnaryBangExpression(node) { - return node && node.parent && node.parent.type === "UnaryExpression" && node.parent.operator === "!"; + function isFirstBangInBangBangExpression(node) { + return node && node.type === "UnaryExpression" && node.argument.operator === "!" && + node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; } /** @@ -39,18 +40,33 @@ module.exports = function(context) { * @param {ASTnode} node AST node * @param {object} firstToken first token from the AST node * @param {object} secondToken second token from the AST node + * @param {string} word The word to be used for reporting * @returns {void} */ - function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken) { + function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, word) { + word = word || firstToken.value; + if (options.words) { if (secondToken.range[0] === firstToken.range[1]) { - context.report(node, "Unary word operator \"" + firstToken.value + "\" must be followed by whitespace."); + context.report({ + node: node, + message: "Unary word operator \"" + word + "\" must be followed by whitespace.", + fix: function(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); } } if (!options.words && isArgumentObjectExpression(node)) { if (secondToken.range[0] > firstToken.range[1]) { - context.report(node, "Unexpected space after unary word operator \"" + firstToken.value + "\"."); + context.report({ + node: node, + message: "Unexpected space after unary word operator \"" + word + "\".", + fix: function(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); } } } @@ -72,25 +88,49 @@ module.exports = function(context) { if (options.nonwords) { if (node.prefix) { - if (isParentUnaryBangExpression(node)) { + if (isFirstBangInBangBangExpression(node)) { return void 0; } if (firstToken.range[1] === secondToken.range[0]) { - context.report(node, "Unary operator \"" + firstToken.value + "\" must be followed by whitespace."); + context.report({ + node: node, + message: "Unary operator \"" + firstToken.value + "\" must be followed by whitespace.", + fix: function(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); } } else { if (firstToken.range[1] === secondToken.range[0]) { - context.report(node, "Space is required before unary expressions \"" + secondToken.value + "\"."); + context.report({ + node: node, + message: "Space is required before unary expressions \"" + secondToken.value + "\".", + fix: function(fixer) { + return fixer.insertTextBefore(secondToken, " "); + } + }); } } } else { if (node.prefix) { if (secondToken.range[0] > firstToken.range[1]) { - context.report(node, "Unexpected space after unary operator \"" + firstToken.value + "\"."); + context.report({ + node: node, + message: "Unexpected space after unary operator \"" + firstToken.value + "\".", + fix: function(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); } } else { if (secondToken.range[0] > firstToken.range[1]) { - context.report(node, "Unexpected space before unary operator \"" + secondToken.value + "\"."); + context.report({ + node: node, + message: "Unexpected space before unary operator \"" + secondToken.value + "\".", + fix: function(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); } } } @@ -103,7 +143,22 @@ module.exports = function(context) { return { "UnaryExpression": checkForSpaces, "UpdateExpression": checkForSpaces, - "NewExpression": checkForSpaces + "NewExpression": checkForSpaces, + "YieldExpression": function(node) { + var tokens = context.getFirstTokens(node, 3), + word = "yield"; + + if (!node.argument) { + return; + } + + if (node.delegate) { + word += "*"; + checkUnaryWordOperatorForSpaces(node, tokens[1], tokens[2], word); + } else { + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word); + } + } }; }; diff --git a/tools/eslint/lib/rules/spaced-comment.js b/tools/eslint/lib/rules/spaced-comment.js index a57cd8699d095b..585dc7aec1b017 100644 --- a/tools/eslint/lib/rules/spaced-comment.js +++ b/tools/eslint/lib/rules/spaced-comment.js @@ -1,111 +1,181 @@ /** * @fileoverview Source code for spaced-comments rule * @author Gyandeep Singh + * @copyright 2015 Toru Nagashima. All rights reserved. * @copyright 2015 Gyandeep Singh. All rights reserved. * @copyright 2014 Greg Cochard. All rights reserved. */ "use strict"; +var escapeStringRegexp = require("escape-string-regexp"); + //------------------------------------------------------------------------------ -// Rule Definition +// Helpers //------------------------------------------------------------------------------ -module.exports = function(context) { - - // Unless the first option is never, require a space - var requireSpace = context.options[0] !== "never"; +/** + * Escapes the control characters of a given string. + * @param {string} s - A string to escape. + * @returns {string} An escaped string. + */ +function escape(s) { + var isOneChar = s.length === 1; + s = escapeStringRegexp(s); + return isOneChar ? s : "(?:" + s + ")"; +} - // Default to match anything, so all will fail if there are no exceptions - var exceptionMatcher = new RegExp(" "); - var markerMatcher = new RegExp(" "); - var jsDocMatcher = new RegExp("((^(\\*)))[ \\n]"); +/** + * Escapes the control characters of a given string. + * And adds a repeat flag. + * @param {string} s - A string to escape. + * @returns {string} An escaped string. + */ +function escapeAndRepeat(s) { + return escape(s) + "+"; +} - // Fetch the options dict - var hasOptions = context.options.length === 2; - var optionsDict = hasOptions ? context.options[1] : {}; +/** + * Parses `markers` option. + * If markers don't include `"*"`, this adds `"*"` to allow JSDoc comments. + * @param {string[]} [markers] - A marker list. + * @returns {string[]} A marker list. + */ +function parseMarkersOption(markers) { + markers = markers ? markers.slice(0) : []; - // Grab the exceptions array and build a RegExp matcher for it - var hasExceptions = hasOptions && optionsDict.exceptions && optionsDict.exceptions.length; - var unescapedExceptions = hasExceptions ? optionsDict.exceptions : []; - var exceptions; + // `*` is a marker for JSDoc comments. + if (markers.indexOf("*") === -1) { + markers.push("*"); + } - // Now do the same for markers - var hasMarkers = hasOptions && optionsDict.markers && optionsDict.markers.length; - var unescapedMarkers = hasMarkers ? optionsDict.markers : []; - var markers; + return markers; +} - function escaper(s) { - return s.replace(/([.*+?${}()|\^\[\]\/\\])/g, "\\$1"); +/** + * Creates RegExp object for `always` mode. + * Generated pattern is below: + * + * 1. First, a marker or nothing. + * 2. Next, a space or an exception pattern sequence. + * + * @param {string[]} markers - A marker list. + * @param {string[]} exceptions - A exception pattern list. + * @returns {RegExp} A RegExp object for `always` mode. + */ +function createAlwaysStylePattern(markers, exceptions) { + var pattern = "^"; + + // A marker or nothing. + // ["*"] ==> "\*?" + // ["*", "!"] ==> "(?:\*|!)?" + // ["*", "/", "!<"] ==> "(?:\*|\/|(?:!<))?" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5C*%7C%5C%2F%7C(%3F%3A!%3C))%3F + if (markers.length === 1) { + // the marker. + pattern += escape(markers[0]); + } else { + // one of markers. + pattern += "(?:"; + pattern += markers.map(escape).join("|"); + pattern += ")"; } - - if (hasExceptions) { - exceptions = unescapedExceptions.map(escaper); - exceptionMatcher = new RegExp("(^(" + exceptions.join(")+$)|(^(") + ")+$)"); + pattern += "?"; // or nothing. + + // A space or an exception pattern sequence. + // [] ==> "\s" + // ["-"] ==> "(?:\s|\-+$)" + // ["-", "="] ==> "(?:\s|(?:\-+|=+)$)" + // ["-", "=", "--=="] ==> "(?:\s|(?:\-+|=+|(?:\-\-==)+)$)" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5Cs%7C(%3F%3A%5C-%2B%7C%3D%2B%7C(%3F%3A%5C-%5C-%3D%3D)%2B)%24) + if (exceptions.length === 0) { + // a space. + pattern += "\\s"; + } else { + // a space or... + pattern += "(?:\\s|"; + if (exceptions.length === 1) { + // a sequence of the exception pattern. + pattern += escapeAndRepeat(exceptions[0]); + } else { + // a sequence of one of exception patterns. + pattern += "(?:"; + pattern += exceptions.map(escapeAndRepeat).join("|"); + pattern += ")"; + } + pattern += "(?:$|[\n\r]))"; // the sequence continues until the end. } + return new RegExp(pattern); +} - if (hasMarkers) { - markers = unescapedMarkers.map(escaper); - - // the markerMatcher includes any markers in the list, followed by space/tab - markerMatcher = new RegExp("((^(" + markers.join("))|(^(") + ")))[ \\t\\n]"); - } +/** + * Creates RegExp object for `never` mode. + * Generated pattern is below: + * + * 1. First, a marker or nothing (captured). + * 2. Next, a space or a tab. + * + * @param {string[]} markers - A marker list. + * @returns {RegExp} A RegExp object for `never` mode. + */ +function createNeverStylePattern(markers) { + var pattern = "^(" + markers.map(escape).join("|") + ")?[ \t]"; + return new RegExp(pattern); +} - /** - * Check to see if the block comment is jsDoc comment - * @param {ASTNode} node comment node - * @returns {boolean} True if its jsdoc comment - * @private - */ - function isJsdoc(node) { - // make sure comment type is block and it start with /**\n - return node.type === "Block" && jsDocMatcher.test(node.value); - } +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ +module.exports = function(context) { + // Unless the first option is never, require a space + var requireSpace = context.options[0] !== "never"; - function checkCommentForSpace(node) { - var commentIdentifier = node.type === "Block" ? "/*" : "//"; + // Parse the second options. + // If markers don't include `"*"`, it's added automatically for JSDoc comments. + var config = context.options[1] || {}; + var styleRules = ["block", "line"].reduce(function(rule, type) { + var markers = parseMarkersOption(config[type] && config[type].markers || config.markers); + var exceptions = config[type] && config[type].exceptions || config.exceptions || []; - if (requireSpace) { + // Create RegExp object for valid patterns. + rule[type] = { + regex: requireSpace ? createAlwaysStylePattern(markers, exceptions) : createNeverStylePattern(markers), + hasExceptions: exceptions.length > 0 + }; - // If length is zero, ignore it - if (node.value.length === 0) { - return; - } + return rule; + }, {}); - // if comment is jsdoc style then ignore it - if (isJsdoc(node)) { - return; - } + /** + * Reports a given comment if it's invalid. + * @param {ASTNode} node - a comment node to check. + * @returns {void} + */ + function checkCommentForSpace(node) { + var type = node.type.toLowerCase(), + rule = styleRules[type], + commentIdentifier = type === "block" ? "/*" : "//"; - // Check for markers now, and short-circuit if found - if (hasMarkers && markerMatcher.test(node.value)) { - return; - } + // Ignores empty comments. + if (node.value.length === 0) { + return; + } - // Space expected and not found - if (node.value.indexOf(" ") !== 0 && node.value.indexOf("\t") !== 0 && node.value.indexOf("\n") !== 0) { - - /* - * Do two tests; one for space starting the line, - * and one for a comment comprised only of exceptions - */ - if (hasExceptions && !exceptionMatcher.test(node.value)) { - context.report(node, "Expected exception block, space or tab after " + commentIdentifier + " in comment."); - } else if (!hasExceptions) { - context.report(node, "Expected space or tab after " + commentIdentifier + " in comment."); + // Checks. + if (requireSpace) { + if (!rule.regex.test(node.value)) { + if (rule.hasExceptions) { + context.report(node, "Expected exception block, space or tab after \"" + commentIdentifier + "\" in comment."); + } else { + context.report(node, "Expected space or tab after \"" + commentIdentifier + "\" in comment."); } } - } else { - - if (node.value.indexOf(" ") === 0 || node.value.indexOf("\t") === 0) { - context.report(node, "Unexpected space or tab after " + commentIdentifier + " in comment."); - } - // there won't be a space or tab after commentIdentifier here, but check for the markers and whitespace - if (hasMarkers && markerMatcher.test(node.value)) { - var matches = node.value.match(markerMatcher), match = matches.length ? matches[0] : ""; - - context.report(node, "Unexpected space or tab after marker (" + match + ") in comment."); + var matched = rule.regex.exec(node.value); + if (matched) { + if (!matched[1]) { + context.report(node, "Unexpected space or tab after \"" + commentIdentifier + "\" in comment."); + } else { + context.report(node, "Unexpected space or tab after marker (" + matched[1] + ") in comment."); + } } } } @@ -136,6 +206,42 @@ module.exports.schema = [ "items": { "type": "string" } + }, + "line": { + "type": "object", + "properties": { + "exceptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "markers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "block": { + "type": "object", + "properties": { + "exceptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "markers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false } }, "additionalProperties": false diff --git a/tools/eslint/lib/rules/spaced-line-comment.js b/tools/eslint/lib/rules/spaced-line-comment.js deleted file mode 100644 index 1e2d952f294469..00000000000000 --- a/tools/eslint/lib/rules/spaced-line-comment.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * @fileoverview Enforces or disallows a space beginning a single-line comment. - * @author Greg Cochard - * @copyright 2014 Greg Cochard. All rights reserved. - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = function(context) { - - // Unless the first option is never, require a space - var requireSpace = context.options[0] !== "never"; - - // Default to match anything, so all will fail if there are no exceptions - var exceptionMatcher = new RegExp(" "); - - // Grab the exceptions array and build a RegExp matcher for it - var hasExceptions = context.options.length === 2; - var unescapedExceptions = hasExceptions ? context.options[1].exceptions : []; - var exceptions; - - if (unescapedExceptions.length) { - exceptions = unescapedExceptions.map(function(s) { - return s.replace(/([.*+?${}()|\^\[\]\/\\])/g, "\\$1"); - }); - exceptionMatcher = new RegExp("(^(" + exceptions.join(")+$)|(^(") + ")+$)"); - } - - - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- - - return { - - "LineComment": function checkCommentForSpace(node) { - - if (requireSpace) { - - // If length is zero, ignore it - if (node.value.length === 0) { - return; - } - - // Space expected and not found - if (node.value.indexOf(" ") !== 0 && node.value.indexOf("\t") !== 0) { - - /* - * Do two tests; one for space starting the line, - * and one for a comment comprised only of exceptions - */ - if (hasExceptions && !exceptionMatcher.test(node.value)) { - context.report(node, "Expected exception block, space or tab after // in comment."); - } else if (!hasExceptions) { - context.report(node, "Expected space or tab after // in comment."); - } - } - - } else { - - if (node.value.indexOf(" ") === 0 || node.value.indexOf("\t") === 0) { - context.report(node, "Unexpected space or tab after // in comment."); - } - } - } - - }; -}; - -module.exports.schema = [ - { - "enum": ["always", "never"] - }, - { - "type": "object", - "properties": { - "exceptions": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } -]; diff --git a/tools/eslint/lib/rules/strict.js b/tools/eslint/lib/rules/strict.js index a398d7dbecf9dc..3f3b56bc9e1a3f 100644 --- a/tools/eslint/lib/rules/strict.js +++ b/tools/eslint/lib/rules/strict.js @@ -17,7 +17,9 @@ var messages = { global: "Use the global form of \"use strict\".", multiple: "Multiple \"use strict\" directives.", never: "Strict mode is not permitted.", - unnecessary: "Unnecessary \"use strict\" directive." + unnecessary: "Unnecessary \"use strict\" directive.", + unnecessaryInModules: "\"use strict\" is unnecessary inside of modules.", + unnecessaryInClasses: "\"use strict\" is unnecessary inside of classes." }; /** @@ -53,10 +55,7 @@ function getUseStrictDirectives(statements) { module.exports = function(context) { - var mode = context.options[0], - isModule = context.ecmaFeatures.modules, - modes = {}, - scopes = []; + var mode = context.options[0]; /** * Report a node or array of nodes with a given message. @@ -77,117 +76,87 @@ module.exports = function(context) { } //-------------------------------------------------------------------------- - // "deprecated" mode (default) + // "never" mode //-------------------------------------------------------------------------- - /** - * Determines if a given node is "use strict". - * @param {ASTNode} node The node to check. - * @returns {boolean} True if the node is a strict pragma, false if not. - * @void - */ - function isStrictPragma(node) { - return (node && node.type === "ExpressionStatement" && - node.expression.value === "use strict"); - } - - /** - * When you enter a scope, push the strict value from the previous scope - * onto the stack. - * @param {ASTNode} node The AST node being checked. - * @returns {void} - * @private - */ - function enterScope(node) { - - var isStrict = false, - isProgram = (node.type === "Program"), - isParentGlobal = scopes.length === 1, - isParentStrict = scopes.length ? scopes[scopes.length - 1] : false; - - // look for the "use strict" pragma - if (isModule) { - isStrict = true; - } else if (isProgram) { - isStrict = isStrictPragma(node.body[0]) || isParentStrict; - } else { - isStrict = node.body.body && isStrictPragma(node.body.body[0]) || isParentStrict; - } - - scopes.push(isStrict); - - // never warn if the parent is strict or the function is strict - if (!isParentStrict && !isStrict && isParentGlobal) { - context.report(node, "Missing \"use strict\" statement."); - } - } - - /** - * When you exit a scope, pop off the top scope and see if it's true or - * false. - * @returns {void} - * @private - */ - function exitScope() { - scopes.pop(); + if (mode === "never") { + return { + "Program": function(node) { + report(getUseStrictDirectives(node.body), messages.never); + }, + "FunctionDeclaration": function(node) { + report(getUseStrictDirectives(node.body.body), messages.never); + }, + "FunctionExpression": function(node) { + report(getUseStrictDirectives(node.body.body), messages.never); + }, + "ArrowFunctionExpression": function(node) { + if (node.body.type === "BlockStatement") { + report(getUseStrictDirectives(node.body.body), messages.never); + } + } + }; } - modes.deprecated = { - "Program": enterScope, - "FunctionDeclaration": enterScope, - "FunctionExpression": enterScope, - "ArrowFunctionExpression": enterScope, - - "Program:exit": exitScope, - "FunctionDeclaration:exit": exitScope, - "FunctionExpression:exit": exitScope, - "ArrowFunctionExpression:exit": exitScope - }; - //-------------------------------------------------------------------------- - // "never" mode + // If this is modules, all "use strict" directives are unnecessary. //-------------------------------------------------------------------------- - modes.never = { - "Program": function(node) { - report(getUseStrictDirectives(node.body), messages.never); - }, - "FunctionDeclaration": function(node) { - report(getUseStrictDirectives(node.body.body), messages.never); - }, - "FunctionExpression": function(node) { - report(getUseStrictDirectives(node.body.body), messages.never); - } - }; + if (context.ecmaFeatures.modules) { + return { + "Program": function(node) { + report(getUseStrictDirectives(node.body), messages.unnecessaryInModules); + }, + "FunctionDeclaration": function(node) { + report(getUseStrictDirectives(node.body.body), messages.unnecessaryInModules); + }, + "FunctionExpression": function(node) { + report(getUseStrictDirectives(node.body.body), messages.unnecessaryInModules); + }, + "ArrowFunctionExpression": function(node) { + if (node.body.type === "BlockStatement") { + report(getUseStrictDirectives(node.body.body), messages.unnecessaryInModules); + } + } + }; + } //-------------------------------------------------------------------------- // "global" mode //-------------------------------------------------------------------------- - modes.global = { - "Program": function(node) { - var useStrictDirectives = getUseStrictDirectives(node.body); - - if (!isModule && node.body.length && useStrictDirectives.length < 1) { - report(node, messages.global); - } else if (isModule) { - report(useStrictDirectives, messages.unnecessary); - } else { - report(useStrictDirectives.slice(1), messages.multiple); + if (mode === "global") { + return { + "Program": function(node) { + var useStrictDirectives = getUseStrictDirectives(node.body); + + if (node.body.length > 0 && useStrictDirectives.length === 0) { + report(node, messages.global); + } else { + report(useStrictDirectives.slice(1), messages.multiple); + } + }, + "FunctionDeclaration": function(node) { + report(getUseStrictDirectives(node.body.body), messages.global); + }, + "FunctionExpression": function(node) { + report(getUseStrictDirectives(node.body.body), messages.global); + }, + "ArrowFunctionExpression": function(node) { + if (node.body.type === "BlockStatement") { + report(getUseStrictDirectives(node.body.body), messages.global); + } } - }, - "FunctionDeclaration": function(node) { - report(getUseStrictDirectives(node.body.body), messages.global); - }, - "FunctionExpression": function(node) { - report(getUseStrictDirectives(node.body.body), messages.global); - } - }; + }; + } //-------------------------------------------------------------------------- - // "function" mode + // "function" mode (Default) //-------------------------------------------------------------------------- + var scopes = [], + classScopes = []; + /** * Entering a function pushes a new nested scope onto the stack. The new * scope is true if the nested function is strict mode code. @@ -195,18 +164,22 @@ module.exports = function(context) { * @returns {void} */ function enterFunction(node) { - var useStrictDirectives = getUseStrictDirectives(node.body.body), - isParentGlobal = scopes.length === 0, - isParentStrict = isModule || (scopes.length && scopes[scopes.length - 1]), - isStrict = useStrictDirectives.length > 0 || isModule; + var isInClass = classScopes.length > 0, + isParentGlobal = scopes.length === 0 && classScopes.length === 0, + isParentStrict = scopes.length > 0 && scopes[scopes.length - 1], + isNotBlock = node.body.type !== "BlockStatement", + useStrictDirectives = isNotBlock ? [] : getUseStrictDirectives(node.body.body), + isStrict = useStrictDirectives.length > 0; if (isStrict) { - if (isParentStrict && useStrictDirectives.length) { + if (isParentStrict) { report(useStrictDirectives[0], messages.unnecessary); + } else if (isInClass) { + report(useStrictDirectives[0], messages.unnecessaryInClasses); } report(useStrictDirectives.slice(1), messages.multiple); - } else if (isParentGlobal && !isModule) { + } else if (isParentGlobal) { report(node, messages.function); } @@ -221,18 +194,27 @@ module.exports = function(context) { scopes.pop(); } - modes.function = { + return { "Program": function(node) { report(getUseStrictDirectives(node.body), messages.function); }, + + // Inside of class bodies are always strict mode. + "ClassBody": function() { + classScopes.push(true); + }, + "ClassBody:exit": function() { + classScopes.pop(); + }, + "FunctionDeclaration": enterFunction, "FunctionExpression": enterFunction, + "ArrowFunctionExpression": enterFunction, + "FunctionDeclaration:exit": exitFunction, - "FunctionExpression:exit": exitFunction + "FunctionExpression:exit": exitFunction, + "ArrowFunctionExpression:exit": exitFunction }; - - return modes[mode || "deprecated"]; - }; module.exports.schema = [ diff --git a/tools/eslint/lib/rules/use-isnan.js b/tools/eslint/lib/rules/use-isnan.js index f5c327f4bcdb0b..7d65f9c0d85921 100644 --- a/tools/eslint/lib/rules/use-isnan.js +++ b/tools/eslint/lib/rules/use-isnan.js @@ -11,10 +11,10 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { return { - "BinaryExpression": function (node) { + "BinaryExpression": function(node) { if (/^(?:[<>]|[!=]=)=?$/.test(node.operator) && (node.left.name === "NaN" || node.right.name === "NaN")) { context.report(node, "Use the isNaN function to compare with NaN."); } diff --git a/tools/eslint/lib/rules/valid-jsdoc.js b/tools/eslint/lib/rules/valid-jsdoc.js index bab6037d17663b..2832a8a5d064ed 100644 --- a/tools/eslint/lib/rules/valid-jsdoc.js +++ b/tools/eslint/lib/rules/valid-jsdoc.js @@ -19,11 +19,13 @@ module.exports = function(context) { var options = context.options[0] || {}, prefer = options.prefer || {}, + sourceCode = context.getSourceCode(), // these both default to true, so you have to explicitly make them false requireReturn = options.requireReturn !== false, requireParamDescription = options.requireParamDescription !== false, - requireReturnDescription = options.requireReturnDescription !== false; + requireReturnDescription = options.requireReturnDescription !== false, + requireReturnType = options.requireReturnType !== false; //-------------------------------------------------------------------------- // Helpers @@ -32,13 +34,27 @@ module.exports = function(context) { // Using a stack to store if a function returns or not (handling nested functions) var fns = []; + /** + * Check if node type is a Class + * @param {ASTNode} node node to check. + * @returns {boolean} True is its a class + * @private + */ + function isTypeClass(node) { + return node.type === "ClassExpression" || node.type === "ClassDeclaration"; + } + /** * When parsing a new function, store it in our function stack. + * @param {ASTNode} node A function node to check. * @returns {void} * @private */ - function startFunction() { - fns.push({returnPresent: false}); + function startFunction(node) { + fns.push({ + returnPresent: (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") || + isTypeClass(node) + }); } /** @@ -55,6 +71,16 @@ module.exports = function(context) { } } + /** + * Check if return tag type is void or undefined + * @param {Object} tag JSDoc tag + * @returns {boolean} True if its of type void or undefined + * @private + */ + function isValidReturnType(tag) { + return tag.type === null || tag.type.name === "void" || tag.type.type === "UndefinedLiteral"; + } + /** * Validate the JSDoc node and output warnings if anything is wrong. * @param {ASTNode} node The AST node to check. @@ -62,10 +88,11 @@ module.exports = function(context) { * @private */ function checkJSDoc(node) { - var jsdocNode = context.getJSDocComment(node), + var jsdocNode = sourceCode.getJSDocComment(node), functionData = fns.pop(), hasReturns = false, hasConstructor = false, + isOverride = false, params = Object.create(null), jsdoc; @@ -94,6 +121,8 @@ module.exports = function(context) { switch (tag.title) { case "param": + case "arg": + case "argument": if (!tag.type) { context.report(jsdocNode, "Missing JSDoc parameter type for '{{name}}'.", { name: tag.name }); } @@ -113,14 +142,14 @@ module.exports = function(context) { case "returns": hasReturns = true; - if (!requireReturn && !functionData.returnPresent && tag.type.name !== "void" && tag.type.name !== "undefined") { + if (!requireReturn && !functionData.returnPresent && (tag.type === null || !isValidReturnType(tag))) { context.report(jsdocNode, "Unexpected @" + tag.title + " tag; function has no return statement."); } else { - if (!tag.type) { + if (requireReturnType && !tag.type) { context.report(jsdocNode, "Missing JSDoc return type."); } - if (tag.type.name !== "void" && !tag.description && requireReturnDescription) { + if (!isValidReturnType(tag) && !tag.description && requireReturnDescription) { context.report(jsdocNode, "Missing JSDoc return description."); } } @@ -132,43 +161,58 @@ module.exports = function(context) { hasConstructor = true; break; + case "override": + case "inheritdoc": + isOverride = true; + break; + // no default } // check tag preferences - if (prefer.hasOwnProperty(tag.title)) { + if (prefer.hasOwnProperty(tag.title) && tag.title !== prefer[tag.title]) { context.report(jsdocNode, "Use @{{name}} instead.", { name: prefer[tag.title] }); } }); // check for functions missing @returns - if (!hasReturns && !hasConstructor && node.parent.kind !== "get") { + if (!isOverride && !hasReturns && !hasConstructor && node.parent.kind !== "get" && !isTypeClass(node)) { if (requireReturn || functionData.returnPresent) { - context.report(jsdocNode, "Missing JSDoc @returns for function."); + context.report(jsdocNode, "Missing JSDoc @" + (prefer.returns || "returns") + " for function."); } } // check the parameters var jsdocParams = Object.keys(params); - node.params.forEach(function(param, i) { - var name = param.name; - - // TODO(nzakas): Figure out logical things to do with destructured, default, rest params - if (param.type === "Identifier") { - if (jsdocParams[i] && (name !== jsdocParams[i])) { - context.report(jsdocNode, "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.", { - name: name, - jsdocName: jsdocParams[i] - }); - } else if (!params[name]) { - context.report(jsdocNode, "Missing JSDoc for parameter '{{name}}'.", { - name: name - }); + if (node.params) { + node.params.forEach(function(param, i) { + var name = param.name; + + // TODO(nzakas): Figure out logical things to do with destructured, default, rest params + if (param.type === "Identifier") { + if (jsdocParams[i] && (name !== jsdocParams[i])) { + context.report(jsdocNode, "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.", { + name: name, + jsdocName: jsdocParams[i] + }); + } else if (!params[name] && !isOverride) { + context.report(jsdocNode, "Missing JSDoc for parameter '{{name}}'.", { + name: name + }); + } } + }); + } + + if (options.matchDescription) { + var regex = new RegExp(options.matchDescription); + + if (!regex.test(jsdoc.description)) { + context.report(jsdocNode, "JSDoc description does not satisfy the regex pattern."); } - }); + } } @@ -182,9 +226,13 @@ module.exports = function(context) { "ArrowFunctionExpression": startFunction, "FunctionExpression": startFunction, "FunctionDeclaration": startFunction, + "ClassExpression": startFunction, + "ClassDeclaration": startFunction, "ArrowFunctionExpression:exit": checkJSDoc, "FunctionExpression:exit": checkJSDoc, "FunctionDeclaration:exit": checkJSDoc, + "ClassExpression:exit": checkJSDoc, + "ClassDeclaration:exit": checkJSDoc, "ReturnStatement": addReturn }; @@ -208,6 +256,12 @@ module.exports.schema = [ }, "requireReturnDescription": { "type": "boolean" + }, + "matchDescription": { + "type": "string" + }, + "requireReturnType": { + "type": "boolean" } }, "additionalProperties": false diff --git a/tools/eslint/lib/rules/valid-typeof.js b/tools/eslint/lib/rules/valid-typeof.js index cbeb7b12e8f800..d67a46bf3dd7ce 100644 --- a/tools/eslint/lib/rules/valid-typeof.js +++ b/tools/eslint/lib/rules/valid-typeof.js @@ -19,7 +19,7 @@ module.exports = function(context) { return { - "UnaryExpression": function (node) { + "UnaryExpression": function(node) { var parent, sibling; if (node.operator === "typeof") { diff --git a/tools/eslint/lib/rules/vars-on-top.js b/tools/eslint/lib/rules/vars-on-top.js index 5917c674ec4680..84af6477a0ef29 100644 --- a/tools/eslint/lib/rules/vars-on-top.js +++ b/tools/eslint/lib/rules/vars-on-top.js @@ -11,7 +11,7 @@ // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { var errorMessage = "All \"var\" declarations must be at the top of the function scope."; //-------------------------------------------------------------------------- @@ -95,13 +95,13 @@ module.exports = function (context) { //-------------------------------------------------------------------------- return { - "VariableDeclaration": function (node) { + "VariableDeclaration": function(node) { var ancestors = context.getAncestors(); var parent = ancestors.pop(); var grandParent = ancestors.pop(); - if (node.kind === "var") {// check variable is `var` type and not `let` or `const` - if (parent.type === "Program") {// That means its a global variable + if (node.kind === "var") { // check variable is `var` type and not `let` or `const` + if (parent.type === "Program") { // That means its a global variable globalVarCheck(node, parent); } else { blockScopeVarCheck(node, parent, grandParent); diff --git a/tools/eslint/lib/rules/wrap-iife.js b/tools/eslint/lib/rules/wrap-iife.js index 6291425efb86f9..87d4d5ed696655 100644 --- a/tools/eslint/lib/rules/wrap-iife.js +++ b/tools/eslint/lib/rules/wrap-iife.js @@ -14,6 +14,12 @@ module.exports = function(context) { var style = context.options[0] || "outside"; + /** + * Check if the node is wrapped in () + * @param {ASTNode} node node to evaluate + * @returns {boolean} True if it is wrapped + * @private + */ function wrapped(node) { var previousToken = context.getTokenBefore(node), nextToken = context.getTokenAfter(node); diff --git a/tools/eslint/lib/rules/yoda.js b/tools/eslint/lib/rules/yoda.js index ab5e7d04c92bdb..57ac261b95a790 100644 --- a/tools/eslint/lib/rules/yoda.js +++ b/tools/eslint/lib/rules/yoda.js @@ -114,7 +114,7 @@ function same(a, b) { // Rule Definition //------------------------------------------------------------------------------ -module.exports = function (context) { +module.exports = function(context) { // Default to "never" (!always) if no option var always = (context.options[0] === "always"); @@ -197,6 +197,7 @@ module.exports = function (context) { // Comparisons must always be yoda-style: if ("blue" === color) if ( (node.right.type === "Literal" || looksLikeLiteral(node.right)) && + !(node.left.type === "Literal" || looksLikeLiteral(node.left)) && !(!isEqualityOperator(node.operator) && onlyEquality) && isComparisonOperator(node.operator) && !(exceptRange && isRangeTest(context.getAncestors().pop())) @@ -209,6 +210,7 @@ module.exports = function (context) { // Comparisons must never be yoda-style (default) if ( (node.left.type === "Literal" || looksLikeLiteral(node.left)) && + !(node.right.type === "Literal" || looksLikeLiteral(node.right)) && !(!isEqualityOperator(node.operator) && onlyEquality) && isComparisonOperator(node.operator) && !(exceptRange && isRangeTest(context.getAncestors().pop())) diff --git a/tools/eslint/lib/testers/event-generator-tester.js b/tools/eslint/lib/testers/event-generator-tester.js new file mode 100644 index 00000000000000..ce2f3c8cc1f1d8 --- /dev/null +++ b/tools/eslint/lib/testers/event-generator-tester.js @@ -0,0 +1,63 @@ +/** + * @fileoverview Helpers to test EventGenerator interface. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +/* global describe, it */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var assert = require("assert"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + /** + * Overrideable `describe` function to test. + * @param {string} text - A description. + * @param {function} method - A test logic. + * @returns {any} The returned value with the test logic. + */ + describe: (typeof describe === "function") ? describe : function(text, method) { + return method.apply(this); + }, + + /** + * Overrideable `it` function to test. + * @param {string} text - A description. + * @param {function} method - A test logic. + * @returns {any} The returned value with the test logic. + */ + it: (typeof it === "function") ? it : function(text, method) { + return method.apply(this); + }, + + /** + * Does some tests to check a given object implements the EventGenerator interface. + * @param {object} instance - An object to check. + * @returns {void} + */ + testEventGeneratorInterface: function(instance) { + this.describe("should implement EventGenerator interface", function() { + this.it("should have `emitter` property.", function() { + assert.equal(typeof instance.emitter, "object"); + assert.equal(typeof instance.emitter.emit, "function"); + }); + + this.it("should have `enterNode` property.", function() { + assert.equal(typeof instance.enterNode, "function"); + }); + + this.it("should have `leaveNode` property.", function() { + assert.equal(typeof instance.leaveNode, "function"); + }); + }.bind(this)); + } +}; diff --git a/tools/eslint/lib/testers/rule-tester.js b/tools/eslint/lib/testers/rule-tester.js new file mode 100644 index 00000000000000..5a8b8a4701eca2 --- /dev/null +++ b/tools/eslint/lib/testers/rule-tester.js @@ -0,0 +1,421 @@ +/** + * @fileoverview Mocha test wrapper + * @author Ilya Volodin + * @copyright 2015 Kevin Partington. All rights reserved. + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * @copyright 2014 Ilya Volodin. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +/* global describe, it */ + +/* + * This is a wrapper around mocha to allow for DRY unittests for eslint + * Format: + * RuleTester.add("{ruleName}", { + * valid: [ + * "{code}", + * { code: "{code}", options: {options}, global: {globals}, globals: {globals}, parser: "{parser}", settings: {settings} } + * ], + * invalid: [ + * { code: "{code}", errors: {numErrors} }, + * { code: "{code}", errors: ["{errorMessage}"] }, + * { code: "{code}", options: {options}, global: {globals}, parser: "{parser}", settings: {settings}, errors: [{ message: "{errorMessage}", type: "{errorNodeType}"}] } + * ] + * }); + * + * Variables: + * {code} - String that represents the code to be tested + * {options} - Arguments that are passed to the configurable rules. + * {globals} - An object representing a list of variables that are + * registered as globals + * {parser} - String representing the parser to use + * {settings} - An object representing global settings for all rules + * {numErrors} - If failing case doesn't need to check error message, + * this integer will specify how many errors should be + * received + * {errorMessage} - Message that is returned by the rule on failure + * {errorNodeType} - AST node type that is returned by they rule as + * a cause of the failure. + * + * Requirements: + * Each rule has to have at least one invalid and at least one valid check. + * If one of them is missing, the test will be marked as failed. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var assert = require("assert"), + util = require("util"), + merge = require("lodash.merge"), + omit = require("lodash.omit"), + clone = require("lodash.clonedeep"), + validator = require("../config/config-validator"), + validate = require("is-my-json-valid"), + eslint = require("../eslint"), + rules = require("../rules"), + metaSchema = require("../../conf/json-schema-schema.json"), + SourceCodeFixer = require("../util/source-code-fixer"); + +//------------------------------------------------------------------------------ +// Private Members +//------------------------------------------------------------------------------ +// testerDefaultConfig must not be modified as it allows to reset the tester to +// the initial default configuration +var testerDefaultConfig = { rules: {} }; +var defaultConfig = { rules: {} }; +// List every parameters possible on a test case that are not related to eslint +// configuration +var RuleTesterParameters = [ + "code", + "filename", + "options", + "args", + "errors" +]; + +var validateSchema = validate(metaSchema, { verbose: true }); + +var hasOwnProperty = Function.call.bind(Object.hasOwnProperty); + +/** + * Clones a given value deeply. + * Note: This ignores `parent` property. + * + * @param {any} x - A value to clone. + * @returns {any} A cloned value. + */ +function cloneDeeplyExcludesParent(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + return x.map(cloneDeeplyExcludesParent); + } + + var retv = {}; + for (var key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + retv[key] = cloneDeeplyExcludesParent(x[key]); + } + } + + return retv; + } + + return x; +} + +/** + * Freezes a given value deeply. + * + * @param {any} x - A value to freeze. + * @returns {void} + */ +function freezeDeeply(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + x.forEach(freezeDeeply); + } else { + for (var key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + freezeDeeply(x[key]); + } + } + } + Object.freeze(x); + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Creates a new instance of RuleTester. + * @param {Object} [testerConfig] Optional, extra configuration for the tester + * @constructor + */ +function RuleTester(testerConfig) { + + /** + * The configuration to use for this tester. Combination of the tester + * configuration and the default configuration. + * @type {Object} + */ + this.testerConfig = merge( + // we have to clone because merge uses the object on the left for + // recipient + clone(defaultConfig), + testerConfig + ); +} + +/** + * Set the configuration to use for all future tests + * @param {Object} config the configuration to use. + * @returns {void} + */ +RuleTester.setDefaultConfig = function(config) { + if (typeof config !== "object") { + throw new Error("RuleTester.setDefaultConfig: config must be an object"); + } + defaultConfig = config; + + // Make sure the rules object exists since it is assumed to exist later + defaultConfig.rules = defaultConfig.rules || {}; +}; + +/** + * Get the current configuration used for all tests + * @returns {Object} the current configuration + */ +RuleTester.getDefaultConfig = function() { + return defaultConfig; +}; + +/** + * Reset the configuration to the initial configuration of the tester removing + * any changes made until now. + * @returns {void} + */ +RuleTester.resetDefaultConfig = function() { + defaultConfig = clone(testerDefaultConfig); +}; + +// default separators for testing +RuleTester.describe = (typeof describe === "function") ? describe : function(text, method) { + return method.apply(this); +}; + +RuleTester.it = (typeof it === "function") ? it : function(text, method) { + return method.apply(this); +}; + +RuleTester.prototype = { + + /** + * Define a rule for one particular run of tests. + * @param {string} name The name of the rule to define. + * @param {Function} rule The rule definition. + * @returns {void} + */ + defineRule: function(name, rule) { + eslint.defineRule(name, rule); + }, + + /** + * Adds a new rule test to execute. + * @param {string} ruleName The name of the rule to run. + * @param {Function} rule The rule to test. + * @param {Object} test The collection of tests to run. + * @returns {void} + */ + run: function(ruleName, rule, test) { + + var testerConfig = this.testerConfig, + result = {}; + + /* eslint-disable no-shadow */ + + /** + * Run the rule for the given item + * @param {string} ruleName name of the rule + * @param {string|object} item Item to run the rule against + * @returns {object} Eslint run result + * @private + */ + function runRuleForItem(ruleName, item) { + var config = clone(testerConfig), + code, filename, schema, beforeAST, afterAST; + + if (typeof item === "string") { + code = item; + } else { + code = item.code; + // Assumes everything on the item is a config except for the + // parameters used by this tester + var itemConfig = omit(item, RuleTesterParameters); + // Create the config object from the tester config and this item + // specific configurations. + config = merge( + config, + itemConfig + ); + } + + if (item.filename) { + filename = item.filename; + } + + if (item.options) { + var options = item.options.concat(); + options.unshift(1); + config.rules[ruleName] = options; + } else { + config.rules[ruleName] = 1; + } + + eslint.defineRule(ruleName, rule); + + schema = validator.getRuleOptionsSchema(ruleName); + + validateSchema(schema); + + if (validateSchema.errors) { + throw new Error([ + "Schema for rule " + ruleName + " is invalid:" + ].concat(validateSchema.errors.map(function(error) { + return "\t" + error.field + ": " + error.message; + })).join("\n")); + } + + validator.validate(config, "rule-tester"); + + // Setup AST getters. + // To check whether or not AST was not modified in verify. + eslint.reset(); + eslint.on("Program", function(node) { + beforeAST = cloneDeeplyExcludesParent(node); + + eslint.on("Program:exit", function(node) { + afterAST = cloneDeeplyExcludesParent(node); + }); + }); + + // Freezes rule-context properties. + var originalGet = rules.get; + try { + rules.get = function(ruleId) { + var rule = originalGet(ruleId); + return function(context) { + Object.freeze(context); + freezeDeeply(context.options); + freezeDeeply(context.settings); + freezeDeeply(context.ecmaFeatures); + + return rule(context); + }; + }; + + return { + messages: eslint.verify(code, config, filename, true), + beforeAST: beforeAST, + afterAST: afterAST + }; + } finally { + rules.get = originalGet; + } + } + + /** + * Check if the template is valid or not + * all valid cases go through this + * @param {string} ruleName name of the rule + * @param {string|object} item Item to run the rule against + * @returns {void} + * @private + */ + function testValidTemplate(ruleName, item) { + var result = runRuleForItem(ruleName, item); + var messages = result.messages; + + assert.equal(messages.length, 0, util.format("Should have no errors but had %d: %s", + messages.length, util.inspect(messages))); + + assert.deepEqual( + result.beforeAST, + result.afterAST, + "Rule should not modify AST." + ); + } + + /** + * Check if the template is invalid or not + * all invalid cases go through this. + * @param {string} ruleName name of the rule + * @param {string|object} item Item to run the rule against + * @returns {void} + * @private + */ + function testInvalidTemplate(ruleName, item) { + var result = runRuleForItem(ruleName, item); + var messages = result.messages; + + if (typeof item.errors === "number") { + assert.equal(messages.length, item.errors, util.format("Should have %d errors but had %d: %s", + item.errors, messages.length, util.inspect(messages))); + } else { + assert.equal(messages.length, item.errors.length, + util.format("Should have %d errors but had %d: %s", + item.errors.length, messages.length, util.inspect(messages))); + + if (item.hasOwnProperty("output")) { + var fixResult = SourceCodeFixer.applyFixes(eslint.getSourceCode(), messages); + assert.equal(fixResult.output, item.output, "Output is incorrect."); + } + + for (var i = 0, l = item.errors.length; i < l; i++) { + assert.ok(!("fatal" in messages[i]), "A fatal parsing error occurred: " + messages[i].message); + assert.equal(messages[i].ruleId, ruleName, "Error rule name should be the same as the name of the rule being tested"); + + if (typeof item.errors[i] === "string") { + // Just an error message. + + assert.equal(messages[i].message, item.errors[i], "Error message should be " + item.errors[i]); + } else if (typeof item.errors[i] === "object") { + // Error object. This may have a message, node type, + // line, and/or column. + + if (item.errors[i].message) { + assert.equal(messages[i].message, item.errors[i].message, "Error message should be " + item.errors[i].message); + } + + if (item.errors[i].type) { + assert.equal(messages[i].nodeType, item.errors[i].type, "Error type should be " + item.errors[i].type); + } + + if (item.errors[i].hasOwnProperty("line")) { + assert.equal(messages[i].line, item.errors[i].line, "Error line should be " + item.errors[i].line); + } + + if (item.errors[i].hasOwnProperty("column")) { + assert.equal(messages[i].column, item.errors[i].column, "Error column should be " + item.errors[i].column); + } + } else { + // Only string or object errors are valid. + assert.fail(messages[i], null, "Error should be a string or object."); + } + } + } + + assert.deepEqual( + result.beforeAST, + result.afterAST, + "Rule should not modify AST." + ); + } + + // this creates a mocha test suite and pipes all supplied info + // through one of the templates above. + RuleTester.describe(ruleName, function() { + test.valid.forEach(function(valid) { + RuleTester.it(valid.code || valid, function() { + testValidTemplate(ruleName, valid); + }); + }); + + test.invalid.forEach(function(invalid) { + RuleTester.it(invalid.code, function() { + testInvalidTemplate(ruleName, invalid); + }); + }); + }); + + return result.suite; + } +}; + + +module.exports = RuleTester; diff --git a/tools/eslint/lib/timing.js b/tools/eslint/lib/timing.js index 06e8da70b97e58..3af3a43c58e9e7 100644 --- a/tools/eslint/lib/timing.js +++ b/tools/eslint/lib/timing.js @@ -11,11 +11,27 @@ //------------------------------------------------------------------------------ /* istanbul ignore next */ +/** + * Align the string to left + * @param {string} str string to evaluate + * @param {int} len length of the string + * @param {string} ch delimiter character + * @returns {string} modified string + * @private + */ function alignLeft(str, len, ch) { return str + new Array(len - str.length + 1).join(ch || " "); } /* istanbul ignore next */ +/** + * Align the string to right + * @param {string} str string to evaluate + * @param {int} len length of the string + * @param {string} ch delimiter character + * @returns {string} modified string + * @private + */ function alignRight(str, len, ch) { return new Array(len - str.length + 1).join(ch || " ") + str; } @@ -30,6 +46,12 @@ var HEADERS = ["Rule", "Time (ms)", "Relative"]; var ALIGN = [alignLeft, alignRight, alignRight]; /* istanbul ignore next */ +/** + * display the data + * @param {object} data Data object to be displayed + * @returns {string} modified string + * @private + */ function display(data) { var total = 0; var rows = Object.keys(data) @@ -82,6 +104,13 @@ module.exports = (function() { var data = Object.create(null); + /** + * Time the run + * @param {*} key key from the data object + * @param {Function} fn function to be called + * @returns {Function} function to be executed + * @private + */ function time(key, fn) { if (typeof data[key] === "undefined") { data[key] = 0; diff --git a/tools/eslint/lib/util.js b/tools/eslint/lib/util.js index 9fe594a4aed093..fb1a7a33d5de19 100644 --- a/tools/eslint/lib/util.js +++ b/tools/eslint/lib/util.js @@ -14,72 +14,36 @@ var PLUGIN_NAME_PREFIX = "eslint-plugin-", // Public Interface //------------------------------------------------------------------------------ -/** - * Merges two config objects. This will not only add missing keys, but will also modify values to match. - * @param {Object} base config object - * @param {Object} custom config object. Overrides in this config object will take priority over base. - * @returns {Object} merged config object. - */ -exports.mergeConfigs = function mergeConfigs(base, custom) { - - Object.keys(custom).forEach(function (key) { - var property = custom[key]; - - if (key === "plugins") { - if (!base[key]) { - base[key] = []; - } - - property.forEach(function (plugin) { - // skip duplicates - if (base[key].indexOf(plugin) === -1) { - base[key].push(plugin); - } - }); - return; - } - - if (Array.isArray(base[key]) && !Array.isArray(property) && typeof property === "number") { - // assume that we are just overriding first attribute - base[key][0] = custom[key]; - return; - } - - if (typeof property === "object" && !Array.isArray(property) && property !== null) { - // base[key] might not exist, so be careful with recursion here - base[key] = mergeConfigs(base[key] || {}, custom[key]); - } else { - base[key] = custom[key]; - } - }); - - return base; -}; /** * Removes the prefix `eslint-plugin-` from a plugin name. * @param {string} pluginName The name of the plugin which may have the prefix. * @returns {string} The name of the plugin without prefix. */ -exports.removePluginPrefix = function removePluginPrefix(pluginName) { +function removePluginPrefix(pluginName) { return pluginName.indexOf(PLUGIN_NAME_PREFIX) === 0 ? pluginName.substring(PLUGIN_NAME_PREFIX.length) : pluginName; -}; +} /** * @param {string} pluginName The name of the plugin which may have the prefix. * @returns {string} The name of the plugins namepace if it has one. */ -exports.getNamespace = function getNamespace(pluginName) { +function getNamespace(pluginName) { return pluginName.match(NAMESPACE_REGEX) ? pluginName.match(NAMESPACE_REGEX)[0] : ""; -}; +} /** * Removes the namespace from a plugin name. * @param {string} pluginName The name of the plugin which may have the prefix. * @returns {string} The name of the plugin without the namespace. */ -exports.removeNameSpace = function removeNameSpace(pluginName) { +function removeNameSpace(pluginName) { return pluginName.replace(NAMESPACE_REGEX, ""); -}; +} -exports.PLUGIN_NAME_PREFIX = PLUGIN_NAME_PREFIX; +module.exports = { + removePluginPrefix: removePluginPrefix, + getNamespace: getNamespace, + removeNameSpace: removeNameSpace, + "PLUGIN_NAME_PREFIX": PLUGIN_NAME_PREFIX +}; diff --git a/tools/eslint/lib/util/comment-event-generator.js b/tools/eslint/lib/util/comment-event-generator.js new file mode 100644 index 00000000000000..fb56ee1c05141a --- /dev/null +++ b/tools/eslint/lib/util/comment-event-generator.js @@ -0,0 +1,116 @@ +/** + * @fileoverview The event generator for comments. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Check collection of comments to prevent double event for comment as + * leading and trailing, then emit event if passing + * @param {ASTNode[]} comments - Collection of comment nodes + * @param {EventEmitter} emitter - The event emitter which is the destination of events. + * @param {Object[]} locs - List of locations of previous comment nodes + * @param {string} eventName - Event name postfix + * @returns {void} + */ +function emitComments(comments, emitter, locs, eventName) { + if (comments.length > 0) { + comments.forEach(function(node) { + var index = locs.indexOf(node.loc); + if (index >= 0) { + locs.splice(index, 1); + } else { + locs.push(node.loc); + emitter.emit(node.type + eventName, node); + } + }); + } +} + +/** + * Shortcut to check and emit enter of comment nodes + * @param {CommentEventGenerator} generator - A generator to emit. + * @param {ASTNode[]} comments - Collection of comment nodes + * @returns {void} + */ +function emitCommentsEnter(generator, comments) { + emitComments( + comments, + generator.emitter, + generator.commentLocsEnter, + "Comment"); +} + +/** + * Shortcut to check and emit exit of comment nodes + * @param {CommentEventGenerator} generator - A generator to emit. + * @param {ASTNode[]} comments Collection of comment nodes + * @returns {void} + */ +function emitCommentsExit(generator, comments) { + emitComments( + comments, + generator.emitter, + generator.commentLocsExit, + "Comment:exit"); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The event generator for comments. + * This is the decorator pattern. + * This generates events of comments before/after events which are generated the original generator. + * + * @param {EventGenerator} originalEventGenerator - An event generator which is the decoration target. + * @param {SourceCode} sourceCode - A source code which has comments. + * @returns {CommentEventGenerator} new instance. + */ +function CommentEventGenerator(originalEventGenerator, sourceCode) { + this.original = originalEventGenerator; + this.emitter = originalEventGenerator.emitter; + this.sourceCode = sourceCode; + this.commentLocsEnter = []; + this.commentLocsExit = []; +} + +CommentEventGenerator.prototype = { + constructor: CommentEventGenerator, + + /** + * Emits an event of entering comments. + * @param {ASTNode} node - A node which was entered. + * @returns {void} + */ + enterNode: function enterNode(node) { + var comments = this.sourceCode.getComments(node); + + emitCommentsEnter(this, comments.leading); + this.original.enterNode(node); + emitCommentsEnter(this, comments.trailing); + }, + + /** + * Emits an event of leaving comments. + * @param {ASTNode} node - A node which was left. + * @returns {void} + */ + leaveNode: function leaveNode(node) { + var comments = this.sourceCode.getComments(node); + + emitCommentsExit(this, comments.trailing); + this.original.leaveNode(node); + emitCommentsExit(this, comments.leading); + } +}; + +module.exports = CommentEventGenerator; diff --git a/tools/eslint/lib/util/estraverse.js b/tools/eslint/lib/util/estraverse.js new file mode 100644 index 00000000000000..53015fe06794af --- /dev/null +++ b/tools/eslint/lib/util/estraverse.js @@ -0,0 +1,54 @@ +/** + * @fileoverview Patch for estraverse + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var estraverse = require("estraverse"), + jsxKeys = require("estraverse-fb/keys"); + +//------------------------------------------------------------------------------ +// Helers +//------------------------------------------------------------------------------ + +var experimentalKeys = { + ExperimentalRestProperty: ["argument"], + ExperimentalSpreadProperty: ["argument"] +}; + +/** + * Adds a given keys to Syntax and VisitorKeys of estraverse. + * + * @param {object} keys - Key definitions to add. + * This is an object as map. + * Keys are the node type. + * Values are an array of property names to visit. + * @returns {void} + */ +function installKeys(keys) { + for (var key in keys) { + if (keys.hasOwnProperty(key)) { + estraverse.Syntax[key] = key; + if (keys[key]) { + estraverse.VisitorKeys[key] = keys[key]; + } + } + } +} + +// Add JSX node types. +installKeys(jsxKeys); +// Add Experimental node types. +installKeys(experimentalKeys); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = estraverse; diff --git a/tools/eslint/lib/util/glob-util.js b/tools/eslint/lib/util/glob-util.js new file mode 100644 index 00000000000000..2a28604ffa4f86 --- /dev/null +++ b/tools/eslint/lib/util/glob-util.js @@ -0,0 +1,149 @@ +/** + * @fileoverview Utilities for working with globs and the filesystem. + * @author Ian VanSchooten + * @copyright 2015 Ian VanSchooten. All rights reserved. + * See LICENSE in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var debug = require("debug"), + fs = require("fs"), + glob = require("glob"), + shell = require("shelljs"), + + IgnoredPaths = require("../ignored-paths"); + +debug = debug("eslint:glob-util"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks if a provided path is a directory and returns a glob string matching + * all files under that directory if so, the path itself otherwise. + * + * Reason for this is that `glob` needs `/**` to collect all the files under a + * directory where as our previous implementation without `glob` simply walked + * a directory that is passed. So this is to maintain backwards compatibility. + * + * Also makes sure all path separators are POSIX style for `glob` compatibility. + * + * @param {string[]} [extensions] An array of accepted extensions + * @returns {Function} A function that takes a pathname and returns a glob that + * matches all files with the provided extensions if + * pathname is a directory. + */ +function processPath(extensions) { + var suffix = "/**"; + + if (extensions) { + if (extensions.length === 1) { + suffix += "/*." + extensions[0]; + } else { + suffix += "/*.{" + extensions.join(",") + "}"; + } + } + + /** + * A function that converts a directory name to a glob pattern + * + * @param {string} pathname The directory path to be modified + * @returns {string} The glob path or the file path itself + * @private + */ + return function(pathname) { + var newPath = pathname; + + if (shell.test("-d", pathname)) { + newPath = pathname.replace(/[\/\\]$/, "") + suffix; + } + + return newPath.replace(/\\/g, "/").replace(/^\.\//, ""); + }; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Resolves the patterns into glob-based patterns for easier handling. + * @param {string[]} patterns File patterns (such as passed on the command line). + * @param {string[]} extensions List of valid file extensions. + * @returns {string[]} The equivalent glob patterns. + */ +function resolveFileGlobPatterns(patterns, extensions) { + extensions = extensions || [".js"]; + + extensions = extensions.map(function(ext) { + return ext.charAt(0) === "." ? ext.substr(1) : ext; + }); + + return patterns.map(processPath(extensions)); +} + +/** + * Build a list of absolute filesnames on which ESLint will act. + * Ignored files are excluded from the results, as are duplicates. + * + * @param {string[]} globPatterns Glob patterns. + * @param {Object} [options] An options object. + * @param {boolean} [options.ignore] False disables use of .eslintignore. + * @param {string} [options.ignorePath] The ignore file to use instead of .eslintignore. + * @param {string} [options.ignorePattern] A pattern of files to ignore. + * @returns {string[]} Resolved absolute filenames. + */ +function listFilesToProcess(globPatterns, options) { + var ignoredPaths, + ignoredPathsList, + files = [], + added = {}, + globOptions; + + /** + * Executes the linter on a file defined by the `filename`. Skips + * unsupported file extensions and any files that are already linted. + * @param {string} filename The file to be processed + * @returns {void} + */ + function addFile(filename) { + if (ignoredPaths.contains(filename)) { + return; + } + filename = fs.realpathSync(filename); + if (added[filename]) { + return; + } + files.push(filename); + added[filename] = true; + } + + options = options || { ignore: true }; + ignoredPaths = IgnoredPaths.load(options); + ignoredPathsList = ignoredPaths.patterns || []; + globOptions = { + nodir: true, + ignore: ignoredPathsList + }; + + debug("Creating list of files to process."); + globPatterns.forEach(function(pattern) { + if (shell.test("-f", pattern)) { + addFile(pattern); + } else { + glob.sync(pattern, globOptions).forEach(addFile); + } + }); + + return files; +} + +module.exports = { + resolveFileGlobPatterns: resolveFileGlobPatterns, + listFilesToProcess: listFilesToProcess +}; diff --git a/tools/eslint/lib/util/keywords.js b/tools/eslint/lib/util/keywords.js new file mode 100644 index 00000000000000..dde29c6b76c06a --- /dev/null +++ b/tools/eslint/lib/util/keywords.js @@ -0,0 +1,68 @@ +/** + * @fileoverview A shared list of ES3 keywords. + * @author Josh Perez + * @copyright 2015 Jose Roberto Vidal. All rights reserved. + */ +"use strict"; + +module.exports = [ + "abstract", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "double", + "else", + "enum", + "export", + "extends", + "false", + "final", + "finally", + "float", + "for", + "function", + "goto", + "if", + "implements", + "import", + "in", + "instanceof", + "int", + "interface", + "long", + "native", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "short", + "static", + "super", + "switch", + "synchronized", + "this", + "throw", + "throws", + "transient", + "true", + "try", + "typeof", + "var", + "void", + "volatile", + "while", + "with" +]; diff --git a/tools/eslint/lib/util/node-event-generator.js b/tools/eslint/lib/util/node-event-generator.js new file mode 100644 index 00000000000000..002bd29dfe3ed0 --- /dev/null +++ b/tools/eslint/lib/util/node-event-generator.js @@ -0,0 +1,55 @@ +/** + * @fileoverview The event generator for AST nodes. + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The event generator for AST nodes. + * This implements below interface. + * + * ```ts + * interface EventGenerator { + * emitter: EventEmitter; + * enterNode(node: ASTNode): void; + * leaveNode(node: ASTNode): void; + * } + * ``` + * + * @param {EventEmitter} emitter - An event emitter which is the destination of events. + * @returns {NodeEventGenerator} new instance. + */ +function NodeEventGenerator(emitter) { + this.emitter = emitter; +} + +NodeEventGenerator.prototype = { + constructor: NodeEventGenerator, + + /** + * Emits an event of entering AST node. + * @param {ASTNode} node - A node which was entered. + * @returns {void} + */ + enterNode: function enterNode(node) { + this.emitter.emit(node.type, node); + }, + + /** + * Emits an event of leaving AST node. + * @param {ASTNode} node - A node which was left. + * @returns {void} + */ + leaveNode: function leaveNode(node) { + this.emitter.emit(node.type + ":exit", node); + } +}; + +module.exports = NodeEventGenerator; diff --git a/tools/eslint/lib/util/rule-fixer.js b/tools/eslint/lib/util/rule-fixer.js new file mode 100644 index 00000000000000..0f9ef9adf3c73f --- /dev/null +++ b/tools/eslint/lib/util/rule-fixer.js @@ -0,0 +1,147 @@ +/** + * @fileoverview An object that creates fix commands for rules. + * @author Nicholas C. Zakas + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +// none! + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Creates a fix command that inserts text at the specified index in the source text. + * @param {int} index The 0-based index at which to insert the new text. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + * @private + */ +function insertTextAt(index, text) { + return { + range: [index, index], + text: text + }; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Creates code fixing commands for rules. + * @constructor + */ +function RuleFixer() { + Object.freeze(this); +} + +RuleFixer.prototype = { + constructor: RuleFixer, + + /** + * Creates a fix command that inserts text after the given node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to insert after. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextAfter: function(nodeOrToken, text) { + return this.insertTextAfterRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that inserts text after the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextAfterRange: function(range, text) { + return insertTextAt(range[1], text); + }, + + /** + * Creates a fix command that inserts text before the given node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to insert before. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextBefore: function(nodeOrToken, text) { + return this.insertTextBeforeRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that inserts text before the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextBeforeRange: function(range, text) { + return insertTextAt(range[0], text); + }, + + /** + * Creates a fix command that replaces text at the node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to remove. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + replaceText: function(nodeOrToken, text) { + return this.replaceTextRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that replaces text at the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + replaceTextRange: function(range, text) { + return { + range: range, + text: text + }; + }, + + /** + * Creates a fix command that removes the node or token from the source. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to remove. + * @returns {Object} The fix command. + */ + remove: function(nodeOrToken) { + return this.removeRange(nodeOrToken.range); + }, + + /** + * Creates a fix command that removes the specified range of text from the source. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to remove, first item is start of range, second + * is end of range. + * @returns {Object} The fix command. + */ + removeRange: function(range) { + return { + range: range, + text: "" + }; + } + +}; + + +module.exports = RuleFixer; diff --git a/tools/eslint/lib/util/source-code-fixer.js b/tools/eslint/lib/util/source-code-fixer.js new file mode 100644 index 00000000000000..8a8d99e9e86551 --- /dev/null +++ b/tools/eslint/lib/util/source-code-fixer.js @@ -0,0 +1,123 @@ +/** + * @fileoverview An object that caches and applies source code fixes. + * @author Nicholas C. Zakas + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var debug = require("debug")("eslint:text-fixer"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Compares items in a messages array by line and column. + * @param {Message} a The first message. + * @param {Message} b The second message. + * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal. + * @private + */ +function compareMessagesByLocation(a, b) { + var lineDiff = a.line - b.line; + + if (lineDiff === 0) { + return a.column - b.column; + } else { + return lineDiff; + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Utility for apply fixes to source code. + * @constructor + */ +function SourceCodeFixer() { + Object.freeze(this); +} + +/** + * Applies the fixes specified by the messages to the given text. Tries to be + * smart about the fixes and won't apply fixes over the same area in the text. + * @param {SourceCode} sourceCode The source code to apply the changes to. + * @param {Message[]} messages The array of messages reported by ESLint. + * @returns {Object} An object containing the fixed text and any unfixed messages. + */ +SourceCodeFixer.applyFixes = function(sourceCode, messages) { + + debug("Applying fixes"); + + if (!sourceCode) { + debug("No source code to fix"); + return { + fixed: false, + messages: messages, + output: "" + }; + } + + // clone the array + var remainingMessages = [], + fixes = [], + text = sourceCode.text, + lastFixPos = text.length + 1; + + messages.forEach(function(problem) { + if (problem.hasOwnProperty("fix")) { + fixes.push(problem); + } else { + remainingMessages.push(problem); + } + }); + + if (fixes.length) { + debug("Found fixes to apply"); + + // sort in reverse order of occurrence + fixes.sort(function(a, b) { + if (a.fix.range[1] <= b.fix.range[0]) { + return 1; + } else { + return -1; + } + }); + + // split into array of characters for easier manipulation + var chars = text.split(""); + + fixes.forEach(function(problem) { + var fix = problem.fix; + + if (fix.range[1] < lastFixPos) { + chars.splice(fix.range[0], fix.range[1] - fix.range[0], fix.text); + lastFixPos = fix.range[0]; + } else { + remainingMessages.push(problem); + } + }); + + return { + fixed: true, + messages: remainingMessages.sort(compareMessagesByLocation), + output: chars.join("") + }; + } else { + debug("No fixes to apply"); + return { + fixed: false, + messages: messages, + output: text + }; + } +}; + +module.exports = SourceCodeFixer; diff --git a/tools/eslint/lib/util/source-code.js b/tools/eslint/lib/util/source-code.js new file mode 100644 index 00000000000000..6ef0f91995561b --- /dev/null +++ b/tools/eslint/lib/util/source-code.js @@ -0,0 +1,288 @@ +/** + * @fileoverview Abstraction of JavaScript source code. + * @author Nicholas C. Zakas + * @copyright 2015 Nicholas C. Zakas. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; +/* eslint no-underscore-dangle: 0*/ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var createTokenStore = require("../token-store.js"), + estraverse = require("./estraverse"), + assign = require("object-assign"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * Validates that the given AST has the required information. + * @param {ASTNode} ast The Program node of the AST to check. + * @throws {Error} If the AST doesn't contain the correct information. + * @returns {void} + * @private + */ +function validate(ast) { + + if (!ast.tokens) { + throw new Error("AST is missing the tokens array."); + } + + if (!ast.comments) { + throw new Error("AST is missing the comments array."); + } + + if (!ast.loc) { + throw new Error("AST is missing location information."); + } + + if (!ast.range) { + throw new Error("AST is missing range information"); + } +} + +/** + * Finds a JSDoc comment node in an array of comment nodes. + * @param {ASTNode[]} comments The array of comment nodes to search. + * @param {int} line Line number to look around + * @returns {ASTNode} The node if found, null if not. + * @private + */ +function findJSDocComment(comments, line) { + + if (comments) { + for (var i = comments.length - 1; i >= 0; i--) { + if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") { + + if (line - comments[i].loc.end.line <= 1) { + return comments[i]; + } else { + break; + } + } + } + } + + return null; +} + +/** + * Check to see if its a ES6 export declaration + * @param {ASTNode} astNode - any node + * @returns {boolean} whether the given node represents a export declaration + * @private + */ +function looksLikeExport(astNode) { + return astNode.type === "ExportDefaultDeclaration" || astNode.type === "ExportNamedDeclaration" || + astNode.type === "ExportAllDeclaration" || astNode.type === "ExportSpecifier"; +} + + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Represents parsed source code. + * @param {string} text The source code text. + * @param {ASTNode} ast The Program node of the AST representing the code. + * @constructor + */ +function SourceCode(text, ast) { + + validate(ast); + + /** + * The original text source code. + * @type string + */ + this.text = text; + + /** + * The parsed AST for the source code. + * @type ASTNode + */ + this.ast = ast; + + /** + * The source code split into lines according to ECMA-262 specification. + * This is done to avoid each rule needing to do so separately. + * @type string[] + */ + this.lines = text.split(/\r\n|\r|\n|\u2028|\u2029/g); + + this.tokensAndComments = ast.tokens.concat(ast.comments).sort(function(left, right) { + return left.range[0] - right.range[0]; + }); + + // create token store methods + var tokenStore = createTokenStore(ast.tokens); + Object.keys(tokenStore).forEach(function(methodName) { + this[methodName] = tokenStore[methodName]; + }, this); + + var tokensAndCommentsStore = createTokenStore(this.tokensAndComments); + this.getTokenOrCommentBefore = tokensAndCommentsStore.getTokenBefore; + this.getTokenOrCommentAfter = tokensAndCommentsStore.getTokenAfter; + + // don't allow modification of this object + Object.freeze(this); + Object.freeze(this.lines); +} + +SourceCode.prototype = { + constructor: SourceCode, + + /** + * Gets the source code for the given node. + * @param {ASTNode=} node The AST node to get the text for. + * @param {int=} beforeCount The number of characters before the node to retrieve. + * @param {int=} afterCount The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + */ + getText: function(node, beforeCount, afterCount) { + if (node) { + return (this.text !== null) ? this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0), + node.range[1] + (afterCount || 0)) : null; + } else { + return this.text; + } + + }, + + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + */ + getLines: function() { + return this.lines; + }, + + /** + * Retrieves an array containing all comments in the source code. + * @returns {ASTNode[]} An array of comment nodes. + */ + getAllComments: function() { + return this.ast.comments; + }, + + /** + * Gets all comments for the given node. + * @param {ASTNode} node The AST node to get the comments for. + * @returns {Object} The list of comments indexed by their position. + * @public + */ + getComments: function(node) { + + var leadingComments = node.leadingComments || [], + trailingComments = node.trailingComments || []; + + /* + * espree adds a "comments" array on Program nodes rather than + * leadingComments/trailingComments. Comments are only left in the + * Program node comments array if there is no executable code. + */ + if (node.type === "Program") { + if (node.body.length === 0) { + leadingComments = node.comments; + } + } + + return { + leading: leadingComments, + trailing: trailingComments + }; + }, + + /** + * Retrieves the JSDoc comment for a given node. + * @param {ASTNode} node The AST node to get the comment for. + * @returns {ASTNode} The BlockComment node containing the JSDoc for the + * given node or null if not found. + * @public + */ + getJSDocComment: function(node) { + + var parent = node.parent, + line = node.loc.start.line; + + switch (node.type) { + case "FunctionDeclaration": + if (looksLikeExport(parent)) { + return findJSDocComment(parent.leadingComments, line); + } else { + return findJSDocComment(node.leadingComments, line); + } + break; + + case "ClassDeclaration": + return findJSDocComment(node.leadingComments, line); + + case "ClassExpression": + return findJSDocComment(parent.parent.leadingComments, line); + + case "ArrowFunctionExpression": + case "FunctionExpression": + + if (parent.type !== "CallExpression" && parent.type !== "NewExpression") { + while (parent && !parent.leadingComments && !/Function/.test(parent.type)) { + parent = parent.parent; + } + + return parent && (parent.type !== "FunctionDeclaration") ? findJSDocComment(parent.leadingComments, line) : null; + } + + // falls through + + default: + return null; + } + }, + + /** + * Gets the deepest node containing a range index. + * @param {int} index Range index of the desired node. + * @returns {ASTNode} The node if found or null if not found. + */ + getNodeByRangeIndex: function(index) { + var result = null; + + estraverse.traverse(this.ast, { + enter: function(node, parent) { + if (node.range[0] <= index && index < node.range[1]) { + result = assign({ parent: parent }, node); + } else { + this.skip(); + } + }, + leave: function(node) { + if (node === result) { + this.break(); + } + } + }); + + return result; + }, + + /** + * Determines if two tokens have at least one whitespace character + * between them. This completely disregards comments in making the + * determination, so comments count as zero-length substrings. + * @param {Token} first The token to check after. + * @param {Token} second The token to check before. + * @returns {boolean} True if there is only space between tokens, false + * if there is anything other than whitespace between tokens. + */ + isSpaceBetweenTokens: function(first, second) { + var text = this.text.slice(first.range[1], second.range[0]); + return /\s/.test(text.replace(/\/\*.*?\*\//g, "")); + } +}; + + +module.exports = SourceCode; diff --git a/tools/eslint/lib/util/traverse.js b/tools/eslint/lib/util/traverse.js deleted file mode 100644 index ba5520e341bb46..00000000000000 --- a/tools/eslint/lib/util/traverse.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @fileoverview Simple directory traversal logic. - * @author Nicholas C. Zakas - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -var fs = require("fs"), - path = require("path"), - debug = require("debug"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -debug = debug("eslint:traverse"); - -/** - * Walks a path recursively calling the callback on each file. - * @param {string} name The file or directory path. - * @param {string[]} extensions The file extensions that should cause the callback - * to be called. - * @param {Function} exclude The function to check if file/path should be excluded. - * @param {Function} callback The function to call on each file. - * @returns {void} - * @private - */ -function walk(name, extensions, exclude, callback) { - - var stat, basename; - - stat = fs.statSync(name); - - function traverse(dir, stack) { - stack.push(dir); - - fs.readdirSync(path.join.apply(path, stack)).forEach(function(file) { - var filePath, fileStat; - - // skip all hidded things (dirs, files, links) - if (file[0] === ".") { - return; - } - - filePath = path.join.apply(path, stack.concat([file])); - fileStat = fs.statSync(filePath); - - // if this file or directory is excluded from linting, skip over it. - if (exclude && exclude(filePath)) { - // console.log("Ignoring " + filePath); - debug("Ignoring " + filePath); - return; - } - - // only call callback for files with correct extensions - if (fileStat.isFile() && extensions.indexOf(path.extname(filePath)) > -1) { - callback(filePath); - } else if (fileStat.isDirectory()) { - traverse(file, stack); - } - }); - stack.pop(); - } - - basename = path.basename(name); - - // don't ignore cases like 'eslint ./' - if ((basename !== "." && basename !== ".." && basename[0] === ".") || - (exclude && exclude(name))) { - - debug("Ignoring " + name); - return; - } - - // always call callback for any files that are passed on the command line - if (stat.isFile()) { - callback(name); - } else { - traverse(name, []); - } -} - -/** - * Traverses multiple directories and calls a callback on each file. - * @param {Object} options The option for the traversal. - * param {string[]} options.files An array of file and directory paths to traverse. - * param {Function} options.exclude The function to check if file/path should be excluded. - * @param {Function} callback A function to call for each file. - * @returns {void} - */ -module.exports = function traverse(options, callback) { - - var files = options.files, - exclude = options.exclude, - extensions = options.extensions; - - files.forEach(function(file) { - walk(file, extensions, exclude, callback); - }); - -}; diff --git a/tools/eslint/node_modules/.bin/handlebars b/tools/eslint/node_modules/.bin/handlebars new file mode 120000 index 00000000000000..fb7d090fccaf28 --- /dev/null +++ b/tools/eslint/node_modules/.bin/handlebars @@ -0,0 +1 @@ +../handlebars/bin/handlebars \ No newline at end of file diff --git a/tools/eslint/node_modules/.bin/rimraf b/tools/eslint/node_modules/.bin/rimraf new file mode 120000 index 00000000000000..4cd49a49ddfc17 --- /dev/null +++ b/tools/eslint/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/tools/eslint/node_modules/.bin/shjs b/tools/eslint/node_modules/.bin/shjs new file mode 120000 index 00000000000000..a0449975bf894c --- /dev/null +++ b/tools/eslint/node_modules/.bin/shjs @@ -0,0 +1 @@ +../shelljs/bin/shjs \ No newline at end of file diff --git a/tools/eslint/node_modules/.bin/uglifyjs b/tools/eslint/node_modules/.bin/uglifyjs new file mode 120000 index 00000000000000..fef3468b6f6c6f --- /dev/null +++ b/tools/eslint/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/tools/eslint/node_modules/.bin/user-home b/tools/eslint/node_modules/.bin/user-home deleted file mode 120000 index d72d76bb49f555..00000000000000 --- a/tools/eslint/node_modules/.bin/user-home +++ /dev/null @@ -1 +0,0 @@ -../user-home/cli.js \ No newline at end of file diff --git a/tools/eslint/node_modules/align-text/LICENSE b/tools/eslint/node_modules/align-text/LICENSE new file mode 100644 index 00000000000000..65f90aca8c2fff --- /dev/null +++ b/tools/eslint/node_modules/align-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/eslint/node_modules/align-text/README.md b/tools/eslint/node_modules/align-text/README.md new file mode 100644 index 00000000000000..6b1f85c2e12737 --- /dev/null +++ b/tools/eslint/node_modules/align-text/README.md @@ -0,0 +1,236 @@ +# align-text [![NPM version](https://badge.fury.io/js/align-text.svg)](http://badge.fury.io/js/align-text) [![Build Status](https://travis-ci.org/jonschlinkert/align-text.svg)](https://travis-ci.org/jonschlinkert/align-text) + +> Align the text in a string. + +**Examples** + +Align text values in an array: + +```js +align([1, 2, 3, 100]); +//=> [' 1', ' 2', ' 3', '100'] +``` + +Or [do stuff like this](./example.js): + +[![screen shot 2015-06-09 at 2 08 34 am](https://cloud.githubusercontent.com/assets/383994/8051597/7b716fbc-0e4c-11e5-9aef-4493fd22db58.png)](./example.js) + +Visit [the example](./example.js) to see how this works. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i align-text --save +``` + +## Usage + +```js +var align = require('align-text'); +align(text, callback_function_or_integer); +``` + +**Params** + +* `text` can be a **string or array**. If a string is passed, a string will be returned. If an array is passed, an array will be returned. +* `callback|integer`: if an integer, the text will be indented by that amount. If a function, it must return an integer representing the amount of leading indentation to use as `align` loops over each line. + +**Example** + +```js +align(text, 4); +``` + +Would align: + +``` +abc +abc +abc +``` + +To: + +``` + abc + abc + abc +``` + +## callback + +### params + +The callback is used to determine the indentation of each line and gets the following params: + +* `len` the length of the "current" line +* `longest` the length of the longest line +* `line` the current line (string) being aligned +* `lines` the array of all lines + +### return + +The callback may return: + +* an integer that represents the number of spaces to use for padding, +* or an object with the following properties: + - `indent`: **{Number}** the amount of indentation to use. Default is `0` when an object is returned. + - `character`: **{String}** the character to use for indentation. Default is `''` (empty string) when an object is returned. + - `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty string) when an object is returned. + +**Integer example:** + +```js +// calculate half the difference between the length +// of the current line and the longest line +function centerAlign(len, longest, line, lines) { + return Math.floor((longest - len) / 2); +} +``` + +**Object example:** + +```js +function centerAlign(len, longest, line, lines) { + return { + character: '\t', + indent: Math.floor((longest - len) / 2), + prefix: '~ ', + } +} +``` + +## Usage examples + +### Center align + +Using the `centerAlign` function from above: + +```js +align(text, centerAlign); +``` + +Would align this text: + +```js +Lorem ipsum dolor sit amet +consectetur adipiscin +elit, sed do eiusmod tempor incididun +ut labore et dolor +magna aliqua. Ut enim ad mini +veniam, quis +``` + +Resulting in this: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing +elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +**Customize** + +If you wanted to add more padding on the left, just pass the number in the callback. + +For example, to add 4 spaces before every line: + +```js +function centerAlign(len, longest, line, lines) { + return 4 + Math.floor((longest - len) / 2); +} +``` + +Would result in: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing + elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +### Bullets + +```js +align(text, function (len, max, line, lines) { + return {prefix: ' - '}; +}); +``` + +Would return: + +``` +- Lorem ipsum dolor sit amet, +- consectetur adipiscing +- elit, sed do eiusmod tempor incididunt +- ut labore et dolore +- magna aliqua. Ut enim ad minim +- veniam, quis +``` + +### Different indent character + +```js +align(text, function (len, max, line, lines) { + return { + indent: Math.floor((max - len) / 2), + character: '~', + }; +}); +``` + +Would return + +``` +~~~~~Lorem ipsum dolor sit amet, +~~~~~~~~consectetur adipiscing +elit, sed do eiusmod tempor incididunt +~~~~~~~~~ut labore et dolore +~~~~magna aliqua. Ut enim ad minim +~~~~~~~~~~~~~veniam, quis +``` + +## Related projects + +* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string. +* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character +* [longest](https://github.com/jonschlinkert/longest): Get the longest item in an array. +* [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/align-text/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 09, 2015._ diff --git a/tools/eslint/node_modules/align-text/index.js b/tools/eslint/node_modules/align-text/index.js new file mode 100644 index 00000000000000..75902a3f3d84da --- /dev/null +++ b/tools/eslint/node_modules/align-text/index.js @@ -0,0 +1,52 @@ +/*! + * align-text + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var repeat = require('repeat-string'); +var longest = require('longest'); + +module.exports = function alignText(val, fn) { + var lines, type = typeOf(val); + + if (type === 'array') { + lines = val; + } else if (type === 'string') { + lines = val.split(/(?:\r\n|\n)/); + } else { + throw new TypeError('align-text expects a string or array.'); + } + + var fnType = typeOf(fn); + var len = lines.length; + var max = longest(lines); + var res = [], i = 0; + + while (len--) { + var line = String(lines[i++]); + var diff; + + if (fnType === 'function') { + diff = fn(line.length, max.length, line, lines, i); + } else if (fnType === 'number') { + diff = fn; + } else { + diff = max.length - line.length; + } + + if (typeOf(diff) === 'number') { + res.push(repeat(' ', diff) + line); + } else if (typeOf(diff) === 'object') { + var result = repeat(diff.character || ' ', diff.indent || 0); + res.push((diff.prefix || '') + result + line); + } + } + + if (type === 'array') return res; + return res.join('\n'); +}; diff --git a/tools/eslint/node_modules/align-text/package.json b/tools/eslint/node_modules/align-text/package.json new file mode 100644 index 00000000000000..e0e0b9c7ff6244 --- /dev/null +++ b/tools/eslint/node_modules/align-text/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "align-text@^0.1.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/center-align" + ] + ], + "_from": "align-text@>=0.1.0 <0.2.0", + "_id": "align-text@0.1.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/align-text", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "align-text", + "raw": "align-text@^0.1.0", + "rawSpec": "^0.1.0", + "scope": null, + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/center-align", + "/eslint/right-align" + ], + "_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz", + "_shasum": "72db3983872eec2313919c9426a993a41afe93f7", + "_shrinkwrap": null, + "_spec": "align-text@^0.1.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/center-align", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/align-text/issues" + }, + "dependencies": { + "kind-of": "^2.0.0", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "description": "Align the text in a string.", + "devDependencies": { + "mocha": "*", + "should": "*", + "word-wrap": "^1.0.3" + }, + "directories": {}, + "dist": { + "shasum": "72db3983872eec2313919c9426a993a41afe93f7", + "tarball": "http://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "11c2e834ff2c63f9844bddf189fea5cab921e44d", + "homepage": "https://github.com/jonschlinkert/align-text", + "keywords": [ + "align", + "align-center", + "alignment", + "center", + "center-align", + "indent", + "pad", + "padding", + "right", + "right-align", + "text", + "typography" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "align-text", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/align-text.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.3" +} diff --git a/tools/eslint/node_modules/amdefine/LICENSE b/tools/eslint/node_modules/amdefine/LICENSE new file mode 100644 index 00000000000000..af46c6df3a1464 --- /dev/null +++ b/tools/eslint/node_modules/amdefine/LICENSE @@ -0,0 +1,58 @@ +amdefine is released under two licenses: new BSD, and MIT. You may pick the +license that best suits your development needs. The text of both licenses are +provided below. + + +The "New" BSD License: +---------------------- + +Copyright (c) 2011-2015, The Dojo Foundation +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 Dojo Foundation 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. + + + +MIT License +----------- + +Copyright (c) 2011-2015, The Dojo Foundation + +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/eslint/node_modules/amdefine/README.md b/tools/eslint/node_modules/amdefine/README.md new file mode 100644 index 00000000000000..037a6e817e3286 --- /dev/null +++ b/tools/eslint/node_modules/amdefine/README.md @@ -0,0 +1,171 @@ +# amdefine + +A module that can be used to implement AMD's define() in Node. This allows you +to code to the AMD API and have the module work in node programs without +requiring those other programs to use AMD. + +## Usage + +**1)** Update your package.json to indicate amdefine as a dependency: + +```javascript + "dependencies": { + "amdefine": ">=0.1.0" + } +``` + +Then run `npm install` to get amdefine into your project. + +**2)** At the top of each module that uses define(), place this code: + +```javascript +if (typeof define !== 'function') { var define = require('amdefine')(module) } +``` + +**Only use these snippets** when loading amdefine. If you preserve the basic structure, +with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). + +You can add spaces, line breaks and even require amdefine with a local path, but +keep the rest of the structure to get the stripping behavior. + +As you may know, because `if` statements in JavaScript don't have their own scope, the var +declaration in the above snippet is made whether the `if` expression is truthy or not. If +RequireJS is loaded then the declaration is superfluous because `define` is already already +declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` +declarations of the same variable in the same scope gracefully. + +If you want to deliver amdefine.js with your code rather than specifying it as a dependency +with npm, then just download the latest release and refer to it using a relative path: + +[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) + +### amdefine/intercept + +Consider this very experimental. + +Instead of pasting the piece of text for the amdefine setup of a `define` +variable in each module you create or consume, you can use `amdefine/intercept` +instead. It will automatically insert the above snippet in each .js file loaded +by Node. + +**Warning**: you should only use this if you are creating an application that +is consuming AMD style defined()'d modules that are distributed via npm and want +to run that code in Node. + +For library code where you are not sure if it will be used by others in Node or +in the browser, then explicitly depending on amdefine and placing the code +snippet above is suggested path, instead of using `amdefine/intercept`. The +intercept module affects all .js files loaded in the Node app, and it is +inconsiderate to modify global state like that unless you are also controlling +the top level app. + +#### Why distribute AMD-style modules via npm? + +npm has a lot of weaknesses for front-end use (installed layout is not great, +should have better support for the `baseUrl + moduleID + '.js' style of loading, +single file JS installs), but some people want a JS package manager and are +willing to live with those constraints. If that is you, but still want to author +in AMD style modules to get dynamic require([]), better direct source usage and +powerful loader plugin support in the browser, then this tool can help. + +#### amdefine/intercept usage + +Just require it in your top level app module (for example index.js, server.js): + +```javascript +require('amdefine/intercept'); +``` + +The module does not return a value, so no need to assign the result to a local +variable. + +Then just require() code as you normally would with Node's require(). Any .js +loaded after the intercept require will have the amdefine check injected in +the .js source as it is loaded. It does not modify the source on disk, just +prepends some content to the text of the module as it is loaded by Node. + +#### How amdefine/intercept works + +It overrides the `Module._extensions['.js']` in Node to automatically prepend +the amdefine snippet above. So, it will affect any .js file loaded by your +app. + +## define() usage + +It is best if you use the anonymous forms of define() in your module: + +```javascript +define(function (require) { + var dependency = require('dependency'); +}); +``` + +or + +```javascript +define(['dependency'], function (dependency) { + +}); +``` + +## RequireJS optimizer integration. + +Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) +will have support for stripping the `if (typeof define !== 'function')` check +mentioned above, so you can include this snippet for code that runs in the +browser, but avoid taking the cost of the if() statement once the code is +optimized for deployment. + +## Node 0.4 Support + +If you want to support Node 0.4, then add `require` as the second parameter to amdefine: + +```javascript +//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. +if (typeof define !== 'function') { var define = require('amdefine')(module, require) } +``` + +## Limitations + +### Synchronous vs Asynchronous + +amdefine creates a define() function that is callable by your code. It will +execute and trace dependencies and call the factory function *synchronously*, +to keep the behavior in line with Node's synchronous dependency tracing. + +The exception: calling AMD's callback-style require() from inside a factory +function. The require callback is called on process.nextTick(): + +```javascript +define(function (require) { + require(['a'], function(a) { + //'a' is loaded synchronously, but + //this callback is called on process.nextTick(). + }); +}); +``` + +### Loader Plugins + +Loader plugins are supported as long as they call their load() callbacks +synchronously. So ones that do network requests will not work. However plugins +like [text](http://requirejs.org/docs/api.html#text) can load text files locally. + +The plugin API's `load.fromText()` is **not supported** in amdefine, so this means +transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) +will not work. This may be fixable, but it is a bit complex, and I do not have +enough node-fu to figure it out yet. See the source for amdefine.js if you want +to get an idea of the issues involved. + +## Tests + +To run the tests, cd to **tests** and run: + +``` +node all.js +node all-intercept.js +``` + +## License + +New BSD and MIT. Check the LICENSE file for all the details. diff --git a/tools/eslint/node_modules/amdefine/amdefine.js b/tools/eslint/node_modules/amdefine/amdefine.js new file mode 100644 index 00000000000000..0c4a954a1d3b01 --- /dev/null +++ b/tools/eslint/node_modules/amdefine/amdefine.js @@ -0,0 +1,301 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 1.0.0 Copyright (c) 2011-2015, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + if (callback) { + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; diff --git a/tools/eslint/node_modules/amdefine/intercept.js b/tools/eslint/node_modules/amdefine/intercept.js new file mode 100644 index 00000000000000..771a98301fbf21 --- /dev/null +++ b/tools/eslint/node_modules/amdefine/intercept.js @@ -0,0 +1,36 @@ +/*jshint node: true */ +var inserted, + Module = require('module'), + fs = require('fs'), + existingExtFn = Module._extensions['.js'], + amdefineRegExp = /amdefine\.js/; + +inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; + +//From the node/lib/module.js source: +function stripBOM(content) { + // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + // because the buffer-to-string conversion in `fs.readFileSync()` + // translates it to FEFF, the UTF-16 BOM. + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +//Also adapted from the node/lib/module.js source: +function intercept(module, filename) { + var content = stripBOM(fs.readFileSync(filename, 'utf8')); + + if (!amdefineRegExp.test(module.id)) { + content = inserted + content; + } + + module._compile(content, filename); +} + +intercept._id = 'amdefine/intercept'; + +if (!existingExtFn._id || existingExtFn._id !== intercept._id) { + Module._extensions['.js'] = intercept; +} diff --git a/tools/eslint/node_modules/amdefine/package.json b/tools/eslint/node_modules/amdefine/package.json new file mode 100644 index 00000000000000..75392136afd3df --- /dev/null +++ b/tools/eslint/node_modules/amdefine/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "amdefine@>=0.0.4", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/source-map" + ] + ], + "_from": "amdefine@>=0.0.4", + "_id": "amdefine@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/amdefine", + "_nodeVersion": "0.10.36", + "_npmUser": { + "email": "jrburke@gmail.com", + "name": "jrburke" + }, + "_npmVersion": "2.12.1", + "_phantomChildren": {}, + "_requested": { + "name": "amdefine", + "raw": "amdefine@>=0.0.4", + "rawSpec": ">=0.0.4", + "scope": null, + "spec": ">=0.0.4", + "type": "range" + }, + "_requiredBy": [ + "/eslint/source-map" + ], + "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", + "_shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33", + "_shrinkwrap": null, + "_spec": "amdefine@>=0.0.4", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/source-map", + "author": { + "email": "jrburke@gmail.com", + "name": "James Burke", + "url": "http://github.com/jrburke" + }, + "bugs": { + "url": "https://github.com/jrburke/amdefine/issues" + }, + "dependencies": {}, + "description": "Provide AMD's define() API for declaring modules in the AMD format", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33", + "tarball": "http://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" + }, + "engines": { + "node": ">=0.4.2" + }, + "gitHead": "578bc4a3f7dede33f3f3e10edde0c1607005d761", + "homepage": "http://github.com/jrburke/amdefine", + "license": "BSD-3-Clause AND MIT", + "main": "./amdefine.js", + "maintainers": [ + { + "name": "jrburke", + "email": "jrburke@gmail.com" + } + ], + "name": "amdefine", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jrburke/amdefine.git" + }, + "scripts": {}, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/ansi-escapes/index.js b/tools/eslint/node_modules/ansi-escapes/index.js new file mode 100644 index 00000000000000..6bc26c82a2812f --- /dev/null +++ b/tools/eslint/node_modules/ansi-escapes/index.js @@ -0,0 +1,79 @@ +'use strict'; +var ESC = '\u001b['; +var x = module.exports; + +x.cursorTo = function (x, y) { + if (arguments.length === 0) { + return ESC + 'H'; + } + + if (arguments.length === 1) { + return ESC + (x + 1) + 'G'; + } + + return ESC + (y + 1) + ';' + (x + 1) + 'H'; +}; + +x.cursorMove = function (x, y) { + var ret = ''; + + if (x < 0) { + ret += ESC + (-x) + 'D'; + } else if (x > 0) { + ret += ESC + x + 'C'; + } + + if (y < 0) { + ret += ESC + (-y) + 'A'; + } else if (y > 0) { + ret += ESC + y + 'B'; + } + + return ret; +}; + +x.cursorUp = function (count) { + return ESC + (typeof count === 'number' ? count : 1) + 'A'; +}; + +x.cursorDown = function (count) { + return ESC + (typeof count === 'number' ? count : 1) + 'B'; +}; + +x.cursorForward = function (count) { + return ESC + (typeof count === 'number' ? count : 1) + 'C'; +}; + +x.cursorBackward = function (count) { + return ESC + (typeof count === 'number' ? count : 1) + 'D'; +}; + +x.cursorLeft = ESC + '1000D'; +x.cursorSavePosition = ESC + 's'; +x.cursorRestorePosition = ESC + 'u'; +x.cursorGetPosition = ESC + '6n'; +x.cursorNextLine = ESC + 'E'; +x.cursorPrevLine = ESC + 'F'; +x.cursorHide = ESC + '?25l'; +x.cursorShow = ESC + '?25h'; + +x.eraseLines = function (count) { + var clear = ''; + + for (var i = 0; i < count; i++) { + clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : ''); + } + + return clear; +}; + +x.eraseEndLine = ESC + 'K'; +x.eraseStartLine = ESC + '1K'; +x.eraseLine = ESC + '2K'; +x.eraseDown = ESC + 'J'; +x.eraseUp = ESC + '1J'; +x.eraseScreen = ESC + '2J'; +x.scrollUp = ESC + 'S'; +x.scrollDown = ESC + 'T'; + +x.beep = '\u0007'; diff --git a/tools/eslint/node_modules/chalk/node_modules/ansi-styles/license b/tools/eslint/node_modules/ansi-escapes/license similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/ansi-styles/license rename to tools/eslint/node_modules/ansi-escapes/license diff --git a/tools/eslint/node_modules/ansi-escapes/package.json b/tools/eslint/node_modules/ansi-escapes/package.json new file mode 100644 index 00000000000000..08882e58dbddd4 --- /dev/null +++ b/tools/eslint/node_modules/ansi-escapes/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "ansi-escapes@^1.1.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer" + ] + ], + "_from": "ansi-escapes@>=1.1.0 <2.0.0", + "_id": "ansi-escapes@1.1.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/ansi-escapes", + "_nodeVersion": "4.2.4", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-escapes", + "raw": "ansi-escapes@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/inquirer" + ], + "_resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.1.1.tgz", + "_shasum": "cc9c0b193ac4c2b99a19f9b9fbc18ff5edd1d0a8", + "_shrinkwrap": null, + "_spec": "ansi-escapes@^1.1.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ansi-escapes/issues" + }, + "dependencies": {}, + "description": "ANSI escape codes for manipulating the terminal", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "cc9c0b193ac4c2b99a19f9b9fbc18ff5edd1d0a8", + "tarball": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "3dff027c48a59a377ed44b6d942b1b4f007c326f", + "homepage": "https://github.com/sindresorhus/ansi-escapes", + "keywords": [ + "ansi", + "cli", + "code", + "codes", + "command-line", + "console", + "control", + "cursor", + "escape", + "escapes", + "formatting", + "log", + "logging", + "sequence", + "shell", + "string", + "terminal", + "text", + "tty", + "vt100", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-escapes", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ansi-escapes.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.1" +} diff --git a/tools/eslint/node_modules/ansi-escapes/readme.md b/tools/eslint/node_modules/ansi-escapes/readme.md new file mode 100644 index 00000000000000..54762b7f240f8f --- /dev/null +++ b/tools/eslint/node_modules/ansi-escapes/readme.md @@ -0,0 +1,132 @@ +# ansi-escapes [![Build Status](https://travis-ci.org/sindresorhus/ansi-escapes.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-escapes) + +> [ANSI escape codes](http://www.termsys.demon.co.uk/vtansi.htm) for manipulating the terminal + + +## Install + +``` +$ npm install --save ansi-escapes +``` + + +## Usage + +```js +var ansiEscapes = require('ansi-escapes'); + +// moves the cursor two rows up and to the left +process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft); +//=> '\u001b[2A\u001b[1000D' +``` + + +## API + +### cursorTo([x, [y]]) + +Set the absolute position of the cursor. `x0` `y0` is the top left of the screen. + +Specify either both `x` & `y`, only `x`, or nothing. + +### cursorMove(x, [y]) + +Set the position of the cursor relative to its current position. + +### cursorUp(count) + +Move cursor up a specific amount of rows. Default is `1`. + +### cursorDown(count) + +Move cursor down a specific amount of rows. Default is `1`. + +### cursorForward(count) + +Move cursor forward a specific amount of rows. Default is `1`. + +### cursorBackward(count) + +Move cursor backward a specific amount of rows. Default is `1`. + +### cursorLeft + +Move cursor to the left side. + +### cursorSavePosition + +Save cursor position. + +### cursorRestorePosition + +Restore saved cursor position. + +### cursorGetPosition + +Get cursor position. + +### cursorNextLine + +Move cursor to the next line. + +### cursorPrevLine + +Move cursor to the previous line. + +### cursorHide + +Hide cursor. + +### cursorShow + +Show cursor. + +### eraseLines(count) + +Erase from the current cursor position up the specified amount of rows. + +### eraseEndLine + +Erase from the current cursor position to the end of the current line. + +### eraseStartLine + +Erase from the current cursor position to the start of the current line. + +### eraseLine + +Erase the entire current line. + +### eraseDown + +Erase the screen from the current line down to the bottom of the screen. + +### eraseUp + +Erase the screen from the current line up to the top of the screen. + +### eraseScreen + +Erase the screen and move the cursor the top left position. + +### scrollUp + +Scroll display up one line. + +### scrollDown + +Scroll display down one line. + +### beep + +Output a beeping sound. + + +## Related + +- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/ansi-regex/index.js b/tools/eslint/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..4906755bc93573 --- /dev/null +++ b/tools/eslint/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/tools/eslint/node_modules/chalk/node_modules/has-ansi/license b/tools/eslint/node_modules/ansi-regex/license similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/has-ansi/license rename to tools/eslint/node_modules/ansi-regex/license diff --git a/tools/eslint/node_modules/ansi-regex/package.json b/tools/eslint/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..229a24c2d4c2d2 --- /dev/null +++ b/tools/eslint/node_modules/ansi-regex/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + "ansi-regex@^2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/has-ansi" + ] + ], + "_from": "ansi-regex@>=2.0.0 <3.0.0", + "_id": "ansi-regex@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/ansi-regex", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-regex", + "raw": "ansi-regex@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/has-ansi", + "/eslint/inquirer", + "/eslint/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "_shrinkwrap": null, + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/has-ansi", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f", + "homepage": "https://github.com/sindresorhus/ansi-regex", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "find", + "formatting", + "match", + "pattern", + "re", + "regex", + "regexp", + "rgb", + "shell", + "string", + "styles", + "terminal", + "test", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ansi-regex.git" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "version": "2.0.0" +} diff --git a/tools/eslint/node_modules/ansi-regex/readme.md b/tools/eslint/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000000000..1a4894ec1110e3 --- /dev/null +++ b/tools/eslint/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var 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'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/ansi-styles/index.js b/tools/eslint/node_modules/ansi-styles/index.js new file mode 100644 index 00000000000000..78945278f78a72 --- /dev/null +++ b/tools/eslint/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license b/tools/eslint/node_modules/ansi-styles/license similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license rename to tools/eslint/node_modules/ansi-styles/license diff --git a/tools/eslint/node_modules/ansi-styles/package.json b/tools/eslint/node_modules/ansi-styles/package.json new file mode 100644 index 00000000000000..b462cc504856c3 --- /dev/null +++ b/tools/eslint/node_modules/ansi-styles/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "ansi-styles@^2.1.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk" + ] + ], + "_from": "ansi-styles@>=2.1.0 <3.0.0", + "_id": "ansi-styles@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/ansi-styles", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "jappelman@xebia.com", + "name": "jbnicolai" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-styles", + "raw": "ansi-styles@^2.1.0", + "rawSpec": "^2.1.0", + "scope": null, + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz", + "_shasum": "990f747146927b559a932bf92959163d60c0d0e2", + "_shrinkwrap": null, + "_spec": "ansi-styles@^2.1.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": {}, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "990f747146927b559a932bf92959163d60c0d0e2", + "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "18421cbe4a2d93359ec2599a894f704be126d066", + "homepage": "https://github.com/chalk/ansi-styles", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "log", + "logging", + "rgb", + "shell", + "string", + "styles", + "terminal", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "ansi-styles", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.1.0" +} diff --git a/tools/eslint/node_modules/ansi-styles/readme.md b/tools/eslint/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000000000..3f933f6162e58e --- /dev/null +++ b/tools/eslint/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/LICENSE b/tools/eslint/node_modules/argparse/LICENSE similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/LICENSE rename to tools/eslint/node_modules/argparse/LICENSE diff --git a/tools/eslint/node_modules/argparse/README.md b/tools/eslint/node_modules/argparse/README.md new file mode 100644 index 00000000000000..1f84bf293de65f --- /dev/null +++ b/tools/eslint/node_modules/argparse/README.md @@ -0,0 +1,241 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js. Javascript port of python's +[argparse](http://docs.python.org/dev/library/argparse.html) module +(original version 3.2). That's a full port, except some very rare options, +recorded in issue tracker. + +**NB. Difference with original.** + +- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). +- Use `defaultValue` instead of `default`. + + +Example +======= + +test.js file: + +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse example' +}); +parser.addArgument( + [ '-f', '--foo' ], + { + help: 'foo bar' + } +); +parser.addArgument( + [ '-b', '--bar' ], + { + help: 'bar foo' + } +); +var args = parser.parseArgs(); +console.dir(args); +``` + +Display help: + +``` +$ ./test.js -h +usage: example.js [-h] [-v] [-f FOO] [-b BAR] + +Argparse example + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 +{ foo: '3', bar: '4' } +``` + +More [examples](https://github.com/nodeca/argparse/tree/master/examples). + + +ArgumentParser objects +====================== + +``` +new ArgumentParser({paramters hash}); +``` + +Creates a new ArgumentParser object. + +**Supported params:** + +- ```description``` - Text to display before the argument help. +- ```epilog``` - Text to display after the argument help. +- ```addHelp``` - Add a -h/–help option to the parser. (default: true) +- ```argumentDefault``` - Set the global default value for arguments. (default: null) +- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. +- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) +- ```formatterClass``` - A class for customizing the help output. +- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) +- ```usage``` - The string describing the program usage (default: generated) +- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. + +**Not supportied yet** + +- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. + + +Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) + + +addArgument() method +==================== + +``` +ArgumentParser.addArgument([names or flags], {options}) +``` + +Defines how a single command-line argument should be parsed. + +- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo. + +Options: + +- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. +- ```nargs```- The number of command-line arguments that should be consumed. +- ```constant``` - A constant value required by some action and nargs selections. +- ```defaultValue``` - The value produced if the argument is absent from the command line. +- ```type``` - The type to which the command-line argument should be converted. +- ```choices``` - A container of the allowable values for the argument. +- ```required``` - Whether or not the command-line option may be omitted (optionals only). +- ```help``` - A brief description of what the argument does. +- ```metavar``` - A name for the argument in usage messages. +- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). + +Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) + + +Action (some details) +================ + +ArgumentParser objects associate command-line arguments with actions. +These actions can do just about anything with the command-line arguments associated +with them, though most actions simply add an attribute to the object returned by +parseArgs(). The action keyword argument specifies how the command-line arguments +should be handled. The supported actions are: + +- ```store``` - Just stores the argument’s value. This is the default action. +- ```storeConst``` - Stores value, specified by the const keyword argument. + (Note that the const keyword argument defaults to the rather unhelpful None.) + The 'storeConst' action is most commonly used with optional arguments, that + specify some sort of flag. +- ```storeTrue``` and ```storeFalse``` - Stores values True and False + respectively. These are special cases of 'storeConst'. +- ```append``` - Stores a list, and appends each argument value to the list. + This is useful to allow an option to be specified multiple times. +- ```appendConst``` - Stores a list, and appends value, specified by the + const keyword argument to the list. (Note, that the const keyword argument defaults + is None.) The 'appendConst' action is typically used when multiple arguments need + to store constants to the same list. +- ```count``` - Counts the number of times a keyword argument occurs. For example, + used for increasing verbosity levels. +- ```help``` - Prints a complete help message for all the options in the current + parser and then exits. By default a help action is automatically added to the parser. + See ArgumentParser for details of how the output is created. +- ```version``` - Prints version information and exit. Expects a `version=` + keyword argument in the addArgument() call. + +Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) + + +Sub-commands +============ + +ArgumentParser.addSubparsers() + +Many programs split their functionality into a number of sub-commands, for +example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, +and `svn commit`. Splitting up functionality this way can be a particularly good +idea when a program performs several different functions which require different +kinds of command-line arguments. `ArgumentParser` supports creation of such +sub-commands with `addSubparsers()` method. The `addSubparsers()` method is +normally called with no arguments and returns an special action object. +This object has a single method `addParser()`, which takes a command name and +any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object +that can be modified as usual. + +Example: + +sub_commands.js +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse examples: sub-commands', +}); + +var subparsers = parser.addSubparsers({ + title:'subcommands', + dest:"subcommand_name" +}); + +var bar = subparsers.addParser('c1', {addHelp:true}); +bar.addArgument( + [ '-f', '--foo' ], + { + action: 'store', + help: 'foo3 bar3' + } +); +var bar = subparsers.addParser( + 'c2', + {aliases:['co'], addHelp:true} +); +bar.addArgument( + [ '-b', '--bar' ], + { + action: 'store', + type: 'int', + help: 'foo3 bar3' + } +); + +var args = parser.parseArgs(); +console.dir(args); + +``` + +Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) + + +Contributors +============ + +- [Eugene Shkuropat](https://github.com/shkuropat) +- [Paul Jacobson](https://github.com/hpaulj) + +[others](https://github.com/nodeca/argparse/graphs/contributors) + +License +======= + +Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). +Released under the MIT license. See +[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/index.js b/tools/eslint/node_modules/argparse/index.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/index.js rename to tools/eslint/node_modules/argparse/index.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action.js b/tools/eslint/node_modules/argparse/lib/action.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action.js rename to tools/eslint/node_modules/argparse/lib/action.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/append.js b/tools/eslint/node_modules/argparse/lib/action/append.js similarity index 99% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/append.js rename to tools/eslint/node_modules/argparse/lib/action/append.js index 48c6dbe30de5d6..79df02e579b0f5 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +++ b/tools/eslint/node_modules/argparse/lib/action/append.js @@ -51,5 +51,3 @@ ActionAppend.prototype.call = function (parser, namespace, values) { items.push(values); namespace.set(this.dest, items); }; - - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js b/tools/eslint/node_modules/argparse/lib/action/append/constant.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js rename to tools/eslint/node_modules/argparse/lib/action/append/constant.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/count.js b/tools/eslint/node_modules/argparse/lib/action/count.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/count.js rename to tools/eslint/node_modules/argparse/lib/action/count.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/help.js b/tools/eslint/node_modules/argparse/lib/action/help.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/help.js rename to tools/eslint/node_modules/argparse/lib/action/help.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store.js b/tools/eslint/node_modules/argparse/lib/action/store.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store.js rename to tools/eslint/node_modules/argparse/lib/action/store.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js b/tools/eslint/node_modules/argparse/lib/action/store/constant.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js rename to tools/eslint/node_modules/argparse/lib/action/store/constant.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js b/tools/eslint/node_modules/argparse/lib/action/store/false.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js rename to tools/eslint/node_modules/argparse/lib/action/store/false.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js b/tools/eslint/node_modules/argparse/lib/action/store/true.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js rename to tools/eslint/node_modules/argparse/lib/action/store/true.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js b/tools/eslint/node_modules/argparse/lib/action/subparsers.js similarity index 99% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js rename to tools/eslint/node_modules/argparse/lib/action/subparsers.js index 257714d40e0e3f..45f034564c08df 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +++ b/tools/eslint/node_modules/argparse/lib/action/subparsers.js @@ -144,5 +144,3 @@ ActionSubparsers.prototype.call = function (parser, namespace, values) { // parse all the remaining options into the namespace parser.parseArgs(argStrings, namespace); }; - - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/version.js b/tools/eslint/node_modules/argparse/lib/action/version.js similarity index 99% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/version.js rename to tools/eslint/node_modules/argparse/lib/action/version.js index a17877c0bacc3c..cf262408f197a4 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +++ b/tools/eslint/node_modules/argparse/lib/action/version.js @@ -45,6 +45,3 @@ ActionVersion.prototype.call = function (parser) { formatter.addText(version); parser.exit(0, formatter.formatHelp()); }; - - - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action_container.js b/tools/eslint/node_modules/argparse/lib/action_container.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/action_container.js rename to tools/eslint/node_modules/argparse/lib/action_container.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argparse.js b/tools/eslint/node_modules/argparse/lib/argparse.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argparse.js rename to tools/eslint/node_modules/argparse/lib/argparse.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js b/tools/eslint/node_modules/argparse/lib/argument/error.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js rename to tools/eslint/node_modules/argparse/lib/argument/error.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js b/tools/eslint/node_modules/argparse/lib/argument/exclusive.js similarity index 99% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js rename to tools/eslint/node_modules/argparse/lib/argument/exclusive.js index 8287e00d0464f3..deaca28b8303dc 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +++ b/tools/eslint/node_modules/argparse/lib/argument/exclusive.js @@ -51,4 +51,3 @@ MutuallyExclusiveGroup.prototype._removeAction = function (action) { this._container._removeAction(action); this._groupActions.remove(action); }; - diff --git a/tools/eslint/node_modules/argparse/lib/argument/group.js b/tools/eslint/node_modules/argparse/lib/argument/group.js new file mode 100644 index 00000000000000..ad7693869bc4e5 --- /dev/null +++ b/tools/eslint/node_modules/argparse/lib/argument/group.js @@ -0,0 +1,74 @@ +/** internal + * class ArgumentGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments” and “optional arguments” + * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ActionContainer = require('../action_container'); + + +/** + * new ArgumentGroup(container, options) + * - container (object): main container + * - options (object): hash of group options + * + * #### options + * - **prefixChars** group name prefix + * - **argumentDefault** default argument value + * - **title** group title + * - **description** group description + * + **/ +var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { + + options = options || {}; + + // add any missing keyword arguments by checking the container + options.conflictHandler = (options.conflictHandler || container.conflictHandler); + options.prefixChars = (options.prefixChars || container.prefixChars); + options.argumentDefault = (options.argumentDefault || container.argumentDefault); + + ActionContainer.call(this, options); + + // group attributes + this.title = options.title; + this._groupActions = []; + + // share most attributes with the container + this._container = container; + this._registries = container._registries; + this._actions = container._actions; + this._optionStringActions = container._optionStringActions; + this._defaults = container._defaults; + this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; + this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; +}; +util.inherits(ArgumentGroup, ActionContainer); + + +ArgumentGroup.prototype._addAction = function (action) { + // Parent add action + action = ActionContainer.prototype._addAction.call(this, action); + this._groupActions.push(action); + return action; +}; + + +ArgumentGroup.prototype._removeAction = function (action) { + // Parent remove action + ActionContainer.prototype._removeAction.call(this, action); + var actionIndex = this._groupActions.indexOf(action); + if (actionIndex >= 0) { + this._groupActions.splice(actionIndex, 1); + } +}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js b/tools/eslint/node_modules/argparse/lib/argument_parser.js similarity index 99% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js rename to tools/eslint/node_modules/argparse/lib/argument_parser.js index 2b4cee395eb8f3..c429ca929b1a1c 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +++ b/tools/eslint/node_modules/argparse/lib/argument_parser.js @@ -53,6 +53,9 @@ var Namespace = require('./namespace'); * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects **/ var ArgumentParser = module.exports = function ArgumentParser(options) { + if (!(this instanceof ArgumentParser)) { + return new ArgumentParser(options); + } var self = this; options = options || {}; @@ -738,9 +741,8 @@ ArgumentParser.prototype._parseOptional = function (argString) { // if the option string before the "=" is present, return the action if (argString.indexOf('=') >= 0) { - var argStringSplit = argString.split('='); - optionString = argStringSplit[0]; - argExplicit = argStringSplit[1]; + optionString = argString.split('=', 1)[0]; + argExplicit = argString.slice(optionString.length + 1); if (!!this._optionStringActions[optionString]) { action = this._optionStringActions[optionString]; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/const.js b/tools/eslint/node_modules/argparse/lib/const.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/const.js rename to tools/eslint/node_modules/argparse/lib/const.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js b/tools/eslint/node_modules/argparse/lib/help/added_formatters.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js rename to tools/eslint/node_modules/argparse/lib/help/added_formatters.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js b/tools/eslint/node_modules/argparse/lib/help/formatter.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js rename to tools/eslint/node_modules/argparse/lib/help/formatter.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/namespace.js b/tools/eslint/node_modules/argparse/lib/namespace.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/namespace.js rename to tools/eslint/node_modules/argparse/lib/namespace.js diff --git a/tools/eslint/node_modules/argparse/package.json b/tools/eslint/node_modules/argparse/package.json new file mode 100644 index 00000000000000..2ad636b89cabcb --- /dev/null +++ b/tools/eslint/node_modules/argparse/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + "argparse@^1.0.2", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/js-yaml" + ] + ], + "_from": "argparse@>=1.0.2 <2.0.0", + "_id": "argparse@1.0.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/argparse", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "vitaly@rcdesign.ru", + "name": "vitaly" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "argparse", + "raw": "argparse@^1.0.2", + "rawSpec": "^1.0.2", + "scope": null, + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.3.tgz", + "_shasum": "14389deeb0c28fc4cda9405b9f532a4e3785ce84", + "_shrinkwrap": null, + "_spec": "argparse@^1.0.2", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/js-yaml", + "bugs": { + "url": "https://github.com/nodeca/argparse/issues" + }, + "contributors": [ + { + "name": "Eugene Shkuropat" + }, + { + "name": "Paul Jacobson" + } + ], + "dependencies": { + "lodash": ">= 3.2.0 < 4.0.0", + "sprintf-js": "~1.0.2" + }, + "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "14389deeb0c28fc4cda9405b9f532a4e3785ce84", + "tarball": "http://registry.npmjs.org/argparse/-/argparse-1.0.3.tgz" + }, + "gitHead": "e46e471f113ba31074c0d0c156f93fd7a618b27c", + "homepage": "https://github.com/nodeca/argparse", + "keywords": [ + "argparse", + "args", + "cli", + "option", + "parser" + ], + "license": "MIT", + "maintainers": [ + { + "name": "vitaly", + "email": "vitaly@rcdesign.ru" + } + ], + "name": "argparse", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/argparse.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.0.3" +} diff --git a/tools/eslint/node_modules/array-union/index.js b/tools/eslint/node_modules/array-union/index.js new file mode 100644 index 00000000000000..e33f38a1eb4acd --- /dev/null +++ b/tools/eslint/node_modules/array-union/index.js @@ -0,0 +1,6 @@ +'use strict'; +var arrayUniq = require('array-uniq'); + +module.exports = function () { + return arrayUniq([].concat.apply([], arguments)); +}; diff --git a/tools/eslint/node_modules/array-union/package.json b/tools/eslint/node_modules/array-union/package.json new file mode 100644 index 00000000000000..1f5d2a9b772d97 --- /dev/null +++ b/tools/eslint/node_modules/array-union/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "array-union@^1.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby" + ] + ], + "_from": "array-union@>=1.0.1 <2.0.0", + "_id": "array-union@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/array-union", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.1.5", + "_phantomChildren": {}, + "_requested": { + "name": "array-union", + "raw": "array-union@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/globby" + ], + "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz", + "_shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2", + "_shrinkwrap": null, + "_spec": "array-union@^1.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-union/issues" + }, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "description": "Create an array of unique values, in order, from the input arrays", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2", + "tarball": "http://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d0e72cc6fbff57273032e45050c51ff44c8e137c", + "homepage": "https://github.com/sindresorhus/array-union", + "keywords": [ + "arr", + "array", + "combine", + "duplicate", + "merge", + "remove", + "set", + "union", + "uniq", + "unique" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-union", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-union.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.1" +} diff --git a/tools/eslint/node_modules/array-union/readme.md b/tools/eslint/node_modules/array-union/readme.md new file mode 100644 index 00000000000000..dbae3615e7e905 --- /dev/null +++ b/tools/eslint/node_modules/array-union/readme.md @@ -0,0 +1,28 @@ +# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) + +> Create an array of unique values, in order, from the input arrays + + +## Install + +```sh +$ npm install --save array-union +``` + + +## Usage + +```js +var arrayUnion = require('array-union'); + +arrayUnion([1, 1, 2, 3], [2, 3]); +//=> [1, 2, 3] + +arrayUnion(['foo', 'foo', 'bar'], ['foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/array-uniq/index.js b/tools/eslint/node_modules/array-uniq/index.js new file mode 100644 index 00000000000000..40f81b8a080d89 --- /dev/null +++ b/tools/eslint/node_modules/array-uniq/index.js @@ -0,0 +1,60 @@ +'use strict'; + +// there's 3 implementations written in increasing order of efficiency + +// 1 - no Set type is defined +function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; +} + +// 2 - a simple Set type is defined +function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + }); +} + +// 3 - a standard Set type is defined and it has a forEach method +function uniqSetWithForEach(arr) { + var ret = []; + + (new Set(arr)).forEach(function (el) { + ret.push(el); + }); + + return ret; +} + +// V8 currently has a broken implementation +// https://github.com/joyent/node/issues/8449 +function doesForEachActuallyWork() { + var ret = false; + + (new Set([true])).forEach(function (el) { + ret = el; + }); + + return ret === true; +} + +if ('Set' in global) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } +} else { + module.exports = uniqNoSet; +} diff --git a/tools/eslint/node_modules/array-uniq/package.json b/tools/eslint/node_modules/array-uniq/package.json new file mode 100644 index 00000000000000..de38a3eb85d07c --- /dev/null +++ b/tools/eslint/node_modules/array-uniq/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "array-uniq@^1.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/array-union" + ] + ], + "_from": "array-uniq@>=1.0.1 <2.0.0", + "_id": "array-uniq@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/array-uniq", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.1.5", + "_phantomChildren": {}, + "_requested": { + "name": "array-uniq", + "raw": "array-uniq@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/array-union" + ], + "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz", + "_shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d", + "_shrinkwrap": null, + "_spec": "array-uniq@^1.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/array-union", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-uniq/issues" + }, + "dependencies": {}, + "description": "Create an array without duplicates", + "devDependencies": { + "es6-set": "^0.1.0", + "mocha": "*", + "require-uncached": "^1.0.2" + }, + "directories": {}, + "dist": { + "shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d", + "tarball": "http://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d5e311f37692dfd25ec216490df10632ce5f69f3", + "homepage": "https://github.com/sindresorhus/array-uniq", + "keywords": [ + "arr", + "array", + "duplicate", + "es6", + "remove", + "set", + "uniq", + "unique" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-uniq", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-uniq.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/array-uniq/readme.md b/tools/eslint/node_modules/array-uniq/readme.md new file mode 100644 index 00000000000000..5183d07ec13ff3 --- /dev/null +++ b/tools/eslint/node_modules/array-uniq/readme.md @@ -0,0 +1,30 @@ +# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) + +> Create an array without duplicates + +It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). + + +## Install + +```sh +$ npm install --save array-uniq +``` + + +## Usage + +```js +var arrayUniq = require('array-uniq'); + +arrayUniq([1, 1, 2, 3, 3]); +//=> [1, 2, 3] + +arrayUniq(['foo', 'foo', 'bar', 'foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/arrify/index.js b/tools/eslint/node_modules/arrify/index.js new file mode 100644 index 00000000000000..2a2fdeeb1dc5a5 --- /dev/null +++ b/tools/eslint/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/tools/eslint/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license b/tools/eslint/node_modules/arrify/license similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license rename to tools/eslint/node_modules/arrify/license diff --git a/tools/eslint/node_modules/arrify/package.json b/tools/eslint/node_modules/arrify/package.json new file mode 100644 index 00000000000000..10844b8b2c9dde --- /dev/null +++ b/tools/eslint/node_modules/arrify/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "arrify@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby" + ] + ], + "_from": "arrify@>=1.0.0 <2.0.0", + "_id": "arrify@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/arrify", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.5.2", + "_phantomChildren": {}, + "_requested": { + "name": "arrify", + "raw": "arrify@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/globby" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "_shasum": "898508da2226f380df904728456849c1501a4b0d", + "_shrinkwrap": null, + "_spec": "arrify@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "dependencies": {}, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "898508da2226f380df904728456849c1501a4b0d", + "tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", + "homepage": "https://github.com/sindresorhus/arrify#readme", + "keywords": [ + "arr", + "array", + "arrayify", + "arrify", + "convert", + "value" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "arrify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/tools/eslint/node_modules/arrify/readme.md b/tools/eslint/node_modules/arrify/readme.md new file mode 100644 index 00000000000000..183d07576f1aee --- /dev/null +++ b/tools/eslint/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/async/LICENSE b/tools/eslint/node_modules/async/LICENSE new file mode 100644 index 00000000000000..8f29698588533b --- /dev/null +++ b/tools/eslint/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010-2014 Caolan McMahon + +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/eslint/node_modules/async/README.md b/tools/eslint/node_modules/async/README.md new file mode 100644 index 00000000000000..3a0f017719b309 --- /dev/null +++ b/tools/eslint/node_modules/async/README.md @@ -0,0 +1,1877 @@ +# Async.js + +[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) +[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async) +[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) +[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [Node.js](http://nodejs.org) and installable via `npm install async`, +it can also be used directly in the browser. + +Async is also installable via: + +- [bower](http://bower.io/): `bower install async` +- [component](https://github.com/component/component): `component install + caolan/async` +- [jam](http://jamjs.org/): `jam install async` +- [spm](http://spmjs.io/): `spm install async` + +Async provides around 20 functions that include the usual 'functional' +suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns +for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these +functions assume you follow the Node.js convention of providing a single +callback as the last argument of your `async` function. + + +## Quick Examples + +```javascript +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); + +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); + +async.parallel([ + function(){ ... }, + function(){ ... } +], callback); + +async.series([ + function(){ ... }, + function(){ ... } +]); +``` + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + +## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js) +### Synchronous iteration functions + +If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop. + +This can also arise by accident if you callback early in certain cases: + +```js +async.eachSeries(hugeArray, function iterator(item, callback) { + if (inCache(item)) { + callback(null, cache[item]); // if many items are cached, you'll overflow + } else { + doSomeIO(item, callback); + } +}, function done() { + //... +}); +``` + +Just change it to: + +```js +async.eachSeries(hugeArray, function iterator(item, callback) { + if (inCache(item)) { + async.setImmediate(function () { + callback(null, cache[item]); + }); + } else { + doSomeIO(item, callback); + //... +``` + +Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral. + +If JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works. + + +### Multiple callbacks + +Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases. + +```js +async.waterfall([ + function (callback) { + getSomething(options, function (err, result) { + if (err) { + callback(new Error("failed getting something:" + err.message)); + // we should return here + } + // since we did not return, this callback still will be called and + // `processData` will be called twice + callback(null, result); + }); + }, + processData +], done) +``` + +It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function. + + +### Binding a context to an iterator + +This section is really about `bind`, not about `async`. If you are wondering how to +make `async` execute your iterators in a given context, or are confused as to why +a method of another library isn't working as an iterator, study this example: + +```js +// Here is a simple object with an (unnecessarily roundabout) squaring method +var AsyncSquaringLibrary = { + squareExponent: 2, + square: function(number, callback){ + var result = Math.pow(number, this.squareExponent); + setTimeout(function(){ + callback(null, result); + }, 200); + } +}; + +async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ + // result is [NaN, NaN, NaN] + // This fails because the `this.squareExponent` expression in the square + // function is not evaluated in the context of AsyncSquaringLibrary, and is + // therefore undefined. +}); + +async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ + // result is [1, 4, 9] + // With the help of bind we can attach a context to the iterator before + // passing it to async. Now the square function will be executed in its + // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` + // will be as expected. +}); +``` + +## Download + +The source is available for download from +[GitHub](https://github.com/caolan/async/blob/master/lib/async.js). +Alternatively, you can install using Node Package Manager (`npm`): + + npm install async + +As well as using Bower: + + bower install async + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed + +## In the Browser + +So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. + +Usage: + +```html + + +``` + +## Documentation + +Some functions are also available in the following forms: +* `Series` - the same as `` but runs only a single async operation at a time +* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time + +### Collections + +* [`each`](#each), `eachSeries`, `eachLimit` +* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` +* [`map`](#map), `mapSeries`, `mapLimit` +* [`filter`](#filter), `filterSeries`, `filterLimit` +* [`reject`](#reject), `rejectSeries`, `rejectLimit` +* [`reduce`](#reduce), [`reduceRight`](#reduceRight) +* [`detect`](#detect), `detectSeries`, `detectLimit` +* [`sortBy`](#sortBy) +* [`some`](#some), `someLimit` +* [`every`](#every), `everyLimit` +* [`concat`](#concat), `concatSeries` + +### Control Flow + +* [`series`](#seriestasks-callback) +* [`parallel`](#parallel), `parallelLimit` +* [`whilst`](#whilst), [`doWhilst`](#doWhilst) +* [`until`](#until), [`doUntil`](#doUntil) +* [`during`](#during), [`doDuring`](#doDuring) +* [`forever`](#forever) +* [`waterfall`](#waterfall) +* [`compose`](#compose) +* [`seq`](#seq) +* [`applyEach`](#applyEach), `applyEachSeries` +* [`queue`](#queue), [`priorityQueue`](#priorityQueue) +* [`cargo`](#cargo) +* [`auto`](#auto) +* [`retry`](#retry) +* [`iterator`](#iterator) +* [`times`](#times), `timesSeries`, `timesLimit` + +### Utils + +* [`apply`](#apply) +* [`nextTick`](#nextTick) +* [`memoize`](#memoize) +* [`unmemoize`](#unmemoize) +* [`ensureAsync`](#ensureAsync) +* [`constant`](#constant) +* [`asyncify`](#asyncify) +* [`wrapSync`](#wrapSync) +* [`log`](#log) +* [`dir`](#dir) +* [`noConflict`](#noConflict) + +## Collections + + + +### each(arr, iterator, [callback]) + +Applies the function `iterator` to each item in `arr`, in parallel. +The `iterator` is called with an item from the list, and a callback for when it +has finished. If the `iterator` passes an error to its `callback`, the main +`callback` (for the `each` function) is immediately called with the error. + +Note, that since this function applies `iterator` to each item in parallel, +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occurred, the `callback` should be run without + arguments or with an explicit `null` argument. The array index is not passed + to the iterator. If you need the index, use [`forEachOf`](#forEachOf). +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Examples__ + + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +```js +// assuming openFiles is an array of file names + +async.each(openFiles, function(file, callback) { + + // Perform operation on file here. + console.log('Processing file ' + file); + + if( file.length > 32 ) { + console.log('This file name is too long'); + callback('File name too long'); + } else { + // Do work to process file here + console.log('File processed'); + callback(); + } +}, function(err){ + // if any of the file processing produced an error, err would equal that error + if( err ) { + // One of the iterations produced an error. + // All processing will now stop. + console.log('A file failed to process'); + } else { + console.log('All files have been processed successfully'); + } +}); +``` + +__Related__ + +* eachSeries(arr, iterator, [callback]) +* eachLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + + +### forEachOf(obj, iterator, [callback]) + +Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. + +__Arguments__ + +* `obj` - An object or array to iterate over. +* `iterator(item, key, callback)` - A function to apply to each item in `obj`. +The `key` is the item's key, or index in the case of an array. The iterator is +passed a `callback(err)` which must be called once it has completed. If no +error has occurred, the callback should be run without arguments or with an +explicit `null` argument. +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. + +__Example__ + +```js +var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; +var configs = {}; + +async.forEachOf(obj, function (value, key, callback) { + fs.readFile(__dirname + value, "utf8", function (err, data) { + if (err) return callback(err); + try { + configs[key] = JSON.parse(data); + } catch (e) { + return callback(e); + } + callback(); + }) +}, function (err) { + if (err) console.error(err.message); + // configs is now a map of JSON data + doSomethingWith(configs); +}) +``` + +__Related__ + +* forEachOfSeries(obj, iterator, [callback]) +* forEachOfLimit(obj, limit, iterator, [callback]) + +--------------------------------------- + + +### map(arr, iterator, [callback]) + +Produces a new array of values by mapping each value in `arr` through +the `iterator` function. The `iterator` is called with an item from `arr` and a +callback for when it has finished processing. Each of these callback takes 2 arguments: +an `error`, and the transformed item from `arr`. If `iterator` passes an error to its +callback, the main `callback` (for the `map` function) is immediately called with the error. + +Note, that since this function applies the `iterator` to each item in parallel, +there is no guarantee that the `iterator` functions will complete in order. +However, the results array will be in the same order as the original `arr`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - *Optional* A callback which is called when all `iterator` + functions have finished, or an error occurs. Results is an array of the + transformed items from the `arr`. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +__Related__ +* mapSeries(arr, iterator, [callback]) +* mapLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + +### filter(arr, iterator, [callback]) + +__Alias:__ `select` + +Returns a new array of all the values in `arr` which pass an async truth test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The `iterator` is passed a `callback(truthValue)`, which must be called with a + boolean argument once it has completed. +* `callback(results)` - *Optional* A callback which is called after all the `iterator` + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +__Related__ + +* filterSeries(arr, iterator, [callback]) +* filterLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reject(arr, iterator, [callback]) + +The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. + +__Related__ + +* rejectSeries(arr, iterator, [callback]) +* rejectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reduce(arr, memo, iterator, [callback]) + +__Aliases:__ `inject`, `foldl` + +Reduces `arr` into a single value using an async `iterator` to return +each successive step. `memo` is the initial state of the reduction. +This function only operates in series. + +For performance reasons, it may make sense to split a call to this function into +a parallel map, and then use the normal `Array.prototype.reduce` on the results. +This function is for situations where each step in the reduction needs to be async; +if you can get the data before reducing it, then it's probably a good idea to do so. + +__Arguments__ + +* `arr` - An array to iterate over. +* `memo` - The initial state of the reduction. +* `iterator(memo, item, callback)` - A function applied to each item in the + array to produce the next step in the reduction. The `iterator` is passed a + `callback(err, reduction)` which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main `callback` is + immediately called with the error. +* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, [callback]) + +__Alias:__ `foldr` + +Same as [`reduce`](#reduce), only operates on `arr` in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, [callback]) + +Returns the first value in `arr` that passes an async truth test. The +`iterator` is applied in parallel, meaning the first iterator to return `true` will +fire the detect `callback` with that result. That means the result might not be +the first item in the original `arr` (in terms of order) that passes the test. + +If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The iterator is passed a `callback(truthValue)` which must be called with a + boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the `iterator` functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +__Related__ + +* detectSeries(arr, iterator, [callback]) +* detectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### sortBy(arr, iterator, [callback]) + +Sorts a list by the results of running each `arr` value through an async `iterator`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, sortValue)` which must be called once it + has completed with an error (which can be `null`) and a value to use as the sort + criteria. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is the items from + the original `arr` sorted by the values returned by the `iterator` calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +__Sort Order__ + +By modifying the callback parameter the sorting order can be influenced: + +```js +//ascending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x); +}, function(err,result){ + //result callback +} ); + +//descending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x*-1); //<- x*-1 instead of x, turns the order around +}, function(err,result){ + //result callback +} ); +``` + +--------------------------------------- + + +### some(arr, iterator, [callback]) + +__Alias:__ `any` + +Returns `true` if at least one element in the `arr` satisfies an async test. +_The callback for each iterator call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. Once any iterator +call returns `true`, the main `callback` is immediately called. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)`` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +__Related__ + +* someLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### every(arr, iterator, [callback]) + +__Alias:__ `all` + +Returns `true` if every element in `arr` satisfies an async test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `false`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +__Related__ + +* everyLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### concat(arr, iterator, [callback]) + +Applies `iterator` to each item in `arr`, concatenating the results. Returns the +concatenated list. The `iterator`s are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of `arr` passed to the `iterator` function. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, results)` which must be called once it + has completed with an error (which can be `null`) and an array of results. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is an array containing + the concatenated results of the `iterator` function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +__Related__ + +* concatSeries(arr, iterator, [callback]) + + +## Control Flow + + +### series(tasks, [callback]) + +Run the functions in the `tasks` array in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run, and `callback` is immediately called with the value of the error. +Otherwise, `callback` receives an array of results when `tasks` have completed. + +It is also possible to use an object instead of an array. Each property will be +run as a function, and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`series`](#series). + +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. + +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. + +__Arguments__ + +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the `task` callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main `callback` is immediately called with the value of the error. +Once the `tasks` have completed, the results are passed to the final `callback` as an +array. + +**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`parallel`](#parallel). + + +__Arguments__ + +* `tasks` - An array or object containing functions to run. Each function is passed + a `callback(err, result)` which it must call on completion with an error `err` + (which can be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed successfully. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +__Related__ + +* parallelLimit(tasks, limit, [callback]) + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, +or an error occurs. + +__Arguments__ + +* `test()` - synchronous truth test to perform before each execution of `fn`. +* `fn(callback)` - A function which is called each time `test` passes. The function is + passed a `callback(err)`, which must be called once it has completed with an + optional `err` argument. +* `callback(err, [results])` - A callback which is called after the test + function has failed and repeated execution of `fn` has stopped. `callback` + will be passed an error and any arguments passed to the final `fn`'s callback. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(function () { + callback(null, count); + }, 1000); + }, + function (err, n) { + // 5 seconds have passed, n = 5 + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post-check version of [`whilst`](#whilst). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, +or an error occurs. `callback` will be passed an error and any arguments passed +to the final `fn`'s callback. + +The inverse of [`whilst`](#whilst). + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### during(test, fn, callback) + +Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. + +__Example__ + +```js +var count = 0; + +async.during( + function (callback) { + return callback(null, count < 5); + }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doDuring(fn, test, callback) + +The post-check version of [`during`](#during). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. + +--------------------------------------- + + +### forever(fn, [errback]) + +Calls the asynchronous function `fn` with a callback parameter that allows it to +call itself again, in series, indefinitely. + +If an error is passed to the callback then `errback` is called with the +error, and execution stops, otherwise it will never be called. + +```js +async.forever( + function(next) { + // next is suitable for passing to things that need a callback(err [, whatever]); + // it will result in this function being called again. + }, + function(err) { + // if next is called with a value in its first parameter, it will appear + // in here as 'err', and execution will stop. + } +); +``` + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs the `tasks` array of functions in series, each passing their results to the next in +the array. However, if any of the `tasks` pass an error to their own callback, the +next function is not executed, and the main `callback` is immediately called with +the error. + +__Arguments__ + +* `tasks` - An array of functions to run, each function is passed a + `callback(err, result1, result2, ...)` it must call on completion. The first + argument is an error (which can be `null`) and any further arguments will be + passed as arguments in order to the next task. +* `callback(err, [results])` - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback) { + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); + }, + function(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` +Or, with named functions: + +```js +async.waterfall([ + myFirstFunction, + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(callback) { + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +Or, if you need to pass any argument to the first function: + +```js +async.waterfall([ + async.apply(myFirstFunction, 'zero'), + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(arg1, callback) { + // arg1 now equals 'zero' + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions `f()`, `g()`, and `h()` would produce the result of +`f(g(h()))`, only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### seq(fn1, fn2...) + +Version of the compose function that is more natural to read. +Each function consumes the return value of the previous function. +It is the equivalent of [`compose`](#compose) with the arguments reversed. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +// Requires lodash (or underscore), express3 and dresende's orm2. +// Part of an app, that fetches cats of the logged user. +// This example uses `seq` function to avoid overnesting and error +// handling clutter. +app.get('/cats', function(request, response) { + var User = request.models.User; + async.seq( + _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + function(user, fn) { + user.getCats(fn); // 'getCats' has signature (callback(err, data)) + } + )(req.session.user_id, function (err, cats) { + if (err) { + console.error(err); + response.json({ status: 'error', message: err.message }); + } else { + response.json({ status: 'ok', message: 'Cats found', data: cats }); + } + }); +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling +`callback` after all functions have completed. If you only provide the first +argument, then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* `fns` - the asynchronous functions to all call with the same arguments +* `args...` - any number of separate arguments to pass to the function +* `callback` - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +__Related__ + +* applyEachSeries(tasks, args..., [callback]) + +--------------------------------------- + + +### queue(worker, [concurrency]) + +Creates a `queue` object with the specified `concurrency`. Tasks added to the +`queue` are processed in parallel (up to the `concurrency` limit). If all +`worker`s are in progress, the task is queued until one becomes available. +Once a `worker` completes a `task`, that `task`'s callback is called. + +__Arguments__ + +* `worker(task, callback)` - An asynchronous function for processing a queued + task, which must call its `callback(err)` argument when finished, with an + optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. +* `concurrency` - An `integer` for determining how many `worker` functions should be + run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. + +__Queue objects__ + +The `queue` object returned by this function has the following properties and +methods: + +* `length()` - a function returning the number of items waiting to be processed. +* `started` - a function returning whether or not any items have been pushed and processed by the queue +* `running()` - a function returning the number of items currently being processed. +* `workersList()` - a function returning the array of items currently being processed. +* `idle()` - a function returning false if there are items waiting or being processed, or true if not. +* `concurrency` - an integer for determining how many `worker` functions should be + run in parallel. This property can be changed after a `queue` is created to + alter the concurrency on-the-fly. +* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once + the `worker` has finished processing the task. Instead of a single task, a `tasks` array + can be submitted. The respective callback is used for every task in the list. +* `unshift(task, [callback])` - add a new task to the front of the `queue`. +* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, + and further tasks will be queued. +* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. +* `paused` - a boolean for determining whether the queue is in a paused state +* `pause()` - a function that pauses the processing of tasks until `resume()` is called. +* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. +* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing item'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + + +--------------------------------------- + + +### priorityQueue(worker, concurrency) + +The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: + +* `push(task, priority, [callback])` - `priority` should be a number. If an array of + `tasks` is given, all tasks will be assigned the same priority. +* The `unshift` method was removed. + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a `cargo` object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the `payload` limit). If the +`worker` is in progress, the task is queued until it becomes available. Once +the `worker` has completed some tasks, each callback of those tasks is called. +Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. + +While [queue](#queue) passes only one task to one of a group of workers +at a time, cargo passes an array of tasks to a single worker, repeating +when the worker is finished. + +__Arguments__ + +* `worker(tasks, callback)` - An asynchronous function for processing an array of + queued tasks, which must call its `callback(err)` argument when finished, with + an optional `err` argument. +* `payload` - An optional `integer` for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The `cargo` object returned by this function has the following properties and +methods: + +* `length()` - A function returning the number of items waiting to be processed. +* `payload` - An `integer` for determining how many tasks should be + process per round. This property can be changed after a `cargo` is created to + alter the payload on-the-fly. +* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called + once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` + can be submitted. The respective callback is used for every task in the list. +* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. +* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. +* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [concurrency], [callback]) + +Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. + +If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. + +Note, all functions are called with a `results` object as a second argument, +so it is unsafe to pass functions in the `tasks` object which cannot handle the +extra argument. + +For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling `readFile` with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to `readFile` in a function which does not forward the +`results` object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* `tasks` - An object. Each of its properties is either a function or an array of + requirements, with the function itself the last item in the array. The object's key + of a property serves as the name of the task defined by that property, + i.e. can be used when specifying requirements for other tasks. + The function receives two arguments: (1) a `callback(err, result)` which must be + called when finished, passing an `error` (which can be `null`) and the result of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions. +* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible. +* `callback(err, results)` - An optional callback which is called when all the + tasks have been completed. It receives the `err` argument if any `tasks` + pass an error to their callback. Results are always returned; however, if + an error occurs, no further `tasks` will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + make_folder: function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + }, + write_file: ['get_data', 'make_folder', function(callback, results){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, 'filename'); + }], + email_link: ['write_file', function(callback, results){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + callback(null, {'file':results.write_file, 'email':'user@example.com'}); + }] +}, function(err, results) { + console.log('err = ', err); + console.log('results = ', results); +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + } +], +function(err, results){ + async.series([ + function(callback){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + results.push('filename'); + callback(null); + }, + function(callback){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + callback(null, {'file':results.pop(), 'email':'user@example.com'}); + } + ]); +}); +``` + +For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding +new tasks much easier (and the code more readable). + + +--------------------------------------- + + +### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) + +Attempts to get a successful response from `task` no more than `times` times before +returning an error. If the task is successful, the `callback` will be passed the result +of the successful task. If all attempts fail, the callback will be passed the error and +result (if any) of the final attempt. + +__Arguments__ + +* `opts` - Can be either an object with `times` and `interval` or a number. + * `times` - The number of attempts to make before giving up. The default is `5`. + * `interval` - The time to wait between retries, in milliseconds. The default is `0`. + * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. +* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` + which must be called when finished, passing `err` (which can be `null`) and the `result` of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions (if nested inside another control flow). +* `callback(err, results)` - An optional callback which is called when the + task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. + +The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below: + +```js +// try calling apiMethod 3 times +async.retry(3, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod 3 times, waiting 200 ms between each retry +async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod the default 5 times no delay between each retry +async.retry(apiMethod, function(err, result) { + // do something with the result +}); +``` + +It can also be embedded within other control flow functions to retry individual methods +that are not as reliable, like this: + +```js +async.auto({ + users: api.getUsers.bind(api), + payments: async.retry(3, api.getPayments.bind(api)) +}, function(err, results) { + // do something with the results +}); +``` + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the `tasks` array, +returning a continuation to call the next one after that. It's also possible to +“peek” at the next iterator with `iterator.next()`. + +This function is used internally by the `async` module, but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* `tasks` - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied. + +Useful as a shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback), setImmediate(callback) + +Calls `callback` on a later loop around the event loop. In Node.js this just +calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` +if available, otherwise `setTimeout(callback, 0)`, which means other higher priority +events may precede the execution of `callback`. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* `callback` - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, iterator, [callback]) + +Calls the `iterator` function `n` times, and accumulates results in the same manner +you would use with [`map`](#map). + +__Arguments__ + +* `n` - The number of times to run the function. +* `iterator` - The function to call `n` times. +* `callback` - see [`map`](#map) + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + +__Related__ + +* timesSeries(n, iterator, [callback]) +* timesLimit(n, limit, iterator, [callback]) + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an `async` function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* `fn` - The function to proxy and cache results from. +* `hasher` - An optional function for generating a custom hash for storing + results. It has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized +form. Handy for testing. + +__Arguments__ + +* `fn` - the memoized function + +--------------------------------------- + + +### ensureAsync(fn) + +Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. + +__Arguments__ + +* `fn` - an async function, one that expects a node-style callback as its last argument + +Returns a wrapped function with the exact same call signature as the function passed in. + +__Example__ + +```js +function sometimesAsync(arg, callback) { + if (cache[arg]) { + return callback(null, cache[arg]); // this would be synchronous!! + } else { + doSomeIO(arg, callback); // this IO would be asynchronous + } +} + +// this has a risk of stack overflows if many results are cached in a row +async.mapSeries(args, sometimesAsync, done); + +// this will defer sometimesAsync's callback if necessary, +// preventing stack overflows +async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + +``` + +--------------------------------------- + + +### constant(values...) + +Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. + +__Example__ + +```js +async.waterfall([ + async.constant(42), + function (value, next) { + // value === 42 + }, + //... +], callback); + +async.waterfall([ + async.constant(filename, "utf8"), + fs.readFile, + function (fileData, next) { + //... + } + //... +], callback); + +async.auto({ + hostname: async.constant("https://server.net/"), + port: findFreePort, + launchServer: ["hostname", "port", function (cb, options) { + startServer(options, cb); + }], + //... +}, callback); + +``` + +--------------------------------------- + + + +### asyncify(func) + +__Alias:__ `wrapSync` + +Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. + +__Example__ + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(JSON.parse), + function (data, next) { + // data is the result of parsing the text. + // If there was a parsing error, it would have been caught. + } +], callback) +``` + +If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example: + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(function (contents) { + return db.model.create(contents); + }), + function (model, next) { + // `model` is the instantiated model object. + // If there was an error, this function would be skipped. + } +], callback) +``` + +This also means you can asyncify ES2016 `async` functions. + +```js +var q = async.queue(async.asyncify(async function (file) { + var intermediateStep = await processFile(file); + return await somePromise(intermediateStep) +})); + +q.push(files); +``` + +--------------------------------------- + + +### log(function, arguments) + +Logs the result of an `async` function to the `console`. Only works in Node.js or +in browsers that support `console.log` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.log` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an `async` function to the `console` using `console.dir` to +display the properties of the resulting object. Only works in Node.js or +in browsers that support `console.dir` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.dir` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of `async` back to its original value, returning a reference to the +`async` object. diff --git a/tools/eslint/node_modules/async/dist/async.js b/tools/eslint/node_modules/async/dist/async.js new file mode 100644 index 00000000000000..ee0a268e6d7932 --- /dev/null +++ b/tools/eslint/node_modules/async/dist/async.js @@ -0,0 +1,1265 @@ +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */ +(function () { + + var async = {}; + function noop() {} + function identity(v) { + return v; + } + function toBool(v) { + return !!v; + } + function notId(v) { + return !v; + } + + // global on the server, window in the browser + var previous_async; + + // Establish the root object, `window` (`self`) in the browser, `global` + // on the server, or `this` in some virtual machines. We use `self` + // instead of `window` for `WebWorker` support. + var root = typeof self === 'object' && self.self === self && self || + typeof global === 'object' && global.global === global && global || + this; + + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + return function() { + if (fn === null) throw new Error("Callback was already called."); + fn.apply(this, arguments); + fn = null; + }; + } + + function _once(fn) { + return function() { + if (fn === null) return; + fn.apply(this, arguments); + fn = null; + }; + } + + //// cross-browser compatiblity functions //// + + var _toString = Object.prototype.toString; + + var _isArray = Array.isArray || function (obj) { + return _toString.call(obj) === '[object Array]'; + }; + + // Ported from underscore.js isObject + var _isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + function _isArrayLike(arr) { + return _isArray(arr) || ( + // has a positive integer length property + typeof arr.length === "number" && + arr.length >= 0 && + arr.length % 1 === 0 + ); + } + + function _arrayEach(arr, iterator) { + var index = -1, + length = arr.length; + + while (++index < length) { + iterator(arr[index], index, arr); + } + } + + function _map(arr, iterator) { + var index = -1, + length = arr.length, + result = Array(length); + + while (++index < length) { + result[index] = iterator(arr[index], index, arr); + } + return result; + } + + function _range(count) { + return _map(Array(count), function (v, i) { return i; }); + } + + function _reduce(arr, iterator, memo) { + _arrayEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + } + + function _forEachOf(object, iterator) { + _arrayEach(_keys(object), function (key) { + iterator(object[key], key); + }); + } + + function _indexOf(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === item) return i; + } + return -1; + } + + var _keys = Object.keys || function (obj) { + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + function _keyIterator(coll) { + var i = -1; + var len; + var keys; + if (_isArrayLike(coll)) { + len = coll.length; + return function next() { + i++; + return i < len ? i : null; + }; + } else { + keys = _keys(coll); + len = keys.length; + return function next() { + i++; + return i < len ? keys[i] : null; + }; + } + } + + // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) + // This accumulates the arguments passed into an array, after a given index. + // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). + function _restParam(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0); + var rest = Array(length); + for (var index = 0; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + } + // Currently unused but handle cases outside of the switch statement: + // var args = Array(startIndex + 1); + // for (index = 0; index < startIndex; index++) { + // args[index] = arguments[index]; + // } + // args[startIndex] = rest; + // return func.apply(this, args); + }; + } + + function _withoutIndex(iterator) { + return function (value, index, callback) { + return iterator(value, callback); + }; + } + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + + // capture the global reference to guard against fakeTimer mocks + var _setImmediate = typeof setImmediate === 'function' && setImmediate; + + var _delay = _setImmediate ? function(fn) { + // not a direct alias for IE10 compatibility + _setImmediate(fn); + } : function(fn) { + setTimeout(fn, 0); + }; + + if (typeof process === 'object' && typeof process.nextTick === 'function') { + async.nextTick = process.nextTick; + } else { + async.nextTick = _delay; + } + async.setImmediate = _setImmediate ? _delay : async.nextTick; + + + async.forEach = + async.each = function (arr, iterator, callback) { + return async.eachOf(arr, _withoutIndex(iterator), callback); + }; + + async.forEachSeries = + async.eachSeries = function (arr, iterator, callback) { + return async.eachOfSeries(arr, _withoutIndex(iterator), callback); + }; + + + async.forEachLimit = + async.eachLimit = function (arr, limit, iterator, callback) { + return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); + }; + + async.forEachOf = + async.eachOf = function (object, iterator, callback) { + callback = _once(callback || noop); + object = object || []; + + var iter = _keyIterator(object); + var key, completed = 0; + + while ((key = iter()) != null) { + completed += 1; + iterator(object[key], key, only_once(done)); + } + + if (completed === 0) callback(null); + + function done(err) { + completed--; + if (err) { + callback(err); + } + // Check key is null in case iterator isn't exhausted + // and done resolved synchronously. + else if (key === null && completed <= 0) { + callback(null); + } + } + }; + + async.forEachOfSeries = + async.eachOfSeries = function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + var key = nextKey(); + function iterate() { + var sync = true; + if (key === null) { + return callback(null); + } + iterator(obj[key], key, only_once(function (err) { + if (err) { + callback(err); + } + else { + key = nextKey(); + if (key === null) { + return callback(null); + } else { + if (sync) { + async.setImmediate(iterate); + } else { + iterate(); + } + } + } + })); + sync = false; + } + iterate(); + }; + + + + async.forEachOfLimit = + async.eachOfLimit = function (obj, limit, iterator, callback) { + _eachOfLimit(limit)(obj, iterator, callback); + }; + + function _eachOfLimit(limit) { + + return function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + if (limit <= 0) { + return callback(null); + } + var done = false; + var running = 0; + var errored = false; + + (function replenish () { + if (done && running <= 0) { + return callback(null); + } + + while (running < limit && !errored) { + var key = nextKey(); + if (key === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iterator(obj[key], key, only_once(function (err) { + running -= 1; + if (err) { + callback(err); + errored = true; + } + else { + replenish(); + } + })); + } + })(); + }; + } + + + function doParallel(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOf, obj, iterator, callback); + }; + } + function doParallelLimit(fn) { + return function (obj, limit, iterator, callback) { + return fn(_eachOfLimit(limit), obj, iterator, callback); + }; + } + function doSeries(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOfSeries, obj, iterator, callback); + }; + } + + function _asyncMap(eachfn, arr, iterator, callback) { + callback = _once(callback || noop); + arr = arr || []; + var results = _isArrayLike(arr) ? [] : {}; + eachfn(arr, function (value, index, callback) { + iterator(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = doParallelLimit(_asyncMap); + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.inject = + async.foldl = + async.reduce = function (arr, memo, iterator, callback) { + async.eachOfSeries(arr, function (x, i, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + + async.foldr = + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, identity).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + + async.transform = function (arr, memo, iterator, callback) { + if (arguments.length === 3) { + callback = iterator; + iterator = memo; + memo = _isArray(arr) ? [] : {}; + } + + async.eachOf(arr, function(v, k, cb) { + iterator(memo, v, k, cb); + }, function(err) { + callback(err, memo); + }); + }; + + function _filter(eachfn, arr, iterator, callback) { + var results = []; + eachfn(arr, function (x, index, callback) { + iterator(x, function (v) { + if (v) { + results.push({index: index, value: x}); + } + callback(); + }); + }, function () { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + } + + async.select = + async.filter = doParallel(_filter); + + async.selectLimit = + async.filterLimit = doParallelLimit(_filter); + + async.selectSeries = + async.filterSeries = doSeries(_filter); + + function _reject(eachfn, arr, iterator, callback) { + _filter(eachfn, arr, function(value, cb) { + iterator(value, function(v) { + cb(!v); + }); + }, callback); + } + async.reject = doParallel(_reject); + async.rejectLimit = doParallelLimit(_reject); + async.rejectSeries = doSeries(_reject); + + function _createTester(eachfn, check, getResult) { + return function(arr, limit, iterator, cb) { + function done() { + if (cb) cb(getResult(false, void 0)); + } + function iteratee(x, _, callback) { + if (!cb) return callback(); + iterator(x, function (v) { + if (cb && check(v)) { + cb(getResult(true, x)); + cb = iterator = false; + } + callback(); + }); + } + if (arguments.length > 3) { + eachfn(arr, limit, iteratee, done); + } else { + cb = iterator; + iterator = limit; + eachfn(arr, iteratee, done); + } + }; + } + + async.any = + async.some = _createTester(async.eachOf, toBool, identity); + + async.someLimit = _createTester(async.eachOfLimit, toBool, identity); + + async.all = + async.every = _createTester(async.eachOf, notId, notId); + + async.everyLimit = _createTester(async.eachOfLimit, notId, notId); + + function _findGetResult(v, x) { + return x; + } + async.detect = _createTester(async.eachOf, identity, _findGetResult); + async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); + async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult); + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + callback(null, _map(results.sort(comparator), function (x) { + return x.value; + })); + } + + }); + + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + }; + + async.auto = function (tasks, concurrency, callback) { + if (typeof arguments[1] === 'function') { + // concurrency is optional, shift the args. + callback = concurrency; + concurrency = null; + } + callback = _once(callback || noop); + var keys = _keys(tasks); + var remainingTasks = keys.length; + if (!remainingTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = remainingTasks; + } + + var results = {}; + var runningTasks = 0; + + var hasError = false; + + var listeners = []; + function addListener(fn) { + listeners.unshift(fn); + } + function removeListener(fn) { + var idx = _indexOf(listeners, fn); + if (idx >= 0) listeners.splice(idx, 1); + } + function taskComplete() { + remainingTasks--; + _arrayEach(listeners.slice(0), function (fn) { + fn(); + }); + } + + addListener(function () { + if (!remainingTasks) { + callback(null, results); + } + }); + + _arrayEach(keys, function (k) { + if (hasError) return; + var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; + var taskCallback = _restParam(function(err, args) { + runningTasks--; + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _forEachOf(results, function(val, rkey) { + safeResults[rkey] = val; + }); + safeResults[k] = args; + hasError = true; + + callback(err, safeResults); + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }); + var requires = task.slice(0, task.length - 1); + // prevent dead-locks + var len = requires.length; + var dep; + while (len--) { + if (!(dep = tasks[requires[len]])) { + throw new Error('Has nonexistent dependency in ' + requires.join(', ')); + } + if (_isArray(dep) && _indexOf(dep, k) >= 0) { + throw new Error('Has cyclic dependencies'); + } + } + function ready() { + return runningTasks < concurrency && _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + } + if (ready()) { + runningTasks++; + task[task.length - 1](taskCallback, results); + } + else { + addListener(listener); + } + function listener() { + if (ready()) { + runningTasks++; + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + } + }); + }; + + + + async.retry = function(times, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var attempts = []; + + var opts = { + times: DEFAULT_TIMES, + interval: DEFAULT_INTERVAL + }; + + function parseTimes(acc, t){ + if(typeof t === 'number'){ + acc.times = parseInt(t, 10) || DEFAULT_TIMES; + } else if(typeof t === 'object'){ + acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; + acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; + } else { + throw new Error('Unsupported argument type for \'times\': ' + typeof t); + } + } + + var length = arguments.length; + if (length < 1 || length > 3) { + throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); + } else if (length <= 2 && typeof times === 'function') { + callback = task; + task = times; + } + if (typeof times !== 'function') { + parseTimes(opts, times); + } + opts.callback = callback; + opts.task = task; + + function wrappedTask(wrappedCallback, wrappedResults) { + function retryAttempt(task, finalAttempt) { + return function(seriesCallback) { + task(function(err, result){ + seriesCallback(!err || finalAttempt, {err: err, result: result}); + }, wrappedResults); + }; + } + + function retryInterval(interval){ + return function(seriesCallback){ + setTimeout(function(){ + seriesCallback(null); + }, interval); + }; + } + + while (opts.times) { + + var finalAttempt = !(opts.times-=1); + attempts.push(retryAttempt(opts.task, finalAttempt)); + if(!finalAttempt && opts.interval > 0){ + attempts.push(retryInterval(opts.interval)); + } + } + + async.series(attempts, function(done, data){ + data = data[data.length - 1]; + (wrappedCallback || opts.callback)(data.err, data.result); + }); + } + + // If a callback is passed, run this as a controll flow + return opts.callback ? wrappedTask() : wrappedTask; + }; + + async.waterfall = function (tasks, callback) { + callback = _once(callback || noop); + if (!_isArray(tasks)) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + function wrapIterator(iterator) { + return _restParam(function (err, args) { + if (err) { + callback.apply(null, [err].concat(args)); + } + else { + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + ensureAsync(iterator).apply(null, args); + } + }); + } + wrapIterator(async.iterator(tasks))(); + }; + + function _parallel(eachfn, tasks, callback) { + callback = callback || noop; + var results = _isArrayLike(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + task(_restParam(function (err, args) { + if (args.length <= 1) { + args = args[0]; + } + results[key] = args; + callback(err); + })); + }, function (err) { + callback(err, results); + }); + } + + async.parallel = function (tasks, callback) { + _parallel(async.eachOf, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel(_eachOfLimit(limit), tasks, callback); + }; + + async.series = function(tasks, callback) { + _parallel(async.eachOfSeries, tasks, callback); + }; + + async.iterator = function (tasks) { + function makeCallback(index) { + function fn() { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + } + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + } + return makeCallback(0); + }; + + async.apply = _restParam(function (fn, args) { + return _restParam(function (callArgs) { + return fn.apply( + null, args.concat(callArgs) + ); + }); + }); + + function _concat(eachfn, arr, fn, callback) { + var result = []; + eachfn(arr, function (x, index, cb) { + fn(x, function (err, y) { + result = result.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, result); + }); + } + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + callback = callback || noop; + if (test()) { + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else if (test.apply(this, args)) { + iterator(next); + } else { + callback.apply(null, [null].concat(args)); + } + }); + iterator(next); + } else { + callback(null); + } + }; + + async.doWhilst = function (iterator, test, callback) { + var calls = 0; + return async.whilst(function() { + return ++calls <= 1 || test.apply(this, arguments); + }, iterator, callback); + }; + + async.until = function (test, iterator, callback) { + return async.whilst(function() { + return !test.apply(this, arguments); + }, iterator, callback); + }; + + async.doUntil = function (iterator, test, callback) { + return async.doWhilst(iterator, function() { + return !test.apply(this, arguments); + }, callback); + }; + + async.during = function (test, iterator, callback) { + callback = callback || noop; + + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else { + args.push(check); + test.apply(this, args); + } + }); + + var check = function(err, truth) { + if (err) { + callback(err); + } else if (truth) { + iterator(next); + } else { + callback(null); + } + }; + + test(check); + }; + + async.doDuring = function (iterator, test, callback) { + var calls = 0; + async.during(function(next) { + if (calls++ < 1) { + next(null, true); + } else { + test.apply(this, arguments); + } + }, iterator, callback); + }; + + function _queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + function _insert(q, data, pos, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0 && q.idle()) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + callback: callback || noop + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + }); + async.setImmediate(q.process); + } + function _next(q, tasks) { + return function(){ + workers -= 1; + + var removed = false; + var args = arguments; + _arrayEach(tasks, function (task) { + _arrayEach(workersList, function (worker, index) { + if (worker === task && !removed) { + workersList.splice(index, 1); + removed = true; + } + }); + + task.callback.apply(task, args); + }); + if (q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + } + + var workers = 0; + var workersList = []; + var q = { + tasks: [], + concurrency: concurrency, + payload: payload, + saturated: noop, + empty: noop, + drain: noop, + started: false, + paused: false, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + kill: function () { + q.drain = noop; + q.tasks = []; + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + while(!q.paused && workers < q.concurrency && q.tasks.length){ + + var tasks = q.payload ? + q.tasks.splice(0, q.payload) : + q.tasks.splice(0, q.tasks.length); + + var data = _map(tasks, function (task) { + return task.data; + }); + + if (q.tasks.length === 0) { + q.empty(); + } + workers += 1; + workersList.push(tasks[0]); + var cb = only_once(_next(q, tasks)); + worker(data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + }, + workersList: function () { + return workersList; + }, + idle: function() { + return q.tasks.length + workers === 0; + }, + pause: function () { + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + var resumeCount = Math.min(q.concurrency, q.tasks.length); + // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + for (var w = 1; w <= resumeCount; w++) { + async.setImmediate(q.process); + } + } + }; + return q; + } + + async.queue = function (worker, concurrency) { + var q = _queue(function (items, cb) { + worker(items[0], cb); + }, concurrency, 1); + + return q; + }; + + async.priorityQueue = function (worker, concurrency) { + + function _compareTasks(a, b){ + return a.priority - b.priority; + } + + function _binarySearch(sequence, item, compare) { + var beg = -1, + end = sequence.length - 1; + while (beg < end) { + var mid = beg + ((end - beg + 1) >>> 1); + if (compare(item, sequence[mid]) >= 0) { + beg = mid; + } else { + end = mid - 1; + } + } + return beg; + } + + function _insert(q, data, priority, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + priority: priority, + callback: typeof callback === 'function' ? callback : noop + }; + + q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + // Start with a normal queue + var q = async.queue(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function (data, priority, callback) { + _insert(q, data, priority, callback); + }; + + // Remove unshift function + delete q.unshift; + + return q; + }; + + async.cargo = function (worker, payload) { + return _queue(worker, 1, payload); + }; + + function _console_fn(name) { + return _restParam(function (fn, args) { + fn.apply(null, args.concat([_restParam(function (err, args) { + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _arrayEach(args, function (x) { + console[name](x); + }); + } + } + })])); + }); + } + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + var has = Object.prototype.hasOwnProperty; + hasher = hasher || identity; + var memoized = _restParam(function memoized(args) { + var callback = args.pop(); + var key = hasher.apply(null, args); + if (has.call(memo, key)) { + async.setImmediate(function () { + callback.apply(null, memo[key]); + }); + } + else if (has.call(queues, key)) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([_restParam(function (args) { + memo[key] = args; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, args); + } + })])); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + function _times(mapper) { + return function (count, iterator, callback) { + mapper(_range(count), iterator, callback); + }; + } + + async.times = _times(async.map); + async.timesSeries = _times(async.mapSeries); + async.timesLimit = function (count, limit, iterator, callback) { + return async.mapLimit(_range(count), limit, iterator, callback); + }; + + async.seq = function (/* functions... */) { + var fns = arguments; + return _restParam(function (args) { + var that = this; + + var callback = args[args.length - 1]; + if (typeof callback == 'function') { + args.pop(); + } else { + callback = noop; + } + + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { + cb(err, nextargs); + })])); + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }); + }; + + async.compose = function (/* functions... */) { + return async.seq.apply(null, Array.prototype.reverse.call(arguments)); + }; + + + function _applyEach(eachfn) { + return _restParam(function(fns, args) { + var go = _restParam(function(args) { + var that = this; + var callback = args.pop(); + return eachfn(fns, function (fn, _, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }); + if (args.length) { + return go.apply(this, args); + } + else { + return go; + } + }); + } + + async.applyEach = _applyEach(async.eachOf); + async.applyEachSeries = _applyEach(async.eachOfSeries); + + + async.forever = function (fn, callback) { + var done = only_once(callback || noop); + var task = ensureAsync(fn); + function next(err) { + if (err) { + return done(err); + } + task(next); + } + next(); + }; + + function ensureAsync(fn) { + return _restParam(function (args) { + var callback = args.pop(); + args.push(function () { + var innerArgs = arguments; + if (sync) { + async.setImmediate(function () { + callback.apply(null, innerArgs); + }); + } else { + callback.apply(null, innerArgs); + } + }); + var sync = true; + fn.apply(this, args); + sync = false; + }); + } + + async.ensureAsync = ensureAsync; + + async.constant = _restParam(function(values) { + var args = [null].concat(values); + return function (callback) { + return callback.apply(this, args); + }; + }); + + async.wrapSync = + async.asyncify = function asyncify(func) { + return _restParam(function (args) { + var callback = args.pop(); + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if (_isObject(result) && typeof result.then === "function") { + result.then(function(value) { + callback(null, value); + })["catch"](function(err) { + callback(err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); + }; + + // Node.js + if (typeof module === 'object' && module.exports) { + module.exports = async; + } + // AMD / RequireJS + else if (typeof define === 'function' && define.amd) { + define([], function () { + return async; + }); + } + // included directly via - - - - - diff --git a/tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.css b/tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cda31a44..00000000000000 --- a/tools/eslint/node_modules/doctrine/coverage/lcov-report/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/tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.js b/tools/eslint/node_modules/doctrine/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e03866898f..00000000000000 --- a/tools/eslint/node_modules/doctrine/coverage/lcov-report/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/tools/eslint/node_modules/doctrine/coverage/lcov-report/sort-arrow-sprite.png b/tools/eslint/node_modules/doctrine/coverage/lcov-report/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/tools/eslint/node_modules/doctrine/coverage/lcov.info b/tools/eslint/node_modules/doctrine/coverage/lcov.info deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/tools/eslint/node_modules/doctrine/eslint.json b/tools/eslint/node_modules/doctrine/eslint.json deleted file mode 100644 index 330835b9bf7eb2..00000000000000 --- a/tools/eslint/node_modules/doctrine/eslint.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "env": { - "node": true - }, - "rules": { - "quotes": [2, "single"], - "valid-jsdoc": [2, true], - "brace-style": [2, true], - "semi": [2, true], - "no-bitwise": [2, true], - "camelcase": [2, true], - "curly": [2, true], - "eqeqeq": [2, "allow-null"], - "wrap-iife": [2, true], - "eqeqeq": [2, true], - "strict": [2, true], - "no-unused-vars": [2, true], - "no-underscore-dangle": [0, false], - "no-use-before-define": [0, false], - "no-constant-condition": [0, false] - } -} diff --git a/tools/eslint/node_modules/doctrine/gulpfile.js b/tools/eslint/node_modules/doctrine/gulpfile.js deleted file mode 100644 index a68d0ff930d1b7..00000000000000 --- a/tools/eslint/node_modules/doctrine/gulpfile.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2014 Yusuke Suzuki - - 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 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. -*/ - -'use strict'; - -var gulp = require('gulp'); -var mocha = require('gulp-mocha'); -var jshint = require('gulp-jshint'); -var eslint = require('gulp-eslint'); -var istanbul = require('gulp-istanbul'); -var bump = require('gulp-bump'); -var filter = require('gulp-filter'); -var git = require('gulp-git'); -var tagVersion = require('gulp-tag-version'); - -var SRC = [ 'lib/*.js' ]; - -var TEST = [ 'test/*.js' ]; - -var LINT = [ - 'gulpfile.js' -].concat(SRC); - -var ESLINT_OPTION = { - 'rules': { - 'quotes': 0, - 'eqeqeq': 0, - 'no-use-before-define': 0, - 'no-underscore-dangle': 0, - 'no-shadow': 0, - 'no-constant-condition': 0, - 'no-multi-spaces': 0, - 'dot-notation': [2, {'allowKeywords': false}] - }, - 'env': { - 'node': true - } -}; - -gulp.task('test', function (cb) { - gulp.src(SRC) - .pipe(istanbul()) // Covering files - .on('finish', function () { - gulp.src(TEST) - .pipe(mocha({ - reporter: 'spec', - timeout: 100000 // 100s - })) - .pipe(istanbul.writeReports()) // Creating the reports after tests runned - .on('end', cb); - }); -}); - -gulp.task('lint', function () { - return gulp.src(LINT) - .pipe(jshint('.jshintrc')) - .pipe(jshint.reporter(require('jshint-stylish'))) - .pipe(jshint.reporter('fail')) - .pipe(eslint(ESLINT_OPTION)) - .pipe(eslint.formatEach('compact', process.stderr)) - .pipe(eslint.failOnError()); -}); - - -/** - * Bumping version number and tagging the repository with it. - * Please read http://semver.org/ - * - * You can use the commands - * - * gulp patch # makes v0.1.0 -> v0.1.1 - * gulp feature # makes v0.1.1 -> v0.2.0 - * gulp release # makes v0.2.1 -> v1.0.0 - * - * To bump the version numbers accordingly after you did a patch, - * introduced a feature or made a backwards-incompatible release. - */ - -function inc(importance) { - // get all the files to bump version in - return gulp.src(['./package.json']) - // bump the version number in those files - .pipe(bump({type: importance})) - // save it back to filesystem - .pipe(gulp.dest('./')) - // commit the changed version number - .pipe(git.commit('Bumps package version')) - // read only one file to get the version number - .pipe(filter('package.json')) - // **tag it in the repository** - .pipe(tagVersion({ prefix: '' })); -} - -gulp.task('patch', [ 'travis' ], function () { return inc('patch'); }); -gulp.task('minor', [ 'travis' ], function () { return inc('minor'); }); -gulp.task('major', [ 'travis' ], function () { return inc('major'); }); - -gulp.task('travis', [ 'lint', 'test' ]); -gulp.task('default', [ 'travis' ]); diff --git a/tools/eslint/node_modules/doctrine/lib/doctrine.js b/tools/eslint/node_modules/doctrine/lib/doctrine.js index dd3cccb263ce71..d7ba412a80d839 100644 --- a/tools/eslint/node_modules/doctrine/lib/doctrine.js +++ b/tools/eslint/node_modules/doctrine/lib/doctrine.js @@ -70,6 +70,10 @@ return title === 'param' || title === 'argument' || title === 'arg'; } + function isReturnTitle(title) { + return title === 'return' || title === 'returns'; + } + function isProperty(title) { return title === 'property' || title === 'prop'; } @@ -88,10 +92,10 @@ } function isTypeParameterRequired(title) { - return isParamTitle(title) || title === 'define' || title === 'enum' || - title === 'implements' || title === 'return' || - title === 'this' || title === 'type' || title === 'typedef' || - title === 'returns' || isProperty(title); + return isParamTitle(title) || isReturnTitle(title) || + title === 'define' || title === 'enum' || + title === 'implements' || title === 'this' || + title === 'type' || title === 'typedef' || isProperty(title); } // Consider deprecation instead using 'isTypeParameterRequired' and 'Rules' declaration to pick when a type is optional/required @@ -159,7 +163,7 @@ index += 1; } - return result; + return result.replace(/\s+$/, ''); } // JSDoc Tag Parser @@ -202,7 +206,6 @@ while (last < length) { ch = source.charCodeAt(last); if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D /* '\r' */ && source.charCodeAt(last + 1) === 0x0A /* '\n' */)) { - lineNumber += 1; waiting = true; } else if (waiting) { if (ch === 0x40 /* '@' */) { @@ -324,6 +327,10 @@ name += scanIdentifier(last); } + if(source.charCodeAt(index) === 0x5B /* '[' */ && source.charCodeAt(index + 1) === 0x5D /* ']' */){ + name += advance(); + name += advance(); + } while (source.charCodeAt(index) === 0x2E /* '.' */ || source.charCodeAt(index) === 0x23 /* '#' */ || source.charCodeAt(index) === 0x7E /* '~' */) { @@ -333,13 +340,21 @@ } if (useBrackets) { + + // do we have a default value for this? if (source.charCodeAt(index) === 0x3D /* '=' */) { - // consume the '='' symbol name += advance(); + var bracketDepth = 1; // scan in the default value - while (index < last && source.charCodeAt(index) !== 0x5D /* ']' */) { + while (index < last) { + if (source.charCodeAt(index) === 0x5B /* '[' */) { + bracketDepth++; + } else if (source.charCodeAt(index) === 0x5D /* ']' */ && + --bracketDepth === 0) { + break; + } name += advance(); } } @@ -409,7 +424,7 @@ try { this._tag.type = parseType(this._title, this._last); if (!this._tag.type) { - if (!isParamTitle(this._title)) { + if (!isParamTitle(this._title) && !isReturnTitle(this._title)) { if (!this.addError('Missing or invalid tag type')) { return false; } @@ -581,7 +596,9 @@ // un-fix potentially sloppy declaration if (isParamTitle(this._title) && !this._tag.type && description && description.charAt(0) === '[') { this._tag.type = this._extra.name; - this._tag.name = undefined; + if (!this._tag.name) { + this._tag.name = undefined; + } if (!sloppy) { if (!this.addError('Missing or invalid tag name')) { @@ -656,6 +673,8 @@ 'this': ['parseNamePath', 'ensureEnd'], // http://usejsdoc.org/tags-todo.html 'todo': ['parseDescription'], + // http://usejsdoc.org/tags-typedef.html + 'typedef': ['parseType', 'parseNamePathOptional'], // http://usejsdoc.org/tags-variation.html 'variation': ['parseVariation'], // http://usejsdoc.org/tags-version.html @@ -689,13 +708,11 @@ } } - // Seek global index to end of this tag. - index = this._last; return this._tag; }; function parseTag(options) { - var title, parser; + var title, parser, tag; // skip to tag if (!skipToTag()) { @@ -707,14 +724,20 @@ // construct tag parser parser = new TagParser(options, title); - return parser.parse(); + tag = parser.parse(); + + // Seek global index to end of this tag. + while (index < parser._last) { + advance(); + } + return tag; } // // Parse JSDoc // - function scanJSDocDescription() { + function scanJSDocDescription(preserveWhitespace) { var description = '', ch, atAllowed; atAllowed = true; @@ -733,7 +756,8 @@ description += advance(); } - return trim(description); + + return preserveWhitespace ? description : trim(description); } function parse(comment, options) { @@ -772,7 +796,7 @@ sloppy = options.sloppy; strict = options.strict; - description = scanJSDocDescription(); + description = scanJSDocDescription(options.preserveWhitespace); while (true) { tag = parseTag(options); diff --git a/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json b/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json index b01fe6004b1ea8..c3eae771257d1e 100644 --- a/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json +++ b/tools/eslint/node_modules/doctrine/node_modules/esutils/package.json @@ -1,66 +1,92 @@ { - "name": "esutils", + "_args": [ + [ + "esutils@^1.1.6", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/doctrine" + ] + ], + "_from": "esutils@>=1.1.6 <2.0.0", + "_id": "esutils@1.1.6", + "_inCache": true, + "_installable": true, + "_location": "/eslint/doctrine/esutils", + "_npmUser": { + "email": "utatane.tea@gmail.com", + "name": "constellation" + }, + "_npmVersion": "2.0.0-alpha-5", + "_phantomChildren": {}, + "_requested": { + "name": "esutils", + "raw": "esutils@^1.1.6", + "rawSpec": "^1.1.6", + "scope": null, + "spec": ">=1.1.6 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/doctrine" + ], + "_resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", + "_shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", + "_shrinkwrap": null, + "_spec": "esutils@^1.1.6", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/doctrine", + "bugs": { + "url": "https://github.com/Constellation/esutils/issues" + }, + "dependencies": {}, "description": "utility box for ECMAScript language tools", - "homepage": "https://github.com/Constellation/esutils", - "main": "lib/utils.js", - "version": "1.1.6", - "engines": { - "node": ">=0.10.0" + "devDependencies": { + "chai": "~1.7.2", + "coffee-script": "~1.6.3", + "jshint": "2.1.5", + "mocha": "~1.12.0", + "regenerate": "~0.5.4", + "unicode-6.3.0": "~0.1.1" }, "directories": { "lib": "./lib" }, + "dist": { + "shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", + "tarball": "http://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, "files": [ "LICENSE.BSD", "README.md", "lib" ], + "gitHead": "a91c5ed6199d1019ef071f610848fcd5103ef153", + "homepage": "https://github.com/Constellation/esutils", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/esutils/raw/master/LICENSE.BSD" + } + ], + "main": "lib/utils.js", "maintainers": [ { "name": "constellation", "email": "utatane.tea@gmail.com" } ], + "name": "esutils", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+ssh://git@github.com/Constellation/esutils.git" }, - "devDependencies": { - "mocha": "~1.12.0", - "chai": "~1.7.2", - "jshint": "2.1.5", - "coffee-script": "~1.6.3", - "unicode-6.3.0": "~0.1.1", - "regenerate": "~0.5.4" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/Constellation/esutils/raw/master/LICENSE.BSD" - } - ], "scripts": { - "test": "npm run-script lint && npm run-script unit-test", + "generate-regex": "node tools/generate-identifier-regex.js", "lint": "jshint lib/*.js", - "unit-test": "mocha --compilers coffee:coffee-script -R spec", - "generate-regex": "node tools/generate-identifier-regex.js" - }, - "gitHead": "a91c5ed6199d1019ef071f610848fcd5103ef153", - "bugs": { - "url": "https://github.com/Constellation/esutils/issues" - }, - "_id": "esutils@1.1.6", - "_shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", - "_from": "esutils@>=1.1.6 <2.0.0", - "_npmVersion": "2.0.0-alpha-5", - "_npmUser": { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - "dist": { - "shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", - "tarball": "http://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" + "test": "npm run-script lint && npm run-script unit-test", + "unit-test": "mocha --compilers coffee:coffee-script -R spec" }, - "_resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", - "readme": "ERROR: No README data found!" + "version": "1.1.6" } diff --git a/tools/eslint/node_modules/doctrine/node_modules/isarray/README.md b/tools/eslint/node_modules/doctrine/node_modules/isarray/README.md deleted file mode 100644 index 052a62b8d7b7ae..00000000000000 --- a/tools/eslint/node_modules/doctrine/node_modules/isarray/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/eslint/node_modules/doctrine/node_modules/isarray/build/build.js b/tools/eslint/node_modules/doctrine/node_modules/isarray/build/build.js deleted file mode 100644 index ec58596aeebe4e..00000000000000 --- a/tools/eslint/node_modules/doctrine/node_modules/isarray/build/build.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module.exports) { - module.exports = {}; - module.client = module.component = true; - module.call(this, module.exports, require.relative(resolved), module); - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - var index = path + '/index.js'; - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - } - - if (require.aliases.hasOwnProperty(index)) { - return require.aliases[index]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("isarray/index.js", function(exports, require, module){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -}); -require.alias("isarray/index.js", "isarray/index.js"); - diff --git a/tools/eslint/node_modules/doctrine/node_modules/isarray/component.json b/tools/eslint/node_modules/doctrine/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683889015..00000000000000 --- a/tools/eslint/node_modules/doctrine/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/tools/eslint/node_modules/doctrine/node_modules/isarray/index.js b/tools/eslint/node_modules/doctrine/node_modules/isarray/index.js deleted file mode 100644 index 5f5ad45d46dda9..00000000000000 --- a/tools/eslint/node_modules/doctrine/node_modules/isarray/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; diff --git a/tools/eslint/node_modules/doctrine/node_modules/isarray/package.json b/tools/eslint/node_modules/doctrine/node_modules/isarray/package.json deleted file mode 100644 index 25c8581bee19f6..00000000000000 --- a/tools/eslint/node_modules/doctrine/node_modules/isarray/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "_id": "isarray@0.0.1", - "dist": { - "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "_from": "isarray@0.0.1", - "_npmVersion": "1.2.18", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - } -} diff --git a/tools/eslint/node_modules/doctrine/package.json b/tools/eslint/node_modules/doctrine/package.json index 7de168c4eabd37..1f0a3c7f4b91e3 100644 --- a/tools/eslint/node_modules/doctrine/package.json +++ b/tools/eslint/node_modules/doctrine/package.json @@ -1,27 +1,49 @@ { - "name": "doctrine", - "description": "JSDoc parser", - "homepage": "http://github.com/Constellation/doctrine.html", - "main": "lib/doctrine.js", - "version": "0.6.4", - "engines": { - "node": ">=0.10.0" + "_args": [ + [ + "doctrine@^0.7.1", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "doctrine@>=0.7.1 <0.8.0", + "_id": "doctrine@0.7.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/doctrine", + "_npmUser": { + "email": "nicholas@nczconsulting.com", + "name": "nzakas" }, - "directories": { - "lib": "./lib" + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "doctrine", + "raw": "doctrine@^0.7.1", + "rawSpec": "^0.7.1", + "scope": null, + "spec": ">=0.7.1 <0.8.0", + "type": "range" }, - "maintainers": [ - { - "name": "constellation", - "email": "utatane.tea@gmail.com" - } + "_requiredBy": [ + "/eslint" ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/Constellation/doctrine.git" + "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", + "_shasum": "7cb860359ba3be90e040b26b729ce4bfa654c523", + "_shrinkwrap": null, + "_spec": "doctrine@^0.7.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "bugs": { + "url": "https://github.com/eslint/doctrine/issues" + }, + "dependencies": { + "esutils": "^1.1.6", + "isarray": "0.0.1" }, + "description": "JSDoc parser", "devDependencies": { "coveralls": "^2.11.2", + "dateformat": "^1.0.11", + "eslint": "^1.9.0", "gulp": "^3.8.10", "gulp-bump": "^0.1.13", "gulp-eslint": "^0.5.0", @@ -32,40 +54,62 @@ "gulp-mocha": "^2.0.0", "gulp-tag-version": "^1.2.1", "jshint-stylish": "^1.0.0", + "linefix": "^0.1.1", + "mocha": "^2.3.3", + "npm-license": "^0.3.1", + "semver": "^5.0.3", + "shelljs": "^0.5.3", + "shelljs-nodecli": "^0.1.1", "should": "^5.0.1" }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "7cb860359ba3be90e040b26b729ce4bfa654c523", + "tarball": "http://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "LICENSE.BSD", + "LICENSE.closure-compiler", + "LICENSE.esprima", + "README.md", + "lib" + ], + "gitHead": "d78e387ce941880ae97ca768092ee11029bdb916", + "homepage": "https://github.com/eslint/doctrine", "licenses": [ { "type": "BSD", - "url": "http://github.com/Constellation/doctrine/raw/master/LICENSE.BSD" + "url": "http://github.com/eslint/doctrine/raw/master/LICENSE.BSD" + } + ], + "main": "lib/doctrine.js", + "maintainers": [ + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + }, + { + "name": "nzakas", + "email": "nicholas@nczconsulting.com" } ], + "name": "doctrine", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/eslint/doctrine.git" + }, "scripts": { - "test": "gulp", - "unit-test": "gulp test", + "coveralls": "cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", "lint": "gulp lint", - "coveralls": "cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "dependencies": { - "esutils": "^1.1.6", - "isarray": "0.0.1" - }, - "gitHead": "0835299b485ecdfa908d20628d6c8900144590ff", - "bugs": { - "url": "https://github.com/Constellation/doctrine/issues" - }, - "_id": "doctrine@0.6.4", - "_shasum": "81428491a942ef18b0492056eda3800eee57d61d", - "_from": "doctrine@>=0.6.2 <0.7.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - "dist": { - "shasum": "81428491a942ef18b0492056eda3800eee57d61d", - "tarball": "http://registry.npmjs.org/doctrine/-/doctrine-0.6.4.tgz" + "test": "gulp", + "unit-test": "gulp test" }, - "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.6.4.tgz", - "readme": "ERROR: No README data found!" + "version": "0.7.2" } diff --git a/tools/eslint/node_modules/doctrine/test/midstream.js b/tools/eslint/node_modules/doctrine/test/midstream.js deleted file mode 100644 index 2e71bd14e1098e..00000000000000 --- a/tools/eslint/node_modules/doctrine/test/midstream.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2014 Yusuke Suzuki - - 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 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. -*/ -/*global require describe it*/ -/*jslint node:true */ -'use strict'; - -var fs = require('fs'), - path = require('path'), - root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), - doctrine = require(root); -require('should'); - -describe('midstream', function () { - it('parseType', function () { - var res = doctrine.parseType('string name', { midstream: true }); - res.should.eql({ - "expression": { - "name": "string", - "type": "NameExpression" - }, - "index": 6 - }); - }); - - it('parseParamType', function () { - var res = doctrine.parseParamType('...test ok', { midstream: true }); - res.should.eql({ - "expression": { - "expression": { - "name": "test", - "type": "NameExpression" - }, - "type": "RestType" - }, - "index": 7 - }); - }); -}); - -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/eslint/node_modules/doctrine/test/parse.js b/tools/eslint/node_modules/doctrine/test/parse.js deleted file mode 100644 index 851e67c0d9a87e..00000000000000 --- a/tools/eslint/node_modules/doctrine/test/parse.js +++ /dev/null @@ -1,2219 +0,0 @@ -/* - Copyright (C) 2013 Yusuke Suzuki - - 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 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. -*/ -/*global require describe it*/ -/*jslint node:true */ -'use strict'; - -var fs = require('fs'), - path = require('path'), - root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), - doctrine = require(root); -require('should'); - -describe('parse', function () { - it('alias', function () { - var res = doctrine.parse('/** @alias */', { unwrap: true }); - res.tags.should.have.length(0); - }); - - it('alias with name', function () { - var res = doctrine.parse('/** @alias aliasName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'alias'); - res.tags[0].should.have.property('name', 'aliasName'); - }); - - it('alias with namepath', function () { - var res = doctrine.parse('/** @alias aliasName.OK */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'alias'); - res.tags[0].should.have.property('name', 'aliasName.OK'); - }); - - it('const', function () { - var res = doctrine.parse('/** @const */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'const'); - }); - - it('const with name', function () { - var res = doctrine.parse('/** @const constname */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'const'); - res.tags[0].should.have.property('name', 'constname'); - }); - - it('constant with name', function () { - var res = doctrine.parse('/** @constant constname */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'constant'); - res.tags[0].should.have.property('name', 'constname'); - }); - - it('const with type and name', function () { - var res = doctrine.parse('/** @const {String} constname */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'const'); - res.tags[0].should.have.property('name', 'constname'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('constant with type and name', function () { - var res = doctrine.parse('/** @constant {String} constname */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'constant'); - res.tags[0].should.have.property('name', 'constname'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('const multiple', function () { - var res = doctrine.parse("/**@const\n @const*/", { unwrap: true }); - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'const'); - res.tags[1].should.have.property('title', 'const'); - }); - - it('const double', function () { - var res = doctrine.parse("/**@const\n @const*/", { unwrap: true }); - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'const'); - res.tags[1].should.have.property('title', 'const'); - }); - - it('const triple', function () { - var res = doctrine.parse( - [ - "/**", - " * @const @const", - " * @const @const", - " * @const @const", - " */" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(3); - res.tags[0].should.have.property('title', 'const'); - res.tags[1].should.have.property('title', 'const'); - res.tags[2].should.have.property('title', 'const'); - }); - - it('constructor', function () { - var res = doctrine.parse('/** @constructor */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'constructor'); - }); - - it('constructor with type', function () { - var res = doctrine.parse('/** @constructor {Object} */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'constructor'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('constructor with type and name', function () { - var res = doctrine.parse('/** @constructor {Object} objName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'constructor'); - res.tags[0].should.have.property('name', 'objName'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('class', function () { - var res = doctrine.parse('/** @class */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'class'); - }); - - it('class with type', function () { - var res = doctrine.parse('/** @class {Object} */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'class'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('class with type and name', function () { - var res = doctrine.parse('/** @class {Object} objName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'class'); - res.tags[0].should.have.property('name', 'objName'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('deprecated', function () { - var res = doctrine.parse('/** @deprecated */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'deprecated'); - }); - - it('deprecated', function () { - var res = doctrine.parse('/** @deprecated some text here describing why it is deprecated */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'deprecated'); - res.tags[0].should.have.property('description', 'some text here describing why it is deprecated'); - }); - - it('func', function () { - var res = doctrine.parse('/** @func */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'func'); - }); - - it('func with name', function () { - var res = doctrine.parse('/** @func thingName.func */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'func'); - res.tags[0].should.have.property('name', 'thingName.func'); - }); - - it('func with type', function () { - var res = doctrine.parse('/** @func {Object} thingName.func */', { unwrap: true }); - res.tags.should.have.length(0); - // func does not accept type - }); - - it('function', function () { - var res = doctrine.parse('/** @function */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'function'); - }); - - it('function with name', function () { - var res = doctrine.parse('/** @function thingName.function */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'function'); - res.tags[0].should.have.property('name', 'thingName.function'); - }); - - it('function with type', function () { - var res = doctrine.parse('/** @function {Object} thingName.function */', { unwrap: true }); - res.tags.should.have.length(0); - // function does not accept type - }); - - it('member', function () { - var res = doctrine.parse('/** @member */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'member'); - }); - - it('member with name', function () { - var res = doctrine.parse('/** @member thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'member'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('member with type', function () { - var res = doctrine.parse('/** @member {Object} thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'member'); - res.tags[0].should.have.property('name', 'thingName.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('method', function () { - var res = doctrine.parse('/** @method */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'method'); - }); - - it('method with name', function () { - var res = doctrine.parse('/** @method thingName.function */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'method'); - res.tags[0].should.have.property('name', 'thingName.function'); - }); - - it('method with type', function () { - var res = doctrine.parse('/** @method {Object} thingName.function */', { unwrap: true }); - res.tags.should.have.length(0); - // method does not accept type - }); - - it('mixes', function () { - var res = doctrine.parse('/** @mixes */', { unwrap: true }); - res.tags.should.have.length(0); - }); - - it('mixes with name', function () { - var res = doctrine.parse('/** @mixes thingName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'mixes'); - res.tags[0].should.have.property('name', 'thingName'); - }); - - it('mixes with namepath', function () { - var res = doctrine.parse('/** @mixes thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'mixes'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('mixin', function () { - var res = doctrine.parse('/** @mixin */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'mixin'); - }); - - it('mixin with name', function () { - var res = doctrine.parse('/** @mixin thingName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'mixin'); - res.tags[0].should.have.property('name', 'thingName'); - }); - - it('mixin with namepath', function () { - var res = doctrine.parse('/** @mixin thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'mixin'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('module', function () { - var res = doctrine.parse('/** @module */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'module'); - }); - - it('module with name', function () { - var res = doctrine.parse('/** @module thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'module'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('module with type', function () { - var res = doctrine.parse('/** @module {Object} thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'module'); - res.tags[0].should.have.property('name', 'thingName.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('name', function () { - var res = doctrine.parse('/** @name thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'name'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('name', function () { - var res = doctrine.parse('/** @name thingName#name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'name'); - res.tags[0].should.have.property('name', 'thingName#name'); - }); - - it('name', function () { - var res = doctrine.parse('/** @name thingName~name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'name'); - res.tags[0].should.have.property('name', 'thingName~name'); - }); - - it('name', function () { - var res = doctrine.parse('/** @name {thing} thingName.name */', { unwrap: true }); - // name does not accept type - res.tags.should.have.length(0); - }); - - it('namespace', function () { - var res = doctrine.parse('/** @namespace */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'namespace'); - }); - - it('namespace with name', function () { - var res = doctrine.parse('/** @namespace thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'namespace'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('namespace with type', function () { - var res = doctrine.parse('/** @namespace {Object} thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'namespace'); - res.tags[0].should.have.property('name', 'thingName.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('param', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {String} userName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'userName'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('param with properties', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {String} user.name", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'user.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('arg with properties', function () { - var res = doctrine.parse( - [ - "/**", - " * @arg {String} user.name", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'arg'); - res.tags[0].should.have.property('name', 'user.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('argument with properties', function () { - var res = doctrine.parse( - [ - "/**", - " * @argument {String} user.name", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'argument'); - res.tags[0].should.have.property('name', 'user.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('param typeless', function () { - var res = doctrine.parse( - [ - "/**", - " * @param userName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - title: 'param', - type: null, - name: 'userName', - description: null - }); - - var res = doctrine.parse( - [ - "/**", - " * @param userName Something descriptive", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - title: 'param', - type: null, - name: 'userName', - description: 'Something descriptive' - }); - - var res = doctrine.parse( - [ - "/**", - " * @param user.name Something descriptive", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - title: 'param', - type: null, - name: 'user.name', - description: 'Something descriptive' - }); - }); - - it('param broken', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {String} userName", - " * @param {String userName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'userName'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'String' - }); - }); - - it('param record', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {{ok:String}} userName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'userName'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'RecordType', - fields: [{ - type: 'FieldType', - key: 'ok', - value: { - type: 'NameExpression', - name: 'String' - } - }] - }); - }); - - it('param record broken', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {{ok:String} userName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.be.empty; - }); - - it('param multiple lines', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {string|", - " * number} userName", - " * }}", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'userName'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'UnionType', - elements: [{ - type: 'NameExpression', - name: 'string' - }, { - type: 'NameExpression', - name: 'number' - }] - }); - }); - - it('param without braces', function () { - var res = doctrine.parse( - [ - "/**", - " * @param string name description", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'string'); - res.tags[0].should.have.property('type', null); - res.tags[0].should.have.property('description', 'name description'); - }); - - it('param w/ hyphen before description', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {string} name - description", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - title: 'param', - type: { - type: 'NameExpression', - name: 'string' - }, - name: 'name', - description: 'description' - }); - }); - - it('param w/ hyphen + leading space before description', function () { - var res = doctrine.parse( - [ - "/**", - " * @param {string} name - description", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - title: 'param', - type: { - type: 'NameExpression', - name: 'string' - }, - name: 'name', - description: ' description' - }); - }); - - it('description and param separated by blank line', function () { - var res = doctrine.parse( - [ - "/**", - " * Description", - " * blah blah blah", - " *", - " * @param {string} name description", - "*/" - ].join('\n'), { unwrap: true }); - res.description.should.eql('Description\nblah blah blah'); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'string' - }); - res.tags[0].should.have.property('description', 'description'); - }); - - it('regular block comment instead of jsdoc-style block comment', function () { - var res = doctrine.parse( - [ - "/*", - " * Description", - " * blah blah blah", - "*/" - ].join('\n'), { unwrap: true }); - res.description.should.eql("Description\nblah blah blah"); - }); - - it('augments', function () { - var res = doctrine.parse('/** @augments */', { unwrap: true }); - res.tags.should.have.length(1); - }); - - it('augments with name', function () { - var res = doctrine.parse('/** @augments ClassName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'augments'); - res.tags[0].should.have.property('name', 'ClassName'); - }); - - it('augments with type', function () { - var res = doctrine.parse('/** @augments {ClassName} */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'augments'); - res.tags[0].should.have.property('type', { - type: 'NameExpression', - name: 'ClassName' - }); - }); - - it('augments with name', function () { - var res = doctrine.parse('/** @augments ClassName.OK */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'augments'); - res.tags[0].should.have.property('name', 'ClassName.OK'); - }); - - it('extends', function () { - var res = doctrine.parse('/** @extends */', { unwrap: true }); - res.tags.should.have.length(1); - }); - - it('extends with name', function () { - var res = doctrine.parse('/** @extends ClassName */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'extends'); - res.tags[0].should.have.property('name', 'ClassName'); - }); - - it('extends with type', function () { - var res = doctrine.parse('/** @extends {ClassName} */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'extends'); - res.tags[0].should.have.property('type', { - type: 'NameExpression', - name: 'ClassName' - }); - }); - - it('extends with namepath', function () { - var res = doctrine.parse('/** @extends ClassName.OK */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'extends'); - res.tags[0].should.have.property('name', 'ClassName.OK'); - }); - - it('prop', function () { - var res = doctrine.parse( - [ - "/**", - " * @prop {string} thingName - does some stuff", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'prop'); - res.tags[0].should.have.property('description', 'does some stuff'); - res.tags[0].type.should.have.property('name', 'string'); - res.tags[0].should.have.property('name', 'thingName'); - }); - - it('prop without type', function () { - var res = doctrine.parse( - [ - "/**", - " * @prop thingName - does some stuff", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(0); - }); - - - it('property', function () { - var res = doctrine.parse( - [ - "/**", - " * @property {string} thingName - does some stuff", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'property'); - res.tags[0].should.have.property('description', 'does some stuff'); - res.tags[0].type.should.have.property('name', 'string'); - res.tags[0].should.have.property('name', 'thingName'); - }); - - it('property without type', function () { - var res = doctrine.parse( - [ - "/**", - " * @property thingName - does some stuff", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(0); - }); - - it('property with nested name', function () { - var res = doctrine.parse( - [ - "/**", - " * @property {string} thingName.name - does some stuff", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'property'); - res.tags[0].should.have.property('description', 'does some stuff'); - res.tags[0].type.should.have.property('name', 'string'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('throws', function () { - var res = doctrine.parse( - [ - "/**", - " * @throws {Error} if something goes wrong", - " */" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'throws'); - res.tags[0].should.have.property('description', 'if something goes wrong'); - res.tags[0].type.should.have.property('name', 'Error'); - }); - - it('throws without type', function () { - var res = doctrine.parse( - [ - "/**", - " * @throws if something goes wrong", - " */" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'throws'); - res.tags[0].should.have.property('description', 'if something goes wrong'); - }); - - it('kind', function () { - var res = doctrine.parse('/** @kind class */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'kind'); - res.tags[0].should.have.property('kind', 'class'); - }); - - it('kind error', function () { - var res = doctrine.parse('/** @kind ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Invalid kind name \'ng\''); - }); - - it('todo', function () { - var res = doctrine.parse('/** @todo Write the documentation */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'todo'); - res.tags[0].should.have.property('description', 'Write the documentation'); - }); - - it('summary', function () { - // japanese lang - var res = doctrine.parse('/** @summary ゆるゆり3期おめでとー */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'summary'); - res.tags[0].should.have.property('description', 'ゆるゆり3期おめでとー'); - }); - - it('variation', function () { - // japanese lang - var res = doctrine.parse('/** @variation 42 */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'variation'); - res.tags[0].should.have.property('variation', 42); - }); - - it('variation error', function () { - // japanese lang - var res = doctrine.parse('/** @variation Animation */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Invalid variation \'Animation\''); - }); - - it('access', function () { - var res = doctrine.parse('/** @access public */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'access'); - res.tags[0].should.have.property('access', 'public'); - }); - - it('access error', function () { - var res = doctrine.parse('/** @access ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Invalid access name \'ng\''); - }); - - it('public', function () { - var res = doctrine.parse('/** @public */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'public'); - }); - - it('public type and description', function () { - var res = doctrine.parse('/** @public {number} ok */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'public'); - res.tags[0].should.have.property('description', 'ok'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'number' - }); - }); - - it('protected', function () { - var res = doctrine.parse('/** @protected */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'protected'); - }); - - it('protected type and description', function () { - var res = doctrine.parse('/** @protected {number} ok */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'protected'); - res.tags[0].should.have.property('description', 'ok'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'number' - }); - }); - - it('private', function () { - var res = doctrine.parse('/** @private */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'private'); - }); - - it('private type and description', function () { - var res = doctrine.parse('/** @private {number} ok */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'private'); - res.tags[0].should.have.property('description', 'ok'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'number' - }); - }); - - it('readonly', function () { - var res = doctrine.parse('/** @readonly */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'readonly'); - }); - - it('readonly error', function () { - var res = doctrine.parse('/** @readonly ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Unknown content \'ng\''); - }); - - it('requires', function () { - var res = doctrine.parse('/** @requires */', { unwrap: true }); - res.tags.should.have.length(0); - }); - - it('requires with module name', function () { - var res = doctrine.parse('/** @requires name.path */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'requires'); - res.tags[0].should.have.property('name', 'name.path'); - }); - - it('global', function () { - var res = doctrine.parse('/** @global */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'global'); - }); - - it('global error', function () { - var res = doctrine.parse('/** @global ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Unknown content \'ng\''); - }); - - it('inner', function () { - var res = doctrine.parse('/** @inner */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'inner'); - }); - - it('inner error', function () { - var res = doctrine.parse('/** @inner ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Unknown content \'ng\''); - }); - - it('instance', function () { - var res = doctrine.parse('/** @instance */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'instance'); - }); - - it('instance error', function () { - var res = doctrine.parse('/** @instance ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Unknown content \'ng\''); - }); - - it('since', function () { - var res = doctrine.parse('/** @since 1.2.1 */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'since'); - res.tags[0].should.have.property('description', '1.2.1'); - }); - - it('static', function () { - var res = doctrine.parse('/** @static */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'static'); - }); - - it('static error', function () { - var res = doctrine.parse('/** @static ng */', { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Unknown content \'ng\''); - }); - - it('this', function () { - var res = doctrine.parse( - [ - "/**", - " * @this thingName", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'this'); - res.tags[0].should.have.property('name', 'thingName'); - }); - - it('this with namepath', function () { - var res = doctrine.parse( - [ - "/**", - " * @this thingName.name", - "*/" - ].join('\n'), { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'this'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('this error', function () { - var res = doctrine.parse( - [ - "/**", - " * @this", - "*/" - ].join('\n'), { unwrap: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'this'); - res.tags[0].should.have.property('errors'); - res.tags[0].errors.should.have.length(1); - res.tags[0].errors[0].should.equal('Missing or invalid tag name'); - }); - - it('var', function () { - var res = doctrine.parse('/** @var */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'var'); - }); - - it('var with name', function () { - var res = doctrine.parse('/** @var thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'var'); - res.tags[0].should.have.property('name', 'thingName.name'); - }); - - it('var with type', function () { - var res = doctrine.parse('/** @var {Object} thingName.name */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'var'); - res.tags[0].should.have.property('name', 'thingName.name'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - type: 'NameExpression', - name: 'Object' - }); - }); - - it('version', function () { - var res = doctrine.parse('/** @version 1.2.1 */', { unwrap: true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'version'); - res.tags[0].should.have.property('description', '1.2.1'); - }); - - it('incorrect name', function () { - var res = doctrine.parse('/** @name thingName#%name */', { unwrap: true }); - // name does not accept type - res.tags.should.have.length(0); - res.should.eql({ - "description": "", - "tags": [ - ] - }); - }); -}); - -describe('parseType', function () { - it('union type closure-compiler extended', function () { - var type = doctrine.parseType("string|number"); - type.should.eql({ - type: 'UnionType', - elements: [{ - type: 'NameExpression', - name: 'string' - }, { - type: 'NameExpression', - name: 'number' - }] - }); - }); - - it('empty union type', function () { - var type = doctrine.parseType("()"); - type.should.eql({ - type: 'UnionType', - elements: [] - }); - }); - - it('comma last array type', function () { - var type = doctrine.parseType("[string,]"); - type.should.eql({ - type: 'ArrayType', - elements: [{ - type: 'NameExpression', - name: 'string' - }] - }); - }); - - it('array type of all literal', function () { - var type = doctrine.parseType("[*]"); - type.should.eql({ - type: 'ArrayType', - elements: [{ - type: 'AllLiteral' - }] - }); - }); - - it('array type of nullable literal', function () { - var type = doctrine.parseType("[?]"); - type.should.eql({ - type: 'ArrayType', - elements: [{ - type: 'NullableLiteral' - }] - }); - }); - - it('comma last record type', function () { - var type = doctrine.parseType("{,}"); - type.should.eql({ - type: 'RecordType', - fields: [] - }); - }); - - it('type application', function () { - var type = doctrine.parseType("Array."); - type.should.eql({ - type: 'TypeApplication', - expression: { - type: 'NameExpression', - name: 'Array' - }, - applications: [{ - type: 'NameExpression', - name: 'String' - }] - }); - }); - - it('type application with NullableLiteral', function () { - var type = doctrine.parseType("Array"); - type.should.eql({ - type: 'TypeApplication', - expression: { - type: 'NameExpression', - name: 'Array' - }, - applications: [{ - type: 'NullableLiteral' - }] - }); - }); - - it('type application with multiple patterns', function () { - var type = doctrine.parseType("Array."); - type.should.eql({ - type: 'TypeApplication', - expression: { - type: 'NameExpression', - name: 'Array' - }, - applications: [{ - type: 'NameExpression', - name: 'String' - }, { - type: 'NameExpression', - name: 'Number' - }] - }); - }); - - it('type application without dot', function () { - var type = doctrine.parseType("Array"); - type.should.eql({ - type: 'TypeApplication', - expression: { - type: 'NameExpression', - name: 'Array' - }, - applications: [{ - type: 'NameExpression', - name: 'String' - }] - }); - }); - - it('array-style type application', function () { - var type = doctrine.parseType("String[]"); - type.should.eql({ - type: 'TypeApplication', - expression: { - type: 'NameExpression', - name: 'Array' - }, - applications: [{ - type: 'NameExpression', - name: 'String' - }] - }); - }); - - it('function type simple', function () { - var type = doctrine.parseType("function()"); - type.should.eql({ - "type": "FunctionType", - "params": [], - "result": null - }); - }); - - it('function type with name', function () { - var type = doctrine.parseType("function(a)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "NameExpression", - "name": "a" - } - ], - "result": null - }); - }); - it('function type with name and type', function () { - var type = doctrine.parseType("function(a:b)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "ParameterType", - "name": "a", - "expression": { - "type": "NameExpression", - "name": "b" - } - } - ], - "result": null - }); - }); - it('function type with optional param', function () { - var type = doctrine.parseType("function(a=)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "a" - } - } - ], - "result": null - }); - }); - it('function type with optional param name and type', function () { - var type = doctrine.parseType("function(a:b=)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "OptionalType", - "expression": { - "type": "ParameterType", - "name": "a", - "expression": { - "type": "NameExpression", - "name": "b" - } - } - } - ], - "result": null - }); - }); - it('function type with rest param', function () { - var type = doctrine.parseType("function(...a)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "RestType", - "expression": { - "type": "NameExpression", - "name": "a" - } - } - ], - "result": null - }); - }); - it('function type with rest param name and type', function () { - var type = doctrine.parseType("function(...a:b)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "RestType", - "expression": { - "type": "ParameterType", - "name": "a", - "expression": { - "type": "NameExpression", - "name": "b" - } - } - } - ], - "result": null - }); - }); - - it('function type with optional rest param', function () { - var type = doctrine.parseType("function(...a=)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "RestType", - "expression": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "a" - } - } - } - ], - "result": null - }); - }); - it('function type with optional rest param name and type', function () { - var type = doctrine.parseType("function(...a:b=)"); - type.should.eql({ - "type": "FunctionType", - "params": [ - { - "type": "RestType", - "expression": { - "type": "OptionalType", - "expression": { - "type": "ParameterType", - "name": "a", - "expression": { - "type": "NameExpression", - "name": "b" - } - } - } - }], - "result": null - }); - }); - - it('string value in type', function () { - var type; - - type = doctrine.parseType("{'ok':String}"); - type.should.eql({ - "fields": [ - { - "key": "ok", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - } - ], - "type": "RecordType" - }); - - type = doctrine.parseType('{"\\r\\n\\t\\u2028\\x20\\u20\\b\\f\\v\\\r\n\\\n\\0\\07\\012\\o":String}'); - type.should.eql({ - "fields": [ - { - "key": "\r\n\t\u2028\x20u20\b\f\v\0\u0007\u000ao", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - } - ], - "type": "RecordType" - }); - - doctrine.parseType.bind(doctrine, "{'ok\":String}").should.throw('unexpected quote'); - doctrine.parseType.bind(doctrine, "{'o\n':String}").should.throw('unexpected quote'); - }); - - it('number value in type', function () { - var type; - - type = doctrine.parseType("{20:String}"); - type.should.eql({ - "fields": [ - { - "key": "20", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - } - ], - "type": "RecordType" - }); - - type = doctrine.parseType("{.2:String, 30:Number, 0x20:String}"); - type.should.eql({ - "fields": [ - { - "key": "0.2", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - }, - { - "key": "30", - "type": "FieldType", - "value": { - "name": "Number", - "type": "NameExpression" - } - }, - { - "key": "32", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - } - ], - "type": "RecordType" - }); - - - type = doctrine.parseType("{0X2:String, 0:Number, 100e200:String, 10e-20:Number}"); - type.should.eql({ - "fields": [ - { - "key": "2", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - }, - { - "key": "0", - "type": "FieldType", - "value": { - "name": "Number", - "type": "NameExpression" - } - }, - { - "key": "1e+202", - "type": "FieldType", - "value": { - "name": "String", - "type": "NameExpression" - } - }, - { - "key": "1e-19", - "type": "FieldType", - "value": { - "name": "Number", - "type": "NameExpression" - } - } - ], - "type": "RecordType" - }); - - - doctrine.parseType.bind(doctrine, "{0x:String}").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{0x").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{0xd").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{0x2_:").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{021:").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{021_:").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{021").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{08").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{0y").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{0").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{100e2").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{100e-2").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{100e-200:").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "{100e:").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "function(number=, string)").should.throw('not reach to EOF'); - }); - - it('dotted type', function () { - var type; - type = doctrine.parseType("Cocoa.Cappuccino"); - type.should.eql({ - "name": "Cocoa.Cappuccino", - "type": "NameExpression" - }); - }); - - it('rest array type', function () { - var type; - type = doctrine.parseType("[string,...string]"); - type.should.eql({ - "elements": [ - { - "name": "string", - "type": "NameExpression" - }, - { - "expression": { - "name": "string", - "type": "NameExpression" - }, - "type": "RestType" - } - ], - "type": "ArrayType" - }); - }); - - it ('nullable type', function () { - var type; - type = doctrine.parseType("string?"); - type.should.eql({ - "expression": { - "name": "string", - "type": "NameExpression" - }, - "prefix": false, - "type": "NullableType" - }); - }); - - it ('non-nullable type', function () { - var type; - type = doctrine.parseType("string!"); - type.should.eql({ - "expression": { - "name": "string", - "type": "NameExpression" - }, - "prefix": false, - "type": "NonNullableType" - }); - }); - - it ('toplevel multiple pipe type', function () { - var type; - type = doctrine.parseType("string|number|Test"); - type.should.eql({ - "elements": [ - { - "name": "string", - "type": "NameExpression" - }, - { - "name": "number", - "type": "NameExpression" - }, - { - "name": "Test", - "type": "NameExpression" - } - ], - "type": "UnionType" - }); - }); - - it('illegal tokens', function () { - doctrine.parseType.bind(doctrine, ".").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, ".d").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "(").should.throw('unexpected token'); - doctrine.parseType.bind(doctrine, "Test.").should.throw('unexpected token'); - }); -}); - -describe('parseParamType', function () { - it('question', function () { - var type = doctrine.parseParamType("?"); - type.should.eql({ - type: 'NullableLiteral' - }); - }); - - it('question option', function () { - var type = doctrine.parseParamType("?="); - type.should.eql({ - type: 'OptionalType', - expression: { - type: 'NullableLiteral' - } - }); - }); - - it('function option parameters former', function () { - var type = doctrine.parseParamType("function(?, number)"); - type.should.eql({ - type: 'FunctionType', - params: [{ - type: 'NullableLiteral' - }, { - type: 'NameExpression', - name: 'number' - }], - result: null - }); - }); - - it('function option parameters latter', function () { - var type = doctrine.parseParamType("function(number, ?)"); - type.should.eql({ - type: 'FunctionType', - params: [{ - type: 'NameExpression', - name: 'number' - }, { - type: 'NullableLiteral' - }], - result: null - }); - }); - - it('function type union', function () { - var type = doctrine.parseParamType("function(): ?|number"); - type.should.eql({ - type: 'UnionType', - elements: [{ - type: 'FunctionType', - params: [], - result: { - type: 'NullableLiteral' - } - }, { - type: 'NameExpression', - name: 'number' - }] - }); - }); -}); - -describe('invalid', function () { - it('empty union pipe', function () { - doctrine.parseType.bind(doctrine, "(|)").should.throw(); - doctrine.parseType.bind(doctrine, "(string|)").should.throw(); - doctrine.parseType.bind(doctrine, "(string||)").should.throw(); - }); - - it('comma only array type', function () { - doctrine.parseType.bind(doctrine, "[,]").should.throw(); - }); - - it('comma only record type', function () { - doctrine.parseType.bind(doctrine, "{,,}").should.throw(); - }); - - it('incorrect bracket', function () { - doctrine.parseParamType.bind(doctrine, "int[").should.throw(); - }); -}); - -describe('tags option', function() { - it ('only param', function() { - var res = doctrine.parse( - [ - "/**", - " * @const @const", - " * @param {String} y", - " */" - ].join('\n'), { tags: ['param'], unwrap:true }); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'y'); - }); - - it ('param and type', function() { - var res = doctrine.parse( - [ - "/**", - " * @const x", - " * @param {String} y", - " * @type {String} ", - " */" - ].join('\n'), { tags: ['param', 'type'], unwrap:true }); - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('name', 'y'); - res.tags[1].should.have.property('title', 'type'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'String'); - }); - -}); - -describe('invalid tags', function() { - it ('bad tag 1', function() { - doctrine.parse.bind(doctrine, - [ - "/**", - " * @param {String} hucairz", - " */" - ].join('\n'), { tags: 1, unwrap:true }).should.throw(); - }); - - it ('bad tag 2', function() { - doctrine.parse.bind(doctrine, - [ - "/**", - " * @param {String} hucairz", - " */" - ].join('\n'), { tags: ['a', 1], unwrap:true }).should.throw(); - }); -}); - -describe('optional params', function() { - - // should fail since sloppy option not set - it('failure 0', function() { - doctrine.parse( - ["/**", " * @param {String} [val]", " */"].join('\n'), { - unwrap: true - }).should.eql({ - "description": "", - "tags": [] - }); - }); - - it('failure 1', function() { - doctrine.parse( - ["/**", " * @param [val", " */"].join('\n'), { - unwrap: true, sloppy: true - }).should.eql({ - "description": "", - "tags": [] - }); - }); - - it('success 1', function() { - doctrine.parse( - ["/**", " * @param {String} [val]", " */"].join('\n'), { - unwrap: true, sloppy: true - }).should.eql({ - "description": "", - "tags": [{ - "title": "param", - "description": null, - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "String" - } - }, - "name": "val" - }] - }); - }); - it('success 2', function() { - doctrine.parse( - ["/**", " * @param {String=} val", " */"].join('\n'), { - unwrap: true, sloppy: true - }).should.eql({ - "description": "", - "tags": [{ - "title": "param", - "description": null, - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "String" - } - }, - "name": "val" - }] - }); - }); - - it('success 3', function() { - doctrine.parse( - ["/**", " * @param {String=} [val=abc] some description", " */"].join('\n'), - { unwrap: true, sloppy: true} - ).should.eql({ - "description": "", - "tags": [{ - "title": "param", - "description": "some description", - "type": { - "type": "OptionalType", - "expression": { - "type": "NameExpression", - "name": "String" - } - }, - "name": "val", - "default": "abc" - }] - }); - }); - - it('line numbers', function() { - var res = doctrine.parse( - [ - "/**", - " * @param {string} foo", - " * @returns {string}", - " *", - " * @example", - " * f('blah'); // => undefined", - " */" - ].join('\n'), - { unwrap: true, lineNumbers: true } - ); - - res.tags[0].should.have.property('lineNumber', 1); - res.tags[1].should.have.property('lineNumber', 2); - res.tags[2].should.have.property('lineNumber', 4); - }); - - it('should handle \\r\\n line endings correctly', function() { - var res = doctrine.parse( - [ - "/**", - " * @param {string} foo", - " * @returns {string}", - " *", - " * @example", - " * f('blah'); // => undefined", - " */" - ].join('\r\n'), - { unwrap: true, lineNumbers: true } - ); - - res.tags[0].should.have.property('lineNumber', 1); - res.tags[1].should.have.property('lineNumber', 2); - res.tags[2].should.have.property('lineNumber', 4); - }); -}); - -describe('recovery tests', function() { - it ('params 2', function () { - var res = doctrine.parse( - [ - "@param f", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // ensure both parameters are OK - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('type', null); - res.tags[0].should.have.property('name', 'f'); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('params 2', function () { - var res = doctrine.parse( - [ - "@param string f", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // ensure first parameter is OK even with invalid type name - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('type', null); - res.tags[0].should.have.property('name', 'string'); - res.tags[0].should.have.property('description', 'f'); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('return 1', function() { - var res = doctrine.parse( - [ - "@returns" - ].join('\n'), { recoverable: true }); - - // return tag should exist - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'returns'); - res.tags[0].should.have.property('type', null); - }); - it ('return 2', function() { - var res = doctrine.parse( - [ - "@returns", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // return tag should exist as well as next tag - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', 'returns'); - res.tags[0].should.have.property('type', null); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('extra @ 1', function() { - var res = doctrine.parse( - [ - "@", - "@returns", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // empty tag name shouldn't affect subsequent tags - res.tags.should.have.length(3); - res.tags[0].should.have.property('title', ''); - res.tags[0].should.not.have.property('type'); - - res.tags[1].should.have.property('title', 'returns'); - res.tags[1].should.have.property('type', null); - - res.tags[2].should.have.property('title', 'param'); - res.tags[2].should.have.property('type'); - res.tags[2].type.should.have.property('name', 'string'); - res.tags[2].type.should.have.property('type', 'NameExpression'); - res.tags[2].should.have.property('name', 'f2'); - }); - - it ('extra @ 2', function() { - var res = doctrine.parse( - [ - "@ invalid name", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // empty tag name shouldn't affect subsequent tags - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', ''); - res.tags[0].should.not.have.property('type'); - res.tags[0].should.not.have.property('name'); - res.tags[0].should.have.property('description', 'invalid name'); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('invalid tag 1', function() { - var res = doctrine.parse( - [ - "@111 invalid name", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // invalid tag name shouldn't affect subsequent tags - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', '111'); - res.tags[0].should.not.have.property('type'); - res.tags[0].should.not.have.property('name'); - res.tags[0].should.have.property('description', 'invalid name'); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('invalid tag 1', function() { - var res = doctrine.parse( - [ - "@111", - "@param {string} f2" - ].join('\n'), { recoverable: true }); - - // invalid tag name shouldn't affect subsequent tags - res.tags.should.have.length(2); - res.tags[0].should.have.property('title', '111'); - res.tags[0].should.not.have.property('type'); - res.tags[0].should.not.have.property('name'); - res.tags[0].should.have.property('description', null); - - res.tags[1].should.have.property('title', 'param'); - res.tags[1].should.have.property('type'); - res.tags[1].type.should.have.property('name', 'string'); - res.tags[1].type.should.have.property('type', 'NameExpression'); - res.tags[1].should.have.property('name', 'f2'); - }); - - it ('should not crash on bad type in @param without name', function() { - var res = doctrine.parse("@param {Function(DOMNode)}", { recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - "description": null, - "errors": [ - "not reach to EOF", - "Missing or invalid tag name" - ], - "name": null, - "title": "param", - "type": null - }); - }); - - it ('should not crash on bad type in @param in sloppy mode', function() { - var res = doctrine.parse("@param {int[} [x]", { sloppy: true, recoverable: true }); - res.tags.should.have.length(1); - res.tags[0].should.eql({ - "description": null, - "errors": [ - "expected an array-style type declaration (int[])" - ], - "name": "x", - "title": "param", - "type": null - }); - }); -}); - -describe('exported Syntax', function() { - it ('members', function () { - doctrine.Syntax.should.eql({ - NullableLiteral: 'NullableLiteral', - AllLiteral: 'AllLiteral', - NullLiteral: 'NullLiteral', - UndefinedLiteral: 'UndefinedLiteral', - VoidLiteral: 'VoidLiteral', - UnionType: 'UnionType', - ArrayType: 'ArrayType', - RecordType: 'RecordType', - FieldType: 'FieldType', - FunctionType: 'FunctionType', - ParameterType: 'ParameterType', - RestType: 'RestType', - NonNullableType: 'NonNullableType', - OptionalType: 'OptionalType', - NullableType: 'NullableType', - NameExpression: 'NameExpression', - TypeApplication: 'TypeApplication' - }); - }); -}); - -describe('@ mark contained descriptions', function () { - it ('comment description #10', function () { - doctrine.parse( - [ - '/**', - ' * Prevents the default action. It is equivalent to', - ' * {@code e.preventDefault()}, but can be used as the callback argument of', - ' * {@link goog.events.listen} without declaring another function.', - ' * @param {!goog.events.Event} e An event.', - ' */' - ].join('\n'), - { unwrap: true, sloppy: true }).should.eql({ - 'description': 'Prevents the default action. It is equivalent to\n{@code e.preventDefault()}, but can be used as the callback argument of\n{@link goog.events.listen} without declaring another function.', - 'tags': [{ - 'title': 'param', - 'description': 'An event.', - 'type': { - 'type': 'NonNullableType', - 'expression': { - 'type': 'NameExpression', - 'name': 'goog.events.Event' - }, - 'prefix': true - }, - 'name': 'e' - }] - }); - }); - - it ('tag description', function () { - doctrine.parse( - [ - '/**', - ' * Prevents the default action. It is equivalent to', - ' * @param {!goog.events.Event} e An event.', - ' * {@code e.preventDefault()}, but can be used as the callback argument of', - ' * {@link goog.events.listen} without declaring another function.', - ' */' - ].join('\n'), - { unwrap: true, sloppy: true }).should.eql({ - 'description': 'Prevents the default action. It is equivalent to', - 'tags': [{ - 'title': 'param', - 'description': 'An event.\n{@code e.preventDefault()}, but can be used as the callback argument of\n{@link goog.events.listen} without declaring another function.', - 'type': { - 'type': 'NonNullableType', - 'expression': { - 'type': 'NameExpression', - 'name': 'goog.events.Event' - }, - 'prefix': true - }, - 'name': 'e' - }] - }); - }); -}); - -describe('function', function () { - it ('recognize "function" type', function () { - var res = doctrine.parse( - [ - "@param {function} foo description", - ].join('\n'), {}); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].should.have.property('type'); - res.tags[0].type.should.eql({ - "name": "function", - "type": "NameExpression" - }); - res.tags[0].should.have.property('name', 'foo'); - res.tags[0].should.have.property('description', 'description'); - }); -}); - -describe('tagged namepaths', function () { - it ('recognize module:', function () { - var res = doctrine.parse( - [ - "@alias module:Foo.bar" - ].join('\n'), {}); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'alias'); - res.tags[0].should.have.property('name', 'module:Foo.bar'); - res.tags[0].should.have.property('description', null); - }); - - it ('recognize external:', function () { - var res = doctrine.parse( - [ - "@param {external:Foo.bar} baz description" - ].join('\n'), {}); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'param'); - res.tags[0].type.should.eql({ - "name": "external:Foo.bar", - "type": "NameExpression" - }); - res.tags[0].should.have.property('name', 'baz'); - res.tags[0].should.have.property('description', 'description'); - }); - - it ('recognize event:', function () { - var res = doctrine.parse( - [ - "@function event:Foo.bar" - ].join('\n'), {}); - res.tags.should.have.length(1); - res.tags[0].should.have.property('title', 'function'); - res.tags[0].should.have.property('name', 'event:Foo.bar'); - res.tags[0].should.have.property('description', null); - }); - - it ('invalid bogus:', function () { - var res = doctrine.parse( - [ - "@method bogus:Foo.bar" - ].join('\n'), {}); - res.tags.should.have.length(0); - }); -}); - -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/eslint/node_modules/doctrine/test/strict.js b/tools/eslint/node_modules/doctrine/test/strict.js deleted file mode 100644 index f6008d52f91f56..00000000000000 --- a/tools/eslint/node_modules/doctrine/test/strict.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (C) 2014 Yusuke Suzuki - - 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 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. -*/ -/*global require describe it*/ -/*jslint node:true */ -'use strict'; - -var fs = require('fs'), - path = require('path'), - root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), - doctrine = require(root); -require('should'); - -describe('strict parse', function () { - // https://github.com/Constellation/doctrine/issues/21 - it('unbalanced braces', function () { - (function () { - doctrine.parse( - [ - "/**", - " * @param {const", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Braces are not balanced'); - - (function () { - doctrine.parse( - [ - "/**", - " * @param {const", - " */" - ].join('\n'), { unwrap: true }); - }).should.not.throw(); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @param {string name Param description", - " * @param {int} foo Bar", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Braces are not balanced'); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @param {string name Param description", - " * @param {int} foo Bar", - " */" - ].join('\n'), { unwrap: true }); - }).should.not.throw(); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @returns {int", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Braces are not balanced'); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @returns {int", - " */" - ].join('\n'), { unwrap: true }); - }).should.not.throw(); - }); - - // https://github.com/Constellation/doctrine/issues/21 - it('incorrect tag starting with @@', function () { - (function () { - doctrine.parse( - [ - "/**", - " * @@version", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Missing or invalid title'); - - (function () { - doctrine.parse( - [ - "/**", - " * @@version", - " */" - ].join('\n'), { unwrap: true }); - }).should.not.throw(); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @@param {string} name Param description", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Missing or invalid title'); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @@param {string} name Param description", - " */" - ].join('\n'), { unwrap: true }); - }).should.not.throw(); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @kind ng", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Invalid kind name \'ng\''); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @variation Animation", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Invalid variation \'Animation\''); - - (function () { - doctrine.parse( - [ - "/**", - " * Description", - " * @access ng", - " */" - ].join('\n'), { unwrap: true, strict: true }); - }).should.throw('Invalid access name \'ng\''); - }); -}); diff --git a/tools/eslint/node_modules/doctrine/test/stringify.js b/tools/eslint/node_modules/doctrine/test/stringify.js deleted file mode 100644 index 0f3a43ed83e8bd..00000000000000 --- a/tools/eslint/node_modules/doctrine/test/stringify.js +++ /dev/null @@ -1,413 +0,0 @@ -/* - Copyright (C) 2013 Yusuke Suzuki - - 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 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. -*/ -/*global require describe it*/ -/*jslint node:true */ -'use strict'; - -var fs = require('fs'), - path = require('path'), - root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), - doctrine = require(root), - assert = require('assert'); -require('should'); - -// tests for the stringify function. -// ensure that we can parse and then stringify and the results are identical -describe('stringify', function () { - - function testStringify(text) { - it (text, function() { - var result = doctrine.parse("@param {" + text + "} name"); - // console.log("Parse Tree: " + JSON.stringify(result, null, " ")); - var stringed = doctrine.type.stringify(result.tags[0].type, {compact:true}); - stringed.should.equal(text); - }); - } - - // simple - testStringify("String"); - testStringify("*"); - testStringify("null"); - testStringify("undefined"); - testStringify("void"); - //testStringify("?="); // Failing - - // rest - testStringify("...string"); - testStringify("...[string]"); - testStringify("...[[string]]"); - - // optional, nullable, nonnullable - testStringify("string="); - testStringify("?string"); - testStringify("!string"); - testStringify("!string="); - - // type applications - testStringify("Array."); - testStringify("Array."); - - // union types - testStringify("()"); - testStringify("(String|Number)"); - - // Arrays - testStringify("[String]"); - testStringify("[String,Number]"); - testStringify("[(String|Number)]"); - - // Record types - testStringify("{a}"); - testStringify("{a:String}"); - testStringify("{a:String,b}"); - testStringify("{a:String,b:object}"); - testStringify("{a:String,b:foo.bar.baz}"); - testStringify("{a:(String|Number),b,c:Array.}"); - testStringify("...{a:(String|Number),b,c:Array.}"); - testStringify("{a:(String|Number),b,c:Array.}="); - - // fn types - testStringify("function(a)"); - testStringify("function(a):String"); - testStringify("function(a:number):String"); - testStringify("function(a:number,b:Array.<(String|Number|Object)>):String"); - testStringify("function(a:number,callback:function(a:Array.<(String|Number|Object)>):boolean):String"); - testStringify("function(a:(string|number),this:string,new:true):function():number"); - testStringify("function(a:(string|number),this:string,new:true):function(a:function(val):result):number"); -}); - -describe('literals', function() { - it('NullableLiteral', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.NullableLiteral - }).should.equal('?'); - }); - - it('AllLiteral', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.AllLiteral - }).should.equal('*'); - }); - - it('NullLiteral', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.NullLiteral - }).should.equal('null'); - }); - - it('UndefinedLiteral', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.UndefinedLiteral - }).should.equal('undefined'); - }); -}); - -describe('Expression', function () { - it('NameExpression', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.NameExpression, - name: 'this.is.valid' - }).should.equal('this.is.valid'); - - doctrine.type.stringify({ - type: doctrine.Syntax.NameExpression, - name: 'String' - }).should.equal('String'); - }); - - it('ArrayType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.ArrayType, - elements: [{ - type: doctrine.Syntax.NameExpression, - name: 'String' - }] - }).should.equal('[String]'); - - doctrine.type.stringify({ - type: doctrine.Syntax.ArrayType, - elements: [{ - type: doctrine.Syntax.NameExpression, - name: 'String' - }, { - type: doctrine.Syntax.NameExpression, - name: 'Number' - }] - }).should.equal('[String, Number]'); - - doctrine.type.stringify({ - type: doctrine.Syntax.ArrayType, - elements: [] - }).should.equal('[]'); - }); - - it('RecordType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.RecordType, - fields: [{ - type: doctrine.Syntax.FieldType, - key: 'name', - value: null - }] - }).should.equal('{name}'); - - doctrine.type.stringify({ - type: doctrine.Syntax.RecordType, - fields: [{ - type: doctrine.Syntax.FieldType, - key: 'name', - value: { - type: doctrine.Syntax.NameExpression, - name: 'String' - } - }] - }).should.equal('{name: String}'); - - doctrine.type.stringify({ - type: doctrine.Syntax.RecordType, - fields: [{ - type: doctrine.Syntax.FieldType, - key: 'string', - value: { - type: doctrine.Syntax.NameExpression, - name: 'String' - } - }, { - type: doctrine.Syntax.FieldType, - key: 'number', - value: { - type: doctrine.Syntax.NameExpression, - name: 'Number' - } - }] - }).should.equal('{string: String, number: Number}'); - - doctrine.type.stringify({ - type: doctrine.Syntax.RecordType, - fields: [] - }).should.equal('{}'); - }); - - it('UnionType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.UnionType, - elements: [{ - type: doctrine.Syntax.NameExpression, - name: 'String' - }] - }).should.equal('(String)'); - - doctrine.type.stringify({ - type: doctrine.Syntax.UnionType, - elements: [{ - type: doctrine.Syntax.NameExpression, - name: 'String' - }, { - type: doctrine.Syntax.NameExpression, - name: 'Number' - }] - }).should.equal('(String|Number)'); - - doctrine.type.stringify({ - type: doctrine.Syntax.UnionType, - elements: [{ - type: doctrine.Syntax.NameExpression, - name: 'String' - }, { - type: doctrine.Syntax.NameExpression, - name: 'Number' - }] - }, { topLevel: true }).should.equal('String|Number'); - }); - - it('RestType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.RestType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - } - }).should.equal('...String'); - }); - - it('NonNullableType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.NonNullableType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - }, - prefix: true - }).should.equal('!String'); - - doctrine.type.stringify({ - type: doctrine.Syntax.NonNullableType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - }, - prefix: false - }).should.equal('String!'); - }); - - it('OptionalType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.OptionalType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - } - }).should.equal('String='); - }); - - it('NullableType', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.NullableType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - }, - prefix: true - }).should.equal('?String'); - - doctrine.type.stringify({ - type: doctrine.Syntax.NullableType, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'String' - }, - prefix: false - }).should.equal('String?'); - }); - - it('TypeApplication', function () { - doctrine.type.stringify({ - type: doctrine.Syntax.TypeApplication, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'Array' - }, - applications: [ - { - type: doctrine.Syntax.NameExpression, - name: 'String' - } - ] - }).should.equal('Array.'); - - doctrine.type.stringify({ - type: doctrine.Syntax.TypeApplication, - expression: { - type: doctrine.Syntax.NameExpression, - name: 'Array' - }, - applications: [ - { - type: doctrine.Syntax.NameExpression, - name: 'String' - }, - { - type: doctrine.Syntax.AllLiteral - } - ] - }).should.equal('Array.'); - }); -}); - -describe('Complex identity', function () { - it('Functions', function () { - var data01 = 'function (): void'; - doctrine.type.stringify( - doctrine.type.parseType(data01) - ).should.equal(data01); - - var data02 = 'function (): String'; - doctrine.type.stringify( - doctrine.type.parseType(data02) - ).should.equal(data02); - - var data03 = 'function (test: string): String'; - doctrine.type.stringify( - doctrine.type.parseType(data03) - ).should.equal(data03); - - var data04 = 'function (this: Date, test: String): String'; - doctrine.type.stringify( - doctrine.type.parseType(data04) - ).should.equal(data04); - - var data05 = 'function (this: Date, a: String, b: Number): String'; - doctrine.type.stringify( - doctrine.type.parseType(data05) - ).should.equal(data05); - - var data06 = 'function (this: Date, a: Array., b: Number): String'; - doctrine.type.stringify( - doctrine.type.parseType(data06) - ).should.equal(data06); - - var data07 = 'function (new: Date, a: Array., b: Number): HashMap.'; - doctrine.type.stringify( - doctrine.type.parseType(data07) - ).should.equal(data07); - - var data08 = 'function (new: Date, a: Array., b: (Number|String|Date)): HashMap.'; - doctrine.type.stringify( - doctrine.type.parseType(data08) - ).should.equal(data08); - - var data09 = 'function (new: Date)'; - doctrine.type.stringify( - doctrine.type.parseType(data09) - ).should.equal(data09); - - var data10 = 'function (this: Date)'; - doctrine.type.stringify( - doctrine.type.parseType(data10) - ).should.equal(data10); - - var data11 = 'function (this: Date, ...list)'; - doctrine.type.stringify( - doctrine.type.parseType(data11) - ).should.equal(data11); - - var data11a = 'function (this: Date, test: String=)'; - doctrine.type.stringify( - doctrine.type.parseType(data11a) - ).should.equal(data11a); - - // raw ... are not supported -// var data12 = 'function (this: Date, ...)'; -// doctrine.type.stringify( -// doctrine.type.parseType(data12) -// ).should.equal(data12); - - var data12a = 'function (this: Date, ?=)'; - doctrine.type.stringify( - doctrine.type.parseType(data12a) - ).should.equal(data12a); - }); -}); - -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/eslint/node_modules/doctrine/test/test.html b/tools/eslint/node_modules/doctrine/test/test.html deleted file mode 100644 index 3784c2e5e4e1b6..00000000000000 --- a/tools/eslint/node_modules/doctrine/test/test.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -Doctrine trying - - - - - -
-
- -
-
-

Parse Tree

-

-	

Stringified

-

-
-
\ No newline at end of file
diff --git a/tools/eslint/node_modules/doctrine/test/unwrap.js b/tools/eslint/node_modules/doctrine/test/unwrap.js
deleted file mode 100644
index 03d6f6dfe5833f..00000000000000
--- a/tools/eslint/node_modules/doctrine/test/unwrap.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-  Copyright (C) 2012 Yusuke Suzuki 
-
-  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  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.
-*/
-
-/*jslint node:true */
-'use strict';
-
-var fs = require('fs'),
-    path = require('path'),
-    root = path.join(path.dirname(fs.realpathSync(__filename)), '..'),
-    doctrine = require(root);
-require('should');
-
-describe('unwrapComment', function () {
-  it('normal', function () {
-    doctrine.unwrapComment('/**\n * @const\n * @const\n */').should.equal('\n@const\n@const\n');
-  });
-
-  it('single', function () {
-    doctrine.unwrapComment('/**x*/').should.equal('x');
-  });
-
-  it('more stars', function () {
-    doctrine.unwrapComment('/***x*/').should.equal('x');
-    doctrine.unwrapComment('/****x*/').should.equal('*x');
-  });
-
-  it('2 lines', function () {
-    doctrine.unwrapComment('/**x\n * y\n*/').should.equal('x\ny\n');
-  });
-
-  it('2 lines with space', function () {
-    doctrine.unwrapComment('/**x\n *    y\n*/').should.equal('x\n   y\n');
-  });
-
-  it('3 lines with blank line', function () {
-    doctrine.unwrapComment('/**x\n *\n \* y\n*/').should.equal('x\n\ny\n');
-  });
-});
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lint b/tools/eslint/node_modules/es5-ext/.lint
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lint
rename to tools/eslint/node_modules/es5-ext/.lint
diff --git a/tools/eslint/node_modules/es5-ext/.lintignore b/tools/eslint/node_modules/es5-ext/.lintignore
new file mode 100644
index 00000000000000..eece4ff3c76f4a
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/.lintignore
@@ -0,0 +1,9 @@
+/string/#/normalize/_data.js
+/test/boolean/is-boolean.js
+/test/date/is-date.js
+/test/number/is-number.js
+/test/object/is-copy.js
+/test/object/is-number-value.js
+/test/object/is-object.js
+/test/reg-exp/is-reg-exp.js
+/test/string/is-string.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/LICENSE b/tools/eslint/node_modules/es5-ext/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/LICENSE
rename to tools/eslint/node_modules/es5-ext/LICENSE
diff --git a/tools/eslint/node_modules/es5-ext/README.md b/tools/eslint/node_modules/es5-ext/README.md
new file mode 100644
index 00000000000000..ad09fe2317bfa7
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/README.md
@@ -0,0 +1,993 @@
+# es5-ext
+## ECMAScript 5 extensions
+### (with respect to ECMAScript 6 standard)
+
+Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.
+
+It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.
+
+When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.
+
+### Installation
+
+	$ npm install es5-ext
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+### Usage
+
+#### ECMAScript 6 features
+
+You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).
+
+```javascript
+require('es5-ext/array/from/implement');
+Array.from('foo'); // ['f', 'o', 'o']
+```
+
+You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.
+
+```javascript
+var aFrom = require('es5-ext/array/from');
+aFrom('foo'); // ['f', 'o', 'o']
+```
+
+If you want to use shim unconditionally (even if native implementation exists) do:
+
+```javascript
+var aFrom = require('es5-ext/array/from/shim');
+aFrom('foo'); // ['f', 'o', 'o']
+```
+
+##### List of ES6 shims
+
+It's about properties introduced with ES6 and those that have been updated in new spec.
+
+- `Array.from` -> `require('es5-ext/array/from')`
+- `Array.of` -> `require('es5-ext/array/of')`
+- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`
+- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`
+- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`
+- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`
+- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`
+- `Array.prototype.find` -> `require('es5-ext/array/#/find')`
+- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`
+- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`
+- `Array.prototype.map` -> `require('es5-ext/array/#/map')`
+- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`
+- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`
+- `Array.prototype.values` -> `require('es5-ext/array/#/values')`
+- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`
+- `Math.acosh` -> `require('es5-ext/math/acosh')`
+- `Math.asinh` -> `require('es5-ext/math/asinh')`
+- `Math.atanh` -> `require('es5-ext/math/atanh')`
+- `Math.cbrt` -> `require('es5-ext/math/cbrt')`
+- `Math.clz32` -> `require('es5-ext/math/clz32')`
+- `Math.cosh` -> `require('es5-ext/math/cosh')`
+- `Math.exmp1` -> `require('es5-ext/math/expm1')`
+- `Math.fround` -> `require('es5-ext/math/fround')`
+- `Math.hypot` -> `require('es5-ext/math/hypot')`
+- `Math.imul` -> `require('es5-ext/math/imul')`
+- `Math.log1p` -> `require('es5-ext/math/log1p')`
+- `Math.log2` -> `require('es5-ext/math/log2')`
+- `Math.log10` -> `require('es5-ext/math/log10')`
+- `Math.sign` -> `require('es5-ext/math/sign')`
+- `Math.signh` -> `require('es5-ext/math/signh')`
+- `Math.tanh` -> `require('es5-ext/math/tanh')`
+- `Math.trunc` -> `require('es5-ext/math/trunc')`
+- `Number.EPSILON` -> `require('es5-ext/number/epsilon')`
+- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`
+- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`
+- `Number.isFinite` -> `require('es5-ext/number/is-finite')`
+- `Number.isInteger` -> `require('es5-ext/number/is-integer')`
+- `Number.isNaN` -> `require('es5-ext/number/is-nan')`
+- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`
+- `Object.assign` -> `require('es5-ext/object/assign')`
+- `Object.keys` -> `require('es5-ext/object/keys')`
+- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`
+- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`
+- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`
+- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`
+- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`
+- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`
+- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`
+- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`
+- `String.raw` -> `require('es5-ext/string/raw')`
+- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`
+- `String.prototype.contains` -> `require('es5-ext/string/#/contains')`
+- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`
+- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`
+- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`
+- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`
+- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`
+
+#### Non ECMAScript standard features
+
+__es5-ext__ provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:
+
+```javascript
+Object.defineProperty(Function.prototype, 'partial', { value: require('es5-ext/function/#/partial'),
+  configurable: true, enumerable: false, writable: true });
+Object.defineProperty(Array.prototype, 'flatten', { value: require('es5-ext/array/#/flatten'),
+  configurable: true, enumerable: false, writable: true });
+Object.defineProperty(String.prototype, 'capitalize', { value: require('es5-ext/string/#/capitalize'),
+  configurable: true, enumerable: false, writable: true });
+```
+
+See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you.
+
+__Important:__ Remember to __not__ extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine __only__ if you're the _owner_ of the global scope, so e.g. in final project you lead development of.
+
+When you're in situation when native extensions are not good idea, then you should use methods indirectly:
+
+
+```javascript
+var flatten = require('es5-ext/array/#/flatten');
+
+flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+for better convenience you can turn methods into functions:
+
+
+```javascript
+var call = Function.prototype.call
+var flatten = call.bind(require('es5-ext/array/#/flatten'));
+
+flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application
+
+```javascript
+var util = {};
+util.partial = call.bind(require('es5-ext/function/#/partial'));
+util.flatten = call.bind(require('es5-ext/array/#/flatten'));
+util.startsWith = call.bind(require('es5-ext/string/#/starts-with'));
+
+util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
+```
+
+As with native ones most methods are generic and can be run on any type of object.
+
+## API
+
+### Global extensions
+
+#### global _(es5-ext/global)_
+
+Object that represents global scope
+
+### Array Constructor extensions
+
+#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from).
+Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.
+
+#### generate([length[, …fill]]) _(es5-ext/array/generate)_
+
+Generate an array of pre-given _length_ built of repeated arguments.
+
+#### isPlainArray(x) _(es5-ext/array/is-plain-array)_
+
+Returns true if object is plain array (not instance of one of the Array's extensions).
+
+#### of([…items]) _(es5-ext/array/of)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of).
+Create an array from given arguments.
+
+#### toArray(obj) _(es5-ext/array/to-array)_
+
+Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back.
+
+#### validArray(obj) _(es5-ext/array/valid-array)_
+
+Returns `obj` if it's an array, otherwise throws `TypeError`
+
+### Array Prototype extensions
+
+#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_
+
+In __sorted__ list search for index of item for which _compareFn_ returns value closest to _0_.
+It's variant of binary search algorithm
+
+#### arr.clear() _(es5-ext/array/#/clear)_
+
+Clears the array
+
+#### arr.compact() _(es5-ext/array/#/compact)_
+
+Returns a copy of the context with all non-values (`null` or `undefined`) removed.
+
+#### arr.concat() _(es5-ext/array/#/concat)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat).
+ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.
+
+#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_
+
+Whether list contains the given value.
+
+#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).
+
+#### arr.diff(other) _(es5-ext/array/#/diff)_
+
+Returns the array of elements that are present in context list but not present in other list.
+
+#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_
+
+_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
+
+#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_
+
+_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
+
+#### arr.entries() _(es5-ext/array/#/entries)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries).
+Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.
+
+#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_
+
+Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments).
+
+#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).
+
+#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter).
+ES6's version of `filter`, returns array of same type as the context.
+
+#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find).
+Return first element for which given function returns true
+
+#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex).
+Return first index for which given function returns true
+
+#### arr.first() _(es5-ext/array/#/first)_
+
+Returns value for first defined index
+
+#### arr.firstIndex() _(es5-ext/array/#/first-index)_
+
+Returns first declared index of the array
+
+#### arr.flatten() _(es5-ext/array/#/flatten)_
+
+Returns flattened version of the array
+
+#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_
+
+`forEach` starting from last element
+
+#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_
+
+Group list elements by value returned by _cb_ function
+
+#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_
+
+Returns array of all indexes of given value
+
+#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_
+
+Computes the array of values that are the intersection of all lists (context list and lists given in arguments)
+
+#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_
+
+Returns true if both context and _other_ lists have same content
+
+#### arr.isUniq() _(es5-ext/array/#/is-uniq)_
+
+Returns true if all values in array are unique
+
+#### arr.keys() _(es5-ext/array/#/keys)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys).
+Returns iterator object, which traverses all array indexes.
+
+#### arr.last() _(es5-ext/array/#/last)_
+
+Returns value of last defined index
+
+#### arr.lastIndex() _(es5-ext/array/#/last)_
+
+Returns last defined index of the array
+
+#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map).
+ES6's version of `map`, returns array of same type as the context.
+
+#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_
+
+Remove values from the array
+
+#### arr.separate(sep) _(es5-ext/array/#/separate)_
+
+Returns array with items separated with `sep` value
+
+#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice).
+ES6's version of `slice`, returns array of same type as the context.
+
+#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_
+
+`some` starting from last element
+
+#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice).
+ES6's version of `splice`, returns array of same type as the context.
+
+#### arr.uniq() _(es5-ext/array/#/uniq)_
+
+Returns duplicate-free version of the array
+
+#### arr.values() _(es5-ext/array/#/values)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values).
+Returns iterator object which traverses all array values.
+
+#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator).
+Returns iterator object which traverses all array values.
+
+### Boolean Constructor extensions
+
+#### isBoolean(x) _(es5-ext/boolean/is-boolean)_
+
+Whether value is boolean
+
+### Date Constructor extensions
+
+#### isDate(x) _(es5-ext/date/is-date)_
+
+Whether value is date instance
+
+#### validDate(x) _(es5-ext/date/valid-date)_
+
+If given object is not date throw TypeError in other case return it.
+
+### Date Prototype extensions
+
+#### date.copy(date) _(es5-ext/date/#/copy)_
+
+Returns a copy of the date object
+
+#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_
+
+Returns number of days of date's month
+
+#### date.floorDay() _(es5-ext/date/#/floor-day)_
+
+Sets the date time to 00:00:00.000
+
+#### date.floorMonth() _(es5-ext/date/#/floor-month)_
+
+Sets date day to 1 and date time to 00:00:00.000
+
+#### date.floorYear() _(es5-ext/date/#/floor-year)_
+
+Sets date month to 0, day to 1 and date time to 00:00:00.000
+
+#### date.format(pattern) _(es5-ext/date/#/format)_
+
+Formats date up to given string. Supported patterns:
+
+* `%Y` - Year with century, 1999, 2003
+* `%y` - Year without century, 99, 03
+* `%m` - Month, 01..12
+* `%d` - Day of the month 01..31
+* `%H` - Hour (24-hour clock), 00..23
+* `%M` - Minute, 00..59
+* `%S` - Second, 00..59
+* `%L` - Milliseconds, 000..999
+
+### Error Constructor extensions
+
+#### custom(message/*, code, ext*/) _(es5-ext/error/custom)_
+
+Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)
+
+#### isError(x) _(es5-ext/error/is-error)_
+
+Whether value is an error (instance of `Error`).
+
+#### validError(x) _(es5-ext/error/valid-error)_
+
+If given object is not error throw TypeError in other case return it.
+
+### Error Prototype extensions
+
+#### err.throw() _(es5-ext/error/#/throw)_
+
+Throws error
+
+### Function Constructor extensions
+
+Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
+
+#### constant(x) _(es5-ext/function/constant)_
+
+Returns a constant function that returns pregiven argument
+
+_k(x)(y)  =def  x_
+
+#### identity(x) _(es5-ext/function/identity)_
+
+Identity function. Returns first argument
+
+_i(x)  =def  x_
+
+#### invoke(name[, …args]) _(es5-ext/function/invoke)_
+
+Returns a function that takes an object as an argument, and applies object's
+_name_ method to arguments.
+_name_ can be name of the method or method itself.
+
+_invoke(name, …args)(object, …args2)  =def  object\[name\]\(…args, …args2\)_
+
+#### isArguments(x) _(es5-ext/function/is-arguments)_
+
+Whether value is arguments object
+
+#### isFunction(arg) _(es5-ext/function/is-function)_
+
+Wether value is instance of function
+
+#### noop() _(es5-ext/function/noop)_
+
+No operation function
+
+#### pluck(name) _(es5-ext/function/pluck)_
+
+Returns a function that takes an object, and returns the value of its _name_
+property
+
+_pluck(name)(obj)  =def  obj[name]_
+
+#### validFunction(arg) _(es5-ext/function/valid-function)_
+
+If given object is not function throw TypeError in other case return it.
+
+### Function Prototype extensions
+
+Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
+
+#### fn.compose([…fns]) _(es5-ext/function/#/compose)_
+
+Applies the functions in reverse argument-list order.
+
+_f1.compose(f2, f3, f4)(…args)  =def  f1(f2(f3(f4(…arg))))_
+
+#### fn.copy() _(es5-ext/function/#/copy)_
+
+Produces copy of given function
+
+#### fn.curry([n]) _(es5-ext/function/#/curry)_
+
+Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function.
+If _n_ is not provided then it defaults to context function length
+
+_f.curry(4)(arg1, arg2)(arg3)(arg4)  =def  f(arg1, args2, arg3, arg4)_
+
+#### fn.lock([…args]) _(es5-ext/function/#/lock)_
+
+Returns a function that applies the underlying function to _args_, and ignores its own arguments.
+
+_f.lock(…args)(…args2)  =def  f(…args)_
+
+_Named after it's counterpart in Google Closure_
+
+#### fn.not() _(es5-ext/function/#/not)_
+
+Returns a function that returns boolean negation of value returned by underlying function.
+
+_f.not()(…args)  =def !f(…args)_
+
+#### fn.partial([…args]) _(es5-ext/function/#/partial)_
+
+Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.
+
+_f.partial(…args1)(…args2)  =def  f(…args1, …args2)_
+
+#### fn.spread() _(es5-ext/function/#/spread)_
+
+Returns a function that applies underlying function with first list argument
+
+_f.match()(args)  =def  f.apply(null, args)_
+
+#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_
+
+Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.
+
+### Math extensions
+
+#### acosh(x) _(es5-ext/math/acosh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).
+
+#### asinh(x) _(es5-ext/math/asinh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).
+
+#### atanh(x) _(es5-ext/math/atanh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).
+
+#### cbrt(x) _(es5-ext/math/cbrt)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).
+
+#### clz32(x) _(es5-ext/math/clz32)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).
+
+#### cosh(x) _(es5-ext/math/cosh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).
+
+#### expm1(x) _(es5-ext/math/expm1)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).
+
+#### fround(x) _(es5-ext/math/fround)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).
+
+#### hypot([…values]) _(es5-ext/math/hypot)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).
+
+#### imul(x, y) _(es5-ext/math/imul)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).
+
+#### log1p(x) _(es5-ext/math/log1p)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).
+
+#### log2(x) _(es5-ext/math/log2)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).
+
+#### log10(x) _(es5-ext/math/log10)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).
+
+#### sign(x) _(es5-ext/math/sign)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).
+
+#### sinh(x) _(es5-ext/math/sinh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).
+
+#### tanh(x) _(es5-ext/math/tanh)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).
+
+#### trunc(x) _(es5-ext/math/trunc)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).
+
+### Number Constructor extensions
+
+#### EPSILON _(es5-ext/number/epsilon)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).
+
+The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.
+
+#### isFinite(x) _(es5-ext/number/is-finite)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite).
+Whether value is finite. Differs from global isNaN that it doesn't do type coercion.
+
+#### isInteger(x) _(es5-ext/number/is-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger).
+Whether value is integer.
+
+#### isNaN(x) _(es5-ext/number/is-nan)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan).
+Whether value is NaN. Differs from global isNaN that it doesn't do type coercion.
+
+#### isNumber(x) _(es5-ext/number/is-number)_
+
+Whether given value is number
+
+#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).
+
+#### MAX_SAFE_INTEGER _(es5-ext/number/max-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger).
+The value of Number.MAX_SAFE_INTEGER is 9007199254740991.
+
+#### MIN_SAFE_INTEGER _(es5-ext/number/min-safe-integer)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger).
+The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).
+
+#### toInteger(x) _(es5-ext/number/to-integer)_
+
+Converts value to integer
+
+#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_
+
+Converts value to positive integer. If provided value is less than 0, then 0 is returned
+
+#### toUint32(x) _(es5-ext/number/to-uint32)_
+
+Converts value to unsigned 32 bit integer. This type is used for array lengths.
+See: http://www.2ality.com/2012/02/js-integers.html
+
+### Number Prototype extensions
+
+#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_
+
+Pad given number with zeros. Returns string
+
+### Object Constructor extensions
+
+#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.
+
+#### clear(obj) _(es5-ext/object/clear)_
+
+Remove all enumerable own properties of the object
+
+#### compact(obj) _(es5-ext/object/compact)_
+
+Returns copy of the object with all enumerable properties that have no falsy values
+
+#### compare(obj1, obj2) _(es5-ext/object/compare)_
+
+Universal cross-type compare function. To be used for e.g. array sort.
+
+#### copy(obj) _(es5-ext/object/copy)_
+
+Returns copy of the object with all enumerable properties.
+
+#### copyDeep(obj) _(es5-ext/object/copy-deep)_
+
+Returns deep copy of the object with all enumerable properties.
+
+#### count(obj) _(es5-ext/object/count)_
+
+Counts number of enumerable own properties on object
+
+#### create(obj[, properties]) _(es5-ext/object/create)_
+
+`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).
+
+When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.
+
+It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.
+
+Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.
+
+#### eq(x, y) _(es5-ext/object/eq)_
+
+Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
+
+#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_
+
+Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function.
+Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_
+
+Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.
+
+#### firstKey(obj) _(es5-ext/object/first-key)_
+
+Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.
+
+#### flatten(obj) _(es5-ext/object/flatten)_
+
+Returns new object, with flatten properties of input object
+
+_flatten({ a: { b: 1 }, c: { d: 1 } })  =def  { b: 1, d: 1 }_
+
+#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_
+
+Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object
+Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### getPropertyNames() _(es5-ext/object/get-property-names)_
+
+Get all (not just own) property names of the object
+
+#### is(x, y) _(es5-ext/object/is)_
+
+Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
+
+#### isArrayLike(x) _(es5-ext/object/is-array-like)_
+
+Whether object is array-like object
+
+#### isCopy(x, y) _(es5-ext/object/is-copy)_
+
+Two values are considered a copy of same value when all of their own enumerable properties have same values.
+
+#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_
+
+Deep comparision of objects
+
+#### isEmpty(obj) _(es5-ext/object/is-empty)_
+
+True if object doesn't have any own enumerable property
+
+#### isObject(arg) _(es5-ext/object/is-object)_
+
+Whether value is not primitive
+
+#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_
+
+Whether object is plain object, its protototype should be Object.prototype and it cannot be host object.
+
+#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_
+
+Search object for value
+
+#### keys(obj) _(es5-ext/object/keys)_
+
+[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys).
+ES6's version of `keys`, doesn't throw on primitive input
+
+#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_
+
+Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.
+
+#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_
+
+Create new object with same values, but remapped keys
+
+#### mixin(target, source) _(es5-ext/object/mixin)_
+
+Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).
+_It was for a moment part of ECMAScript 6 draft._
+
+#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_
+
+Extends _target_, with all source and source's prototype properties.
+Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).
+
+#### normalizeOptions(options) _(es5-ext/object/normalize-options)_
+
+Normalizes options object into flat plain object.
+
+Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use.
+
+- It never returns input `options` object back (always a copy is created)
+- `options` can be undefined in such case empty plain object is returned.
+- Copies all enumerable properties found down prototype chain.
+
+#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_
+
+Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true.
+
+#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_
+
+Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator
+
+#### serialize(value) _(es5-ext/object/serialize)_
+
+Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.
+
+#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof).
+If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.
+
+#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_
+
+Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided
+testing function.
+Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_
+
+Creates an array of results of calling a provided function on every key-value pair in this object.
+Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
+
+#### unserialize(str) _(es5-ext/object/unserialize)_
+
+Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)
+
+#### validCallable(x) _(es5-ext/object/valid-callable)_
+
+If given object is not callable throw TypeError in other case return it.
+
+#### validObject(x) _(es5-ext/object/valid-object)_
+
+Throws error if given value is not an object, otherwise it is returned.
+
+#### validValue(x) _(es5-ext/object/valid-value)_
+
+Throws error if given value is `null` or `undefined`, otherwise returns value.
+
+### RegExp Constructor extensions
+
+#### escape(str) _(es5-ext/reg-exp/escape)_
+
+Escapes string to be used in regular expression
+
+#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_
+
+Whether object is regular expression
+
+#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_
+
+If object is regular expression it is returned, otherwise TypeError is thrown.
+
+### RegExp Prototype extensions
+
+#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_
+
+Whether regular expression has `sticky` flag.
+
+It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.
+
+#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_
+
+Whether regular expression has `unicode` flag.
+
+It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.
+
+#### re.match(string) _(es5-ext/reg-exp/#/match)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).
+
+#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).
+
+#### re.search(string) _(es5-ext/reg-exp/#/search)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).
+
+#### re.split(string) _(es5-ext/reg-exp/#/search)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).
+
+#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky).
+It's a getter, so only `implement` and `is-implemented` modules are provided.
+
+#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode).
+It's a getter, so only `implement` and `is-implemented` modules are provided.
+
+### String Constructor extensions
+
+#### formatMethod(fMap) _(es5-ext/string/format-method)_
+
+Creates format method. It's used e.g. to create `Date.prototype.format` method
+
+#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)
+
+#### isString(x) _(es5-ext/string/is-string)_
+
+Whether object is string
+
+#### randomUniq() _(es5-ext/string/random-uniq)_
+
+Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)
+
+#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)
+
+### String Prototype extensions
+
+#### str.at(pos) _(es5-ext/string/#/at)_
+
+_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_
+
+Returns a string at given position in Unicode-safe manner.
+Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).
+
+#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_
+
+Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.
+Useful when converting names from js property convention into filename convention.
+
+#### str.capitalize() _(es5-ext/string/#/capitalize)_
+
+Capitalize first character of a string
+
+#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_
+
+Case insensitive compare
+
+#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)
+
+Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).
+
+#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)
+
+Whether string contains given string.
+
+#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith).
+Whether strings ends with given string
+
+#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_
+
+Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.
+Useful when converting names from filename convention to js property name convention.
+
+#### str.indent(str[, count]) _(es5-ext/string/#/indent)_
+
+Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).
+
+#### str.last() _(es5-ext/string/#/last)_
+
+Return last character
+
+#### str.normalize([form]) _(es5-ext/string/#/normalize)_
+
+[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize).
+Returns the Unicode Normalization Form of a given string.
+Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)
+
+#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_
+
+Pad string with _fill_.
+If _length_ si given than _fill_ is reapated _length_ times.
+If _length_ is negative then pad is applied from right.
+
+#### str.repeat(n) _(es5-ext/string/#/repeat)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat).
+Repeat given string _n_ times
+
+#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_
+
+Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
+
+#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_
+
+Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
+
+#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith).
+Whether strings starts with given string
+
+#### str[@@iterator] _(es5-ext/string/#/@@iterator)_
+
+[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator).
+Returns iterator object which traverses all string characters (with respect to unicode symbols)
+
+### Tests [![Build Status](https://travis-ci.org/medikoo/es5-ext.png)](https://travis-ci.org/medikoo/es5-ext)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/implement.js b/tools/eslint/node_modules/es5-ext/array/#/@@iterator/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/@@iterator/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/index.js b/tools/eslint/node_modules/es5-ext/array/#/@@iterator/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/@@iterator/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/shim.js b/tools/eslint/node_modules/es5-ext/array/#/@@iterator/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/@@iterator/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/@@iterator/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/_compare-by-length.js b/tools/eslint/node_modules/es5-ext/array/#/_compare-by-length.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/_compare-by-length.js
rename to tools/eslint/node_modules/es5-ext/array/#/_compare-by-length.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/binary-search.js b/tools/eslint/node_modules/es5-ext/array/#/binary-search.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/binary-search.js
rename to tools/eslint/node_modules/es5-ext/array/#/binary-search.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/clear.js b/tools/eslint/node_modules/es5-ext/array/#/clear.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/clear.js
rename to tools/eslint/node_modules/es5-ext/array/#/clear.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/compact.js b/tools/eslint/node_modules/es5-ext/array/#/compact.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/compact.js
rename to tools/eslint/node_modules/es5-ext/array/#/compact.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/implement.js b/tools/eslint/node_modules/es5-ext/array/#/concat/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/concat/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/index.js b/tools/eslint/node_modules/es5-ext/array/#/concat/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/concat/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/concat/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/concat/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/shim.js b/tools/eslint/node_modules/es5-ext/array/#/concat/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/concat/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/concat/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/contains.js b/tools/eslint/node_modules/es5-ext/array/#/contains.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/contains.js
rename to tools/eslint/node_modules/es5-ext/array/#/contains.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/implement.js b/tools/eslint/node_modules/es5-ext/array/#/copy-within/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/copy-within/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/index.js b/tools/eslint/node_modules/es5-ext/array/#/copy-within/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/copy-within/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/copy-within/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/copy-within/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/shim.js b/tools/eslint/node_modules/es5-ext/array/#/copy-within/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/copy-within/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/copy-within/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/diff.js b/tools/eslint/node_modules/es5-ext/array/#/diff.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/diff.js
rename to tools/eslint/node_modules/es5-ext/array/#/diff.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/e-index-of.js b/tools/eslint/node_modules/es5-ext/array/#/e-index-of.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/e-index-of.js
rename to tools/eslint/node_modules/es5-ext/array/#/e-index-of.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/e-last-index-of.js b/tools/eslint/node_modules/es5-ext/array/#/e-last-index-of.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/e-last-index-of.js
rename to tools/eslint/node_modules/es5-ext/array/#/e-last-index-of.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/implement.js b/tools/eslint/node_modules/es5-ext/array/#/entries/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/entries/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/index.js b/tools/eslint/node_modules/es5-ext/array/#/entries/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/entries/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/entries/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/entries/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/shim.js b/tools/eslint/node_modules/es5-ext/array/#/entries/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/entries/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/entries/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/exclusion.js b/tools/eslint/node_modules/es5-ext/array/#/exclusion.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/exclusion.js
rename to tools/eslint/node_modules/es5-ext/array/#/exclusion.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/implement.js b/tools/eslint/node_modules/es5-ext/array/#/fill/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/fill/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/index.js b/tools/eslint/node_modules/es5-ext/array/#/fill/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/fill/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/fill/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/fill/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/shim.js b/tools/eslint/node_modules/es5-ext/array/#/fill/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/fill/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/fill/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/implement.js b/tools/eslint/node_modules/es5-ext/array/#/filter/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/filter/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/index.js b/tools/eslint/node_modules/es5-ext/array/#/filter/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/filter/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/filter/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/filter/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/shim.js b/tools/eslint/node_modules/es5-ext/array/#/filter/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/filter/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/filter/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/implement.js b/tools/eslint/node_modules/es5-ext/array/#/find-index/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/find-index/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/index.js b/tools/eslint/node_modules/es5-ext/array/#/find-index/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/find-index/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/find-index/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/find-index/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/shim.js b/tools/eslint/node_modules/es5-ext/array/#/find-index/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find-index/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/find-index/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/implement.js b/tools/eslint/node_modules/es5-ext/array/#/find/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/find/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/index.js b/tools/eslint/node_modules/es5-ext/array/#/find/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/find/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/find/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/find/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/shim.js b/tools/eslint/node_modules/es5-ext/array/#/find/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/find/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/find/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/first-index.js b/tools/eslint/node_modules/es5-ext/array/#/first-index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/first-index.js
rename to tools/eslint/node_modules/es5-ext/array/#/first-index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/first.js b/tools/eslint/node_modules/es5-ext/array/#/first.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/first.js
rename to tools/eslint/node_modules/es5-ext/array/#/first.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/flatten.js b/tools/eslint/node_modules/es5-ext/array/#/flatten.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/flatten.js
rename to tools/eslint/node_modules/es5-ext/array/#/flatten.js
diff --git a/tools/eslint/node_modules/es5-ext/array/#/for-each-right.js b/tools/eslint/node_modules/es5-ext/array/#/for-each-right.js
new file mode 100644
index 00000000000000..1702bb164466fb
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/array/#/for-each-right.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+  , callable = require('../../object/valid-callable')
+  , value    = require('../../object/valid-value')
+
+  , hasOwnProperty = Object.prototype.hasOwnProperty
+  , call = Function.prototype.call;
+
+module.exports = function (cb/*, thisArg*/) {
+	var i, self, thisArg;
+
+	self = Object(value(this));
+	callable(cb);
+	thisArg = arguments[1];
+
+	for (i = (toPosInt(self.length) - 1); i >= 0; --i) {
+		if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
+	}
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/group.js b/tools/eslint/node_modules/es5-ext/array/#/group.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/group.js
rename to tools/eslint/node_modules/es5-ext/array/#/group.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/index.js b/tools/eslint/node_modules/es5-ext/array/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/indexes-of.js b/tools/eslint/node_modules/es5-ext/array/#/indexes-of.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/indexes-of.js
rename to tools/eslint/node_modules/es5-ext/array/#/indexes-of.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/intersection.js b/tools/eslint/node_modules/es5-ext/array/#/intersection.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/intersection.js
rename to tools/eslint/node_modules/es5-ext/array/#/intersection.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/is-copy.js b/tools/eslint/node_modules/es5-ext/array/#/is-copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/is-copy.js
rename to tools/eslint/node_modules/es5-ext/array/#/is-copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/is-uniq.js b/tools/eslint/node_modules/es5-ext/array/#/is-uniq.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/is-uniq.js
rename to tools/eslint/node_modules/es5-ext/array/#/is-uniq.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/implement.js b/tools/eslint/node_modules/es5-ext/array/#/keys/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/keys/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/index.js b/tools/eslint/node_modules/es5-ext/array/#/keys/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/keys/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/keys/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/keys/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/shim.js b/tools/eslint/node_modules/es5-ext/array/#/keys/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/keys/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/keys/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/last-index.js b/tools/eslint/node_modules/es5-ext/array/#/last-index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/last-index.js
rename to tools/eslint/node_modules/es5-ext/array/#/last-index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/last.js b/tools/eslint/node_modules/es5-ext/array/#/last.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/last.js
rename to tools/eslint/node_modules/es5-ext/array/#/last.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/implement.js b/tools/eslint/node_modules/es5-ext/array/#/map/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/map/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/index.js b/tools/eslint/node_modules/es5-ext/array/#/map/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/map/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/map/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/map/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/shim.js b/tools/eslint/node_modules/es5-ext/array/#/map/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/map/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/map/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/remove.js b/tools/eslint/node_modules/es5-ext/array/#/remove.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/remove.js
rename to tools/eslint/node_modules/es5-ext/array/#/remove.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/separate.js b/tools/eslint/node_modules/es5-ext/array/#/separate.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/separate.js
rename to tools/eslint/node_modules/es5-ext/array/#/separate.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/implement.js b/tools/eslint/node_modules/es5-ext/array/#/slice/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/slice/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/index.js b/tools/eslint/node_modules/es5-ext/array/#/slice/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/slice/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/slice/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/slice/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/shim.js b/tools/eslint/node_modules/es5-ext/array/#/slice/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/slice/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/slice/shim.js
diff --git a/tools/eslint/node_modules/es5-ext/array/#/some-right.js b/tools/eslint/node_modules/es5-ext/array/#/some-right.js
new file mode 100644
index 00000000000000..f54cf945c38447
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/array/#/some-right.js
@@ -0,0 +1,23 @@
+'use strict';
+
+var toPosInt = require('../../number/to-pos-integer')
+  , callable = require('../../object/valid-callable')
+  , value    = require('../../object/valid-value')
+
+  , hasOwnProperty = Object.prototype.hasOwnProperty
+  , call = Function.prototype.call;
+
+module.exports = function (cb/*, thisArg*/) {
+	var i, self, thisArg;
+	self = Object(value(this));
+	callable(cb);
+	thisArg = arguments[1];
+
+	for (i = (toPosInt(self.length) - 1); i >= 0; --i) {
+		if (hasOwnProperty.call(self, i) &&
+				call.call(cb, thisArg, self[i], i, self)) {
+			return true;
+		}
+	}
+	return false;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/implement.js b/tools/eslint/node_modules/es5-ext/array/#/splice/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/splice/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/index.js b/tools/eslint/node_modules/es5-ext/array/#/splice/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/splice/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/splice/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/splice/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/shim.js b/tools/eslint/node_modules/es5-ext/array/#/splice/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/splice/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/splice/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/uniq.js b/tools/eslint/node_modules/es5-ext/array/#/uniq.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/uniq.js
rename to tools/eslint/node_modules/es5-ext/array/#/uniq.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/implement.js b/tools/eslint/node_modules/es5-ext/array/#/values/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/implement.js
rename to tools/eslint/node_modules/es5-ext/array/#/values/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/index.js b/tools/eslint/node_modules/es5-ext/array/#/values/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/index.js
rename to tools/eslint/node_modules/es5-ext/array/#/values/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/#/values/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/#/values/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/shim.js b/tools/eslint/node_modules/es5-ext/array/#/values/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/values/shim.js
rename to tools/eslint/node_modules/es5-ext/array/#/values/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_is-extensible.js b/tools/eslint/node_modules/es5-ext/array/_is-extensible.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_is-extensible.js
rename to tools/eslint/node_modules/es5-ext/array/_is-extensible.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/tools/eslint/node_modules/es5-ext/array/_sub-array-dummy-safe.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js
rename to tools/eslint/node_modules/es5-ext/array/_sub-array-dummy-safe.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_sub-array-dummy.js b/tools/eslint/node_modules/es5-ext/array/_sub-array-dummy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/_sub-array-dummy.js
rename to tools/eslint/node_modules/es5-ext/array/_sub-array-dummy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/implement.js b/tools/eslint/node_modules/es5-ext/array/from/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/implement.js
rename to tools/eslint/node_modules/es5-ext/array/from/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/index.js b/tools/eslint/node_modules/es5-ext/array/from/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/index.js
rename to tools/eslint/node_modules/es5-ext/array/from/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/from/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/from/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/shim.js b/tools/eslint/node_modules/es5-ext/array/from/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/from/shim.js
rename to tools/eslint/node_modules/es5-ext/array/from/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/generate.js b/tools/eslint/node_modules/es5-ext/array/generate.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/generate.js
rename to tools/eslint/node_modules/es5-ext/array/generate.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/index.js b/tools/eslint/node_modules/es5-ext/array/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/index.js
rename to tools/eslint/node_modules/es5-ext/array/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/is-plain-array.js b/tools/eslint/node_modules/es5-ext/array/is-plain-array.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/is-plain-array.js
rename to tools/eslint/node_modules/es5-ext/array/is-plain-array.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/implement.js b/tools/eslint/node_modules/es5-ext/array/of/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/implement.js
rename to tools/eslint/node_modules/es5-ext/array/of/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/index.js b/tools/eslint/node_modules/es5-ext/array/of/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/index.js
rename to tools/eslint/node_modules/es5-ext/array/of/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/is-implemented.js b/tools/eslint/node_modules/es5-ext/array/of/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/array/of/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/shim.js b/tools/eslint/node_modules/es5-ext/array/of/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/of/shim.js
rename to tools/eslint/node_modules/es5-ext/array/of/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/to-array.js b/tools/eslint/node_modules/es5-ext/array/to-array.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/to-array.js
rename to tools/eslint/node_modules/es5-ext/array/to-array.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/valid-array.js b/tools/eslint/node_modules/es5-ext/array/valid-array.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/valid-array.js
rename to tools/eslint/node_modules/es5-ext/array/valid-array.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/boolean/index.js b/tools/eslint/node_modules/es5-ext/boolean/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/boolean/index.js
rename to tools/eslint/node_modules/es5-ext/boolean/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/boolean/is-boolean.js b/tools/eslint/node_modules/es5-ext/boolean/is-boolean.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/boolean/is-boolean.js
rename to tools/eslint/node_modules/es5-ext/boolean/is-boolean.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/copy.js b/tools/eslint/node_modules/es5-ext/date/#/copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/copy.js
rename to tools/eslint/node_modules/es5-ext/date/#/copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/days-in-month.js b/tools/eslint/node_modules/es5-ext/date/#/days-in-month.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/days-in-month.js
rename to tools/eslint/node_modules/es5-ext/date/#/days-in-month.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-day.js b/tools/eslint/node_modules/es5-ext/date/#/floor-day.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-day.js
rename to tools/eslint/node_modules/es5-ext/date/#/floor-day.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-month.js b/tools/eslint/node_modules/es5-ext/date/#/floor-month.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-month.js
rename to tools/eslint/node_modules/es5-ext/date/#/floor-month.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-year.js b/tools/eslint/node_modules/es5-ext/date/#/floor-year.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/floor-year.js
rename to tools/eslint/node_modules/es5-ext/date/#/floor-year.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/format.js b/tools/eslint/node_modules/es5-ext/date/#/format.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/format.js
rename to tools/eslint/node_modules/es5-ext/date/#/format.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/index.js b/tools/eslint/node_modules/es5-ext/date/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/#/index.js
rename to tools/eslint/node_modules/es5-ext/date/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/index.js b/tools/eslint/node_modules/es5-ext/date/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/index.js
rename to tools/eslint/node_modules/es5-ext/date/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/is-date.js b/tools/eslint/node_modules/es5-ext/date/is-date.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/is-date.js
rename to tools/eslint/node_modules/es5-ext/date/is-date.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/valid-date.js b/tools/eslint/node_modules/es5-ext/date/valid-date.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/date/valid-date.js
rename to tools/eslint/node_modules/es5-ext/date/valid-date.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/#/index.js b/tools/eslint/node_modules/es5-ext/error/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/#/index.js
rename to tools/eslint/node_modules/es5-ext/error/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/#/throw.js b/tools/eslint/node_modules/es5-ext/error/#/throw.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/#/throw.js
rename to tools/eslint/node_modules/es5-ext/error/#/throw.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/custom.js b/tools/eslint/node_modules/es5-ext/error/custom.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/custom.js
rename to tools/eslint/node_modules/es5-ext/error/custom.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/index.js b/tools/eslint/node_modules/es5-ext/error/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/index.js
rename to tools/eslint/node_modules/es5-ext/error/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/is-error.js b/tools/eslint/node_modules/es5-ext/error/is-error.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/is-error.js
rename to tools/eslint/node_modules/es5-ext/error/is-error.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/valid-error.js b/tools/eslint/node_modules/es5-ext/error/valid-error.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/error/valid-error.js
rename to tools/eslint/node_modules/es5-ext/error/valid-error.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/compose.js b/tools/eslint/node_modules/es5-ext/function/#/compose.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/compose.js
rename to tools/eslint/node_modules/es5-ext/function/#/compose.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/copy.js b/tools/eslint/node_modules/es5-ext/function/#/copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/copy.js
rename to tools/eslint/node_modules/es5-ext/function/#/copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/curry.js b/tools/eslint/node_modules/es5-ext/function/#/curry.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/curry.js
rename to tools/eslint/node_modules/es5-ext/function/#/curry.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/index.js b/tools/eslint/node_modules/es5-ext/function/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/index.js
rename to tools/eslint/node_modules/es5-ext/function/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/lock.js b/tools/eslint/node_modules/es5-ext/function/#/lock.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/lock.js
rename to tools/eslint/node_modules/es5-ext/function/#/lock.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/not.js b/tools/eslint/node_modules/es5-ext/function/#/not.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/not.js
rename to tools/eslint/node_modules/es5-ext/function/#/not.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/partial.js b/tools/eslint/node_modules/es5-ext/function/#/partial.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/partial.js
rename to tools/eslint/node_modules/es5-ext/function/#/partial.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/spread.js b/tools/eslint/node_modules/es5-ext/function/#/spread.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/spread.js
rename to tools/eslint/node_modules/es5-ext/function/#/spread.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/to-string-tokens.js b/tools/eslint/node_modules/es5-ext/function/#/to-string-tokens.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/#/to-string-tokens.js
rename to tools/eslint/node_modules/es5-ext/function/#/to-string-tokens.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/_define-length.js b/tools/eslint/node_modules/es5-ext/function/_define-length.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/_define-length.js
rename to tools/eslint/node_modules/es5-ext/function/_define-length.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/constant.js b/tools/eslint/node_modules/es5-ext/function/constant.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/constant.js
rename to tools/eslint/node_modules/es5-ext/function/constant.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/identity.js b/tools/eslint/node_modules/es5-ext/function/identity.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/identity.js
rename to tools/eslint/node_modules/es5-ext/function/identity.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/index.js b/tools/eslint/node_modules/es5-ext/function/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/index.js
rename to tools/eslint/node_modules/es5-ext/function/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/invoke.js b/tools/eslint/node_modules/es5-ext/function/invoke.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/invoke.js
rename to tools/eslint/node_modules/es5-ext/function/invoke.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/is-arguments.js b/tools/eslint/node_modules/es5-ext/function/is-arguments.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/is-arguments.js
rename to tools/eslint/node_modules/es5-ext/function/is-arguments.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/is-function.js b/tools/eslint/node_modules/es5-ext/function/is-function.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/is-function.js
rename to tools/eslint/node_modules/es5-ext/function/is-function.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/noop.js b/tools/eslint/node_modules/es5-ext/function/noop.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/noop.js
rename to tools/eslint/node_modules/es5-ext/function/noop.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/pluck.js b/tools/eslint/node_modules/es5-ext/function/pluck.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/pluck.js
rename to tools/eslint/node_modules/es5-ext/function/pluck.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/valid-function.js b/tools/eslint/node_modules/es5-ext/function/valid-function.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/function/valid-function.js
rename to tools/eslint/node_modules/es5-ext/function/valid-function.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/global.js b/tools/eslint/node_modules/es5-ext/global.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/global.js
rename to tools/eslint/node_modules/es5-ext/global.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/index.js b/tools/eslint/node_modules/es5-ext/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/index.js
rename to tools/eslint/node_modules/es5-ext/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/for-each.js b/tools/eslint/node_modules/es5-ext/iterable/for-each.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/for-each.js
rename to tools/eslint/node_modules/es5-ext/iterable/for-each.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/index.js b/tools/eslint/node_modules/es5-ext/iterable/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/index.js
rename to tools/eslint/node_modules/es5-ext/iterable/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/is.js b/tools/eslint/node_modules/es5-ext/iterable/is.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/is.js
rename to tools/eslint/node_modules/es5-ext/iterable/is.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/validate-object.js b/tools/eslint/node_modules/es5-ext/iterable/validate-object.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/validate-object.js
rename to tools/eslint/node_modules/es5-ext/iterable/validate-object.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/validate.js b/tools/eslint/node_modules/es5-ext/iterable/validate.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/iterable/validate.js
rename to tools/eslint/node_modules/es5-ext/iterable/validate.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/_pack-ieee754.js b/tools/eslint/node_modules/es5-ext/math/_pack-ieee754.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/_pack-ieee754.js
rename to tools/eslint/node_modules/es5-ext/math/_pack-ieee754.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/_unpack-ieee754.js b/tools/eslint/node_modules/es5-ext/math/_unpack-ieee754.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/_unpack-ieee754.js
rename to tools/eslint/node_modules/es5-ext/math/_unpack-ieee754.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/implement.js b/tools/eslint/node_modules/es5-ext/math/acosh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/acosh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/index.js b/tools/eslint/node_modules/es5-ext/math/acosh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/index.js
rename to tools/eslint/node_modules/es5-ext/math/acosh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/acosh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/acosh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/shim.js b/tools/eslint/node_modules/es5-ext/math/acosh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/acosh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/acosh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/implement.js b/tools/eslint/node_modules/es5-ext/math/asinh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/asinh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/index.js b/tools/eslint/node_modules/es5-ext/math/asinh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/index.js
rename to tools/eslint/node_modules/es5-ext/math/asinh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/asinh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/asinh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/shim.js b/tools/eslint/node_modules/es5-ext/math/asinh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/asinh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/asinh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/implement.js b/tools/eslint/node_modules/es5-ext/math/atanh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/atanh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/index.js b/tools/eslint/node_modules/es5-ext/math/atanh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/index.js
rename to tools/eslint/node_modules/es5-ext/math/atanh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/atanh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/atanh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/shim.js b/tools/eslint/node_modules/es5-ext/math/atanh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/atanh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/atanh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/implement.js b/tools/eslint/node_modules/es5-ext/math/cbrt/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/implement.js
rename to tools/eslint/node_modules/es5-ext/math/cbrt/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/index.js b/tools/eslint/node_modules/es5-ext/math/cbrt/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/index.js
rename to tools/eslint/node_modules/es5-ext/math/cbrt/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/cbrt/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/cbrt/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/shim.js b/tools/eslint/node_modules/es5-ext/math/cbrt/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cbrt/shim.js
rename to tools/eslint/node_modules/es5-ext/math/cbrt/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/implement.js b/tools/eslint/node_modules/es5-ext/math/clz32/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/implement.js
rename to tools/eslint/node_modules/es5-ext/math/clz32/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/index.js b/tools/eslint/node_modules/es5-ext/math/clz32/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/index.js
rename to tools/eslint/node_modules/es5-ext/math/clz32/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/clz32/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/clz32/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/shim.js b/tools/eslint/node_modules/es5-ext/math/clz32/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/clz32/shim.js
rename to tools/eslint/node_modules/es5-ext/math/clz32/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js b/tools/eslint/node_modules/es5-ext/math/cosh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/cosh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js b/tools/eslint/node_modules/es5-ext/math/cosh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/index.js
rename to tools/eslint/node_modules/es5-ext/math/cosh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/cosh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/cosh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js b/tools/eslint/node_modules/es5-ext/math/cosh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/cosh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/cosh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/implement.js b/tools/eslint/node_modules/es5-ext/math/expm1/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/implement.js
rename to tools/eslint/node_modules/es5-ext/math/expm1/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/index.js b/tools/eslint/node_modules/es5-ext/math/expm1/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/index.js
rename to tools/eslint/node_modules/es5-ext/math/expm1/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/expm1/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/expm1/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/shim.js b/tools/eslint/node_modules/es5-ext/math/expm1/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/expm1/shim.js
rename to tools/eslint/node_modules/es5-ext/math/expm1/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/implement.js b/tools/eslint/node_modules/es5-ext/math/fround/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/implement.js
rename to tools/eslint/node_modules/es5-ext/math/fround/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/index.js b/tools/eslint/node_modules/es5-ext/math/fround/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/index.js
rename to tools/eslint/node_modules/es5-ext/math/fround/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/fround/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/fround/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/shim.js b/tools/eslint/node_modules/es5-ext/math/fround/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/fround/shim.js
rename to tools/eslint/node_modules/es5-ext/math/fround/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/implement.js b/tools/eslint/node_modules/es5-ext/math/hypot/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/implement.js
rename to tools/eslint/node_modules/es5-ext/math/hypot/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/index.js b/tools/eslint/node_modules/es5-ext/math/hypot/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/index.js
rename to tools/eslint/node_modules/es5-ext/math/hypot/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/hypot/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/hypot/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/shim.js b/tools/eslint/node_modules/es5-ext/math/hypot/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/hypot/shim.js
rename to tools/eslint/node_modules/es5-ext/math/hypot/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/implement.js b/tools/eslint/node_modules/es5-ext/math/imul/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/implement.js
rename to tools/eslint/node_modules/es5-ext/math/imul/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/index.js b/tools/eslint/node_modules/es5-ext/math/imul/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/index.js
rename to tools/eslint/node_modules/es5-ext/math/imul/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/imul/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/imul/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/shim.js b/tools/eslint/node_modules/es5-ext/math/imul/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/imul/shim.js
rename to tools/eslint/node_modules/es5-ext/math/imul/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/index.js b/tools/eslint/node_modules/es5-ext/math/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/index.js
rename to tools/eslint/node_modules/es5-ext/math/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/implement.js b/tools/eslint/node_modules/es5-ext/math/log10/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/implement.js
rename to tools/eslint/node_modules/es5-ext/math/log10/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/index.js b/tools/eslint/node_modules/es5-ext/math/log10/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/index.js
rename to tools/eslint/node_modules/es5-ext/math/log10/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/log10/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/log10/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/shim.js b/tools/eslint/node_modules/es5-ext/math/log10/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log10/shim.js
rename to tools/eslint/node_modules/es5-ext/math/log10/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/implement.js b/tools/eslint/node_modules/es5-ext/math/log1p/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/implement.js
rename to tools/eslint/node_modules/es5-ext/math/log1p/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/index.js b/tools/eslint/node_modules/es5-ext/math/log1p/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/index.js
rename to tools/eslint/node_modules/es5-ext/math/log1p/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/log1p/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/log1p/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/shim.js b/tools/eslint/node_modules/es5-ext/math/log1p/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log1p/shim.js
rename to tools/eslint/node_modules/es5-ext/math/log1p/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/implement.js b/tools/eslint/node_modules/es5-ext/math/log2/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/implement.js
rename to tools/eslint/node_modules/es5-ext/math/log2/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/index.js b/tools/eslint/node_modules/es5-ext/math/log2/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/index.js
rename to tools/eslint/node_modules/es5-ext/math/log2/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/log2/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/log2/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/shim.js b/tools/eslint/node_modules/es5-ext/math/log2/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/log2/shim.js
rename to tools/eslint/node_modules/es5-ext/math/log2/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/implement.js b/tools/eslint/node_modules/es5-ext/math/sign/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/implement.js
rename to tools/eslint/node_modules/es5-ext/math/sign/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/index.js b/tools/eslint/node_modules/es5-ext/math/sign/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/index.js
rename to tools/eslint/node_modules/es5-ext/math/sign/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/sign/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/sign/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/shim.js b/tools/eslint/node_modules/es5-ext/math/sign/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sign/shim.js
rename to tools/eslint/node_modules/es5-ext/math/sign/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/implement.js b/tools/eslint/node_modules/es5-ext/math/sinh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/sinh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/index.js b/tools/eslint/node_modules/es5-ext/math/sinh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/index.js
rename to tools/eslint/node_modules/es5-ext/math/sinh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/sinh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/sinh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/shim.js b/tools/eslint/node_modules/es5-ext/math/sinh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/sinh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/sinh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/implement.js b/tools/eslint/node_modules/es5-ext/math/tanh/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/implement.js
rename to tools/eslint/node_modules/es5-ext/math/tanh/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/index.js b/tools/eslint/node_modules/es5-ext/math/tanh/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/index.js
rename to tools/eslint/node_modules/es5-ext/math/tanh/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/tanh/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/tanh/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/shim.js b/tools/eslint/node_modules/es5-ext/math/tanh/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/tanh/shim.js
rename to tools/eslint/node_modules/es5-ext/math/tanh/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/implement.js b/tools/eslint/node_modules/es5-ext/math/trunc/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/implement.js
rename to tools/eslint/node_modules/es5-ext/math/trunc/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/index.js b/tools/eslint/node_modules/es5-ext/math/trunc/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/index.js
rename to tools/eslint/node_modules/es5-ext/math/trunc/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/is-implemented.js b/tools/eslint/node_modules/es5-ext/math/trunc/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/math/trunc/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/shim.js b/tools/eslint/node_modules/es5-ext/math/trunc/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/math/trunc/shim.js
rename to tools/eslint/node_modules/es5-ext/math/trunc/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/#/index.js b/tools/eslint/node_modules/es5-ext/number/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/#/index.js
rename to tools/eslint/node_modules/es5-ext/number/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/#/pad.js b/tools/eslint/node_modules/es5-ext/number/#/pad.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/#/pad.js
rename to tools/eslint/node_modules/es5-ext/number/#/pad.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/implement.js b/tools/eslint/node_modules/es5-ext/number/epsilon/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/implement.js
rename to tools/eslint/node_modules/es5-ext/number/epsilon/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/index.js b/tools/eslint/node_modules/es5-ext/number/epsilon/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/index.js
rename to tools/eslint/node_modules/es5-ext/number/epsilon/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/epsilon/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/epsilon/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/epsilon/is-implemented.js
diff --git a/tools/eslint/node_modules/es5-ext/number/index.js b/tools/eslint/node_modules/es5-ext/number/index.js
new file mode 100644
index 00000000000000..841b3612c0a7ca
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/number/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+module.exports = {
+	'#':              require('./#'),
+	EPSILON:          require('./epsilon'),
+	isFinite:         require('./is-finite'),
+	isInteger:        require('./is-integer'),
+	isNaN:            require('./is-nan'),
+	isNatural:        require('./is-natural'),
+	isNumber:         require('./is-number'),
+	isSafeInteger:    require('./is-safe-integer'),
+	MAX_SAFE_INTEGER: require('./max-safe-integer'),
+	MIN_SAFE_INTEGER: require('./min-safe-integer'),
+	toInteger:        require('./to-integer'),
+	toPosInteger:     require('./to-pos-integer'),
+	toUint32:         require('./to-uint32')
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/implement.js b/tools/eslint/node_modules/es5-ext/number/is-finite/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/implement.js
rename to tools/eslint/node_modules/es5-ext/number/is-finite/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/index.js b/tools/eslint/node_modules/es5-ext/number/is-finite/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/index.js
rename to tools/eslint/node_modules/es5-ext/number/is-finite/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/is-finite/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/is-finite/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/shim.js b/tools/eslint/node_modules/es5-ext/number/is-finite/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-finite/shim.js
rename to tools/eslint/node_modules/es5-ext/number/is-finite/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/implement.js b/tools/eslint/node_modules/es5-ext/number/is-integer/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/implement.js
rename to tools/eslint/node_modules/es5-ext/number/is-integer/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/index.js b/tools/eslint/node_modules/es5-ext/number/is-integer/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/index.js
rename to tools/eslint/node_modules/es5-ext/number/is-integer/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/is-integer/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/is-integer/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/shim.js b/tools/eslint/node_modules/es5-ext/number/is-integer/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-integer/shim.js
rename to tools/eslint/node_modules/es5-ext/number/is-integer/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/implement.js b/tools/eslint/node_modules/es5-ext/number/is-nan/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/implement.js
rename to tools/eslint/node_modules/es5-ext/number/is-nan/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/index.js b/tools/eslint/node_modules/es5-ext/number/is-nan/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/index.js
rename to tools/eslint/node_modules/es5-ext/number/is-nan/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/is-nan/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/is-nan/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/shim.js b/tools/eslint/node_modules/es5-ext/number/is-nan/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-nan/shim.js
rename to tools/eslint/node_modules/es5-ext/number/is-nan/shim.js
diff --git a/tools/eslint/node_modules/es5-ext/number/is-natural.js b/tools/eslint/node_modules/es5-ext/number/is-natural.js
new file mode 100644
index 00000000000000..831090d23c3745
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/number/is-natural.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var isInteger = require('./is-integer');
+
+module.exports = function (num) { return isInteger(num) && (num >= 0); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-number.js b/tools/eslint/node_modules/es5-ext/number/is-number.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-number.js
rename to tools/eslint/node_modules/es5-ext/number/is-number.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/implement.js b/tools/eslint/node_modules/es5-ext/number/is-safe-integer/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/implement.js
rename to tools/eslint/node_modules/es5-ext/number/is-safe-integer/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/index.js b/tools/eslint/node_modules/es5-ext/number/is-safe-integer/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/index.js
rename to tools/eslint/node_modules/es5-ext/number/is-safe-integer/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/shim.js b/tools/eslint/node_modules/es5-ext/number/is-safe-integer/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/is-safe-integer/shim.js
rename to tools/eslint/node_modules/es5-ext/number/is-safe-integer/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/implement.js b/tools/eslint/node_modules/es5-ext/number/max-safe-integer/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/implement.js
rename to tools/eslint/node_modules/es5-ext/number/max-safe-integer/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/index.js b/tools/eslint/node_modules/es5-ext/number/max-safe-integer/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/index.js
rename to tools/eslint/node_modules/es5-ext/number/max-safe-integer/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/implement.js b/tools/eslint/node_modules/es5-ext/number/min-safe-integer/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/implement.js
rename to tools/eslint/node_modules/es5-ext/number/min-safe-integer/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/index.js b/tools/eslint/node_modules/es5-ext/number/min-safe-integer/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/index.js
rename to tools/eslint/node_modules/es5-ext/number/min-safe-integer/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/tools/eslint/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-integer.js b/tools/eslint/node_modules/es5-ext/number/to-integer.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-integer.js
rename to tools/eslint/node_modules/es5-ext/number/to-integer.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-pos-integer.js b/tools/eslint/node_modules/es5-ext/number/to-pos-integer.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-pos-integer.js
rename to tools/eslint/node_modules/es5-ext/number/to-pos-integer.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-uint32.js b/tools/eslint/node_modules/es5-ext/number/to-uint32.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/to-uint32.js
rename to tools/eslint/node_modules/es5-ext/number/to-uint32.js
diff --git a/tools/eslint/node_modules/es5-ext/object/_iterate.js b/tools/eslint/node_modules/es5-ext/object/_iterate.js
new file mode 100644
index 00000000000000..1ccbaf2742eb16
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/_iterate.js
@@ -0,0 +1,29 @@
+// Internal method, used by iteration functions.
+// Calls a function for each key-value pair found in object
+// Optionally takes compareFn to iterate object in specific order
+
+'use strict';
+
+var callable = require('./valid-callable')
+  , value    = require('./valid-value')
+
+  , bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
+  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+module.exports = function (method, defVal) {
+	return function (obj, cb/*, thisArg, compareFn*/) {
+		var list, thisArg = arguments[2], compareFn = arguments[3];
+		obj = Object(value(obj));
+		callable(cb);
+
+		list = keys(obj);
+		if (compareFn) {
+			list.sort((typeof compareFn === 'function') ? bind.call(compareFn, obj) : undefined);
+		}
+		if (typeof method !== 'function') method = list[method];
+		return call.call(method, list, function (key, index) {
+			if (!propertyIsEnumerable.call(obj, key)) return defVal;
+			return call.call(cb, thisArg, obj[key], key, obj, index);
+		});
+	};
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/implement.js b/tools/eslint/node_modules/es5-ext/object/assign/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/implement.js
rename to tools/eslint/node_modules/es5-ext/object/assign/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/index.js b/tools/eslint/node_modules/es5-ext/object/assign/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/index.js
rename to tools/eslint/node_modules/es5-ext/object/assign/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/is-implemented.js b/tools/eslint/node_modules/es5-ext/object/assign/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/object/assign/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/shim.js b/tools/eslint/node_modules/es5-ext/object/assign/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/assign/shim.js
rename to tools/eslint/node_modules/es5-ext/object/assign/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/clear.js b/tools/eslint/node_modules/es5-ext/object/clear.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/clear.js
rename to tools/eslint/node_modules/es5-ext/object/clear.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/compact.js b/tools/eslint/node_modules/es5-ext/object/compact.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/compact.js
rename to tools/eslint/node_modules/es5-ext/object/compact.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/compare.js b/tools/eslint/node_modules/es5-ext/object/compare.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/compare.js
rename to tools/eslint/node_modules/es5-ext/object/compare.js
diff --git a/tools/eslint/node_modules/es5-ext/object/copy-deep.js b/tools/eslint/node_modules/es5-ext/object/copy-deep.js
new file mode 100644
index 00000000000000..b203a7c6934c57
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/copy-deep.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var forEach       = require('./for-each')
+  , isPlainObject = require('./is-plain-object')
+  , value         = require('./valid-value')
+
+  , isArray = Array.isArray
+  , copy, copyItem;
+
+copyItem = function (value, key) {
+	var index;
+	if (!isPlainObject(value) && !isArray(value)) return value;
+	index = this[0].indexOf(value);
+	if (index === -1) return copy.call(this, value);
+	return this[1][index];
+};
+
+copy = function (source) {
+	var target = isArray(source) ? [] : {};
+	this[0].push(source);
+	this[1].push(target);
+	if (isArray(source)) {
+		source.forEach(function (value, key) {
+			target[key] = copyItem.call(this, value, key);
+		}, this);
+	} else {
+		forEach(source, function (value, key) {
+			target[key] = copyItem.call(this, value, key);
+		}, this);
+	}
+	return target;
+};
+
+module.exports = function (source) {
+	var obj = Object(value(source));
+	if (obj !== source) return obj;
+	return copy.call([[], []], obj);
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy.js b/tools/eslint/node_modules/es5-ext/object/copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy.js
rename to tools/eslint/node_modules/es5-ext/object/copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/count.js b/tools/eslint/node_modules/es5-ext/object/count.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/count.js
rename to tools/eslint/node_modules/es5-ext/object/count.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/create.js b/tools/eslint/node_modules/es5-ext/object/create.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/create.js
rename to tools/eslint/node_modules/es5-ext/object/create.js
diff --git a/tools/eslint/node_modules/es5-ext/object/ensure-natural-number-value.js b/tools/eslint/node_modules/es5-ext/object/ensure-natural-number-value.js
new file mode 100644
index 00000000000000..f58fb4e4a709f5
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/ensure-natural-number-value.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var ensure = require('./ensure-natural-number');
+
+module.exports = function (arg) {
+	if (arg == null) throw new TypeError(arg + " is not a natural number");
+	return ensure(arg);
+};
diff --git a/tools/eslint/node_modules/es5-ext/object/ensure-natural-number.js b/tools/eslint/node_modules/es5-ext/object/ensure-natural-number.js
new file mode 100644
index 00000000000000..af9b4d77c29efe
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/ensure-natural-number.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var isNatural = require('../number/is-natural');
+
+module.exports = function (arg) {
+	var num = Number(arg);
+	if (!isNatural(num)) throw new TypeError(arg + " is not a natural number");
+	return num;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/eq.js b/tools/eslint/node_modules/es5-ext/object/eq.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/eq.js
rename to tools/eslint/node_modules/es5-ext/object/eq.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/every.js b/tools/eslint/node_modules/es5-ext/object/every.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/every.js
rename to tools/eslint/node_modules/es5-ext/object/every.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/filter.js b/tools/eslint/node_modules/es5-ext/object/filter.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/filter.js
rename to tools/eslint/node_modules/es5-ext/object/filter.js
diff --git a/tools/eslint/node_modules/es5-ext/object/find-key.js b/tools/eslint/node_modules/es5-ext/object/find-key.js
new file mode 100644
index 00000000000000..5841fd709a4f86
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/find-key.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./_iterate')(require('../array/#/find'), false);
diff --git a/tools/eslint/node_modules/es5-ext/object/find.js b/tools/eslint/node_modules/es5-ext/object/find.js
new file mode 100644
index 00000000000000..c94f643f3f50c6
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/find.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var findKey = require('./find-key');
+
+module.exports = function (obj, cb/*, thisArg, compareFn*/) {
+	var key = findKey.apply(this, arguments);
+	return (key == null) ? key : obj[key];
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/first-key.js b/tools/eslint/node_modules/es5-ext/object/first-key.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/first-key.js
rename to tools/eslint/node_modules/es5-ext/object/first-key.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/flatten.js b/tools/eslint/node_modules/es5-ext/object/flatten.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/flatten.js
rename to tools/eslint/node_modules/es5-ext/object/flatten.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/for-each.js b/tools/eslint/node_modules/es5-ext/object/for-each.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/for-each.js
rename to tools/eslint/node_modules/es5-ext/object/for-each.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/get-property-names.js b/tools/eslint/node_modules/es5-ext/object/get-property-names.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/get-property-names.js
rename to tools/eslint/node_modules/es5-ext/object/get-property-names.js
diff --git a/tools/eslint/node_modules/es5-ext/object/index.js b/tools/eslint/node_modules/es5-ext/object/index.js
new file mode 100644
index 00000000000000..77f5b6aebab1e1
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/index.js
@@ -0,0 +1,53 @@
+'use strict';
+
+module.exports = {
+	assign:                     require('./assign'),
+	clear:                      require('./clear'),
+	compact:                    require('./compact'),
+	compare:                    require('./compare'),
+	copy:                       require('./copy'),
+	copyDeep:                   require('./copy-deep'),
+	count:                      require('./count'),
+	create:                     require('./create'),
+	ensureNaturalNumber:        require('./ensure-natural-number'),
+	ensureNaturalNumberValue:   require('./ensure-natural-number-value'),
+	eq:                         require('./eq'),
+	every:                      require('./every'),
+	filter:                     require('./filter'),
+	find:                       require('./find'),
+	findKey:                    require('./find-key'),
+	firstKey:                   require('./first-key'),
+	flatten:                    require('./flatten'),
+	forEach:                    require('./for-each'),
+	getPropertyNames:           require('./get-property-names'),
+	is:                         require('./is'),
+	isArrayLike:                require('./is-array-like'),
+	isCallable:                 require('./is-callable'),
+	isCopy:                     require('./is-copy'),
+	isCopyDeep:                 require('./is-copy-deep'),
+	isEmpty:                    require('./is-empty'),
+	isNumberValue:              require('./is-number-value'),
+	isObject:                   require('./is-object'),
+	isPlainObject:              require('./is-plain-object'),
+	keyOf:                      require('./key-of'),
+	keys:                       require('./keys'),
+	map:                        require('./map'),
+	mapKeys:                    require('./map-keys'),
+	normalizeOptions:           require('./normalize-options'),
+	mixin:                      require('./mixin'),
+	mixinPrototypes:            require('./mixin-prototypes'),
+	primitiveSet:               require('./primitive-set'),
+	safeTraverse:               require('./safe-traverse'),
+	serialize:                  require('./serialize'),
+	setPrototypeOf:             require('./set-prototype-of'),
+	some:                       require('./some'),
+	toArray:                    require('./to-array'),
+	unserialize:                require('./unserialize'),
+	validateArrayLike:          require('./validate-array-like'),
+	validateArrayLikeObject:    require('./validate-array-like-object'),
+	validCallable:              require('./valid-callable'),
+	validObject:                require('./valid-object'),
+	validateStringifiable:      require('./validate-stringifiable'),
+	validateStringifiableValue: require('./validate-stringifiable-value'),
+	validValue:                 require('./valid-value')
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-array-like.js b/tools/eslint/node_modules/es5-ext/object/is-array-like.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-array-like.js
rename to tools/eslint/node_modules/es5-ext/object/is-array-like.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-callable.js b/tools/eslint/node_modules/es5-ext/object/is-callable.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-callable.js
rename to tools/eslint/node_modules/es5-ext/object/is-callable.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-copy-deep.js b/tools/eslint/node_modules/es5-ext/object/is-copy-deep.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-copy-deep.js
rename to tools/eslint/node_modules/es5-ext/object/is-copy-deep.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-copy.js b/tools/eslint/node_modules/es5-ext/object/is-copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-copy.js
rename to tools/eslint/node_modules/es5-ext/object/is-copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-empty.js b/tools/eslint/node_modules/es5-ext/object/is-empty.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-empty.js
rename to tools/eslint/node_modules/es5-ext/object/is-empty.js
diff --git a/tools/eslint/node_modules/es5-ext/object/is-number-value.js b/tools/eslint/node_modules/es5-ext/object/is-number-value.js
new file mode 100644
index 00000000000000..f6396f580f8911
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/object/is-number-value.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = function (value) { return (value != null) && !isNaN(value); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-object.js b/tools/eslint/node_modules/es5-ext/object/is-object.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-object.js
rename to tools/eslint/node_modules/es5-ext/object/is-object.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-plain-object.js b/tools/eslint/node_modules/es5-ext/object/is-plain-object.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is-plain-object.js
rename to tools/eslint/node_modules/es5-ext/object/is-plain-object.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is.js b/tools/eslint/node_modules/es5-ext/object/is.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/is.js
rename to tools/eslint/node_modules/es5-ext/object/is.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/key-of.js b/tools/eslint/node_modules/es5-ext/object/key-of.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/key-of.js
rename to tools/eslint/node_modules/es5-ext/object/key-of.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/implement.js b/tools/eslint/node_modules/es5-ext/object/keys/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/implement.js
rename to tools/eslint/node_modules/es5-ext/object/keys/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/index.js b/tools/eslint/node_modules/es5-ext/object/keys/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/index.js
rename to tools/eslint/node_modules/es5-ext/object/keys/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/is-implemented.js b/tools/eslint/node_modules/es5-ext/object/keys/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/object/keys/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/shim.js b/tools/eslint/node_modules/es5-ext/object/keys/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/keys/shim.js
rename to tools/eslint/node_modules/es5-ext/object/keys/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map-keys.js b/tools/eslint/node_modules/es5-ext/object/map-keys.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map-keys.js
rename to tools/eslint/node_modules/es5-ext/object/map-keys.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js b/tools/eslint/node_modules/es5-ext/object/map.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js
rename to tools/eslint/node_modules/es5-ext/object/map.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/mixin-prototypes.js b/tools/eslint/node_modules/es5-ext/object/mixin-prototypes.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/mixin-prototypes.js
rename to tools/eslint/node_modules/es5-ext/object/mixin-prototypes.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/mixin.js b/tools/eslint/node_modules/es5-ext/object/mixin.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/mixin.js
rename to tools/eslint/node_modules/es5-ext/object/mixin.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/normalize-options.js b/tools/eslint/node_modules/es5-ext/object/normalize-options.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/normalize-options.js
rename to tools/eslint/node_modules/es5-ext/object/normalize-options.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/primitive-set.js b/tools/eslint/node_modules/es5-ext/object/primitive-set.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/primitive-set.js
rename to tools/eslint/node_modules/es5-ext/object/primitive-set.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/safe-traverse.js b/tools/eslint/node_modules/es5-ext/object/safe-traverse.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/safe-traverse.js
rename to tools/eslint/node_modules/es5-ext/object/safe-traverse.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/serialize.js b/tools/eslint/node_modules/es5-ext/object/serialize.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/serialize.js
rename to tools/eslint/node_modules/es5-ext/object/serialize.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/implement.js b/tools/eslint/node_modules/es5-ext/object/set-prototype-of/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/implement.js
rename to tools/eslint/node_modules/es5-ext/object/set-prototype-of/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/index.js b/tools/eslint/node_modules/es5-ext/object/set-prototype-of/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/index.js
rename to tools/eslint/node_modules/es5-ext/object/set-prototype-of/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/tools/eslint/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/shim.js b/tools/eslint/node_modules/es5-ext/object/set-prototype-of/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/set-prototype-of/shim.js
rename to tools/eslint/node_modules/es5-ext/object/set-prototype-of/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/some.js b/tools/eslint/node_modules/es5-ext/object/some.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/some.js
rename to tools/eslint/node_modules/es5-ext/object/some.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/to-array.js b/tools/eslint/node_modules/es5-ext/object/to-array.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/to-array.js
rename to tools/eslint/node_modules/es5-ext/object/to-array.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/unserialize.js b/tools/eslint/node_modules/es5-ext/object/unserialize.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/unserialize.js
rename to tools/eslint/node_modules/es5-ext/object/unserialize.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-callable.js b/tools/eslint/node_modules/es5-ext/object/valid-callable.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-callable.js
rename to tools/eslint/node_modules/es5-ext/object/valid-callable.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-object.js b/tools/eslint/node_modules/es5-ext/object/valid-object.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-object.js
rename to tools/eslint/node_modules/es5-ext/object/valid-object.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-value.js b/tools/eslint/node_modules/es5-ext/object/valid-value.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/valid-value.js
rename to tools/eslint/node_modules/es5-ext/object/valid-value.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-array-like-object.js b/tools/eslint/node_modules/es5-ext/object/validate-array-like-object.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-array-like-object.js
rename to tools/eslint/node_modules/es5-ext/object/validate-array-like-object.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-array-like.js b/tools/eslint/node_modules/es5-ext/object/validate-array-like.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-array-like.js
rename to tools/eslint/node_modules/es5-ext/object/validate-array-like.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-stringifiable-value.js b/tools/eslint/node_modules/es5-ext/object/validate-stringifiable-value.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-stringifiable-value.js
rename to tools/eslint/node_modules/es5-ext/object/validate-stringifiable-value.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-stringifiable.js b/tools/eslint/node_modules/es5-ext/object/validate-stringifiable.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/validate-stringifiable.js
rename to tools/eslint/node_modules/es5-ext/object/validate-stringifiable.js
diff --git a/tools/eslint/node_modules/es5-ext/package.json b/tools/eslint/node_modules/es5-ext/package.json
new file mode 100644
index 00000000000000..e39cfd7a7183f4
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/package.json
@@ -0,0 +1,105 @@
+{
+  "_args": [
+    [
+      "es5-ext@~0.10.8",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map"
+    ]
+  ],
+  "_from": "es5-ext@>=0.10.8 <0.11.0",
+  "_id": "es5-ext@0.10.11",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es5-ext",
+  "_nodeVersion": "4.2.3",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.14.7",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es5-ext",
+    "raw": "es5-ext@~0.10.8",
+    "rawSpec": "~0.10.8",
+    "scope": null,
+    "spec": ">=0.10.8 <0.11.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/d",
+    "/eslint/es6-iterator",
+    "/eslint/es6-map",
+    "/eslint/es6-set",
+    "/eslint/es6-symbol",
+    "/eslint/es6-weak-map",
+    "/eslint/event-emitter"
+  ],
+  "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz",
+  "_shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
+  "_shrinkwrap": null,
+  "_spec": "es5-ext@~0.10.8",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es5-ext/issues"
+  },
+  "dependencies": {
+    "es6-iterator": "2",
+    "es6-symbol": "~3.0.2"
+  },
+  "description": "ECMAScript extensions and shims",
+  "devDependencies": {
+    "tad": "~0.2.4",
+    "xlint": "~0.2.2",
+    "xlint-jslint-medikoo": "~0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
+    "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz"
+  },
+  "gitHead": "aba94140a6bf79ce1a448a2db8834e8c1842b527",
+  "homepage": "https://github.com/medikoo/es5-ext#readme",
+  "keywords": [
+    "addons",
+    "ecmascript",
+    "ecmascript5",
+    "ecmascript6",
+    "es5",
+    "es6",
+    "ext",
+    "extensions",
+    "extras",
+    "harmony",
+    "javascript",
+    "polyfill",
+    "shim",
+    "util",
+    "utilities",
+    "utils"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es5-ext",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es5-ext.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "0.10.11"
+}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/is-sticky.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/is-sticky.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/is-sticky.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/is-sticky.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/is-unicode.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/is-unicode.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/is-unicode.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/is-unicode.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/match/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/match/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/match/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/match/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/shim.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/match/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/match/shim.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/match/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/replace/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/replace/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/replace/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/replace/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/shim.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/replace/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/replace/shim.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/replace/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/search/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/search/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/search/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/search/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/shim.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/search/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/search/shim.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/search/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/split/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/split/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/split/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/split/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/shim.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/split/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/split/shim.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/split/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/implement.js
diff --git a/tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
new file mode 100644
index 00000000000000..e4184ee4ecef30
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function () {
+	var dummyRegExp = /a/;
+	// We need to do check on instance and not on prototype due to how ES2015 spec evolved:
+	// https://github.com/tc39/ecma262/issues/262
+	// https://github.com/tc39/ecma262/pull/263
+	// https://bugs.chromium.org/p/v8/issues/detail?id=4617
+	return 'sticky' in dummyRegExp;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/implement.js
diff --git a/tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
new file mode 100644
index 00000000000000..3e3a54b6691e55
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function () {
+	var dummyRegExp = /a/;
+	// We need to do check on instance and not on prototype due to how ES2015 spec evolved:
+	// https://github.com/tc39/ecma262/issues/262
+	// https://github.com/tc39/ecma262/pull/263
+	// https://bugs.chromium.org/p/v8/issues/detail?id=4617
+	return 'unicode' in dummyRegExp;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/escape.js b/tools/eslint/node_modules/es5-ext/reg-exp/escape.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/escape.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/escape.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/index.js b/tools/eslint/node_modules/es5-ext/reg-exp/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/index.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/is-reg-exp.js b/tools/eslint/node_modules/es5-ext/reg-exp/is-reg-exp.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/is-reg-exp.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/is-reg-exp.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/tools/eslint/node_modules/es5-ext/reg-exp/valid-reg-exp.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js
rename to tools/eslint/node_modules/es5-ext/reg-exp/valid-reg-exp.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/implement.js b/tools/eslint/node_modules/es5-ext/string/#/@@iterator/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/@@iterator/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/index.js b/tools/eslint/node_modules/es5-ext/string/#/@@iterator/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/@@iterator/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/shim.js b/tools/eslint/node_modules/es5-ext/string/#/@@iterator/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/@@iterator/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/@@iterator/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/at.js b/tools/eslint/node_modules/es5-ext/string/#/at.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/at.js
rename to tools/eslint/node_modules/es5-ext/string/#/at.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/camel-to-hyphen.js b/tools/eslint/node_modules/es5-ext/string/#/camel-to-hyphen.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/camel-to-hyphen.js
rename to tools/eslint/node_modules/es5-ext/string/#/camel-to-hyphen.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/capitalize.js b/tools/eslint/node_modules/es5-ext/string/#/capitalize.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/capitalize.js
rename to tools/eslint/node_modules/es5-ext/string/#/capitalize.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/case-insensitive-compare.js b/tools/eslint/node_modules/es5-ext/string/#/case-insensitive-compare.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/case-insensitive-compare.js
rename to tools/eslint/node_modules/es5-ext/string/#/case-insensitive-compare.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/implement.js b/tools/eslint/node_modules/es5-ext/string/#/code-point-at/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/code-point-at/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/index.js b/tools/eslint/node_modules/es5-ext/string/#/code-point-at/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/code-point-at/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/shim.js b/tools/eslint/node_modules/es5-ext/string/#/code-point-at/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/code-point-at/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/code-point-at/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/implement.js b/tools/eslint/node_modules/es5-ext/string/#/contains/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/contains/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/index.js b/tools/eslint/node_modules/es5-ext/string/#/contains/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/contains/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/contains/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/contains/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/shim.js b/tools/eslint/node_modules/es5-ext/string/#/contains/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/contains/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/contains/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/implement.js b/tools/eslint/node_modules/es5-ext/string/#/ends-with/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/ends-with/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/index.js b/tools/eslint/node_modules/es5-ext/string/#/ends-with/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/ends-with/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/ends-with/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/ends-with/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/shim.js b/tools/eslint/node_modules/es5-ext/string/#/ends-with/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/ends-with/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/ends-with/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/hyphen-to-camel.js b/tools/eslint/node_modules/es5-ext/string/#/hyphen-to-camel.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/hyphen-to-camel.js
rename to tools/eslint/node_modules/es5-ext/string/#/hyphen-to-camel.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/indent.js b/tools/eslint/node_modules/es5-ext/string/#/indent.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/indent.js
rename to tools/eslint/node_modules/es5-ext/string/#/indent.js
diff --git a/tools/eslint/node_modules/es5-ext/string/#/index.js b/tools/eslint/node_modules/es5-ext/string/#/index.js
new file mode 100644
index 00000000000000..3efa01c040b19c
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/string/#/index.js
@@ -0,0 +1,22 @@
+'use strict';
+
+module.exports = {
+	'@@iterator':           require('./@@iterator'),
+	at:                     require('./at'),
+	camelToHyphen:          require('./camel-to-hyphen'),
+	capitalize:             require('./capitalize'),
+	caseInsensitiveCompare: require('./case-insensitive-compare'),
+	codePointAt:            require('./code-point-at'),
+	contains:               require('./contains'),
+	hyphenToCamel:          require('./hyphen-to-camel'),
+	endsWith:               require('./ends-with'),
+	indent:                 require('./indent'),
+	last:                   require('./last'),
+	normalize:              require('./normalize'),
+	pad:                    require('./pad'),
+	plainReplace:           require('./plain-replace'),
+	plainReplaceAll:        require('./plain-replace-all'),
+	repeat:                 require('./repeat'),
+	startsWith:             require('./starts-with'),
+	uncapitalize:           require('./uncapitalize')
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/last.js b/tools/eslint/node_modules/es5-ext/string/#/last.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/last.js
rename to tools/eslint/node_modules/es5-ext/string/#/last.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/_data.js b/tools/eslint/node_modules/es5-ext/string/#/normalize/_data.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/_data.js
rename to tools/eslint/node_modules/es5-ext/string/#/normalize/_data.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/implement.js b/tools/eslint/node_modules/es5-ext/string/#/normalize/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/normalize/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/index.js b/tools/eslint/node_modules/es5-ext/string/#/normalize/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/normalize/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/normalize/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/normalize/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/shim.js b/tools/eslint/node_modules/es5-ext/string/#/normalize/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/normalize/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/normalize/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/pad.js b/tools/eslint/node_modules/es5-ext/string/#/pad.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/pad.js
rename to tools/eslint/node_modules/es5-ext/string/#/pad.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/plain-replace-all.js b/tools/eslint/node_modules/es5-ext/string/#/plain-replace-all.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/plain-replace-all.js
rename to tools/eslint/node_modules/es5-ext/string/#/plain-replace-all.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/plain-replace.js b/tools/eslint/node_modules/es5-ext/string/#/plain-replace.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/plain-replace.js
rename to tools/eslint/node_modules/es5-ext/string/#/plain-replace.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/implement.js b/tools/eslint/node_modules/es5-ext/string/#/repeat/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/repeat/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/index.js b/tools/eslint/node_modules/es5-ext/string/#/repeat/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/repeat/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/repeat/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/repeat/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/shim.js b/tools/eslint/node_modules/es5-ext/string/#/repeat/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/repeat/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/repeat/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/implement.js b/tools/eslint/node_modules/es5-ext/string/#/starts-with/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/implement.js
rename to tools/eslint/node_modules/es5-ext/string/#/starts-with/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/index.js b/tools/eslint/node_modules/es5-ext/string/#/starts-with/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/index.js
rename to tools/eslint/node_modules/es5-ext/string/#/starts-with/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/#/starts-with/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/#/starts-with/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/shim.js b/tools/eslint/node_modules/es5-ext/string/#/starts-with/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/starts-with/shim.js
rename to tools/eslint/node_modules/es5-ext/string/#/starts-with/shim.js
diff --git a/tools/eslint/node_modules/es5-ext/string/#/uncapitalize.js b/tools/eslint/node_modules/es5-ext/string/#/uncapitalize.js
new file mode 100644
index 00000000000000..bedd7e7b007c5d
--- /dev/null
+++ b/tools/eslint/node_modules/es5-ext/string/#/uncapitalize.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var ensureStringifiable = require('../../object/validate-stringifiable-value');
+
+module.exports = function () {
+	var str = ensureStringifiable(this);
+	return str.charAt(0).toLowerCase() + str.slice(1);
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/format-method.js b/tools/eslint/node_modules/es5-ext/string/format-method.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/format-method.js
rename to tools/eslint/node_modules/es5-ext/string/format-method.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/implement.js b/tools/eslint/node_modules/es5-ext/string/from-code-point/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/implement.js
rename to tools/eslint/node_modules/es5-ext/string/from-code-point/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/index.js b/tools/eslint/node_modules/es5-ext/string/from-code-point/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/index.js
rename to tools/eslint/node_modules/es5-ext/string/from-code-point/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/from-code-point/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/from-code-point/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/shim.js b/tools/eslint/node_modules/es5-ext/string/from-code-point/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/from-code-point/shim.js
rename to tools/eslint/node_modules/es5-ext/string/from-code-point/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/index.js b/tools/eslint/node_modules/es5-ext/string/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/index.js
rename to tools/eslint/node_modules/es5-ext/string/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/is-string.js b/tools/eslint/node_modules/es5-ext/string/is-string.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/is-string.js
rename to tools/eslint/node_modules/es5-ext/string/is-string.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/random-uniq.js b/tools/eslint/node_modules/es5-ext/string/random-uniq.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/random-uniq.js
rename to tools/eslint/node_modules/es5-ext/string/random-uniq.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/implement.js b/tools/eslint/node_modules/es5-ext/string/raw/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/implement.js
rename to tools/eslint/node_modules/es5-ext/string/raw/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/index.js b/tools/eslint/node_modules/es5-ext/string/raw/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/index.js
rename to tools/eslint/node_modules/es5-ext/string/raw/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/is-implemented.js b/tools/eslint/node_modules/es5-ext/string/raw/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/is-implemented.js
rename to tools/eslint/node_modules/es5-ext/string/raw/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/shim.js b/tools/eslint/node_modules/es5-ext/string/raw/shim.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/raw/shim.js
rename to tools/eslint/node_modules/es5-ext/string/raw/shim.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/#/chain.js b/tools/eslint/node_modules/es6-iterator/#/chain.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/#/chain.js
rename to tools/eslint/node_modules/es6-iterator/#/chain.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.lint b/tools/eslint/node_modules/es6-iterator/.lint
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.lint
rename to tools/eslint/node_modules/es6-iterator/.lint
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/LICENSE b/tools/eslint/node_modules/es6-iterator/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/LICENSE
rename to tools/eslint/node_modules/es6-iterator/LICENSE
diff --git a/tools/eslint/node_modules/es6-iterator/README.md b/tools/eslint/node_modules/es6-iterator/README.md
new file mode 100644
index 00000000000000..30faa82bbaefaa
--- /dev/null
+++ b/tools/eslint/node_modules/es6-iterator/README.md
@@ -0,0 +1,148 @@
+# es6-iterator
+## ECMAScript 6 Iterator interface
+
+### Installation
+
+	$ npm install es6-iterator
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+## API
+
+### Constructors
+
+#### Iterator(list) _(es6-iterator)_
+
+Abstract Iterator interface. Meant for extensions and not to be used on its own.
+
+Accepts any _list_ object (technically object with numeric _length_ property).
+
+_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_
+
+```javascript
+var Iterator = require('es6-iterator')
+var iterator = new Iterator([1, 2, 3]);
+
+iterator.next(); // { value: 1, done: false }
+iterator.next(); // { value: 2, done: false }
+iterator.next(); // { value: 3, done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+
+#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_
+
+Dedicated for arrays and array-likes. Supports three iteration kinds:
+* __value__ _(default)_ - Iterates values
+* __key__ - Iterates indexes
+* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.
+
+
+```javascript
+var ArrayIterator = require('es6-iterator/array')
+var iterator = new ArrayIterator([1, 2, 3], 'key+value');
+
+iterator.next(); // { value: [0, 1], done: false }
+iterator.next(); // { value: [1, 2], done: false }
+iterator.next(); // { value: [2, 3], done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+May also be used for _arguments_ objects:
+
+```javascript
+(function () {
+  var iterator = new ArrayIterator(arguments);
+
+  iterator.next(); // { value: 1, done: false }
+  iterator.next(); // { value: 2, done: false }
+  iterator.next(); // { value: 3, done: false }
+  iterator.next(); // { value: undefined, done: true }
+}(1, 2, 3));
+```
+
+#### StringIterator(str) _(es6-iterator/string)_
+
+Assures proper iteration over unicode symbols.
+See: http://mathiasbynens.be/notes/javascript-unicode
+
+```javascript
+var StringIterator = require('es6-iterator/string');
+var iterator = new StringIterator('f🙈o🙉o🙊');
+
+iterator.next(); // { value: 'f', done: false }
+iterator.next(); // { value: '🙈', done: false }
+iterator.next(); // { value: 'o', done: false }
+iterator.next(); // { value: '🙉', done: false }
+iterator.next(); // { value: 'o', done: false }
+iterator.next(); // { value: '🙊', done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+### Function utilities
+
+#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_
+
+Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.
+
+```
+var forOf = require('es6-iterator/for-of');
+var result = [];
+
+forOf('🙈🙉🙊', function (monkey) { result.push(monkey); });
+console.log(result); // ['🙈', '🙉', '🙊'];
+```
+
+Optionally you can break iteration at any point:
+
+```javascript
+var result = [];
+
+forOf([1,2,3,4]', function (val, doBreak) {
+  result.push(monkey);
+  if (val >= 3) doBreak();
+});
+console.log(result); // [1, 2, 3];
+```
+
+#### get(obj) _(es6-iterator/get)_
+
+Return iterator for any iterable object.
+
+```javascript
+var getIterator = require('es6-iterator/get');
+var iterator = get([1,2,3]);
+
+iterator.next(); // { value: 1, done: false }
+iterator.next(); // { value: 2, done: false }
+iterator.next(); // { value: 3, done: false }
+iterator.next(); // { value: undefined, done: true }
+```
+
+#### isIterable(obj) _(es6-iterator/is-iterable)_
+
+Whether _obj_ is iterable
+
+```javascript
+var isIterable = require('es6-iterator/is-iterable');
+
+isIterable(null); // false
+isIterable(true); // false
+isIterable('str'); // true
+isIterable(['a', 'r', 'r']); // true
+isIterable(new ArrayIterator([])); // true
+```
+
+#### validIterable(obj) _(es6-iterator/valid-iterable)_
+
+If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.
+
+### Method extensions
+
+#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_
+
+Chain multiple iterators into one.
+
+### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/array.js b/tools/eslint/node_modules/es6-iterator/array.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/array.js
rename to tools/eslint/node_modules/es6-iterator/array.js
diff --git a/tools/eslint/node_modules/es6-iterator/for-of.js b/tools/eslint/node_modules/es6-iterator/for-of.js
new file mode 100644
index 00000000000000..c7a28411d59db9
--- /dev/null
+++ b/tools/eslint/node_modules/es6-iterator/for-of.js
@@ -0,0 +1,46 @@
+'use strict';
+
+var isArguments = require('es5-ext/function/is-arguments')
+  , callable    = require('es5-ext/object/valid-callable')
+  , isString    = require('es5-ext/string/is-string')
+  , get         = require('./get')
+
+  , isArray = Array.isArray, call = Function.prototype.call
+  , some = Array.prototype.some;
+
+module.exports = function (iterable, cb/*, thisArg*/) {
+	var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
+	if (isArray(iterable) || isArguments(iterable)) mode = 'array';
+	else if (isString(iterable)) mode = 'string';
+	else iterable = get(iterable);
+
+	callable(cb);
+	doBreak = function () { broken = true; };
+	if (mode === 'array') {
+		some.call(iterable, function (value) {
+			call.call(cb, thisArg, value, doBreak);
+			if (broken) return true;
+		});
+		return;
+	}
+	if (mode === 'string') {
+		l = iterable.length;
+		for (i = 0; i < l; ++i) {
+			char = iterable[i];
+			if ((i + 1) < l) {
+				code = char.charCodeAt(0);
+				if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i];
+			}
+			call.call(cb, thisArg, char, doBreak);
+			if (broken) break;
+		}
+		return;
+	}
+	result = iterable.next();
+
+	while (!result.done) {
+		call.call(cb, thisArg, result.value, doBreak);
+		if (broken) return;
+		result = iterable.next();
+	}
+};
diff --git a/tools/eslint/node_modules/es6-iterator/get.js b/tools/eslint/node_modules/es6-iterator/get.js
new file mode 100644
index 00000000000000..7c7e052b191d63
--- /dev/null
+++ b/tools/eslint/node_modules/es6-iterator/get.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var isArguments    = require('es5-ext/function/is-arguments')
+  , isString       = require('es5-ext/string/is-string')
+  , ArrayIterator  = require('./array')
+  , StringIterator = require('./string')
+  , iterable       = require('./valid-iterable')
+  , iteratorSymbol = require('es6-symbol').iterator;
+
+module.exports = function (obj) {
+	if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol]();
+	if (isArguments(obj)) return new ArrayIterator(obj);
+	if (isString(obj)) return new StringIterator(obj);
+	return new ArrayIterator(obj);
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/index.js b/tools/eslint/node_modules/es6-iterator/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/index.js
rename to tools/eslint/node_modules/es6-iterator/index.js
diff --git a/tools/eslint/node_modules/es6-iterator/is-iterable.js b/tools/eslint/node_modules/es6-iterator/is-iterable.js
new file mode 100644
index 00000000000000..2c6f496c38c4c2
--- /dev/null
+++ b/tools/eslint/node_modules/es6-iterator/is-iterable.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var isArguments    = require('es5-ext/function/is-arguments')
+  , isString       = require('es5-ext/string/is-string')
+  , iteratorSymbol = require('es6-symbol').iterator
+
+  , isArray = Array.isArray;
+
+module.exports = function (value) {
+	if (value == null) return false;
+	if (isArray(value)) return true;
+	if (isString(value)) return true;
+	if (isArguments(value)) return true;
+	return (typeof value[iteratorSymbol] === 'function');
+};
diff --git a/tools/eslint/node_modules/es6-iterator/package.json b/tools/eslint/node_modules/es6-iterator/package.json
new file mode 100644
index 00000000000000..d15fb99bc98e24
--- /dev/null
+++ b/tools/eslint/node_modules/es6-iterator/package.json
@@ -0,0 +1,94 @@
+{
+  "_args": [
+    [
+      "es6-iterator@2",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map"
+    ]
+  ],
+  "_from": "es6-iterator@>=2.0.0 <3.0.0",
+  "_id": "es6-iterator@2.0.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es6-iterator",
+  "_nodeVersion": "0.12.7",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.11.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es6-iterator",
+    "raw": "es6-iterator@2",
+    "rawSpec": "2",
+    "scope": null,
+    "spec": ">=2.0.0 <3.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/es5-ext",
+    "/eslint/es6-map",
+    "/eslint/es6-set",
+    "/eslint/es6-weak-map"
+  ],
+  "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz",
+  "_shasum": "bd968567d61635e33c0b80727613c9cb4b096bac",
+  "_shrinkwrap": null,
+  "_spec": "es6-iterator@2",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es6-iterator/issues"
+  },
+  "dependencies": {
+    "d": "^0.1.1",
+    "es5-ext": "^0.10.7",
+    "es6-symbol": "3"
+  },
+  "description": "Iterator abstraction based on ES6 specification",
+  "devDependencies": {
+    "event-emitter": "^0.3.4",
+    "tad": "^0.2.3",
+    "xlint": "^0.2.2",
+    "xlint-jslint-medikoo": "^0.1.3"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "bd968567d61635e33c0b80727613c9cb4b096bac",
+    "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz"
+  },
+  "gitHead": "4d9445834e87780ab373b14d6791e860899e2d31",
+  "homepage": "https://github.com/medikoo/es6-iterator#readme",
+  "keywords": [
+    "array",
+    "generator",
+    "iterator",
+    "list",
+    "map",
+    "set"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es6-iterator",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es6-iterator.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "2.0.0"
+}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/string.js b/tools/eslint/node_modules/es6-iterator/string.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/string.js
rename to tools/eslint/node_modules/es6-iterator/string.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/valid-iterable.js b/tools/eslint/node_modules/es6-iterator/valid-iterable.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/valid-iterable.js
rename to tools/eslint/node_modules/es6-iterator/valid-iterable.js
diff --git a/tools/eslint/node_modules/es6-map/.lint b/tools/eslint/node_modules/es6-map/.lint
new file mode 100644
index 00000000000000..fa861e073d1176
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/.lint
@@ -0,0 +1,13 @@
+@root
+
+module
+
+indent 2
+maxlen 100
+tabs
+
+ass
+nomen
+plusplus
+
+predef+ Map
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/LICENCE b/tools/eslint/node_modules/es6-map/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/LICENCE
rename to tools/eslint/node_modules/es6-map/LICENSE
diff --git a/tools/eslint/node_modules/es6-map/README.md b/tools/eslint/node_modules/es6-map/README.md
new file mode 100644
index 00000000000000..f1a2d95d4f9bf5
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/README.md
@@ -0,0 +1,75 @@
+# es6-map
+## Map collection as specified in ECMAScript6
+
+### Usage
+
+It’s safest to use *es6-map* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:
+
+```javascript
+var Map = require('es6-map');
+```
+
+If you want to make sure your environment implements `Map` globally, do:
+
+```javascript
+require('es6-map/implement');
+```
+
+If you strictly want to use the polyfill even if the native `Map` exists, do:
+
+```javascript
+var Map = require('es6-map/polyfill');
+```
+
+### Installation
+
+	$ npm install es6-map
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+#### API
+
+Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-map-objects). Still if you want quick look, follow examples:
+
+```javascript
+var Map = require('es6-map');
+
+var x = {}, y = {}, map = new Map([['raz', 'one'], ['dwa', 'two'], [x, y]]);
+
+map.size;                 // 3
+map.get('raz');           // 'one'
+map.get(x);               // y
+map.has('raz');           // true
+map.has(x);               // true
+map.has('foo');           // false
+map.set('trzy', 'three'); // map
+map.size                  // 4
+map.get('trzy');          // 'three'
+map.has('trzy');          // true
+map.has('dwa');           // true
+map.delete('dwa');        // true
+map.size;                 // 3
+
+map.forEach(function (value, key) {
+  // { 'raz', 'one' }, { x, y }, { 'trzy', 'three' } iterated
+});
+
+// FF nightly only:
+for (value of map) {
+ // ['raz', 'one'], [x, y], ['trzy', 'three'] iterated
+}
+
+var iterator = map.values();
+
+iterator.next(); // { done: false, value: 'one' }
+iterator.next(); // { done: false, value: y }
+iterator.next(); // { done: false, value: 'three' }
+iterator.next(); // { done: true, value: undefined }
+
+map.clear(); // undefined
+map.size; // 0
+```
+
+## Tests [![Build Status](https://travis-ci.org/medikoo/es6-map.png)](https://travis-ci.org/medikoo/es6-map)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/implement.js b/tools/eslint/node_modules/es6-map/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/implement.js
rename to tools/eslint/node_modules/es6-map/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/index.js b/tools/eslint/node_modules/es6-map/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/index.js
rename to tools/eslint/node_modules/es6-map/index.js
diff --git a/tools/eslint/node_modules/es6-map/is-implemented.js b/tools/eslint/node_modules/es6-map/is-implemented.js
new file mode 100644
index 00000000000000..cd3b8f23de5114
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/is-implemented.js
@@ -0,0 +1,32 @@
+'use strict';
+
+module.exports = function () {
+	var map, iterator, result;
+	if (typeof Map !== 'function') return false;
+	try {
+		// WebKit doesn't support arguments and crashes
+		map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
+	} catch (e) {
+		return false;
+	}
+	if (String(map) !== '[object Map]') return false;
+	if (map.size !== 3) return false;
+	if (typeof map.clear !== 'function') return false;
+	if (typeof map.delete !== 'function') return false;
+	if (typeof map.entries !== 'function') return false;
+	if (typeof map.forEach !== 'function') return false;
+	if (typeof map.get !== 'function') return false;
+	if (typeof map.has !== 'function') return false;
+	if (typeof map.keys !== 'function') return false;
+	if (typeof map.set !== 'function') return false;
+	if (typeof map.values !== 'function') return false;
+
+	iterator = map.entries();
+	result = iterator.next();
+	if (result.done !== false) return false;
+	if (!result.value) return false;
+	if (result.value[0] !== 'raz') return false;
+	if (result.value[1] !== 'one') return false;
+
+	return true;
+};
diff --git a/tools/eslint/node_modules/es6-map/is-map.js b/tools/eslint/node_modules/es6-map/is-map.js
new file mode 100644
index 00000000000000..1e1fa823327a60
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/is-map.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var toStringTagSymbol = require('es6-symbol').toStringTag
+
+  , toString = Object.prototype.toString
+  , id = '[object Map]'
+  , Global = (typeof Map === 'undefined') ? null : Map;
+
+module.exports = function (x) {
+	return (x && ((Global && ((x instanceof Global) || (x === Global.prototype))) ||
+			(toString.call(x) === id) || (x[toStringTagSymbol] === 'Map'))) || false;
+};
diff --git a/tools/eslint/node_modules/es6-map/is-native-implemented.js b/tools/eslint/node_modules/es6-map/is-native-implemented.js
new file mode 100644
index 00000000000000..b0b7a191695b89
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/is-native-implemented.js
@@ -0,0 +1,9 @@
+// Exports true if environment provides native `Map` implementation,
+// whatever that is.
+
+'use strict';
+
+module.exports = (function () {
+	if (typeof Map === 'undefined') return false;
+	return (Object.prototype.toString.call(new Map()) === '[object Map]');
+}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/lib/iterator-kinds.js b/tools/eslint/node_modules/es6-map/lib/iterator-kinds.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/lib/iterator-kinds.js
rename to tools/eslint/node_modules/es6-map/lib/iterator-kinds.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/lib/iterator.js b/tools/eslint/node_modules/es6-map/lib/iterator.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/lib/iterator.js
rename to tools/eslint/node_modules/es6-map/lib/iterator.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/lib/primitive-iterator.js b/tools/eslint/node_modules/es6-map/lib/primitive-iterator.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/lib/primitive-iterator.js
rename to tools/eslint/node_modules/es6-map/lib/primitive-iterator.js
diff --git a/tools/eslint/node_modules/es6-map/package.json b/tools/eslint/node_modules/es6-map/package.json
new file mode 100644
index 00000000000000..8d385618f22361
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/package.json
@@ -0,0 +1,97 @@
+{
+  "_args": [
+    [
+      "es6-map@^0.1.2",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope"
+    ]
+  ],
+  "_from": "es6-map@>=0.1.2 <0.2.0",
+  "_id": "es6-map@0.1.3",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es6-map",
+  "_nodeVersion": "4.2.2",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.14.7",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es6-map",
+    "raw": "es6-map@^0.1.2",
+    "rawSpec": "^0.1.2",
+    "scope": null,
+    "spec": ">=0.1.2 <0.2.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/escope"
+  ],
+  "_resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.3.tgz",
+  "_shasum": "fe58c6654c6acd54e4397cdb72379d59b6ad5894",
+  "_shrinkwrap": null,
+  "_spec": "es6-map@^0.1.2",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es6-map/issues"
+  },
+  "dependencies": {
+    "d": "~0.1.1",
+    "es5-ext": "~0.10.8",
+    "es6-iterator": "2",
+    "es6-set": "~0.1.3",
+    "es6-symbol": "~3.0.1",
+    "event-emitter": "~0.3.4"
+  },
+  "description": "ECMAScript6 Map polyfill",
+  "devDependencies": {
+    "tad": "~0.2.4",
+    "xlint": "~0.2.2",
+    "xlint-jslint-medikoo": "~0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "fe58c6654c6acd54e4397cdb72379d59b6ad5894",
+    "tarball": "http://registry.npmjs.org/es6-map/-/es6-map-0.1.3.tgz"
+  },
+  "gitHead": "90ef2306db607837426cb806bcd5d439ed90827c",
+  "homepage": "https://github.com/medikoo/es6-map#readme",
+  "keywords": [
+    "collection",
+    "ecmascript",
+    "es6",
+    "harmony",
+    "hash",
+    "list",
+    "map",
+    "polyfill",
+    "ponyfill",
+    "shim"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es6-map",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es6-map.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "0.1.3"
+}
diff --git a/tools/eslint/node_modules/es6-map/polyfill.js b/tools/eslint/node_modules/es6-map/polyfill.js
new file mode 100644
index 00000000000000..c638e760c4a9e3
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/polyfill.js
@@ -0,0 +1,104 @@
+'use strict';
+
+var clear          = require('es5-ext/array/#/clear')
+  , eIndexOf       = require('es5-ext/array/#/e-index-of')
+  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
+  , callable       = require('es5-ext/object/valid-callable')
+  , validValue     = require('es5-ext/object/valid-value')
+  , d              = require('d')
+  , ee             = require('event-emitter')
+  , Symbol         = require('es6-symbol')
+  , iterator       = require('es6-iterator/valid-iterable')
+  , forOf          = require('es6-iterator/for-of')
+  , Iterator       = require('./lib/iterator')
+  , isNative       = require('./is-native-implemented')
+
+  , call = Function.prototype.call
+  , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf
+  , MapPoly;
+
+module.exports = MapPoly = function (/*iterable*/) {
+	var iterable = arguments[0], keys, values, self;
+	if (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \'new\'');
+	if (isNative && setPrototypeOf && (Map !== MapPoly)) {
+		self = setPrototypeOf(new Map(), getPrototypeOf(this));
+	} else {
+		self = this;
+	}
+	if (iterable != null) iterator(iterable);
+	defineProperties(self, {
+		__mapKeysData__: d('c', keys = []),
+		__mapValuesData__: d('c', values = [])
+	});
+	if (!iterable) return self;
+	forOf(iterable, function (value) {
+		var key = validValue(value)[0];
+		value = value[1];
+		if (eIndexOf.call(keys, key) !== -1) return;
+		keys.push(key);
+		values.push(value);
+	}, self);
+	return self;
+};
+
+if (isNative) {
+	if (setPrototypeOf) setPrototypeOf(MapPoly, Map);
+	MapPoly.prototype = Object.create(Map.prototype, {
+		constructor: d(MapPoly)
+	});
+}
+
+ee(defineProperties(MapPoly.prototype, {
+	clear: d(function () {
+		if (!this.__mapKeysData__.length) return;
+		clear.call(this.__mapKeysData__);
+		clear.call(this.__mapValuesData__);
+		this.emit('_clear');
+	}),
+	delete: d(function (key) {
+		var index = eIndexOf.call(this.__mapKeysData__, key);
+		if (index === -1) return false;
+		this.__mapKeysData__.splice(index, 1);
+		this.__mapValuesData__.splice(index, 1);
+		this.emit('_delete', index, key);
+		return true;
+	}),
+	entries: d(function () { return new Iterator(this, 'key+value'); }),
+	forEach: d(function (cb/*, thisArg*/) {
+		var thisArg = arguments[1], iterator, result;
+		callable(cb);
+		iterator = this.entries();
+		result = iterator._next();
+		while (result !== undefined) {
+			call.call(cb, thisArg, this.__mapValuesData__[result],
+				this.__mapKeysData__[result], this);
+			result = iterator._next();
+		}
+	}),
+	get: d(function (key) {
+		var index = eIndexOf.call(this.__mapKeysData__, key);
+		if (index === -1) return;
+		return this.__mapValuesData__[index];
+	}),
+	has: d(function (key) {
+		return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
+	}),
+	keys: d(function () { return new Iterator(this, 'key'); }),
+	set: d(function (key, value) {
+		var index = eIndexOf.call(this.__mapKeysData__, key), emit;
+		if (index === -1) {
+			index = this.__mapKeysData__.push(key) - 1;
+			emit = true;
+		}
+		this.__mapValuesData__[index] = value;
+		if (emit) this.emit('_add', index, key);
+		return this;
+	}),
+	size: d.gs(function () { return this.__mapKeysData__.length; }),
+	values: d(function () { return new Iterator(this, 'value'); }),
+	toString: d(function () { return '[object Map]'; })
+}));
+Object.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {
+	return this.entries();
+}));
+Object.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map'));
diff --git a/tools/eslint/node_modules/es6-map/primitive/index.js b/tools/eslint/node_modules/es6-map/primitive/index.js
new file mode 100644
index 00000000000000..8ac21432ec8a28
--- /dev/null
+++ b/tools/eslint/node_modules/es6-map/primitive/index.js
@@ -0,0 +1,117 @@
+'use strict';
+
+var clear          = require('es5-ext/object/clear')
+  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
+  , validValue     = require('es5-ext/object/valid-value')
+  , callable       = require('es5-ext/object/valid-callable')
+  , d              = require('d')
+  , iterator       = require('es6-iterator/valid-iterable')
+  , forOf          = require('es6-iterator/for-of')
+  , isNative       = require('../is-native-implemented')
+  , MapPolyfill    = require('../polyfill')
+  , Iterator       = require('../lib/primitive-iterator')
+
+  , call = Function.prototype.call
+  , create = Object.create, defineProperty = Object.defineProperty
+  , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf
+  , hasOwnProperty = Object.prototype.hasOwnProperty
+  , PrimitiveMap;
+
+module.exports = PrimitiveMap = function (/*iterable, serialize*/) {
+	var iterable = arguments[0], serialize = arguments[1], self;
+	if (!(this instanceof PrimitiveMap)) throw new TypeError('Constructor requires \'new\'');
+	if (isNative && setPrototypeOf && (Map !== MapPolyfill)) {
+		self = setPrototypeOf(new Map(), getPrototypeOf(this));
+	} else {
+		self = this;
+	}
+	if (iterable != null) iterator(iterable);
+	if (serialize !== undefined) {
+		callable(serialize);
+		defineProperty(self, '_serialize', d('', serialize));
+	}
+	defineProperties(self, {
+		__mapKeysData__: d('c', create(null)),
+		__mapValuesData__: d('c', create(null)),
+		__size__: d('w', 0)
+	});
+	if (!iterable) return self;
+	forOf(iterable, function (value) {
+		var key = validValue(value)[0], sKey = self._serialize(key);
+		if (sKey == null) throw new TypeError(key + " cannot be serialized");
+		value = value[1];
+		if (hasOwnProperty.call(self.__mapKeysData__, sKey)) {
+			if (self.__mapValuesData__[sKey] === value) return;
+		} else {
+			++self.__size__;
+		}
+		self.__mapKeysData__[sKey] = key;
+		self.__mapValuesData__[sKey] = value;
+	});
+	return self;
+};
+if (setPrototypeOf) setPrototypeOf(PrimitiveMap, MapPolyfill);
+
+PrimitiveMap.prototype = create(MapPolyfill.prototype, {
+	constructor: d(PrimitiveMap),
+	_serialize: d(function (value) {
+		if (value && (typeof value.toString !== 'function')) return null;
+		return String(value);
+	}),
+	clear: d(function () {
+		if (!this.__size__) return;
+		clear(this.__mapKeysData__);
+		clear(this.__mapValuesData__);
+		this.__size__ = 0;
+		this.emit('_clear');
+	}),
+	delete: d(function (key) {
+		var sKey = this._serialize(key);
+		if (sKey == null) return false;
+		if (!hasOwnProperty.call(this.__mapKeysData__, sKey)) return false;
+		delete this.__mapKeysData__[sKey];
+		delete this.__mapValuesData__[sKey];
+		--this.__size__;
+		this.emit('_delete', sKey);
+		return true;
+	}),
+	entries: d(function () { return new Iterator(this, 'key+value'); }),
+	forEach: d(function (cb/*, thisArg*/) {
+		var thisArg = arguments[1], iterator, result, sKey;
+		callable(cb);
+		iterator = this.entries();
+		result = iterator._next();
+		while (result !== undefined) {
+			sKey = iterator.__list__[result];
+			call.call(cb, thisArg, this.__mapValuesData__[sKey],
+				this.__mapKeysData__[sKey], this);
+			result = iterator._next();
+		}
+	}),
+	get: d(function (key) {
+		var sKey = this._serialize(key);
+		if (sKey == null) return;
+		return this.__mapValuesData__[sKey];
+	}),
+	has: d(function (key) {
+		var sKey = this._serialize(key);
+		if (sKey == null) return false;
+		return hasOwnProperty.call(this.__mapKeysData__, sKey);
+	}),
+	keys: d(function () { return new Iterator(this, 'key'); }),
+	size: d.gs(function () { return this.__size__; }),
+	set: d(function (key, value) {
+		var sKey = this._serialize(key);
+		if (sKey == null) throw new TypeError(key + " cannot be serialized");
+		if (hasOwnProperty.call(this.__mapKeysData__, sKey)) {
+			if (this.__mapValuesData__[sKey] === value) return this;
+		} else {
+			++this.__size__;
+		}
+		this.__mapKeysData__[sKey] = key;
+		this.__mapValuesData__[sKey] = value;
+		this.emit('_add', sKey);
+		return this;
+	}),
+	values: d(function () { return new Iterator(this, 'value'); })
+});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/valid-map.js b/tools/eslint/node_modules/es6-map/valid-map.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/valid-map.js
rename to tools/eslint/node_modules/es6-map/valid-map.js
diff --git a/tools/eslint/node_modules/es6-set/.lint b/tools/eslint/node_modules/es6-set/.lint
new file mode 100644
index 00000000000000..89386b35ca0724
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/.lint
@@ -0,0 +1,13 @@
+@root
+
+module
+
+tabs
+indent 2
+maxlen 100
+
+ass
+nomen
+plusplus
+
+predef+ Set
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/LICENCE b/tools/eslint/node_modules/es6-set/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/LICENCE
rename to tools/eslint/node_modules/es6-set/LICENSE
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/README.md b/tools/eslint/node_modules/es6-set/README.md
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/README.md
rename to tools/eslint/node_modules/es6-set/README.md
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/copy.js b/tools/eslint/node_modules/es6-set/ext/copy.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/copy.js
rename to tools/eslint/node_modules/es6-set/ext/copy.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/every.js b/tools/eslint/node_modules/es6-set/ext/every.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/every.js
rename to tools/eslint/node_modules/es6-set/ext/every.js
diff --git a/tools/eslint/node_modules/es6-set/ext/filter.js b/tools/eslint/node_modules/es6-set/ext/filter.js
new file mode 100644
index 00000000000000..1178fc591c10ec
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/ext/filter.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var callable = require('es5-ext/object/valid-callable')
+  , forOf    = require('es6-iterator/for-of')
+  , isSet    = require('../is-set')
+  , Set      = require('../')
+
+  , call = Function.prototype.call;
+
+module.exports = function (cb/*, thisArg*/) {
+	var thisArg = arguments[1], result;
+	callable(cb);
+	result = isSet(this) ? new this.constructor() : new Set();
+	forOf(this, function (value) {
+		if (call.call(cb, thisArg, value)) result.add(value);
+	});
+	return result;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/get-first.js b/tools/eslint/node_modules/es6-set/ext/get-first.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/get-first.js
rename to tools/eslint/node_modules/es6-set/ext/get-first.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/get-last.js b/tools/eslint/node_modules/es6-set/ext/get-last.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/get-last.js
rename to tools/eslint/node_modules/es6-set/ext/get-last.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/some.js b/tools/eslint/node_modules/es6-set/ext/some.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/ext/some.js
rename to tools/eslint/node_modules/es6-set/ext/some.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/implement.js b/tools/eslint/node_modules/es6-set/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/implement.js
rename to tools/eslint/node_modules/es6-set/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/index.js b/tools/eslint/node_modules/es6-set/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/index.js
rename to tools/eslint/node_modules/es6-set/index.js
diff --git a/tools/eslint/node_modules/es6-set/is-implemented.js b/tools/eslint/node_modules/es6-set/is-implemented.js
new file mode 100644
index 00000000000000..7f1bfbb7cc7f4e
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/is-implemented.js
@@ -0,0 +1,24 @@
+'use strict';
+
+module.exports = function () {
+	var set, iterator, result;
+	if (typeof Set !== 'function') return false;
+	set = new Set(['raz', 'dwa', 'trzy']);
+	if (String(set) !== '[object Set]') return false;
+	if (set.size !== 3) return false;
+	if (typeof set.add !== 'function') return false;
+	if (typeof set.clear !== 'function') return false;
+	if (typeof set.delete !== 'function') return false;
+	if (typeof set.entries !== 'function') return false;
+	if (typeof set.forEach !== 'function') return false;
+	if (typeof set.has !== 'function') return false;
+	if (typeof set.keys !== 'function') return false;
+	if (typeof set.values !== 'function') return false;
+
+	iterator = set.values();
+	result = iterator.next();
+	if (result.done !== false) return false;
+	if (result.value !== 'raz') return false;
+
+	return true;
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-native-implemented.js b/tools/eslint/node_modules/es6-set/is-native-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-native-implemented.js
rename to tools/eslint/node_modules/es6-set/is-native-implemented.js
diff --git a/tools/eslint/node_modules/es6-set/is-set.js b/tools/eslint/node_modules/es6-set/is-set.js
new file mode 100644
index 00000000000000..6b491ddee3b5ae
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/is-set.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var toString          = Object.prototype.toString
+  , toStringTagSymbol = require('es6-symbol').toStringTag
+
+  , id = '[object Set]'
+  , Global = (typeof Set === 'undefined') ? null : Set;
+
+module.exports = function (x) {
+	return (x && ((Global && ((x instanceof Global) || (x === Global.prototype))) ||
+			(toString.call(x) === id) || (x[toStringTagSymbol] === 'Set'))) || false;
+};
diff --git a/tools/eslint/node_modules/es6-set/lib/iterator.js b/tools/eslint/node_modules/es6-set/lib/iterator.js
new file mode 100644
index 00000000000000..6069a8a130a4ca
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/lib/iterator.js
@@ -0,0 +1,30 @@
+'use strict';
+
+var setPrototypeOf    = require('es5-ext/object/set-prototype-of')
+  , contains          = require('es5-ext/string/#/contains')
+  , d                 = require('d')
+  , Iterator          = require('es6-iterator')
+  , toStringTagSymbol = require('es6-symbol').toStringTag
+
+  , defineProperty = Object.defineProperty
+  , SetIterator;
+
+SetIterator = module.exports = function (set, kind) {
+	if (!(this instanceof SetIterator)) return new SetIterator(set, kind);
+	Iterator.call(this, set.__setData__, set);
+	if (!kind) kind = 'value';
+	else if (contains.call(kind, 'key+value')) kind = 'key+value';
+	else kind = 'value';
+	defineProperty(this, '__kind__', d('', kind));
+};
+if (setPrototypeOf) setPrototypeOf(SetIterator, Iterator);
+
+SetIterator.prototype = Object.create(Iterator.prototype, {
+	constructor: d(SetIterator),
+	_resolve: d(function (i) {
+		if (this.__kind__ === 'value') return this.__list__[i];
+		return [this.__list__[i], this.__list__[i]];
+	}),
+	toString: d(function () { return '[object Set Iterator]'; })
+});
+defineProperty(SetIterator.prototype, toStringTagSymbol, d('c', 'Set Iterator'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/primitive-iterator.js b/tools/eslint/node_modules/es6-set/lib/primitive-iterator.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/primitive-iterator.js
rename to tools/eslint/node_modules/es6-set/lib/primitive-iterator.js
diff --git a/tools/eslint/node_modules/es6-set/package.json b/tools/eslint/node_modules/es6-set/package.json
new file mode 100644
index 00000000000000..a2c5907558bf57
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/package.json
@@ -0,0 +1,92 @@
+{
+  "_args": [
+    [
+      "es6-set@~0.1.3",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map"
+    ]
+  ],
+  "_from": "es6-set@>=0.1.3 <0.2.0",
+  "_id": "es6-set@0.1.3",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es6-set",
+  "_nodeVersion": "4.2.2",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.14.7",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es6-set",
+    "raw": "es6-set@~0.1.3",
+    "rawSpec": "~0.1.3",
+    "scope": null,
+    "spec": ">=0.1.3 <0.2.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/es6-map"
+  ],
+  "_resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz",
+  "_shasum": "7633145c703bce37f10fa941e70c96991001ec50",
+  "_shrinkwrap": null,
+  "_spec": "es6-set@~0.1.3",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es6-set/issues"
+  },
+  "dependencies": {
+    "d": "~0.1.1",
+    "es5-ext": "~0.10.8",
+    "es6-iterator": "2",
+    "es6-symbol": "3",
+    "event-emitter": "~0.3.4"
+  },
+  "description": "ECMAScript6 Set polyfill",
+  "devDependencies": {
+    "tad": "~0.2.4",
+    "xlint": "~0.2.2",
+    "xlint-jslint-medikoo": "~0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "7633145c703bce37f10fa941e70c96991001ec50",
+    "tarball": "http://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz"
+  },
+  "gitHead": "b3c04d4b5124a13ef272f241f93c715ac5454e33",
+  "homepage": "https://github.com/medikoo/es6-set#readme",
+  "keywords": [
+    "collection",
+    "es6",
+    "harmony",
+    "hash",
+    "list",
+    "set"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es6-set",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es6-set.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "0.1.3"
+}
diff --git a/tools/eslint/node_modules/es6-set/polyfill.js b/tools/eslint/node_modules/es6-set/polyfill.js
new file mode 100644
index 00000000000000..3ee6becca1a492
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/polyfill.js
@@ -0,0 +1,78 @@
+'use strict';
+
+var clear          = require('es5-ext/array/#/clear')
+  , eIndexOf       = require('es5-ext/array/#/e-index-of')
+  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
+  , callable       = require('es5-ext/object/valid-callable')
+  , d              = require('d')
+  , ee             = require('event-emitter')
+  , Symbol         = require('es6-symbol')
+  , iterator       = require('es6-iterator/valid-iterable')
+  , forOf          = require('es6-iterator/for-of')
+  , Iterator       = require('./lib/iterator')
+  , isNative       = require('./is-native-implemented')
+
+  , call = Function.prototype.call
+  , defineProperty = Object.defineProperty, getPrototypeOf = Object.getPrototypeOf
+  , SetPoly, getValues;
+
+module.exports = SetPoly = function (/*iterable*/) {
+	var iterable = arguments[0], self;
+	if (!(this instanceof SetPoly)) throw new TypeError('Constructor requires \'new\'');
+	if (isNative && setPrototypeOf) self = setPrototypeOf(new Set(), getPrototypeOf(this));
+	else self = this;
+	if (iterable != null) iterator(iterable);
+	defineProperty(self, '__setData__', d('c', []));
+	if (!iterable) return self;
+	forOf(iterable, function (value) {
+		if (eIndexOf.call(this, value) !== -1) return;
+		this.push(value);
+	}, self.__setData__);
+	return self;
+};
+
+if (isNative) {
+	if (setPrototypeOf) setPrototypeOf(SetPoly, Set);
+	SetPoly.prototype = Object.create(Set.prototype, { constructor: d(SetPoly) });
+}
+
+ee(Object.defineProperties(SetPoly.prototype, {
+	add: d(function (value) {
+		if (this.has(value)) return this;
+		this.emit('_add', this.__setData__.push(value) - 1, value);
+		return this;
+	}),
+	clear: d(function () {
+		if (!this.__setData__.length) return;
+		clear.call(this.__setData__);
+		this.emit('_clear');
+	}),
+	delete: d(function (value) {
+		var index = eIndexOf.call(this.__setData__, value);
+		if (index === -1) return false;
+		this.__setData__.splice(index, 1);
+		this.emit('_delete', index, value);
+		return true;
+	}),
+	entries: d(function () { return new Iterator(this, 'key+value'); }),
+	forEach: d(function (cb/*, thisArg*/) {
+		var thisArg = arguments[1], iterator, result, value;
+		callable(cb);
+		iterator = this.values();
+		result = iterator._next();
+		while (result !== undefined) {
+			value = iterator._resolve(result);
+			call.call(cb, thisArg, value, value, this);
+			result = iterator._next();
+		}
+	}),
+	has: d(function (value) {
+		return (eIndexOf.call(this.__setData__, value) !== -1);
+	}),
+	keys: d(getValues = function () { return this.values(); }),
+	size: d.gs(function () { return this.__setData__.length; }),
+	values: d(function () { return new Iterator(this); }),
+	toString: d(function () { return '[object Set]'; })
+}));
+defineProperty(SetPoly.prototype, Symbol.iterator, d(getValues));
+defineProperty(SetPoly.prototype, Symbol.toStringTag, d('c', 'Set'));
diff --git a/tools/eslint/node_modules/es6-set/primitive/index.js b/tools/eslint/node_modules/es6-set/primitive/index.js
new file mode 100644
index 00000000000000..6bcad18d3f19a2
--- /dev/null
+++ b/tools/eslint/node_modules/es6-set/primitive/index.js
@@ -0,0 +1,87 @@
+'use strict';
+
+var callable       = require('es5-ext/object/valid-callable')
+  , clear          = require('es5-ext/object/clear')
+  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
+  , d              = require('d')
+  , iterator       = require('es6-iterator/valid-iterable')
+  , forOf          = require('es6-iterator/for-of')
+  , Set            = require('../polyfill')
+  , Iterator       = require('../lib/primitive-iterator')
+  , isNative       = require('../is-native-implemented')
+
+  , create = Object.create, defineProperties = Object.defineProperties
+  , defineProperty = Object.defineProperty, getPrototypeOf = Object.getPrototypeOf
+  , hasOwnProperty = Object.prototype.hasOwnProperty
+  , PrimitiveSet;
+
+module.exports = PrimitiveSet = function (/*iterable, serialize*/) {
+	var iterable = arguments[0], serialize = arguments[1], self;
+	if (!(this instanceof PrimitiveSet)) throw new TypeError('Constructor requires \'new\'');
+	if (isNative && setPrototypeOf) self = setPrototypeOf(new Set(), getPrototypeOf(this));
+	else self = this;
+	if (iterable != null) iterator(iterable);
+	if (serialize !== undefined) {
+		callable(serialize);
+		defineProperty(self, '_serialize', d('', serialize));
+	}
+	defineProperties(self, {
+		__setData__: d('c', create(null)),
+		__size__: d('w', 0)
+	});
+	if (!iterable) return self;
+	forOf(iterable, function (value) {
+		var key = self._serialize(value);
+		if (key == null) throw new TypeError(value + " cannot be serialized");
+		if (hasOwnProperty.call(self.__setData__, key)) return;
+		self.__setData__[key] = value;
+		++self.__size__;
+	});
+	return self;
+};
+if (setPrototypeOf) setPrototypeOf(PrimitiveSet, Set);
+
+PrimitiveSet.prototype = create(Set.prototype, {
+	constructor: d(PrimitiveSet),
+	_serialize: d(function (value) {
+		if (value && (typeof value.toString !== 'function')) return null;
+		return String(value);
+	}),
+	add: d(function (value) {
+		var key = this._serialize(value);
+		if (key == null) throw new TypeError(value + " cannot be serialized");
+		if (hasOwnProperty.call(this.__setData__, key)) return this;
+		this.__setData__[key] = value;
+		++this.__size__;
+		this.emit('_add', key);
+		return this;
+	}),
+	clear: d(function () {
+		if (!this.__size__) return;
+		clear(this.__setData__);
+		this.__size__ = 0;
+		this.emit('_clear');
+	}),
+	delete: d(function (value) {
+		var key = this._serialize(value);
+		if (key == null) return false;
+		if (!hasOwnProperty.call(this.__setData__, key)) return false;
+		delete this.__setData__[key];
+		--this.__size__;
+		this.emit('_delete', key);
+		return true;
+	}),
+	entries: d(function () { return new Iterator(this, 'key+value'); }),
+	get: d(function (key) {
+		key = this._serialize(key);
+		if (key == null) return;
+		return this.__setData__[key];
+	}),
+	has: d(function (value) {
+		var key = this._serialize(value);
+		if (key == null) return false;
+		return hasOwnProperty.call(this.__setData__, key);
+	}),
+	size: d.gs(function () { return this.__size__; }),
+	values: d(function () { return new Iterator(this); })
+});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/valid-set.js b/tools/eslint/node_modules/es6-set/valid-set.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/valid-set.js
rename to tools/eslint/node_modules/es6-set/valid-set.js
diff --git a/tools/eslint/node_modules/es6-symbol/.lint b/tools/eslint/node_modules/es6-symbol/.lint
new file mode 100644
index 00000000000000..df1e53cd5f547e
--- /dev/null
+++ b/tools/eslint/node_modules/es6-symbol/.lint
@@ -0,0 +1,15 @@
+@root
+
+module
+
+tabs
+indent 2
+maxlen 100
+
+ass
+nomen
+plusplus
+newcap
+vars
+
+predef+ Symbol
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/LICENSE b/tools/eslint/node_modules/es6-symbol/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/LICENSE
rename to tools/eslint/node_modules/es6-symbol/LICENSE
diff --git a/tools/eslint/node_modules/es6-symbol/README.md b/tools/eslint/node_modules/es6-symbol/README.md
new file mode 100644
index 00000000000000..0fa8978450cb4f
--- /dev/null
+++ b/tools/eslint/node_modules/es6-symbol/README.md
@@ -0,0 +1,71 @@
+# es6-symbol
+## ECMAScript 6 Symbol polyfill
+
+For more information about symbols see following links
+- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
+- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
+- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
+
+### Limitations
+
+Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
+
+### Usage
+
+It’s safest to use *es6-symbol* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:
+
+```javascript
+var Symbol = require('es6-symbol');
+```
+
+If you want to make sure your environment implements `Symbol` globally, do:
+
+```javascript
+require('es6-symbol/implement');
+```
+
+If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
+
+```javascript
+var Symbol = require('es6-symbol/polyfill');
+```
+
+#### API
+
+Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
+
+```javascript
+var Symbol = require('es6-symbol');
+
+var symbol = Symbol('My custom symbol');
+var x = {};
+
+x[symbol] = 'foo';
+console.log(x[symbol]); 'foo'
+
+// Detect iterable:
+var iterator, result;
+if (possiblyIterable[Symbol.iterator]) {
+  iterator = possiblyIterable[Symbol.iterator]();
+  result = iterator.next();
+  while(!result.done) {
+    console.log(result.value);
+    result = iterator.next();
+  }
+}
+```
+
+### Installation
+#### NPM
+
+In your project path:
+
+	$ npm install es6-symbol
+
+##### Browser
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/implement.js b/tools/eslint/node_modules/es6-symbol/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/implement.js
rename to tools/eslint/node_modules/es6-symbol/implement.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/index.js b/tools/eslint/node_modules/es6-symbol/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/index.js
rename to tools/eslint/node_modules/es6-symbol/index.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-implemented.js b/tools/eslint/node_modules/es6-symbol/is-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-implemented.js
rename to tools/eslint/node_modules/es6-symbol/is-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-native-implemented.js b/tools/eslint/node_modules/es6-symbol/is-native-implemented.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-native-implemented.js
rename to tools/eslint/node_modules/es6-symbol/is-native-implemented.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-symbol.js b/tools/eslint/node_modules/es6-symbol/is-symbol.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/is-symbol.js
rename to tools/eslint/node_modules/es6-symbol/is-symbol.js
diff --git a/tools/eslint/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/es6-symbol/package.json
new file mode 100644
index 00000000000000..10ddd78202aa25
--- /dev/null
+++ b/tools/eslint/node_modules/es6-symbol/package.json
@@ -0,0 +1,95 @@
+{
+  "_args": [
+    [
+      "es6-symbol@~3.0.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map"
+    ]
+  ],
+  "_from": "es6-symbol@>=3.0.1 <3.1.0",
+  "_id": "es6-symbol@3.0.2",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es6-symbol",
+  "_nodeVersion": "5.2.0",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "3.3.12",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es6-symbol",
+    "raw": "es6-symbol@~3.0.1",
+    "rawSpec": "~3.0.1",
+    "scope": null,
+    "spec": ">=3.0.1 <3.1.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/es5-ext",
+    "/eslint/es6-iterator",
+    "/eslint/es6-map",
+    "/eslint/es6-set",
+    "/eslint/es6-weak-map"
+  ],
+  "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz",
+  "_shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
+  "_shrinkwrap": null,
+  "_spec": "es6-symbol@~3.0.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es6-symbol/issues"
+  },
+  "dependencies": {
+    "d": "~0.1.1",
+    "es5-ext": "~0.10.10"
+  },
+  "description": "ECMAScript 6 Symbol polyfill",
+  "devDependencies": {
+    "tad": "~0.2.4",
+    "xlint": "~0.2.2",
+    "xlint-jslint-medikoo": "~0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
+    "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz"
+  },
+  "gitHead": "b7da6b926c44e3745de69b17c98c00a5c84b4ebe",
+  "homepage": "https://github.com/medikoo/es6-symbol#readme",
+  "keywords": [
+    "ecmascript",
+    "es6",
+    "harmony",
+    "polyfill",
+    "ponyfill",
+    "private",
+    "property",
+    "symbol"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es6-symbol",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es6-symbol.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "3.0.2"
+}
diff --git a/tools/eslint/node_modules/es6-symbol/polyfill.js b/tools/eslint/node_modules/es6-symbol/polyfill.js
new file mode 100644
index 00000000000000..7c3c8fe90025ca
--- /dev/null
+++ b/tools/eslint/node_modules/es6-symbol/polyfill.js
@@ -0,0 +1,107 @@
+// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
+
+'use strict';
+
+var d              = require('d')
+  , validateSymbol = require('./validate-symbol')
+
+  , create = Object.create, defineProperties = Object.defineProperties
+  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
+  , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null);
+
+if (typeof Symbol === 'function') NativeSymbol = Symbol;
+
+var generateName = (function () {
+	var created = create(null);
+	return function (desc) {
+		var postfix = 0, name, ie11BugWorkaround;
+		while (created[desc + (postfix || '')]) ++postfix;
+		desc += (postfix || '');
+		created[desc] = true;
+		name = '@@' + desc;
+		defineProperty(objPrototype, name, d.gs(null, function (value) {
+			// For IE11 issue see:
+			// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
+			//    ie11-broken-getters-on-dom-objects
+			// https://github.com/medikoo/es6-symbol/issues/12
+			if (ie11BugWorkaround) return;
+			ie11BugWorkaround = true;
+			defineProperty(this, name, d(value));
+			ie11BugWorkaround = false;
+		}));
+		return name;
+	};
+}());
+
+// Internal constructor (not one exposed) for creating Symbol instances.
+// This one is used to ensure that `someSymbol instanceof Symbol` always return false
+HiddenSymbol = function Symbol(description) {
+	if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
+	return SymbolPolyfill(description);
+};
+
+// Exposed `Symbol` constructor
+// (returns instances of HiddenSymbol)
+module.exports = SymbolPolyfill = function Symbol(description) {
+	var symbol;
+	if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
+	symbol = create(HiddenSymbol.prototype);
+	description = (description === undefined ? '' : String(description));
+	return defineProperties(symbol, {
+		__description__: d('', description),
+		__name__: d('', generateName(description))
+	});
+};
+defineProperties(SymbolPolyfill, {
+	for: d(function (key) {
+		if (globalSymbols[key]) return globalSymbols[key];
+		return (globalSymbols[key] = SymbolPolyfill(String(key)));
+	}),
+	keyFor: d(function (s) {
+		var key;
+		validateSymbol(s);
+		for (key in globalSymbols) if (globalSymbols[key] === s) return key;
+	}),
+
+	// If there's native implementation of given symbol, let's fallback to it
+	// to ensure proper interoperability with other native functions e.g. Array.from
+	hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
+	isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
+		SymbolPolyfill('isConcatSpreadable')),
+	iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
+	match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
+	replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
+	search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
+	species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
+	split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
+	toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
+	toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
+	unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
+});
+
+// Internal tweaks for real symbol producer
+defineProperties(HiddenSymbol.prototype, {
+	constructor: d(SymbolPolyfill),
+	toString: d('', function () { return this.__name__; })
+});
+
+// Proper implementation of methods exposed on Symbol.prototype
+// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
+defineProperties(SymbolPolyfill.prototype, {
+	toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
+	valueOf: d(function () { return validateSymbol(this); })
+});
+defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('',
+	function () { return validateSymbol(this); }));
+defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
+
+// Proper implementaton of toPrimitive and toStringTag for returned symbol instances
+defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
+	d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
+
+// Note: It's important to define `toPrimitive` as last one, as some implementations
+// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
+// And that may invoke error in definition flow:
+// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
+defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
+	d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/validate-symbol.js b/tools/eslint/node_modules/es6-symbol/validate-symbol.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/validate-symbol.js
rename to tools/eslint/node_modules/es6-symbol/validate-symbol.js
diff --git a/tools/eslint/node_modules/es6-weak-map/.lint b/tools/eslint/node_modules/es6-weak-map/.lint
new file mode 100644
index 00000000000000..3c9ef8da016736
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/.lint
@@ -0,0 +1,13 @@
+@root
+
+module
+
+tabs
+indent 2
+maxlen 100
+
+ass
+nomen
+plusplus
+
+predef+ WeakMap
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/LICENCE b/tools/eslint/node_modules/es6-weak-map/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/LICENCE
rename to tools/eslint/node_modules/es6-weak-map/LICENSE
diff --git a/tools/eslint/node_modules/es6-weak-map/README.md b/tools/eslint/node_modules/es6-weak-map/README.md
new file mode 100644
index 00000000000000..ccbade23a2dae2
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/README.md
@@ -0,0 +1,63 @@
+# es6-weak-map
+## WeakMap collection as specified in ECMAScript6
+
+_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.
+
+Differences are:
+- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
+- Well modularized CJS style
+- Based on one solution.
+
+### Limitations
+
+- Will fail on non extensible objects provided as keys
+
+### Installation
+
+	$ npm install es6-weak-map
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+### Usage
+
+If you want to make sure your environment implements `WeakMap`, do:
+
+```javascript
+require('es6-weak-map/implement');
+```
+
+If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do:
+
+```javascript
+var WeakMap = require('es6-weak-map');
+```
+
+If you strictly want to use polyfill even if native `WeakMap` exists, do:
+
+```javascript
+var WeakMap = require('es6-weak-map/polyfill');
+```
+
+#### API
+
+Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:
+
+```javascript
+var WeakMap = require('es6-weak-map');
+
+var map = new WeakMap();
+var obj = {};
+
+map.set(obj, 'foo'); // map
+map.get(obj);        // 'foo'
+map.has(obj);        // true
+map.delete(obj);     // true
+map.get(obj);        // undefined
+map.has(obj);        // false
+map.set(obj, 'bar'); // map
+map.has(obj);        // false
+```
+
+## Tests [![Build Status](https://travis-ci.org/medikoo/es6-weak-map.svg)](https://travis-ci.org/medikoo/es6-weak-map)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/implement.js b/tools/eslint/node_modules/es6-weak-map/implement.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-weak-map/implement.js
rename to tools/eslint/node_modules/es6-weak-map/implement.js
diff --git a/tools/eslint/node_modules/es6-weak-map/index.js b/tools/eslint/node_modules/es6-weak-map/index.js
new file mode 100644
index 00000000000000..c2ff71b928dc56
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./is-implemented')() ? WeakMap : require('./polyfill');
diff --git a/tools/eslint/node_modules/es6-weak-map/is-implemented.js b/tools/eslint/node_modules/es6-weak-map/is-implemented.js
new file mode 100644
index 00000000000000..6ef5082ef40762
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/is-implemented.js
@@ -0,0 +1,20 @@
+'use strict';
+
+module.exports = function () {
+	var weakMap, x;
+	if (typeof WeakMap !== 'function') return false;
+	try {
+		// WebKit doesn't support arguments and crashes
+		weakMap = new WeakMap([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]);
+	} catch (e) {
+		return false;
+	}
+	if (String(weakMap) !== '[object WeakMap]') return false;
+	if (typeof weakMap.set !== 'function') return false;
+	if (weakMap.set({}, 1) !== weakMap) return false;
+	if (typeof weakMap.delete !== 'function') return false;
+	if (typeof weakMap.has !== 'function') return false;
+	if (weakMap.get(x) !== 'one') return false;
+
+	return true;
+};
diff --git a/tools/eslint/node_modules/es6-weak-map/is-native-implemented.js b/tools/eslint/node_modules/es6-weak-map/is-native-implemented.js
new file mode 100644
index 00000000000000..ddc4dbd29c17eb
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/is-native-implemented.js
@@ -0,0 +1,8 @@
+// Exports true if environment provides native `WeakMap` implementation, whatever that is.
+
+'use strict';
+
+module.exports = (function () {
+	if (typeof WeakMap !== 'function') return false;
+	return (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]');
+}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-weak-map.js b/tools/eslint/node_modules/es6-weak-map/is-weak-map.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-weak-map.js
rename to tools/eslint/node_modules/es6-weak-map/is-weak-map.js
diff --git a/tools/eslint/node_modules/es6-weak-map/package.json b/tools/eslint/node_modules/es6-weak-map/package.json
new file mode 100644
index 00000000000000..26e662c815b403
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/package.json
@@ -0,0 +1,94 @@
+{
+  "_args": [
+    [
+      "es6-weak-map@^2.0.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope"
+    ]
+  ],
+  "_from": "es6-weak-map@>=2.0.1 <3.0.0",
+  "_id": "es6-weak-map@2.0.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/es6-weak-map",
+  "_nodeVersion": "0.12.7",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.11.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "es6-weak-map",
+    "raw": "es6-weak-map@^2.0.1",
+    "rawSpec": "^2.0.1",
+    "scope": null,
+    "spec": ">=2.0.1 <3.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/escope"
+  ],
+  "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
+  "_shasum": "0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81",
+  "_shrinkwrap": null,
+  "_spec": "es6-weak-map@^2.0.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/es6-weak-map/issues"
+  },
+  "dependencies": {
+    "d": "^0.1.1",
+    "es5-ext": "^0.10.8",
+    "es6-iterator": "2",
+    "es6-symbol": "3"
+  },
+  "description": "ECMAScript6 WeakMap polyfill",
+  "devDependencies": {
+    "tad": "^0.2.3",
+    "xlint": "^0.2.2",
+    "xlint-jslint-medikoo": "^0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81",
+    "tarball": "http://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz"
+  },
+  "gitHead": "b8b62d44e3b9f8134095c8fb6a5697e371b36867",
+  "homepage": "https://github.com/medikoo/es6-weak-map#readme",
+  "keywords": [
+    "collection",
+    "es6",
+    "gc",
+    "harmony",
+    "hash",
+    "list",
+    "map",
+    "ponyfill",
+    "weakmap"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "es6-weak-map",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/es6-weak-map.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "2.0.1"
+}
diff --git a/tools/eslint/node_modules/es6-weak-map/polyfill.js b/tools/eslint/node_modules/es6-weak-map/polyfill.js
new file mode 100644
index 00000000000000..6bef09f5b07622
--- /dev/null
+++ b/tools/eslint/node_modules/es6-weak-map/polyfill.js
@@ -0,0 +1,66 @@
+'use strict';
+
+var setPrototypeOf    = require('es5-ext/object/set-prototype-of')
+  , object            = require('es5-ext/object/valid-object')
+  , value             = require('es5-ext/object/valid-value')
+  , randomUniq        = require('es5-ext/string/random-uniq')
+  , d                 = require('d')
+  , getIterator       = require('es6-iterator/get')
+  , forOf             = require('es6-iterator/for-of')
+  , toStringTagSymbol = require('es6-symbol').toStringTag
+  , isNative          = require('./is-native-implemented')
+
+  , isArray = Array.isArray, defineProperty = Object.defineProperty
+  , hasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf
+  , WeakMapPoly;
+
+module.exports = WeakMapPoly = function (/*iterable*/) {
+	var iterable = arguments[0], self;
+	if (!(this instanceof WeakMapPoly)) throw new TypeError('Constructor requires \'new\'');
+	if (isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)) {
+		self = setPrototypeOf(new WeakMap(), getPrototypeOf(this));
+	} else {
+		self = this;
+	}
+	if (iterable != null) {
+		if (!isArray(iterable)) iterable = getIterator(iterable);
+	}
+	defineProperty(self, '__weakMapData__', d('c', '$weakMap$' + randomUniq()));
+	if (!iterable) return self;
+	forOf(iterable, function (val) {
+		value(val);
+		self.set(val[0], val[1]);
+	});
+	return self;
+};
+
+if (isNative) {
+	if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap);
+	WeakMapPoly.prototype = Object.create(WeakMap.prototype, {
+		constructor: d(WeakMapPoly)
+	});
+}
+
+Object.defineProperties(WeakMapPoly.prototype, {
+	delete: d(function (key) {
+		if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
+			delete key[this.__weakMapData__];
+			return true;
+		}
+		return false;
+	}),
+	get: d(function (key) {
+		if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
+			return key[this.__weakMapData__];
+		}
+	}),
+	has: d(function (key) {
+		return hasOwnProperty.call(object(key), this.__weakMapData__);
+	}),
+	set: d(function (key, value) {
+		defineProperty(object(key), this.__weakMapData__, d('c', value));
+		return this;
+	}),
+	toString: d(function () { return '[object WeakMap]'; })
+});
+defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/valid-weak-map.js b/tools/eslint/node_modules/es6-weak-map/valid-weak-map.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-weak-map/valid-weak-map.js
rename to tools/eslint/node_modules/es6-weak-map/valid-weak-map.js
diff --git a/tools/eslint/node_modules/escape-string-regexp/index.js b/tools/eslint/node_modules/escape-string-regexp/index.js
index ac6572cabec57d..7834bf9b24c481 100644
--- a/tools/eslint/node_modules/escape-string-regexp/index.js
+++ b/tools/eslint/node_modules/escape-string-regexp/index.js
@@ -7,5 +7,5 @@ module.exports = function (str) {
 		throw new TypeError('Expected a string');
 	}
 
-	return str.replace(matchOperatorsRe,  '\\$&');
+	return str.replace(matchOperatorsRe, '\\$&');
 };
diff --git a/tools/eslint/node_modules/escape-string-regexp/package.json b/tools/eslint/node_modules/escape-string-regexp/package.json
index 813c9089d27760..309d133758912e 100644
--- a/tools/eslint/node_modules/escape-string-regexp/package.json
+++ b/tools/eslint/node_modules/escape-string-regexp/package.json
@@ -1,70 +1,99 @@
 {
-  "name": "escape-string-regexp",
-  "version": "1.0.3",
-  "description": "Escape RegExp special characters",
-  "license": "MIT",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
+  "_args": [
+    [
+      "escape-string-regexp@^1.0.2",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "escape-string-regexp@>=1.0.2 <2.0.0",
+  "_id": "escape-string-regexp@1.0.4",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/escape-string-regexp",
+  "_nodeVersion": "4.2.1",
+  "_npmUser": {
+    "email": "sindresorhus@gmail.com",
+    "name": "sindresorhus"
+  },
+  "_npmVersion": "2.14.7",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "escape-string-regexp",
+    "raw": "escape-string-regexp@^1.0.2",
+    "rawSpec": "^1.0.2",
+    "scope": null,
+    "spec": ">=1.0.2 <2.0.0",
+    "type": "range"
   },
+  "_requiredBy": [
+    "/eslint",
+    "/eslint/chalk",
+    "/eslint/decamelize"
+  ],
+  "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz",
+  "_shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+  "_shrinkwrap": null,
+  "_spec": "escape-string-regexp@^1.0.2",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
   "author": {
-    "name": "Sindre Sorhus",
     "email": "sindresorhus@gmail.com",
-    "url": "http://sindresorhus.com"
+    "name": "Sindre Sorhus",
+    "url": "sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
+  },
+  "dependencies": {},
+  "description": "Escape RegExp special characters",
+  "devDependencies": {
+    "ava": "*",
+    "xo": "*"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "b85e679b46f72d03fbbe8a3bf7259d535c21b62f",
+    "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz"
   },
-  "maintainers": [
-    {
-      "name": "sindresorhus",
-      "email": "sindresorhus@gmail.com"
-    },
-    {
-      "name": "jbnicolai",
-      "email": "jappelman@xebia.com"
-    }
-  ],
   "engines": {
     "node": ">=0.8.0"
   },
-  "scripts": {
-    "test": "mocha"
-  },
   "files": [
     "index.js"
   ],
+  "gitHead": "e9ca6832a9506ca26402cb0e6dc95efcf35b0b97",
+  "homepage": "https://github.com/sindresorhus/escape-string-regexp",
   "keywords": [
+    "characters",
+    "escape",
+    "expression",
+    "re",
     "regex",
     "regexp",
-    "re",
     "regular",
-    "expression",
-    "escape",
-    "string",
-    "str",
     "special",
-    "characters"
+    "str",
+    "string"
   ],
-  "devDependencies": {
-    "mocha": "*"
-  },
-  "gitHead": "1e446e6b4449b5f1f8868cd31bf8fd25ee37fb4b",
-  "bugs": {
-    "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
-  },
-  "homepage": "https://github.com/sindresorhus/escape-string-regexp",
-  "_id": "escape-string-regexp@1.0.3",
-  "_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
-  "_from": "escape-string-regexp@>=1.0.2 <2.0.0",
-  "_npmVersion": "2.1.16",
-  "_nodeVersion": "0.10.35",
-  "_npmUser": {
-    "name": "jbnicolai",
-    "email": "jappelman@xebia.com"
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "sindresorhus",
+      "email": "sindresorhus@gmail.com"
+    },
+    {
+      "name": "jbnicolai",
+      "email": "jappelman@xebia.com"
+    }
+  ],
+  "name": "escape-string-regexp",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
   },
-  "dist": {
-    "shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
-    "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz"
+  "scripts": {
+    "test": "xo && ava"
   },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz",
-  "readme": "ERROR: No README data found!"
+  "version": "1.0.4"
 }
diff --git a/tools/eslint/node_modules/escape-string-regexp/readme.md b/tools/eslint/node_modules/escape-string-regexp/readme.md
index 808a963a86235e..87ac82d5ef8bc9 100644
--- a/tools/eslint/node_modules/escape-string-regexp/readme.md
+++ b/tools/eslint/node_modules/escape-string-regexp/readme.md
@@ -5,7 +5,7 @@
 
 ## Install
 
-```sh
+```
 $ npm install --save escape-string-regexp
 ```
 
@@ -13,10 +13,10 @@ $ npm install --save escape-string-regexp
 ## Usage
 
 ```js
-var escapeStringRegexp = require('escape-string-regexp');
+const escapeStringRegexp = require('escape-string-regexp');
 
-var escapedString = escapeStringRegexp('how much $ for a unicorn?');
-//=> how much \$ for a unicorn\?
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
 
 new RegExp(escapedString);
 ```
diff --git a/tools/eslint/node_modules/escope/.jshintrc b/tools/eslint/node_modules/escope/.jshintrc
deleted file mode 100644
index defbf02636c7aa..00000000000000
--- a/tools/eslint/node_modules/escope/.jshintrc
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "curly": true,
-    "eqeqeq": true,
-    "immed": true,
-    "indent": 4,
-    "eqnull": true,
-    "latedef": true,
-    "noarg": true,
-    "noempty": true,
-    "quotmark": "single",
-    "undef": true,
-    "unused": true,
-    "strict": true,
-    "trailing": true,
-    "validthis": true,
-
-    "onevar": true,
-
-    "node": true
-}
diff --git a/tools/eslint/node_modules/escope/CONTRIBUTING.md b/tools/eslint/node_modules/escope/CONTRIBUTING.md
deleted file mode 100644
index f1ddca9cbdcc30..00000000000000
--- a/tools/eslint/node_modules/escope/CONTRIBUTING.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## Project license:  \
-
-- You will only Submit Contributions where You have authored 100% of the content.
-- You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions.
-- Whatever content You Contribute will be provided under the Project License.
diff --git a/tools/eslint/node_modules/escope/README.md b/tools/eslint/node_modules/escope/README.md
index 7650b24700268c..a2bfeb72f85416 100644
--- a/tools/eslint/node_modules/escope/README.md
+++ b/tools/eslint/node_modules/escope/README.md
@@ -6,31 +6,33 @@ scope analyzer extracted from [esmangle project](http://github.com/estools/esman
 
 ### Example
 
-    var escope = require('escope');
-    var esprima = require('esprima');
-    var estraverse = require('estraverse');
-    
-    var ast = esprima.parse(code);
-    var scopeManager = escope.analyze(ast);
-    
-    var currentScope = scopeManager.acquire(ast);   // global scope
-
-    estraverse.traverse(ast, {
-        enter: function(node, parent) {
-            // do stuff
-            
-            if (/Function/.test(node.type)) {
-                currentScope = scopeManager.acquire(node);  // get current function scope
-            }
-        },
-        leave: function(node, parent) {
-            if (/Function/.test(node.type)) {
-                currentScope = currentScope.upper;  // set to parent scope
-            }
-            
-            // do stuff
+```js
+var escope = require('escope');
+var esprima = require('esprima');
+var estraverse = require('estraverse');
+
+var ast = esprima.parse(code);
+var scopeManager = escope.analyze(ast);
+
+var currentScope = scopeManager.acquire(ast);   // global scope
+
+estraverse.traverse(ast, {
+    enter: function(node, parent) {
+        // do stuff
+
+        if (/Function/.test(node.type)) {
+            currentScope = scopeManager.acquire(node);  // get current function scope
+        }
+    },
+    leave: function(node, parent) {
+        if (/Function/.test(node.type)) {
+            currentScope = currentScope.upper;  // set to parent scope
         }
-    });
+
+        // do stuff
+    }
+});
+```
 
 ### Document
 
diff --git a/tools/eslint/node_modules/escope/bower.json b/tools/eslint/node_modules/escope/bower.json
deleted file mode 100644
index 70ad5e5ff3948c..00000000000000
--- a/tools/eslint/node_modules/escope/bower.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "name": "escope",
-  "version": "2.0.2-dev",
-  "main": "escope.js",
-  "dependencies": {
-    "estraverse": ">= 0.0.2"
-  },
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "components"
-  ]
-}
diff --git a/tools/eslint/node_modules/escope/gulpfile.js b/tools/eslint/node_modules/escope/gulpfile.js
deleted file mode 100644
index afc68330dd69eb..00000000000000
--- a/tools/eslint/node_modules/escope/gulpfile.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-  Copyright (C) 2014 Yusuke Suzuki 
-
-  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  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.
-*/
-
-'use strict';
-
-var gulp = require('gulp'),
-    mocha = require('gulp-mocha'),
-    babel = require('gulp-babel'),
-    git = require('gulp-git'),
-    bump = require('gulp-bump'),
-    filter = require('gulp-filter'),
-    tagVersion = require('gulp-tag-version'),
-    sourcemaps = require('gulp-sourcemaps'),
-    coffee = require('gulp-coffee'),
-    plumber = require('gulp-plumber'),
-    source = require('vinyl-source-stream'),
-    browserify = require('browserify'),
-    lazypipe = require('lazypipe'),
-    eslint = require('gulp-eslint'),
-    coffee = require('coffee-script/register');
-
-var TEST = [ 'test/*.coffee' ];
-var SOURCE = [ 'src/**/*.js' ];
-
-var ESLINT_OPTION = {
-    rules: {
-        'quotes': 0,
-        'eqeqeq': 0,
-        'no-use-before-define': 0,
-        'no-shadow': 0,
-        'no-new': 0,
-        'no-underscore-dangle': 0,
-        'no-multi-spaces': false,
-        'no-native-reassign': 0,
-        'no-loop-func': 0,
-        'no-lone-blocks': 0
-    },
-    settings: {
-        "ecmascript": 6,
-        "jsx": false
-    },
-    env: {
-        'node': true
-    }
-};
-
-var build = lazypipe()
-    .pipe(sourcemaps.init)
-    .pipe(babel)
-    .pipe(sourcemaps.write)
-    .pipe(gulp.dest, 'lib');
-
-gulp.task('build-for-watch', function () {
-    return gulp.src(SOURCE).pipe(plumber()).pipe(build());
-});
-
-gulp.task('build', function () {
-    return gulp.src(SOURCE).pipe(build());
-});
-
-gulp.task('browserify', [ 'build' ], function () {
-    return browserify({
-        entries: [ './lib/index.js' ]
-    })
-    .bundle()
-    .pipe(source('bundle.js'))
-    .pipe(gulp.dest('build'))
-});
-
-gulp.task('test', [ 'build' ], function () {
-    return gulp.src(TEST)
-        .pipe(mocha({
-            reporter: 'spec',
-            timeout: 100000 // 100s
-        }));
-});
-
-gulp.task('watch', [ 'build-for-watch' ], function () {
-    gulp.watch(SOURCE, [ 'build-for-watch' ]);
-});
-
-// Currently, not works for ES6.
-gulp.task('lint', function () {
-    return gulp.src(SOURCE)
-        .pipe(eslint(ESLINT_OPTION))
-        .pipe(eslint.formatEach('stylish', process.stderr))
-        .pipe(eslint.failOnError());
-});
-
-/**
- * Bumping version number and tagging the repository with it.
- * Please read http://semver.org/
- *
- * You can use the commands
- *
- *     gulp patch     # makes v0.1.0 -> v0.1.1
- *     gulp feature   # makes v0.1.1 -> v0.2.0
- *     gulp release   # makes v0.2.1 -> v1.0.0
- *
- * To bump the version numbers accordingly after you did a patch,
- * introduced a feature or made a backwards-incompatible release.
- */
-
-function inc(importance) {
-    // get all the files to bump version in
-    return gulp.src(['./package.json'])
-        // bump the version number in those files
-        .pipe(bump({type: importance}))
-        // save it back to filesystem
-        .pipe(gulp.dest('./'))
-        // commit the changed version number
-        .pipe(git.commit('Bumps package version'))
-        // read only one file to get the version number
-        .pipe(filter('package.json'))
-        // **tag it in the repository**
-        .pipe(tagVersion({
-            prefix: ''
-        }));
-}
-
-gulp.task('patch', [ 'build' ], function () { return inc('patch'); })
-gulp.task('minor', [ 'build' ], function () { return inc('minor'); })
-gulp.task('major', [ 'build' ], function () { return inc('major'); })
-
-gulp.task('travis', [ 'test' ]);
-gulp.task('default', [ 'travis' ]);
diff --git a/tools/eslint/node_modules/escope/lib/definition.js b/tools/eslint/node_modules/escope/lib/definition.js
index 5ff4f9751547bc..635399e1d1ccba 100644
--- a/tools/eslint/node_modules/escope/lib/definition.js
+++ b/tools/eslint/node_modules/escope/lib/definition.js
@@ -97,4 +97,4 @@ exports.ParameterDefinition = ParameterDefinition;
 
 /* vim: set sw=4 ts=4 et tw=80 : */
 exports.Definition = Definition;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlZmluaXRpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQXdCTyxRQUFRLDJCQUFNLFlBQVk7Ozs7OztJQUtaLFVBQVUsR0FDaEIsU0FETSxVQUFVLENBQ2YsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUU7d0JBRGxDLFVBQVU7Ozs7O0FBS3ZCLE1BQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDOzs7O0FBSWpCLE1BQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDOzs7O0FBSWpCLE1BQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDOzs7O0FBSWpCLE1BQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDOzs7O0FBSXJCLE1BQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDOzs7O0FBSW5CLE1BQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO0NBQ3BCOztxQkExQmdCLFVBQVU7Ozs7OztJQWdDekIsbUJBQW1CO0FBQ1YsV0FEVCxtQkFBbUIsQ0FDVCxJQUFJLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUU7MEJBRG5DLG1CQUFtQjs7QUFFakIsK0JBRkYsbUJBQW1C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IERlZmluaXRpb24jaW5kZXggLSB0aGUgaW5kZXggaW4gdGhlIGRlY2xhcmF0aW9uIHN0YXRlbWVudC5cbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuaW5kZXggPSBpbmRleDtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBtZW1iZXIge1N0cmluZz99IERlZmluaXRpb24ja2luZCAtIHRoZSBraW5kIG9mIHRoZSBkZWNsYXJhdGlvbiBzdGF0ZW1lbnQuXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLmtpbmQgPSBraW5kO1xuICAgIH1cbn1cblxuLyoqXG4gKiBAY2xhc3MgUGFyYW1ldGVyRGVmaW5pdGlvblxuICovXG5jbGFzcyBQYXJhbWV0ZXJEZWZpbml0aW9uIGV4dGVuZHMgRGVmaW5pdGlvbiB7XG4gICAgY29uc3RydWN0b3IobmFtZSwgbm9kZSwgaW5kZXgsIHJlc3QpIHtcbiAgICAgICAgc3VwZXIoVmFyaWFibGUuUGFyYW1ldGVyLCBuYW1lLCBub2RlLCBudWxsLCBpbmRleCwgbnVsbCk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBXaGV0aGVyIHRoZSBwYXJhbWV0ZXIgZGVmaW5pdGlvbiBpcyBhIHBhcnQgb2YgYSByZXN0IHBhcmFtZXRlci5cbiAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUGFyYW1ldGVyRGVmaW5pdGlvbiNyZXN0XG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnJlc3QgPSByZXN0O1xuICAgIH1cbn1cblxuZXhwb3J0IHtcbiAgICBQYXJhbWV0ZXJEZWZpbml0aW9uLFxuICAgIERlZmluaXRpb25cbn1cblxuLyogdmltOiBzZXQgc3c9NCB0cz00IGV0IHR3PTgwIDogKi9cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlZmlu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gICAgICB0aGlzLmtpbmQgPSBraW5kO1xuICAgIH1cbn1cblxuLyoqXG4gKiBAY2xhc3MgUGFyYW1ldGVyRGVmaW5pdGlvblxuICovXG5jbGFzcyBQYXJhbWV0ZXJEZWZpbml0aW9uIGV4dGVuZHMgRGVmaW5pdGlvbiB7XG4gICAgY29uc3RydWN0b3IobmFtZSwgbm9kZSwgaW5kZXgsIHJlc3QpIHtcbiAgICAgICAgc3VwZXIoVmFyaWFibGUuUGFyYW1ldGVyLCBuYW1lLCBub2RlLCBudWxsLCBpbmRleCwgbnVsbCk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBXaGV0aGVyIHRoZSBwYXJhbWV0ZXIgZGVmaW5pdGlvbiBpcyBhIHBhcnQgb2YgYSByZXN0IHBhcmFtZXRlci5cbiAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUGFyYW1ldGVyRGVmaW5pdGlvbiNyZXN0XG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnJlc3QgPSByZXN0O1xuICAgIH1cbn1cblxuZXhwb3J0IHtcbiAgICBQYXJhbWV0ZXJEZWZpbml0aW9uLFxuICAgIERlZmluaXRpb25cbn1cblxuLyogdmltOiBzZXQgc3c9NCB0cz00IGV0IHR3PTgwIDogKi9cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
diff --git a/tools/eslint/node_modules/escope/lib/index.js b/tools/eslint/node_modules/escope/lib/index.js
index 58964e061b8c19..41359dbf9ad56d 100644
--- a/tools/eslint/node_modules/escope/lib/index.js
+++ b/tools/eslint/node_modules/escope/lib/index.js
@@ -151,4 +151,4 @@ exports.ScopeManager = ScopeManager;
 /** @name module:escope.Scope */
 
 /** @name module:escope.ScopeManager */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O1FB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XNpdCh0cmVlKTtcblxuICAgIGFzc2VydChzY29wZU1hbmFnZXIuX19jdXJyZW50U2NvcGUgPT09IG51bGwsICdjdXJyZW50U2NvcGUgc2hvdWxkIGJlIG51bGwuJyk7XG5cbiAgICByZXR1cm4gc2NvcGVNYW5hZ2VyO1xufVxuXG5leHBvcnQge1xuICAgIC8qKiBAbmFtZSBtb2R1bGU6ZXNjb3BlLnZlcnNpb24gKi9cbiAgICB2ZXJzaW9uLFxuICAgIC8qKiBAbmFtZSBtb2R1bGU6ZXNjb3BlLlJlZmVyZW5jZSAqL1xuICAgIFJlZmVyZW5jZSxcbiAgICAvKiogQG5hbWUgbW9kdWxlOmVzY29wZS5WYXJpYWJsZSAqL1xuICAgIFZhcmlhYmxlLFxuICAgIC8qKiBAbmFtZSBtb2R1bGU6ZXNjb3BlLlNjb3BlICovXG4gICAgU2NvcGUsXG4gICAgLyoqIEBuYW1lIG1vZHVsZTplc2NvcGUuU2NvcGVNYW5hZ2VyICovXG4gICAgU2NvcGVNYW5hZ2VyXG59O1xuXG5cbi8qIHZpbTogc2V0IHN3PTQgdHM9NCBldCB0dz04MCA6ICovXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
diff --git a/tools/eslint/node_modules/escope/lib/pattern-visitor.js b/tools/eslint/node_modules/escope/lib/pattern-visitor.js
new file mode 100644
index 00000000000000..c466bdec31adc5
--- /dev/null
+++ b/tools/eslint/node_modules/escope/lib/pattern-visitor.js
@@ -0,0 +1,169 @@
+"use strict";
+
+var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
+
+var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+
+var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
+
+var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
+
+var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
+
+/*
+  Copyright (C) 2015 Yusuke Suzuki 
+
+  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  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.
+*/
+
+var Syntax = require("estraverse").Syntax;
+
+var esrecurse = _interopRequire(require("esrecurse"));
+
+function getLast(xs) {
+    return xs[xs.length - 1] || null;
+}
+
+var PatternVisitor = (function (_esrecurse$Visitor) {
+    function PatternVisitor(rootPattern, callback) {
+        _classCallCheck(this, PatternVisitor);
+
+        _get(Object.getPrototypeOf(PatternVisitor.prototype), "constructor", this).call(this);
+        this.rootPattern = rootPattern;
+        this.callback = callback;
+        this.assignments = [];
+        this.rightHandNodes = [];
+        this.restElements = [];
+    }
+
+    _inherits(PatternVisitor, _esrecurse$Visitor);
+
+    _createClass(PatternVisitor, {
+        Identifier: {
+            value: function Identifier(pattern) {
+                var lastRestElement = getLast(this.restElements);
+                this.callback(pattern, {
+                    topLevel: pattern === this.rootPattern,
+                    rest: lastRestElement != null && lastRestElement.argument === pattern,
+                    assignments: this.assignments
+                });
+            }
+        },
+        Property: {
+            value: function Property(property) {
+                // Computed property's key is a right hand node.
+                if (property.computed) {
+                    this.rightHandNodes.push(property.key);
+                }
+
+                // If it's shorthand, its key is same as its value.
+                // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
+                // If it's not shorthand, the name of new variable is its value's.
+                this.visit(property.value);
+            }
+        },
+        ArrayPattern: {
+            value: function ArrayPattern(pattern) {
+                var i, iz, element;
+                for (i = 0, iz = pattern.elements.length; i < iz; ++i) {
+                    element = pattern.elements[i];
+                    this.visit(element);
+                }
+            }
+        },
+        AssignmentPattern: {
+            value: function AssignmentPattern(pattern) {
+                this.assignments.push(pattern);
+                this.visit(pattern.left);
+                this.rightHandNodes.push(pattern.right);
+                this.assignments.pop();
+            }
+        },
+        RestElement: {
+            value: function RestElement(pattern) {
+                this.restElements.push(pattern);
+                this.visit(pattern.argument);
+                this.restElements.pop();
+            }
+        },
+        MemberExpression: {
+            value: function MemberExpression(node) {
+                // Computed property's key is a right hand node.
+                if (node.computed) {
+                    this.rightHandNodes.push(node.property);
+                }
+                // the object is only read, write to its property.
+                this.rightHandNodes.push(node.object);
+            }
+        },
+        SpreadElement: {
+
+            //
+            // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
+            // By spec, LeftHandSideExpression is Pattern or MemberExpression.
+            //   (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
+            // But espree 2.0 and esprima 2.0 parse to ArrayExpression, ObjectExpression, etc...
+            //
+
+            value: function SpreadElement(node) {
+                this.visit(node.argument);
+            }
+        },
+        ArrayExpression: {
+            value: function ArrayExpression(node) {
+                node.elements.forEach(this.visit, this);
+            }
+        },
+        AssignmentExpression: {
+            value: function AssignmentExpression(node) {
+                this.assignments.push(node);
+                this.visit(node.left);
+                this.rightHandNodes.push(node.right);
+                this.assignments.pop();
+            }
+        },
+        CallExpression: {
+            value: function CallExpression(node) {
+                var _this = this;
+
+                // arguments are right hand nodes.
+                node.arguments.forEach(function (a) {
+                    _this.rightHandNodes.push(a);
+                });
+                this.visit(node.callee);
+            }
+        }
+    }, {
+        isPattern: {
+            value: function isPattern(node) {
+                var nodeType = node.type;
+                return nodeType === Syntax.Identifier || nodeType === Syntax.ObjectPattern || nodeType === Syntax.ArrayPattern || nodeType === Syntax.SpreadElement || nodeType === Syntax.RestElement || nodeType === Syntax.AssignmentPattern;
+            }
+        }
+    });
+
+    return PatternVisitor;
+})(esrecurse.Visitor);
+
+module.exports = PatternVisitor;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhdHRlcm4tdmlzaXRvci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUF3QlMsTUFBTSxXQUFRLFlBQVksRUFBMUIsTUFBTTs7SUFDUixTQUFTLDJCQUFNLFdBQVc7O0FBRWpDLFNBQVMsT0FBTyxDQUFDLEVBQUUsRU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W9uKG5vZGUpIHtcbiAgICAgICAgdGhpcy5hc3NpZ25tZW50cy5wdXNoKG5vZGUpO1xuICAgICAgICB0aGlzLnZpc2l0KG5vZGUubGVmdCk7XG4gICAgICAgIHRoaXMucmlnaHRIYW5kTm9kZXMucHVzaChub2RlLnJpZ2h0KTtcbiAgICAgICAgdGhpcy5hc3NpZ25tZW50cy5wb3AoKTtcbiAgICB9XG5cbiAgICBDYWxsRXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIC8vIGFyZ3VtZW50cyBhcmUgcmlnaHQgaGFuZCBub2Rlcy5cbiAgICAgICAgbm9kZS5hcmd1bWVudHMuZm9yRWFjaChhID0+IHsgdGhpcy5yaWdodEhhbmROb2Rlcy5wdXNoKGEpOyB9KTtcbiAgICAgICAgdGhpcy52aXNpdChub2RlLmNhbGxlZSk7XG4gICAgfVxufVxuXG4vKiB2aW06IHNldCBzdz00IHRzPTQgZXQgdHc9ODAgOiAqL1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
diff --git a/tools/eslint/node_modules/escope/lib/reference.js b/tools/eslint/node_modules/escope/lib/reference.js
index 68b6898a8b9b70..b6bc72953856cd 100644
--- a/tools/eslint/node_modules/escope/lib/reference.js
+++ b/tools/eslint/node_modules/escope/lib/reference.js
@@ -186,4 +186,4 @@ Reference.WRITE = WRITE;
 Reference.RW = RW;
 
 /* vim: set sw=4 ts=4 et tw=80 : */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlZmVyZW5jZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUF3QkEsSUFBTSxJQUFJLEdBQUcsQ0FBRyxDQUFDO0FBQ2pCLElBQU0sS0FBSyxHQUFHLENBQUcsQ0FBQztBQUNsQixJQUFNLEVBQUUsR0FBRyxJQUFJLEdBQUcsS0FBSyxDQUFDOz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2UgdG8gdGhlIGVuY2xvc2luZyBTY29wZS5cbiAgICAgICAgICogQG1lbWJlciB7U2NvcGV9IFJlZmVyZW5jZSNmcm9tXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLmZyb20gPSBzY29wZTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFdoZXRoZXIgdGhlIHJlZmVyZW5jZSBjb21lcyBmcm9tIGEgZHluYW1pYyBzY29wZSAoc3VjaCBhcyAnZXZhbCcsXG4gICAgICAgICAqICd3aXRoJywgZXRjLiksIGFuZCBtYXkgYmUgdHJhcHBlZCBieSBkeW5hbWljIHNjb3Blcy5cbiAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUmVmZXJlbmNlI3RhaW50ZWRcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMudGFpbnRlZCA9IGZhbHNlO1xuICAgICAgICAvKipcbiAgICAgICAgICogVGhlIHZhcmlhYmxlIHRoaXMgcmVmZXJlbmNlIGlzIHJlc29sdmVkIHdpdGguXG4gICAgICAgICAqIEBtZW1iZXIge1ZhcmlhYmxlfSBSZWZlcmVuY2UjcmVzb2x2ZWRcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMucmVzb2x2ZWQgPSBudWxsO1xuICAgICAgICAvKipcbiAgICAgICAgICogVGhlIHJlYWQtd3JpdGUgbW9kZSBvZiB0aGUgcmVmZXJlbmNlLiAoVmFsdWUgaXMgb25lIG9mIHtAbGlua1xuICAgICAgICAgKiBSZWZlcmVuY2UuUkVBRH0sIHtAbGluayBSZWZlcmVuY2UuUld9LCB7QGxpbmsgUmVmZXJlbmNlLldSSVRFfSkuXG4gICAgICAgICAqIEBtZW1iZXIge251bWJlcn0gUmVmZXJlbmNlI2ZsYWdcbiAgICAgICAgICogQHByaXZhdGVcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuZmxhZyA9IGZsYWc7XG4gICAgICAgIGlmICh0aGlzLmlzV3JpdGUoKSkge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBJZiByZWZlcmVuY2UgaXMgd3JpdGVhYmxlLCB0aGlzIGlzIHRoZSB0cmVlIGJlaW5nIHdyaXR0ZW4gdG8gaXQuXG4gICAgICAgICAgICAgKiBAbWVtYmVyIHtlc3ByaW1hI05vZGV9IFJlZmVyZW5jZSN3cml0ZUV4cHJcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy53cml0ZUV4cHIgPSB3cml0ZUV4cHI7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIFJlZmVyZW5jZSBtaWdodCByZWZlciB0byBhIHBhcnRpYWwgdmFsdWUgb2Ygd3JpdGVFeHByLlxuICAgICAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUmVmZXJlbmNlI3BhcnRpYWxcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5wYXJ0aWFsID0gcGFydGlhbDtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogV2hldGhlciB0aGUgUmVmZXJlbmNlIGlzIHRvIHdyaXRlIG9mIGluaXRpYWxpemF0aW9uLlxuICAgICAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUmVmZXJlbmNlI2luaXRcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5pbml0ID0gaW5pdDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLl9fbWF5YmVJbXBsaWNpdEdsb2JhbCA9IG1heWJlSW1wbGljaXRHbG9iYWw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogV2hldGhlciB0aGUgcmVmZXJlbmNlIGlzIHN0YXRpYy5cbiAgICAgKiBAbWV0aG9kIFJlZmVyZW5jZSNpc1N0YXRpY1xuICAgICAqIEByZXR1cm4ge2Jvb2xlYW59XG4gICAgICovXG4gICAgaXNTdGF0aWMoKSB7XG4gICAgICAgIHJldHVybiAhdGhpcy50YWludGVkICYmIHRoaXMucmVzb2x2ZWQg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ICAgKiBAbWVtYmVyIHtlc3ByaW1hI05vZGV9IFJlZmVyZW5jZSN3cml0ZUV4cHJcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy53cml0ZUV4cHIgPSB3cml0ZUV4cHI7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFdoZXRoZXIgdGhlIFJlZmVyZW5jZSBtaWdodCByZWZlciB0byBhIHBhcnRpYWwgdmFsdWUgb2Ygd3JpdGVFeHByLlxuICAgICAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUmVmZXJlbmNlI3BhcnRpYWxcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5wYXJ0aWFsID0gcGFydGlhbDtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogV2hldGhlciB0aGUgUmVmZXJlbmNlIGlzIHRvIHdyaXRlIG9mIGluaXRpYWxpemF0aW9uLlxuICAgICAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gUmVmZXJlbmNlI2luaXRcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5pbml0ID0gaW5pdDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLl9fbWF5YmVJbXBsaWNpdEdsb2JhbCA9IG1heWJlSW1wbGljaXRHbG9iYWw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogV2hldGhlciB0aGUgcmVmZXJlbmNlIGlzIHN0YXRpYy5cbiAgICAgKiBAbWV0aG9kIFJlZmVyZW5jZSNpc1N0YXRpY1xuICAgICAqIEByZXR1cm4ge2Jvb2xlYW59XG4gICAgICovXG4gICAgaXNTdGF0aWMoKSB7XG4gICAgICAgIHJldHVybiAhdGhpcy50YWludGVkICYmIHRoaXMucmVzb2x2ZWQgJiYgdGhpcy5yZXNvbHZlZC5zY29wZS5pc1N0YXRpYygpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFdoZXRoZXIgdGhlIHJlZmVyZW5jZSBpcyB3c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GVcbiAgICAgKiBAcmV0dXJuIHtib29sZWFufVxuICAgICAqL1xuICAgIGlzUmVhZFdyaXRlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5mbGFnID09PSBSZWZlcmVuY2UuUlc7XG4gICAgfVxufVxuXG4vKipcbiAqIEBjb25zdGFudCBSZWZlcmVuY2UuUkVBRFxuICogQHByaXZhdGVcbiAqL1xuUmVmZXJlbmNlLlJFQUQgPSBSRUFEO1xuLyoqXG4gKiBAY29uc3RhbnQgUmVmZXJlbmNlLldSSVRFXG4gKiBAcHJpdmF0ZVxuICovXG5SZWZlcmVuY2UuV1JJVEUgPSBXUklURTtcbi8qKlxuICogQGNvbnN0YW50IFJlZmVyZW5jZS5SV1xuICogQHByaXZhdGVcbiAqL1xuUmVmZXJlbmNlLlJXID0gUlc7XG5cbi8qIHZpbTogc2V0IHN3PTQgdHM9NCBldCB0dz04MCA6ICovXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
diff --git a/tools/eslint/node_modules/escope/lib/referencer.js b/tools/eslint/node_modules/escope/lib/referencer.js
index 09f59918045ec7..c80827c652011d 100644
--- a/tools/eslint/node_modules/escope/lib/referencer.js
+++ b/tools/eslint/node_modules/escope/lib/referencer.js
@@ -42,6 +42,8 @@ var Reference = _interopRequire(require("./reference"));
 
 var Variable = _interopRequire(require("./variable"));
 
+var PatternVisitor = _interopRequire(require("./pattern-visitor"));
+
 var _definition = require("./definition");
 
 var ParameterDefinition = _definition.ParameterDefinition;
@@ -49,142 +51,6 @@ var Definition = _definition.Definition;
 
 var assert = _interopRequire(require("assert"));
 
-var PatternVisitor = (function (_esrecurse$Visitor) {
-    function PatternVisitor(rootPattern, callback) {
-        _classCallCheck(this, PatternVisitor);
-
-        _get(Object.getPrototypeOf(PatternVisitor.prototype), "constructor", this).call(this);
-        this.rootPattern = rootPattern;
-        this.callback = callback;
-        this.assignments = [];
-        this.rightHandNodes = [];
-        this.restElements = [];
-    }
-
-    _inherits(PatternVisitor, _esrecurse$Visitor);
-
-    _createClass(PatternVisitor, {
-        Identifier: {
-            value: function Identifier(pattern) {
-                var lastRestElement = getLast(this.restElements);
-                this.callback(pattern, {
-                    topLevel: pattern === this.rootPattern,
-                    rest: lastRestElement != null && lastRestElement.argument === pattern,
-                    assignments: this.assignments
-                });
-            }
-        },
-        ObjectPattern: {
-            value: function ObjectPattern(pattern) {
-                var i, iz, property;
-                for (i = 0, iz = pattern.properties.length; i < iz; ++i) {
-                    property = pattern.properties[i];
-
-                    // Computed property's key is a right hand node.
-                    if (property.computed) {
-                        this.rightHandNodes.push(property.key);
-                    }
-
-                    // If it's shorthand, its key is same as its value.
-                    // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
-                    // If it's not shorthand, the name of new variable is its value's.
-                    this.visit(property.value);
-                }
-            }
-        },
-        ArrayPattern: {
-            value: function ArrayPattern(pattern) {
-                var i, iz, element;
-                for (i = 0, iz = pattern.elements.length; i < iz; ++i) {
-                    element = pattern.elements[i];
-                    this.visit(element);
-                }
-            }
-        },
-        AssignmentPattern: {
-            value: function AssignmentPattern(pattern) {
-                this.assignments.push(pattern);
-                this.visit(pattern.left);
-                this.rightHandNodes.push(pattern.right);
-                this.assignments.pop();
-            }
-        },
-        RestElement: {
-            value: function RestElement(pattern) {
-                this.restElements.push(pattern);
-                this.visit(pattern.argument);
-                this.restElements.pop();
-            }
-        },
-        MemberExpression: {
-            value: function MemberExpression(node) {
-                // Computed property's key is a right hand node.
-                if (node.computed) {
-                    this.rightHandNodes.push(node.property);
-                }
-                // the object is only read, write to its property.
-                this.rightHandNodes.push(node.object);
-            }
-        },
-        SpreadElement: {
-
-            //
-            // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
-            // By spec, LeftHandSideExpression is Pattern or MemberExpression.
-            //   (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
-            // But espree 2.0 and esprima 2.0 parse to ArrayExpression, ObjectExpression, etc...
-            //
-
-            value: function SpreadElement(node) {
-                this.visit(node.argument);
-            }
-        },
-        ArrayExpression: {
-            value: function ArrayExpression(node) {
-                node.elements.forEach(this.visit, this);
-            }
-        },
-        ObjectExpression: {
-            value: function ObjectExpression(node) {
-                var _this = this;
-
-                node.properties.forEach(function (property) {
-                    // Computed property's key is a right hand node.
-                    if (property.computed) {
-                        _this.rightHandNodes.push(property.key);
-                    }
-                    _this.visit(property.value);
-                });
-            }
-        },
-        AssignmentExpression: {
-            value: function AssignmentExpression(node) {
-                this.assignments.push(node);
-                this.visit(node.left);
-                this.rightHandNodes.push(node.right);
-                this.assignments.pop();
-            }
-        },
-        CallExpression: {
-            value: function CallExpression(node) {
-                var _this = this;
-
-                // arguments are right hand nodes.
-                node.arguments.forEach(function (a) {
-                    _this.rightHandNodes.push(a);
-                });
-                this.visit(node.callee);
-            }
-        }
-    });
-
-    return PatternVisitor;
-})(esrecurse.Visitor);
-
-function getLast(xs) {
-    return xs[xs.length - 1] || null;
-}
-
 function traverseIdentifierInPattern(rootPattern, referencer, callback) {
     // Call the callback at left hand identifier nodes, and Collect right hand nodes.
     var visitor = new PatternVisitor(rootPattern, callback);
@@ -196,18 +62,13 @@ function traverseIdentifierInPattern(rootPattern, referencer, callback) {
     }
 }
 
-function isPattern(node) {
-    var nodeType = node.type;
-    return nodeType === Syntax.Identifier || nodeType === Syntax.ObjectPattern || nodeType === Syntax.ArrayPattern || nodeType === Syntax.SpreadElement || nodeType === Syntax.RestElement || nodeType === Syntax.AssignmentPattern;
-}
-
 // Importing ImportDeclaration.
 // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation
 // https://github.com/estree/estree/blob/master/es6.md#importdeclaration
 // FIXME: Now, we don't create module environment, because the context is
 // implementation dependent.
 
-var Importer = (function (_esrecurse$Visitor2) {
+var Importer = (function (_esrecurse$Visitor) {
     function Importer(declaration, referencer) {
         _classCallCheck(this, Importer);
 
@@ -216,7 +77,7 @@ var Importer = (function (_esrecurse$Visitor2) {
         this.referencer = referencer;
     }
 
-    _inherits(Importer, _esrecurse$Visitor2);
+    _inherits(Importer, _esrecurse$Visitor);
 
     _createClass(Importer, {
         visitImport: {
@@ -259,7 +120,7 @@ var Importer = (function (_esrecurse$Visitor2) {
 
 // Referencing variables and creating bindings.
 
-var Referencer = (function (_esrecurse$Visitor3) {
+var Referencer = (function (_esrecurse$Visitor2) {
     function Referencer(scopeManager) {
         _classCallCheck(this, Referencer);
 
@@ -269,7 +130,7 @@ var Referencer = (function (_esrecurse$Visitor3) {
         this.isInnerMethodDefinition = false;
     }
 
-    _inherits(Referencer, _esrecurse$Visitor3);
+    _inherits(Referencer, _esrecurse$Visitor2);
 
     _createClass(Referencer, {
         currentScope: {
@@ -414,7 +275,7 @@ var Referencer = (function (_esrecurse$Visitor3) {
                     this.visit(node.key);
                 }
 
-                isMethodDefinition = node.type === Syntax.MethodDefinition || node.method;
+                isMethodDefinition = node.type === Syntax.MethodDefinition;
                 if (isMethodDefinition) {
                     previous = this.pushInnerMethodDefinition(true);
                 }
@@ -485,7 +346,7 @@ var Referencer = (function (_esrecurse$Visitor3) {
             value: function AssignmentExpression(node) {
                 var _this = this;
 
-                if (isPattern(node.left)) {
+                if (PatternVisitor.isPattern(node.left)) {
                     if (node.operator === "=") {
                         this.visitPattern(node.left, { processRightHandNodes: true }, function (pattern, info) {
                             var maybeImplicitGlobal = null;
@@ -547,7 +408,7 @@ var Referencer = (function (_esrecurse$Visitor3) {
         },
         UpdateExpression: {
             value: function UpdateExpression(node) {
-                if (isPattern(node.argument)) {
+                if (PatternVisitor.isPattern(node.argument)) {
                     this.currentScope().__referencing(node.argument, Reference.RW, null);
                 } else {
                     this.visitChildren(node);
@@ -751,4 +612,4 @@ var Referencer = (function (_esrecurse$Visitor3) {
 module.exports = Referencer;
 
 /* vim: set sw=4 ts=4 et tw=80 : */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlZmVyZW5jZXIuanMiXSwibmFtZXMiOltdLCJtYXB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AgICAgICAgICAgICAgc3BlY2lmaWVyLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRlY2xhcmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgICAgICkpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXIobm9kZSkge1xuICAgICAgICBsZXQgbG9jYWwgPSAobm9kZS5sb2NhbCB8fCBub2RlLmlkKTtcbiAgICAgICAgaWYgKGxvY2FsKSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0SW1wb3J0KGxvY2FsLCBub2RlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIEltcG9ydERlZmF1bHRTcGVjaWZpZXIobm9kZSkge1xuICAgICAgICBsZXQgbG9jYWwgPSAobm9kZS5sb2NhbCB8fCBub2RlLmlkKTtcbiAgICAgICAgdGhpcy52aXNpdEltcG9ydChsb2NhbCwgbm9kZSk7XG4gICAgfVxuXG4gICAgSW1wb3J0U3BlY2lmaWVyKG5vZGUpIHtcbiAgICAgICAgbGV0IGxvY2FsID0gKG5vZGUubG9jYWwgfHwgbm9kZS5pZCk7XG4gICAgICAgIGlmIChub2RlLm5hbWUpIHtcbiAgICAgICAgICAgIHRoaXMudmlzaXRJbXBvcnQobm9kZS5uYW1lLCBub2RlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMudmlzaXRJbXBvcnQobG9jYWwsIG5vZGUpO1xuICAgICAgICB9XG4gICAgfVxufVxuXG4vLyBSZWZlcmVuY2luZyB2YXJpYWJsZXMgYW5kIGNyZWF0aW5nIGJpbmRpbmdzLlxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgUmVmZXJlbmNlciBleHRlbmRzIGVzcmVjdXJzZS5WaXNpdG9yIHtcbiAgICBjb25zdHJ1Y3RvcihzY29wZU1hbmFnZXIpIHtcbiAgICAgIC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nJpZ2h0LCBudWxsLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgYXNzaWdubWVudHMsIG1heWJlSW1wbGljaXRHbG9iYWwsIGluaXQpIHtcbiAgICAgICAgY29uc3Qgc2NvcGUgPSB0aGlzLmN1cnJlbnRTY29wZSgpO1xuICAgICAgICBhc3NpZ25tZW50cy5mb3JFYWNoKGFzc2lnbm1lbnQgPT4ge1xuICAgICAgICAgICAgc2NvcGUuX19yZWZlcmVuY2luZyhcbiAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgIFJlZmVyZW5jZS5XUklURSxcbiAgICAgICAgICAgICAgICBhc3NpZ25tZW50LnJpZ2h0LFxuICAgICAgICAgICAgICAgIG1heWJlSW1wbGljaXRHbG9iYWwsXG4gICAgICAgICAgICAgICAgcGF0dGVybiAhPT0gYXNzaWdubWVudC5sZWZ0LFxuICAgICAgICAgICAgICAgIGluaXQpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB2aXNpdFBhdHRlcm4obm9kZSwgb3B0aW9ucywgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBjYWxsYmFjayA9IG9wdGlvbnM7XG4gICAgICAgICAgICBvcHRpb25zID0ge3Byb2Nlc3NSaWdodEhhbmROb2RlczogZmFsc2V9XG4gICAgICAgIH1cbiAgICAgICAgdHJhdmVyc2VJZGVudGlmaWVySW5QYXR0ZXJuKFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG9wdGlvbnMucHJvY2Vzc1JpZ2h0SGFuZE5vZGVzID8gdGhpcyA6IG51bGwsXG4gICAgICAgICAgICBjYWxsYmFjayk7XG4gICAgfVxuXG4gICAgdmlzaXRGdW5jdGlvbihub2RlKSB7XG4gICAgICAgIHZhciBpLCBpejtcbiAgICAgICAgLy8gRnVuY3Rpb25EZWNsYXJhdGlvbiBuYW1lIGlzIGRlZmluZWQgaW4gdXBwZXIgc2NvcGVcbiAgICAgICAgLy8gTk9URTogTm90IHJlZmVycmluZyB2YXJpYWJsZVNjb3BlLiBJdCBpcyBpbnRlbmRlZC5cbiAgICAgICAgLy8gU2luY2VcbiAgICAgICAgLy8gIGluIEVTNSwgRnVuY3Rpb25EZWNsYXJhdGlvbiBzaG91bGQgYmUgaW4gRnVuY3Rpb25Cb2R5LlxuICAgICAgICAvLyAgaW4gRVM2LCBGdW5jdGlvbkRlY2xhcmF0aW9uIHNob3VsZCBiZSBibG9jayBzY29wZWQuXG4gICAgICAgIGlmIChub2RlLnR5cGUgPT09IFN5bnRheC5GdW5jdGlvbkRlY2xhcmF0aW9uKSB7XG4gICAgICAgICAgICAvLyBpZCBpcyBkZWZpbmVkIGluIHVwcGVyIHNjb3BlXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKG5vZGUuaWQsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuRnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBGdW5jdGlvbkV4cHJlc3Npb24gd2l0aCBuYW1lIGNyZWF0ZXMgaXRzIHNwZWNpYWwgc2NvcGU7XG4gICAgICAgIC8vIEZ1bmN0aW9uRXhwcmVzc2lvbk5hbWVTY29wZS5cbiAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gU3ludGF4LkZ1bmN0aW9uRXhwcmVzc2lvbiAmJiBub2RlLmlkKSB7XG4gICAgICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RGdW5jdGlvbkV4cHJlc3Npb25OYW1lU2NvcGUobm9kZSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDb25zaWRlciB0aGlzIGZ1bmN0aW9uIGlzIGluIHRoZSBNZXRob2REZWZpbml0aW9uLlxuICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RGdW5jdGlvblNjb3BlKG5vZGUsIHRoaXMuaXNJbm5lck1ldGhvZERlZmluaXRpb24pO1xuXG4gICAgICAgIC8vIFByb2Nlc3MgcGFyYW1ldGVyIGRlY2xhcmF0aW9ucy5cbiAgICAgICAgZm9yIChpID0gMCwgaXogPSBub2RlLnBhcmFtcy5sZW5ndGg7IGkgPCBpejsgKytpKSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLnBhcmFtc1tpXSwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogdHJ1ZX0sIChwYXR0ZXJuLCBpbmZvKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50U2NvcGUoKS5fX2RlZmluZShwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBuZXcgUGFyYW1ldGVyRGVmaW5pdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdHRlcm4sXG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZm8ucmVzdFxuICAgICAgICAgICAgICAgICAgICApKTtcblxuICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbnVsbCwgdHJ1ZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGlmIHRoZXJlJ3MgYSByZXN0IGFyZ3VtZW50LCBhZGQgdGhhdFxuICAgICAgICBpZiAobm9kZS5yZXN0KSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybih7XG4gICAgICAgICAgICAgICAgdHlwZTogJ1Jlc3RFbGVtZW50JyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudDogbm9kZS5yZXN0XG4gICAgICAgICAgICB9LCAocGF0dGVybikgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19kZWZpbmUocGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgbmV3IFBhcmFtZXRlckRlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucGFyYW1zLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRydWVcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFNraXAgQmxvY2tTdGF0ZW1lbnQgdG8gcHJldmVudCBjcmVhdGluZyBCbG9ja1N0YXRlbWVudCBzY29wZS5cbiAgICAgICAgaWYgKG5vZGUuYm9keS50eXBlID09PSBTeW50YXguQmxvY2tTdGF0ZW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudmlzaXRDaGlsZHJlbihub2RlLmJvZHkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5jbG9zZShub2RlKTtcbiAgICB9XG5cbiAgICB2aXNpdENsYXNzKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gU3ludGF4LkNsYXNzRGVjbGFyYXRpb24pIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19kZWZpbmUobm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgbmV3IERlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBWYXJpYWJsZS5DbGFzc05hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FOiBNYXliZSBjb25zaWRlciBURFouXG4gICAgICAgIHRoaXMudmlzaXQobm9kZS5zdXBlckNsYXNzKTtcblxuICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RDbGFzc1Njb3BlKG5vZGUpO1xuXG4gICAgICAgIGlmIChub2RlLmlkKSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKG5vZGUuaWQsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuQ2xhc3NOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuXG4gICAgICAgIHRoaXMuY2xvc2Uobm9kZSk7XG4gICAgfVxuXG4gICAgdmlzaXRQcm9wZXJ0eShub2RlKSB7XG4gICAgICAgIHZhciBwcmV2aW91cywgaXNNZXRob2REZWZpbml0aW9uO1xuICAgICAgICBpZiAobm9kZS5jb21wdXRlZCkge1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmtleSk7XG4gICAgICAgIH1cblxuICAgICAgICBpc01ldGhvZERlZmluaXRpb24gPSBub2RlLnR5cGUgPT09IFN5bnRheC5NZXRob2REZWZpbml0aW9uIHx8IG5vZGUubWV0aG9kO1xuICAgICAgICBpZiAoaXNNZXRob2REZWZpbml0aW9uKSB7XG4gICAgICAgICAgICBwcmV2aW91cyA9IHRoaXMucHVzaElubmVyTWV0aG9kRGVmaW5pdGlvbih0cnVlKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnZpc2l0KG5vZGUudmFsdWUpO1xuICAgICAgICBpZiAoaXNNZXRob2REZWZpbml0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLnBvcElubmVyTWV0aG9kRGVmaW5pdGlvbihwcmV2aW91cyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB2aXNpdEZvckluKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUubGVmdC50eXBlID09PSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbiAmJiBub2RlLmxlZnQua2luZCAhPT0gJ3ZhcicpIHtcbiAgICAgICAgICAgIHRoaXMubWF0ZXJpYWxpemVURFpTY29wZShub2RlLnJpZ2h0LCBub2RlKTtcbiAgICAgICAgICAgIHRoaXMudmlzaXQobm9kZS5yaWdodCk7XG4gICAgICAgICAgICB0aGlzLmNsb3NlKG5vZGUucmlnaHQpO1xuXG4gICAgICAgICAgICB0aGlzLm1hdGVyaWFsaXplSXRlcmF0aW9uU2NvcGUobm9kZSk7XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUuYm9keSk7XG4gICAgICAgICAgICB0aGlzLmNsb3NlKG5vZGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKG5vZGUubGVmdC50eXBlID09PSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbikge1xuICAgICAgICAgICAgICAgIHRoaXMudmlzaXQobm9kZS5sZWZ0KTtcbiAgICAgICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLmxlZnQuZGVjbGFyYXRpb25zWzBdLmlkLCAocGF0dGVybikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fcmVmZXJlbmNpbmcocGF0dGVybiwgUmVmZXJlbmNlLldSSVRFLCBub2RlLnJpZ2h0LCBudWxsLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4obm9kZS5sZWZ0LCB7cHJvY2Vzc1JpZ2h0SGFuZE5vZGVzOiB0cnVlfSwgKHBhdHRlcm4sIGluZm8pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1heWJlSW1wbGljaXRHbG9iYWwgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuY3VycmVudFNjb3BlKCkuaXNTdHJpY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlSW1wbGljaXRHbG9iYWwgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogcGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlOiBub2RlXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbWF5YmVJbXBsaWNpdEdsb2JhbCwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fcmVmZXJlbmNpbmcocGF0dGVybiwgUmVmZXJlbmNlLldSSVRFLCBub2RlLnJpZ2h0LCBtYXliZUltcGxpY2l0R2xvYmFsLCB0cnVlLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUucmlnaHQpO1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdmlzaXRWYXJpYWJsZURlY2xhcmF0aW9uKHZhcmlhYmxlVGFyZ2V0U2NvcGUsIHR5cGUsIG5vZGUsIGluZGV4LCBmcm9tVERaKSB7XG4gICAgICAgIC8vIElmIHRoaXMgd2FzIGNhbGxlZCB0byBpbml0aWFsaXplIGEgVERaIHNjb3BlLCB0aGlzIG5lZWRzIHRvIG1ha2UgZGVmaW5pdGlvbnMsIGJ1dCBkb2Vzbid0IG1ha2UgcmVmZXJlbmNlcy5cbiAgICAgICAgdmFyIGRlY2wsIGluaXQ7XG5cbiAgICAgICAgZGVjbCA9IG5vZGUuZGVjbGFyYXRpb25zW2luZGV4XTtcbiAgICAgICAgaW5pdCA9IGRlY2wuaW5pdDtcbiAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4oZGVjbC5pZCwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogIWZyb21URFp9LCAocGF0dGVybiwgaW5mbykgPT4ge1xuICAgICAgICAgICAgdmFyaWFibGVUYXJnZXRTY29wZS5fX2RlZmluZShwYXR0ZXJuLFxuICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBkZWNsLFxuICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5raW5kXG4gICAgICAgICAgICAgICAgKSk7XG5cbiAgICAgICAgICAgIGlmICghZnJvbVREWikge1xuICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbnVsbCwgdHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaW5pdCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhwYXR0ZXJuLCBSZWZlcmVuY2UuV1JJVEUsIGluaXQsIG51bGwsICFpbmZvLnRvcExldmVsLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgQXNzaWdubWVudEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoaXNQYXR0ZXJuKG5vZGUubGVmdCkpIHtcbiAgICAgICAgICAgIGlmIChub2RlLm9wZXJhdG9yID09PSAnPScpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLmxlZnQsIHtwcm9jZXNzUmlnaHRIYW5kTm9kZXM6IHRydWV9LCAocGF0dGVybiwgaW5mbykgPT4ge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWF5YmVJbXBsaWNpdEdsb2JhbCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5jdXJyZW50U2NvcGUoKS5pc1N0cmljdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVJbXBsaWNpdEdsb2JhbCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IG5vZGVcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZlcmVuY2luZ0RlZmF1bHRWYWx1ZShwYXR0ZXJuLCBpbmZvLmFzc2lnbm1lbnRzLCBtYXliZUltcGxpY2l0R2xvYmFsLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhwYXR0ZXJuLCBSZWZlcmVuY2UuV1JJVEUsIG5vZGUucmlnaHQsIG1heWJlSW1wbGljaXRHbG9iYWwsICFpbmZvLnRvcExldmVsLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhub2RlLmxlZnQsIFJlZmVyZW5jZS5SVywgbm9kZS5yaWdodCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy52aXNpdChub2RlLnJpZ2h0KTtcbiAgICB9XG5cbiAgICBDYXRjaENsYXVzZShub2RlKSB7XG4gICAgICAgIHRoaXMuc2NvcGVNYW5hZ2VyLl9fbmVzdENhdGNoU2NvcGUobm9kZSk7XG5cbiAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4obm9kZS5wYXJhbSwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogdHJ1ZX0sIChwYXR0ZXJuLCBpbmZvKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKHBhdHRlcm4sXG4gICAgICAgICAgICAgICAgbmV3IERlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgIFZhcmlhYmxlLkNhdGNoQ2xhdXNlLFxuICAgICAgICAgICAgICAgICAgICBub2RlLnBhcmFtLFxuICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICB0aGlzLnJlZmVyZW5jaW5nRGVmYXVsdFZhbHVlKHBhdHRl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gICAgY29uc3Qgc2NvcGUgPSB0aGlzLmN1cnJlbnRTY29wZSgpO1xuICAgICAgICBhc3NpZ25tZW50cy5mb3JFYWNoKGFzc2lnbm1lbnQgPT4ge1xuICAgICAgICAgICAgc2NvcGUuX19yZWZlcmVuY2luZyhcbiAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgIFJlZmVyZW5jZS5XUklURSxcbiAgICAgICAgICAgICAgICBhc3NpZ25tZW50LnJpZ2h0LFxuICAgICAgICAgICAgICAgIG1heWJlSW1wbGljaXRHbG9iYWwsXG4gICAgICAgICAgICAgICAgcGF0dGVybiAhPT0gYXNzaWdubWVudC5sZWZ0LFxuICAgICAgICAgICAgICAgIGluaXQpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB2aXNpdFBhdHRlcm4obm9kZSwgb3B0aW9ucywgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBjYWxsYmFjayA9IG9wdGlvbnM7XG4gICAgICAgICAgICBvcHRpb25zID0ge3Byb2Nlc3NSaWdodEhhbmROb2RlczogZmFsc2V9XG4gICAgICAgIH1cbiAgICAgICAgdHJhdmVyc2VJZGVudGlmaWVySW5QYXR0ZXJuKFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG9wdGlvbnMucHJvY2Vzc1JpZ2h0SGFuZE5vZGVzID8gdGhpcyA6IG51bGwsXG4gICAgICAgICAgICBjYWxsYmFjayk7XG4gICAgfVxuXG4gICAgdmlzaXRGdW5jdGlvbihub2RlKSB7XG4gICAgICAgIHZhciBpLCBpejtcbiAgICAgICAgLy8gRnVuY3Rpb25EZWNsYXJhdGlvbiBuYW1lIGlzIGRlZmluZWQgaW4gdXBwZXIgc2NvcGVcbiAgICAgICAgLy8gTk9URTogTm90IHJlZmVycmluZyB2YXJpYWJsZVNjb3BlLiBJdCBpcyBpbnRlbmRlZC5cbiAgICAgICAgLy8gU2luY2VcbiAgICAgICAgLy8gIGluIEVTNSwgRnVuY3Rpb25EZWNsYXJhdGlvbiBzaG91bGQgYmUgaW4gRnVuY3Rpb25Cb2R5LlxuICAgICAgICAvLyAgaW4gRVM2LCBGdW5jdGlvbkRlY2xhcmF0aW9uIHNob3VsZCBiZSBibG9jayBzY29wZWQuXG4gICAgICAgIGlmIChub2RlLnR5cGUgPT09IFN5bnRheC5GdW5jdGlvbkRlY2xhcmF0aW9uKSB7XG4gICAgICAgICAgICAvLyBpZCBpcyBkZWZpbmVkIGluIHVwcGVyIHNjb3BlXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKG5vZGUuaWQsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuRnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBGdW5jdGlvbkV4cHJlc3Npb24gd2l0aCBuYW1lIGNyZWF0ZXMgaXRzIHNwZWNpYWwgc2NvcGU7XG4gICAgICAgIC8vIEZ1bmN0aW9uRXhwcmVzc2lvbk5hbWVTY29wZS5cbiAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gU3ludGF4LkZ1bmN0aW9uRXhwcmVzc2lvbiAmJiBub2RlLmlkKSB7XG4gICAgICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RGdW5jdGlvbkV4cHJlc3Npb25OYW1lU2NvcGUobm9kZSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDb25zaWRlciB0aGlzIGZ1bmN0aW9uIGlzIGluIHRoZSBNZXRob2REZWZpbml0aW9uLlxuICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RGdW5jdGlvblNjb3BlKG5vZGUsIHRoaXMuaXNJbm5lck1ldGhvZERlZmluaXRpb24pO1xuXG4gICAgICAgIC8vIFByb2Nlc3MgcGFyYW1ldGVyIGRlY2xhcmF0aW9ucy5cbiAgICAgICAgZm9yIChpID0gMCwgaXogPSBub2RlLnBhcmFtcy5sZW5ndGg7IGkgPCBpejsgKytpKSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLnBhcmFtc1tpXSwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogdHJ1ZX0sIChwYXR0ZXJuLCBpbmZvKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50U2NvcGUoKS5fX2RlZmluZShwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBuZXcgUGFyYW1ldGVyRGVmaW5pdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdHRlcm4sXG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZm8ucmVzdFxuICAgICAgICAgICAgICAgICAgICApKTtcblxuICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbnVsbCwgdHJ1ZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGlmIHRoZXJlJ3MgYSByZXN0IGFyZ3VtZW50LCBhZGQgdGhhdFxuICAgICAgICBpZiAobm9kZS5yZXN0KSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybih7XG4gICAgICAgICAgICAgICAgdHlwZTogJ1Jlc3RFbGVtZW50JyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudDogbm9kZS5yZXN0XG4gICAgICAgICAgICB9LCAocGF0dGVybikgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19kZWZpbmUocGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgbmV3IFBhcmFtZXRlckRlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucGFyYW1zLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRydWVcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFNraXAgQmxvY2tTdGF0ZW1lbnQgdG8gcHJldmVudCBjcmVhdGluZyBCbG9ja1N0YXRlbWVudCBzY29wZS5cbiAgICAgICAgaWYgKG5vZGUuYm9keS50eXBlID09PSBTeW50YXguQmxvY2tTdGF0ZW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMudmlzaXRDaGlsZHJlbihub2RlLmJvZHkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5jbG9zZShub2RlKTtcbiAgICB9XG5cbiAgICB2aXNpdENsYXNzKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gU3ludGF4LkNsYXNzRGVjbGFyYXRpb24pIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19kZWZpbmUobm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgbmV3IERlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBWYXJpYWJsZS5DbGFzc05hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZJWE1FOiBNYXliZSBjb25zaWRlciBURFouXG4gICAgICAgIHRoaXMudmlzaXQobm9kZS5zdXBlckNsYXNzKTtcblxuICAgICAgICB0aGlzLnNjb3BlTWFuYWdlci5fX25lc3RDbGFzc1Njb3BlKG5vZGUpO1xuXG4gICAgICAgIGlmIChub2RlLmlkKSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKG5vZGUuaWQsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuQ2xhc3NOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVcbiAgICAgICAgICAgICAgICAgICAgKSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuXG4gICAgICAgIHRoaXMuY2xvc2Uobm9kZSk7XG4gICAgfVxuXG4gICAgdmlzaXRQcm9wZXJ0eShub2RlKSB7XG4gICAgICAgIHZhciBwcmV2aW91cywgaXNNZXRob2REZWZpbml0aW9uO1xuICAgICAgICBpZiAobm9kZS5jb21wdXRlZCkge1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmtleSk7XG4gICAgICAgIH1cblxuICAgICAgICBpc01ldGhvZERlZmluaXRpb24gPSBub2RlLnR5cGUgPT09IFN5bnRheC5NZXRob2REZWZpbml0aW9uO1xuICAgICAgICBpZiAoaXNNZXRob2REZWZpbml0aW9uKSB7XG4gICAgICAgICAgICBwcmV2aW91cyA9IHRoaXMucHVzaElubmVyTWV0aG9kRGVmaW5pdGlvbih0cnVlKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnZpc2l0KG5vZGUudmFsdWUpO1xuICAgICAgICBpZiAoaXNNZXRob2REZWZpbml0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLnBvcElubmVyTWV0aG9kRGVmaW5pdGlvbihwcmV2aW91cyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB2aXNpdEZvckluKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUubGVmdC50eXBlID09PSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbiAmJiBub2RlLmxlZnQua2luZCAhPT0gJ3ZhcicpIHtcbiAgICAgICAgICAgIHRoaXMubWF0ZXJpYWxpemVURFpTY29wZShub2RlLnJpZ2h0LCBub2RlKTtcbiAgICAgICAgICAgIHRoaXMudmlzaXQobm9kZS5yaWdodCk7XG4gICAgICAgICAgICB0aGlzLmNsb3NlKG5vZGUucmlnaHQpO1xuXG4gICAgICAgICAgICB0aGlzLm1hdGVyaWFsaXplSXRlcmF0aW9uU2NvcGUobm9kZSk7XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUuYm9keSk7XG4gICAgICAgICAgICB0aGlzLmNsb3NlKG5vZGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKG5vZGUubGVmdC50eXBlID09PSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbikge1xuICAgICAgICAgICAgICAgIHRoaXMudmlzaXQobm9kZS5sZWZ0KTtcbiAgICAgICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLmxlZnQuZGVjbGFyYXRpb25zWzBdLmlkLCAocGF0dGVybikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fcmVmZXJlbmNpbmcocGF0dGVybiwgUmVmZXJlbmNlLldSSVRFLCBub2RlLnJpZ2h0LCBudWxsLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4obm9kZS5sZWZ0LCB7cHJvY2Vzc1JpZ2h0SGFuZE5vZGVzOiB0cnVlfSwgKHBhdHRlcm4sIGluZm8pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1heWJlSW1wbGljaXRHbG9iYWwgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuY3VycmVudFNjb3BlKCkuaXNTdHJpY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlSW1wbGljaXRHbG9iYWwgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogcGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlOiBub2RlXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbWF5YmVJbXBsaWNpdEdsb2JhbCwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fcmVmZXJlbmNpbmcocGF0dGVybiwgUmVmZXJlbmNlLldSSVRFLCBub2RlLnJpZ2h0LCBtYXliZUltcGxpY2l0R2xvYmFsLCB0cnVlLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUucmlnaHQpO1xuICAgICAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdmlzaXRWYXJpYWJsZURlY2xhcmF0aW9uKHZhcmlhYmxlVGFyZ2V0U2NvcGUsIHR5cGUsIG5vZGUsIGluZGV4LCBmcm9tVERaKSB7XG4gICAgICAgIC8vIElmIHRoaXMgd2FzIGNhbGxlZCB0byBpbml0aWFsaXplIGEgVERaIHNjb3BlLCB0aGlzIG5lZWRzIHRvIG1ha2UgZGVmaW5pdGlvbnMsIGJ1dCBkb2Vzbid0IG1ha2UgcmVmZXJlbmNlcy5cbiAgICAgICAgdmFyIGRlY2wsIGluaXQ7XG5cbiAgICAgICAgZGVjbCA9IG5vZGUuZGVjbGFyYXRpb25zW2luZGV4XTtcbiAgICAgICAgaW5pdCA9IGRlY2wuaW5pdDtcbiAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4oZGVjbC5pZCwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogIWZyb21URFp9LCAocGF0dGVybiwgaW5mbykgPT4ge1xuICAgICAgICAgICAgdmFyaWFibGVUYXJnZXRTY29wZS5fX2RlZmluZShwYXR0ZXJuLFxuICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICBkZWNsLFxuICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5raW5kXG4gICAgICAgICAgICAgICAgKSk7XG5cbiAgICAgICAgICAgIGlmICghZnJvbVREWikge1xuICAgICAgICAgICAgICAgIHRoaXMucmVmZXJlbmNpbmdEZWZhdWx0VmFsdWUocGF0dGVybiwgaW5mby5hc3NpZ25tZW50cywgbnVsbCwgdHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaW5pdCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhwYXR0ZXJuLCBSZWZlcmVuY2UuV1JJVEUsIGluaXQsIG51bGwsICFpbmZvLnRvcExldmVsLCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgQXNzaWdubWVudEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoUGF0dGVyblZpc2l0b3IuaXNQYXR0ZXJuKG5vZGUubGVmdCkpIHtcbiAgICAgICAgICAgIGlmIChub2RlLm9wZXJhdG9yID09PSAnPScpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpc2l0UGF0dGVybihub2RlLmxlZnQsIHtwcm9jZXNzUmlnaHRIYW5kTm9kZXM6IHRydWV9LCAocGF0dGVybiwgaW5mbykgPT4ge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWF5YmVJbXBsaWNpdEdsb2JhbCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5jdXJyZW50U2NvcGUoKS5pc1N0cmljdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVJbXBsaWNpdEdsb2JhbCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBwYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IG5vZGVcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZlcmVuY2luZ0RlZmF1bHRWYWx1ZShwYXR0ZXJuLCBpbmZvLmFzc2lnbm1lbnRzLCBtYXliZUltcGxpY2l0R2xvYmFsLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhwYXR0ZXJuLCBSZWZlcmVuY2UuV1JJVEUsIG5vZGUucmlnaHQsIG1heWJlSW1wbGljaXRHbG9iYWwsICFpbmZvLnRvcExldmVsLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNjb3BlKCkuX19yZWZlcmVuY2luZyhub2RlLmxlZnQsIFJlZmVyZW5jZS5SVywgbm9kZS5yaWdodCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnZpc2l0KG5vZGUubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy52aXNpdChub2RlLnJpZ2h0KTtcbiAgICB9XG5cbiAgICBDYXRjaENsYXVzZShub2RlKSB7XG4gICAgICAgIHRoaXMuc2NvcGVNYW5hZ2VyLl9fbmVzdENhdGNoU2NvcGUobm9kZSk7XG5cbiAgICAgICAgdGhpcy52aXNpdFBhdHRlcm4obm9kZS5wYXJhbSwge3Byb2Nlc3NSaWdodEhhbmROb2RlczogdHJ1ZX0sIChwYXR0ZXJuLCBpbmZvKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRTY29wZSgpLl9fZGVmaW5lKHBhdHRlcm4sXG4gICAgICAgICAgICAgICAgbmV3IERlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgIFZhcmlhYmxlLkNhdGNoQ2xhdXNlLFxuICAgICAgICAgICAgICAgICAgICBub2RlLnBhcmFtLFxuICAgICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICB0aGlzLnJlZmVyZW5jaW5nRGVmYXVsdFZhbHVlKHBhdHRlcm4sIGluZm8uYXNzaWdubWVudHMsIG51bGwsIHRydWUpO1xuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy52aXNpdChub2RlLmJvZHkpO1xuXG4gICAgICAgIHRoaXMuY2xvc2Uobm9kZSk7XG4gICAgfVxuXG4gICAgUHJvZ3JhbShub2RlKSB7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HtcbiAgICAgICAgbGV0IGxvY2FsID0gKG5vZGUuaWQgfHwgbm9kZS5sb2NhbCk7XG4gICAgICAgIHRoaXMudmlzaXQobG9jYWwpO1xuICAgIH1cbn1cblxuLyogdmltOiBzZXQgc3c9NCB0cz00IGV0IHR3PTgwIDogKi9cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
diff --git a/tools/eslint/node_modules/escope/lib/scope-manager.js b/tools/eslint/node_modules/escope/lib/scope-manager.js
index bb64896f007223..a8a75505403730 100644
--- a/tools/eslint/node_modules/escope/lib/scope-manager.js
+++ b/tools/eslint/node_modules/escope/lib/scope-manager.js
@@ -63,6 +63,7 @@ var ScopeManager = (function () {
         this.__nodeToScope = new WeakMap();
         this.__currentScope = null;
         this.__options = options;
+        this.__declaredVariables = new WeakMap();
     }
 
     _createClass(ScopeManager, {
@@ -93,12 +94,29 @@ var ScopeManager = (function () {
         },
         __get: {
 
-            // Returns appropliate scope for this node.
+            // Returns appropriate scope for this node.
 
             value: function __get(node) {
                 return this.__nodeToScope.get(node);
             }
         },
+        getDeclaredVariables: {
+
+            /**
+             * Get variables that are declared by the node.
+             *
+             * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
+             * If the node declares nothing, this method returns an empty array.
+             * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
+             *
+             * @param {Esprima.Node} node - a node to get.
+             * @returns {Variable[]} variables that declared by the node.
+             */
+
+            value: function getDeclaredVariables(node) {
+                return this.__declaredVariables.get(node) || [];
+            }
+        },
         acquire: {
 
             /**
@@ -272,4 +290,4 @@ var ScopeManager = (function () {
 module.exports = ScopeManager;
 
 /* vim: set sw=4 ts=4 et tw=80 : */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjb3BlLW1hbmFnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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GFyYW0ge2Jvb2xlYW49fSBpbm5lciAtIGxvb2sgdXAgdGhlIG1vc3QgaW5uZXIgc2NvcGUsIGRlZmF1bHQgdmFsdWUgaXMgZmFsc2UuXG4gICAgICogQHJldHVybiB7U2NvcGU/fVxuICAgICAqL1xuICAgIGFjcXVpcmUobm9kZSwgaW5uZXIpIHtcbiAgICAgICAgdmFyIHNjb3Blcywgc2NvcGUsIGksIGl6O1xuXG4gICAgICAgIGZ1bmN0aW9uIHByZWRpY2F0ZShzY29wZSkge1xuICAgICAgICAgICAgaWYgKHNjb3BlLnR5cGUgPT09ICdmdW5jdGlvbicgJiYgc2NvcGUuZnVuY3Rpb25FeHByZXNzaW9uU2NvcGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoc2NvcGUudHlwZSA9PT0gJ1REWicpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHNjb3BlcyA9IHRoaXMuX19nZXQobm9kZSk7XG4gICAgICAgIGlmICghc2NvcGVzIHx8IHNjb3Blcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSGV1cmlzdGljIHNlbGVjdGlvbiBmcm9tIGFsbCBzY29wZXMuXG4gICAgICAgIC8vIElmIHlvdSB3b3VsZCBsaWtlIHRvIGdldCBhbGwgc2NvcGVzLCBwbGVhc2UgdXNlIFNjb3BlTWFuYWdlciNhY3F1aXJlQWxsLlxuICAgICAgICBpZiAoc2NvcGVzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgcmV0dXJuIHNjb3Blc1swXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpbm5lcikge1xuICAgICAgICAgICAgZm9yIChpID0gc2NvcGVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUgPSBzY29wZXNbaV07XG4gICAgICAgICAgICAgICAgaWYgKHByZWRpY2F0ZShzY29wZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjb3BlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDAsIGl6ID0gc2NvcGVzLmxlbmd0aDsgaSA8IGl6OyArK2kpIHtcbiAgICAgICAgICAgICAgICBzY29wZSA9IHNjb3Blc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAocHJlZGljYXRlKHNjb3BlKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2NvcGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogYWNxdWlyZSBhbGwgc2NvcGVzIGZyb20gbm9kZS5cbiAgICAgKiBAbWV0aG9kIFNjb3BlTWFuYWdlciNhY3F1aXJlQWxsXG4gICAgICogQHBhcmFtIHtFc3ByaW1hLk5vZGV9IG5vZGUgLSBub2RlIGZvciB0aGUgYWNxdWlyZWQgc2NvcGUuXG4gICAgICogQHJldHVybiB7U2NvcGVbXT99XG4gICAgICovXG4gICAgYWNxdWlyZUFsbChub2RlKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fZ2V0KG5vZGUpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHJlbGVhc2UgdGhlIG5vZGUuXG4gICAgICogQG1ldGhvZCBTY29wZU1hbmFnZXIjcmVsZWFzZVxuICAgICAqIEBwYXJhbSB7RXNwcmltYS5Ob2RlfSBub2RlIC0gcmVsZWFzaW5nIG5vZGUuXG4gICAgICogQHBhcmFtIHtib29sZWFuPX0gaW5uZ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V0dXJuIHRoaXMuX19uZXN0U2NvcGUobmV3IFN3aXRjaFNjb3BlKHRoaXMsIHRoaXMuX19jdXJyZW50U2NvcGUsIG5vZGUpKTtcbiAgICB9XG5cbiAgICBfX25lc3RNb2R1bGVTY29wZShub2RlKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fbmVzdFNjb3BlKG5ldyBNb2R1bGVTY29wZSh0aGlzLCB0aGlzLl9fY3VycmVudFNjb3BlLCBub2RlKSk7XG4gICAgfVxuXG4gICAgX19uZXN0VERaU2NvcGUobm9kZSkge1xuICAgICAgICByZXR1cm4gdGhpcy5fX25lc3RTY29wZShuZXcgVERaU2NvcGUodGhpcywgdGhpcy5fX2N1cnJlbnRTY29wZSwgbm9kZSkpO1xuICAgIH1cblxuICAgIF9fbmVzdEZ1bmN0aW9uRXhwcmVzc2lvbk5hbWVTY29wZShub2RlKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fbmVzdFNjb3BlKG5ldyBGdW5jdGlvbkV4cHJlc3Npb25OYW1lU2NvcGUodGhpcywgdGhpcy5fX2N1cnJlbnRTY29wZSwgbm9kZSkpO1xuICAgIH1cblxuICAgIF9faXNFUzYoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fb3B0aW9ucy5lY21hVmVyc2lvbiA+PSA2O1xuICAgIH1cbn1cblxuLyogdmltOiBzZXQgc3c9NCB0cz00IGV0IHR3PTgwIDogKi9cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjb3BlLW1hbmFnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUF3Qk8sT0FBTywyQkFBTSxjQUFjOztxQkFDaEIsU0FBUzs7SUFBcEIsS0FBSzs7SUFDTCxNQUFNLDJCQUFN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iBAcmV0dXJuIHtTY29wZT99XG4gICAgICovXG4gICAgYWNxdWlyZShub2RlLCBpbm5lcikge1xuICAgICAgICB2YXIgc2NvcGVzLCBzY29wZSwgaSwgaXo7XG5cbiAgICAgICAgZnVuY3Rpb24gcHJlZGljYXRlKHNjb3BlKSB7XG4gICAgICAgICAgICBpZiAoc2NvcGUudHlwZSA9PT0gJ2Z1bmN0aW9uJyAmJiBzY29wZS5mdW5jdGlvbkV4cHJlc3Npb25TY29wZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzY29wZS50eXBlID09PSAnVERaJykge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgc2NvcGVzID0gdGhpcy5fX2dldChub2RlKTtcbiAgICAgICAgaWYgKCFzY29wZXMgfHwgc2NvcGVzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBIZXVyaXN0aWMgc2VsZWN0aW9uIGZyb20gYWxsIHNjb3Blcy5cbiAgICAgICAgLy8gSWYgeW91IHdvdWxkIGxpa2UgdG8gZ2V0IGFsbCBzY29wZXMsIHBsZWFzZSB1c2UgU2NvcGVNYW5hZ2VyI2FjcXVpcmVBbGwuXG4gICAgICAgIGlmIChzY29wZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICByZXR1cm4gc2NvcGVzWzBdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlubmVyKSB7XG4gICAgICAgICAgICBmb3IgKGkgPSBzY29wZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICBzY29wZSA9IHNjb3Blc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAocHJlZGljYXRlKHNjb3BlKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2NvcGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZm9yIChpID0gMCwgaXogPSBzY29wZXMubGVuZ3RoOyBpIDwgaXo7ICsraSkge1xuICAgICAgICAgICAgICAgIHNjb3BlID0gc2NvcGVzW2ldO1xuICAgICAgICAgICAgICAgIGlmIChwcmVkaWNhdGUoc2NvcGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzY29wZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBhY3F1aXJlIGFsbCBzY29wZXMgZnJvbSBub2RlLlxuICAgICAqIEBtZXRob2QgU2NvcGVNYW5hZ2VyI2FjcXVpcmVBbGxcbiAgICAgKiBAcGFyYW0ge0VzcHJpbWEuTm9kZX0gbm9kZSAtIG5vZGUgZm9yIHRoZSBhY3F1aXJlZCBzY29wZS5cbiAgICAgKiBAcmV0dXJuIHtTY29wZVtdP31cbiAgICAgKi9cbiAgICBhY3F1aXJlQWxsKG5vZGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX19nZXQobm9kZSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogcmVsZWFzZSB0aGUgbm9kZS5cbiAgICAgKiBAbWV0aG9kIFNjb3BlTWFuYWdlciNyZWxlYXNlXG4gICAgICogQHBhcmFtIHtFc3ByaW1hLk5vZGV9IG5vZGUgLSByZWxlYXNpbmcgbm9kZS5cbiAgICAgKiBAcGFyYW0ge2Jvb2xlYW49fSBpbm5lciAtIGxvb2sgdXAgdGhlIG1vc3QgaW5uZXIgc2NvcGUsIGRlZmF1bHQgdmFsdWUgaXMgZmFsc2UuXG4gICAgICogQHJldHVybiB7U2NvcGU/fSB1cHBlciBzY29wZSBmb3IgdGhlIG5vZGUuXG4gICAgICovXG4gICAgcmVsZWFzZShub2RlLCBpbm5lcikge1xuICAgICAgICB2YXIgc2NvcGVzLCBzY29wZTtcbiAgICAgICAgc2NvcGVzID0gdGhpcy5fX2dldChub2RlKTtcbiAgICAgICAgaWYgKHNjb3BlcyAmJiBzY29wZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICBzY29wZSA9IHNjb3Blc1swXS51cHBlcjtcbiAgICAgICAgICAgIGlmICghc2NvcGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjcXVpcmUoc2NvcGUuYmxvY2ssIGlubmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBhdHRhY2goKSB7IH1cblxuICAgIGRldGFjaCgpIHsgfVxuXG4gICAgX19uZXN0U2NvcGUoc2NvcGUpIHtcbiAgICAgICAgaWYgKHNjb3BlIGluc3RhbmNlb2YgR2xvYmFsU2NvcGUpIHtcbiAgICAgICAgICAgIGFzc2VydCh0aGlzLl9fY3VycmVudFNjb3BlID09PSBudWxsKTtcbiAgICAgICAgICAgIHRoaXMuZ2xvYmFsU2NvcGUgPSBzY29wZTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLl9fY3VycmVudFNjb3BlID0gc2NvcGU7XG4gICAgICAgIHJldHVybiBzY29wZTtcbiAgICB9XG5cbiAgICBfX25lc3RHbG9iYWxTY29wZShub2RlKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fbmVzdFNjb3BlKG5ldyBHbG9iYWxTY29wZSh0aGlzLCBub2RlKSk7XG4gICAgfVxuXG4gICAgX19uZXN0QmxvY2tTY29wZShub2RlLCBpc01ldGhvZERlZmluaXRpb24pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX19uZXN0U2NvcGUobmV3IEJsb2NrU2NvcGUodGhpcywg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b3BlKG5vZGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX19uZXN0U2NvcGUobmV3IE1vZHVsZVNjb3BlKHRoaXMsIHRoaXMuX19jdXJyZW50U2NvcGUsIG5vZGUpKTtcbiAgICB9XG5cbiAgICBfX25lc3RURFpTY29wZShub2RlKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9fbmVzdFNjb3BlKG5ldyBURFpTY29wZSh0aGlzLCB0aGlzLl9fY3VycmVudFNjb3BlLCBub2RlKSk7XG4gICAgfVxuXG4gICAgX19uZXN0RnVuY3Rpb25FeHByZXNzaW9uTmFtZVNjb3BlKG5vZGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX19uZXN0U2NvcGUobmV3IEZ1bmN0aW9uRXhwcmVzc2lvbk5hbWVTY29wZSh0aGlzLCB0aGlzLl9fY3VycmVudFNjb3BlLCBub2RlKSk7XG4gICAgfVxuXG4gICAgX19pc0VTNigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX19vcHRpb25zLmVjbWFWZXJzaW9uID49IDY7XG4gICAgfVxufVxuXG4vKiB2aW06IHNldCBzdz00IHRzPTQgZXQgdHc9ODAgOiAqL1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
diff --git a/tools/eslint/node_modules/escope/lib/scope.js b/tools/eslint/node_modules/escope/lib/scope.js
index ec1547b91fe8bb..c35800deab2c59 100644
--- a/tools/eslint/node_modules/escope/lib/scope.js
+++ b/tools/eslint/node_modules/escope/lib/scope.js
@@ -75,7 +75,7 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) {
     }
 
     if (scope.type === "function") {
-        if (block.type === "Program") {
+        if (block.type === Syntax.Program) {
             body = block;
         } else {
             body = block.body;
@@ -90,7 +90,7 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) {
     if (useDirective) {
         for (i = 0, iz = body.body.length; i < iz; ++i) {
             stmt = body.body[i];
-            if (stmt.type !== "DirectiveStatement") {
+            if (stmt.type !== Syntax.DirectiveStatement) {
                 break;
             }
             if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") {
@@ -168,7 +168,7 @@ var Scope = (function () {
          * a few exceptions to this rule. With 'global' and 'with' scopes you
          * can only decide at runtime which variable a reference refers to.
          * Moreover, if 'eval()' is used in a scope, it might introduce new
-         * bindings in this or its prarent scopes.
+         * bindings in this or its parent scopes.
          * All those scopes are considered 'dynamic'.
          * @member {boolean} Scope#dynamic
          */
@@ -245,6 +245,8 @@ var Scope = (function () {
             this.upper.childScopes.push(this);
         }
 
+        this.__declaredVariables = scopeManager.__declaredVariables;
+
         registerScope(scopeManager, this);
     }
 
@@ -342,6 +344,22 @@ var Scope = (function () {
                 this.through.push(ref);
             }
         },
+        __addDeclaredVariablesOfNode: {
+            value: function __addDeclaredVariablesOfNode(variable, node) {
+                if (node == null) {
+                    return;
+                }
+
+                var variables = this.__declaredVariables.get(node);
+                if (variables == null) {
+                    variables = [];
+                    this.__declaredVariables.set(node, variables);
+                }
+                if (variables.indexOf(variable) === -1) {
+                    variables.push(variable);
+                }
+            }
+        },
         __defineGeneric: {
             value: function __defineGeneric(name, set, variables, node, def) {
                 var variable;
@@ -355,6 +373,10 @@ var Scope = (function () {
 
                 if (def) {
                     variable.defs.push(def);
+                    if (def.type !== Variable.TDZ) {
+                        this.__addDeclaredVariablesOfNode(variable, def.node);
+                        this.__addDeclaredVariablesOfNode(variable, def.parent);
+                    }
                 }
                 if (node) {
                     variable.identifiers.push(node);
@@ -725,4 +747,4 @@ var ClassScope = exports.ClassScope = (function (_Scope11) {
 })(Scope);
 
 /* vim: set sw=4 ts=4 et tw=80 : */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjb3BlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQXdCUyxNQUFNLFdBQVEs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XG4gICAgICAgICAgICBpZiAoc3RtdC50eXBlICE9PSBTeW50YXguRXhwcmVzc2lvblN0YXRlbWVudCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwciA9IHN0bXQuZXhwcmVzc2lvbjtcbiAgICAgICAgICAgIGlmIChleHByLnR5cGUgIT09IFN5bnRheC5MaXRlcmFsIHx8IHR5cGVvZiBleHByLnZhbHVlICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4cHIucmF3ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhwci5yYXcgPT09ICdcInVzZSBzdHJpY3RcIicgfHwgZXhwci5yYXcgPT09ICdcXCd1c2Ugc3RyaWN0XFwnJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChleHByLnZhbHVlID09PSAndXNlIHN0cmljdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbn1cblxuZnVuY3Rpb24gcmVnaXN0ZXJTY29wZShzY29wZU1hbmFnZXIsIHNjb3BlKSB7XG4gICAgdmFyIHNjb3BlcztcblxuICAgIHNjb3BlTWFuYWdlci5zY29wZXMucHVzaChzY29wZSk7XG5cbiAgICBzY29wZXMgPSBzY29wZU1hbmFnZXIuX19ub2RlVG9TY29wZS5nZXQoc2NvcGUuYmxvY2spO1xuICAgIGlmIChzY29wZXMpIHtcbiAgICAgICAgc2NvcGVzLnB1c2goc2NvcGUpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHNjb3BlTWFuYWdlci5fX25v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XMgY3JlYXRlZCBieSBhIEZ1bmN0aW9uRXhwcmVzc2lvbi5cbiAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gU2NvcGUjZnVuY3Rpb25FeHByZXNzaW9uU2NvcGVcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuZnVuY3Rpb25FeHByZXNzaW9uU2NvcGUgPSBmYWxzZTtcbiAgICAgICAgIC8qKlxuICAgICAgICAgKiBXaGV0aGVyIHRoaXMgaXMgYSBzY29wZSB0aGF0IGNvbnRhaW5zIGFuICdldmFsKCknIGludm9jYXRpb24uXG4gICAgICAgICAqIEBtZW1iZXIge2Jvb2xlYW59IFNjb3BlI2RpcmVjdENhbGxUb0V2YWxTY29wZVxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5kaXJlY3RDYWxsVG9FdmFsU2NvcGUgPSBmYWxzZTtcbiAgICAgICAgIC8qKlxuICAgICAgICAgKiBAbWVtYmVyIHtib29sZWFufSBTY29wZSN0aGlzRm91bmRcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMudGhpc0ZvdW5kID0gZmFsc2U7XG5cbiAgICAgICAgdGhpcy5fX2xlZnQgPSBbXTtcblxuICAgICAgICAgLyoqXG4gICAgICAgICAqIFJlZmVyZW5jZSB0byB0aGUgcGFyZW50IHtAbGluayBTY29wZXxzY29wZX0uXG4gICAgICAgICAqIEBtZW1iZXIge1Njb3BlfSBTY29wZSN1cHBlclxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy51cHBlciA9IHVwcGVyU2NvcGU7XG4gICAgICAgICAvKipcbiAgICAgICAgICogV2hldGhlciAndXNlIHN0cmljdCcgaXMgaW4gZWZmZWN0IGluIHRoaXMgc2NvcGUuXG4gICAgICAgICAqIEBtZW1iZXIge2Jvb2xlYW59IFNjb3BlI2lzU3RyaWN0XG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLmlzU3RyaWN0ID0gaXNTdHJpY3RTY29wZSh0aGlzLCBibG9jaywgaXNNZXRob2REZ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KSB7XG4gICAgICAgICAgICAgICAgdmFyaWFibGUudGFpbnRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy50YWludHMuc2V0KHZhcmlhYmxlLm5hbWUsIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVmLnJlc29sdmVkID0gdmFyaWFibGU7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgX19kZWxlZ2F0ZVRvVXBwZXJTY29wZShyZWYpIHtcbiAgICAgICAgaWYgKHRoaXMudXBwZXIpIHtcbiAgICAgICAgICAgIHRoaXMudXBwZXIuX19sZWZ0LnB1c2gocmVmKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnRocm91Z2gucHVzaChyZWYpO1xuICAgIH1cblxuICAgIF9fZGVmaW5lR2VuZXJpYyhuYW1lLCBzZXQsIHZhcmlhYmxlcywgbm9kZSwgZGVmKSB7XG4gICAgICAgIHZhciB2YXJpYWJsZTtcblxuICAgICAgICB2YXJpYWJsZSA9IHNldC5nZXQobmFtZSk7XG4gICAgICAgIGlmICghdmFyaWFibGUpIHtcbiAgICAgICAgICAgIHZhcmlhYmxlID0gbmV3IFZhcmlhYmxlKG5hbWUsIHRoaXMpO1xuICAgICAgICAgICAgc2V0LnNldChuYW1lLCB2YXJpYWJsZSk7XG4gICAgICAgICAgICB2YXJpYWJsZXMucHVzaCh2YXJpYWJsZSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGVmKSB7XG4gICAgICAgICAgICB2YXJpYWJsZS5kZWZzLnB1c2goZGVmKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobm9kZSkge1xuICAgICAgICAgICAgdmFyaWFibGUuaWRlbnRpZmllcnMucHVzaChub2RlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIF9fZGVmaW5lKG5vZGUsIGRlZikge1xuICAgICAgICBpZiAobm9kZSAmJiBub2RlLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICB0aGlzLl9fZGVmaW5lR2VuZXJpYyhcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5uYW1lLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldCxcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52YXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGRlZik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfX3JlZmVyZW5jaW5nKG5vZGUsIGFzc2lnbiwgd3JpdGVFeHByLCBtYXliZUltcGxpY2l0R2xvYmFsLCBwYXJ0aWFsLCBpbml0KSB7XG4gICAgICAgIC8vIGJlY2F1c2UgQXJyYXkgZWxlbWVudCBtYXkgYmUgbnVsbFxuICAgICAgICBpZiAoIW5vZGUgfHwgbm9kZS50eXBlICE9PSBTeW50YXguSWRlbnRpZmllcikge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU3BlY2lhbGx5IGhhbmRsZSBsaWtlIGB0aGlzYC5cbiAgICAgICAgaWYgKG5vZGUubmFtZSA9PT0gJ3N1cGVyJykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHJlZiA9IG5ldyBSZWZlcmVuY2Uobm9kZSwgdGhpcywgYXNzaWduIHx8IFJlZmVyZW5jZS5SRUFELCB3cml0ZUV4cHIsIG1heWJlSW1wbGljaXRHbG9iYWwsICEhcGFydGlhbCwgISFpbml0KTtcbiAgICAgICAgdGhpcy5yZWZlcmVuY2VzLnB1c2gocmVmKTtcbiAgICAgICAgdGhpcy5fX2xlZnQucHVzaChyZWYpO1xuICAgIH1cblxuICAgIF9fZGV0ZWN0RXZhbCgpIHtcbiAgICAgICAgdmFyIGN1cnJlbnQ7XG4gICAgICAgIGN1cnJlbnQgPSB0aGlz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AhdGhpcy5zZXQuaGFzKHJlZi5pZGVudGlmaWVyLm5hbWUpKSB7XG4gICAgICAgICAgICAgICAgaW1wbGljaXQucHVzaChyZWYuX19tYXliZUltcGxpY2l0R2xvYmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGNyZWF0ZSBhbiBpbXBsaWNpdCBnbG9iYWwgdmFyaWFibGUgZnJvbSBhc3NpZ25tZW50IGV4cHJlc3Npb25cbiAgICAgICAgZm9yIChsZXQgaSA9IDAsIGl6ID0gaW1wbGljaXQubGVuZ3RoOyBpIDwgaXo7ICsraSkge1xuICAgICAgICAgICAgbGV0IGluZm8gPSBpbXBsaWNpdFtpXTtcbiAgICAgICAgICAgIHRoaXMuX19kZWZpbmVJbXBsaWNpdChpbmZvLnBhdHRlcm4sXG4gICAgICAgICAgICAgICAgICAgIG5ldyBEZWZpbml0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuSW1wbGljaXRHbG9iYWxWYXJpYWJsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZm8ucGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZm8ubm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICApKTtcblxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbXBsaWNpdC5sZWZ0ID0gdGhpcy5fX2xlZnQ7XG5cbiAgICAgICAgcmV0dXJuIHN1cGVyLl9fY2xvc2Uoc2NvcGVNYW5hZ2VyKTtcbiAgICB9XG5cbiAgICBfX2RlZmluZUltcGxpY2l0KG5vZGUsIGRlZikge1xuICAgICAgICBpZiAobm9kZSAmJiBub2RlLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICB0aGlzLl9fZGVmaW5lR2VuZXJpYyhcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5uYW1lLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmltcGxpY2l0LnNldCxcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbXBsaWNpdC52YXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGRlZik7XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBjbGFzcyBNb2R1bGVTY29wZSBleHRlbmRzIFNjb3BlIHtcbiAgICBjb25zdHJ1Y3RvcihzY29wZU1hbmFnZXIsIHVwcGVyU2NvcGUsIGJsb2NrKSB7XG4gICAgICAgIHN1cGVyKHNjb3BlTWFuYWdlciwgJ21vZHVsZScsIHVwcGVyU2NvcGUsIGJsb2NrLCBmYWxzZSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRnVuY3Rpb25FeHByZXNzaW9uTmFtZVNjb3BlIGV4dGVuZHMgU2NvcGUge1xuICAgIGNvbnN0cnVjdG9yKHNjb3BlTWFuYWdlciwgdXBwZXJTY29wZSwgYmxvY2spIHtcbiAgICAgICAgc3VwZXIoc2NvcGVNYW5hZ2VyLCAnZnVuY3Rpb24tZXhwcmVzc2lvbi1uYW1lJywgdXBwZXJTY29wZSwgYmxvY2ssIGZhbHNlKTtcbiAgICAgICAgdGhpcy5fX2RlZmluZShibG9jay5pZCxcbiAgICAgICAgICAgICAgICBuZXcgRGVmaW5pdGlvbihcbiAgICAgICAgICAgICAgICAgICAgVmFyaWFibGUuRnVuY3Rpb25OYW1lLFxuICAgICAgICAgICAgICAgICAgICBibG9jay5pZCxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2ssXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgdGhpcy5mdW5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G4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy50aGlzRm91bmQ7XG4gICAgfVxuXG4gICAgX19kZWZpbmVBcmd1bWVudHMoKSB7XG4gICAgICAgIHRoaXMuX19kZWZpbmVHZW5lcmljKFxuICAgICAgICAgICAgICAgICdhcmd1bWVudHMnLFxuICAgICAgICAgICAgICAgIHRoaXMuc2V0LFxuICAgICAgICAgICAgICAgIHRoaXMudmFyaWFibGVzLFxuICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgbnVsbCk7XG4gICAgICAgIHRoaXMudGFpbnRzLnNldCgnYXJndW1lbnRzJywgdHJ1ZSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRm9yU2NvcGUgZXh0ZW5kcyBTY29wZSB7XG4gICAgY29uc3RydWN0b3Ioc2NvcGVNYW5hZ2VyLCB1cHBlclNjb3BlLCBibG9jaykge1xuICAgICAgICBzdXBlcihzY29wZU1hbmFnZXIsICdmb3InLCB1cHBlclNjb3BlLCBibG9jaywgZmFsc2UpO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIENsYXNzU2NvcGUgZXh0ZW5kcyBTY29wZSB7XG4gICAgY29uc3RydWN0b3Ioc2NvcGVNYW5hZ2VyLCB1cHBlclNjb3BlLCBibG9jaykge1xuICAgICAgICBzdXBlcihzY29wZU1hbmFnZXIsICdjbGFzcycsIHVwcGVyU2NvcGUsIGJsb2NrLCBmYWxzZSk7XG4gICAgfVxufVxuXG4vKiB2aW06IHNldCBzdz00IHRzPTQgZXQgdHc9ODAgOiAqL1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjb3BlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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cGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgaWYgKGJsb2NrLnR5cGUgPT09IFN5bnRheC5Qcm9ncmFtKSB7XG4gICAgICAgICAgICBib2R5ID0gYmxvY2s7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBib2R5ID0gYmxvY2suYm9keTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSBpZiAoc2NvcGUudHlwZSA9PT0gJ2dsb2JhbCcpIHtcbiAgICAgICAgYm9keSA9IGJsb2NrO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvLyBTZWFyY2ggJ3VzZSBzdHJpY3QnIGRpcmVjdGl2ZS5cbiAgICBpZiAodXNlRGlyZWN0aXZlKSB7XG4gICAgICAgIGZvciAoaSA9IDAsIGl6ID0gYm9keS5ib2R5Lmxlbmd0aDsgaSA8IGl6OyArK2kpIHtcbiAgICAgICAgICAgIHN0bXQgPSBib2R5LmJvZHlbaV07XG4gICAgICAgICAgICBpZiAoc3RtdC50eXBlICE9PSBTeW50YXguRGlyZWN0aXZlU3RhdGVtZW50KSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoc3RtdC5yYXcgPT09ICdcInVzZSBzdHJpY3RcIicgfHwgc3RtdC5yYXcgPT09ICdcXCd1c2Ugc3RyaWN0XFwnJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZm9yIChpID0gMCwgaXogPSBib2R5LmJvZHkubGVuZ3RoOyBpIDwgaXo7ICsraSkge1xuICAgICAgICAgICAgc3RtdCA9IGJvZHkuYm9keVtpXTtcbiAgICAgICAgICAgIGlmIChzdG10LnR5cGUgIT09IFN5bnRheC5FeHByZXNzaW9uU3RhdGVtZW50KSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBleHByID0gc3RtdC5leHByZXNzaW9uO1xuICAgICAgICAgICAgaWYgKGV4cHIudHlwZSAhPT0gU3ludGF4LkxpdGVyYWwgfHwgdHlwZW9mIGV4cHIudmFsdWUgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXhwci5yYXcgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmIChleHByLnJhdyA9PT0gJ1widXNlIHN0cmljdFwiJyB8fCBleHByLnJhdyA9PT0gJ1xcJ3VzZSBzdHJpY3RcXCcnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4cHIudmFsdWUgPT09ICd1c2Ugc3RyaWN0Jykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xufVxuXG5mdW5jdGlvbiByZWdpc3RlclNjb3BlKHNjb3BlTWFuYWdlciwgc2NvcGUpIHtcbiAgICB2YXIgc2NvcGVzO1xuXG4gICAgc2NvcGVNYW5hZ2VyLnNjb3Blcy5wdXNoKHNjb3BlKTtcblxuICAgIHNjb3BlcyA9IHNjb3BlTWFuYWdlci5fX25vZGVUb1Njb3BlLmdldChzY29wZS5ibG9jayk7XG4gICAgaWYgKHNjb3Blcykge1xuICAgICAgICBzY29wZXMucHVzaChzY29wZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgc2NvcGVNYW5hZ2VyLl9fbm9kZVRvU2NvcGUuc2V0KHNjb3BlLmJsb2NrLCBbIHNjb3BlIF0pO1xuICAgIH1cbn1cblxuZnVuY3Rp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iAocmVmLnRhaW50ZWQpIHtcbiAgICAgICAgICAgICAgICB2YXJpYWJsZS50YWludGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLnRhaW50cy5zZXQodmFyaWFibGUubmFtZSwgdHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWYucmVzb2x2ZWQgPSB2YXJpYWJsZTtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICBfX2RlbGVnYXRlVG9VcHBlclNjb3BlKHJlZikge1xuICAgICAgICBpZiAodGhpcy51cHBlcikge1xuICAgICAgICAgICAgdGhpcy51cHBlci5fX2xlZnQucHVzaChyZWYpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMudGhyb3VnaC5wdXNoKHJlZik7XG4gICAgfVxuXG4gICAgX19hZGREZWNsYXJlZFZhcmlhYmxlc09mTm9kZSh2YXJpYWJsZSwgbm9kZSkge1xuICAgICAgICBpZiAobm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdmFyaWFibGVzID0gdGhpcy5fX2RlY2xhcmVkVmFyaWFibGVzLmdldChub2RlKTtcbiAgICAgICAgaWYgKHZhcmlhYmxlcyA9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXJpYWJsZXMgPSBbXTtcbiAgICAgICAgICAgIHRoaXMuX19kZWNsYXJlZFZhcmlhYmxlcy5zZXQobm9kZSwgdmFyaWFibGVzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodmFyaWFibGVzLmluZGV4T2YodmFyaWFibGUpID09PSAtMSkge1xuICAgICAgICAgICAgdmFyaWFibGVzLnB1c2godmFyaWFibGUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgX19kZWZpbmVHZW5lcmljKG5hbWUsIHNldCwgdmFyaWFibGVzLCBub2RlLCBkZWYpIHtcbiAgICAgICAgdmFyIHZhcmlhYmxlO1xuXG4gICAgICAgIHZhcmlhYmxlID0gc2V0LmdldChuYW1lKTtcbiAgICAgICAgaWYgKCF2YXJpYWJsZSkge1xuICAgICAgICAgICAgdmFyaWFibGUgPSBuZXcgVmFyaWFibGUobmFtZSwgdGhpcyk7XG4gICAgICAgICAgICBzZXQuc2V0KG5hbWUsIHZhcmlhYmxlKTtcbiAgICAgICAgICAgIHZhcmlhYmxlcy5wdXNoKHZhcmlhYmxlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkZWYpIHtcbiAgICAgICAgICAgIHZhcmlhYmxlLmRlZnMucHVzaChkZWYpO1xuICAgICAgICAgICAgaWYgKGRlZi50eXBlICE9PSBWYXJpYWJsZS5URFopIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9fYWRkRGVjbGFyZWRWYXJpYWJsZXNPZk5vZGUodmFyaWFibGUsIGRlZi5ub2RlKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9fYWRkRGVjbGFyZWRWYXJpYWJsZXNPZk5vZGUodmFyaWFibGUsIGRlZi5wYXJlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChub2RlKSB7XG4gICAgICAgICAgICB2YXJpYWJsZS5pZGVudGlmaWVycy5wdXNoKG5vZGUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgX19kZWZpbmUobm9kZSwgZGVmKSB7XG4gICAgICAgIGlmIChub2RlICYmIG5vZGUudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIHRoaXMuX19kZWZpbmVHZW5lcmljKFxuICAgICAgICAgICAgICAgICAgICBub2RlLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0LFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnZhcmlhYmxlcyxcbiAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgZGVmKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIF9fcmVmZXJlbmNpbmcobm9kZSwgYXNzaWduLCB3cml0ZUV4cHIsIG1heWJlSW1wbGljaXRHbG9iYWwsIHBhcnRpYWwsIGluaXQpIHtcbiAgICAgICAgLy8gYmVjYXVzZSBBcnJheSBlbGVtZW50IG1heSBiZSBudWxsXG4gICAgICAgIGlmICghbm9kZSB8fCBub2RlLnR5cGUgIT09IFN5bnRheC5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTcGVjaWFsbHkgaGFuZGxlIGxpa2UgYHRoaXNgLlxuICAgICAgICBpZiAobm9kZS5uYW1lID09PSAnc3VwZXInKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgcmVmID0gbmV3IFJlZmVyZW5jZShub2RlLCB0aGlzLCBhc3NpZ24gfHwgUmVmZXJlbmNlLlJFQUQsIHdyaXRlRXhwciwgbWF5YmVJbXBsaWNpdEdsb2JhbCwgISFwYXJ0aWFsLCAhIWluaXQpO1xuICAgICAgICB0aGlzLnJlZmVyZW5jZXMucHVzaChyZWYpO1xuICAgICAgICB0aGlzLl9fbGVmdC5wdXNoKHJlZik7XG4gICAgfVxuXG4gICAgX19kZXRlY3RFdmFsKCkge1xuICAgICAgICB2YXIgY3VycmVudDtcbiAgICAgICAgY3VycmVudCA9IHRoaXM7XG4gICAgICAgIHRoaXMuZGlyZWN0Q2FsbFRvRXZhbFNjb3BlID0gdHJ1ZTtcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgY3VycmVudC5keW5hbWljID0gdHJ1ZTtcbiAgICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50LnVwcGVyO1xuICAgICAgICB9IHdoaWxlIChjdXJyZW50KTtcbiAgICB9XG5cbiAgICBfX2RldGVjdFRoaXMoKSB7XG4gICAgICAgIHRoaXMudGhpc0ZvdW5kID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBfX2lzQ2xvc2VkKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fX2xlZnQgPT09IG51bGw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogcmV0dXJucyByZXNvbHZlZCB7UmVmZXJlbmNlfVxuICAgICAqIEBtZXRob2QgU2NvcGUjcmVzb2x2ZVxuICAgICAqIEBwYXJhbSB7RXNwcmltYS5JZGVudGlmaWVyfSBpZGVudCAtIGlkZW50aWZpZXIgdG8gYmUgcmVzb2x2ZWQuXG4gICAgICogQHJldHVybiB7UmVmZXJlbmNlfVxuICAgICAqL1xuICAgIHJlc29sdmUoaWRlbnQpIHtcbiAgICAgICAgdmFyIHJlZiwgaSwgaXo7XG4gICAgICAgIGFzc2VydCh0aGlzLl9faXNDbG9zZWQoKSwgJ1Njb3BlIHNob3VsZCBiZSBjbG9zZWQuJyk7XG4gICAgICAgIGFzc2VydChpZGVudC50eXBlID09PSBTeW50YXguSWRlbnRpZmllciwgJ1RhcmdldCBzaG91bGQgYmUgaWRlbnRpZmllci4nKTtcbiAgICAgICAgZm9yIChpID0gMCwgaXogPSB0aGlzLnJlZmVyZW5jZXMubGVuZ3RoOyBpIDwgaXo7ICsraSkge1xuICAgICAgICAgICAgcmVmID0gdGhpcy5yZWZlcmVuY2VzW2ldO1xuICAgICAgICAgICAgaWYgKHJlZi5pZGVudGlmaWVyID09PSBpZGVudCkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZWY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogcmV0dXJucyB0aGlzIHNjb3BlIGlzIHN0YXRpY1xuICAgICAqIEBtZXRob2QgU2NvcGUjaXNTdGF0aWNcbiAgICAgKiBAcmV0dXJuIHtib29sZWFufVxuICAgICAqL1xuICAgIGlzU3RhdGljKCkge1xuICAgICAgICByZXR1cm4gIXRoaXMuZHluYW1pYztcbiAgICB9XG5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sZW5ndGg7IGkgPCBpejsgKytpKSB7XG4gICAgICAgICAgICBsZXQgaW5mbyA9IGltcGxpY2l0W2ldO1xuICAgICAgICAgICAgdGhpcy5fX2RlZmluZUltcGxpY2l0KGluZm8ucGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgbmV3IERlZmluaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICBWYXJpYWJsZS5JbXBsaWNpdEdsb2JhbFZhcmlhYmxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5mby5wYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5mby5ub2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgICAgICkpO1xuXG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmltcGxpY2l0LmxlZnQgPSB0aGlzLl9fbGVmdDtcblxuICAgICAgICByZXR1cm4gc3VwZXIuX19jbG9zZShzY29wZU1hbmFnZXIpO1xuICAgIH1cblxuICAgIF9fZGVmaW5lSW1wbGljaXQobm9kZSwgZGVmKSB7XG4gICAgICAgIGlmIChub2RlICYmIG5vZGUudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIpIHtcbiAgICAgICAgICAgIHRoaXMuX19kZWZpbmVHZW5lcmljKFxuICAgICAgICAgICAgICAgICAgICBub2RlLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW1wbGljaXQuc2V0LFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmltcGxpY2l0LnZhcmlhYmxlcyxcbiAgICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgZGVmKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIE1vZHVsZVNjb3BlIGV4dGVuZHMgU2NvcGUge1xuICAgIGNvbnN0cnVj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ICAvLyBmdW5jdGlvbiB0KCkge1xuICAgICAgICAvLyAgICAgLy8gYXJndW1lbnRzIG9mIHQgaXMgYWx3YXlzIGhpZGRlbi5cbiAgICAgICAgLy8gICAgIGZ1bmN0aW9uIGFyZ3VtZW50cygpIHtcbiAgICAgICAgLy8gICAgIH1cbiAgICAgICAgLy8gfVxuICAgICAgICBpZiAodGhpcy5ibG9jay50eXBlID09PSBTeW50YXguQXJyb3dGdW5jdGlvbkV4cHJlc3Npb24pIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy5pc1N0YXRpYygpKSB7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCB2YXJpYWJsZSA9IHRoaXMuc2V0LmdldCgnYXJndW1lbnRzJyk7XG4gICAgICAgIGFzc2VydCh2YXJpYWJsZSwgJ0Fsd2F5cyBoYXZlIGFyZ3VtZW50cyB2YXJpYWJsZS4nKTtcbiAgICAgICAgcmV0dXJuIHZhcmlhYmxlLnRhaW50ZWQgfHwgdmFyaWFibGUucmVmZXJlbmNlcy5sZW5ndGggICE9PSAwO1xuICAgIH1cblxuICAgIGlzVGhpc01hdGVyaWFsaXplZCgpIHtcbiAgICAgICAgaWYgKCF0aGlzLmlzU3RhdGljKCkpIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLnRoaXNGb3VuZDtcbiAgICB9XG5cbiAgICBfX2RlZmluZUFyZ3VtZW50cygpIHtcbiAgICAgICAgdGhpcy5fX2RlZmluZUdlbmVyaWMoXG4gICAgICAgICAgICAgICAgJ2FyZ3VtZW50cycsXG4gICAgICAgICAgICAgICAgdGhpcy5zZXQsXG4gICAgICAgICAgICAgICAgdGhpcy52YXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICBudWxsKTtcbiAgICAgICAgdGhpcy50YWludHMuc2V0KCdhcmd1bWVudHMnLCB0cnVlKTtcbiAgICB9XG59XG5cbmV4cG9ydCBjbGFzcyBGb3JTY29wZSBleHRlbmRzIFNjb3BlIHtcbiAgICBjb25zdHJ1Y3RvcihzY29wZU1hbmFnZXIsIHVwcGVyU2NvcGUsIGJsb2NrKSB7XG4gICAgICAgIHN1cGVyKHNjb3BlTWFuYWdlciwgJ2ZvcicsIHVwcGVyU2NvcGUsIGJsb2NrLCBmYWxzZSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgQ2xhc3NTY29wZSBleHRlbmRzIFNjb3BlIHtcbiAgICBjb25zdHJ1Y3RvcihzY29wZU1hbmFnZXIsIHVwcGVyU2NvcGUsIGJsb2NrKSB7XG4gICAgICAgIHN1cGVyKHNjb3BlTWFuYWdlciwgJ2NsYXNzJywgdXBwZXJTY29wZSwgYmxvY2ssIGZhbHNlKTtcbiAgICB9XG59XG5cbi8qIHZpbTogc2V0IHN3PTQgdHM9NCBldCB0dz04MCA6ICovXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
diff --git a/tools/eslint/node_modules/escope/lib/variable.js b/tools/eslint/node_modules/escope/lib/variable.js
index 6630f0a646b56c..97037c0475b7be 100644
--- a/tools/eslint/node_modules/escope/lib/variable.js
+++ b/tools/eslint/node_modules/escope/lib/variable.js
@@ -86,4 +86,4 @@ Variable.TDZ = "TDZ";
 Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable";
 
 /* vim: set sw=4 ts=4 et tw=80 : */
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZhcmlhYmxlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUE2QnFCLFFBQVEsR0FDZCxTQURNLFFBQVEsQ0FDYixJQUFJLEVBQUUsS0FBS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lzLmRlZnMgPSBbXTtcblxuICAgICAgICB0aGlzLnRhaW50ZWQgPSBmYWxzZTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFdoZXRoZXIgdGhpcyBpcyBhIHN0YWNrIHZhcmlhYmxlLlxuICAgICAgICAgKiBAbWVtYmVyIHtib29sZWFufSBWYXJpYWJsZSNzdGFja1xuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5zdGFjayA9IHRydWU7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZWZlcmVuY2UgdG8gdGhlIGVuY2xvc2luZyBTY29wZS5cbiAgICAgICAgICogQG1lbWJlciB7U2NvcGV9IFZhcmlhYmxlI3Njb3BlXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnNjb3BlID0gc2NvcGU7XG4gICAgfVxufVxuXG5WYXJpYWJsZS5DYXRjaENsYXVzZSA9ICdDYXRjaENsYXVzZSc7XG5WYXJpYWJsZS5QYXJhbWV0ZXIgPSAnUGFyYW1ldGVyJztcblZhcmlhYmxlLkZ1bmN0aW9uTmFtZSA9ICdGdW5jdGlvbk5hbWUnO1xuVmFyaWFibGUuQ2xhc3NOYW1lID0gJ0NsYXNzTmFtZSc7XG5WYXJpYWJsZS5WYXJpYWJsZSA9ICdWYXJpYWJsZSc7XG5WYXJpYWJsZS5JbXBvcnRCaW5kaW5nID0gJ0ltcG9ydEJpbmRpbmcnO1xuVmFyaWFibGUuVERaID0gJ1REWic7XG5WYXJpYWJsZS5JbXBsaWNpdEdsb2JhbFZhcmlhYmxlID0gJ0ltcGxpY2l0R2xvYmFsVmFyaWFibGUnO1xuXG4vKiB2aW06IHNldCBzdz00IHRzPTQgZXQgdHc9ODAgOiAqL1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/.lint b/tools/eslint/node_modules/escope/node_modules/es6-map/.lint
deleted file mode 100644
index e8cb4c7581685f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/.lint
+++ /dev/null
@@ -1,11 +0,0 @@
-@root
-
-module
-
-indent 2
-maxlen 80
-tabs
-
-ass
-nomen
-plusplus
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/.travis.yml
deleted file mode 100644
index 9181d7823d86b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-map@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/CHANGES
deleted file mode 100644
index a17e221ab39e40..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/CHANGES
+++ /dev/null
@@ -1,16 +0,0 @@
-v0.1.1  --  2014.10.07
-* Fix isImplemented so native Maps are detected properly
-* Configure lint scripts
-
-v0.1.0  --  2014.04.29
-* Assure strictly npm hosted dependencies
-* Update to use latest versions of dependencies
-
-v0.0.1  --  2014.04.25
-* Provide @@toStringTag symbol, and use other ES 6 symbols
-* Fix iterators handling
-* Fix isImplemented so it doesn't crash
-* Update up to changes in dependencies
-
-v0.0.0  --  2013.11.10
-- Initial (dev) version
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/README.md
deleted file mode 100644
index 1ea3a953c5093a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# es6-map
-## Map collection as specified in ECMAScript6
-
-### Usage
-
-If you want to make sure your environment implements `Map`, do:
-
-```javascript
-require('es6-map/implement');
-```
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `Map` on global scope, do:
-
-```javascript
-var Map = require('es6-map');
-```
-
-If you strictly want to use polyfill even if native `Map` exists, do:
-
-```javascript
-var Map = require('es6-map/polyfill');
-```
-
-### Installation
-
-	$ npm install es6-map
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-map-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Map = require('es6-map');
-
-var x = {}, y = {}, map = new Map([['raz', 'one'], ['dwa', 'two'], [x, y]]);
-
-map.size;                 // 3
-map.get('raz');           // 'one'
-map.get(x);               // y
-map.has('raz');           // true
-map.has(x);               // true
-map.has('foo');           // false
-map.set('trzy', 'three'); // map
-map.size                  // 4
-map.get('trzy');          // 'three'
-map.has('trzy');          // true
-map.has('dwa');           // true
-map.delete('dwa');        // true
-map.size;                 // 3
-
-map.forEach(function (value, key) {
-  // { 'raz', 'one' }, { x, y }, { 'trzy', 'three' } iterated
-});
-
-// FF nightly only:
-for (value of map) {
- // ['raz', 'one'], [x, y], ['trzy', 'three'] iterated
-}
-
-var iterator = map.values();
-
-iterator.next(); // { done: false, value: 'one' }
-iterator.next(); // { done: false, value: y }
-iterator.next(); // { done: false, value: 'three' }
-iterator.next(); // { done: true, value: undefined }
-
-map.clear(); // undefined
-map.size; // 0
-```
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-map.png)](https://travis-ci.org/medikoo/es6-map)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/is-implemented.js
deleted file mode 100644
index cb872fa45938a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/is-implemented.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var map, iterator, result;
-	if (typeof Map !== 'function') return false;
-	try {
-		// WebKit doesn't support arguments and crashes
-		map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
-	} catch (e) {
-		return false;
-	}
-	if (map.size !== 3) return false;
-	if (typeof map.clear !== 'function') return false;
-	if (typeof map.delete !== 'function') return false;
-	if (typeof map.entries !== 'function') return false;
-	if (typeof map.forEach !== 'function') return false;
-	if (typeof map.get !== 'function') return false;
-	if (typeof map.has !== 'function') return false;
-	if (typeof map.keys !== 'function') return false;
-	if (typeof map.set !== 'function') return false;
-	if (typeof map.values !== 'function') return false;
-
-	iterator = map.entries();
-	result = iterator.next();
-	if (result.done !== false) return false;
-	if (!result.value) return false;
-	if (result.value[0] !== 'raz') return false;
-	if (result.value[1] !== 'one') return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/is-map.js b/tools/eslint/node_modules/escope/node_modules/es6-map/is-map.js
deleted file mode 100644
index f45526a43ba1db..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/is-map.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var toStringTagSymbol = require('es6-symbol').toStringTag
-
-  , toString = Object.prototype.toString
-  , id = '[object Map]'
-  , Global = (typeof Map === 'undefined') ? null : Map;
-
-module.exports = function (x) {
-	return (x && ((Global && (x instanceof Global)) ||
-			(toString.call(x) === id) || (x[toStringTagSymbol] === 'Map'))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/is-native-implemented.js
deleted file mode 100644
index 208c6613cff844..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/is-native-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Exports true if environment provides native `Map` implementation,
-// whatever that is.
-
-'use strict';
-
-module.exports = (function () {
-	if (typeof Map === 'undefined') return false;
-	return (Object.prototype.toString.call(Map.prototype) === '[object Map]');
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.travis.yml
deleted file mode 100644
index 50008b23e6bcb9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+d@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/CHANGES
deleted file mode 100644
index 45233f747eca72..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/CHANGES
+++ /dev/null
@@ -1,7 +0,0 @@
-v0.1.1  --  2014.04.24
-- Add `autoBind` and `lazy` utilities
-- Allow to pass other options to be merged onto created descriptor.
-  Useful when used with other custom utilties
-
-v0.1.0  --  2013.06.20
-Initial (derived from es5-ext project)
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/package.json
deleted file mode 100644
index 03d81db13be8d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-  "name": "d",
-  "version": "0.1.1",
-  "description": "Property descriptor factory",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "scripts": {
-    "test": "node node_modules/tad/bin/tad"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/d.git"
-  },
-  "keywords": [
-    "descriptor",
-    "es",
-    "ecmascript",
-    "ecma",
-    "property",
-    "descriptors",
-    "meta",
-    "properties"
-  ],
-  "dependencies": {
-    "es5-ext": "~0.10.2"
-  },
-  "devDependencies": {
-    "tad": "~0.1.21"
-  },
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/medikoo/d/issues"
-  },
-  "homepage": "https://github.com/medikoo/d",
-  "_id": "d@0.1.1",
-  "dist": {
-    "shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
-    "tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz"
-  },
-  "_from": "d@>=0.1.1 <0.2.0",
-  "_npmVersion": "1.4.3",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "directories": {},
-  "_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
-  "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/auto-bind.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/auto-bind.js
deleted file mode 100644
index 89edfb88bbec53..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/auto-bind.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('../');
-
-module.exports = function (t, a) {
-	var o = Object.defineProperties({}, t({
-		bar: d(function () { return this === o; }),
-		bar2: d(function () { return this; })
-	}));
-
-	a.deep([(o.bar)(), (o.bar2)()], [true, o]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/index.js
deleted file mode 100644
index 3db0af10acd3ca..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/index.js
+++ /dev/null
@@ -1,182 +0,0 @@
-'use strict';
-
-var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-
-module.exports = function (t, a) {
-	var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg
-	  , dfs;
-
-	o = Object.create(Object.prototype, {
-		c: t('c', c = {}),
-		cgs: t.gs('c', cg = function () {}, cs = function () {}),
-		ce: t('ce', ce = {}),
-		cegs: t.gs('ce', ceg = function () {}, ces = function () {}),
-		cew: t('cew', cew = {}),
-		cw: t('cw', cw = {}),
-		e: t('e', e = {}),
-		egs: t.gs('e', eg = function () {}, es = function () {}),
-		ew: t('ew', ew = {}),
-		v: t('', v = {}),
-		vgs: t.gs('', vg = function () {}, vs = function () {}),
-		w: t('w', w = {}),
-
-		df: t(df = {}),
-		dfgs: t.gs(dfg = function () {}, dfs = function () {})
-	});
-
-	return {
-		c: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'c');
-			a(d.value, c, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'cgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, cg, "GS Get");
-			a(d.set, cs, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		ce: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'ce');
-			a(d.value, ce, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'cegs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, ceg, "GS Get");
-			a(d.set, ces, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, true, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		cew: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'cew');
-			a(d.value, cew, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		cw: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'cw');
-			a(d.value, cw, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		e: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'e');
-			a(d.value, e, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'egs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, eg, "GS Get");
-			a(d.set, es, "GS Set");
-			a(d.configurable, false, "GS Configurable");
-			a(d.enumerable, true, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		ew: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'ew');
-			a(d.value, ew, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		v: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'v');
-			a(d.value, v, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'vgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, vg, "GS Get");
-			a(d.set, vs, "GS Set");
-			a(d.configurable, false, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		w: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'w');
-			a(d.value, w, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		d: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'df');
-			a(d.value, df, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'dfgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, dfg, "GS Get");
-			a(d.set, dfs, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		Options: {
-			v: function (a) {
-				var x = {}, d = t(x, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, writable: true,
-					value: x, foo: true }, "No descriptor");
-				d = t('c', 'foo', { marko: 'elo' });
-				a.deep(d, { configurable: true, enumerable: false, writable: false,
-					value: 'foo', marko: 'elo' }, "Descriptor");
-			},
-			gs: function (a) {
-				var gFn = function () {}, sFn = function () {}, d;
-				d = t.gs(gFn, sFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn,
-					foo: true }, "No descriptor");
-				d = t.gs(null, sFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: undefined,
-					set: sFn, foo: true }, "No descriptor: Just set");
-				d = t.gs(gFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: gFn,
-					set: undefined, foo: true }, "No descriptor: Just get");
-
-				d = t.gs('e', gFn, sFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn,
-					bar: true }, "Descriptor");
-				d = t.gs('e', null, sFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: undefined,
-					set: sFn, bar: true }, "Descriptor: Just set");
-				d = t.gs('e', gFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: gFn,
-					set: undefined, bar: true }, "Descriptor: Just get");
-			}
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/lazy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/lazy.js
deleted file mode 100644
index 8266deb240fda3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/d/test/lazy.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-var d = require('../')
-
-  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-
-module.exports = function (t, a) {
-	var Foo = function () {}, i = 1, o, o2, desc;
-	Object.defineProperties(Foo.prototype, t({
-		bar: d(function () { return ++i; }),
-		bar2: d(function () { return this.bar + 23; }),
-		bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }),
-		bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }),
-		bar5: d(function () { return this.bar4 + 3; },
-			{ cacheName: '_bar5_', desc: 'e' })
-	}));
-
-	desc = getOwnPropertyDescriptor(Foo.prototype, 'bar');
-	a(desc.configurable, true, "Configurable: default");
-	a(desc.enumerable, false, "Enumerable: default");
-
-	o = new Foo();
-	a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74],
-		"Values");
-
-	a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false,
-		enumerable: true, writable: true, value: 59 }, "Desc");
-	a(o.hasOwnProperty('bar4'), false, "Cache not exposed");
-	desc = getOwnPropertyDescriptor(o, 'bar5');
-	a.deep(desc, { configurable: false,
-		enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc");
-
-	o2 = Object.create(o);
-	o2.bar = 30;
-	o2.bar3 = 100;
-
-	a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115],
-		"Extension Values");
-
-	Foo = function () {};
-	Object.defineProperties(Foo.prototype, t({
-		test: d('w', function () { return 'raz'; }),
-		test2: d('', function () { return 'raz'; }, { desc: 'w' }),
-		test3: d('', function () { return 'raz'; },
-			{ cacheName: '__test3__', desc: 'w' }),
-		test4: d('w', 'bar')
-	}));
-
-	o = new Foo();
-	o.test = 'marko';
-	a.deep(getOwnPropertyDescriptor(o, 'test'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko' },
-		"Set before get");
-	o.test2 = 'marko2';
-	a.deep(getOwnPropertyDescriptor(o, 'test2'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko2' },
-		"Set before get: Custom desc");
-	o.test3 = 'marko3';
-	a.deep(getOwnPropertyDescriptor(o, '__test3__'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko3' },
-		"Set before get: Custom cache name");
-	a(o.test4, 'bar', "Resolve by value");
-
-	a.h1("Flat");
-	Object.defineProperties(Foo.prototype, t({
-		flat: d(function () { return 'foo'; }, { flat: true }),
-		flat2: d(function () { return 'bar'; }, { flat: true })
-	}));
-
-	a.h2("Instance");
-	a(o.flat, 'foo', "Value");
-	a(o.hasOwnProperty('flat'), false, "Instance");
-	a(Foo.prototype.flat, 'foo', "Prototype");
-
-	a.h2("Direct");
-	a(Foo.prototype.flat2, 'bar');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lintignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lintignore
deleted file mode 100644
index ed703ed7662c89..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.lintignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/string/#/normalize/_data.js
-/test/boolean/is-boolean.js
-/test/date/is-date.js
-/test/number/is-number.js
-/test/object/is-copy.js
-/test/object/is-object.js
-/test/reg-exp/is-reg-exp.js
-/test/string/is-string.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.npmignore
deleted file mode 100644
index eb09b500d63ec8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/.lintcache
-/npm-debug.log
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.travis.yml
deleted file mode 100644
index a183dbcec61795..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
-language: node_js
-node_js:
-  - 0.10
-  - 0.12
-  - iojs
-
-before_install:
-  - mkdir node_modules; ln -s ../ node_modules/es5-ext
-
-notifications:
-  email:
-    - medikoo+es5-ext@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/CHANGES
deleted file mode 100644
index 5d0ace5bfe2f8d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/CHANGES
+++ /dev/null
@@ -1,611 +0,0 @@
-v0.10.7  --  2015.04.22
-* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1.
-  Still they're non breaking and start the conventions to be used in v1
-  * Object.validateArrayLike
-  * Object.validateArrayLikeObject
-  * Object.validateStringifiable
-  * Object.validateStringifiableValue
-  * Universal utilities for array-like/iterable objects
-    * Iterable.is
-    * Iterable.validate
-    * Iterable.validateObject
-    * Iterable.forEach
-* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel
-* Fix calculations of large numbers in Math.tanh
-* Fix algorithm of Math.sinh
-* Fix indexes to not use real symbols
-* Fix length of String.fromCodePoint
-* Fix tests of Array#copyWithin
-* Update Travis CI configuration
-
-v0.10.6  --  2015.02.02
-* Fix handling of infinite values in Math.trunc
-* Fix handling of getters in Object.normalizeOptions
-
-v0.10.5  --  2015.01.20
-* Add Function#toStringTokens
-* Add Object.serialize and Object.unserialize
-* Add String.randomUniq
-* Fix Strin#camelToHyphen issue with tokens that end with digit
-* Optimise Number.isInteger logic
-* Improve documentation
-* Configure lint scripts
-* Fix spelling of LICENSE
-
-v0.10.4  --  2014.04.30
-* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens)
-* Improve documentations
-
-v0.10.3  --  2014.04.29
-Provide accurate iterators handling:
-* Array.from improvements:
-  * Assure right unicode symbols resolution when processing strings in Array.from
-  * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment
-* Add methods:
-  * Array.prototype.entries
-  * Array.prototype.keys
-  * Array.prototype.values
-  * Array.prototype[@@iterator]
-  * String.prototype[@@iterator]
-
-Improve documentation
-
-v0.10.2  --  2014.04.24
-- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are
-  no callable objects which are `typeof obj !== 'function'`
-- Update Array.from map callback signature (up to latest resolution of TC39)
-- Improve documentation
-
-v0.10.1  --  2014.04.14
-Bump version for npm
-(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago)
-
-v0.10.0  --  2014.04.13
-Major update:
-- All methods and function specified for ECMAScript 6 are now introduced as
-  shims accompanied with functions through which (optionally) they can be
-  implementend on native objects
-- Filename convention was changed to shorter and strictly lower case names. e.g.
-  `lib/String/prototype/starts-with` became `string/#/starts-with`
-- Generated functions are guaranteed to have expected length
-- Objects with null prototype (created via `Object.create(null)`) are widely
-  supported (older version have crashed due to implied `obj.hasOwnProperty` and
-  related invocations)
-- Support array subclasses
-- When handling lists do not limit its length to Uint32 range
-- Use newly introduced `Object.eq` for strict equality in place of `Object.is`
-- Iteration of Object have been improved so properties that were hidden or
-  removed after iteration started are not iterated.
-
-Additions:
-- `Array.isPlainArray`
-- `Array.validArray`
-- `Array.prototype.concat` (as updated with ES6)
-- `Array.prototype.copyWithin` (as introduced with ES6)
-- `Array.prototype.fill` (as introduced with ES6)
-- `Array.prototype.filter` (as updated with ES6)
-- `Array.prototype.findIndex` (as introduced with ES6)
-- `Array.prototype.map` (as updated with ES6)
-- `Array.prototype.separate`
-- `Array.prototype.slice` (as updated with ES6)
-- `Array.prototype.splice` (as updated with ES6)
-- `Function.prototype.copy`
-- `Math.acosh` (as introduced with ES6)
-- `Math.atanh` (as introduced with ES6)
-- `Math.cbrt` (as introduced with ES6)
-- `Math.clz32` (as introduced with ES6)
-- `Math.cosh` (as introduced with ES6)
-- `Math.expm1` (as introduced with ES6)
-- `Math.fround` (as introduced with ES6)
-- `Math.hypot` (as introduced with ES6)
-- `Math.imul` (as introduced with ES6)
-- `Math.log2` (as introduced with ES6)
-- `Math.log10` (as introduced with ES6)
-- `Math.log1p` (as introduced with ES6)
-- `Math.sinh` (as introduced with ES6)
-- `Math.tanh` (as introduced with ES6)
-- `Math.trunc` (as introduced with ES6)
-- `Number.EPSILON` (as introduced with ES6)
-- `Number.MIN_SAFE_INTEGER` (as introduced with ES6)
-- `Number.MAX_SAFE_INTEGER` (as introduced with ES6)
-- `Number.isFinite` (as introduced with ES6)
-- `Number.isInteger` (as introduced with ES6)
-- `Number.isSafeInteger` (as introduced with ES6)
-- `Object.create` (with fix for V8 issue which disallows prototype turn of
-  objects derived from null
-- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero
-  algorithm
-- `Object.firstKey`
-- `Object.keys` (as updated with ES6)
-- `Object.mixinPrototypes`
-- `Object.primitiveSet`
-- `Object.setPrototypeOf` (as introduced with ES6)
-- `Object.validObject`
-- `RegExp.escape`
-- `RegExp.prototype.match` (as introduced with ES6)
-- `RegExp.prototype.replace` (as introduced with ES6)
-- `RegExp.prototype.search` (as introduced with ES6)
-- `RegExp.prototype.split` (as introduced with ES6)
-- `RegExp.prototype.sticky` (as introduced with ES6)
-- `RegExp.prototype.unicode` (as introduced with ES6)
-- `String.fromCodePoint` (as introduced with ES6)
-- `String.raw` (as introduced with ES6)
-- `String.prototype.at`
-- `String.prototype.codePointAt` (as introduced with ES6)
-- `String.prototype.normalize` (as introduced with ES6)
-- `String.prototype.plainReplaceAll`
-
-Removals:
-- `reserved` set
-- `Array.prototype.commonLeft`
-- `Function.insert`
-- `Function.remove`
-- `Function.prototype.silent`
-- `Function.prototype.wrap`
-- `Object.descriptor` Move to external `d` project.
-  See: https://github.com/medikoo/d
-- `Object.diff`
-- `Object.extendDeep`
-- `Object.reduce`
-- `Object.values`
-- `String.prototype.trimCommonLeft`
-
-Renames:
-- `Function.i` into `Function.identity`
-- `Function.k` into `Function.constant`
-- `Number.toInt` into `Number.toInteger`
-- `Number.toUint` into `Number.toPosInteger`
-- `Object.extend` into `Object.assign` (as introduced in ES 6)
-- `Object.extendProperties` into `Object.mixin`, with improved internal
-  handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6
-- `Object.isList` into `Object.isArrayLike`
-- `Object.mapToArray` into `Object.toArray` (with fixed function length)
-- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real
-  use case where we use this function)
-- `Function.prototype.chain` into `Function.prototype.compose`
-- `Function.prototype.match` into `Function.prototype.spread`
-- `String.prototype.format` into `String.formatMethod`
-
-Improvements & Fixes:
-- Remove workaround for primitive values handling in object iterators
-- `Array.from`: Update so it follows ES 6 spec
-- `Array.prototype.compact`: filters just null and undefined values
-  (not all falsies)
-- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position
-  handling, improve internals
-- `Array.prototype.find`: return undefined not null, in case of not found
-  (follow ES 6)
-- `Array.prototype.remove` fix function length
-- `Error.custom`: simplify, Custom class case is addressed by outer
-  `error-create` project -> https://github.com/medikoo/error-create
-- `Error.isError` true only for Error instances (remove detection of host
-  Exception objects)
-- `Number.prototype.pad`: Normalize negative pad
-- `Object.clear`: Handle errors same way as in `Object.assign`
-- `Object.compact`: filters just null and undefined values (not all falsies)
-- `Object.compare`: Take into account NaN values
-- `Object.copy`: Split into `Object.copy` and `Object.copyDeep`
-- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where
-  `isCopyDeep` handles nested plain objects and plain arrays only
-- `String.prototype.endsWith`: Adjust up to ES6 specification
-- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm
-- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace`
-- `String.prototype.startsWith`: Adjust up to ES6 specification
-- Update lint rules, and adjust code to that
-- Update Travis CI configuration
-- Remove Makefile (it's cross-env utility)
-
-v0.9.2  --  2013.03.11
-Added:
-* Array.prototype.isCopy
-* Array.prototype.isUniq
-* Error.CustomError
-* Function.validFunction
-* Object.extendDeep
-* Object.descriptor.binder
-* Object.safeTraverse
-* RegExp.validRegExp
-* String.prototype.capitalize
-* String.prototype.simpleReplace
-
-Fixed:
-* Fix Array.prototype.diff for sparse arrays
-* Accept primitive objects as input values in Object iteration methods and
-  Object.clear, Object.count, Object.diff, Object.extend,
-  Object.getPropertyNames, Object.values
-* Pass expected arguments to callbacks of Object.filter, Object.mapKeys,
-  Object.mapToArray, Object.map
-* Improve callable callback support in Object.mapToArray
-
-v0.9.1  --  2012.09.17
-* Object.reduce - reduce for hash-like collections
-* Accapt any callable object as callback in Object.filter, mapKeys and map
-* Convention cleanup
-
-v0.9.0  --  2012.09.13
-We're getting to real solid API
-
-Removed:
-* Function#memoize - it's grown up to be external package, to be soon published
-  as 'memoizee'
-* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as
-  external package
-# Function.arguments - obsolete
-# Function.context - obsolete
-# Function#flip - not readable when used, so it was never used
-# Object.clone - obsolete and confusing
-
-Added:
-* String#camelToHyphen - String format convertion
-
-Renamed:
-* String#dashToCamelCase -> String#hyphenToCamel
-
-Fixes:
-* Object.isObject - Quote names in literals that match reserved keywords
-  (older implementations crashed on that)
-* String#repeat - Do not accept negative values (coerce them to 1)
-
-Improvements:
-* Array#remove - Accepts many arguments, we can now remove many values at once
-* Object iterators (forEach, map, some) - Compare function invoked with scope
-  object bound to this
-* Function#curry - Algorithm cleanup
-* Object.isCopy - Support for all types, not just plain objects
-* Object.isPlainObject - Support for cross-frame objects
-* Do not memoize any of the functions, it shouldn't be decided internally
-* Remove Object.freeze calls in reserved, it's not up to convention
-* Improved documentation
-* Better linting (hard-core approach using both JSLint mod and JSHint)
-* Optional arguments are now documented in funtions signature
-
-v0.8.2  --  2012.06.22
-Fix errors in Array's intersection and exclusion methods, related to improper
-usage of contains method
-
-v0.8.1  --  2012.06.13
-Reorganized internal logic of Function.prototype.memoize. So it's more safe now
-and clears cache properly. Additionally preventCache option was provided.
-
-v0.8.0  --  2012.05.28
-Again, major overhaul. Probably last experimental stuff was trashed, all API
-looks more like standard extensions now.
-
-Changes:
-* Turn all Object.prototype extensions into functions and move them to Object
-namespace. We learned that extending Object.prototype is bad idea in any case.
-* Rename Function.prototype.curry into Function.prototype.partial. This function
-  is really doing partial application while currying is slightly different
-  concept.
-* Convert Function.prototype.ncurry to new implementation of
-  Function.prototype.curry, it now serves real curry concept additionaly it
-  covers use cases for aritize and hold, which were removed.
-* Rename Array's peek to last, and provide support for sparse arrays in it
-* Rename Date's monthDaysCount into daysInMonth
-* Simplify object iterators, now order of iteration can be configured with just
-  compareFn argument (no extra byKeys option)
-* Rename Object.isDuplicate to Object.isCopy
-* Rename Object.isEqual to Object.is which is compatible with future 'is'
-  keyword
-* Function.memoize is now Function.prototype.memoize. Additionally clear cache
-  functionality is added, and access to original arguments object.
-* Rename validation functions: assertNotNull to validValue, assertCallable to
-  validCallable. validValue was moved to Object namespace. On success they now
-  return validated value instead of true, it supports better composition.
-  Additionally created Date.validDate and Error.validError
-* All documentation is now held in README.md not in code files.
-* Move guid to String namespace. All guids now start with numbers.
-* Array.generate: fill argument is now optional
-* Object.toArray is now Array.from (as new ES6 specification draft suggests)
-* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is)
-  versions of them (eIndexOf, eLastIndexOf)
-* Turn all get* functions that returned methods into actuall methods (get*
-  functionality can still be achieved with help of Function.prototype.partial).
-  So: Date.getFormat is now Date.prototype.format,
-  Number.getPad is now Number.prototype.pad,
-  String.getFormat is now String.prototype.format,
-  String.getIndent is now String.prototype.indent,
-  String.getPad is now String.prototype.pad
-* Refactored Object.descriptor, it is now just two functions, main one and
-  main.gs, main is for describing values, and gs for describing getters and
-  setters. Configuration is passed with first argument as string e.g. 'ce' for
-  configurable and enumerable. If no configuration string is provided then by
-  default it returns configurable and writable but not enumerable for value or
-  configurable but not enumerable for getter/setter
-* Function.prototype.silent now returns prepared function (it was
-  expected to be fixed for 0.7)
-* Reserved keywords map (reserved) is now array not hash.
-* Object.merge is now Object.extend (while former Object.extend was completely
-  removed) - 'extend' implies that we change object, not creating new one (as
-  'merge' may imply). Similarily Object.mergeProperties was renamed to
-  Object.extendProperties
-* Position argument support in Array.prototype.contains and
-  String.prototype.contains (so it follows ES6 specification draft)
-* endPosition argument support in String.prototype.endsWith and fromPosition
-  argument support in String.prototype.startsWith (so it follows ES6
-  specification draft)
-* Better and cleaner String.prototype.indent implementation. No default value
-  for indent string argument, optional nest value (defaults to 1), remove
-  nostart argument
-* Correct length values for most methods (so they reflect length of similar
-  methods in standard)
-* Length argument is now optional in number and string pad methods.
-* Improve arguments validation in general, so it adheres to standard conventions
-* Fixed format of package.json
-
-Removed methods and functions:
-* Object.prototype.slice - Object is not ordered collection, so slice doesn't
-  make sense.
-* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for
-  that
-* Function.prototype.aritize and Function.prototype.hold - same functionality
-  can be achieved with new Function.prototype.curry
-* Function.prototype.log - provided more generic Function.prototype.wrap for
-  same use case
-* getNextIdGenerator - no use case for that (String.guid should be used if
-  needed)
-* Object.toObject - Can be now acheived with Object(validValue(x))
-* Array.prototype.someValue - no real use case (personally used once and
-  case was already controversial)
-* Date.prototype.duration - moved to external package
-* Number.getAutoincrement - No real use case
-* Object.prototype.extend, Object.prototype.override,
-  Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably
-  too complex, same should be achieved just with Object.create,
-  Object.descriptor and by saving references to super methods in local scope.
-* Object.getCompareBy - Functions should be created individually for each use
-  case
-* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and
-  same can be easily achieved with simple inline function
-* String.getPrefixWith - Not real use case for something that can be easily
-  achieved with '+' operator
-* Object.isPrimitive - It's just negation of Object.isObject
-* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in
-  Number namespace and should rather be addressed with simple inline functions.
-* Number.prototype.subtract - Should rather be addressed with simple inline
-  function
-
-New methods and functions:
-* Array.prototype.lastIndex - Returns last declared index in array
-* String.prototype.last - last for strings
-* Function.prototype.wrap - Wrap function with other, it allows to specify
-  before and after behavior transform return value or prevent original function
-  from being called.
-* Math.sign - Returns sign of a number (already in ES6 specification draft)
-* Number.toInt - Converts value to integer (already in ES6 specification draft)
-* Number.isNaN - Returns true if value is NaN (already in ES6 specification
-  draft)
-* Number.toUint - Converts value to unsigned integer
-* Number.toUint32 - Converts value to 32bit unsigned integer
-* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of
-  standard methods (all methods that were using native indexOf or lastIndexOf
-  now uses eIndexOf and elastIndexOf respectively)
-* Array.of - as it's specified for ES6
-
-Fixes:
-* Fixed binarySearch so it always returns valid list index
-* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro
-  engine)
-* Object.map now supports third argument for callback
-
-v0.7.1  --  2012.01.05
-New methods:
-* Array.prototype.firstIndex - returns first valid index of array (for
-	sparse arrays it may not be '0'
-
-Improvements:
-* Array.prototype.first - now returns value for index returned by firstIndex
-* Object.prototype.mapToArray - can be called without callback, then array of
-	key-value pairs is returned
-
-Fixes
-* Array.prototype.forEachRight, object's length read through UInt32 conversion
-
-v0.7.0  --  2011.12.27
-Major update.
-Stepped back from experimental ideas and introduced more standard approach
-taking example from how ES5 methods and functions are designed. One exceptions
-is that, we don’t refrain from declaring methods for Object.prototype - it’s up
-to developer whether how he decides to use it in his context (as function or as
-method).
-
-In general:
-* Removed any method 'functionalization' and functionalize method itself.
-	es5-ext declares plain methods, which can be configured to work as functions
-	with call.bind(method) - see documentation.
-* Removed separation of Object methods for ES5 (with descriptors) and
-	ES3 (plain) - we're following ES5 idea on that, some methods are intended just
-	for enumerable properties and some are for all properties, all are declared
-	for Object.prototype
-* Removed separation of Array generic (collected in List folder) and not generic
-	methods (collected in Array folder). Now all methods are generic and are in
-	Array/prototype folder. This separation also meant, that methods in Array are
-	usually destructive. We don’t do that separation now, there’s generally no use
-	case for destructive iterators, we should be fine with one version of each
-	method, (same as ES5 is fine with  e.g. one, non destructive 'filter' method)
-* Folder structure resembles tree of native ES5 Objects
-* All methods are written with ES5 conventions in mind, it means that most
-	methods are generic and can be run on any object. In more detail:
-	** Array.prototype and Object.prototype methods can be run on any object (any
-		not null or undefined value),
-	** Date.prototype methods should be called only on Date instances.
-	** Function.prototype methods can be called on any callable objects (not
-		necessarily functions)
-	** Number.prototype & String.prototype methods can be called on any value, in
-		case of Number it it’ll be degraded to number, in case of string it’ll be
-		degraded to string.
-* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version)
-
-Improvements for existing functions and methods:
-* Function.memoize (was Function.cache) is now fully generic, can operate on any
-	type of arguments and it’s NaN safe (all NaN objects are considered equal)
-* Method properties passed to Object.prototype.extend or
-	Object.prototype.override can aside of _super optionally take prototype object
-	via _proto argument
-* Object iterators: forEach, mapToArray and every can now iterate in specified
-	order
-* pluck, invoke and other functions that return reusable functions or methods
-	have now their results memoized.
-
-New methods:
-* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive,
-	toObject
-* Array: generate
-* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first,
-	forEachRight, group, indexesOf, intersection, remove, someRight, someValue
-* Boolean: isBoolean
-* Date: isDate
-* Function: arguments, context, insert, isArguments, remove
-* Function.prototype: not, silent
-* Number: getAutoincrement, isNumber
-* Number.prototype: isLessOrEqual, isLess, subtract
-* Object: assertCallable, descriptor (functions for clean descriptors),
-	getCompareBy, isCallable, isObject
-* Object.prototype: clone (real clone), compact, count, diff, empty,
-	getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend,
-	slice, some, unset
-* RegExp: isRegExp
-* String: getPrefixWith, isString
-* String.prototype: caseInsensitiveCompare, contains, isNumeric
-
-Renamed methods:
-* Date.clone -> Date.prototype.copy
-* Date.format -> Date.getFormat
-* Date/day/floor -> Date.prototype.floorDay
-* Date/month/floor -> Date.prototype.floorMonth
-* Date/month/year -> Date.prototype.floorYear
-* Function.cache -> Function.memoize
-* Function.getApplyArg -> Function.prototype.match
-* Function.sequence -> Function.prototype.chain
-* List.findSameStartLength -> Array.prototype.commonLeft
-* Number.pad -> Number.getPad
-* Object/plain/clone -> Object.prototype.copy
-* Object/plain/elevate -> Object.prototype.flatten
-* Object/plain/same -> Object.prototype.isDuplicate
-* Object/plain/setValue -> Object.getSet
-* String.format -> String.getFormat
-* String.indent -> String.getIndent
-* String.pad -> String.getPad
-* String.trimLeftStr -> String.prototype.trimCommonLeft
-* Object.merge -> Object.prototype.mergeProperties
-* Object/plain/pluck -> Object.prototype.get
-* Array.clone is now Array.prototype.copy and can be used also on any array-like
-	objects
-* List.isList -> Object.isList
-* List.toArray -> Object.prototype.toArray
-* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase
-
-Removed methods:
-* Array.compact - removed destructive version (that operated on same array), we
-	have now non destructive version as Array.prototype.compact.
-* Function.applyBind -> use apply.bind directly
-* Function.bindBind -> use bind.bind directly
-* Function.callBind -> use call.bind directly
-* Fuction.clone -> no valid use case
-* Function.dscope -> controversial approach, shouldn’t be considered seriously
-* Function.functionalize -> It was experimental but standards are standards
-* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’)
-* List.concat -> Concat’s for array-like’s makes no sense, just convert to array
-	first
-* List.every -> Use Array.prototype.every directly
-* List.filter -> Use Array.prototype.filter directly
-* List.forEach -> User Array.prototype.forEach directly
-* List.isListObject -> No valid use case, do: isList(list) && (typeof list ===
-	'object’)
-* List.map -> Use Array.prototype.map directly
-* List.reduce -> Use Array.prototype.reduce directly
-* List.shiftSame -> Use Array.prototype.commonLeft and do slice
-* List.slice -> Use Array.prototype.slice directly
-* List.some -> Use Array.prototype.some directly
-* Object.bindMethods -> it was version that considered descriptors, we have now
-	Object.prototype.bindMethods which operates only on enumerable properties
-* Object.every -> version that considered all properties, we have now
-	Object.prototype.every which iterates only enumerables
-* Object.invoke -> no use case
-* Object.mergeDeep -> no use case
-* Object.pluck -> no use case
-* Object.same -> it considered descriptors, now there’s only Object.isDuplicate
-	which compares only enumerable properties
-* Object.sameType -> no use case
-* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer
-	Object.descriptor functions
-* Object/plain/link -> no use case (it was used internally only by
-	Object/plain/merge)
-* Object/plain/setTrue -> now easily configurable by more universal
-	Object.getSet(true)
-* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be
-	added
-
-v0.6.3  --  2011.12.12
-* Cleared npm warning for misnamed property in package.json
-
-v0.6.2  --  2011.08.12
-* Calling String.indent without scope (global scope then) now treated as calling
-  it with null scope, it allows more direct invocations when using default nest
-  string: indent().call(str, nest)
-
-v0.6.1  --  2011.08.08
-* Added TAD test suite to devDependencies, configured test commands.
-  Tests can be run with 'make test' or 'npm test'
-
-v0.6.0  --  2011.08.07
-New methods:
-* Array: clone, compact (in place)
-* Date: format, duration, clone, monthDaysCount, day.floor, month.floor,
-  year.floor
-* Function: getApplyArg, , ncurry, rncurry, hold, cache, log
-* List: findSameStartLength, shiftSame, peek, isListObject
-* Number: pad
-* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor,
-  toDescriptors, invoke
-* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format
-
-Fixed:
-* Object.extend does now prototypal extend as exptected
-* Object.merge now tries to overwrite only configurable properties
-* Function.flip
-
-Improved:
-* Faster List.toArray
-* Better global retrieval
-* Functionalized all Function methods
-* Renamed bindApply and bindCall to applyBind and callBind
-* Removed Function.inherit (as it's unintuitive curry clone)
-* Straightforward logic in Function.k
-* Fixed naming of some tests files (letter case issue)
-* Renamed Function.saturate into Function.lock
-* String.dashToCamelCase digits support
-* Strings now considered as List objects
-* Improved List.compact
-* Concise logic for List.concat
-* Test wit TAD in clean ES5 context
-
-v0.5.1  --  2011.07.11
-* Function's bindBind, bindCall and bindApply now more versatile
-
-v0.5.0  --  2011.07.07
-* Removed Object.is and List.apply
-* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention
-  consistent)
-* Improved documentation
-
-v0.4.0  --  2011.07.05
-* Take most functions on Object to Object.plain to keep them away from object
-  descriptors
-* Object functions with ES5 standard in mind (object descriptors)
-
-v0.3.0  --  2011.06.24
-* New functions
-* Consistent file naming (dash instead of camelCase)
-
-v0.2.1  --  2011.05.28
-* Renamed Functions.K and Function.S to to lowercase versions (use consistent
-  naming)
-
-v0.2.0  --  2011.05.28
-* Renamed Array folder to List (as its generic functions for array-like objects)
-* Added Makefile
-* Added various functions
-
-v0.1.0  --  2011.05.24
-* Initial version
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/README.md
deleted file mode 100644
index 11d8a343d57f1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/README.md
+++ /dev/null
@@ -1,993 +0,0 @@
-# es5-ext
-## ECMAScript 5 extensions
-### (with respect to ECMAScript 6 standard)
-
-Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.
-
-It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.
-
-When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.
-
-### Installation
-
-	$ npm install es5-ext
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-### Usage
-
-#### ECMAScript 6 features
-
-You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).
-
-```javascript
-require('es5-ext/array/from/implement');
-Array.from('foo'); // ['f', 'o', 'o']
-```
-
-You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.
-
-```javascript
-var aFrom = require('es5-ext/array/from');
-aFrom('foo'); // ['f', 'o', 'o']
-```
-
-If you want to use shim unconditionally (even if native implementation exists) do:
-
-```javascript
-var aFrom = require('es5-ext/array/from/shim');
-aFrom('foo'); // ['f', 'o', 'o']
-```
-
-##### List of ES6 shims
-
-It's about properties introduced with ES6 and those that have been updated in new spec.
-
-- `Array.from` -> `require('es5-ext/array/from')`
-- `Array.of` -> `require('es5-ext/array/of')`
-- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`
-- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`
-- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`
-- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`
-- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`
-- `Array.prototype.find` -> `require('es5-ext/array/#/find')`
-- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`
-- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`
-- `Array.prototype.map` -> `require('es5-ext/array/#/map')`
-- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`
-- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`
-- `Array.prototype.values` -> `require('es5-ext/array/#/values')`
-- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`
-- `Math.acosh` -> `require('es5-ext/math/acosh')`
-- `Math.asinh` -> `require('es5-ext/math/asinh')`
-- `Math.atanh` -> `require('es5-ext/math/atanh')`
-- `Math.cbrt` -> `require('es5-ext/math/cbrt')`
-- `Math.clz32` -> `require('es5-ext/math/clz32')`
-- `Math.cosh` -> `require('es5-ext/math/cosh')`
-- `Math.exmp1` -> `require('es5-ext/math/expm1')`
-- `Math.fround` -> `require('es5-ext/math/fround')`
-- `Math.hypot` -> `require('es5-ext/math/hypot')`
-- `Math.imul` -> `require('es5-ext/math/imul')`
-- `Math.log1p` -> `require('es5-ext/math/log1p')`
-- `Math.log2` -> `require('es5-ext/math/log2')`
-- `Math.log10` -> `require('es5-ext/math/log10')`
-- `Math.sign` -> `require('es5-ext/math/sign')`
-- `Math.signh` -> `require('es5-ext/math/signh')`
-- `Math.tanh` -> `require('es5-ext/math/tanh')`
-- `Math.trunc` -> `require('es5-ext/math/trunc')`
-- `Number.EPSILON` -> `require('es5-ext/number/epsilon')`
-- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`
-- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`
-- `Number.isFinite` -> `require('es5-ext/number/is-finite')`
-- `Number.isInteger` -> `require('es5-ext/number/is-integer')`
-- `Number.isNaN` -> `require('es5-ext/number/is-nan')`
-- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`
-- `Object.assign` -> `require('es5-ext/object/assign')`
-- `Object.keys` -> `require('es5-ext/object/keys')`
-- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`
-- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`
-- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`
-- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`
-- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`
-- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`
-- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`
-- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`
-- `String.raw` -> `require('es5-ext/string/raw')`
-- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`
-- `String.prototype.contains` -> `require('es5-ext/string/#/contains')`
-- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`
-- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`
-- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`
-- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`
-- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`
-
-#### Non ECMAScript standard features
-
-__es5-ext__ provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:
-
-```javascript
-Object.defineProperty(Function.prototype, 'partial', { value: require('es5-ext/function/#/partial'),
-  configurable: true, enumerable: false, writable: true });
-Object.defineProperty(Array.prototype, 'flatten', { value: require('es5-ext/array/#/flatten'),
-  configurable: true, enumerable: false, writable: true });
-Object.defineProperty(String.prototype, 'capitalize', { value: require('es5-ext/string/#/capitalize'),
-  configurable: true, enumerable: false, writable: true });
-```
-
-See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. 
-
-__Important:__ Remember to __not__ extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine __only__ if you're the _owner_ of the global scope, so e.g. in final project you lead development of.
-
-When you're in situation when native extensions are not good idea, then you should use methods indirectly:
-
-
-```javascript
-var flatten = require('es5-ext/array/#/flatten');
-
-flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-for better convenience you can turn methods into functions:
-
-
-```javascript
-var call = Function.prototype.call
-var flatten = call.bind(require('es5-ext/array/#/flatten'));
-
-flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application
-
-```javascript
-var util = {};
-util.partial = call.bind(require('es5-ext/function/#/partial'));
-util.flatten = call.bind(require('es5-ext/array/#/flatten'));
-util.startsWith = call.bind(require('es5-ext/string/#/starts-with'));
-
-util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-As with native ones most methods are generic and can be run on any type of object.
-
-## API
-
-### Global extensions
-
-#### global _(es5-ext/global)_
-
-Object that represents global scope
-
-### Array Constructor extensions
-
-#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from).  
-Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.
-
-#### generate([length[, …fill]]) _(es5-ext/array/generate)_
-
-Generate an array of pre-given _length_ built of repeated arguments.
-
-#### isPlainArray(x) _(es5-ext/array/is-plain-array)_
-
-Returns true if object is plain array (not instance of one of the Array's extensions).
-
-#### of([…items]) _(es5-ext/array/of)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of).  
-Create an array from given arguments.
-
-#### toArray(obj) _(es5-ext/array/to-array)_
-
-Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back.
-
-#### validArray(obj) _(es5-ext/array/valid-array)_
-
-Returns `obj` if it's an array, otherwise throws `TypeError`
-
-### Array Prototype extensions
-
-#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_
-
-In __sorted__ list search for index of item for which _compareFn_ returns value closest to _0_.  
-It's variant of binary search algorithm
-
-#### arr.clear() _(es5-ext/array/#/clear)_
-
-Clears the array
-
-#### arr.compact() _(es5-ext/array/#/compact)_
-
-Returns a copy of the context with all non-values (`null` or `undefined`) removed.
-
-#### arr.concat() _(es5-ext/array/#/concat)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat).  
-ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.
-
-#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_
-
-Whether list contains the given value.
-
-#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).  
-
-#### arr.diff(other) _(es5-ext/array/#/diff)_
-
-Returns the array of elements that are present in context list but not present in other list.
-
-#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_
-
-_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
-
-#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_
-
-_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
-
-#### arr.entries() _(es5-ext/array/#/entries)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries).  
-Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.
-
-#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_
-
-Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments).
-
-#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).  
-
-#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter).  
-ES6's version of `filter`, returns array of same type as the context.
-
-#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find).  
-Return first element for which given function returns true
-
-#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex).  
-Return first index for which given function returns true
-
-#### arr.first() _(es5-ext/array/#/first)_
-
-Returns value for first defined index
-
-#### arr.firstIndex() _(es5-ext/array/#/first-index)_
-
-Returns first declared index of the array
-
-#### arr.flatten() _(es5-ext/array/#/flatten)_
-
-Returns flattened version of the array
-
-#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_
-
-`forEach` starting from last element
-
-#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_
-
-Group list elements by value returned by _cb_ function
-
-#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_
-
-Returns array of all indexes of given value
-
-#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_
-
-Computes the array of values that are the intersection of all lists (context list and lists given in arguments)
-
-#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_
-
-Returns true if both context and _other_ lists have same content
-
-#### arr.isUniq() _(es5-ext/array/#/is-uniq)_
-
-Returns true if all values in array are unique
-
-#### arr.keys() _(es5-ext/array/#/keys)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys).  
-Returns iterator object, which traverses all array indexes.
-
-#### arr.last() _(es5-ext/array/#/last)_
-
-Returns value of last defined index
-
-#### arr.lastIndex() _(es5-ext/array/#/last)_
-
-Returns last defined index of the array
-
-#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map).  
-ES6's version of `map`, returns array of same type as the context.
-
-#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_
-
-Remove values from the array
-
-#### arr.separate(sep) _(es5-ext/array/#/separate)_
-
-Returns array with items separated with `sep` value
-
-#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice).  
-ES6's version of `slice`, returns array of same type as the context.
-
-#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_
-
-`some` starting from last element
-
-#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice).  
-ES6's version of `splice`, returns array of same type as the context.
-
-#### arr.uniq() _(es5-ext/array/#/uniq)_
-
-Returns duplicate-free version of the array
-
-#### arr.values() _(es5-ext/array/#/values)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values).  
-Returns iterator object which traverses all array values.
-
-#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator).  
-Returns iterator object which traverses all array values.
-
-### Boolean Constructor extensions
-
-#### isBoolean(x) _(es5-ext/boolean/is-boolean)_
-
-Whether value is boolean
-
-### Date Constructor extensions
-
-#### isDate(x) _(es5-ext/date/is-date)_
-
-Whether value is date instance
-
-#### validDate(x) _(es5-ext/date/valid-date)_
-
-If given object is not date throw TypeError in other case return it.
-
-### Date Prototype extensions
-
-#### date.copy(date) _(es5-ext/date/#/copy)_
-
-Returns a copy of the date object
-
-#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_
-
-Returns number of days of date's month
-
-#### date.floorDay() _(es5-ext/date/#/floor-day)_
-
-Sets the date time to 00:00:00.000
-
-#### date.floorMonth() _(es5-ext/date/#/floor-month)_
-
-Sets date day to 1 and date time to 00:00:00.000
-
-#### date.floorYear() _(es5-ext/date/#/floor-year)_
-
-Sets date month to 0, day to 1 and date time to 00:00:00.000
-
-#### date.format(pattern) _(es5-ext/date/#/format)_
-
-Formats date up to given string. Supported patterns:
-
-* `%Y` - Year with century, 1999, 2003
-* `%y` - Year without century, 99, 03
-* `%m` - Month, 01..12
-* `%d` - Day of the month 01..31
-* `%H` - Hour (24-hour clock), 00..23
-* `%M` - Minute, 00..59
-* `%S` - Second, 00..59
-* `%L` - Milliseconds, 000..999
-
-### Error Constructor extensions
-
-#### custom(message/*, code, ext*/) _(es5-ext/error/custom)_
-
-Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)  
-
-#### isError(x) _(es5-ext/error/is-error)_
-
-Whether value is an error (instance of `Error`).  
-
-#### validError(x) _(es5-ext/error/valid-error)_
-
-If given object is not error throw TypeError in other case return it.
-
-### Error Prototype extensions
-
-#### err.throw() _(es5-ext/error/#/throw)_
-
-Throws error
-
-### Function Constructor extensions
-
-Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
-
-#### constant(x) _(es5-ext/function/constant)_
-
-Returns a constant function that returns pregiven argument
-
-_k(x)(y)  =def  x_
-
-#### identity(x) _(es5-ext/function/identity)_
-
-Identity function. Returns first argument
-
-_i(x)  =def  x_
-
-#### invoke(name[, …args]) _(es5-ext/function/invoke)_
-
-Returns a function that takes an object as an argument, and applies object's
-_name_ method to arguments.  
-_name_ can be name of the method or method itself.
-
-_invoke(name, …args)(object, …args2)  =def  object\[name\]\(…args, …args2\)_
-
-#### isArguments(x) _(es5-ext/function/is-arguments)_
-
-Whether value is arguments object
-
-#### isFunction(arg) _(es5-ext/function/is-function)_
-
-Wether value is instance of function
-
-#### noop() _(es5-ext/function/noop)_
-
-No operation function
-
-#### pluck(name) _(es5-ext/function/pluck)_
-
-Returns a function that takes an object, and returns the value of its _name_
-property
-
-_pluck(name)(obj)  =def  obj[name]_
-
-#### validFunction(arg) _(es5-ext/function/valid-function)_
-
-If given object is not function throw TypeError in other case return it.
-
-### Function Prototype extensions
-
-Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
-
-#### fn.compose([…fns]) _(es5-ext/function/#/compose)_
-
-Applies the functions in reverse argument-list order.
-
-_f1.compose(f2, f3, f4)(…args)  =def  f1(f2(f3(f4(…arg))))_
-
-#### fn.copy() _(es5-ext/function/#/copy)_
-
-Produces copy of given function
-
-#### fn.curry([n]) _(es5-ext/function/#/curry)_
-
-Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function.  
-If _n_ is not provided then it defaults to context function length
-
-_f.curry(4)(arg1, arg2)(arg3)(arg4)  =def  f(arg1, args2, arg3, arg4)_
-
-#### fn.lock([…args]) _(es5-ext/function/#/lock)_
-
-Returns a function that applies the underlying function to _args_, and ignores its own arguments.
-
-_f.lock(…args)(…args2)  =def  f(…args)_
-
-_Named after it's counterpart in Google Closure_
-
-#### fn.not() _(es5-ext/function/#/not)_
-
-Returns a function that returns boolean negation of value returned by underlying function.
-
-_f.not()(…args)  =def !f(…args)_
-
-#### fn.partial([…args]) _(es5-ext/function/#/partial)_
-
-Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.
-
-_f.partial(…args1)(…args2)  =def  f(…args1, …args2)_
-
-#### fn.spread() _(es5-ext/function/#/spread)_
-
-Returns a function that applies underlying function with first list argument
-
-_f.match()(args)  =def  f.apply(null, args)_
-
-#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_
-
-Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.
-
-### Math extensions
-
-#### acosh(x) _(es5-ext/math/acosh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).  
-
-#### asinh(x) _(es5-ext/math/asinh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).  
-
-#### atanh(x) _(es5-ext/math/atanh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).  
-
-#### cbrt(x) _(es5-ext/math/cbrt)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).  
-
-#### clz32(x) _(es5-ext/math/clz32)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).  
-
-#### cosh(x) _(es5-ext/math/cosh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).  
-
-#### expm1(x) _(es5-ext/math/expm1)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).  
-
-#### fround(x) _(es5-ext/math/fround)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).  
-
-#### hypot([…values]) _(es5-ext/math/hypot)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).  
-
-#### imul(x, y) _(es5-ext/math/imul)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).  
-
-#### log1p(x) _(es5-ext/math/log1p)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).  
-
-#### log2(x) _(es5-ext/math/log2)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).  
-
-#### log10(x) _(es5-ext/math/log10)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).  
-
-#### sign(x) _(es5-ext/math/sign)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).  
-
-#### sinh(x) _(es5-ext/math/sinh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).  
-
-#### tanh(x) _(es5-ext/math/tanh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).  
-
-#### trunc(x) _(es5-ext/math/trunc)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).  
-
-### Number Constructor extensions
-
-#### EPSILON _(es5-ext/number/epsilon)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).  
-
-The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.
-
-#### isFinite(x) _(es5-ext/number/is-finite)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite).  
-Whether value is finite. Differs from global isNaN that it doesn't do type coercion.
-
-#### isInteger(x) _(es5-ext/number/is-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger).  
-Whether value is integer.
-
-#### isNaN(x) _(es5-ext/number/is-nan)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan).  
-Whether value is NaN. Differs from global isNaN that it doesn't do type coercion.
-
-#### isNumber(x) _(es5-ext/number/is-number)_
-
-Whether given value is number
-
-#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).  
-
-#### MAX_SAFE_INTEGER _(es5-ext/number/max-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger).  
-The value of Number.MAX_SAFE_INTEGER is 9007199254740991.
-
-#### MIN_SAFE_INTEGER _(es5-ext/number/min-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger).  
-The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).
-
-#### toInteger(x) _(es5-ext/number/to-integer)_
-
-Converts value to integer
-
-#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_
-
-Converts value to positive integer. If provided value is less than 0, then 0 is returned
-
-#### toUint32(x) _(es5-ext/number/to-uint32)_
-
-Converts value to unsigned 32 bit integer. This type is used for array lengths.
-See: http://www.2ality.com/2012/02/js-integers.html
-
-### Number Prototype extensions
-
-#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_
-
-Pad given number with zeros. Returns string
-
-### Object Constructor extensions
-
-#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).  
-Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.
-
-#### clear(obj) _(es5-ext/object/clear)_
-
-Remove all enumerable own properties of the object
-
-#### compact(obj) _(es5-ext/object/compact)_
-
-Returns copy of the object with all enumerable properties that have no falsy values
-
-#### compare(obj1, obj2) _(es5-ext/object/compare)_
-
-Universal cross-type compare function. To be used for e.g. array sort.
-
-#### copy(obj) _(es5-ext/object/copy)_
-
-Returns copy of the object with all enumerable properties.
-
-#### copyDeep(obj) _(es5-ext/object/copy-deep)_
-
-Returns deep copy of the object with all enumerable properties.
-
-#### count(obj) _(es5-ext/object/count)_
-
-Counts number of enumerable own properties on object
-
-#### create(obj[, properties]) _(es5-ext/object/create)_
-
-`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).
-
-When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.
-
-It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.
-
-Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.
-
-#### eq(x, y) _(es5-ext/object/eq)_
-
-Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
-
-#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_
-
-Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function.  
-Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_
-
-Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.
-
-#### firstKey(obj) _(es5-ext/object/first-key)_
-
-Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.
-
-#### flatten(obj) _(es5-ext/object/flatten)_
-
-Returns new object, with flatten properties of input object
-
-_flatten({ a: { b: 1 }, c: { d: 1 } })  =def  { b: 1, d: 1 }_
-
-#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_
-
-Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object
-Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### getPropertyNames() _(es5-ext/object/get-property-names)_
-
-Get all (not just own) property names of the object
-
-#### is(x, y) _(es5-ext/object/is)_
-
-Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
-
-#### isArrayLike(x) _(es5-ext/object/is-array-like)_
-
-Whether object is array-like object
-
-#### isCopy(x, y) _(es5-ext/object/is-copy)_
-
-Two values are considered a copy of same value when all of their own enumerable properties have same values.
-
-#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_
-
-Deep comparision of objects
-
-#### isEmpty(obj) _(es5-ext/object/is-empty)_
-
-True if object doesn't have any own enumerable property
-
-#### isObject(arg) _(es5-ext/object/is-object)_
-
-Whether value is not primitive
-
-#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_
-
-Whether object is plain object, its protototype should be Object.prototype and it cannot be host object.
-
-#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_
-
-Search object for value
-
-#### keys(obj) _(es5-ext/object/keys)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys).  
-ES6's version of `keys`, doesn't throw on primitive input
-
-#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_
-
-Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.
-
-#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_
-
-Create new object with same values, but remapped keys
-
-#### mixin(target, source) _(es5-ext/object/mixin)_
-
-Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).
-_It was for a moment part of ECMAScript 6 draft._
-
-#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_
-
-Extends _target_, with all source and source's prototype properties.
-Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).
-
-#### normalizeOptions(options) _(es5-ext/object/normalize-options)_
-
-Normalizes options object into flat plain object.  
-
-Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use.
-
-- It never returns input `options` object back (always a copy is created)
-- `options` can be undefined in such case empty plain object is returned.
-- Copies all enumerable properties found down prototype chain.
-
-#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_
-
-Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true.
-
-#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_
-
-Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator
-
-#### serialize(value) _(es5-ext/object/serialize)_
-
-Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.
-
-#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof).  
-If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.
-
-#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_
-
-Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided
-testing function.  
-Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_
-
-Creates an array of results of calling a provided function on every key-value pair in this object.  
-Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### unserialize(str) _(es5-ext/object/unserialize)_
-
-Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)
-
-#### validCallable(x) _(es5-ext/object/valid-callable)_
-
-If given object is not callable throw TypeError in other case return it.
-
-#### validObject(x) _(es5-ext/object/valid-object)_
-
-Throws error if given value is not an object, otherwise it is returned.
-
-#### validValue(x) _(es5-ext/object/valid-value)_
-
-Throws error if given value is `null` or `undefined`, otherwise returns value.
-
-### RegExp Constructor extensions
-
-#### escape(str) _(es5-ext/reg-exp/escape)_
-
-Escapes string to be used in regular expression
-
-#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_
-
-Whether object is regular expression
-
-#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_
-
-If object is regular expression it is returned, otherwise TypeError is thrown.
-
-### RegExp Prototype extensions
-
-#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_
-
-Whether regular expression has `sticky` flag.
-
-It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.
-
-#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_
-
-Whether regular expression has `unicode` flag.
-
-It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.
-
-#### re.match(string) _(es5-ext/reg-exp/#/match)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).  
-
-#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).  
-
-#### re.search(string) _(es5-ext/reg-exp/#/search)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).  
-
-#### re.split(string) _(es5-ext/reg-exp/#/search)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).  
-
-#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky).  
-It's a getter, so only `implement` and `is-implemented` modules are provided.
-
-#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode).  
-It's a getter, so only `implement` and `is-implemented` modules are provided.
-
-### String Constructor extensions
-
-#### formatMethod(fMap) _(es5-ext/string/format-method)_
-
-Creates format method. It's used e.g. to create `Date.prototype.format` method
-
-#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)
-
-#### isString(x) _(es5-ext/string/is-string)_
-
-Whether object is string
-
-#### randomUniq() _(es5-ext/string/random-uniq)_
-
-Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)
-
-#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)
-
-### String Prototype extensions
-
-#### str.at(pos) _(es5-ext/string/#/at)_
-
-_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_
-
-Returns a string at given position in Unicode-safe manner.
-Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).
-
-#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_
-
-Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.
-Useful when converting names from js property convention into filename convention.
-
-#### str.capitalize() _(es5-ext/string/#/capitalize)_
-
-Capitalize first character of a string
-
-#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_
-
-Case insensitive compare
-
-#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)
-
-Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).
-
-#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)
-
-Whether string contains given string.
-
-#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith).  
-Whether strings ends with given string
-
-#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_
-
-Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.
-Useful when converting names from filename convention to js property name convention.
-
-#### str.indent(str[, count]) _(es5-ext/string/#/indent)_
-
-Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).
-
-#### str.last() _(es5-ext/string/#/last)_
-
-Return last character
-
-#### str.normalize([form]) _(es5-ext/string/#/normalize)_
-
-[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize).  
-Returns the Unicode Normalization Form of a given string.  
-Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)
-
-#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_
-
-Pad string with _fill_.
-If _length_ si given than _fill_ is reapated _length_ times.
-If _length_ is negative then pad is applied from right.
-
-#### str.repeat(n) _(es5-ext/string/#/repeat)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat).  
-Repeat given string _n_ times
-
-#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_
-
-Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
-
-#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_
-
-Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
-
-#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith).  
-Whether strings starts with given string
-
-#### str[@@iterator] _(es5-ext/string/#/@@iterator)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator).  
-Returns iterator object which traverses all string characters (with respect to unicode symbols)
-
-### Tests [![Build Status](https://travis-ci.org/medikoo/es5-ext.png)](https://travis-ci.org/medikoo/es5-ext)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/for-each-right.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/for-each-right.js
deleted file mode 100644
index 2f0ffaea84cb38..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/for-each-right.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , call = Function.prototype.call;
-
-module.exports = function (cb/*, thisArg*/) {
-	var i, self, thisArg;
-
-	self = Object(value(this));
-	callable(cb);
-	thisArg = arguments[1];
-
-	for (i = toPosInt(self.length); i >= 0; --i) {
-		if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/some-right.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/some-right.js
deleted file mode 100644
index de7460d62234cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/array/#/some-right.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , call = Function.prototype.call;
-
-module.exports = function (cb/*, thisArg*/) {
-	var i, self, thisArg;
-	self = Object(value(this));
-	callable(cb);
-	thisArg = arguments[1];
-
-	for (i = self.length; i >= 0; --i) {
-		if (hasOwnProperty.call(self, i) &&
-				call.call(cb, thisArg, self[i], i, self)) {
-			return true;
-		}
-	}
-	return false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.lint b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.lint
deleted file mode 100644
index 1851752f99bfda..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.lint
+++ /dev/null
@@ -1,13 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
-newcap
-vars
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml
deleted file mode 100644
index afd3509a26b27d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-symbol@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/CHANGES
deleted file mode 100644
index df8c27efc38de2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/CHANGES
+++ /dev/null
@@ -1,34 +0,0 @@
-v2.0.1  --  2015.01.28
-* Fix Symbol.prototype[Symbol.isPrimitive] implementation
-* Improve validation within Symbol.prototype.toString and
-  Symbol.prototype.valueOf
-
-v2.0.0  --  2015.01.28
-* Update up to changes in specification:
-  * Implement `for` and `keyFor`
-  * Remove `Symbol.create` and `Symbol.isRegExp`
-  * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and
-    `Symbol.split`
-* Rename `validSymbol` to `validateSymbol`
-* Improve documentation
-* Remove dead test modules
-
-v1.0.0  --  2015.01.26
-* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value)
-* Introduce initialization via hidden constructor
-* Fix isSymbol handling of polyfill values when native Symbol is present
-* Fix spelling of LICENSE
-* Configure lint scripts
-
-v0.1.1  --  2014.10.07
-* Fix isImplemented, so it returns true in case of polyfill
-* Improve documentations
-
-v0.1.0  --  2014.04.28
-* Assure strictly npm dependencies
-* Update to use latest versions of dependencies
-* Fix implementation detection so it doesn't crash on `String(symbol)`
-* throw on `new Symbol()` (as decided by TC39)
-
-v0.0.0  --  2013.11.15
-* Initial (dev) version
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/README.md
deleted file mode 100644
index 95d6780ba78cb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# es6-symbol
-## ECMAScript 6 Symbol polyfill
-
-For more information about symbols see following links
-- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
-- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
-- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
-
-### Limitations
-
-Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
-
-### Usage
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't (but without implementing `Symbol` on global scope), do:
-
-```javascript
-var Symbol = require('es6-symbol');
-```
-
-If you want to make sure your environment implements `Symbol`, do:
-
-```javascript
-require('es6-symbol/implement');
-```
-
-If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
-
-```javascript
-var Symbol = require('es6-symbol/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Symbol = require('es6-symbol');
-
-var symbol = Symbol('My custom symbol');
-var x = {};
-
-x[symbol] = 'foo';
-console.log(x[symbol]); 'foo'
-
-// Detect iterable:
-var iterator, result;
-if (possiblyIterable[Symbol.iterator]) {
-  iterator = possiblyIterable[Symbol.iterator]();
-  result = iterator.next();
-  while(!result.done) {
-    console.log(result.value);
-    result = iterator.next();
-  }
-}
-```
-
-### Installation
-#### NPM
-
-In your project path:
-
-	$ npm install es6-symbol
-
-##### Browser
-
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/package.json
deleted file mode 100644
index 0efffeaec90658..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
-  "name": "es6-symbol",
-  "version": "2.0.1",
-  "description": "ECMAScript6 Symbol polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "symbol",
-    "private",
-    "property",
-    "es6",
-    "ecmascript",
-    "harmony"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-symbol.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.5"
-  },
-  "devDependencies": {
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "51f6938d7830269fefa38f02eb912f5472b3ccd7",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-symbol/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-symbol",
-  "_id": "es6-symbol@2.0.1",
-  "_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-  "_from": "es6-symbol@>=2.0.1 <2.1.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-    "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js
deleted file mode 100644
index 735eb676b23c9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-var d              = require('d')
-  , validateSymbol = require('./validate-symbol')
-
-  , create = Object.create, defineProperties = Object.defineProperties
-  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
-  , Symbol, HiddenSymbol, globalSymbols = create(null);
-
-var generateName = (function () {
-	var created = create(null);
-	return function (desc) {
-		var postfix = 0, name;
-		while (created[desc + (postfix || '')]) ++postfix;
-		desc += (postfix || '');
-		created[desc] = true;
-		name = '@@' + desc;
-		defineProperty(objPrototype, name, d.gs(null, function (value) {
-			defineProperty(this, name, d(value));
-		}));
-		return name;
-	};
-}());
-
-HiddenSymbol = function Symbol(description) {
-	if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	return Symbol(description);
-};
-module.exports = Symbol = function Symbol(description) {
-	var symbol;
-	if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	symbol = create(HiddenSymbol.prototype);
-	description = (description === undefined ? '' : String(description));
-	return defineProperties(symbol, {
-		__description__: d('', description),
-		__name__: d('', generateName(description))
-	});
-};
-defineProperties(Symbol, {
-	for: d(function (key) {
-		if (globalSymbols[key]) return globalSymbols[key];
-		return (globalSymbols[key] = Symbol(String(key)));
-	}),
-	keyFor: d(function (s) {
-		var key;
-		validateSymbol(s);
-		for (key in globalSymbols) if (globalSymbols[key] === s) return key;
-	}),
-	hasInstance: d('', Symbol('hasInstance')),
-	isConcatSpreadable: d('', Symbol('isConcatSpreadable')),
-	iterator: d('', Symbol('iterator')),
-	match: d('', Symbol('match')),
-	replace: d('', Symbol('replace')),
-	search: d('', Symbol('search')),
-	species: d('', Symbol('species')),
-	split: d('', Symbol('split')),
-	toPrimitive: d('', Symbol('toPrimitive')),
-	toStringTag: d('', Symbol('toStringTag')),
-	unscopables: d('', Symbol('unscopables'))
-});
-defineProperties(HiddenSymbol.prototype, {
-	constructor: d(Symbol),
-	toString: d('', function () { return this.__name__; })
-});
-
-defineProperties(Symbol.prototype, {
-	toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
-	valueOf: d(function () { return validateSymbol(this); })
-});
-defineProperty(Symbol.prototype, Symbol.toPrimitive, d('',
-	function () { return validateSymbol(this); }));
-defineProperty(Symbol.prototype, Symbol.toStringTag, d('c', 'Symbol'));
-
-defineProperty(HiddenSymbol.prototype, Symbol.toPrimitive,
-	d('c', Symbol.prototype[Symbol.toPrimitive]));
-defineProperty(HiddenSymbol.prototype, Symbol.toStringTag,
-	d('c', Symbol.prototype[Symbol.toStringTag]));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js
deleted file mode 100644
index eb35c3018835c7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/index.js
deleted file mode 100644
index 62b3296df6fc5e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('d')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js
deleted file mode 100644
index bb0d64536ebbae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Symbol;
-	global.Symbol = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Symbol;
-	else global.Symbol = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js
deleted file mode 100644
index ac24b9abbff4e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Symbol !== 'undefined') {
-		a(t(Symbol()), true, "Native");
-	}
-	a(t(SymbolPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js
deleted file mode 100644
index 83fb5e9253677b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var d        = require('d')
-  , isSymbol = require('../is-symbol')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-	a(x instanceof T, false);
-
-	a(isSymbol(symbol), true, "Symbol");
-	a(isSymbol(T.iterator), true, "iterator");
-	a(isSymbol(T.toStringTag), true, "toStringTag");
-
-	x = {};
-	x[symbol] = 'foo';
-	a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
-		value: 'foo', writable: true });
-	symbol = T.for('marko');
-	a(isSymbol(symbol), true);
-	a(T.for('marko'), symbol);
-	a(T.keyFor(symbol), 'marko');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js
deleted file mode 100644
index 2c8f84c8239b6e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var symbol;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Symbol !== 'undefined') {
-		symbol = Symbol();
-		a(t(symbol), symbol, "Native");
-	}
-	symbol = SymbolPoly();
-	a(t(symbol), symbol, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/index.js
deleted file mode 100644
index 35daf78eea88c2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/number/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':              require('./#'),
-	EPSILON:          require('./epsilon'),
-	isFinite:         require('./is-finite'),
-	isInteger:        require('./is-integer'),
-	isNaN:            require('./is-nan'),
-	isNumber:         require('./is-number'),
-	isSafeInteger:    require('./is-safe-integer'),
-	MAX_SAFE_INTEGER: require('./max-safe-integer'),
-	MIN_SAFE_INTEGER: require('./min-safe-integer'),
-	toInteger:        require('./to-integer'),
-	toPosInteger:     require('./to-pos-integer'),
-	toUint32:         require('./to-uint32')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/_iterate.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/_iterate.js
deleted file mode 100644
index bf2c55d08601d3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/_iterate.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Internal method, used by iteration functions.
-// Calls a function for each key-value pair found in object
-// Optionally takes compareFn to iterate object in specific order
-
-'use strict';
-
-var isCallable = require('./is-callable')
-  , callable   = require('./valid-callable')
-  , value      = require('./valid-value')
-
-  , call = Function.prototype.call, keys = Object.keys
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-module.exports = function (method, defVal) {
-	return function (obj, cb/*, thisArg, compareFn*/) {
-		var list, thisArg = arguments[2], compareFn = arguments[3];
-		obj = Object(value(obj));
-		callable(cb);
-
-		list = keys(obj);
-		if (compareFn) {
-			list.sort(isCallable(compareFn) ? compareFn.bind(obj) : undefined);
-		}
-		return list[method](function (key, index) {
-			if (!propertyIsEnumerable.call(obj, key)) return defVal;
-			return call.call(cb, thisArg, obj[key], key, obj, index);
-		});
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy-deep.js
deleted file mode 100644
index 548e3ee4b66bac..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/copy-deep.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-var isPlainObject = require('./is-plain-object')
-  , value         = require('./valid-value')
-
-  , keys = Object.keys
-  , copy;
-
-copy = function (source) {
-	var target = {};
-	this[0].push(source);
-	this[1].push(target);
-	keys(source).forEach(function (key) {
-		var index;
-		if (!isPlainObject(source[key])) {
-			target[key] = source[key];
-			return;
-		}
-		index = this[0].indexOf(source[key]);
-		if (index === -1) target[key] = copy.call(this, source[key]);
-		else target[key] = this[1][index];
-	}, this);
-	return target;
-};
-
-module.exports = function (source) {
-	var obj = Object(value(source));
-	if (obj !== source) return obj;
-	return copy.call([[], []], obj);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/index.js
deleted file mode 100644
index 4bdf403583ace9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = {
-	assign:                     require('./assign'),
-	clear:                      require('./clear'),
-	compact:                    require('./compact'),
-	compare:                    require('./compare'),
-	copy:                       require('./copy'),
-	copyDeep:                   require('./copy-deep'),
-	count:                      require('./count'),
-	create:                     require('./create'),
-	eq:                         require('./eq'),
-	every:                      require('./every'),
-	filter:                     require('./filter'),
-	firstKey:                   require('./first-key'),
-	flatten:                    require('./flatten'),
-	forEach:                    require('./for-each'),
-	getPropertyNames:           require('./get-property-names'),
-	is:                         require('./is'),
-	isArrayLike:                require('./is-array-like'),
-	isCallable:                 require('./is-callable'),
-	isCopy:                     require('./is-copy'),
-	isCopyDeep:                 require('./is-copy-deep'),
-	isEmpty:                    require('./is-empty'),
-	isObject:                   require('./is-object'),
-	isPlainObject:              require('./is-plain-object'),
-	keyOf:                      require('./key-of'),
-	keys:                       require('./keys'),
-	map:                        require('./map'),
-	mapKeys:                    require('./map-keys'),
-	normalizeOptions:           require('./normalize-options'),
-	mixin:                      require('./mixin'),
-	mixinPrototypes:            require('./mixin-prototypes'),
-	primitiveSet:               require('./primitive-set'),
-	safeTraverse:               require('./safe-traverse'),
-	serialize:                  require('./serialize'),
-	setPrototypeOf:             require('./set-prototype-of'),
-	some:                       require('./some'),
-	toArray:                    require('./to-array'),
-	unserialize:                require('./unserialize'),
-	validateArrayLike:          require('./validate-array-like'),
-	validateArrayLikeObject:    require('./validate-array-like-object'),
-	validCallable:              require('./valid-callable'),
-	validObject:                require('./valid-object'),
-	validateStringifiable:      require('./validate-stringifiable'),
-	validateStringifiableValue: require('./validate-stringifiable-value'),
-	validValue:                 require('./valid-value')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/package.json
deleted file mode 100644
index 01d6532749e89c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-  "name": "es5-ext",
-  "version": "0.10.7",
-  "description": "ECMAScript 5 extensions and ES6 shims",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "ecmascript",
-    "ecmascript5",
-    "ecmascript6",
-    "es5",
-    "es6",
-    "extensions",
-    "ext",
-    "addons",
-    "extras",
-    "harmony",
-    "javascript",
-    "polyfill",
-    "shim",
-    "util",
-    "utils",
-    "utilities"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es5-ext.git"
-  },
-  "dependencies": {
-    "es6-iterator": "~0.1.3",
-    "es6-symbol": "~2.0.1"
-  },
-  "devDependencies": {
-    "tad": "~0.2.2",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "5b63ee02f50dfbc70dc1f62bc66b8718af443f83",
-  "bugs": {
-    "url": "https://github.com/medikoo/es5-ext/issues"
-  },
-  "homepage": "https://github.com/medikoo/es5-ext",
-  "_id": "es5-ext@0.10.7",
-  "_shasum": "dfaea50721301042e2d89c1719d43493fa821656",
-  "_from": "es5-ext@>=0.10.6 <0.11.0",
-  "_npmVersion": "2.7.4",
-  "_nodeVersion": "0.12.2",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "dfaea50721301042e2d89c1719d43493fa821656",
-    "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
deleted file mode 100644
index 379c4a5a8fb1b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return RegExp.prototype.sticky === false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
deleted file mode 100644
index a8b15b3b38defb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return RegExp.prototype.unicode === false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/index.js
deleted file mode 100644
index d45d747cbe0954..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/string/#/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = {
-	'@@iterator':           require('./@@iterator'),
-	at:                     require('./at'),
-	camelToHyphen:          require('./camel-to-hyphen'),
-	capitalize:             require('./capitalize'),
-	caseInsensitiveCompare: require('./case-insensitive-compare'),
-	codePointAt:            require('./code-point-at'),
-	contains:               require('./contains'),
-	hyphenToCamel:          require('./hyphen-to-camel'),
-	endsWith:               require('./ends-with'),
-	indent:                 require('./indent'),
-	last:                   require('./last'),
-	normalize:              require('./normalize'),
-	pad:                    require('./pad'),
-	plainReplace:           require('./plain-replace'),
-	plainReplaceAll:        require('./plain-replace-all'),
-	repeat:                 require('./repeat'),
-	startsWith:             require('./starts-with')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/__tad.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/__tad.js
deleted file mode 100644
index 884577887f5704..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/__tad.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-exports.context = null;
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js
deleted file mode 100644
index f0605399e0274e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/@@iterator/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js
deleted file mode 100644
index e590d8f28e7c0e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: '1', done: false });
-	a.deep(iterator.next(), { value: '2', done: false });
-	a.deep(iterator.next(), { value: '3', done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/_compare-by-length.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/_compare-by-length.js
deleted file mode 100644
index e40c305b98fe68..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/_compare-by-length.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [4, 5, 6], y = { length: 8 }, w = {}, z = { length: 1 };
-
-	a.deep([x, y, w, z].sort(t), [w, z, x, y]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/binary-search.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/binary-search.js
deleted file mode 100644
index cf3317371b3491..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/binary-search.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var compare  = function (value) { return this - value; };
-
-module.exports = function (t, a) {
-	var arr;
-	arr = [2, 5, 5, 8, 34, 67, 98, 345, 678];
-
-	// highest, equal match
-	a(t.call(arr, compare.bind(1)), 0, "All higher");
-	a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower");
-	a(t.call(arr, compare.bind(4)), 0, "Mid");
-	a(t.call(arr, compare.bind(5)), 2, "Match");
-	a(t.call(arr, compare.bind(6)), 2, "Above");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/clear.js
deleted file mode 100644
index a5b1c977ad98cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/clear.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [1, 2, {}, 4];
-	a(t.call(x), x, "Returns same array");
-	a.deep(x, [], "Empties array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/compact.js
deleted file mode 100644
index 6390eb26dddf6b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/compact.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"": function (t, a) {
-		var o, x, y, z;
-		o = {};
-		x = [0, 1, "", null, o, false, undefined, true];
-		y = x.slice(0);
-
-		a.not(z = t.call(x), x, "Returns different object");
-		a.deep(x, y, "Origin not changed");
-		a.deep(z, [0, 1, "", o, false, true], "Result");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/implement.js
deleted file mode 100644
index 3bdbe86812aaaa..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/concat/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/shim.js
deleted file mode 100644
index c30eb7eab08178..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/concat/shim.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr = [1, 3, 45], x = {}, subArr, subArr2, result;
-
-	a.deep(t.call(arr, '2d', x, ['ere', 'fe', x], false, null),
-		[1, 3, 45, '2d', x, 'ere', 'fe', x, false, null], "Plain array");
-
-	subArr = new SubArray('lol', 'miszko');
-	subArr2 = new SubArray('elo', 'fol');
-
-	result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', 'elo', 'fol', null],
-		"Spreable by default");
-
-	SubArray.prototype['@@isConcatSpreadable'] = false;
-
-	result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
-	a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', subArr2, null],
-		"Non spreadable");
-
-	delete SubArray.prototype['@@isConcatSpreadable'];
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/contains.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/contains.js
deleted file mode 100644
index 21404a17a61358..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/contains.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this, this[1]), true, "Contains");
-		a(t.call(this, {}), false, "Does Not contain");
-	},
-	"": function (t, a) {
-		var o, x = {}, y = {};
-
-		o = [1, 'raz', x];
-
-		a(t.call(o, 1), true, "First");
-		a(t.call(o, '1'), false, "Type coercion");
-		a(t.call(o, 'raz'), true, "Primitive");
-		a(t.call(o, 'foo'), false, "Primitive not found");
-		a(t.call(o, x), true, "Object found");
-		a(t.call(o, y), false, "Object not found");
-		a(t.call(o, 1, 1), false, "Position");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/implement.js
deleted file mode 100644
index 36070477d66802..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/copy-within/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/shim.js
deleted file mode 100644
index 93c85ea3114c24..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/copy-within/shim.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var args, x;
-
-	a.h1("2 args");
-	x = [1, 2, 3, 4, 5];
-	t.call(x, 0, 3);
-	a.deep(x, [4, 5, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]);
-
-	a.h1("3 args");
-	a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]);
-
-	a.h1("Negative args");
-	a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]);
-
-	a.h1("Array-likes");
-	args = { 0: 1, 1: 2, 2: 3, length: 3 };
-	a.deep(t.call(args, -2, 0), { '0': 1, '1': 1, '2': 2, length: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/diff.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/diff.js
deleted file mode 100644
index bcfa3a0bd12f84..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/diff.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this), []);
-	},
-	"": function (t, a) {
-		var x = {}, y = {};
-
-		a.deep(t.call([1, 'raz', x, 2, 'trzy', y], [x, 2, 'trzy']), [1, 'raz', y],
-			"Scope longer");
-		a.deep(t.call([1, 'raz', x], [x, 2, 'trzy', 1, y]), ['raz'],
-			"Arg longer");
-		a.deep(t.call([1, 'raz', x], []), [1, 'raz', x], "Empty arg");
-		a.deep(t.call([], [1, y, 'sdfs']), [], "Empty scope");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-index-of.js
deleted file mode 100644
index 4cf6c6359d44ee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-index-of.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([3, 'raz', {}, x, {}], x), 3, "Regular");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN), 2, "NaN");
-	a(t.call([3, 'raz', 0, {}, -0], -0), 2, "-0");
-	a(t.call([3, 'raz', -0, {}, 0], +0), 2, "+0");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 4, "fromIndex");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-last-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-last-index-of.js
deleted file mode 100644
index ed4f700421a8f1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/e-last-index-of.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([3, 'raz', {}, x, {}, x], x), 5, "Regular");
-	a(t.call([3, 'raz', NaN, {}, x], NaN), 2, "NaN");
-	a(t.call([3, 'raz', 0, {}, -0], -0), 4, "-0");
-	a(t.call([3, 'raz', -0, {}, 0], +0), 4, "+0");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 2, "fromIndex");
-	a(t.call([3, 'raz', NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1");
-	a(t.call([3, 'raz', NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/implement.js
deleted file mode 100644
index 733209a1c80653..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/entries/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/shim.js
deleted file mode 100644
index bf40d31005df45..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/entries/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: [0, '1'], done: false });
-	a.deep(iterator.next(), { value: [1, '2'], done: false });
-	a.deep(iterator.next(), { value: [2, '3'], done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/exclusion.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/exclusion.js
deleted file mode 100644
index 07b32d8e8cbf9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/exclusion.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var x = {};
-		a.deep(t.call(this, this, [this[0], this[2], x]), [x]);
-	},
-	"": function (t, a) {
-		var x = {}, y = {};
-
-		a.deep(t.call([x, y]), [x, y], "No arguments");
-		a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments");
-		a.deep(t.call([1, 'raz', x], [2, 'raz', y], [2, 'raz', x]), [1, y]);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/implement.js
deleted file mode 100644
index 2a01d2850a18a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/fill/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/shim.js
deleted file mode 100644
index d67300fcc23be8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/fill/shim.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-
-	x = [1, 2, 3, 4, 5, 6];
-	a(t.call(x, -1), x, "Returns self object");
-	a.deep(x, [-1, -1, -1, -1, -1, -1], "Value");
-
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1],
-		"Positive start");
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1],
-		"Negative start");
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6],
-		"Large start");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/implement.js
deleted file mode 100644
index 6d6b87cc30a651..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/filter/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/shim.js
deleted file mode 100644
index e8b5c39849097f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/filter/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, Boolean), ['foo', '2d', x], "Plain array");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, Boolean);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, ['foo', '2d', x], "Result of subclass");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/implement.js
deleted file mode 100644
index 8d85e618ccd6bc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/find-index/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/shim.js
deleted file mode 100644
index b5fee463811d49..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find-index/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var count = 0, o = {}, self = Object(this);
-	a(t.call(self, function (value, i, scope) {
-		a(value, this[i], "Value");
-		a(i, count++, "Index");
-		a(scope, this, "Scope");
-	}, self), -1, "Falsy result");
-	a(count, 3);
-
-	count = -1;
-	a(t.call(this, function () {
-		return ++count ? o : null;
-	}, this), 1, "Truthy result");
-	a(count, 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/implement.js
deleted file mode 100644
index 29fac41e013353..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/find/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/shim.js
deleted file mode 100644
index ad2e645067db5d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/find/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var count = 0, o = {}, self = Object(this);
-	a(t.call(self, function (value, i, scope) {
-		a(value, this[i], "Value");
-		a(i, count++, "Index");
-		a(scope, this, "Scope");
-	}, self), undefined, "Falsy result");
-	a(count, 3);
-
-	count = -1;
-	a(t.call(this, function () {
-		return ++count ? o : null;
-	}, this), this[1], "Truthy result");
-	a(count, 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first-index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first-index.js
deleted file mode 100644
index 4aebad64b44e51..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first-index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t.call([]), null, "Empty");
-	a(t.call([null]), 0, "One value");
-	a(t.call([1, 2, 3]), 0, "Many values");
-	a(t.call(new Array(1000)), null, "Sparse empty");
-	x = [];
-	x[883] = undefined;
-	x[890] = null;
-	a(t.call(x), 883, "Manual sparse, distant value");
-	x = new Array(1000);
-	x[657] = undefined;
-	x[700] = null;
-	a(t.call(x), 657, "Sparse, distant value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first.js
deleted file mode 100644
index 87fde0357ef1b0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/first.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	a(t.call(this), this[0]);
-};
-exports[''] = function (t, a) {
-	var x;
-	a(t.call([]), undefined, "Empty");
-	a(t.call(new Array(234), undefined, "Sparse empty"));
-	x = new Array(2342);
-	x[434] = {};
-	a(t.call(x), x[434], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/flatten.js
deleted file mode 100644
index 65f1214b04da93..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/flatten.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10];
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"Nested Arrays": function (t, a) {
-		a(t.call(o).length, 10);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/for-each-right.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/for-each-right.js
deleted file mode 100644
index 2d24569d94d86d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/for-each-right.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, first, last, x, icount = this.length;
-		t.call(this, function (item, index, col) {
-			++count;
-			if (!first) {
-				first = item;
-			}
-			last = item;
-			x = col;
-			a(index, --icount, "Index");
-		});
-		a(count, this.length, "Iterated");
-		a(first, this[this.length - 1], "First is last");
-		a(last, this[0], "Last is first");
-		a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
-	},
-	"": function (t, a) {
-		var x = {}, y, count;
-		t.call([1], function () { y = this; }, x);
-		a(y, x, "Scope");
-		y = 0;
-		t.call([3, 4, 4], function (a, i) { y += i; });
-		a(y, 3, "Indexes");
-
-		x = [1, 3];
-		x[5] = 'x';
-		y = 0;
-		count = 0;
-		t.call(x, function (a, i) { ++count; y += i; });
-		a(y, 6, "Misssing Indexes");
-		a(count, 3, "Misssing Indexes, count");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/group.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/group.js
deleted file mode 100644
index 32dc8c2dbb68bf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/group.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, self;
-
-		self = Object(this);
-		a.deep(t.call(self, function (v, i, scope) {
-			a(v, this[i], "Value");
-			a(i, count++, "Index");
-			a(scope, this, "Scope");
-			return i;
-		}, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] });
-	},
-	"": function (t, a) {
-		var r;
-		r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56],
-			function (v) {
-				return v % 2 ? 'odd' : 'even';
-			});
-		a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]);
-		a.deep(r.even, [2, 4, 6, 34, 56]);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/indexes-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/indexes-of.js
deleted file mode 100644
index 3364170f1ec4a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/indexes-of.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this[1]), [1]);
-	},
-	"": function (t, a) {
-		var x = {};
-		a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result");
-		a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results");
-		a.deep(t.call([], x), [], "Empty array");
-		a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/intersection.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/intersection.js
deleted file mode 100644
index b72b2fb074fc46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/intersection.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array');
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this, this), toArray(this));
-	},
-	"": function (t, a) {
-		var x = {}, y = {}, p, r;
-		a.deep(t.call([], [2, 3, 4]), [], "Empty #1");
-		a.deep(t.call([2, 3, 4], []), [], "Empty #2");
-		a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different");
-		p = t.call([3, 5, 'raz', {}, 'dwa', x], [1, 3, 'raz', 'dwa', 'trzy', x, {}],
-			[3, 'raz', x, 65]);
-		r = [3, 'raz', x];
-		p.sort();
-		r.sort();
-		a.deep(p, r, "Same parts");
-		a.deep(t.call(r, r), r, "Same");
-		a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]),
-			[1, 2, x, 4, 5, y, 7], "Long reverse same");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-copy.js
deleted file mode 100644
index e7f80e7a8d4ebc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-copy.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([], []), true, "Empty");
-	a(t.call([], {}), true, "Empty lists");
-	a(t.call([1, x, 'raz'], [1, x, 'raz']), true, "Same");
-	a(t.call([1, x, 'raz'], { 0: 1, 1: x, 2: 'raz', length: 3 }), true,
-			"Same lists");
-	a(t.call([1, x, 'raz'], [x, 1, 'raz']), false, "Diff order");
-	a(t.call([1, x], [1, x, 'raz']), false, "Diff length #1");
-	a(t.call([1, x, 'raz'], [1, x]), false, "Diff length #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-uniq.js
deleted file mode 100644
index 7349ba337135a7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/is-uniq.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([]), true, "Empty");
-	a(t.call({}), true, "Empty lists");
-	a(t.call([1, x, 'raz']), true, "Uniq");
-	a(t.call([1, x, 1, 'raz']), false, "Not Uniq: primitive");
-	a(t.call([1, x, '1', 'raz']), true, "Uniq: primitive");
-	a(t.call([1, x, 1, {}, 'raz']), false, "Not Uniq: Obj");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/implement.js
deleted file mode 100644
index b0c1aa078f190e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/keys/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/shim.js
deleted file mode 100644
index a43c04cac103a6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/keys/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: 0, done: false });
-	a.deep(iterator.next(), { value: 1, done: false });
-	a.deep(iterator.next(), { value: 2, done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last-index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last-index.js
deleted file mode 100644
index a1cac1073f8862..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last-index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t.call([]), null, "Empty");
-	a(t.call([null]), 0, "One value");
-	a(t.call([1, 2, 3]), 2, "Many values");
-	a(t.call(new Array(1000)), null, "Sparse empty");
-	x = [];
-	x[883] = null;
-	x[890] = undefined;
-	a(t.call(x), 890, "Manual sparse, distant value");
-	x = new Array(1000);
-	x[657] = null;
-	x[700] = undefined;
-	a(t.call(x), 700, "Sparse, distant value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last.js
deleted file mode 100644
index 8d051bc8d2f5df..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/last.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	a(t.call(this), this[this.length - 1]);
-};
-
-exports[''] = function (t, a) {
-	var x;
-	a(t.call([]), undefined, "Empty");
-	a(t.call(new Array(234), undefined, "Sparse empty"));
-	x = new Array(2342);
-	x[434] = {};
-	x[450] = {};
-	a(t.call(x), x[450], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/implement.js
deleted file mode 100644
index cdcbc8df6206a5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/map/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/shim.js
deleted file mode 100644
index bbfefe8e333dc8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/map/shim.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false],
-		"Plain array");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, Boolean);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [true, false, false, true, false, true, false],
-		"Result of subclass");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/remove.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/remove.js
deleted file mode 100644
index 3ebdca2d0183df..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/remove.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var y = {}, z = {}, x = [9, z, 5, y, 'foo'];
-	t.call(x, y);
-	a.deep(x, [9, z, 5, 'foo']);
-	t.call(x, {});
-	a.deep(x, [9, z, 5, 'foo'], "Not existing");
-	t.call(x, 5);
-	a.deep(x, [9, z, 'foo'], "Primitive");
-	x = [9, z, 5, y, 'foo'];
-	t.call(x, z, 5, 'foo');
-	a.deep(x, [9, y], "More than one argument");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/separate.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/separate.js
deleted file mode 100644
index 42918b59711e32..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/separate.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [], y = {}, z = {};
-	a.deep(t.call(x, y), [], "Empty");
-	a.not(t.call(x), x, "Returns copy");
-	a.deep(t.call([1], y), [1], "One");
-	a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One");
-	a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More");
-	x = new Array(1000);
-	x[23] = 2;
-	x[3453] = 'raz';
-	x[500] = z;
-	a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/implement.js
deleted file mode 100644
index 855ae2fa4df88e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/slice/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/shim.js
deleted file mode 100644
index f674f3470037f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/slice/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, 2, 4), [0, '2d'], "Plain array: result");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, 2, 4);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [0, '2d'], "Subclass: result");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/some-right.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/some-right.js
deleted file mode 100644
index 900771a6f818a4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/some-right.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, first, last, x, icount = this.length;
-		t.call(this, function (item, index, col) {
-			++count;
-			if (!first) {
-				first = item;
-			}
-			last = item;
-			x = col;
-			a(index, --icount, "Index");
-		});
-		a(count, this.length, "Iterated");
-		a(first, this[this.length - 1], "First is last");
-		a(last, this[0], "Last is first");
-		a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
-	},
-	"": function (t, a) {
-		var x = {}, y, count;
-		t.call([1], function () { y = this; }, x);
-		a(y, x, "Scope");
-		y = 0;
-		t.call([3, 4, 4], function (a, i) { y += i; });
-		a(y, 3, "Indexes");
-
-		x = [1, 3];
-		x[5] = 'x';
-		y = 0;
-		count = 0;
-		a(t.call(x, function (a, i) { ++count; y += i; }), false, "Return");
-		a(y, 6, "Misssing Indexes");
-		a(count, 3, "Misssing Indexes, count");
-
-		count = 0;
-		a(t.call([-2, -3, -4, 2, -5], function (item) {
-			++count;
-			return item > 0;
-		}), true, "Return");
-		a(count, 2, "Break after true is returned");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/implement.js
deleted file mode 100644
index 0d9f46188b528b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/splice/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/shim.js
deleted file mode 100644
index 2c751e672400e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/splice/shim.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, 2, 2, 'bar'), [0, '2d'], "Plain array: result");
-	a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, 2, 2, 'bar');
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [0, '2d'], "Subclass: result");
-	a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/uniq.js
deleted file mode 100644
index 2f7e6c4ed1feb5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/uniq.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"": function (t, a) {
-		var o, x = {}, y = {}, z = {}, w;
-		o = [1, 2, x, 3, 1, 'raz', '1', y, x, 'trzy', z, 'raz'];
-
-		a.not(w = t.call(o), o, "Returns different object");
-		a.deep(w, [1, 2, x, 3, 'raz', '1', y, 'trzy', z], "Result");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/implement.js
deleted file mode 100644
index 9f40138c254b30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/values/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/shim.js
deleted file mode 100644
index e590d8f28e7c0e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/#/values/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: '1', done: false });
-	a.deep(iterator.next(), { value: '2', done: false });
-	a.deep(iterator.next(), { value: '3', done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/__scopes.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/__scopes.js
deleted file mode 100644
index fc240d304869bb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/__scopes.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.Array = ['1', '2', '3'];
-
-exports.Arguments = (function () {
-	return arguments;
-}('1', '2', '3'));
-
-exports.String = "123";
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_is-extensible.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_is-extensible.js
deleted file mode 100644
index d387126fe111ed..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_is-extensible.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'boolean');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
deleted file mode 100644
index 29d8699d461a85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-
-module.exports = function (t, a) {
-	t((t === null) || isArray(t.prototype), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy.js
deleted file mode 100644
index 29d8699d461a85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/_sub-array-dummy.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-
-module.exports = function (t, a) {
-	t((t === null) || isArray(t.prototype), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/implement.js
deleted file mode 100644
index e0db846f99a0d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../array/from/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/shim.js
deleted file mode 100644
index 310302ac486645..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/from/shim.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var o = [1, 2, 3], MyType;
-	a.not(t(o), o, "Array");
-	a.deep(t(o), o, "Array: same content");
-	a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
-	a.deep(t((function () { return arguments; }(3, o, 'raz'))),
-		[3, o, 'raz'], "Arguments");
-	a.deep(t((function () { return arguments; }(3))), [3],
-		"Arguments with one numeric value");
-
-	a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
-
-	a.deep(t(o, function (val) { return (val + 2) * 10; }, 10), [30, 40, 50],
-		"Mapping");
-
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.deep(t(3), [], "Primitive");
-
-	a(t.length, 1, "Length");
-	a.deep(t({ length: 0 }), [], "No values Array-like");
-	a.deep(t({ length: -1 }), [], "Invalid length Array-like");
-	a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2");
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.deep(t(false), [], "Boolean");
-	a.deep(t(-Infinity), [], "Inifity");
-	a.deep(t(-0), [], "-0");
-	a.deep(t(+0), [], "+0");
-	a.deep(t(1), [], "1");
-	a.deep(t(+Infinity), [], "+Infinity");
-	a.deep(t({}), [], "Plain object");
-	a.deep(t({ length: 1 }), [undefined], "Sparse array-like");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return x + x; }), ['aa', 'bb'],
-		"Map");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, undefined),
-		['undefined', 'undefined'], "Map context");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, 'x'),
-		['x', 'x'], "Map primitive context");
-	a.throws(function () { t({}, 'foo', 'x'); }, TypeError, "Non callable for map");
-
-	a.deep(t.call(null, { length: 1, '0': 'a' }), ['a'], "Null context");
-
-	a(t({ __proto__: { '0': 'abc', length: 1 } })[0], 'abc', "Values on prototype");
-
-	a.throws(function () { t.call(function () { return Object.freeze({}); }, {}); },
-		TypeError, "Contructor producing freezed objects");
-
-	// Ensure no setters are called for the indexes
-	// Ensure no setters are called for the indexes
-	MyType = function () {};
-	Object.defineProperty(MyType.prototype, '0', {
-		set: function (x) { throw new Error('Setter called: ' + x); }
-	});
-	a.deep(t.call(MyType, { '0': 'abc', length: 1 }), { '0': 'abc', length: 1 },
-		"Defined not set");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/generate.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/generate.js
deleted file mode 100644
index d72e056887838b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/generate.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-	a.deep(t(3), [undefined, undefined, undefined], "Just length");
-	a.deep(t(0, 'x'), [], "No repeat");
-	a.deep(t(1, x, y), [x], "Arguments length larger than repeat number");
-	a.deep(t(3, x), [x, x, x], "Single argument");
-	a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/is-plain-array.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/is-plain-array.js
deleted file mode 100644
index 871a08aec21ff9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/is-plain-array.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var SubArray = require('../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr = [1, 2, 3];
-	a(t(arr), true, "Array");
-	a(t(null), false, "Null");
-	a(t(), false, "Undefined");
-	a(t('234'), false, "String");
-	a(t(23), false, "Number");
-	a(t({}), false, "Plain object");
-	a(t({ length: 1, 0: 'raz' }), false, "Array-like");
-	a(t(Object.create(arr)), false, "Array extension");
-	if (!SubArray) return;
-	a(t(new SubArray(23)), false, "Subclass instance");
-	a(t(Array.prototype), false, "Array.prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/implement.js
deleted file mode 100644
index 30d53be2d7abbe..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../array/of/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/shim.js
deleted file mode 100644
index e6974420c1c274..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/of/shim.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js
-// Thanks @mathiasbynens
-
-'use strict';
-
-var defineProperty = Object.defineProperty;
-
-module.exports = function (t, a) {
-	var x = {}, testObject, MyType;
-
-	a.deep(t(), [], "No arguments");
-	a.deep(t(3), [3], "One numeric argument");
-	a.deep(t(3, 'raz', null, x, undefined), [3, 'raz', null, x, undefined],
-		"Many arguments");
-
-	a(t.length, 0, "Length");
-
-	a.deep(t('abc'), ['abc'], "String");
-	a.deep(t(undefined), [undefined], "Undefined");
-	a.deep(t(null), [null], "Null");
-	a.deep(t(false), [false], "Boolean");
-	a.deep(t(-Infinity), [-Infinity], "Infinity");
-	a.deep(t(-0), [-0], "-0");
-	a.deep(t(+0), [+0], "+0");
-	a.deep(t(1), [1], "1");
-	a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args");
-	a.deep(t(+Infinity), [+Infinity], "+Infinity");
-	a.deep(t({ '0': 'a', '1': 'b', '2': 'c', length: 3 }),
-		[{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array like");
-	a.deep(t(undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
-		[undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy arguments");
-
-	a.h1("Null context");
-	a.deep(t.call(null, 'abc'), ['abc'], "String");
-	a.deep(t.call(null, undefined), [undefined], "Undefined");
-	a.deep(t.call(null, null), [null], "Null");
-	a.deep(t.call(null, false), [false], "Boolean");
-	a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity");
-	a.deep(t.call(null, -0), [-0], "-0");
-	a.deep(t.call(null, +0), [+0], "+0");
-	a.deep(t.call(null, 1), [1], "1");
-	a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric");
-	a.deep(t.call(null, +Infinity), [+Infinity], "+Infinity");
-	a.deep(t.call(null, { '0': 'a', '1': 'b', '2': 'c', length: 3 }),
-		[{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array-like");
-	a.deep(t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
-		[undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy");
-
-	a.h1("Other constructor context");
-	a.deep(t.call(Object, 1, 2, 3), { '0': 1, '1': 2, '2': 3, length: 3 }, "Many arguments");
-
-	testObject = Object(3);
-	testObject[0] = 1;
-	testObject[1] = 2;
-	testObject[2] = 3;
-	testObject.length = 3;
-	a.deep(t.call(Object, 1, 2, 3), testObject, "Test object");
-	a(t.call(Object).length, 0, "No arguments");
-	a.throws(function () { t.call(function () { return Object.freeze({}); }); }, TypeError,
-		"Frozen instance");
-
-	// Ensure no setters are called for the indexes
-	MyType = function () {};
-	defineProperty(MyType.prototype, '0', {
-		set: function (x) { throw new Error('Setter called: ' + x); }
-	});
-	a.deep(t.call(MyType, 'abc'), { '0': 'abc', length: 1 }, "Define, not set");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/to-array.js
deleted file mode 100644
index 4985b5eaee9769..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/to-array.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = [1, 2, 3];
-	a(t(o), o, "Array");
-	a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
-	a.deep(t((function () { return arguments; }(3, o, 'raz'))),
-		[3, o, 'raz'], "Arguments");
-	a.deep(t((function () { return arguments; }(3))), [3],
-		"Arguments with one numeric value");
-
-	a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/valid-array.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/valid-array.js
deleted file mode 100644
index 3732192d1bbd1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/array/valid-array.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(0); }, TypeError, "Number");
-	a.throws(function () { t(true); }, TypeError, "Boolean");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	a(t(x = []), x, "Array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/boolean/is-boolean.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/boolean/is-boolean.js
deleted file mode 100644
index 4e6b3cb73e4f3b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/boolean/is-boolean.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(false), true, "Boolean");
-	a(t(new Boolean(false)), true, "Boolean object");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-	a(t(/a/), false, "Regular expression");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/copy.js
deleted file mode 100644
index 767c5e16a4d053..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/copy.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = new Date(), o2;
-
-	o2 = t.call(o);
-	a.not(o, o2, "Different objects");
-	a.ok(o2 instanceof Date, "Instance of Date");
-	a(o.getTime(), o2.getTime(), "Same time");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/days-in-month.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/days-in-month.js
deleted file mode 100644
index 9ddba55f74ac40..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/days-in-month.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2001, 0, 1)), 31, "January");
-	a(t.call(new Date(2001, 1, 1)), 28, "February");
-	a(t.call(new Date(2000, 1, 1)), 29, "February (leap)");
-	a(t.call(new Date(2001, 2, 1)), 31, "March");
-	a(t.call(new Date(2001, 3, 1)), 30, "April");
-	a(t.call(new Date(2001, 4, 1)), 31, "May");
-	a(t.call(new Date(2001, 5, 1)), 30, "June");
-	a(t.call(new Date(2001, 6, 1)), 31, "July");
-	a(t.call(new Date(2001, 7, 1)), 31, "August");
-	a(t.call(new Date(2001, 8, 1)), 30, "September");
-	a(t.call(new Date(2001, 9, 1)), 31, "October");
-	a(t.call(new Date(2001, 10, 1)), 30, "November");
-	a(t.call(new Date(2001, 11, 1)), 31, "December");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-day.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-day.js
deleted file mode 100644
index d4f4a9087c059e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-day.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-month.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-month.js
deleted file mode 100644
index b4a81bef6d0850..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-month.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-year.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-year.js
deleted file mode 100644
index aae117e769b52c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/floor-year.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/format.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/format.js
deleted file mode 100644
index e68e4bf782ef30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/#/format.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var dt = new Date(2011, 2, 3, 3, 5, 5, 32);
-	a(t.call(dt, ' %Y.%y.%m.%d.%H.%M.%S.%L '), ' 2011.11.03.03.03.05.05.032 ');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/is-date.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/is-date.js
deleted file mode 100644
index 109093dfbe32f8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/is-date.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(new Date()), true, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/valid-date.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/valid-date.js
deleted file mode 100644
index 98787e40781687..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/date/valid-date.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var d = new Date();
-	a(t(d), d, "Date");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t({ valueOf: function () { return 20; } });
-	}, "Number object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/#/throw.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/#/throw.js
deleted file mode 100644
index 1213cfc3b12791..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/#/throw.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var e = new Error();
-	try {
-		t.call(e);
-	} catch (e2) {
-		a(e2, e);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/custom.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/custom.js
deleted file mode 100644
index d4ff500c9b30f2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/custom.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var T = t, err = new T('My Error', 'MY_ERROR', { errno: 123 });
-	a(err instanceof Error, true, "Instance of error");
-	a(err.constructor, Error, "Constructor");
-	a(err.name, 'Error', "Name");
-	a(String(err), 'Error: My Error', "String representation");
-	a(err.code, 'MY_ERROR', "Code");
-	a(err.errno, 123, "Errno");
-	a(typeof err.stack, 'string', "Stack trace");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/is-error.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/is-error.js
deleted file mode 100644
index f8b5e2000eb769..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/is-error.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), false, "Undefined");
-	a(t(1), false, "Primitive");
-	a(t({}), false, "Objectt");
-	a(t({ toString: function () { return '[object Error]'; } }), false,
-		"Fake error");
-	a(t(new Error()), true, "Error");
-	a(t(new EvalError()), true, "EvalError");
-	a(t(new RangeError()), true, "RangeError");
-	a(t(new ReferenceError()), true, "ReferenceError");
-	a(t(new SyntaxError()), true, "SyntaxError");
-	a(t(new TypeError()), true, "TypeError");
-	a(t(new URIError()), true, "URIError");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/valid-error.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/valid-error.js
deleted file mode 100644
index e04cdb33b7cdf4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/error/valid-error.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var e = new Error();
-	a(t(e), e, "Error");
-	a.throws(function () {
-		t({});
-	}, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/compose.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/compose.js
deleted file mode 100644
index 83de5e844ac87d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/compose.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var f = function (a, b) { return ['a', arguments.length, a, b]; }
-  , g = function (a) { return ['b', arguments.length].concat(a); }
-  , h = function (a) { return ['c', arguments.length].concat(a); };
-
-module.exports = function (t, a) {
-	a.deep(t.call(h, g, f)(1, 2), ['c', 1, 'b', 1, 'a', 2, 1, 2]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/copy.js
deleted file mode 100644
index 7a22e2f249276e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/copy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var foo = 'raz', bar = 'dwa'
-	  , fn = function marko(a, b) { return this + a + b + foo + bar; }
-	  , result, o = {};
-
-	fn.prototype = o;
-
-	fn.foo = 'raz';
-
-	result = t.call(fn);
-
-	a(result.length, fn.length, "Length");
-	a(result.name, fn.name, "Length");
-	a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Body");
-	a(result.prototype, fn.prototype, "Prototype");
-	a(result.foo, fn.foo, "Custom property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/curry.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/curry.js
deleted file mode 100644
index 18fb0389e79b26..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/curry.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array')
-
-  , f = function () { return toArray(arguments); };
-
-module.exports = function (t, a) {
-	var x, y = {}, z;
-	a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments");
-	x = t.call(f, 5, {});
-	a(x.length, 5, "Length #1");
-	z = x(1, 2);
-	a(z.length, 3, "Length #2");
-	z = z(3, 4);
-	a(z.length, 1, "Length #1");
-	a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments");
-	a.deep(x(8, 3)(y, 45)('raz', 6), [8, 3, y, 45, 'raz'], "Many arguments #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/lock.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/lock.js
deleted file mode 100644
index 44a12d7b56c748..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/lock.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(function () {
-		return arguments.length;
-	})(1, 2, 3), 0);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/not.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/not.js
deleted file mode 100644
index c0f5e9d4b989a5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/not.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var identity = require('../../../function/identity')
-  , noop     = require('../../../function/noop');
-
-module.exports = function (t, a) {
-	a(t.call(identity)(''), true, "Falsy");
-	a(t.call(noop)(), true, "Undefined");
-	a(t.call(identity)({}), false, "Any object");
-	a(t.call(identity)(true), false, "True");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/partial.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/partial.js
deleted file mode 100644
index bd00ce752f5202..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/partial.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array')
-
-  , f = function () { return toArray(arguments); };
-
-module.exports = function (t, a) {
-	a.deep(t.call(f, 1)(2, 3), [1, 2, 3]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/spread.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/spread.js
deleted file mode 100644
index b82dfecfe95045..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/spread.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var f = function (a, b) { return this[a] + this[b]; }
-  , o = { a: 3, b: 4 };
-
-module.exports = function (t, a) {
-	a(t.call(f).call(o, ['a', 'b']), 7);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/to-string-tokens.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/to-string-tokens.js
deleted file mode 100644
index 4c54d30354b405..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/#/to-string-tokens.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t.call(function (a, b) { return this[a] + this[b]; }),
-		{ args: 'a, b', body: ' return this[a] + this[b]; ' });
-	a.deep(t.call(function () {}),
-		{ args: '', body: '' });
-	a.deep(t.call(function (raz) {}),
-		{ args: 'raz', body: '' });
-	a.deep(t.call(function () { Object(); }),
-		{ args: '', body: ' Object(); ' });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/_define-length.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/_define-length.js
deleted file mode 100644
index 8f037e857eaa09..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/_define-length.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var foo = 'raz', bar = 'dwa'
-	  , fn = function (a, b) { return this + a + b + foo + bar; }
-	  , result;
-
-	result = t(fn, 3);
-	a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Content");
-	a(result.length, 3, "Length");
-	a(result.prototype, fn.prototype, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/constant.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/constant.js
deleted file mode 100644
index fda52aa43710c1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/constant.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = {};
-
-module.exports = function (t, a) {
-	a(t(o)(), o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/identity.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/identity.js
deleted file mode 100644
index 8013e2e5af1288..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/identity.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = {};
-
-module.exports = function (t, a) {
-	a(t(o), o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/invoke.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/invoke.js
deleted file mode 100644
index fcce4aaaaafb87..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/invoke.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var constant = require('../../function/constant')
-
-  , o = { b: constant('c') };
-
-module.exports = function (t, a) {
-	a(t('b')(o), 'c');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-arguments.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-arguments.js
deleted file mode 100644
index f8de8812a5035d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-arguments.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var args, dummy;
-	args = (function () { return arguments; }());
-	dummy = { '0': 1, '1': 2 };
-	Object.defineProperty(dummy, 'length', { value: 2 });
-	a(t(args), true, "Arguments");
-	a(t(dummy), false, "Dummy");
-	a(t([]), false, "Array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-function.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-function.js
deleted file mode 100644
index 83acc42f9a6637..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/is-function.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var o = { call: Function.prototype.call, apply: Function.prototype.apply };
-
-module.exports = function (t, a) {
-	a(t(function () {}), true, "Function is function");
-	a(t(o), false, "Plain object is not function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/noop.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/noop.js
deleted file mode 100644
index 4305c6fcfd51cd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t(1, 2, 3), 'undefined');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/pluck.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/pluck.js
deleted file mode 100644
index 5bf9583ad52b3e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/pluck.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = { foo: 'bar' };
-
-module.exports = function (t, a) {
-	a(t('foo')(o), o.foo);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/valid-function.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/valid-function.js
deleted file mode 100644
index 59b16233b37978..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/function/valid-function.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var f = function () {};
-	a(t(f), f, "Function");
-	f = new Function();
-	a(t(f), f, "Function");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t(/re/);
-	}, "RegExp");
-	a.throws(function () {
-		t({ call: function () { return 20; } });
-	}, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/global.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/global.js
deleted file mode 100644
index 1f452aefb09827..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/global.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.ok(t && typeof t === 'object');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/for-each.js
deleted file mode 100644
index 0fed8ad898990e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/for-each.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('es6-iterator/array')
-
-  , slice = Array.prototype.slice;
-
-module.exports = function (t, a) {
-	var i = 0, x = ['raz', 'dwa', 'trzy'], y = {};
-	t(x, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
-		a(this, y, "Array: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
-		a(this, y, "Arguments: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t({ 0: 'raz', 1: 'dwa', 2: 'trzy', length: 3 }, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#");
-		a(this, y, "Array-like: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(x = 'foo', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Regular String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	x = ['r', '💩', 'z'];
-	t('r💩z', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Unicode String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(new ArrayIterator(x), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
-		a(this, y, "Iterator: context:  " + (i++) + "#");
-	}, y);
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/is.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/is.js
deleted file mode 100644
index c0d2a43ebfe17c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/is.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a(t([]), true, "Array");
-	a(t(""), true, "String");
-	a(t((function () { return arguments; }())), true, "Arguments");
-	a(t({ length: 0 }), true, "List object");
-	a(t(function () {}), false, "Function");
-	a(t({}), false, "Plain object");
-	a(t(/raz/), false, "Regexp");
-	a(t(), false, "No argument");
-	a(t(null), false, "Null");
-	a(t(undefined), false, "Undefined");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), true, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate-object.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate-object.js
deleted file mode 100644
index da12529bc0368c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate-object.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), x, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate.js
deleted file mode 100644
index bcc2ad3d0aa1c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/iterable/validate.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a(t(''), '', "''");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), x, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_pack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_pack-ieee754.js
deleted file mode 100644
index 9041431d7769c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_pack-ieee754.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t(1.337, 8, 23), [63, 171, 34, 209]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_unpack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_unpack-ieee754.js
deleted file mode 100644
index ca30b8208dbb95..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/_unpack-ieee754.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/implement.js
deleted file mode 100644
index 01fb6d08224e2a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/acosh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/shim.js
deleted file mode 100644
index 3d710c7930d454..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/acosh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-1), NaN, "Negative");
-	a(t(0), NaN, "Zero");
-	a(t(0.5), NaN, "Below 1");
-	a(t(1), 0, "1");
-	a(t(2), 1.3169578969248166, "Other");
-	a(t(Infinity), Infinity, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/implement.js
deleted file mode 100644
index d1fceceee13449..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/asinh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/shim.js
deleted file mode 100644
index d9fbe49edc2d99..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/asinh/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(-2), -1.4436354751788103, "Negative");
-	a(t(2), 1.4436354751788103, "Positive");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/implement.js
deleted file mode 100644
index cba8fad83e4082..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/atanh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/shim.js
deleted file mode 100644
index a857b496686048..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/atanh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-2), NaN, "Less than -1");
-	a(t(2), NaN, "Greater than 1");
-	a(t(-1), -Infinity, "-1");
-	a(t(1), Infinity, "1");
-	a(t(0), 0, "Zero");
-	a(t(0.5), 0.5493061443340549, "Ohter");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/implement.js
deleted file mode 100644
index 374d4b383f5c5f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/cbrt/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/shim.js
deleted file mode 100644
index 43ab68b848f61a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cbrt/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(-1), -1, "-1");
-	a(t(1), 1, "1");
-	a(t(2), 1.2599210498948732, "Ohter");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/implement.js
deleted file mode 100644
index 44f8815526b7ec..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/clz32/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/shim.js
deleted file mode 100644
index a769b39b85b644..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/clz32/shim.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(1), 31, "1");
-	a(t(1000), 22, "1000");
-	a(t(), 32, "No arguments");
-	a(t(Infinity), 32, "Infinity");
-	a(t(-Infinity), 32, "-Infinity");
-	a(t("foo"), 32, "String");
-	a(t(true), 31, "Boolean");
-	a(t(3.5), 30, "Float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/implement.js
deleted file mode 100644
index f3c712b1dfc977..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/cosh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/shim.js
deleted file mode 100644
index 419c12367dbcd2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/cosh/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 1, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), Infinity, "-Infinity");
-	a(t(1), 1.5430806348152437, "1");
-	a(t(Number.MAX_VALUE), Infinity);
-	a(t(-Number.MAX_VALUE), Infinity);
-	a(t(Number.MIN_VALUE), 1);
-	a(t(-Number.MIN_VALUE), 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/implement.js
deleted file mode 100644
index c21296725dc07b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/expm1/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/shim.js
deleted file mode 100644
index 15f0e796ce565b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/expm1/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -1, "-Infinity");
-	a(t(1).toFixed(15), '1.718281828459045', "1");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/implement.js
deleted file mode 100644
index c909af7c300b22..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/fround/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/shim.js
deleted file mode 100644
index 4ef6d4ea9b199b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/fround/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(1.337), 1.3370000123977661, "1");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/implement.js
deleted file mode 100644
index 99466464c122bc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/hypot/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/shim.js
deleted file mode 100644
index 91d950a5d32899..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/hypot/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), 0, "No arguments");
-	a(t(0, -0, 0), 0, "Zeros");
-	a(t(4, NaN, Infinity), Infinity, "Infinity");
-	a(t(4, NaN, -Infinity), Infinity, "Infinity");
-	a(t(4, NaN, 34), NaN, "NaN");
-	a(t(3, 4), 5, "#1");
-	a(t(3, 4, 5), 7.0710678118654755, "#2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/implement.js
deleted file mode 100644
index 7b2a2a61653299..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/imul/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/shim.js
deleted file mode 100644
index a2ca7fe78321ce..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/imul/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), 0, "No arguments");
-	a(t(0, 0), 0, "Zeros");
-	a(t(2, 4), 8, "#1");
-	a(t(-1, 8), -8, "#2");
-	a(t(0xfffffffe, 5), -10, "#3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/implement.js
deleted file mode 100644
index 4b3b4a4569fb81..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log10/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/shim.js
deleted file mode 100644
index 5fa0d5be3af861..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log10/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-0.5), NaN, "Less than 0");
-	a(t(0), -Infinity, "0");
-	a(t(1), 0, "1");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(2), 0.3010299956639812, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/implement.js
deleted file mode 100644
index 5d269bd3eaf09b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log1p/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/shim.js
deleted file mode 100644
index d495ce0496b76d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log1p/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-1.5), NaN, "Less than -1");
-	a(t(-1), -Infinity, "-1");
-	a(t(0), 0, "0");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(1), 0.6931471805599453, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/implement.js
deleted file mode 100644
index 92b501ac72abed..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log2/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/shim.js
deleted file mode 100644
index faa9c32a8537ab..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/log2/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-0.5), NaN, "Less than 0");
-	a(t(0), -Infinity, "0");
-	a(t(1), 0, "1");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(3).toFixed(15), '1.584962500721156', "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/implement.js
deleted file mode 100644
index 5875c42d608eb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/sign/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/shim.js
deleted file mode 100644
index b6b89c15889dc4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sign/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var is = require('../../../object/is');
-
-module.exports = function (t, a) {
-	a(is(t(0), +0), true, "+0");
-	a(is(t(-0), -0), true, "-0");
-	a(t({}), NaN, true, "NaN");
-	a(t(-234234234), -1, "Negative");
-	a(t(234234234), 1, "Positive");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/implement.js
deleted file mode 100644
index e52089e4507156..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/sinh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/shim.js
deleted file mode 100644
index 4f63b59e735bf0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/sinh/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(1), 1.1752011936438014, "1");
-	a(t(Number.MAX_VALUE), Infinity);
-	a(t(-Number.MAX_VALUE), -Infinity);
-	a(t(Number.MIN_VALUE), 5e-324);
-	a(t(-Number.MIN_VALUE), -5e-324);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/implement.js
deleted file mode 100644
index a96bf193366b30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/tanh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/shim.js
deleted file mode 100644
index 2c67aaf47049fd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/tanh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), 1, "Infinity");
-	a(t(-Infinity), -1, "-Infinity");
-	a(t(1), 0.7615941559557649, "1");
-	a(t(Number.MAX_VALUE), 1);
-	a(t(-Number.MAX_VALUE), -1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/implement.js
deleted file mode 100644
index 1830e61f69794d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/trunc/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/shim.js
deleted file mode 100644
index 9e5eed7910e13c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/math/trunc/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var is = require('../../../object/is');
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(is(t(0.234), 0), true, "0");
-	a(is(t(-0.234), -0), true, "-0");
-	a(t(13.7), 13, "Positive #1");
-	a(t(12.3), 12, "Positive #2");
-	a(t(-12.3), -12, "Negative #1");
-	a(t(-14.7), -14, "Negative #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/#/pad.js
deleted file mode 100644
index e02082353348dc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/#/pad.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(78, 4), '0078');
-	a(t.call(65.12323, 4, 3), '0065.123', "Precision");
-	a(t.call(65, 4, 3), '0065.000', "Precision integer");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/implement.js
deleted file mode 100644
index 574da75dcebb7f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/epsilon/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/implement.js
deleted file mode 100644
index b35345fa6ee762..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-finite/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/shim.js
deleted file mode 100644
index 5205d1c2602520..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-finite/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/implement.js
deleted file mode 100644
index 127149ceeda9b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/shim.js
deleted file mode 100644
index 3f3985c3a05522..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-integer/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t(2.34), false, "Float");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/implement.js
deleted file mode 100644
index 2f01d6d30ad9f6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-nan/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/shim.js
deleted file mode 100644
index 425723e74b07b9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-nan/shim.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), false, "Number");
-	a(t({}), false, "Not numeric");
-	a(t(NaN), true, "NaN");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-number.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-number.js
deleted file mode 100644
index 275133476a61ff..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-number.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(0), true, "Zero");
-	a(t(NaN), true, "NaN");
-	a(t(Infinity), true, "Infinity");
-	a(t(12), true, "Number");
-	a(t(false), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new Number(2)), true, "Number object");
-	a(t('asdfaf'), false, "String");
-	a(t(''), false, "Empty String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js
deleted file mode 100644
index 33667e2e9afb60..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js
deleted file mode 100644
index 77e06674711795..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t(2.34), false, "Float");
-	a(t(Math.pow(2, 53)), false, "Too large");
-	a(t(Math.pow(2, 53) - 1), true, "Maximum");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js
deleted file mode 100644
index bef00ca413d3cb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/max-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js
deleted file mode 100644
index fa440248bf47a6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/min-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-integer.js
deleted file mode 100644
index ff326ba7a95bbb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-integer.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "NaN");
-	a(t(20), 20, "Positive integer");
-	a(t('-20'), -20, "String negative integer");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(15.343), 15, "Float");
-	a(t(-15.343), -15, "Negative float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-pos-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-pos-integer.js
deleted file mode 100644
index 2f3b4e674ecc4b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-pos-integer.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "NaN");
-	a(t(20), 20, "Positive integer");
-	a(t(-20), 0, "Negative integer");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(15.343), 15, "Float");
-	a(t(-15.343), 0, "Negative float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-uint32.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-uint32.js
deleted file mode 100644
index 00d05bdfe346d7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/number/to-uint32.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "Not numeric");
-	a(t(-4), 4294967292, "Negative");
-	a(t(133432), 133432, "Positive");
-	a(t(8589934592), 0, "Greater than maximum");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/_iterate.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/_iterate.js
deleted file mode 100644
index 179afed88ee845..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/_iterate.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { raz: 1, dwa: 2, trzy: 3 }
-	  , o2 = {}, o3 = {}, arr, i = -1;
-
-	t = t('forEach');
-	t(o, function (value, name, self, index) {
-		o2[name] = value;
-		a(index, ++i, "Index");
-		a(self, o, "Self");
-		a(this, o3, "Scope");
-	}, o3);
-	a.deep(o2, o);
-
-	arr = [];
-	o2 = {};
-	i = -1;
-	t(o, function (value, name, self, index) {
-		arr.push(value);
-		o2[name] = value;
-		a(index, ++i, "Index");
-		a(self, o, "Self");
-		a(this, o3, "Scope");
-	}, o3, function (a, b) {
-		return o[b] - o[a];
-	});
-	a.deep(o2, o, "Sort by Values: Content");
-	a.deep(arr, [3, 2, 1], "Sort by Values: Order");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/implement.js
deleted file mode 100644
index 40065594187cb9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../object/assign/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/shim.js
deleted file mode 100644
index 9afe5f658c45b7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/assign/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o1 = { a: 1, b: 2 }
-	  , o2 = { b: 3, c: 4 };
-
-	a(t(o1, o2), o1, "Returns self");
-	a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content");
-
-	a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/clear.js
deleted file mode 100644
index bfc08cc208420b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/clear.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isEmpty = require('../../object/is-empty');
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t(x), x, "Empty: Returns same object");
-	a(isEmpty(x), true, "Empty: Not changed");
-	x.foo = 'raz';
-	x.bar = 'dwa';
-	a(t(x), x, "Same object");
-	a(isEmpty(x), true, "Emptied");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compact.js
deleted file mode 100644
index 9c9064c7886445..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compact.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {}, z;
-	z = t(x);
-	a.not(z, x, "Returns different object");
-	a.deep(z, {}, "Empty on empty");
-
-	x = { foo: 'bar', a: 0, b: false, c: '', d: '0', e: null, bar: y,
-		elo: undefined };
-	z = t(x);
-	a.deep(z, { foo: 'bar', a: 0, b: false, c: '', d: '0', bar: y },
-		"Cleared null values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compare.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compare.js
deleted file mode 100644
index cb9424109c334b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/compare.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var d = new Date();
-
-	a.ok(t(12, 3) > 0, "Numbers");
-	a.ok(t(2, 13) < 0, "Numbers #2");
-	a.ok(t("aaa", "aa") > 0, "Strings");
-	a.ok(t("aa", "ab") < 0, "Strings #2");
-	a(t("aa", "aa"), 0, "Strings same");
-	a(t(d, new Date(d.getTime())), 0, "Same date");
-	a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy-deep.js
deleted file mode 100644
index a4023bc8ac4bf6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy-deep.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var stringify = JSON.stringify;
-
-module.exports = function (t, a) {
-	var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
-	  , no = t(o);
-
-	a.not(no, o, "Return different object");
-	a(stringify(no), stringify(o), "Match properties and values");
-
-	o = { foo: 'bar', raz: { dwa: 'dwa',
-		trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
-		'dziewięć': function () { } }, 'dziesięć': 10 };
-	o.raz.rec = o;
-
-	no = t(o);
-	a.not(o.raz, no.raz, "Deep");
-	a.not(o.raz.trzy, no.raz.trzy, "Deep #2");
-	a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content");
-	a(no.raz.rec, no, "Recursive");
-	a.not(o.raz.osiem, no.raz.osiem, "Empty object");
-	a(o.raz['dziewięć'], no.raz['dziewięć'], "Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy.js
deleted file mode 100644
index 2f222ef809c6d7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var stringify = JSON.stringify;
-
-module.exports = function (t, a) {
-	var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
-	  , no = t(o);
-
-	a.not(no, o, "Return different object");
-	a(stringify(no), stringify(o), "Match properties and values");
-
-	o = { foo: 'bar', raz: { dwa: 'dwa',
-		trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
-		'dziewięć': function () { } }, 'dziesięć': 10 };
-	o.raz.rec = o;
-
-	no = t(o);
-	a(o.raz, no.raz, "Shallow");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/count.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/count.js
deleted file mode 100644
index 494f4f163515eb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/count.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "Empty");
-	a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4,
-		"Some properties");
-	a(t(Object.defineProperties({}, {
-		raz: { value: 'raz' },
-		dwa: { value: 'dwa', enumerable: true }
-	})), 1, "Some properties hidden");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/create.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/create.js
deleted file mode 100644
index 8b7be214136d2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/create.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('../../object/set-prototype-of')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, obj;
-
-	a(getPrototypeOf(t(x)), x, "Normal object");
-	a(getPrototypeOf(t(null)),
-		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");
-
-	a.h1("Properties");
-	a.h2("Normal object");
-	a(getPrototypeOf(obj = t(x, { foo: { value: 'bar' } })), x, "Prototype");
-	a(obj.foo, 'bar', "Property");
-	a.h2("Null");
-	a(getPrototypeOf(obj = t(null, { foo: { value: 'bar2' } })),
-		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype");
-	a(obj.foo, 'bar2', "Property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/eq.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/eq.js
deleted file mode 100644
index 02b3f0027cbf82..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/eq.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = {};
-	a(t(o, {}), false, "Different objects");
-	a(t(o, o), true, "Same objects");
-	a(t('1', '1'), true, "Same primitive");
-	a(t('1', 1), false, "Different primitive types");
-	a(t(NaN, NaN), true, "NaN");
-	a(t(0, 0), true, "0,0");
-	a(t(0, -0), true, "0,-0");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/every.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/every.js
deleted file mode 100644
index 07d5bbbd61f7af..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/every.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var o = { 1: 1, 2: 2, 3: 3 };
-
-module.exports = function (t, a) {
-	var o2 = {};
-	t(o, function (value, name) {
-		o2[name] = value;
-		return true;
-	});
-	a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
-
-	a(t(o, function () {
-		return true;
-	}), true, "Succeeds");
-
-	a(t(o, function () {
-		return false;
-	}), false, "Fails");
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/filter.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/filter.js
deleted file mode 100644
index 7307da8640fcd1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/filter.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 },
-		function (value) { return Boolean(value % 2); }), { 1: 1, 3: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/first-key.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/first-key.js
deleted file mode 100644
index 8169cd235344d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/first-key.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = Object.create(null);
-	a(t(x), null, "Normal: Empty");
-	a(t(y), null, "Null extension: Empty");
-	x.foo = 'raz';
-	x.bar = 343;
-	a(['foo', 'bar'].indexOf(t(x)) !== -1, true, "Normal");
-	y.elo = 'foo';
-	y.mar = 'wew';
-	a(['elo', 'mar'].indexOf(t(y)) !== -1, true, "Null extension");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/flatten.js
deleted file mode 100644
index ca342eab9c8ae4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/flatten.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }),
-		{ aa: 1, ab: 2, ba: 3, bb: 4 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/for-each.js
deleted file mode 100644
index 8690d1e82179aa..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/for-each.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { raz: 1, dwa: 2, trzy: 3 }
-	  , o2 = {};
-	a(t(o, function (value, name) {
-		o2[name] = value;
-	}), undefined, "Return");
-	a.deep(o2, o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/get-property-names.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/get-property-names.js
deleted file mode 100644
index b91c3dd50e7bbf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/get-property-names.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { first: 1, second: 4 }, r1, r2;
-	o = Object.create(o, {
-		third: { value: null }
-	});
-	o.first = 2;
-	o = Object.create(o);
-	o.fourth = 3;
-
-	r1 = t(o);
-	r1.sort();
-	r2 = ['first', 'second', 'third', 'fourth']
-		.concat(Object.getOwnPropertyNames(Object.prototype));
-	r2.sort();
-	a.deep(r1, r2);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-array-like.js
deleted file mode 100644
index 6295973ca81acd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-array-like.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t([]), true, "Array");
-	a(t(""), true, "String");
-	a(t((function () { return arguments; }())), true, "Arguments");
-	a(t({ length: 0 }), true, "List object");
-	a(t(function () {}), false, "Function");
-	a(t({}), false, "Plain object");
-	a(t(/raz/), false, "Regexp");
-	a(t(), false, "No argument");
-	a(t(null), false, "Null");
-	a(t(undefined), false, "Undefined");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-callable.js
deleted file mode 100644
index 625e221d2c3811..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-callable.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(function () {}), true, "Function");
-	a(t({}), false, "Object");
-	a(t(), false, "Undefined");
-	a(t(null), false, "Null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy-deep.js
deleted file mode 100644
index 4f14cbbe8108b2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy-deep.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x, y;
-
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Different property value");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
-		"Property only in source");
-	a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Property only in target");
-
-	a(t("raz", "dwa"), false, "String: diff");
-	a(t("raz", "raz"), true, "String: same");
-	a(t("32", 32), false, "String & Number");
-
-	a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
-	a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
-	a(t(['foo'], ['one']), false, "Array: One value comparision");
-
-	x = { foo: { bar: { mar: {} } } };
-	y = { foo: { bar: { mar: {} } } };
-	a(t(x, y), true, "Deep");
-
-	a(t({ foo: { bar: { mar: 'foo' } } }, { foo: { bar: { mar: {} } } }),
-		false, "Deep: false");
-
-	x = { foo: { bar: { mar: {} } } };
-	x.rec = { foo: x };
-
-	y = { foo: { bar: { mar: {} } } };
-	y.rec = { foo: x };
-
-	a(t(x, y), true, "Object: Infinite Recursion: Same #1");
-
-	x.rec.foo = y;
-	a(t(x, y), true, "Object: Infinite Recursion: Same #2");
-
-	x.rec.foo = x;
-	y.rec.foo = y;
-	a(t(x, y), true, "Object: Infinite Recursion: Same #3");
-
-	y.foo.bar.mar = 'raz';
-	a(t(x, y), false, "Object: Infinite Recursion: Diff");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy.js
deleted file mode 100644
index 394e2ed94c09f0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-copy.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Different property value");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
-		"Property only in source");
-	a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Property only in target");
-
-	a(t("raz", "dwa"), false, "String: diff");
-	a(t("raz", "raz"), true, "String: same");
-	a(t("32", 32), false, "String & Number");
-
-	a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
-	a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-empty.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-empty.js
deleted file mode 100644
index b560c2c36b0d4b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-empty.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), true, "Empty");
-	a(t({ 1: 1 }), false, "Not empty");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-object.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-object.js
deleted file mode 100644
index 72c8aa6daf4a3a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-object.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(null), false, "Null");
-	a(t(new Date()), true, "Date");
-	a(t(new String('raz')), true, "String object");
-	a(t({}), true, "Plain object");
-	a(t(/a/), true, "Regular expression");
-	a(t(function () {}), true, "Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-plain-object.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-plain-object.js
deleted file mode 100644
index e988829d558ad0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is-plain-object.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), true, "Empty {} is plain object");
-	a(t({ a: true }), true, "{} with property is plain object");
-	a(t({ prototype: 1, constructor: 2, __proto__:  3 }), true,
-		"{} with any property keys is plain object");
-	a(t(null), false, "Null is not plain object");
-	a(t('string'), false, "Primitive is not plain object");
-	a(t(function () {}), false, "Function is not plain object");
-	a(t(Object.create({})), false,
-		"Object whose prototype is not Object.prototype is not plain object");
-	a(t(Object.create(Object.prototype)), true,
-		"Object whose prototype is Object.prototype is plain object");
-	a(t(Object.create(null)), true,
-		"Object whose prototype is null is plain object");
-	a(t(Object.prototype), false, "Object.prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is.js
deleted file mode 100644
index 4f8948cbf344e1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/is.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = {};
-	a(t(o, {}), false, "Different objects");
-	a(t(o, o), true, "Same objects");
-	a(t('1', '1'), true, "Same primitive");
-	a(t('1', 1), false, "Different primitive types");
-	a(t(NaN, NaN), true, "NaN");
-	a(t(0, 0), true, "0,0");
-	a(t(0, -0), false, "0,-0");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/key-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/key-of.js
deleted file mode 100644
index a9225a048c5c91..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/key-of.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {}
-	  , o = { foo: 'bar', raz: x, trzy: 'cztery', five: '6' };
-
-	a(t(o, 'bar'), 'foo', "First property");
-	a(t(o, 6), null, "Primitive that's not there");
-	a(t(o, x), 'raz', "Object");
-	a(t(o, y), null, "Object that's not there");
-	a(t(o, '6'), 'five', "Last property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/implement.js
deleted file mode 100644
index 179e1e5612ea8f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../object/keys/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/shim.js
deleted file mode 100644
index ed29eebcd751f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/keys/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ foo: 'bar' }), ['foo'], "Object");
-	a.deep(t('raz'), ['0', '1', '2'], "Primitive");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Undefined");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map-keys.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map-keys.js
deleted file mode 100644
index be84825b1be711..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map-keys.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) {
-		return 'x' + (key + value);
-	}), { x11: 1, x22: 2, x33: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map.js
deleted file mode 100644
index f9cc09c01b3933..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/map.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var obj = { 1: 1, 2: 2, 3: 3 };
-	a.deep(t(obj, function (value, key, context) {
-		a(context, obj, "Context argument");
-		return (value + 1) + key;
-	}), { 1: '21', 2: '32', 3: '43' });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin-prototypes.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin-prototypes.js
deleted file mode 100644
index d1c727a95a7371..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin-prototypes.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o, o1, o2, x, y = {}, z = {};
-	o = { inherited: true, visible: 23 };
-	o1 = Object.create(o);
-	o1.visible = z;
-	o1.nonremovable = 'raz';
-	Object.defineProperty(o1, 'hidden', { value: 'hidden' });
-
-	o2 = Object.defineProperties({}, { nonremovable: { value: y } });
-	o2.other = 'other';
-
-	try { t(o2, o1); } catch (ignore) {}
-
-	a(o2.visible, z, "Enumerable");
-	a(o1.hidden, 'hidden', "Not Enumerable");
-	a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(o2.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(o2.inherited, true, "Extend deep");
-
-	a(o2.nonremovable, y, "Do not overwrite non configurable");
-	a(o2.other, 'other', "Own kept");
-
-	x = {};
-	t(x, o2);
-	try { t(x, o1); } catch (ignore) {}
-
-	a(x.visible, z, "Enumerable");
-	a(x.hidden, 'hidden', "Not Enumerable");
-	a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(x.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(x.inherited, true, "Extend deep");
-
-	a(x.nonremovable, y, "Ignored non configurable");
-	a(x.other, 'other', "Other");
-
-	x.visible = 3;
-	a(x.visible, 3, "Writable is writable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		x.hidden = 3;
-	}, "Not writable is not writable");
-
-	x = {};
-	t(x, o1);
-	delete x.visible;
-	a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		delete x.hidden;
-	}, "Not configurable is not configurable");
-
-	x = Object.defineProperty({}, 'foo',
-		{ configurable: false, writable: true, enumerable: false, value: 'bar' });
-
-	try { t(x, { foo: 'lorem' }); } catch (ignore) {}
-	a(x.foo, 'bar', "Writable, not enumerable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin.js
deleted file mode 100644
index 866005b03df29b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/mixin.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o, o1, o2, x, y = {}, z = {};
-	o = { inherited: true };
-	o1 = Object.create(o);
-	o1.visible = z;
-	o1.nonremovable = 'raz';
-	Object.defineProperty(o1, 'hidden', { value: 'hidden' });
-
-	o2 = Object.defineProperties({}, { nonremovable: { value: y } });
-	o2.other = 'other';
-
-	try { t(o2, o1); } catch (ignore) {}
-
-	a(o2.visible, z, "Enumerable");
-	a(o1.hidden, 'hidden', "Not Enumerable");
-	a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(o2.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(o2.hasOwnProperty('inherited'), false, "Extend only own");
-	a(o2.inherited, undefined, "Extend ony own: value");
-
-	a(o2.nonremovable, y, "Do not overwrite non configurable");
-	a(o2.other, 'other', "Own kept");
-
-	x = {};
-	t(x, o2);
-	try { t(x, o1); } catch (ignore) {}
-
-	a(x.visible, z, "Enumerable");
-	a(x.hidden, 'hidden', "Not Enumerable");
-	a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(x.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(x.hasOwnProperty('inherited'), false, "Extend only own");
-	a(x.inherited, undefined, "Extend ony own: value");
-
-	a(x.nonremovable, y, "Ignored non configurable");
-	a(x.other, 'other', "Other");
-
-	x.visible = 3;
-	a(x.visible, 3, "Writable is writable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		x.hidden = 3;
-	}, "Not writable is not writable");
-
-	x = {};
-	t(x, o1);
-	delete x.visible;
-	a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		delete x.hidden;
-	}, "Not configurable is not configurable");
-
-	x = Object.defineProperty({}, 'foo',
-		{ configurable: false, writable: true, enumerable: false, value: 'bar' });
-
-	try { t(x, { foo: 'lorem' }); } catch (ignore) {}
-	a(x.foo, 'bar', "Writable, not enumerable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/normalize-options.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/normalize-options.js
deleted file mode 100644
index 0d2d4da04a53b1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/normalize-options.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-var create = Object.create, defineProperty = Object.defineProperty;
-
-module.exports = function (t, a) {
-	var x = { foo: 'raz', bar: 'dwa' }, y;
-	y = t(x);
-	a.not(y, x, "Returns copy");
-	a.deep(y, x, "Plain");
-
-	x = { raz: 'one', dwa: 'two' };
-	defineProperty(x, 'get', {
-		configurable: true,
-		enumerable: true,
-		get: function () { return this.dwa; }
-	});
-	x = create(x);
-	x.trzy = 'three';
-	x.cztery = 'four';
-	x = create(x);
-	x.dwa = 'two!';
-	x.trzy = 'three!';
-	x.piec = 'five';
-	x.szesc = 'six';
-
-	a.deep(t(x), { raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
-		piec: 'five', szesc: 'six', get: 'two!' }, "Deep object");
-
-	a.deep(t({ marko: 'raz', raz: 'foo' }, x, { szesc: 'elo', siedem: 'bibg' }),
-		{ marko: 'raz', raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
-			piec: 'five', szesc: 'elo', siedem: 'bibg', get: 'two!' }, "Multiple options");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/primitive-set.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/primitive-set.js
deleted file mode 100644
index 839857eab3dd85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/primitive-set.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var getPropertyNames = require('../../object/get-property-names')
-  , isPlainObject    = require('../../object/is-plain-object');
-
-module.exports = function (t, a) {
-	var x = t();
-	a(isPlainObject(x), true, "Plain object");
-	a.deep(getPropertyNames(x), [], "No properties");
-	x.foo = 'bar';
-	a.deep(getPropertyNames(x), ['foo'], "Extensible");
-
-	a.deep(t('raz', 'dwa', 3), { raz: true, dwa: true, 3: true },
-		"Arguments handling");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/safe-traverse.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/safe-traverse.js
deleted file mode 100644
index d30cdefe68b8b6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/safe-traverse.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var obj = { foo: { bar: { lorem: 12  } } };
-	a(t(obj), obj, "No props");
-	a(t(obj, 'foo'), obj.foo, "One");
-	a(t(obj, 'raz'), undefined, "One: Fail");
-	a(t(obj, 'foo', 'bar'), obj.foo.bar, "Two");
-	a(t(obj, 'dsd', 'raz'), undefined, "Two: Fail #1");
-	a(t(obj, 'foo', 'raz'), undefined, "Two: Fail #2");
-	a(t(obj, 'foo', 'bar', 'lorem'), obj.foo.bar.lorem, "Three");
-	a(t(obj, 'dsd', 'raz', 'fef'), undefined, "Three: Fail #1");
-	a(t(obj, 'foo', 'raz', 'asdf'), undefined, "Three: Fail #2");
-	a(t(obj, 'foo', 'bar', 'asd'), undefined, "Three: Fail #3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/serialize.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/serialize.js
deleted file mode 100644
index 43eed6a8616f9a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/serialize.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var fn = function (raz, dwa) { return raz + dwa; };
-	a(t(), 'undefined', "Undefined");
-	a(t(null), 'null', "Null");
-	a(t(null), 'null', "Null");
-	a(t('raz'), '"raz"', "String");
-	a(t('raz"ddwa\ntrzy'), '"raz\\"ddwa\\ntrzy"', "String with escape");
-	a(t(false), 'false', "Booelean");
-	a(t(fn), String(fn), "Function");
-
-	a(t(/raz-dwa/g), '/raz-dwa/g', "RegExp");
-	a(t(new Date(1234567)), 'new Date(1234567)', "Date");
-	a(t([]), '[]', "Empty array");
-	a(t([undefined, false, null, 'raz"ddwa\ntrzy', fn, /raz/g, new Date(1234567), ['foo']]),
-		'[undefined,false,null,"raz\\"ddwa\\ntrzy",' + String(fn) +
-		',/raz/g,new Date(1234567),["foo"]]', "Rich Array");
-	a(t({}), '{}', "Empty object");
-	a(t({ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', piec: fn, szesc: /raz/g,
-		siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } }),
-		'{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy","piec":' + String(fn) +
-		',"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
-		'"dziewiec":{"foo":"bar","dwa":343}}', "Rich object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js
deleted file mode 100644
index 30b2ac4b96ba2e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var create        = require('../../../object/create')
-  , isImplemented = require('../../../object/set-prototype-of/is-implemented');
-
-module.exports = function (a) { a(isImplemented(create), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/index.js
deleted file mode 100644
index aec2605cc2661a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var create = require('../../../object/create')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-
-	if (t === null) return;
-	a(t(x, y), x, "Return self object");
-	a(getPrototypeOf(x), y, "Object");
-	a.throws(function () { t(x); }, TypeError, "Undefined");
-	a.throws(function () { t('foo'); }, TypeError, "Primitive");
-	a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
-	x = create(null);
-	a.h1("Change null prototype");
-	a(t(x, y), x, "Result");
-	a(getPrototypeOf(x), y, "Prototype");
-	a.h1("Set null prototype");
-	a(t(y, null), y, "Result");
-	a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js
deleted file mode 100644
index aec2605cc2661a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var create = require('../../../object/create')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-
-	if (t === null) return;
-	a(t(x, y), x, "Return self object");
-	a(getPrototypeOf(x), y, "Object");
-	a.throws(function () { t(x); }, TypeError, "Undefined");
-	a.throws(function () { t('foo'); }, TypeError, "Primitive");
-	a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
-	x = create(null);
-	a.h1("Change null prototype");
-	a(t(x, y), x, "Result");
-	a(getPrototypeOf(x), y, "Prototype");
-	a.h1("Set null prototype");
-	a(t(y, null), y, "Result");
-	a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/some.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/some.js
deleted file mode 100644
index 490431e7acd543..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/some.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var o = { 1: 1, 2: 2, 3: 3 };
-
-module.exports = function (t, a) {
-	var o2 = {}, i = 0;
-	t(o, function (value, name) {
-		o2[name] = value;
-		return false;
-	});
-	a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
-
-	a(t(o, function () {
-		++i;
-		return true;
-	}), true, "Succeeds");
-	a(i, 1, "Stops iteration after condition is met");
-
-	a(t(o, function () {
-		return false;
-	}), false, "Fails");
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/to-array.js
deleted file mode 100644
index 1f4beef7eae835..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/to-array.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { 1: 1, 2: 2, 3: 3 }, o1 = {}
-	  , o2 = t(o, function (value, name, self) {
-		a(self, o, "Self");
-		a(this, o1, "Scope");
-		return value + Number(name);
-	}, o1);
-	a.deep(o2, [2, 4, 6]);
-
-	t(o).sort().forEach(function (item) {
-		a.deep(item, [item[0], o[item[0]]], "Default");
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/unserialize.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/unserialize.js
deleted file mode 100644
index 405eef112ff76e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/unserialize.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var fn = function (raz, dwa) { return raz + dwa; };
-	a(t('undefined'), undefined, "Undefined");
-	a(t('null'), null, "Null");
-	a(t('"raz"'), 'raz', "String");
-	a(t('"raz\\"ddwa\\ntrzy"'), 'raz"ddwa\ntrzy', "String with escape");
-	a(t('false'), false, "Booelean");
-	a(String(t(String(fn))), String(fn), "Function");
-
-	a.deep(t('/raz-dwa/g'), /raz-dwa/g, "RegExp");
-	a.deep(t('new Date(1234567)'), new Date(1234567), "Date");
-	a.deep(t('[]'), [], "Empty array");
-	a.deep(t('[undefined,false,null,"raz\\"ddwa\\ntrzy",/raz/g,new Date(1234567),["foo"]]'),
-		[undefined, false, null, 'raz"ddwa\ntrzy', /raz/g, new Date(1234567), ['foo']], "Rich Array");
-	a.deep(t('{}'), {}, "Empty object");
-	a.deep(t('{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy",' +
-		'"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
-		'"dziewiec":{"foo":"bar","dwa":343}}'),
-		{ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', szesc: /raz/g,
-			siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } },
-		"Rich object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-callable.js
deleted file mode 100644
index b40540b6ba61b0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-callable.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var f = function () {};
-	a(t(f), f, "Function");
-	a.throws(function () {
-		t({});
-	}, "Not Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-object.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-object.js
deleted file mode 100644
index eaa8e7bcb364b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-object.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "''");
-	a(t(x = {}), x, "Object");
-	a(t(x = function () {}), x, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-	a(t(x = new Date()), x, "Date");
-
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-value.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-value.js
deleted file mode 100644
index f1eeafa9778863..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/valid-value.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var numIsNaN = require('../../number/is-nan');
-
-module.exports = function (t, a) {
-	var x;
-	a(t(0), 0, "0");
-	a(t(false), false, "false");
-	a(t(''), '', "''");
-	a(numIsNaN(t(NaN)), true, "NaN");
-	a(t(x = {}), x, "{}");
-
-	a.throws(function () {
-		t();
-	}, "Undefined");
-	a.throws(function () {
-		t(null);
-	}, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like-object.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like-object.js
deleted file mode 100644
index 2f3e31b442ebcb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like-object.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like.js
deleted file mode 100644
index 53bd11249e3d04..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-array-like.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a(t(''), '', "''");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js
deleted file mode 100644
index ae9bd17a59a028..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a(t(0), "0");
-	a(t(false), "false");
-	a(t(''), "");
-	a(t({}), String({}), "Object");
-	a(t(x = function () {}), String(x), "Function");
-	a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
-	a(t(x = new Date()), String(x), "Date");
-
-	a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable.js
deleted file mode 100644
index 4a46bb521900db..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/validate-stringifiable.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t(), 'undefined', "Undefined");
-	a(t(null), 'null', "Null");
-	a(t(0), "0");
-	a(t(false), "false");
-	a(t(''), "");
-	a(t({}), String({}), "Object");
-	a(t(x = function () {}), String(x), "Function");
-	a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
-	a(t(x = new Date()), String(x), "Date");
-
-	a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/index.js
deleted file mode 100644
index ca2bd650615889..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var indexTest = require('tad/lib/utils/index-test')
-
-  , path = require('path').resolve(__dirname, '../../../reg-exp/#');
-
-module.exports = function (t, a, d) {
-	indexTest(indexTest.readDir(path).aside(function (data) {
-		delete data.sticky;
-		delete data.unicode;
-	}))(t, a, d);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
deleted file mode 100644
index e154ac2916557f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var re;
-	a(t.call(/raz/), false, "Normal");
-	a(t.call(/raz/g), false, "Global");
-	try { re = new RegExp('raz', 'y'); } catch (ignore) {}
-	if (!re) return;
-	a(t.call(re), true, "Sticky");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
deleted file mode 100644
index 2ffb9e869bd6a3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var re;
-	a(t.call(/raz/), false, "Normal");
-	a(t.call(/raz/g), false, "Global");
-	try { re = new RegExp('raz', 'u'); } catch (ignore) {}
-	if (!re) return;
-	a(t.call(re), true, "Unicode");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js
deleted file mode 100644
index 89825a45f6148d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/match/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js
deleted file mode 100644
index 5249139fff2277..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var result = ['foo'];
-	result.index = 0;
-	result.input = 'foobar';
-	a.deep(t.call(/foo/, 'foobar'), result);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
deleted file mode 100644
index c32b23a6d03e79..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/replace/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
deleted file mode 100644
index 2b378fd594e2ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(/foo/, 'foobar', 'mar'), 'marbar');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js
deleted file mode 100644
index ff1b8087f2c697..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/search/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js
deleted file mode 100644
index 596bcdb92ed203..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(/foo/, 'barfoo'), 3);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js
deleted file mode 100644
index 1cee441806c065..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/split/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js
deleted file mode 100644
index 6a95cd03d6ce68..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t.call(/\|/, 'bar|foo'), ['bar', 'foo']);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
deleted file mode 100644
index d94e7b98d8fe46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/sticky/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
deleted file mode 100644
index 9b1aa0f2ab992d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/unicode/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/escape.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/escape.js
deleted file mode 100644
index 5b00f67f28ce45..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/escape.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var str = "(?:^te|er)s{2}t\\[raz]+$";
-	a(RegExp('^' + t(str) + '$').test(str), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
deleted file mode 100644
index 785ca28c2ecb2c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-	a(t(/a/), true, "Regular expression");
-	a(t(new RegExp('a')), true, "Regular expression via constructor");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
deleted file mode 100644
index cd12cf126a609a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var r = /raz/;
-	a(t(r), r, "Direct");
-	r = new RegExp('foo');
-	a(t(r), r, "Constructor");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t(function () {});
-	}, "Function");
-	a.throws(function () {
-		t({ exec: function () { return 20; } });
-	}, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js
deleted file mode 100644
index 09bf3361acd6a2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/@@iterator/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js
deleted file mode 100644
index 3b0e0b7547ece9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var it = t.call('r💩z');
-	a.deep(it.next(), { done: false, value: 'r' }, "#1");
-	a.deep(it.next(), { done: false, value: '💩' }, "#2");
-	a.deep(it.next(), { done: false, value: 'z' }, "#3");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/at.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/at.js
deleted file mode 100644
index 2447a9f64d5d83..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/at.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// See tests at https://github.com/mathiasbynens/String.prototype.at
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.length, 1, "Length");
-
-	a.h1("BMP");
-	a(t.call('abc\uD834\uDF06def', -Infinity), '', "-Infinity");
-	a(t.call('abc\uD834\uDF06def', -1), '', "-1");
-	a(t.call('abc\uD834\uDF06def', -0), 'a', "-0");
-	a(t.call('abc\uD834\uDF06def', +0), 'a', "+0");
-	a(t.call('abc\uD834\uDF06def', 1), 'b', "1");
-	a(t.call('abc\uD834\uDF06def', 3), '\uD834\uDF06', "3");
-	a(t.call('abc\uD834\uDF06def', 4), '\uDF06', "4");
-	a(t.call('abc\uD834\uDF06def', 5), 'd', "5");
-	a(t.call('abc\uD834\uDF06def', 42), '', "42");
-	a(t.call('abc\uD834\uDF06def', +Infinity), '', "+Infinity");
-	a(t.call('abc\uD834\uDF06def', null), 'a', "null");
-	a(t.call('abc\uD834\uDF06def', undefined), 'a', "undefined");
-	a(t.call('abc\uD834\uDF06def'), 'a', "No argument");
-	a(t.call('abc\uD834\uDF06def', false), 'a', "false");
-	a(t.call('abc\uD834\uDF06def', NaN), 'a', "NaN");
-	a(t.call('abc\uD834\uDF06def', ''), 'a', "Empty string");
-	a(t.call('abc\uD834\uDF06def', '_'), 'a', "_");
-	a(t.call('abc\uD834\uDF06def', '1'), 'b', "'1'");
-	a(t.call('abc\uD834\uDF06def', []), 'a', "[]");
-	a(t.call('abc\uD834\uDF06def', {}), 'a', "{}");
-	a(t.call('abc\uD834\uDF06def', -0.9), 'a', "-0.9");
-	a(t.call('abc\uD834\uDF06def', 1.9), 'b', "1.9");
-	a(t.call('abc\uD834\uDF06def', 7.9), 'f', "7.9");
-	a(t.call('abc\uD834\uDF06def', Math.pow(2, 32)), '', "Big number");
-
-	a.h1("Astral symbol");
-	a(t.call('\uD834\uDF06def', -Infinity), '', "-Infinity");
-	a(t.call('\uD834\uDF06def', -1), '', "-1");
-	a(t.call('\uD834\uDF06def', -0), '\uD834\uDF06', "-0");
-	a(t.call('\uD834\uDF06def', +0), '\uD834\uDF06', "+0");
-	a(t.call('\uD834\uDF06def', 1), '\uDF06', "1");
-	a(t.call('\uD834\uDF06def', 2), 'd', "2");
-	a(t.call('\uD834\uDF06def', 3), 'e', "3");
-	a(t.call('\uD834\uDF06def', 4), 'f', "4");
-	a(t.call('\uD834\uDF06def', 42), '', "42");
-	a(t.call('\uD834\uDF06def', +Infinity), '', "+Infinity");
-	a(t.call('\uD834\uDF06def', null), '\uD834\uDF06', "null");
-	a(t.call('\uD834\uDF06def', undefined), '\uD834\uDF06', "undefined");
-	a(t.call('\uD834\uDF06def'), '\uD834\uDF06', "No arguments");
-	a(t.call('\uD834\uDF06def', false), '\uD834\uDF06', "false");
-	a(t.call('\uD834\uDF06def', NaN), '\uD834\uDF06', "NaN");
-	a(t.call('\uD834\uDF06def', ''), '\uD834\uDF06', "Empty string");
-	a(t.call('\uD834\uDF06def', '_'), '\uD834\uDF06', "_");
-	a(t.call('\uD834\uDF06def', '1'), '\uDF06', "'1'");
-
-	a.h1("Lone high surrogates");
-	a(t.call('\uD834abc', -Infinity), '', "-Infinity");
-	a(t.call('\uD834abc', -1), '',  "-1");
-	a(t.call('\uD834abc', -0), '\uD834', "-0");
-	a(t.call('\uD834abc', +0), '\uD834', "+0");
-	a(t.call('\uD834abc', 1), 'a', "1");
-	a(t.call('\uD834abc', 42), '', "42");
-	a(t.call('\uD834abc', +Infinity), '', "Infinity");
-	a(t.call('\uD834abc', null), '\uD834', "null");
-	a(t.call('\uD834abc', undefined), '\uD834', "undefined");
-	a(t.call('\uD834abc'), '\uD834', "No arguments");
-	a(t.call('\uD834abc', false), '\uD834', "false");
-	a(t.call('\uD834abc', NaN), '\uD834', "NaN");
-	a(t.call('\uD834abc', ''), '\uD834', "Empty string");
-	a(t.call('\uD834abc', '_'), '\uD834', "_");
-	a(t.call('\uD834abc', '1'), 'a', "'a'");
-
-	a.h1("Lone low surrogates");
-	a(t.call('\uDF06abc', -Infinity), '', "-Infinity");
-	a(t.call('\uDF06abc', -1), '', "-1");
-	a(t.call('\uDF06abc', -0), '\uDF06', "-0");
-	a(t.call('\uDF06abc', +0), '\uDF06', "+0");
-	a(t.call('\uDF06abc', 1), 'a', "1");
-	a(t.call('\uDF06abc', 42), '', "42");
-	a(t.call('\uDF06abc', +Infinity), '', "+Infinity");
-	a(t.call('\uDF06abc', null), '\uDF06', "null");
-	a(t.call('\uDF06abc', undefined), '\uDF06', "undefined");
-	a(t.call('\uDF06abc'), '\uDF06', "No arguments");
-	a(t.call('\uDF06abc', false), '\uDF06', "false");
-	a(t.call('\uDF06abc', NaN), '\uDF06', "NaN");
-	a(t.call('\uDF06abc', ''), '\uDF06', "Empty string");
-	a(t.call('\uDF06abc', '_'), '\uDF06', "_");
-	a(t.call('\uDF06abc', '1'), 'a', "'1'");
-
-	a.h1("Context");
-	a.throws(function () { t.call(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t.call(undefined, 4); }, TypeError,
-		"Undefined + argument");
-	a.throws(function () { t.call(null); }, TypeError, "Null");
-	a.throws(function () { t.call(null, 4); }, TypeError, "Null + argument");
-	a(t.call(42, 0), '4', "Number #1");
-	a(t.call(42, 1), '2', "Number #2");
-	a(t.call({ toString: function () { return 'abc'; } }, 2), 'c', "Object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
deleted file mode 100644
index 8b47a8158a29d3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/capitalize.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/capitalize.js
deleted file mode 100644
index fa11ff8eeff856..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/capitalize.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz'), 'Raz', "Word");
-	a(t.call('BLA'), 'BLA', "Uppercase");
-	a(t.call(''), '', "Empty");
-	a(t.call('a'), 'A', "One letter");
-	a(t.call('this is a test'), 'This is a test', "Sentence");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
deleted file mode 100644
index 01a90c39ce8307..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call("AA", "aa"), 0, "Same");
-	a.ok(t.call("Amber", "zebra") < 0, "Less");
-	a.ok(t.call("Zebra", "amber") > 0, "Greater");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js
deleted file mode 100644
index 5e33cd715ff47b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var isImplemented =
-	require('../../../../string/#/code-point-at/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js
deleted file mode 100644
index 0df4751c564421..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js
+++ /dev/null
@@ -1,81 +0,0 @@
-// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt
-//             /blob/master/tests/tests.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.length, 1, "Length");
-
-	// String that starts with a BMP symbol
-	a(t.call('abc\uD834\uDF06def', ''), 0x61);
-	a(t.call('abc\uD834\uDF06def', '_'), 0x61);
-	a(t.call('abc\uD834\uDF06def'), 0x61);
-	a(t.call('abc\uD834\uDF06def', -Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', -1), undefined);
-	a(t.call('abc\uD834\uDF06def', -0), 0x61);
-	a(t.call('abc\uD834\uDF06def', 0), 0x61);
-	a(t.call('abc\uD834\uDF06def', 3), 0x1D306);
-	a(t.call('abc\uD834\uDF06def', 4), 0xDF06);
-	a(t.call('abc\uD834\uDF06def', 5), 0x64);
-	a(t.call('abc\uD834\uDF06def', 42), undefined);
-	a(t.call('abc\uD834\uDF06def', Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', NaN), 0x61);
-	a(t.call('abc\uD834\uDF06def', false), 0x61);
-	a(t.call('abc\uD834\uDF06def', null), 0x61);
-	a(t.call('abc\uD834\uDF06def', undefined), 0x61);
-
-	// String that starts with an astral symbol
-	a(t.call('\uD834\uDF06def', ''), 0x1D306);
-	a(t.call('\uD834\uDF06def', '1'), 0xDF06);
-	a(t.call('\uD834\uDF06def', '_'), 0x1D306);
-	a(t.call('\uD834\uDF06def'), 0x1D306);
-	a(t.call('\uD834\uDF06def', -1), undefined);
-	a(t.call('\uD834\uDF06def', -0), 0x1D306);
-	a(t.call('\uD834\uDF06def', 0), 0x1D306);
-	a(t.call('\uD834\uDF06def', 1), 0xDF06);
-	a(t.call('\uD834\uDF06def', 42), undefined);
-	a(t.call('\uD834\uDF06def', false), 0x1D306);
-	a(t.call('\uD834\uDF06def', null), 0x1D306);
-	a(t.call('\uD834\uDF06def', undefined), 0x1D306);
-
-	// Lone high surrogates
-	a(t.call('\uD834abc', ''), 0xD834);
-	a(t.call('\uD834abc', '_'), 0xD834);
-	a(t.call('\uD834abc'), 0xD834);
-	a(t.call('\uD834abc', -1), undefined);
-	a(t.call('\uD834abc', -0), 0xD834);
-	a(t.call('\uD834abc', 0), 0xD834);
-	a(t.call('\uD834abc', false), 0xD834);
-	a(t.call('\uD834abc', NaN), 0xD834);
-	a(t.call('\uD834abc', null), 0xD834);
-	a(t.call('\uD834abc', undefined), 0xD834);
-
-	// Lone low surrogates
-	a(t.call('\uDF06abc', ''), 0xDF06);
-	a(t.call('\uDF06abc', '_'), 0xDF06);
-	a(t.call('\uDF06abc'), 0xDF06);
-	a(t.call('\uDF06abc', -1), undefined);
-	a(t.call('\uDF06abc', -0), 0xDF06);
-	a(t.call('\uDF06abc', 0), 0xDF06);
-	a(t.call('\uDF06abc', false), 0xDF06);
-	a(t.call('\uDF06abc', NaN), 0xDF06);
-	a(t.call('\uDF06abc', null), 0xDF06);
-	a(t.call('\uDF06abc', undefined), 0xDF06);
-
-	a.throws(function () { t.call(undefined); }, TypeError);
-	a.throws(function () { t.call(undefined, 4); }, TypeError);
-	a.throws(function () { t.call(null); }, TypeError);
-	a.throws(function () { t.call(null, 4); }, TypeError);
-	a(t.call(42, 0), 0x34);
-	a(t.call(42, 1), 0x32);
-	a(t.call({ toString: function () { return 'abc'; } }, 2), 0x63);
-
-	a.throws(function () { t.apply(undefined); }, TypeError);
-	a.throws(function () { t.apply(undefined, [4]); }, TypeError);
-	a.throws(function () { t.apply(null); }, TypeError);
-	a.throws(function () { t.apply(null, [4]); }, TypeError);
-	a(t.apply(42, [0]), 0x34);
-	a(t.apply(42, [1]), 0x32);
-	a(t.apply({ toString: function () { return 'abc'; } }, [2]), 0x63);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/implement.js
deleted file mode 100644
index 220f50d4672f13..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/contains/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/shim.js
deleted file mode 100644
index a0ea4db20812e5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/contains/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz', ''), true, "Empty");
-	a(t.call('', ''), true, "Both Empty");
-	a(t.call('raz', 'raz'), true, "Same");
-	a(t.call('razdwa', 'raz'), true, "Starts with");
-	a(t.call('razdwa', 'dwa'), true, "Ends with");
-	a(t.call('razdwa', 'zdw'), true, "In middle");
-	a(t.call('', 'raz'), false, "Something in empty");
-	a(t.call('az', 'raz'), false, "Longer");
-	a(t.call('azasdfasdf', 'azff'), false, "Not found");
-	a(t.call('razdwa', 'raz', 1), false, "Position");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/implement.js
deleted file mode 100644
index 93bd2ddcd6dc20..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/ends-with/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/shim.js
deleted file mode 100644
index e4b93c407bc2b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/ends-with/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// In some parts copied from:
-// http://closure-library.googlecode.com/svn/trunk/closure/goog/
-// string/string_test.html
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('abc', ''), true, "Empty needle");
-	a(t.call('abcd', 'cd'), true, "Ends with needle");
-	a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
-	a(t.call('abcd', 'ab'), false, "Doesn't end with needle");
-	a(t.call('abc', 'defg'), false, "Length trick");
-	a(t.call('razdwa', 'zd', 3), false, "Position: false");
-	a(t.call('razdwa', 'zd', 4), true, "Position: true");
-	a(t.call('razdwa', 'zd', 5), false, "Position: false #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
deleted file mode 100644
index bd7ded4befbc7d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/indent.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/indent.js
deleted file mode 100644
index eb92b36f5438d6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/indent.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('ra\nzz', ''), 'ra\nzz', "Empty");
-	a(t.call('ra\nzz', '\t', 3), '\t\t\tra\n\t\t\tzz', "String repeat");
-	a(t.call('ra\nzz\nsss\nfff\n', '\t'), '\tra\n\tzz\n\tsss\n\tfff\n',
-		"Multi-line");
-	a(t.call('ra\n\nzz\n', '\t'), '\tra\n\n\tzz\n', "Don't touch empty lines");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/last.js
deleted file mode 100644
index ad36a213c6053e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/last.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(''), null, "Null");
-	a(t.call('abcdef'), 'f', "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/_data.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/_data.js
deleted file mode 100644
index c741addb0055a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/_data.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t[0], 'object'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/implement.js
deleted file mode 100644
index 4886c9b834285b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/normalize/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/shim.js
deleted file mode 100644
index 28e27f595247be..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/normalize/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js
-
-'use strict';
-
-var str = 'äiti';
-
-module.exports = function (t, a) {
-	a(t.call(str), "\u00e4iti");
-	a(t.call(str, "NFC"), "\u00e4iti");
-	a(t.call(str, "NFD"), "a\u0308iti");
-	a(t.call(str, "NFKC"), "\u00e4iti");
-	a(t.call(str, "NFKD"), "a\u0308iti");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/pad.js
deleted file mode 100644
index 28c3fcaa10c4da..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/pad.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var partial = require('../../../function/#/partial');
-
-module.exports = {
-	Left: function (t, a) {
-		t = partial.call(t, 'x', 5);
-
-		a(t.call('yy'), 'xxxyy');
-		a(t.call(''), 'xxxxx', "Empty string");
-
-		a(t.call('yyyyy'), 'yyyyy', 'Equal length');
-		a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
-	},
-	Right: function (t, a) {
-		t = partial.call(t, 'x', -5);
-
-		a(t.call('yy'), 'yyxxx');
-		a(t.call(''), 'xxxxx', "Empty string");
-
-		a(t.call('yyyyy'), 'yyyyy', 'Equal length');
-		a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace-all.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace-all.js
deleted file mode 100644
index a425c87a40553b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace-all.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
-	a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
-	a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
-
-	a(t.call('$raz$$dwa$trzy$', '$', '&&'), '&&raz&&&&dwa&&trzy&&', "Multi");
-	a(t.call('$raz$$dwa$$$$trzy$', '$$', '&'), '$raz&dwa&&trzy$',
-		"Multi many chars");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace.js
deleted file mode 100644
index 54522ed749fe37..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/plain-replace.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
-	a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
-	a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/implement.js
deleted file mode 100644
index 7ff65a811068b4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/repeat/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/shim.js
deleted file mode 100644
index 7e0d077ec4bdb6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/repeat/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('a', 0), '', "Empty");
-	a(t.call('a', 1), 'a', "1");
-	a(t.call('\t', 5), '\t\t\t\t\t', "Whitespace");
-	a(t.call('raz', 3), 'razrazraz', "Many chars");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/implement.js
deleted file mode 100644
index fc8490fc916ac3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/starts-with/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/shim.js
deleted file mode 100644
index e0e123b324e115..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/#/starts-with/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Inspired and in some parts copied from:
-// http://closure-library.googlecode.com/svn/trunk/closure/goog
-// /string/string_test.html
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('abc', ''), true, "Empty needle");
-	a(t.call('abcd', 'ab'), true, "Starts with needle");
-	a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
-	a(t.call('abcd', 'bcde', 1), false, "Needle larger than haystack");
-	a(!t.call('abcd', 'cd'), true, "Doesn't start with needle");
-	a(t.call('abcd', 'bc', 1), true, "Position");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/format-method.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/format-method.js
deleted file mode 100644
index bb5561ee45bb59..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/format-method.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	t = t({ a: 'A', aa: 'B', ab: 'C', b: 'D',
-		c: function () { return ++this.a; } });
-	a(t.call({ a: 0 }, ' %a%aab%abb%b\\%aa%ab%c%c '), ' ABbCbD%aaC12 ');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/implement.js
deleted file mode 100644
index 0aceb97efdcf36..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../string/from-code-point/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/shim.js
deleted file mode 100644
index 88cda3d6364719..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/from-code-point/shim.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master
-//             /tests/tests.js
-
-'use strict';
-
-var pow = Math.pow;
-
-module.exports = function (t, a) {
-	var counter, result;
-
-	a(t.length, 1, "Length");
-	a(String.propertyIsEnumerable('fromCodePoint'), false, "Not enumerable");
-
-	a(t(''), '\0', "Empty string");
-	a(t(), '', "No arguments");
-	a(t(-0), '\0', "-0");
-	a(t(0), '\0', "0");
-	a(t(0x1D306), '\uD834\uDF06', "Unicode");
-	a(t(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07', "Complex unicode");
-	a(t(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07', "Complex");
-	a(t(false), '\0', "false");
-	a(t(null), '\0', "null");
-
-	a.throws(function () { t('_'); }, RangeError, "_");
-	a.throws(function () { t(Infinity); }, RangeError, "Infinity");
-	a.throws(function () { t(-Infinity); }, RangeError, "-Infinity");
-	a.throws(function () { t(-1); }, RangeError, "-1");
-	a.throws(function () { t(0x10FFFF + 1); }, RangeError, "Range error #1");
-	a.throws(function () { t(3.14); }, RangeError, "Range error #2");
-	a.throws(function () { t(3e-2); }, RangeError, "Range error #3");
-	a.throws(function () { t(-Infinity); }, RangeError, "Range error #4");
-	a.throws(function () { t(+Infinity); }, RangeError, "Range error #5");
-	a.throws(function () { t(NaN); }, RangeError, "Range error #6");
-	a.throws(function () { t(undefined); }, RangeError, "Range error #7");
-	a.throws(function () { t({}); }, RangeError, "Range error #8");
-	a.throws(function () { t(/re/); }, RangeError, "Range error #9");
-
-	counter = pow(2, 15) * 3 / 2;
-	result = [];
-	while (--counter >= 0) result.push(0); // one code unit per symbol
-	t.apply(null, result); // must not throw
-
-	counter = pow(2, 15) * 3 / 2;
-	result = [];
-	while (--counter >= 0) result.push(0xFFFF + 1); // two code units per symbol
-	t.apply(null, result); // must not throw
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/is-string.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/is-string.js
deleted file mode 100644
index 32f595829168ee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/is-string.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(null), false, "Null");
-	a(t(''), true, "Empty string");
-	a(t(12), false, "Number");
-	a(t(false), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), true, "String object");
-	a(t('asdfaf'), true, "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/random-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/random-uniq.js
deleted file mode 100644
index 6791ac266e7530..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/random-uniq.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/);
-
-module.exports = function (t, a) {
-	a(typeof t(), 'string');
-	a.ok(t().length > 7);
-	a.not(t(), t());
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/implement.js
deleted file mode 100644
index 59416de3af53ad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../string/raw/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/shim.js
deleted file mode 100644
index 025ed780455667..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/string/raw/shim.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Partially taken from:
-// https://github.com/paulmillr/es6-shim/blob/master/test/string.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var callSite = [];
-
-	callSite.raw = ["The total is ", " ($", " with tax)"];
-	a(t(callSite, '{total}', '{total * 1.01}'),
-		'The total is {total} (${total * 1.01} with tax)');
-
-	callSite.raw = [];
-	a(t(callSite, '{total}', '{total * 1.01}'), '');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.travis.yml
deleted file mode 100644
index 02c277cf565442..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-iterator@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/CHANGES
deleted file mode 100644
index a2d1ec7c2af31c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/CHANGES
+++ /dev/null
@@ -1,28 +0,0 @@
-v0.1.3  --  2015.02.02
-* Update dependencies
-* Fix spelling of LICENSE
-
-v0.1.2  --  2014.11.19
-* Optimise internal `_next` to not verify internal's list length at all times
-  (#2 thanks @RReverser)
-* Fix documentation examples
-* Configure lint scripts
-
-v0.1.1  --  2014.04.29
-* Fix es6-symbol dependency version
-
-v0.1.0  --  2014.04.29
-* Assure strictly npm hosted dependencies
-* Remove sparse arrays dedicated handling (as per spec)
-* Add: isIterable, validIterable and chain (method)
-* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from)
-* Add break possiblity to 'forOf' via 'doBreak' function argument
-* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator)
-* Provide @@toStringTag symbol
-* When available rely on @@iterator symbol
-* Remove 32bit integer maximum list length restriction
-* Improve Iterator internals
-* Update to use latest version of dependencies
-
-v0.0.0  --  2013.10.12
-Initial (dev version)
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/README.md
deleted file mode 100644
index 288373da7ab506..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/README.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# es6-iterator
-## ECMAScript 6 Iterator interface
-
-### Installation
-
-	$ npm install es6-iterator
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## API
-
-### Constructors
-
-#### Iterator(list) _(es6-iterator)_
-
-Abstract Iterator interface. Meant for extensions and not to be used on its own.
-
-Accepts any _list_ object (technically object with numeric _length_ property).
-
-_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_
-
-```javascript
-var Iterator = require('es6-iterator')
-var iterator = new Iterator([1, 2, 3]);
-
-iterator.next(); // { value: 1, done: false }
-iterator.next(); // { value: 2, done: false }
-iterator.next(); // { value: 3, done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-
-#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_
-
-Dedicated for arrays and array-likes. Supports three iteration kinds:
-* __value__ _(default)_ - Iterates values
-* __key__ - Iterates indexes
-* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.
-
-
-```javascript
-var ArrayIterator = require('es6-iterator/array')
-var iterator = new ArrayIterator([1, 2, 3], 'key+value');
-
-iterator.next(); // { value: [0, 1], done: false }
-iterator.next(); // { value: [1, 2], done: false }
-iterator.next(); // { value: [2, 3], done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-May also be used for _arguments_ objects:
-
-```javascript
-(function () {
-  var iterator = new ArrayIterator(arguments);
-
-  iterator.next(); // { value: 1, done: false }
-  iterator.next(); // { value: 2, done: false }
-  iterator.next(); // { value: 3, done: false }
-  iterator.next(); // { value: undefined, done: true }
-}(1, 2, 3));
-```
-
-#### StringIterator(str) _(es6-iterator/string)_
-
-Assures proper iteration over unicode symbols.  
-See: http://mathiasbynens.be/notes/javascript-unicode
-
-```javascript
-var StringIterator = require('es6-iterator/string');
-var iterator = new StringIterator('f🙈o🙉o🙊');
-
-iterator.next(); // { value: 'f', done: false }
-iterator.next(); // { value: '🙈', done: false }
-iterator.next(); // { value: 'o', done: false }
-iterator.next(); // { value: '🙉', done: false }
-iterator.next(); // { value: 'o', done: false }
-iterator.next(); // { value: '🙊', done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-### Function utilities
-
-#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_
-
-Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.
-
-```
-var forOf = require('es6-iterator/for-of');
-var result = [];
-
-forOf('🙈🙉🙊', function (monkey) { result.push(monkey); });
-console.log(result); // ['🙈', '🙉', '🙊'];
-```
-
-Optionally you can break iteration at any point:
-
-```javascript
-var result = [];
-
-forOf([1,2,3,4]', function (val, doBreak) {
-  result.push(monkey);
-  if (val >= 3) doBreak();
-});
-console.log(result); // [1, 2, 3];
-```
-
-#### get(obj) _(es6-iterator/get)_
-
-Return iterator for any iterable object.
-
-```javascript
-var getIterator = require('es6-iterator/get');
-var iterator = get([1,2,3]);
-
-iterator.next(); // { value: 1, done: false }
-iterator.next(); // { value: 2, done: false }
-iterator.next(); // { value: 3, done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-#### isIterable(obj) _(es6-iterator/is-iterable)_
-
-Whether _obj_ is iterable
-
-```javascript
-var isIterable = require('es6-iterator/is-iterable');
-
-isIterable(null); // false
-isIterable(true); // false
-isIterable('str'); // true
-isIterable(['a', 'r', 'r']); // true
-isIterable(new ArrayIterator([])); // true
-```
-
-#### validIterable(obj) _(es6-iterator/valid-iterable)_
-
-If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.
-
-### Method extensions
-
-#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_
-
-Chain multiple iterators into one.
-
-### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/for-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/for-of.js
deleted file mode 100644
index 111f5522735204..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/for-of.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-var callable = require('es5-ext/object/valid-callable')
-  , isString = require('es5-ext/string/is-string')
-  , get      = require('./get')
-
-  , isArray = Array.isArray, call = Function.prototype.call;
-
-module.exports = function (iterable, cb/*, thisArg*/) {
-	var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
-	if (isArray(iterable)) mode = 'array';
-	else if (isString(iterable)) mode = 'string';
-	else iterable = get(iterable);
-
-	callable(cb);
-	doBreak = function () { broken = true; };
-	if (mode === 'array') {
-		iterable.some(function (value) {
-			call.call(cb, thisArg, value, doBreak);
-			if (broken) return true;
-		});
-		return;
-	}
-	if (mode === 'string') {
-		l = iterable.length;
-		for (i = 0; i < l; ++i) {
-			char = iterable[i];
-			if ((i + 1) < l) {
-				code = char.charCodeAt(0);
-				if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i];
-			}
-			call.call(cb, thisArg, char, doBreak);
-			if (broken) break;
-		}
-		return;
-	}
-	result = iterable.next();
-
-	while (!result.done) {
-		call.call(cb, thisArg, result.value, doBreak);
-		if (broken) return;
-		result = iterable.next();
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/get.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/get.js
deleted file mode 100644
index 38230fd85a2101..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/get.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isString = require('es5-ext/string/is-string')
-  , ArrayIterator  = require('./array')
-  , StringIterator = require('./string')
-  , iterable       = require('./valid-iterable')
-  , iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (obj) {
-	if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol]();
-	if (isString(obj)) return new StringIterator(obj);
-	return new ArrayIterator(obj);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/is-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/is-iterable.js
deleted file mode 100644
index bbcf10492e1dc0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/is-iterable.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isString       = require('es5-ext/string/is-string')
-  , iteratorSymbol = require('es6-symbol').iterator
-
-  , isArray = Array.isArray;
-
-module.exports = function (value) {
-	if (value == null) return false;
-	if (isArray(value)) return true;
-	if (isString(value)) return true;
-	return (typeof value[iteratorSymbol] === 'function');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.lint b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.lint
deleted file mode 100644
index 1851752f99bfda..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.lint
+++ /dev/null
@@ -1,13 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
-newcap
-vars
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.travis.yml
deleted file mode 100644
index afd3509a26b27d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-symbol@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/CHANGES
deleted file mode 100644
index df8c27efc38de2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/CHANGES
+++ /dev/null
@@ -1,34 +0,0 @@
-v2.0.1  --  2015.01.28
-* Fix Symbol.prototype[Symbol.isPrimitive] implementation
-* Improve validation within Symbol.prototype.toString and
-  Symbol.prototype.valueOf
-
-v2.0.0  --  2015.01.28
-* Update up to changes in specification:
-  * Implement `for` and `keyFor`
-  * Remove `Symbol.create` and `Symbol.isRegExp`
-  * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and
-    `Symbol.split`
-* Rename `validSymbol` to `validateSymbol`
-* Improve documentation
-* Remove dead test modules
-
-v1.0.0  --  2015.01.26
-* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value)
-* Introduce initialization via hidden constructor
-* Fix isSymbol handling of polyfill values when native Symbol is present
-* Fix spelling of LICENSE
-* Configure lint scripts
-
-v0.1.1  --  2014.10.07
-* Fix isImplemented, so it returns true in case of polyfill
-* Improve documentations
-
-v0.1.0  --  2014.04.28
-* Assure strictly npm dependencies
-* Update to use latest versions of dependencies
-* Fix implementation detection so it doesn't crash on `String(symbol)`
-* throw on `new Symbol()` (as decided by TC39)
-
-v0.0.0  --  2013.11.15
-* Initial (dev) version
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/LICENSE b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/LICENSE
deleted file mode 100644
index 04724a3ab1b70b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/README.md
deleted file mode 100644
index 95d6780ba78cb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# es6-symbol
-## ECMAScript 6 Symbol polyfill
-
-For more information about symbols see following links
-- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
-- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
-- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
-
-### Limitations
-
-Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
-
-### Usage
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't (but without implementing `Symbol` on global scope), do:
-
-```javascript
-var Symbol = require('es6-symbol');
-```
-
-If you want to make sure your environment implements `Symbol`, do:
-
-```javascript
-require('es6-symbol/implement');
-```
-
-If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
-
-```javascript
-var Symbol = require('es6-symbol/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Symbol = require('es6-symbol');
-
-var symbol = Symbol('My custom symbol');
-var x = {};
-
-x[symbol] = 'foo';
-console.log(x[symbol]); 'foo'
-
-// Detect iterable:
-var iterator, result;
-if (possiblyIterable[Symbol.iterator]) {
-  iterator = possiblyIterable[Symbol.iterator]();
-  result = iterator.next();
-  while(!result.done) {
-    console.log(result.value);
-    result = iterator.next();
-  }
-}
-```
-
-### Installation
-#### NPM
-
-In your project path:
-
-	$ npm install es6-symbol
-
-##### Browser
-
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/implement.js
deleted file mode 100644
index 153edacdbedf9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(require('es5-ext/global'), 'Symbol',
-		{ value: require('./polyfill'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/index.js
deleted file mode 100644
index 609f1faf551164..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-implemented.js
deleted file mode 100644
index 53759f32124b1c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-implemented.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var symbol;
-	if (typeof Symbol !== 'function') return false;
-	symbol = Symbol('test symbol');
-	try { String(symbol); } catch (e) { return false; }
-	if (typeof Symbol.iterator === 'symbol') return true;
-
-	// Return 'true' for polyfills
-	if (typeof Symbol.isConcatSpreadable !== 'object') return false;
-	if (typeof Symbol.iterator !== 'object') return false;
-	if (typeof Symbol.toPrimitive !== 'object') return false;
-	if (typeof Symbol.toStringTag !== 'object') return false;
-	if (typeof Symbol.unscopables !== 'object') return false;
-
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-native-implemented.js
deleted file mode 100644
index a8cb8b8681ee69..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-native-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Exports true if environment provides native `Symbol` implementation
-
-'use strict';
-
-module.exports = (function () {
-	if (typeof Symbol !== 'function') return false;
-	return (typeof Symbol.iterator === 'symbol');
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-symbol.js
deleted file mode 100644
index beeba2cb4fa23f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/is-symbol.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (x) {
-	return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/package.json
deleted file mode 100644
index 0efffeaec90658..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
-  "name": "es6-symbol",
-  "version": "2.0.1",
-  "description": "ECMAScript6 Symbol polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "symbol",
-    "private",
-    "property",
-    "es6",
-    "ecmascript",
-    "harmony"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-symbol.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.5"
-  },
-  "devDependencies": {
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "51f6938d7830269fefa38f02eb912f5472b3ccd7",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-symbol/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-symbol",
-  "_id": "es6-symbol@2.0.1",
-  "_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-  "_from": "es6-symbol@>=2.0.1 <2.1.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-    "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/polyfill.js
deleted file mode 100644
index 735eb676b23c9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/polyfill.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-var d              = require('d')
-  , validateSymbol = require('./validate-symbol')
-
-  , create = Object.create, defineProperties = Object.defineProperties
-  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
-  , Symbol, HiddenSymbol, globalSymbols = create(null);
-
-var generateName = (function () {
-	var created = create(null);
-	return function (desc) {
-		var postfix = 0, name;
-		while (created[desc + (postfix || '')]) ++postfix;
-		desc += (postfix || '');
-		created[desc] = true;
-		name = '@@' + desc;
-		defineProperty(objPrototype, name, d.gs(null, function (value) {
-			defineProperty(this, name, d(value));
-		}));
-		return name;
-	};
-}());
-
-HiddenSymbol = function Symbol(description) {
-	if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	return Symbol(description);
-};
-module.exports = Symbol = function Symbol(description) {
-	var symbol;
-	if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	symbol = create(HiddenSymbol.prototype);
-	description = (description === undefined ? '' : String(description));
-	return defineProperties(symbol, {
-		__description__: d('', description),
-		__name__: d('', generateName(description))
-	});
-};
-defineProperties(Symbol, {
-	for: d(function (key) {
-		if (globalSymbols[key]) return globalSymbols[key];
-		return (globalSymbols[key] = Symbol(String(key)));
-	}),
-	keyFor: d(function (s) {
-		var key;
-		validateSymbol(s);
-		for (key in globalSymbols) if (globalSymbols[key] === s) return key;
-	}),
-	hasInstance: d('', Symbol('hasInstance')),
-	isConcatSpreadable: d('', Symbol('isConcatSpreadable')),
-	iterator: d('', Symbol('iterator')),
-	match: d('', Symbol('match')),
-	replace: d('', Symbol('replace')),
-	search: d('', Symbol('search')),
-	species: d('', Symbol('species')),
-	split: d('', Symbol('split')),
-	toPrimitive: d('', Symbol('toPrimitive')),
-	toStringTag: d('', Symbol('toStringTag')),
-	unscopables: d('', Symbol('unscopables'))
-});
-defineProperties(HiddenSymbol.prototype, {
-	constructor: d(Symbol),
-	toString: d('', function () { return this.__name__; })
-});
-
-defineProperties(Symbol.prototype, {
-	toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
-	valueOf: d(function () { return validateSymbol(this); })
-});
-defineProperty(Symbol.prototype, Symbol.toPrimitive, d('',
-	function () { return validateSymbol(this); }));
-defineProperty(Symbol.prototype, Symbol.toStringTag, d('c', 'Symbol'));
-
-defineProperty(HiddenSymbol.prototype, Symbol.toPrimitive,
-	d('c', Symbol.prototype[Symbol.toPrimitive]));
-defineProperty(HiddenSymbol.prototype, Symbol.toStringTag,
-	d('c', Symbol.prototype[Symbol.toStringTag]));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/implement.js
deleted file mode 100644
index eb35c3018835c7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/index.js
deleted file mode 100644
index 62b3296df6fc5e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('d')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-implemented.js
deleted file mode 100644
index bb0d64536ebbae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Symbol;
-	global.Symbol = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Symbol;
-	else global.Symbol = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-symbol.js
deleted file mode 100644
index ac24b9abbff4e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/is-symbol.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Symbol !== 'undefined') {
-		a(t(Symbol()), true, "Native");
-	}
-	a(t(SymbolPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/polyfill.js
deleted file mode 100644
index 83fb5e9253677b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/polyfill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var d        = require('d')
-  , isSymbol = require('../is-symbol')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-	a(x instanceof T, false);
-
-	a(isSymbol(symbol), true, "Symbol");
-	a(isSymbol(T.iterator), true, "iterator");
-	a(isSymbol(T.toStringTag), true, "toStringTag");
-
-	x = {};
-	x[symbol] = 'foo';
-	a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
-		value: 'foo', writable: true });
-	symbol = T.for('marko');
-	a(isSymbol(symbol), true);
-	a(T.for('marko'), symbol);
-	a(T.keyFor(symbol), 'marko');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/validate-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/validate-symbol.js
deleted file mode 100644
index 2c8f84c8239b6e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/test/validate-symbol.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var symbol;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Symbol !== 'undefined') {
-		symbol = Symbol();
-		a(t(symbol), symbol, "Native");
-	}
-	symbol = SymbolPoly();
-	a(t(symbol), symbol, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/validate-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/validate-symbol.js
deleted file mode 100644
index 42750043d4271c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/node_modules/es6-symbol/validate-symbol.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isSymbol = require('./is-symbol');
-
-module.exports = function (value) {
-	if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/package.json
deleted file mode 100644
index b861638ad5d27b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
-  "name": "es6-iterator",
-  "version": "0.1.3",
-  "description": "Iterator abstraction based on ES6 specification",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "iterator",
-    "array",
-    "list",
-    "set",
-    "map",
-    "generator"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-iterator.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.5",
-    "es6-symbol": "~2.0.1"
-  },
-  "devDependencies": {
-    "event-emitter": "~0.3.3",
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "2addc362c6f139e4941cf4726eeb59e5960c5cef",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-iterator/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-iterator",
-  "_id": "es6-iterator@0.1.3",
-  "_shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e",
-  "_from": "es6-iterator@>=0.1.3 <0.2.0",
-  "_npmVersion": "2.3.0",
-  "_nodeVersion": "0.11.16",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e",
-    "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/#/chain.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/#/chain.js
deleted file mode 100644
index a414c66d78f44f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/#/chain.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var Iterator = require('../../');
-
-module.exports = function (t, a) {
-	var i1 = new Iterator(['raz', 'dwa', 'trzy'])
-	  , i2 = new Iterator(['cztery', 'pięć', 'sześć'])
-	  , i3 = new Iterator(['siedem', 'osiem', 'dziewięć'])
-
-	  , iterator = t.call(i1, i2, i3);
-
-	a.deep(iterator.next(), { done: false, value: 'raz' }, "#1");
-	a.deep(iterator.next(), { done: false, value: 'dwa' }, "#2");
-	a.deep(iterator.next(), { done: false, value: 'trzy' }, "#3");
-	a.deep(iterator.next(), { done: false, value: 'cztery' }, "#4");
-	a.deep(iterator.next(), { done: false, value: 'pięć' }, "#5");
-	a.deep(iterator.next(), { done: false, value: 'sześć' }, "#6");
-	a.deep(iterator.next(), { done: false, value: 'siedem' }, "#7");
-	a.deep(iterator.next(), { done: false, value: 'osiem' }, "#8");
-	a.deep(iterator.next(), { done: false, value: 'dziewięć' }, "#9");
-	a.deep(iterator.next(), { done: true, value: undefined }, "Done #1");
-	a.deep(iterator.next(), { done: true, value: undefined }, "Done #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/array.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/array.js
deleted file mode 100644
index ae7c2199e84a72..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/array.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T) {
-	return {
-		Values: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: 'dwa' }, "Insert");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Keys & Values": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x, 'key+value');
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: [0, 'raz'] }, "#1");
-			a.deep(it.next(), { done: false, value: [1, 'dwa'] }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: [2, 'dwa'] }, "Insert");
-			a.deep(it.next(), { done: false, value: [3, 'trzy'] }, "#3");
-			a.deep(it.next(), { done: false, value: [4, 'cztery'] }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: [5, 'pięć'] }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Keys: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x, 'key');
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: 0 }, "#1");
-			a.deep(it.next(), { done: false, value: 1 }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: 2 }, "Insert");
-			a.deep(it.next(), { done: false, value: 3 }, "#3");
-			a.deep(it.next(), { done: false, value: 4 }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: 5 }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Sparse: function (a) {
-			var x = new Array(6), it;
-
-			x[2] = 'raz';
-			x[4] = 'dwa';
-			it = new T(x);
-			a.deep(it.next(), { done: false, value: undefined }, "#1");
-			a.deep(it.next(), { done: false, value: undefined }, "#2");
-			a.deep(it.next(), { done: false, value: 'raz' }, "#3");
-			a.deep(it.next(), { done: false, value: undefined }, "#4");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#5");
-			a.deep(it.next(), { done: false, value: undefined }, "#6");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/for-of.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/for-of.js
deleted file mode 100644
index 502e7b767f61b2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/for-of.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('../array')
-
-  , slice = Array.prototype.slice;
-
-module.exports = function (t, a) {
-	var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0;
-	t(x, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
-		a(this, y, "Array: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(x = 'foo', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Regular String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	x = ['r', '💩', 'z'];
-	t('r💩z', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Unicode String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(new ArrayIterator(x), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
-		a(this, y, "Iterator: context:  " + (i++) + "#");
-	}, y);
-
-	t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) {
-		++called;
-		return doBreak();
-	});
-	a(called, 1, "Break");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/get.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/get.js
deleted file mode 100644
index 7309590cba5689..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/get.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var iterator;
-	a.throws(function () { t(); }, TypeError, "Null");
-	a.throws(function () { t({}); }, TypeError, "Plain object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	iterator = {};
-	iterator[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(iterator) instanceof Iterator, true, "Iterator");
-	a(String(t([])), '[object Array Iterator]', " Array");
-	a(String(t('foo')), '[object String Iterator]', "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/index.js
deleted file mode 100644
index ea3621adfebeb5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/index.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-
-var ee             = require('event-emitter')
-  , iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T) {
-	return {
-		"": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it, y, z;
-
-			it = new T(x);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			y = it.next();
-			a.deep(y, { done: false, value: 'raz' }, "#1");
-			z = it.next();
-			a.not(y, z, "Recreate result");
-			a.deep(z, { done: false, value: 'dwa' }, "#2");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
-			a.deep(y = it.next(), { done: true, value: undefined }, "End");
-			a.not(y, it.next(), "Recreate result on dead");
-		},
-		Emited: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			y.emit('_add', x.push('sześć') - 1);
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			x.splice(5, 1);
-			y.emit('_delete', 5);
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited #2": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			x.splice(1, 0, '1.25');
-			y.emit('_add', 1);
-			x.splice(0, 1);
-			y.emit('_delete', 0);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			x.splice(5, 1);
-			y.emit('_delete', 5);
-			a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #1": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.length = 0;
-			y.emit('_clear');
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #2": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.length = 0;
-			y.emit('_clear');
-			x.push('foo');
-			x.push('bar');
-			a.deep(it.next(), { done: false, value: 'foo' }, "#3");
-			a.deep(it.next(), { done: false, value: 'bar' }, "#4");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			x.splice(1, 0, '1.25');
-			y.emit('_add', 1);
-			x.splice(0, 1);
-			y.emit('_delete', 0);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/is-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/is-iterable.js
deleted file mode 100644
index 7c5c59b6d75a62..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/is-iterable.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var iterator;
-	a(t(), false, "Undefined");
-	a(t(123), false, "Number");
-	a(t({}), false, "Plain object");
-	a(t({ length: 0 }), false, "Array-like");
-	iterator = {};
-	iterator[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(iterator), true, "Iterator");
-	a(t([]), true, "Array");
-	a(t('foo'), true, "String");
-	a(t(''), true, "Empty string");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/string.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/string.js
deleted file mode 100644
index d11855f2511609..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/string.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T, a) {
-	var it = new T('foobar');
-
-	a(it[iteratorSymbol](), it, "@@iterator");
-	a.deep(it.next(), { done: false, value: 'f' }, "#1");
-	a.deep(it.next(), { done: false, value: 'o' }, "#2");
-	a.deep(it.next(), { done: false, value: 'o' }, "#3");
-	a.deep(it.next(), { done: false, value: 'b' }, "#4");
-	a.deep(it.next(), { done: false, value: 'a' }, "#5");
-	a.deep(it.next(), { done: false, value: 'r' }, "#6");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-
-	a.h1("Outside of BMP");
-	it = new T('r💩z');
-	a.deep(it.next(), { done: false, value: 'r' }, "#1");
-	a.deep(it.next(), { done: false, value: '💩' }, "#2");
-	a.deep(it.next(), { done: false, value: 'z' }, "#3");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/valid-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/valid-iterable.js
deleted file mode 100644
index 7760b017826085..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-iterator/test/valid-iterable.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var obj;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t({}); }, TypeError, "Plain object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	obj = {};
-	obj[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(obj), obj, "Iterator");
-	obj = [];
-	a(t(obj), obj, 'Array');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.lint b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.lint
deleted file mode 100644
index cf54d815684b2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.lint
+++ /dev/null
@@ -1,11 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.travis.yml
deleted file mode 100644
index 4c4accb6b1ffb0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-set@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/CHANGES
deleted file mode 100644
index 79603bf8cf2cfb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/CHANGES
+++ /dev/null
@@ -1,18 +0,0 @@
-v0.1.1  --  2014.10.07
-* Fix isImplemented so it validates native Set properly
-* Add getFirst and getLast extensions
-* Configure linter scripts
-
-v0.1.0  --  2014.04.29
-* Assure strictly npm hosted dependencies
-* Introduce faster 'primitive' alternative (doesn't guarantee order of iteration)
-* Add isNativeImplemented, and some, every and copy method extensions
-* If native Set is provided polyfill extends it
-* Optimize forEach iteration
-* Remove comparator support (as it was removed from spec)
-* Provide @@toStringTag symbol, ad @@iterator symbols on iterators
-* Update to use latest dependencies versions
-* Improve interals
-
-v0.0.0  --  2013.10.12
-Initial (dev) version
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-implemented.js
deleted file mode 100644
index d8b0cd7d2d78e5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-implemented.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var set, iterator, result;
-	if (typeof Set !== 'function') return false;
-	set = new Set(['raz', 'dwa', 'trzy']);
-	if (set.size !== 3) return false;
-	if (typeof set.add !== 'function') return false;
-	if (typeof set.clear !== 'function') return false;
-	if (typeof set.delete !== 'function') return false;
-	if (typeof set.entries !== 'function') return false;
-	if (typeof set.forEach !== 'function') return false;
-	if (typeof set.has !== 'function') return false;
-	if (typeof set.keys !== 'function') return false;
-	if (typeof set.values !== 'function') return false;
-
-	iterator = set.values();
-	result = iterator.next();
-	if (result.done !== false) return false;
-	if (result.value !== 'raz') return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-set.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-set.js
deleted file mode 100644
index 19e47929356ab6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/is-set.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var toString          = Object.prototype.toString
-  , toStringTagSymbol = require('es6-symbol').toStringTag
-
-  , id = '[object Set]'
-  , Global = (typeof Set === 'undefined') ? null : Set;
-
-module.exports = function (x) {
-	return (x && ((Global && (x instanceof Global)) ||
-			(toString.call(x) === id) || (x[toStringTagSymbol] === 'Set'))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/iterator.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/iterator.js
deleted file mode 100644
index 4a7dac7ebdc648..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/lib/iterator.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-var setPrototypeOf    = require('es5-ext/object/set-prototype-of')
-  , contains          = require('es5-ext/string/#/contains')
-  , d                 = require('d')
-  , Iterator          = require('es6-iterator')
-  , toStringTagSymbol = require('es6-symbol').toStringTag
-
-  , defineProperty = Object.defineProperty
-  , SetIterator;
-
-SetIterator = module.exports = function (set, kind) {
-	if (!(this instanceof SetIterator)) return new SetIterator(set, kind);
-	Iterator.call(this, set.__setData__, set);
-	if (!kind) kind = 'value';
-	else if (contains.call(kind, 'key+value')) kind = 'key+value';
-	else kind = 'value';
-	defineProperty(this, '__kind__', d('', kind));
-};
-if (setPrototypeOf) setPrototypeOf(SetIterator, Iterator);
-
-SetIterator.prototype = Object.create(Iterator.prototype, {
-	constructor: d(SetIterator),
-	_resolve: d(function (i) {
-		if (this.__kind__ === 'value') return this.__list__[i];
-		return [this.__list__[i], this.__list__[i]];
-	}),
-	toString: d(function () { return '[object Set Iterator]'; })
-});
-defineProperty(SetIterator.prototype, toStringTagSymbol,
-	d('c', 'Set Iterator'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/package.json
deleted file mode 100644
index dd1720921250e4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
-  "name": "es6-set",
-  "version": "0.1.1",
-  "description": "ECMAScript6 Set polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "set",
-    "collection",
-    "es6",
-    "harmony",
-    "list",
-    "hash"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-set.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.4",
-    "es6-iterator": "~0.1.1",
-    "es6-symbol": "~0.1.1",
-    "event-emitter": "~0.3.1"
-  },
-  "devDependencies": {
-    "tad": "0.2.x",
-    "xlint": "~0.2.1",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "769f7391b194b25900a79d132d21f4abefb14201",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-set/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-set",
-  "_id": "es6-set@0.1.1",
-  "_shasum": "497cd235c9a2691f4caa0e33dd73ef86bde738ac",
-  "_from": "es6-set@>=0.1.1 <0.2.0",
-  "_npmVersion": "2.0.0",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "497cd235c9a2691f4caa0e33dd73ef86bde738ac",
-    "tarball": "http://registry.npmjs.org/es6-set/-/es6-set-0.1.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/polyfill.js
deleted file mode 100644
index d272429ffcea1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/polyfill.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-var clear          = require('es5-ext/array/#/clear')
-  , eIndexOf       = require('es5-ext/array/#/e-index-of')
-  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , callable       = require('es5-ext/object/valid-callable')
-  , d              = require('d')
-  , ee             = require('event-emitter')
-  , Symbol         = require('es6-symbol')
-  , iterator       = require('es6-iterator/valid-iterable')
-  , forOf          = require('es6-iterator/for-of')
-  , Iterator       = require('./lib/iterator')
-  , isNative       = require('./is-native-implemented')
-
-  , call = Function.prototype.call, defineProperty = Object.defineProperty
-  , SetPoly, getValues;
-
-module.exports = SetPoly = function (/*iterable*/) {
-	var iterable = arguments[0];
-	if (!(this instanceof SetPoly)) return new SetPoly(iterable);
-	if (this.__setData__ !== undefined) {
-		throw new TypeError(this + " cannot be reinitialized");
-	}
-	if (iterable != null) iterator(iterable);
-	defineProperty(this, '__setData__', d('c', []));
-	if (!iterable) return;
-	forOf(iterable, function (value) {
-		if (eIndexOf.call(this, value) !== -1) return;
-		this.push(value);
-	}, this.__setData__);
-};
-
-if (isNative) {
-	if (setPrototypeOf) setPrototypeOf(SetPoly, Set);
-	SetPoly.prototype = Object.create(Set.prototype, {
-		constructor: d(SetPoly)
-	});
-}
-
-ee(Object.defineProperties(SetPoly.prototype, {
-	add: d(function (value) {
-		if (this.has(value)) return this;
-		this.emit('_add', this.__setData__.push(value) - 1, value);
-		return this;
-	}),
-	clear: d(function () {
-		if (!this.__setData__.length) return;
-		clear.call(this.__setData__);
-		this.emit('_clear');
-	}),
-	delete: d(function (value) {
-		var index = eIndexOf.call(this.__setData__, value);
-		if (index === -1) return false;
-		this.__setData__.splice(index, 1);
-		this.emit('_delete', index, value);
-		return true;
-	}),
-	entries: d(function () { return new Iterator(this, 'key+value'); }),
-	forEach: d(function (cb/*, thisArg*/) {
-		var thisArg = arguments[1], iterator, result, value;
-		callable(cb);
-		iterator = this.values();
-		result = iterator._next();
-		while (result !== undefined) {
-			value = iterator._resolve(result);
-			call.call(cb, thisArg, value, value, this);
-			result = iterator._next();
-		}
-	}),
-	has: d(function (value) {
-		return (eIndexOf.call(this.__setData__, value) !== -1);
-	}),
-	keys: d(getValues = function () { return this.values(); }),
-	size: d.gs(function () { return this.__setData__.length; }),
-	values: d(function () { return new Iterator(this); }),
-	toString: d(function () { return '[object Set]'; })
-}));
-defineProperty(SetPoly.prototype, Symbol.iterator, d(getValues));
-defineProperty(SetPoly.prototype, Symbol.toStringTag, d('c', 'Set'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/primitive/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/primitive/index.js
deleted file mode 100644
index 4565887d415a9a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/primitive/index.js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict';
-
-var callable       = require('es5-ext/object/valid-callable')
-  , clear          = require('es5-ext/object/clear')
-  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , d              = require('d')
-  , iterator       = require('es6-iterator/valid-iterable')
-  , forOf          = require('es6-iterator/for-of')
-  , Set            = require('../polyfill')
-  , Iterator       = require('../lib/primitive-iterator')
-
-  , create = Object.create, defineProperties = Object.defineProperties
-  , defineProperty = Object.defineProperty
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , PrimitiveSet;
-
-module.exports = PrimitiveSet = function (/*iterable, serialize*/) {
-	var iterable = arguments[0], serialize = arguments[1];
-	if (!(this instanceof PrimitiveSet)) {
-		return new PrimitiveSet(iterable, serialize);
-	}
-	if (this.__setData__ !== undefined) {
-		throw new TypeError(this + " cannot be reinitialized");
-	}
-	if (iterable != null) iterator(iterable);
-	if (serialize !== undefined) {
-		callable(serialize);
-		defineProperty(this, '_serialize', d('', serialize));
-	}
-	defineProperties(this, {
-		__setData__: d('c', create(null)),
-		__size__: d('w', 0)
-	});
-	if (!iterable) return;
-	forOf(iterable, function (value) {
-		var key = this._serialize(value);
-		if (key == null) throw new TypeError(value + " cannot be serialized");
-		if (hasOwnProperty.call(this.__setData__, key)) return;
-		this.__setData__[key] = value;
-		++this.__size__;
-	}, this);
-};
-if (setPrototypeOf) setPrototypeOf(PrimitiveSet, Set);
-
-PrimitiveSet.prototype = create(Set.prototype, {
-	constructor: d(PrimitiveSet),
-	_serialize: d(function (value) {
-		if (value && (typeof value.toString !== 'function')) return null;
-		return String(value);
-	}),
-	add: d(function (value) {
-		var key = this._serialize(value);
-		if (key == null) throw new TypeError(value + " cannot be serialized");
-		if (hasOwnProperty.call(this.__setData__, key)) return this;
-		this.__setData__[key] = value;
-		++this.__size__;
-		this.emit('_add', key);
-		return this;
-	}),
-	clear: d(function () {
-		if (!this.__size__) return;
-		clear(this.__setData__);
-		this.__size__ = 0;
-		this.emit('_clear');
-	}),
-	delete: d(function (value) {
-		var key = this._serialize(value);
-		if (key == null) return false;
-		if (!hasOwnProperty.call(this.__setData__, key)) return false;
-		delete this.__setData__[key];
-		--this.__size__;
-		this.emit('_delete', key);
-		return true;
-	}),
-	entries: d(function () { return new Iterator(this, 'key+value'); }),
-	get: d(function (key) {
-		key = this._serialize(key);
-		if (key == null) return;
-		return this.__setData__[key];
-	}),
-	has: d(function (value) {
-		var key = this._serialize(value);
-		if (key == null) return false;
-		return hasOwnProperty.call(this.__setData__, key);
-	}),
-	size: d.gs(function () { return this.__size__; }),
-	values: d(function () { return new Iterator(this); })
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/copy.js
deleted file mode 100644
index 84fe912a36f735..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/copy.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var toArray = require('es5-ext/array/to-array')
-  , Set     = require('../../');
-
-module.exports = function (t, a) {
-	var content = ['raz', 2, true], set = new Set(content), copy;
-
-	copy = t.call(set);
-	a.not(copy, set, "Copy");
-	a.deep(toArray(copy), content, "Content");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/every.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/every.js
deleted file mode 100644
index f56ca385fa5a73..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/every.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var Set = require('../../');
-
-module.exports = function (t, a) {
-	a(t.call(new Set(), Boolean), true, "Empty set");
-	a(t.call(new Set([2, 3, 4]), Boolean), true, "Truthy");
-	a(t.call(new Set([2, 0, 4]), Boolean), false, "Falsy");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-first.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-first.js
deleted file mode 100644
index f99829e5afe0bc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-first.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var Set     = require('../../');
-
-module.exports = function (t, a) {
-	var content = ['raz', 2, true], set = new Set(content);
-
-	a(t.call(set), 'raz');
-
-	set = new Set();
-	a(t.call(set), undefined);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-last.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-last.js
deleted file mode 100644
index 1dcc993ed0ec73..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/get-last.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var Set     = require('../../');
-
-module.exports = function (t, a) {
-	var content = ['raz', 2, true], set = new Set(content);
-
-	a(t.call(set), true);
-
-	set = new Set();
-	a(t.call(set), undefined);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/some.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/some.js
deleted file mode 100644
index 84ce11916a8bb9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/ext/some.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var Set = require('../../');
-
-module.exports = function (t, a) {
-	a(t.call(new Set(), Boolean), false, "Empty set");
-	a(t.call(new Set([2, 3, 4]), Boolean), true, "All true");
-	a(t.call(new Set([0, false, 4]), Boolean), true, "Some false");
-	a(t.call(new Set([0, false, null]), Boolean), false, "All false");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/implement.js
deleted file mode 100644
index 4882d3786a62d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Set, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/index.js
deleted file mode 100644
index 19c64865097d31..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) { a((new T(['raz', 'dwa'])).size, 2); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-implemented.js
deleted file mode 100644
index 124793e7373f1c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Set;
-	global.Set = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Set;
-	else global.Set = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-set.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-set.js
deleted file mode 100644
index c969cce232f0d6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/is-set.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SetPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Set !== 'undefined') {
-		a(t(new Set()), true, "Native");
-	}
-	a(t(new SetPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/iterator.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/iterator.js
deleted file mode 100644
index 9e5cfb91b9217f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/iterator.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var Set     = require('../../polyfill')
-  , toArray = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var set = new Set(['raz', 'dwa']);
-
-	a.deep(toArray(new T(set)), ['raz', 'dwa'], "Default");
-	a.deep(toArray(new T(set, 'key+value')), [['raz', 'raz'], ['dwa', 'dwa']],
-		"Key & Value");
-	a.deep(toArray(new T(set, 'value')), ['raz', 'dwa'], "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/primitive-iterator.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/primitive-iterator.js
deleted file mode 100644
index 2a4956b80b3877..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/lib/primitive-iterator.js
+++ /dev/null
@@ -1,113 +0,0 @@
-'use strict';
-
-var Set            = require('../../primitive')
-  , toArray        = require('es5-ext/array/to-array')
-  , iteratorSymbol = require('es6-symbol').iterator
-
-  , compare, map;
-
-compare = function (a, b) {
-	if (!a.value) return -1;
-	if (!b.value) return 1;
-	return a.value.localeCompare(b.value);
-};
-
-map = function (arr) {
-	return arr.sort().map(function (value) {
-		return { done: false, value: value };
-	});
-};
-
-module.exports = function (T) {
-	return {
-		"": function (a) {
-			var arr = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it, y, z
-			  , set = new Set(arr), result = [];
-
-			it = new T(set);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			y = it.next();
-			result.push(y);
-			z = it.next();
-			a.not(y, z, "Recreate result");
-			result.push(z);
-			result.push(it.next());
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), map(arr));
-			a.deep(y = it.next(), { done: true, value: undefined }, "End");
-			a.not(y, it.next(), "Recreate result on dead");
-		},
-		Emited: function (a) {
-			var arr = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it
-			  , set = new Set(arr), result = [];
-
-			it = new T(set);
-			result.push(it.next());
-			result.push(it.next());
-			set.add('sześć');
-			arr.push('sześć');
-			result.push(it.next());
-			set.delete('pięć');
-			arr.splice(4, 1);
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), map(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited #2": function (a) {
-			var arr = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it
-			  , set = new Set(arr), result = [];
-
-			it = new T(set);
-			result.push(it.next());
-			result.push(it.next());
-			set.add('siedem');
-			set.delete('siedem');
-			result.push(it.next());
-			result.push(it.next());
-			set.delete('pięć');
-			arr.splice(4, 1);
-			result.push(it.next());
-			a.deep(result.sort(compare), map(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #1": function (a) {
-			var arr = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it
-			  , set = new Set(arr), result = [];
-
-			it = new T(set);
-			result.push(it.next());
-			result.push(it.next());
-			arr = ['raz', 'dwa'];
-			set.clear();
-			a.deep(result.sort(compare), map(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #2": function (a) {
-			var arr = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it
-			  , set = new Set(arr), result = [];
-
-			it = new T(set);
-			result.push(it.next());
-			result.push(it.next());
-			set.clear();
-			set.add('foo');
-			set.add('bar');
-			arr = ['raz', 'dwa', 'foo', 'bar'];
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), map(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Kinds: function (a) {
-			var set = new Set(['raz', 'dwa']);
-
-			a.deep(toArray(new T(set)).sort(), ['raz', 'dwa'].sort(), "Default");
-			a.deep(toArray(new T(set, 'key+value')).sort(),
-				[['raz', 'raz'], ['dwa', 'dwa']].sort(), "Key & Value");
-			a.deep(toArray(new T(set, 'value')).sort(), ['raz', 'dwa'].sort(),
-				"Other");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/polyfill.js
deleted file mode 100644
index 10ce6d39eb2b7a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/polyfill.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-var aFrom   = require('es5-ext/array/from')
-  , toArray = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var arr = ['raz', 'dwa', 'trzy'], set = new T(arr), x = {}, y = {}, i = 0;
-
-	a(set instanceof T, true, "Set");
-	a(set.size, 3, "Size");
-	a(set.has('raz'), true, "Has: true");
-	a(set.has(x), false, "Has: false");
-	a(set.add(x), set, "Add: return");
-	a(set.has(x), true, "Add");
-	a(set.size, 4, "Add: Size");
-	a(set.delete({}), false, "Delete: false");
-
-	arr.push(x);
-	set.forEach(function () {
-		a.deep(aFrom(arguments), [arr[i], arr[i], set],
-			"ForEach: Arguments:  #" + i);
-		a(this, y, "ForEach: Context: #" + i);
-		if (i === 0) {
-			a(set.delete('raz'), true, "Delete: true");
-			a(set.has('raz'), false, "Delete");
-			a(set.size, 3, "Delete: size");
-			set.add('cztery');
-			arr.push('cztery');
-		}
-		i++;
-	}, y);
-	arr.splice(0, 1);
-
-	a.deep(toArray(set.entries()), [['dwa', 'dwa'], ['trzy', 'trzy'], [x, x],
-		['cztery', 'cztery']], "Entries");
-	a.deep(toArray(set.keys()), ['dwa', 'trzy', x, 'cztery'], "Keys");
-	a.deep(toArray(set.values()), ['dwa', 'trzy', x, 'cztery'], "Values");
-	a.deep(toArray(set), ['dwa', 'trzy', x, 'cztery'], "Iterator");
-
-	set.clear();
-	a(set.size, 0, "Clear: size");
-	a(set.has('trzy'), false, "Clear: has");
-	a.deep(toArray(set), [], "Clear: Values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/primitive/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/primitive/index.js
deleted file mode 100644
index 54765d2ae2b925..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/primitive/index.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-var aFrom       = require('es5-ext/array/from')
-  , getIterator = require('es6-iterator/get')
-  , toArray     = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var arr = ['raz', 'dwa', 'trzy'], set = new T(arr), x = 'other', y = 'other2'
-	  , i = 0, result = [];
-
-	a(set instanceof T, true, "Set");
-	a(set.size, 3, "Size");
-	a(set.has('raz'), true, "Has: true");
-	a(set.has(x), false, "Has: false");
-	a(set.add(x), set, "Add: return");
-	a(set.has(x), true, "Add");
-	a(set.size, 4, "Add: Size");
-	a(set.delete('else'), false, "Delete: false");
-	a(set.get('raz'), 'raz', "Get");
-
-	arr.push(x);
-	set.forEach(function () {
-		result.push(aFrom(arguments));
-		a(this, y, "ForEach: Context: #" + i);
-	}, y);
-
-	a.deep(result.sort(function (a, b) {
-		return a[0].localeCompare(b[0]);
-	}), arr.sort().map(function (val) { return [val, val, set]; }));
-
-	a.deep(toArray(set.entries()).sort(), [['dwa', 'dwa'], ['trzy', 'trzy'],
-		[x, x], ['raz', 'raz']].sort(), "Entries");
-	a.deep(toArray(set.keys()).sort(), ['dwa', 'trzy', x, 'raz'].sort(),
-		"Keys");
-	a.deep(toArray(set.values()).sort(), ['dwa', 'trzy', x, 'raz'].sort(),
-		"Values");
-	a.deep(toArray(getIterator(set)).sort(), ['dwa', 'trzy', x, 'raz'].sort(),
-		"Iterator");
-
-	set.clear();
-	a(set.size, 0, "Clear: size");
-	a(set.has('trzy'), false, "Clear: has");
-	a.deep(toArray(set.values()), [], "Clear: Values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/valid-set.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/valid-set.js
deleted file mode 100644
index 8c71f5f8c709e4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/test/valid-set.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SetPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var set;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Set !== 'undefined') {
-		set = new Set();
-		a(t(set), set, "Native");
-	}
-	set = new SetPoly();
-	a(t(set), set, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.lint b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.lint
deleted file mode 100644
index 701a50ce430c63..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.lint
+++ /dev/null
@@ -1,13 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 80
-
-ass
-nomen
-plusplus
-
-newcap
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.travis.yml
deleted file mode 100644
index afd3509a26b27d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-symbol@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/CHANGES
deleted file mode 100644
index ff5e1b480cb2bb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/CHANGES
+++ /dev/null
@@ -1,12 +0,0 @@
-v0.1.1  --  2014.10.07
-* Fix isImplemented, so it returns true in case of polyfill
-* Improve documentations
-
-v0.1.0  --  2014.04.28
-* Assure strictly npm dependencies
-* Update to use latest versions of dependencies
-* Fix implementation detection so it doesn't crash on `String(symbol)`
-* throw on `new Symbol()` (as decided by TC39)
-
-v0.0.0  --  2013.11.15
-* Initial (dev) version
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/README.md
deleted file mode 100644
index 978eb59d8d55be..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# es6-symbol
-## ECMAScript6 Symbol polyfill
-
-### Limitations
-
-- Underneath it uses real string property names which can easily be retrieved (however accidental collision with other property names is unlikely)
-- As it needs custom `toString` behavior to work properly. Original `Symbol.prototype.toString` couldn't be implemented as specified, still it's accessible as `Symbol.prototoype.properToString`
-
-### Usage
-
-If you want to make sure your environment implements `Symbol`, do:
-
-```javascript
-require('es6-symbol/implement');
-```
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `Symbol` on global scope, do:
-
-```javascript
-var Symbol = require('es6-symbol');
-```
-
-If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
-
-```javascript
-var Symbol = require('es6-symbol/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Symbol = require('es6-symbol');
-
-var symbol = Symbol('My custom symbol');
-var x = {};
-
-x[symbol] = 'foo';
-console.log(x[symbol]); 'foo'
-
-// Detect iterable:
-var iterator, result;
-if (possiblyIterable[Symbol.iterator]) {
-  iterator = possiblyIterable[Symbol.iterator]();
-  result = iterator.next();
-  while(!result.done) {
-    console.log(result.value);
-    result = iterator.next();
-  }
-}
-```
-
-### Installation
-#### NPM
-
-In your project path:
-
-	$ npm install es6-symbol
-
-##### Browser
-
-You can easily bundle _es6-symbol_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/implement.js
deleted file mode 100644
index 153edacdbedf9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(require('es5-ext/global'), 'Symbol',
-		{ value: require('./polyfill'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/index.js
deleted file mode 100644
index 609f1faf551164..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-implemented.js
deleted file mode 100644
index 02a06b5a80c16b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-implemented.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var symbol;
-	if (typeof Symbol !== 'function') return false;
-	symbol = Symbol('test symbol');
-	try { String(symbol); } catch (e) { return false; }
-	if (typeof Symbol.iterator === 'symbol') return true;
-
-	// Return 'true' for polyfills
-	if (typeof Symbol.isConcatSpreadable !== 'object') return false;
-	if (typeof Symbol.isRegExp !== 'object') return false;
-	if (typeof Symbol.iterator !== 'object') return false;
-	if (typeof Symbol.toPrimitive !== 'object') return false;
-	if (typeof Symbol.toStringTag !== 'object') return false;
-	if (typeof Symbol.unscopables !== 'object') return false;
-
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-native-implemented.js
deleted file mode 100644
index a8cb8b8681ee69..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-native-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Exports true if environment provides native `Symbol` implementation
-
-'use strict';
-
-module.exports = (function () {
-	if (typeof Symbol !== 'function') return false;
-	return (typeof Symbol.iterator === 'symbol');
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-symbol.js
deleted file mode 100644
index dcf72c9aaa353e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/is-symbol.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var toString    = Object.prototype.toString
-  , toStringTag = require('./').toStringTag
-
-  , id = '[object Symbol]'
-  , Global = (typeof Symbol === 'undefined') ? null : Symbol;
-
-module.exports = function (x) {
-	return (x && ((Global && (x instanceof Global)) ||
-			(toString.call(x) === id) || (x[toStringTag] === 'Symbol'))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/package.json
deleted file mode 100644
index a6ddc1a46c29b3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-  "name": "es6-symbol",
-  "version": "0.1.1",
-  "description": "ECMAScript6 Symbol polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "symbol",
-    "private",
-    "property",
-    "es6",
-    "ecmascript",
-    "harmony"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-symbol.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.4"
-  },
-  "devDependencies": {
-    "tad": "0.2.x"
-  },
-  "scripts": {
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "2ca76a05feafaa14c838337722562625fb5072b4",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-symbol/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-symbol",
-  "_id": "es6-symbol@0.1.1",
-  "_shasum": "9cf7fab2edaff1b1da8fe8e68bfe3f5aca6ca218",
-  "_from": "es6-symbol@>=0.1.1 <0.2.0",
-  "_npmVersion": "2.0.0",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "9cf7fab2edaff1b1da8fe8e68bfe3f5aca6ca218",
-    "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-0.1.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-0.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/polyfill.js
deleted file mode 100644
index f7dfa258720d9f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/polyfill.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-var d = require('d')
-
-  , create = Object.create, defineProperties = Object.defineProperties
-  , generateName, Symbol;
-
-generateName = (function () {
-	var created = create(null);
-	return function (desc) {
-		var postfix = 0;
-		while (created[desc + (postfix || '')]) ++postfix;
-		desc += (postfix || '');
-		created[desc] = true;
-		return '@@' + desc;
-	};
-}());
-
-module.exports = Symbol = function (description) {
-	var symbol;
-	if (this instanceof Symbol) {
-		throw new TypeError('TypeError: Symbol is not a constructor');
-	}
-	symbol = create(Symbol.prototype);
-	description = (description === undefined ? '' : String(description));
-	return defineProperties(symbol, {
-		__description__: d('', description),
-		__name__: d('', generateName(description))
-	});
-};
-
-Object.defineProperties(Symbol, {
-	create: d('', Symbol('create')),
-	hasInstance: d('', Symbol('hasInstance')),
-	isConcatSpreadable: d('', Symbol('isConcatSpreadable')),
-	isRegExp: d('', Symbol('isRegExp')),
-	iterator: d('', Symbol('iterator')),
-	toPrimitive: d('', Symbol('toPrimitive')),
-	toStringTag: d('', Symbol('toStringTag')),
-	unscopables: d('', Symbol('unscopables'))
-});
-
-defineProperties(Symbol.prototype, {
-	properToString: d(function () {
-		return 'Symbol (' + this.__description__ + ')';
-	}),
-	toString: d('', function () { return this.__name__; })
-});
-Object.defineProperty(Symbol.prototype, Symbol.toPrimitive, d('',
-	function (hint) {
-		throw new TypeError("Conversion of symbol objects is not allowed");
-	}));
-Object.defineProperty(Symbol.prototype, Symbol.toStringTag, d('c', 'Symbol'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/implement.js
deleted file mode 100644
index eb35c3018835c7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/index.js
deleted file mode 100644
index 62b3296df6fc5e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('d')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-implemented.js
deleted file mode 100644
index bb0d64536ebbae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Symbol;
-	global.Symbol = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Symbol;
-	else global.Symbol = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-symbol.js
deleted file mode 100644
index ac24b9abbff4e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/is-symbol.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Symbol !== 'undefined') {
-		a(t(Symbol()), true, "Native");
-	}
-	a(t(SymbolPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/polyfill.js
deleted file mode 100644
index cac9cd51935301..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/polyfill.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var d        = require('d')
-  , isSymbol = require('../is-symbol')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-
-	a(isSymbol(symbol), true, "Symbol");
-	a(isSymbol(T.iterator), true, "iterator");
-	a(isSymbol(T.toStringTag), true, "toStringTag");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-iterable.js
deleted file mode 100644
index d277bc97f41125..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-iterable.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var Iterator = require('../');
-
-module.exports = function (t, a) {
-	var obj;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t({}); }, TypeError, "Plain object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	obj = { '@@iterator': function () { return new Iterator([]); } };
-	a(t(obj), obj, "Iterator");
-	obj = [];
-	a(t(obj), obj, 'Array');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-symbol.js
deleted file mode 100644
index 2c8f84c8239b6e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/test/valid-symbol.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var symbol;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Symbol !== 'undefined') {
-		symbol = Symbol();
-		a(t(symbol), symbol, "Native");
-	}
-	symbol = SymbolPoly();
-	a(t(symbol), symbol, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/valid-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/valid-symbol.js
deleted file mode 100644
index 42750043d4271c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-symbol/valid-symbol.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isSymbol = require('./is-symbol');
-
-module.exports = function (value) {
-	if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.npmignore
deleted file mode 100644
index 68ebfddd24fb33..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.DS_Store
-/.lintcache
-/node_modules
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.travis.yml
deleted file mode 100644
index a6ec240dfdf156..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-before_install:
-  - mkdir node_modules; ln -s ../ node_modules/event-emitter
-
-notifications:
-  email:
-    - medikoo+event-emitter@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/CHANGES
deleted file mode 100644
index dbc1b1777e9194..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/CHANGES
+++ /dev/null
@@ -1,66 +0,0 @@
-v0.3.3  --  2015.01.30
-* Fix reference to module in benchmarks
-
-v0.3.2  --  2015.01.20
-* Improve documentation
-* Configure lint scripts
-* Fix spelling of LICENSE
-
-v0.3.1  --  2014.04.25
-* Fix redefinition of emit method in `pipe`
-* Allow custom emit method name in `pipe`
-
-v0.3.0  --  2014.04.24
-* Move out from lib folder
-* Do not expose all utilities on main module
-* Support objects which do not inherit from Object.prototype
-* Improve arguments validation
-* Improve internals
-* Remove Makefile
-* Improve documentation
-
-v0.2.2  --  2013.06.05
-* `unify` functionality
-
-v0.2.1  --  2012.09.21
-* hasListeners module
-* Simplified internal id (improves performance a little), now it starts with
-  underscore (hint it's private). Abstracted it to external module to have it
-  one place
-* Documentation cleanup
-
-v0.2.0  --  2012.09.19
-* Trashed poor implementation of v0.1 and came up with something solid
-
-Changes:
-* Improved performance
-* Fixed bugs event-emitter is now cross-prototype safe and not affected by
-  unexpected methods attached to Object.prototype
-* Removed support for optional "emitter" argument in `emit` method, it was
-  cumbersome to use, and should be solved just with event objects
-
-v0.1.5  --  2012.08.06
-* (maintanance) Do not use descriptors for internal objects, it exposes V8 bugs
-  (only Node v0.6 branch)
-
-v0.1.4  --  2012.06.13
-* Fix detachment of listeners added with 'once'
-
-v0.1.3  --  2012.05.28
-* Updated es5-ext to latest version (v0.8)
-* Cleared package.json so it's in npm friendly format
-
-v0.1.2  --  2012.01.22
-* Support for emitter argument in emit function, this allows some listeners not
-  to be notified about event
-* allOff - removes all listeners from object
-* All methods returns self object
-* Internal fixes
-* Travis CI integration
-
-v0.1.1  --  2011.08.08
-* Added TAD test suite to devDependencies, configured test commands.
-  Tests can be run with 'make test' or 'npm test'
-
-v0.1.0  --  2011.08.08
-Initial version
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/README.md b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/README.md
deleted file mode 100644
index 17f4524fd75403..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# event-emitter
-## Environment agnostic event emitter
-
-### Installation
-
-	$ npm install event-emitter
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-### Usage
-
-```javascript
-var ee = require('event-emitter');
-
-var emitter = ee({}), listener;
-
-emitter.on('test', listener = function (args) {
-  // …emitter logic
-});
-
-emitter.once('test', function (args) {
-  // …invoked only once(!)
-});
-
-emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked
-emitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked
-
-emitter.off('test', listener);              // Removed first listener
-emitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked
-```
-### Additional utilities
-
-#### allOff(obj) _(event-emitter/all-off)_
-
-Removes all listeners from given event emitter object
-
-#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_
-
-Whether object has some listeners attached to the object.
-When `name` is provided, it checks listeners for specific event name
-
-```javascript
-var emitter = ee();
-var hasListeners = require('event-emitter/has-listeners');
-var listener = function () {};
-
-hasListeners(emitter); // false
-
-emitter.on('foo', listener);
-hasListeners(emitter); // true
-hasListeners(emitter, 'foo'); // true
-hasListeners(emitter, 'bar'); // false
-
-emitter.off('foo', listener);
-hasListeners(emitter, 'foo'); // false
-```
-
-#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_
-
-Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way).  
-Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_.  
-It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument.
-
-#### unify(emitter1, emitter2) _(event-emitter/unify)_
-
-Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitter on _emitter2_, and other way back.  
-Non reversible.
-
-```javascript
-var eeUnify = require('event-emitter/unify');
-
-var emitter1 = ee(), listener1, listener3;
-var emitter2 = ee(), listener2, listener4;
-
-emitter1.on('test', listener1 = function () { });
-emitter2.on('test', listener2 = function () { });
-
-emitter1.emit('test'); // Invoked listener1
-emitter2.emit('test'); // Invoked listener2
-
-var unify = eeUnify(emitter1, emitter2);
-
-emitter1.emit('test'); // Invoked listener1 and listener2
-emitter2.emit('test'); // Invoked listener1 and listener2
-
-emitter1.on('test', listener3 = function () { });
-emitter2.on('test', listener4 = function () { });
-
-emitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4
-emitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4
-```
-
-### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/many-on.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/many-on.js
deleted file mode 100644
index e09bfde8489386..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/many-on.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-
-// Benchmark comparing performance of event emit for many listeners
-// To run it, do following in memoizee package path:
-//
-// $ npm install eventemitter2 signals
-// $ node benchmark/many-on.js
-
-var forEach    = require('es5-ext/object/for-each')
-  , pad        = require('es5-ext/string/#/pad')
-
-  , now = Date.now
-
-  , time, count = 1000000, i, data = {}
-  , ee, native, ee2, signals, a = {}, b = {};
-
-ee = (function () {
-	var ee = require('../')();
-	ee.on('test', function () { return arguments; });
-	ee.on('test', function () { return arguments; });
-	return ee.on('test', function () { return arguments; });
-}());
-
-native = (function () {
-	var ee = require('events');
-	ee = new ee.EventEmitter();
-	ee.on('test', function () { return arguments; });
-	ee.on('test', function () { return arguments; });
-	return ee.on('test', function () { return arguments; });
-}());
-
-ee2 = (function () {
-	var ee = require('eventemitter2');
-	ee = new ee.EventEmitter2();
-	ee.on('test', function () { return arguments; });
-	ee.on('test', function () { return arguments; });
-	return ee.on('test', function () { return arguments; });
-}());
-
-signals = (function () {
-	var Signal = require('signals')
-	  , ee = { test: new Signal() };
-	ee.test.add(function () { return arguments; });
-	ee.test.add(function () { return arguments; });
-	ee.test.add(function () { return arguments; });
-	return ee;
-}());
-
-console.log("Emit for 3 listeners", "x" + count + ":\n");
-
-i = count;
-time = now();
-while (i--) {
-	ee.emit('test', a, b);
-}
-data["event-emitter (this implementation)"] = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	native.emit('test', a, b);
-}
-data["EventEmitter (Node.js native)"] = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	ee2.emit('test', a, b);
-}
-data.EventEmitter2 = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	signals.test.dispatch(a, b);
-}
-data.Signals = now() - time;
-
-forEach(data, function (value, name, obj, index) {
-	console.log(index + 1 + ":",  pad.call(value, " ", 5), name);
-}, null, function (a, b) {
-	return this[a] - this[b];
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/single-on.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/single-on.js
deleted file mode 100644
index 99decbdae72566..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/benchmark/single-on.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict';
-
-// Benchmark comparing performance of event emit for single listener
-// To run it, do following in memoizee package path:
-//
-// $ npm install eventemitter2 signals
-// $ node benchmark/single-on.js
-
-var forEach    = require('es5-ext/object/for-each')
-  , pad        = require('es5-ext/string/#/pad')
-
-  , now = Date.now
-
-  , time, count = 1000000, i, data = {}
-  , ee, native, ee2, signals, a = {}, b = {};
-
-ee = (function () {
-	var ee = require('../');
-	return ee().on('test', function () { return arguments; });
-}());
-
-native = (function () {
-	var ee = require('events');
-	return (new ee.EventEmitter()).on('test', function () { return arguments; });
-}());
-
-ee2 = (function () {
-	var ee = require('eventemitter2');
-	return (new ee.EventEmitter2()).on('test', function () { return arguments; });
-}());
-
-signals = (function () {
-	var Signal = require('signals')
-	  , ee = { test: new Signal() };
-	ee.test.add(function () { return arguments; });
-	return ee;
-}());
-
-console.log("Emit for single listener", "x" + count + ":\n");
-
-i = count;
-time = now();
-while (i--) {
-	ee.emit('test', a, b);
-}
-data["event-emitter (this implementation)"] = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	native.emit('test', a, b);
-}
-data["EventEmitter (Node.js native)"] = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	ee2.emit('test', a, b);
-}
-data.EventEmitter2 = now() - time;
-
-i = count;
-time = now();
-while (i--) {
-	signals.test.dispatch(a, b);
-}
-data.Signals = now() - time;
-
-forEach(data, function (value, name, obj, index) {
-	console.log(index + 1 + ":",  pad.call(value, " ", 5), name);
-}, null, function (a, b) {
-	return this[a] - this[b];
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/package.json
deleted file mode 100644
index 17a904eabba836..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
-  "name": "event-emitter",
-  "version": "0.3.3",
-  "description": "Environment agnostic event emitter",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "event",
-    "events",
-    "trigger",
-    "observer",
-    "listener",
-    "emitter",
-    "pubsub"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/event-emitter.git"
-  },
-  "dependencies": {
-    "es5-ext": "~0.10.5",
-    "d": "~0.1.1"
-  },
-  "devDependencies": {
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "13f184ab039e3559164691d3a6a3d6b8c84aed3e",
-  "bugs": {
-    "url": "https://github.com/medikoo/event-emitter/issues"
-  },
-  "homepage": "https://github.com/medikoo/event-emitter",
-  "_id": "event-emitter@0.3.3",
-  "_shasum": "df8e806541c68ab8ff20a79a1841b91abaa1bee4",
-  "_from": "event-emitter@>=0.3.1 <0.4.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "df8e806541c68ab8ff20a79a1841b91abaa1bee4",
-    "tarball": "http://registry.npmjs.org/event-emitter/-/event-emitter-0.3.3.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.3.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/all-off.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/all-off.js
deleted file mode 100644
index 8aa872e9c9478d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/all-off.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-var ee = require('../');
-
-module.exports = function (t, a) {
-	var x, count, count2;
-
-	x = ee();
-	count = 0;
-	count2 = 0;
-	x.on('foo', function () {
-		++count;
-	});
-	x.on('foo', function () {
-		++count;
-	});
-	x.on('bar', function () {
-		++count2;
-	});
-	x.on('bar', function () {
-		++count2;
-	});
-	t(x, 'foo');
-	x.emit('foo');
-	x.emit('bar');
-	a(count, 0, "All off: type");
-	a(count2, 2, "All off: ohter type");
-
-	count = 0;
-	count2 = 0;
-	x.on('foo', function () {
-		++count;
-	});
-	x.on('foo', function () {
-		++count;
-	});
-	x.on('bar', function () {
-		++count2;
-	});
-	x.on('bar', function () {
-		++count2;
-	});
-	t(x);
-	x.emit('foo');
-	x.emit('bar');
-	a(count, 0, "All off: type");
-	a(count2, 0, "All off: other type");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/has-listeners.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/has-listeners.js
deleted file mode 100644
index 875b048a4193cb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/has-listeners.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-var ee = require('../');
-
-module.exports = function (t) {
-	var x, y;
-	return {
-		Any: function (a) {
-			a(t(true), false, "Primitive");
-			a(t({ events: [] }), false, "Other object");
-			a(t(x = ee()), false, "Emitter: empty");
-
-			x.on('test', y = function () {});
-			a(t(x), true, "Emitter: full");
-			x.off('test', y);
-			a(t(x), false, "Emitter: empty but touched");
-			x.once('test', y = function () {});
-			a(t(x), true, "Emitter: full: Once");
-			x.off('test', y);
-			a(t(x), false, "Emitter: empty but touched by once");
-		},
-		Specific: function (a) {
-			a(t(true, 'test'), false, "Primitive");
-			a(t({ events: [] }, 'test'), false, "Other object");
-			a(t(x = ee(), 'test'), false, "Emitter: empty");
-
-			x.on('test', y = function () {});
-			a(t(x, 'test'), true, "Emitter: full");
-			a(t(x, 'foo'), false, "Emitter: full, other event");
-			x.off('test', y);
-			a(t(x, 'test'), false, "Emitter: empty but touched");
-			a(t(x, 'foo'), false, "Emitter: empty but touched, other event");
-
-			x.once('test', y = function () {});
-			a(t(x, 'test'), true, "Emitter: full: Once");
-			a(t(x, 'foo'), false, "Emitter: full: Once,  other event");
-			x.off('test', y);
-			a(t(x, 'test'), false, "Emitter: empty but touched by once");
-			a(t(x, 'foo'), false, "Emitter: empty but touched by once, other event");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/index.js
deleted file mode 100644
index c7c3f24c476862..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/index.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = t(), y, count, count2, count3, count4, test, listener1, listener2;
-
-	x.emit('none');
-
-	test = "Once: ";
-	count = 0;
-	x.once('foo', function (a1, a2, a3) {
-		a(this, x, test + "Context");
-		a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments");
-		++count;
-	});
-
-	x.emit('foobar');
-	a(count, 0, test + "Not invoked on other event");
-	x.emit('foo', 'foo', x, 15);
-	a(count, 1, test + "Emitted");
-	x.emit('foo');
-	a(count, 1, test + "Emitted once");
-
-	test = "On & Once: ";
-	count = 0;
-	x.on('foo', listener1 = function (a1, a2, a3) {
-		a(this, x, test + "Context");
-		a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments");
-		++count;
-	});
-	count2 = 0;
-	x.once('foo', listener2 = function (a1, a2, a3) {
-		a(this, x, test + "Context");
-		a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments");
-		++count2;
-	});
-
-	x.emit('foobar');
-	a(count, 0, test + "Not invoked on other event");
-	x.emit('foo', 'foo', x, 15);
-	a(count, 1, test + "Emitted");
-	x.emit('foo', 'foo', x, 15);
-	a(count, 2, test + "Emitted twice");
-	a(count2, 1, test + "Emitted once");
-	x.off('foo', listener1);
-	x.emit('foo');
-	a(count, 2, test + "Not emitter after off");
-
-	count = 0;
-	x.once('foo', listener1 = function () { ++count; });
-
-	x.off('foo', listener1);
-	x.emit('foo');
-	a(count, 0, "Once Off: Not emitted");
-
-	count = 0;
-	x.on('foo', listener2 = function () {});
-	x.once('foo', listener1 = function () { ++count; });
-
-	x.off('foo', listener1);
-	x.emit('foo');
-	a(count, 0, "Once Off (multi): Not emitted");
-	x.off('foo', listener2);
-
-	test = "Prototype Share: ";
-
-	y = Object.create(x);
-
-	count = 0;
-	count2 = 0;
-	count3 = 0;
-	count4 = 0;
-	x.on('foo', function () {
-		++count;
-	});
-	y.on('foo', function () {
-		++count2;
-	});
-	x.once('foo', function () {
-		++count3;
-	});
-	y.once('foo', function () {
-		++count4;
-	});
-	x.emit('foo');
-	a(count, 1, test + "x on count");
-	a(count2, 0, test + "y on count");
-	a(count3, 1, test + "x once count");
-	a(count4, 0, test + "y once count");
-
-	y.emit('foo');
-	a(count, 1, test + "x on count");
-	a(count2, 1, test + "y on count");
-	a(count3, 1, test + "x once count");
-	a(count4, 1, test + "y once count");
-
-	x.emit('foo');
-	a(count, 2, test + "x on count");
-	a(count2, 1, test + "y on count");
-	a(count3, 1, test + "x once count");
-	a(count4, 1, test + "y once count");
-
-	y.emit('foo');
-	a(count, 2, test + "x on count");
-	a(count2, 2, test + "y on count");
-	a(count3, 1, test + "x once count");
-	a(count4, 1, test + "y once count");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/pipe.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/pipe.js
deleted file mode 100644
index 9d15d6dae308dc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/pipe.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-var ee = require('../');
-
-module.exports = function (t, a) {
-	var x = {}, y = {}, z = {}, count, count2, count3, pipe;
-
-	ee(x);
-	x = Object.create(x);
-	ee(y);
-	ee(z);
-
-	count = 0;
-	count2 = 0;
-	count3 = 0;
-	x.on('foo', function () {
-		++count;
-	});
-	y.on('foo', function () {
-		++count2;
-	});
-	z.on('foo', function () {
-		++count3;
-	});
-
-	x.emit('foo');
-	a(count, 1, "Pre pipe, x");
-	a(count2, 0, "Pre pipe, y");
-	a(count3, 0, "Pre pipe, z");
-
-	pipe = t(x, y);
-	x.emit('foo');
-	a(count, 2, "Post pipe, x");
-	a(count2, 1, "Post pipe, y");
-	a(count3, 0, "Post pipe, z");
-
-	y.emit('foo');
-	a(count, 2, "Post pipe, on y, x");
-	a(count2, 2, "Post pipe, on y, y");
-	a(count3, 0, "Post pipe, on y, z");
-
-	t(x, z);
-	x.emit('foo');
-	a(count, 3, "Post pipe z, x");
-	a(count2, 3, "Post pipe z, y");
-	a(count3, 1, "Post pipe z, z");
-
-	pipe.close();
-	x.emit('foo');
-	a(count, 4, "Close pipe y, x");
-	a(count2, 3, "Close pipe y, y");
-	a(count3, 2, "Close pipe y, z");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/unify.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/unify.js
deleted file mode 100644
index 69295e0657ad50..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/test/unify.js
+++ /dev/null
@@ -1,123 +0,0 @@
-'use strict';
-
-var ee = require('../');
-
-module.exports = function (t) {
-
-	return {
-		"": function (a) {
-			var x = {}, y = {}, z = {}, count, count2, count3;
-
-			ee(x);
-			ee(y);
-			ee(z);
-
-			count = 0;
-			count2 = 0;
-			count3 = 0;
-			x.on('foo', function () { ++count; });
-			y.on('foo', function () { ++count2; });
-			z.on('foo', function () { ++count3; });
-
-			x.emit('foo');
-			a(count, 1, "Pre unify, x");
-			a(count2, 0, "Pre unify, y");
-			a(count3, 0, "Pre unify, z");
-
-			t(x, y);
-			a(x.__ee__, y.__ee__, "Post unify y");
-			x.emit('foo');
-			a(count, 2, "Post unify, x");
-			a(count2, 1, "Post unify, y");
-			a(count3, 0, "Post unify, z");
-
-			y.emit('foo');
-			a(count, 3, "Post unify, on y, x");
-			a(count2, 2, "Post unify, on y, y");
-			a(count3, 0, "Post unify, on y, z");
-
-			t(x, z);
-			a(x.__ee__, x.__ee__, "Post unify z");
-			x.emit('foo');
-			a(count, 4, "Post unify z, x");
-			a(count2, 3, "Post unify z, y");
-			a(count3, 1, "Post unify z, z");
-		},
-		"On empty": function (a) {
-			var x = {}, y = {}, z = {}, count, count2, count3;
-
-			ee(x);
-			ee(y);
-			ee(z);
-
-			count = 0;
-			count2 = 0;
-			count3 = 0;
-			y.on('foo', function () { ++count2; });
-			x.emit('foo');
-			a(count, 0, "Pre unify, x");
-			a(count2, 0, "Pre unify, y");
-			a(count3, 0, "Pre unify, z");
-
-			t(x, y);
-			a(x.__ee__, y.__ee__, "Post unify y");
-			x.on('foo', function () { ++count; });
-			x.emit('foo');
-			a(count, 1, "Post unify, x");
-			a(count2, 1, "Post unify, y");
-			a(count3, 0, "Post unify, z");
-
-			y.emit('foo');
-			a(count, 2, "Post unify, on y, x");
-			a(count2, 2, "Post unify, on y, y");
-			a(count3, 0, "Post unify, on y, z");
-
-			t(x, z);
-			a(x.__ee__, z.__ee__, "Post unify z");
-			z.on('foo', function () { ++count3; });
-			x.emit('foo');
-			a(count, 3, "Post unify z, x");
-			a(count2, 3, "Post unify z, y");
-			a(count3, 1, "Post unify z, z");
-		},
-		Many: function (a) {
-			var x = {}, y = {}, z = {}, count, count2, count3;
-
-			ee(x);
-			ee(y);
-			ee(z);
-
-			count = 0;
-			count2 = 0;
-			count3 = 0;
-			x.on('foo', function () { ++count; });
-			y.on('foo', function () { ++count2; });
-			y.on('foo', function () { ++count2; });
-			z.on('foo', function () { ++count3; });
-
-			x.emit('foo');
-			a(count, 1, "Pre unify, x");
-			a(count2, 0, "Pre unify, y");
-			a(count3, 0, "Pre unify, z");
-
-			t(x, y);
-			a(x.__ee__, y.__ee__, "Post unify y");
-			x.emit('foo');
-			a(count, 2, "Post unify, x");
-			a(count2, 2, "Post unify, y");
-			a(count3, 0, "Post unify, z");
-
-			y.emit('foo');
-			a(count, 3, "Post unify, on y, x");
-			a(count2, 4, "Post unify, on y, y");
-			a(count3, 0, "Post unify, on y, z");
-
-			t(x, z);
-			a(x.__ee__, x.__ee__, "Post unify z");
-			x.emit('foo');
-			a(count, 4, "Post unify z, x");
-			a(count2, 6, "Post unify z, y");
-			a(count3, 1, "Post unify z, z");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/package.json b/tools/eslint/node_modules/escope/node_modules/es6-map/package.json
deleted file mode 100644
index 51b50e23531fdb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-  "name": "es6-map",
-  "version": "0.1.1",
-  "description": "ECMAScript6 Map polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "collection",
-    "es6",
-    "shim",
-    "harmony",
-    "list",
-    "hash",
-    "map",
-    "polyfill",
-    "ecmascript"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-map.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.4",
-    "es6-iterator": "~0.1.1",
-    "es6-set": "~0.1.1",
-    "es6-symbol": "~0.1.1",
-    "event-emitter": "~0.3.1"
-  },
-  "devDependencies": {
-    "tad": "0.2.x",
-    "xlint": "~0.2.1",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "16b0bce8defe9742a40b9cac1eed194ee4e2d820",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-map/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-map",
-  "_id": "es6-map@0.1.1",
-  "_shasum": "b879239ed7819e0b08c40ba6e19fa047ca7c8d1d",
-  "_from": "es6-map@>=0.1.1 <0.2.0",
-  "_npmVersion": "2.0.0",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "b879239ed7819e0b08c40ba6e19fa047ca7c8d1d",
-    "tarball": "http://registry.npmjs.org/es6-map/-/es6-map-0.1.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/polyfill.js
deleted file mode 100644
index fc44527f54d869..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/polyfill.js
+++ /dev/null
@@ -1,100 +0,0 @@
-'use strict';
-
-var clear          = require('es5-ext/array/#/clear')
-  , eIndexOf       = require('es5-ext/array/#/e-index-of')
-  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , callable       = require('es5-ext/object/valid-callable')
-  , validValue     = require('es5-ext/object/valid-value')
-  , d              = require('d')
-  , ee             = require('event-emitter')
-  , Symbol         = require('es6-symbol')
-  , iterator       = require('es6-iterator/valid-iterable')
-  , forOf          = require('es6-iterator/for-of')
-  , Iterator       = require('./lib/iterator')
-  , isNative       = require('./is-native-implemented')
-
-  , call = Function.prototype.call, defineProperties = Object.defineProperties
-  , MapPoly;
-
-module.exports = MapPoly = function (/*iterable*/) {
-	var iterable = arguments[0], keys, values;
-	if (!(this instanceof MapPoly)) return new MapPoly(iterable);
-	if (this.__mapKeysData__ !== undefined) {
-		throw new TypeError(this + " cannot be reinitialized");
-	}
-	if (iterable != null) iterator(iterable);
-	defineProperties(this, {
-		__mapKeysData__: d('c', keys = []),
-		__mapValuesData__: d('c', values = [])
-	});
-	if (!iterable) return;
-	forOf(iterable, function (value) {
-		var key = validValue(value)[0];
-		value = value[1];
-		if (eIndexOf.call(keys, key) !== -1) return;
-		keys.push(key);
-		values.push(value);
-	}, this);
-};
-
-if (isNative) {
-	if (setPrototypeOf) setPrototypeOf(MapPoly, Map);
-	MapPoly.prototype = Object.create(Map.prototype, {
-		constructor: d(MapPoly)
-	});
-}
-
-ee(defineProperties(MapPoly.prototype, {
-	clear: d(function () {
-		if (!this.__mapKeysData__.length) return;
-		clear.call(this.__mapKeysData__);
-		clear.call(this.__mapValuesData__);
-		this.emit('_clear');
-	}),
-	delete: d(function (key) {
-		var index = eIndexOf.call(this.__mapKeysData__, key);
-		if (index === -1) return false;
-		this.__mapKeysData__.splice(index, 1);
-		this.__mapValuesData__.splice(index, 1);
-		this.emit('_delete', index, key);
-		return true;
-	}),
-	entries: d(function () { return new Iterator(this, 'key+value'); }),
-	forEach: d(function (cb/*, thisArg*/) {
-		var thisArg = arguments[1], iterator, result;
-		callable(cb);
-		iterator = this.entries();
-		result = iterator._next();
-		while (result !== undefined) {
-			call.call(cb, thisArg, this.__mapValuesData__[result],
-				this.__mapKeysData__[result], this);
-			result = iterator._next();
-		}
-	}),
-	get: d(function (key) {
-		var index = eIndexOf.call(this.__mapKeysData__, key);
-		if (index === -1) return;
-		return this.__mapValuesData__[index];
-	}),
-	has: d(function (key) {
-		return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
-	}),
-	keys: d(function () { return new Iterator(this, 'key'); }),
-	set: d(function (key, value) {
-		var index = eIndexOf.call(this.__mapKeysData__, key), emit;
-		if (index === -1) {
-			index = this.__mapKeysData__.push(key) - 1;
-			emit = true;
-		}
-		this.__mapValuesData__[index] = value;
-		if (emit) this.emit('_add', index, key);
-		return this;
-	}),
-	size: d.gs(function () { return this.__mapKeysData__.length; }),
-	values: d(function () { return new Iterator(this, 'value'); }),
-	toString: d(function () { return '[object Map]'; })
-}));
-Object.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {
-	return this.entries();
-}));
-Object.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/primitive/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/primitive/index.js
deleted file mode 100644
index 425d48265aa0f8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/primitive/index.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-
-var clear          = require('es5-ext/object/clear')
-  , setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , validValue     = require('es5-ext/object/valid-value')
-  , callable       = require('es5-ext/object/valid-callable')
-  , d              = require('d')
-  , iterator       = require('es6-iterator/valid-iterable')
-  , forOf          = require('es6-iterator/for-of')
-  , Map            = require('../polyfill')
-  , Iterator       = require('../lib/primitive-iterator')
-
-  , call = Function.prototype.call
-  , defineProperty = Object.defineProperty
-  , create = Object.create, defineProperties = Object.defineProperties
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , PrimitiveMap;
-
-module.exports = PrimitiveMap = function (/*iterable, serialize*/) {
-	var iterable = arguments[0], serialize = arguments[1];
-	if (!(this instanceof PrimitiveMap)) {
-		return new PrimitiveMap(iterable, serialize);
-	}
-	if (this.__mapData__ !== undefined) {
-		throw new TypeError(this + " cannot be reinitialized");
-	}
-	if (iterable != null) iterator(iterable);
-	if (serialize !== undefined) {
-		callable(serialize);
-		defineProperty(this, '_serialize', d('', serialize));
-	}
-	defineProperties(this, {
-		__mapKeysData__: d('c', create(null)),
-		__mapValuesData__: d('c', create(null)),
-		__size__: d('w', 0)
-	});
-	if (!iterable) return;
-	forOf(iterable, function (value) {
-		var key = validValue(value)[0], sKey = this._serialize(key);
-		if (sKey == null) throw new TypeError(key + " cannot be serialized");
-		value = value[1];
-		if (hasOwnProperty.call(this.__mapKeysData__, sKey)) {
-			if (this.__mapValuesData__[sKey] === value) return;
-		} else {
-			++this.__size__;
-		}
-		this.__mapKeysData__[sKey] = key;
-		this.__mapValuesData__[sKey] = value;
-	}, this);
-};
-if (setPrototypeOf) setPrototypeOf(PrimitiveMap, Map);
-
-PrimitiveMap.prototype = create(Map.prototype, {
-	constructor: d(PrimitiveMap),
-	_serialize: d(function (value) {
-		if (value && (typeof value.toString !== 'function')) return null;
-		return String(value);
-	}),
-	clear: d(function () {
-		if (!this.__size__) return;
-		clear(this.__mapKeysData__);
-		clear(this.__mapValuesData__);
-		this.__size__ = 0;
-		this.emit('_clear');
-	}),
-	delete: d(function (key) {
-		var sKey = this._serialize(key);
-		if (sKey == null) return false;
-		if (!hasOwnProperty.call(this.__mapKeysData__, sKey)) return false;
-		delete this.__mapKeysData__[sKey];
-		delete this.__mapValuesData__[sKey];
-		--this.__size__;
-		this.emit('_delete', sKey);
-		return true;
-	}),
-	entries: d(function () { return new Iterator(this, 'key+value'); }),
-	forEach: d(function (cb/*, thisArg*/) {
-		var thisArg = arguments[1], iterator, result, sKey;
-		callable(cb);
-		iterator = this.entries();
-		result = iterator._next();
-		while (result !== undefined) {
-			sKey = iterator.__list__[result];
-			call.call(cb, thisArg, this.__mapValuesData__[sKey],
-				this.__mapKeysData__[sKey], this);
-			result = iterator._next();
-		}
-	}),
-	get: d(function (key) {
-		var sKey = this._serialize(key);
-		if (sKey == null) return;
-		return this.__mapValuesData__[sKey];
-	}),
-	has: d(function (key) {
-		var sKey = this._serialize(key);
-		if (sKey == null) return false;
-		return hasOwnProperty.call(this.__mapKeysData__, sKey);
-	}),
-	keys: d(function () { return new Iterator(this, 'key'); }),
-	size: d.gs(function () { return this.__size__; }),
-	set: d(function (key, value) {
-		var sKey = this._serialize(key);
-		if (sKey == null) throw new TypeError(key + " cannot be serialized");
-		if (hasOwnProperty.call(this.__mapKeysData__, sKey)) {
-			if (this.__mapValuesData__[sKey] === value) return this;
-		} else {
-			++this.__size__;
-		}
-		this.__mapKeysData__[sKey] = key;
-		this.__mapValuesData__[sKey] = value;
-		this.emit('_add', sKey);
-		return this;
-	}),
-	values: d(function () { return new Iterator(this, 'value'); })
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/implement.js
deleted file mode 100644
index 3569df61d221ff..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Map, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/index.js
deleted file mode 100644
index 907b8c5a7bb2e7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) {
-	a((new T([['raz', 1], ['dwa', 2]])).size, 2);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-implemented.js
deleted file mode 100644
index 06df91cc529c02..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Map;
-	global.Map = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Map;
-	else global.Map = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-map.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-map.js
deleted file mode 100644
index f600b2298b8e7a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-map.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var MapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Map !== 'undefined') {
-		a(t(new Map()), true, "Native");
-	}
-	a(t(new MapPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator-kinds.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator-kinds.js
deleted file mode 100644
index 41ea10c57deffc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator-kinds.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t, { key: true, value: true, 'key+value': true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator.js
deleted file mode 100644
index 2688ed26cb7a73..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/iterator.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var Map     = require('../../polyfill')
-  , toArray = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var arr = [['raz', 'one'], ['dwa', 'two']], map = new Map(arr);
-
-	a.deep(toArray(new T(map)), arr, "Default");
-	a.deep(toArray(new T(map, 'key+value')), arr, "Key & Value");
-	a.deep(toArray(new T(map, 'value')), ['one', 'two'], "Value");
-	a.deep(toArray(new T(map, 'key')), ['raz', 'dwa'], "Value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/primitive-iterator.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/primitive-iterator.js
deleted file mode 100644
index ed2790de9b5cc6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/lib/primitive-iterator.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , toArray        = require('es5-ext/array/to-array')
-  , Map            = require('../../primitive')
-
-  , compare, mapToResults;
-
-compare = function (a, b) {
-	if (!a.value) return -1;
-	if (!b.value) return 1;
-	return a.value[0].localeCompare(b.value[0]);
-};
-
-mapToResults = function (arr) {
-	return arr.sort().map(function (value) {
-		return { done: false, value: value };
-	});
-};
-
-module.exports = function (T) {
-	return {
-		"": function (a) {
-			var arr, it, y, z, map, result = [];
-
-			arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three'],
-				['cztery', 'four'], ['pięć', 'five']];
-			map = new Map(arr);
-
-			it = new T(map);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			y = it.next();
-			result.push(y);
-			z = it.next();
-			a.not(y, z, "Recreate result");
-			result.push(z);
-			result.push(it.next());
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), mapToResults(arr));
-			a.deep(y = it.next(), { done: true, value: undefined }, "End");
-			a.not(y, it.next(), "Recreate result on dead");
-		},
-		Emited: function (a) {
-			var arr, it, map, result = [];
-
-			arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three'],
-				['cztery', 'four'], ['pięć', 'five']];
-			map = new Map(arr);
-
-			it = new T(map);
-			result.push(it.next());
-			result.push(it.next());
-			map.set('sześć', 'six');
-			arr.push(['sześć', 'six']);
-			result.push(it.next());
-			map.delete('pięć');
-			arr.splice(4, 1);
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), mapToResults(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited #2": function (a) {
-			var arr, it, map, result = [];
-
-			arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three'],
-				['cztery', 'four'], ['pięć', 'five'], ['sześć', 'six']];
-			map = new Map(arr);
-
-			it = new T(map);
-			result.push(it.next());
-			result.push(it.next());
-			map.set('siedem', 'seven');
-			map.delete('siedem');
-			result.push(it.next());
-			result.push(it.next());
-			map.delete('pięć');
-			arr.splice(4, 1);
-			result.push(it.next());
-			a.deep(result.sort(compare), mapToResults(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #1": function (a) {
-			var arr, it, map, result = [];
-
-			arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three'],
-				['cztery', 'four'], ['pięć', 'five'], ['sześć', 'six']];
-			map = new Map(arr);
-
-			it = new T(map);
-			result.push(it.next());
-			result.push(it.next());
-			arr = [['raz', 'one'], ['dwa', 'two']];
-			map.clear();
-			a.deep(result.sort(compare), mapToResults(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #2": function (a) {
-			var arr, it, map, result = [];
-
-			arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three'],
-				['cztery', 'four'], ['pięć', 'five'], ['sześć', 'six']];
-			map = new Map(arr);
-
-			it = new T(map);
-			result.push(it.next());
-			result.push(it.next());
-			map.clear();
-			map.set('foo', 'bru');
-			map.set('bar', 'far');
-			arr = [['raz', 'one'], ['dwa', 'two'], ['foo', 'bru'], ['bar', 'far']];
-			result.push(it.next());
-			result.push(it.next());
-			a.deep(result.sort(compare), mapToResults(arr));
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Kinds: function (a) {
-			var arr = [['raz', 'one'], ['dwa', 'two']], map = new Map(arr);
-
-			a.deep(toArray(new T(map)).sort(), arr.sort(), "Default");
-			a.deep(toArray(new T(map, 'key+value')).sort(), arr.sort(),
-				"Key + Value");
-			a.deep(toArray(new T(map, 'value')).sort(), ['one', 'two'].sort(),
-				"Value");
-			a.deep(toArray(new T(map, 'key')).sort(), ['raz', 'dwa'].sort(),
-				"Key");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/polyfill.js
deleted file mode 100644
index 6640e359dec76a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/polyfill.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-var aFrom   = require('es5-ext/array/from')
-  , toArray = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]
-	  , map = new T(arr), x = {}, y = {}, i = 0;
-
-	a(map instanceof T, true, "Map");
-	a(map.size, 3, "Size");
-	a(map.get('raz'), 'one', "Get: contained");
-	a(map.get(x), undefined, "Get: not contained");
-	a(map.has('raz'), true, "Has: contained");
-	a(map.has(x), false, "Has: not contained");
-	a(map.set(x, y), map, "Set: return");
-	a(map.has(x), true, "Set: has");
-	a(map.get(x), y, "Set: get");
-	a(map.size, 4, "Set: Size");
-	map.set('dwa', x);
-	a(map.get('dwa'), x, "Overwrite: get");
-	a(map.size, 4, "Overwrite: size");
-
-	a(map.delete({}), false, "Delete: false");
-
-	arr.push([x, y]);
-	arr[1][1] = x;
-	map.forEach(function () {
-		a.deep(aFrom(arguments), [arr[i][1], arr[i][0], map],
-			"ForEach: Arguments:  #" + i);
-		a(this, y, "ForEach: Context: #" + i);
-		if (i === 0) {
-			a(map.delete('raz'), true, "Delete: true");
-			a(map.has('raz'), false, "Delete");
-			a(map.size, 3, "Delete: size");
-			map.set('cztery', 'four');
-			arr.push(['cztery', 'four']);
-		}
-		i++;
-	}, y);
-	arr.splice(0, 1);
-
-	a.deep(toArray(map.entries()), [['dwa', x], ['trzy', 'three'], [x, y],
-		['cztery', 'four']], "Entries");
-	a.deep(toArray(map.keys()), ['dwa', 'trzy', x, 'cztery'], "Keys");
-	a.deep(toArray(map.values()), [x, 'three', y, 'four'], "Values");
-	a.deep(toArray(map), [['dwa', x], ['trzy', 'three'], [x, y],
-		['cztery', 'four']], "Iterator");
-
-	map.clear();
-	a(map.size, 0, "Clear: size");
-	a(map.has('trzy'), false, "Clear: has");
-	a.deep(toArray(map), [], "Clear: Values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/primitive/index.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/primitive/index.js
deleted file mode 100644
index 1167d2ebdfb8d4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/primitive/index.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-var aFrom       = require('es5-ext/array/from')
-  , getIterator = require('es6-iterator/get')
-  , toArray     = require('es5-ext/array/to-array');
-
-module.exports = function (T, a) {
-	var arr = [['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]
-	  , map = new T(arr), x = 'other', y = 'other2'
-	  , i = 0, result = [];
-
-	a(map instanceof T, true, "Map");
-	a(map.size, 3, "Size");
-	a(map.get('raz'), 'one', "Get: contained");
-	a(map.get(x), undefined, "Get: not contained");
-	a(map.has('raz'), true, "Has: true");
-	a(map.has(x), false, "Has: false");
-	a(map.set(x, y), map, "Add: return");
-	a(map.has(x), true, "Add");
-	a(map.size, 4, "Add: Size");
-	map.set('dwa', x);
-	a(map.get('dwa'), x, "Overwrite: get");
-	a(map.size, 4, "Overwrite: size");
-
-	a(map.delete('else'), false, "Delete: false");
-
-	arr.push([x, y]);
-	arr[1][1] = x;
-	map.forEach(function () {
-		result.push(aFrom(arguments));
-		a(this, y, "ForEach: Context: #" + i);
-	}, y);
-
-	a.deep(result.sort(function (a, b) {
-		return String([a[1], a[0]]).localeCompare([b[1], b[0]]);
-	}), arr.sort().map(function (val) { return [val[1], val[0], map]; }),
-		"ForEach: Arguments");
-
-	a.deep(toArray(map.entries()).sort(), [['dwa', x], ['trzy', 'three'],
-		[x, y], ['raz', 'one']].sort(), "Entries");
-	a.deep(toArray(map.keys()).sort(), ['dwa', 'trzy', x, 'raz'].sort(),
-		"Keys");
-	a.deep(toArray(map.values()).sort(), [x, 'three', y, 'one'].sort(),
-		"Values");
-	a.deep(toArray(getIterator(map)).sort(), [['dwa', x], ['trzy', 'three'],
-		[x, y], ['raz', 'one']].sort(),
-		"Iterator");
-
-	map.clear();
-	a(map.size, 0, "Clear: size");
-	a(map.has('trzy'), false, "Clear: has");
-	a.deep(toArray(map.values()), [], "Clear: Values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/test/valid-map.js b/tools/eslint/node_modules/escope/node_modules/es6-map/test/valid-map.js
deleted file mode 100644
index ac0314949a3009..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-map/test/valid-map.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var MapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var map;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Map !== 'undefined') {
-		map = new Map();
-		a(t(map), map, "Native");
-	}
-	map = new MapPoly();
-	a(t(map), map, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.lint b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.lint
deleted file mode 100644
index cf54d815684b2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.lint
+++ /dev/null
@@ -1,11 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.travis.yml
deleted file mode 100644
index 08f04a1b297e57..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-sudo: false # use faster docker infrastructure
-language: node_js
-node_js:
-  - 0.10
-  - 0.12
-  - iojs
-
-notifications:
-  email:
-    - medikoo+es6-weak-map@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/CHANGES
deleted file mode 100644
index 33944088485291..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/CHANGES
+++ /dev/null
@@ -1,24 +0,0 @@
-v0.1.4  --  2015.04.13
-* Republish v0.1.2 as v0.1.4 due to breaking changes
-  (v0.1.3 should have been published as next major)
-
-v0.1.3  --  2015.04.12
-* Update up to changes in specification (require new, remove clear method)
-* Improve native implementation validation
-* Configure lint scripts
-* Rename LICENCE to LICENSE
-
-v0.1.2  --  2014.09.01
-* Use internal random and unique id generator instead of external (time-uuid based).
-  Global uniqueness is not needed in scope of this module. Fixes #1
-
-v0.1.1  --  2014.05.15
-* Improve valid WeakMap detection
-
-v0.1.0  --  2014.04.29
-* Assure to depend only npm hosted dependencies
-* Update to use latest versions of dependencies
-* Use ES6 symbols internally
-
-v0.0.0  --  2013.10.24
-Initial (dev version)
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/LICENCE b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/LICENCE
deleted file mode 100644
index aaf35282f41f57..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/LICENCE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-weak-map/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
deleted file mode 100644
index dd91b469a4249e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# es6-weak-map
-## WeakMap collection as specified in ECMAScript6
-
-_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.
-
-Differences are:
-- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
-- Well modularized CJS style
-- Based on one solution.
-
-### Limitations
-
-- Will fail on non extensible objects provided as keys
-- While `clear` method is provided, it's not perfectly spec compliant. If some objects were saved as _values_, they need to be removed via `delete`. Otherwise they'll remain infinitely attached to _key_ object (that means, they'll be free for GC only if _key_ object was collected as well).
-
-### Installation
-
-	$ npm install es6-weak-map
-
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-### Usage
-
-If you want to make sure your environment implements `WeakMap`, do:
-
-```javascript
-require('es6-weak-map/implement');
-```
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do:
-
-```javascript
-var WeakMap = require('es6-weak-map');
-```
-
-If you strictly want to use polyfill even if native `WeakMap` exists, do:
-
-```javascript
-var WeakMap = require('es6-weak-map/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:
-
-```javascript
-var WeakMap = require('es6-weak-map');
-
-var map = new WeakMap();
-var obj = {};
-
-map.set(obj, 'foo'); // map
-map.get(obj);        // 'foo'
-map.has(obj);        // true
-map.delete(obj);     // true
-map.get(obj);        // undefined
-map.has(obj);        // false
-map.set(obj, 'bar'); // map
-map.clear();         // undefined
-map.has(obj);        // false
-```
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-weak-map.png)](https://travis-ci.org/medikoo/es6-weak-map)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/index.js
deleted file mode 100644
index 5edc4cc8fb5730..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		WeakMap : require('./polyfill');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-implemented.js
deleted file mode 100644
index 455ff812522e34..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var map;
-	if (typeof WeakMap !== 'function') return false;
-	map = new WeakMap();
-	if (typeof map.set !== 'function') return false;
-	if (map.set({}, 1) !== map) return false;
-	if (typeof map.clear !== 'function') return false;
-	if (typeof map.delete !== 'function') return false;
-	if (typeof map.has !== 'function') return false;
-
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js
deleted file mode 100644
index b3fe5a594d253e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/is-native-implemented.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// Exports true if environment provides native `WeakMap` implementation,
-// whatever that is.
-
-'use strict';
-
-module.exports = (function () {
-	if (typeof WeakMap === 'undefined') return false;
-	return (Object.prototype.toString.call(WeakMap.prototype) ===
-			'[object WeakMap]');
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.lint b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.lint
deleted file mode 100644
index 858b75353b331c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.lint
+++ /dev/null
@@ -1,12 +0,0 @@
-@root
-
-es5
-module
-
-tabs
-indent 2
-maxlen 80
-
-ass
-nomen
-plusplus
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.travis.yml
deleted file mode 100644
index 50008b23e6bcb9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+d@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/CHANGES
deleted file mode 100644
index 45233f747eca72..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/CHANGES
+++ /dev/null
@@ -1,7 +0,0 @@
-v0.1.1  --  2014.04.24
-- Add `autoBind` and `lazy` utilities
-- Allow to pass other options to be merged onto created descriptor.
-  Useful when used with other custom utilties
-
-v0.1.0  --  2013.06.20
-Initial (derived from es5-ext project)
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/LICENCE b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/LICENCE
deleted file mode 100644
index aaf35282f41f57..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/LICENCE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/README.md
deleted file mode 100644
index 872d493ed86b6b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/README.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# D - Property descriptor factory
-
-_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._
-
-Defining properties with descriptors is very verbose:
-
-```javascript
-var Account = function () {};
-Object.defineProperties(Account.prototype, {
-  deposit: { value: function () {
-      /* ... */
-    }, configurable: true, enumerable: false, writable: true },
-  whithdraw: { value: function () {
-      /* ... */
-    }, configurable: true, enumerable: false, writable: true },
-  balance: { get: function () {
-      /* ... */
-    }, configurable: true, enumerable: false }
-});
-```
-
-D cuts that to:
-
-```javascript
-var d = require('d');
-
-var Account = function () {};
-Object.defineProperties(Account.prototype, {
-  deposit: d(function () {
-    /* ... */
-  }),
-  whithdraw: d(function () {
-    /* ... */
-  }),
-  balance: d.gs(function () {
-    /* ... */
-  })
-});
-```
-
-By default, created descriptor follow characteristics of native ES5 properties, and defines values as:
-
-```javascript
-{ configurable: true, enumerable: false, writable: true }
-```
-
-You can overwrite it by preceding _value_ argument with instruction:
-```javascript
-d('c', value); // { configurable: true, enumerable: false, writable: false }
-d('ce', value); // { configurable: true, enumerable: true, writable: false }
-d('e', value); // { configurable: false, enumerable: true, writable: false }
-
-// Same way for get/set:
-d.gs('e', value); // { configurable: false, enumerable: true }
-```
-
-### Other utilities
-
-#### autoBind(obj, props) _(d/auto-bind)_
-
-Define methods which will be automatically bound to its instances
-
-```javascript
-var d = require('d');
-var autoBind = require('d/auto-bind');
-
-var Foo = function () { this._count = 0; };
-autoBind(Foo.prototype, {
-  increment: d(function () { ++this._count; });
-});
-
-var foo = new Foo();
-
-// Increment foo counter on each domEl click
-domEl.addEventListener('click', foo.increment, false);
-```
-
-#### lazy(obj, props) _(d/lazy)_
-
-Define lazy properties, which will be resolved on first access
-
-```javascript
-var d = require('d');
-var lazy = require('d/lazy');
-
-var Foo = function () {};
-lazy(Foo.prototype, {
-  items: d(function () { return []; })
-});
-
-var foo = new Foo();
-foo.items.push(1, 2); // foo.items array created
-```
-
-## Installation
-### NPM
-
-In your project path:
-
-	$ npm install d
-
-### Browser
-
-You can easily bundle _D_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/auto-bind.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/auto-bind.js
deleted file mode 100644
index 1b00dba3cc3ddf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/auto-bind.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-var copy       = require('es5-ext/object/copy')
-  , map        = require('es5-ext/object/map')
-  , callable   = require('es5-ext/object/valid-callable')
-  , validValue = require('es5-ext/object/valid-value')
-
-  , bind = Function.prototype.bind, defineProperty = Object.defineProperty
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , define;
-
-define = function (name, desc, bindTo) {
-	var value = validValue(desc) && callable(desc.value), dgs;
-	dgs = copy(desc);
-	delete dgs.writable;
-	delete dgs.value;
-	dgs.get = function () {
-		if (hasOwnProperty.call(this, name)) return value;
-		desc.value = bind.call(value, (bindTo == null) ? this : this[bindTo]);
-		defineProperty(this, name, desc);
-		return this[name];
-	};
-	return dgs;
-};
-
-module.exports = function (props/*, bindTo*/) {
-	var bindTo = arguments[1];
-	return map(props, function (desc, name) {
-		return define(name, desc, bindTo);
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/index.js
deleted file mode 100644
index 076ae465f60c4b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/index.js
+++ /dev/null
@@ -1,63 +0,0 @@
-'use strict';
-
-var assign        = require('es5-ext/object/assign')
-  , normalizeOpts = require('es5-ext/object/normalize-options')
-  , isCallable    = require('es5-ext/object/is-callable')
-  , contains      = require('es5-ext/string/#/contains')
-
-  , d;
-
-d = module.exports = function (dscr, value/*, options*/) {
-	var c, e, w, options, desc;
-	if ((arguments.length < 2) || (typeof dscr !== 'string')) {
-		options = value;
-		value = dscr;
-		dscr = null;
-	} else {
-		options = arguments[2];
-	}
-	if (dscr == null) {
-		c = w = true;
-		e = false;
-	} else {
-		c = contains.call(dscr, 'c');
-		e = contains.call(dscr, 'e');
-		w = contains.call(dscr, 'w');
-	}
-
-	desc = { value: value, configurable: c, enumerable: e, writable: w };
-	return !options ? desc : assign(normalizeOpts(options), desc);
-};
-
-d.gs = function (dscr, get, set/*, options*/) {
-	var c, e, options, desc;
-	if (typeof dscr !== 'string') {
-		options = set;
-		set = get;
-		get = dscr;
-		dscr = null;
-	} else {
-		options = arguments[3];
-	}
-	if (get == null) {
-		get = undefined;
-	} else if (!isCallable(get)) {
-		options = get;
-		get = set = undefined;
-	} else if (set == null) {
-		set = undefined;
-	} else if (!isCallable(set)) {
-		options = set;
-		set = undefined;
-	}
-	if (dscr == null) {
-		c = true;
-		e = false;
-	} else {
-		c = contains.call(dscr, 'c');
-		e = contains.call(dscr, 'e');
-	}
-
-	desc = { get: get, set: set, configurable: c, enumerable: e };
-	return !options ? desc : assign(normalizeOpts(options), desc);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/lazy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/lazy.js
deleted file mode 100644
index 61e466535f3dab..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/lazy.js
+++ /dev/null
@@ -1,111 +0,0 @@
-'use strict';
-
-var map        = require('es5-ext/object/map')
-  , isCallable = require('es5-ext/object/is-callable')
-  , validValue = require('es5-ext/object/valid-value')
-  , contains   = require('es5-ext/string/#/contains')
-
-  , call = Function.prototype.call
-  , defineProperty = Object.defineProperty
-  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
-  , getPrototypeOf = Object.getPrototypeOf
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , cacheDesc = { configurable: false, enumerable: false, writable: false,
-		value: null }
-  , define;
-
-define = function (name, options) {
-	var value, dgs, cacheName, desc, writable = false, resolvable
-	  , flat;
-	options = Object(validValue(options));
-	cacheName = options.cacheName;
-	flat = options.flat;
-	if (cacheName == null) cacheName = name;
-	delete options.cacheName;
-	value = options.value;
-	resolvable = isCallable(value);
-	delete options.value;
-	dgs = { configurable: Boolean(options.configurable),
-		enumerable: Boolean(options.enumerable) };
-	if (name !== cacheName) {
-		dgs.get = function () {
-			if (hasOwnProperty.call(this, cacheName)) return this[cacheName];
-			cacheDesc.value = resolvable ? call.call(value, this, options) : value;
-			cacheDesc.writable = writable;
-			defineProperty(this, cacheName, cacheDesc);
-			cacheDesc.value = null;
-			if (desc) defineProperty(this, name, desc);
-			return this[cacheName];
-		};
-	} else if (!flat) {
-		dgs.get = function self() {
-			var ownDesc;
-			if (hasOwnProperty.call(this, name)) {
-				ownDesc = getOwnPropertyDescriptor(this, name);
-				// It happens in Safari, that getter is still called after property
-				// was defined with a value, following workarounds that
-				if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
-				if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
-					return ownDesc.get.call(this);
-				}
-				return value;
-			}
-			desc.value = resolvable ? call.call(value, this, options) : value;
-			defineProperty(this, name, desc);
-			desc.value = null;
-			return this[name];
-		};
-	} else {
-		dgs.get = function self() {
-			var base = this, ownDesc;
-			if (hasOwnProperty.call(this, name)) {
-				// It happens in Safari, that getter is still called after property
-				// was defined with a value, following workarounds that
-				ownDesc = getOwnPropertyDescriptor(this, name);
-				if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
-				if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
-					return ownDesc.get.call(this);
-				}
-			}
-			while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base);
-			desc.value = resolvable ? call.call(value, base, options) : value;
-			defineProperty(base, name, desc);
-			desc.value = null;
-			return base[name];
-		};
-	}
-	dgs.set = function (value) {
-		dgs.get.call(this);
-		this[cacheName] = value;
-	};
-	if (options.desc) {
-		desc = {
-			configurable: contains.call(options.desc, 'c'),
-			enumerable: contains.call(options.desc, 'e')
-		};
-		if (cacheName === name) {
-			desc.writable = contains.call(options.desc, 'w');
-			desc.value = null;
-		} else {
-			writable = contains.call(options.desc, 'w');
-			desc.get = dgs.get;
-			desc.set = dgs.set;
-		}
-		delete options.desc;
-	} else if (cacheName === name) {
-		desc = {
-			configurable: Boolean(options.configurable),
-			enumerable: Boolean(options.enumerable),
-			writable: Boolean(options.writable),
-			value: null
-		};
-	}
-	delete options.configurable;
-	delete options.enumerable;
-	delete options.writable;
-	return dgs;
-};
-
-module.exports = function (props) {
-	return map(props, function (desc, name) { return define(name, desc); });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/package.json b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/package.json
deleted file mode 100644
index 03d81db13be8d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-  "name": "d",
-  "version": "0.1.1",
-  "description": "Property descriptor factory",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "scripts": {
-    "test": "node node_modules/tad/bin/tad"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/d.git"
-  },
-  "keywords": [
-    "descriptor",
-    "es",
-    "ecmascript",
-    "ecma",
-    "property",
-    "descriptors",
-    "meta",
-    "properties"
-  ],
-  "dependencies": {
-    "es5-ext": "~0.10.2"
-  },
-  "devDependencies": {
-    "tad": "~0.1.21"
-  },
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/medikoo/d/issues"
-  },
-  "homepage": "https://github.com/medikoo/d",
-  "_id": "d@0.1.1",
-  "dist": {
-    "shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
-    "tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz"
-  },
-  "_from": "d@>=0.1.1 <0.2.0",
-  "_npmVersion": "1.4.3",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "directories": {},
-  "_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
-  "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js
deleted file mode 100644
index 89edfb88bbec53..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('../');
-
-module.exports = function (t, a) {
-	var o = Object.defineProperties({}, t({
-		bar: d(function () { return this === o; }),
-		bar2: d(function () { return this; })
-	}));
-
-	a.deep([(o.bar)(), (o.bar2)()], [true, o]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/index.js
deleted file mode 100644
index 3db0af10acd3ca..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/index.js
+++ /dev/null
@@ -1,182 +0,0 @@
-'use strict';
-
-var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-
-module.exports = function (t, a) {
-	var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg
-	  , dfs;
-
-	o = Object.create(Object.prototype, {
-		c: t('c', c = {}),
-		cgs: t.gs('c', cg = function () {}, cs = function () {}),
-		ce: t('ce', ce = {}),
-		cegs: t.gs('ce', ceg = function () {}, ces = function () {}),
-		cew: t('cew', cew = {}),
-		cw: t('cw', cw = {}),
-		e: t('e', e = {}),
-		egs: t.gs('e', eg = function () {}, es = function () {}),
-		ew: t('ew', ew = {}),
-		v: t('', v = {}),
-		vgs: t.gs('', vg = function () {}, vs = function () {}),
-		w: t('w', w = {}),
-
-		df: t(df = {}),
-		dfgs: t.gs(dfg = function () {}, dfs = function () {})
-	});
-
-	return {
-		c: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'c');
-			a(d.value, c, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'cgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, cg, "GS Get");
-			a(d.set, cs, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		ce: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'ce');
-			a(d.value, ce, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'cegs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, ceg, "GS Get");
-			a(d.set, ces, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, true, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		cew: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'cew');
-			a(d.value, cew, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		cw: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'cw');
-			a(d.value, cw, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		e: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'e');
-			a(d.value, e, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'egs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, eg, "GS Get");
-			a(d.set, es, "GS Set");
-			a(d.configurable, false, "GS Configurable");
-			a(d.enumerable, true, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		ew: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'ew');
-			a(d.value, ew, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, true, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		v: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'v');
-			a(d.value, v, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, false, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'vgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, vg, "GS Get");
-			a(d.set, vs, "GS Set");
-			a(d.configurable, false, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		w: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'w');
-			a(d.value, w, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, false, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-		},
-		d: function (a) {
-			var d = getOwnPropertyDescriptor(o, 'df');
-			a(d.value, df, "Value");
-			a(d.get, undefined, "Get");
-			a(d.set, undefined, "Set");
-			a(d.configurable, true, "Configurable");
-			a(d.enumerable, false, "Enumerable");
-			a(d.writable, true, "Writable");
-
-			d = getOwnPropertyDescriptor(o, 'dfgs');
-			a(d.value, undefined, "GS Value");
-			a(d.get, dfg, "GS Get");
-			a(d.set, dfs, "GS Set");
-			a(d.configurable, true, "GS Configurable");
-			a(d.enumerable, false, "GS Enumerable");
-			a(d.writable, undefined, "GS Writable");
-		},
-		Options: {
-			v: function (a) {
-				var x = {}, d = t(x, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, writable: true,
-					value: x, foo: true }, "No descriptor");
-				d = t('c', 'foo', { marko: 'elo' });
-				a.deep(d, { configurable: true, enumerable: false, writable: false,
-					value: 'foo', marko: 'elo' }, "Descriptor");
-			},
-			gs: function (a) {
-				var gFn = function () {}, sFn = function () {}, d;
-				d = t.gs(gFn, sFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn,
-					foo: true }, "No descriptor");
-				d = t.gs(null, sFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: undefined,
-					set: sFn, foo: true }, "No descriptor: Just set");
-				d = t.gs(gFn, { foo: true });
-				a.deep(d, { configurable: true, enumerable: false, get: gFn,
-					set: undefined, foo: true }, "No descriptor: Just get");
-
-				d = t.gs('e', gFn, sFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn,
-					bar: true }, "Descriptor");
-				d = t.gs('e', null, sFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: undefined,
-					set: sFn, bar: true }, "Descriptor: Just set");
-				d = t.gs('e', gFn, { bar: true });
-				a.deep(d, { configurable: false, enumerable: true, get: gFn,
-					set: undefined, bar: true }, "Descriptor: Just get");
-			}
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/lazy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/lazy.js
deleted file mode 100644
index 8266deb240fda3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/d/test/lazy.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-var d = require('../')
-
-  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-
-module.exports = function (t, a) {
-	var Foo = function () {}, i = 1, o, o2, desc;
-	Object.defineProperties(Foo.prototype, t({
-		bar: d(function () { return ++i; }),
-		bar2: d(function () { return this.bar + 23; }),
-		bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }),
-		bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }),
-		bar5: d(function () { return this.bar4 + 3; },
-			{ cacheName: '_bar5_', desc: 'e' })
-	}));
-
-	desc = getOwnPropertyDescriptor(Foo.prototype, 'bar');
-	a(desc.configurable, true, "Configurable: default");
-	a(desc.enumerable, false, "Enumerable: default");
-
-	o = new Foo();
-	a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74],
-		"Values");
-
-	a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false,
-		enumerable: true, writable: true, value: 59 }, "Desc");
-	a(o.hasOwnProperty('bar4'), false, "Cache not exposed");
-	desc = getOwnPropertyDescriptor(o, 'bar5');
-	a.deep(desc, { configurable: false,
-		enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc");
-
-	o2 = Object.create(o);
-	o2.bar = 30;
-	o2.bar3 = 100;
-
-	a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115],
-		"Extension Values");
-
-	Foo = function () {};
-	Object.defineProperties(Foo.prototype, t({
-		test: d('w', function () { return 'raz'; }),
-		test2: d('', function () { return 'raz'; }, { desc: 'w' }),
-		test3: d('', function () { return 'raz'; },
-			{ cacheName: '__test3__', desc: 'w' }),
-		test4: d('w', 'bar')
-	}));
-
-	o = new Foo();
-	o.test = 'marko';
-	a.deep(getOwnPropertyDescriptor(o, 'test'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko' },
-		"Set before get");
-	o.test2 = 'marko2';
-	a.deep(getOwnPropertyDescriptor(o, 'test2'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko2' },
-		"Set before get: Custom desc");
-	o.test3 = 'marko3';
-	a.deep(getOwnPropertyDescriptor(o, '__test3__'),
-		{ configurable: false, enumerable: false, writable: true, value: 'marko3' },
-		"Set before get: Custom cache name");
-	a(o.test4, 'bar', "Resolve by value");
-
-	a.h1("Flat");
-	Object.defineProperties(Foo.prototype, t({
-		flat: d(function () { return 'foo'; }, { flat: true }),
-		flat2: d(function () { return 'bar'; }, { flat: true })
-	}));
-
-	a.h2("Instance");
-	a(o.flat, 'foo', "Value");
-	a(o.hasOwnProperty('flat'), false, "Instance");
-	a(Foo.prototype.flat, 'foo', "Prototype");
-
-	a.h2("Direct");
-	a(Foo.prototype.flat2, 'bar');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lint b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lint
deleted file mode 100644
index d1da610376a524..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lint
+++ /dev/null
@@ -1,38 +0,0 @@
-@root
-
-module
-
-indent 2
-maxlen 100
-tabs
-
-ass
-continue
-forin
-nomen
-plusplus
-vars
-
-./global.js
-./function/_define-length.js
-./function/#/copy.js
-./object/unserialize.js
-./test/function/valid-function.js
-evil
-
-./math/_pack-ieee754.js
-./math/_unpack-ieee754.js
-./math/clz32/shim.js
-./math/imul/shim.js
-./number/to-uint32.js
-./string/#/at.js
-bitwise
-
-./math/fround/shim.js
-predef+ Float32Array
-
-./object/first-key.js
-forin
-
-./test/reg-exp/#/index.js
-predef+ __dirname
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore
deleted file mode 100644
index ed703ed7662c89..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/string/#/normalize/_data.js
-/test/boolean/is-boolean.js
-/test/date/is-date.js
-/test/number/is-number.js
-/test/object/is-copy.js
-/test/object/is-object.js
-/test/reg-exp/is-reg-exp.js
-/test/string/is-string.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore
deleted file mode 100644
index eb09b500d63ec8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/.lintcache
-/npm-debug.log
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml
deleted file mode 100644
index a183dbcec61795..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
-language: node_js
-node_js:
-  - 0.10
-  - 0.12
-  - iojs
-
-before_install:
-  - mkdir node_modules; ln -s ../ node_modules/es5-ext
-
-notifications:
-  email:
-    - medikoo+es5-ext@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES
deleted file mode 100644
index 5d0ace5bfe2f8d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES
+++ /dev/null
@@ -1,611 +0,0 @@
-v0.10.7  --  2015.04.22
-* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1.
-  Still they're non breaking and start the conventions to be used in v1
-  * Object.validateArrayLike
-  * Object.validateArrayLikeObject
-  * Object.validateStringifiable
-  * Object.validateStringifiableValue
-  * Universal utilities for array-like/iterable objects
-    * Iterable.is
-    * Iterable.validate
-    * Iterable.validateObject
-    * Iterable.forEach
-* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel
-* Fix calculations of large numbers in Math.tanh
-* Fix algorithm of Math.sinh
-* Fix indexes to not use real symbols
-* Fix length of String.fromCodePoint
-* Fix tests of Array#copyWithin
-* Update Travis CI configuration
-
-v0.10.6  --  2015.02.02
-* Fix handling of infinite values in Math.trunc
-* Fix handling of getters in Object.normalizeOptions
-
-v0.10.5  --  2015.01.20
-* Add Function#toStringTokens
-* Add Object.serialize and Object.unserialize
-* Add String.randomUniq
-* Fix Strin#camelToHyphen issue with tokens that end with digit
-* Optimise Number.isInteger logic
-* Improve documentation
-* Configure lint scripts
-* Fix spelling of LICENSE
-
-v0.10.4  --  2014.04.30
-* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens)
-* Improve documentations
-
-v0.10.3  --  2014.04.29
-Provide accurate iterators handling:
-* Array.from improvements:
-  * Assure right unicode symbols resolution when processing strings in Array.from
-  * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment
-* Add methods:
-  * Array.prototype.entries
-  * Array.prototype.keys
-  * Array.prototype.values
-  * Array.prototype[@@iterator]
-  * String.prototype[@@iterator]
-
-Improve documentation
-
-v0.10.2  --  2014.04.24
-- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are
-  no callable objects which are `typeof obj !== 'function'`
-- Update Array.from map callback signature (up to latest resolution of TC39)
-- Improve documentation
-
-v0.10.1  --  2014.04.14
-Bump version for npm
-(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago)
-
-v0.10.0  --  2014.04.13
-Major update:
-- All methods and function specified for ECMAScript 6 are now introduced as
-  shims accompanied with functions through which (optionally) they can be
-  implementend on native objects
-- Filename convention was changed to shorter and strictly lower case names. e.g.
-  `lib/String/prototype/starts-with` became `string/#/starts-with`
-- Generated functions are guaranteed to have expected length
-- Objects with null prototype (created via `Object.create(null)`) are widely
-  supported (older version have crashed due to implied `obj.hasOwnProperty` and
-  related invocations)
-- Support array subclasses
-- When handling lists do not limit its length to Uint32 range
-- Use newly introduced `Object.eq` for strict equality in place of `Object.is`
-- Iteration of Object have been improved so properties that were hidden or
-  removed after iteration started are not iterated.
-
-Additions:
-- `Array.isPlainArray`
-- `Array.validArray`
-- `Array.prototype.concat` (as updated with ES6)
-- `Array.prototype.copyWithin` (as introduced with ES6)
-- `Array.prototype.fill` (as introduced with ES6)
-- `Array.prototype.filter` (as updated with ES6)
-- `Array.prototype.findIndex` (as introduced with ES6)
-- `Array.prototype.map` (as updated with ES6)
-- `Array.prototype.separate`
-- `Array.prototype.slice` (as updated with ES6)
-- `Array.prototype.splice` (as updated with ES6)
-- `Function.prototype.copy`
-- `Math.acosh` (as introduced with ES6)
-- `Math.atanh` (as introduced with ES6)
-- `Math.cbrt` (as introduced with ES6)
-- `Math.clz32` (as introduced with ES6)
-- `Math.cosh` (as introduced with ES6)
-- `Math.expm1` (as introduced with ES6)
-- `Math.fround` (as introduced with ES6)
-- `Math.hypot` (as introduced with ES6)
-- `Math.imul` (as introduced with ES6)
-- `Math.log2` (as introduced with ES6)
-- `Math.log10` (as introduced with ES6)
-- `Math.log1p` (as introduced with ES6)
-- `Math.sinh` (as introduced with ES6)
-- `Math.tanh` (as introduced with ES6)
-- `Math.trunc` (as introduced with ES6)
-- `Number.EPSILON` (as introduced with ES6)
-- `Number.MIN_SAFE_INTEGER` (as introduced with ES6)
-- `Number.MAX_SAFE_INTEGER` (as introduced with ES6)
-- `Number.isFinite` (as introduced with ES6)
-- `Number.isInteger` (as introduced with ES6)
-- `Number.isSafeInteger` (as introduced with ES6)
-- `Object.create` (with fix for V8 issue which disallows prototype turn of
-  objects derived from null
-- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero
-  algorithm
-- `Object.firstKey`
-- `Object.keys` (as updated with ES6)
-- `Object.mixinPrototypes`
-- `Object.primitiveSet`
-- `Object.setPrototypeOf` (as introduced with ES6)
-- `Object.validObject`
-- `RegExp.escape`
-- `RegExp.prototype.match` (as introduced with ES6)
-- `RegExp.prototype.replace` (as introduced with ES6)
-- `RegExp.prototype.search` (as introduced with ES6)
-- `RegExp.prototype.split` (as introduced with ES6)
-- `RegExp.prototype.sticky` (as introduced with ES6)
-- `RegExp.prototype.unicode` (as introduced with ES6)
-- `String.fromCodePoint` (as introduced with ES6)
-- `String.raw` (as introduced with ES6)
-- `String.prototype.at`
-- `String.prototype.codePointAt` (as introduced with ES6)
-- `String.prototype.normalize` (as introduced with ES6)
-- `String.prototype.plainReplaceAll`
-
-Removals:
-- `reserved` set
-- `Array.prototype.commonLeft`
-- `Function.insert`
-- `Function.remove`
-- `Function.prototype.silent`
-- `Function.prototype.wrap`
-- `Object.descriptor` Move to external `d` project.
-  See: https://github.com/medikoo/d
-- `Object.diff`
-- `Object.extendDeep`
-- `Object.reduce`
-- `Object.values`
-- `String.prototype.trimCommonLeft`
-
-Renames:
-- `Function.i` into `Function.identity`
-- `Function.k` into `Function.constant`
-- `Number.toInt` into `Number.toInteger`
-- `Number.toUint` into `Number.toPosInteger`
-- `Object.extend` into `Object.assign` (as introduced in ES 6)
-- `Object.extendProperties` into `Object.mixin`, with improved internal
-  handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6
-- `Object.isList` into `Object.isArrayLike`
-- `Object.mapToArray` into `Object.toArray` (with fixed function length)
-- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real
-  use case where we use this function)
-- `Function.prototype.chain` into `Function.prototype.compose`
-- `Function.prototype.match` into `Function.prototype.spread`
-- `String.prototype.format` into `String.formatMethod`
-
-Improvements & Fixes:
-- Remove workaround for primitive values handling in object iterators
-- `Array.from`: Update so it follows ES 6 spec
-- `Array.prototype.compact`: filters just null and undefined values
-  (not all falsies)
-- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position
-  handling, improve internals
-- `Array.prototype.find`: return undefined not null, in case of not found
-  (follow ES 6)
-- `Array.prototype.remove` fix function length
-- `Error.custom`: simplify, Custom class case is addressed by outer
-  `error-create` project -> https://github.com/medikoo/error-create
-- `Error.isError` true only for Error instances (remove detection of host
-  Exception objects)
-- `Number.prototype.pad`: Normalize negative pad
-- `Object.clear`: Handle errors same way as in `Object.assign`
-- `Object.compact`: filters just null and undefined values (not all falsies)
-- `Object.compare`: Take into account NaN values
-- `Object.copy`: Split into `Object.copy` and `Object.copyDeep`
-- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where
-  `isCopyDeep` handles nested plain objects and plain arrays only
-- `String.prototype.endsWith`: Adjust up to ES6 specification
-- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm
-- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace`
-- `String.prototype.startsWith`: Adjust up to ES6 specification
-- Update lint rules, and adjust code to that
-- Update Travis CI configuration
-- Remove Makefile (it's cross-env utility)
-
-v0.9.2  --  2013.03.11
-Added:
-* Array.prototype.isCopy
-* Array.prototype.isUniq
-* Error.CustomError
-* Function.validFunction
-* Object.extendDeep
-* Object.descriptor.binder
-* Object.safeTraverse
-* RegExp.validRegExp
-* String.prototype.capitalize
-* String.prototype.simpleReplace
-
-Fixed:
-* Fix Array.prototype.diff for sparse arrays
-* Accept primitive objects as input values in Object iteration methods and
-  Object.clear, Object.count, Object.diff, Object.extend,
-  Object.getPropertyNames, Object.values
-* Pass expected arguments to callbacks of Object.filter, Object.mapKeys,
-  Object.mapToArray, Object.map
-* Improve callable callback support in Object.mapToArray
-
-v0.9.1  --  2012.09.17
-* Object.reduce - reduce for hash-like collections
-* Accapt any callable object as callback in Object.filter, mapKeys and map
-* Convention cleanup
-
-v0.9.0  --  2012.09.13
-We're getting to real solid API
-
-Removed:
-* Function#memoize - it's grown up to be external package, to be soon published
-  as 'memoizee'
-* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as
-  external package
-# Function.arguments - obsolete
-# Function.context - obsolete
-# Function#flip - not readable when used, so it was never used
-# Object.clone - obsolete and confusing
-
-Added:
-* String#camelToHyphen - String format convertion
-
-Renamed:
-* String#dashToCamelCase -> String#hyphenToCamel
-
-Fixes:
-* Object.isObject - Quote names in literals that match reserved keywords
-  (older implementations crashed on that)
-* String#repeat - Do not accept negative values (coerce them to 1)
-
-Improvements:
-* Array#remove - Accepts many arguments, we can now remove many values at once
-* Object iterators (forEach, map, some) - Compare function invoked with scope
-  object bound to this
-* Function#curry - Algorithm cleanup
-* Object.isCopy - Support for all types, not just plain objects
-* Object.isPlainObject - Support for cross-frame objects
-* Do not memoize any of the functions, it shouldn't be decided internally
-* Remove Object.freeze calls in reserved, it's not up to convention
-* Improved documentation
-* Better linting (hard-core approach using both JSLint mod and JSHint)
-* Optional arguments are now documented in funtions signature
-
-v0.8.2  --  2012.06.22
-Fix errors in Array's intersection and exclusion methods, related to improper
-usage of contains method
-
-v0.8.1  --  2012.06.13
-Reorganized internal logic of Function.prototype.memoize. So it's more safe now
-and clears cache properly. Additionally preventCache option was provided.
-
-v0.8.0  --  2012.05.28
-Again, major overhaul. Probably last experimental stuff was trashed, all API
-looks more like standard extensions now.
-
-Changes:
-* Turn all Object.prototype extensions into functions and move them to Object
-namespace. We learned that extending Object.prototype is bad idea in any case.
-* Rename Function.prototype.curry into Function.prototype.partial. This function
-  is really doing partial application while currying is slightly different
-  concept.
-* Convert Function.prototype.ncurry to new implementation of
-  Function.prototype.curry, it now serves real curry concept additionaly it
-  covers use cases for aritize and hold, which were removed.
-* Rename Array's peek to last, and provide support for sparse arrays in it
-* Rename Date's monthDaysCount into daysInMonth
-* Simplify object iterators, now order of iteration can be configured with just
-  compareFn argument (no extra byKeys option)
-* Rename Object.isDuplicate to Object.isCopy
-* Rename Object.isEqual to Object.is which is compatible with future 'is'
-  keyword
-* Function.memoize is now Function.prototype.memoize. Additionally clear cache
-  functionality is added, and access to original arguments object.
-* Rename validation functions: assertNotNull to validValue, assertCallable to
-  validCallable. validValue was moved to Object namespace. On success they now
-  return validated value instead of true, it supports better composition.
-  Additionally created Date.validDate and Error.validError
-* All documentation is now held in README.md not in code files.
-* Move guid to String namespace. All guids now start with numbers.
-* Array.generate: fill argument is now optional
-* Object.toArray is now Array.from (as new ES6 specification draft suggests)
-* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is)
-  versions of them (eIndexOf, eLastIndexOf)
-* Turn all get* functions that returned methods into actuall methods (get*
-  functionality can still be achieved with help of Function.prototype.partial).
-  So: Date.getFormat is now Date.prototype.format,
-  Number.getPad is now Number.prototype.pad,
-  String.getFormat is now String.prototype.format,
-  String.getIndent is now String.prototype.indent,
-  String.getPad is now String.prototype.pad
-* Refactored Object.descriptor, it is now just two functions, main one and
-  main.gs, main is for describing values, and gs for describing getters and
-  setters. Configuration is passed with first argument as string e.g. 'ce' for
-  configurable and enumerable. If no configuration string is provided then by
-  default it returns configurable and writable but not enumerable for value or
-  configurable but not enumerable for getter/setter
-* Function.prototype.silent now returns prepared function (it was
-  expected to be fixed for 0.7)
-* Reserved keywords map (reserved) is now array not hash.
-* Object.merge is now Object.extend (while former Object.extend was completely
-  removed) - 'extend' implies that we change object, not creating new one (as
-  'merge' may imply). Similarily Object.mergeProperties was renamed to
-  Object.extendProperties
-* Position argument support in Array.prototype.contains and
-  String.prototype.contains (so it follows ES6 specification draft)
-* endPosition argument support in String.prototype.endsWith and fromPosition
-  argument support in String.prototype.startsWith (so it follows ES6
-  specification draft)
-* Better and cleaner String.prototype.indent implementation. No default value
-  for indent string argument, optional nest value (defaults to 1), remove
-  nostart argument
-* Correct length values for most methods (so they reflect length of similar
-  methods in standard)
-* Length argument is now optional in number and string pad methods.
-* Improve arguments validation in general, so it adheres to standard conventions
-* Fixed format of package.json
-
-Removed methods and functions:
-* Object.prototype.slice - Object is not ordered collection, so slice doesn't
-  make sense.
-* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for
-  that
-* Function.prototype.aritize and Function.prototype.hold - same functionality
-  can be achieved with new Function.prototype.curry
-* Function.prototype.log - provided more generic Function.prototype.wrap for
-  same use case
-* getNextIdGenerator - no use case for that (String.guid should be used if
-  needed)
-* Object.toObject - Can be now acheived with Object(validValue(x))
-* Array.prototype.someValue - no real use case (personally used once and
-  case was already controversial)
-* Date.prototype.duration - moved to external package
-* Number.getAutoincrement - No real use case
-* Object.prototype.extend, Object.prototype.override,
-  Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably
-  too complex, same should be achieved just with Object.create,
-  Object.descriptor and by saving references to super methods in local scope.
-* Object.getCompareBy - Functions should be created individually for each use
-  case
-* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and
-  same can be easily achieved with simple inline function
-* String.getPrefixWith - Not real use case for something that can be easily
-  achieved with '+' operator
-* Object.isPrimitive - It's just negation of Object.isObject
-* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in
-  Number namespace and should rather be addressed with simple inline functions.
-* Number.prototype.subtract - Should rather be addressed with simple inline
-  function
-
-New methods and functions:
-* Array.prototype.lastIndex - Returns last declared index in array
-* String.prototype.last - last for strings
-* Function.prototype.wrap - Wrap function with other, it allows to specify
-  before and after behavior transform return value or prevent original function
-  from being called.
-* Math.sign - Returns sign of a number (already in ES6 specification draft)
-* Number.toInt - Converts value to integer (already in ES6 specification draft)
-* Number.isNaN - Returns true if value is NaN (already in ES6 specification
-  draft)
-* Number.toUint - Converts value to unsigned integer
-* Number.toUint32 - Converts value to 32bit unsigned integer
-* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of
-  standard methods (all methods that were using native indexOf or lastIndexOf
-  now uses eIndexOf and elastIndexOf respectively)
-* Array.of - as it's specified for ES6
-
-Fixes:
-* Fixed binarySearch so it always returns valid list index
-* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro
-  engine)
-* Object.map now supports third argument for callback
-
-v0.7.1  --  2012.01.05
-New methods:
-* Array.prototype.firstIndex - returns first valid index of array (for
-	sparse arrays it may not be '0'
-
-Improvements:
-* Array.prototype.first - now returns value for index returned by firstIndex
-* Object.prototype.mapToArray - can be called without callback, then array of
-	key-value pairs is returned
-
-Fixes
-* Array.prototype.forEachRight, object's length read through UInt32 conversion
-
-v0.7.0  --  2011.12.27
-Major update.
-Stepped back from experimental ideas and introduced more standard approach
-taking example from how ES5 methods and functions are designed. One exceptions
-is that, we don’t refrain from declaring methods for Object.prototype - it’s up
-to developer whether how he decides to use it in his context (as function or as
-method).
-
-In general:
-* Removed any method 'functionalization' and functionalize method itself.
-	es5-ext declares plain methods, which can be configured to work as functions
-	with call.bind(method) - see documentation.
-* Removed separation of Object methods for ES5 (with descriptors) and
-	ES3 (plain) - we're following ES5 idea on that, some methods are intended just
-	for enumerable properties and some are for all properties, all are declared
-	for Object.prototype
-* Removed separation of Array generic (collected in List folder) and not generic
-	methods (collected in Array folder). Now all methods are generic and are in
-	Array/prototype folder. This separation also meant, that methods in Array are
-	usually destructive. We don’t do that separation now, there’s generally no use
-	case for destructive iterators, we should be fine with one version of each
-	method, (same as ES5 is fine with  e.g. one, non destructive 'filter' method)
-* Folder structure resembles tree of native ES5 Objects
-* All methods are written with ES5 conventions in mind, it means that most
-	methods are generic and can be run on any object. In more detail:
-	** Array.prototype and Object.prototype methods can be run on any object (any
-		not null or undefined value),
-	** Date.prototype methods should be called only on Date instances.
-	** Function.prototype methods can be called on any callable objects (not
-		necessarily functions)
-	** Number.prototype & String.prototype methods can be called on any value, in
-		case of Number it it’ll be degraded to number, in case of string it’ll be
-		degraded to string.
-* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version)
-
-Improvements for existing functions and methods:
-* Function.memoize (was Function.cache) is now fully generic, can operate on any
-	type of arguments and it’s NaN safe (all NaN objects are considered equal)
-* Method properties passed to Object.prototype.extend or
-	Object.prototype.override can aside of _super optionally take prototype object
-	via _proto argument
-* Object iterators: forEach, mapToArray and every can now iterate in specified
-	order
-* pluck, invoke and other functions that return reusable functions or methods
-	have now their results memoized.
-
-New methods:
-* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive,
-	toObject
-* Array: generate
-* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first,
-	forEachRight, group, indexesOf, intersection, remove, someRight, someValue
-* Boolean: isBoolean
-* Date: isDate
-* Function: arguments, context, insert, isArguments, remove
-* Function.prototype: not, silent
-* Number: getAutoincrement, isNumber
-* Number.prototype: isLessOrEqual, isLess, subtract
-* Object: assertCallable, descriptor (functions for clean descriptors),
-	getCompareBy, isCallable, isObject
-* Object.prototype: clone (real clone), compact, count, diff, empty,
-	getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend,
-	slice, some, unset
-* RegExp: isRegExp
-* String: getPrefixWith, isString
-* String.prototype: caseInsensitiveCompare, contains, isNumeric
-
-Renamed methods:
-* Date.clone -> Date.prototype.copy
-* Date.format -> Date.getFormat
-* Date/day/floor -> Date.prototype.floorDay
-* Date/month/floor -> Date.prototype.floorMonth
-* Date/month/year -> Date.prototype.floorYear
-* Function.cache -> Function.memoize
-* Function.getApplyArg -> Function.prototype.match
-* Function.sequence -> Function.prototype.chain
-* List.findSameStartLength -> Array.prototype.commonLeft
-* Number.pad -> Number.getPad
-* Object/plain/clone -> Object.prototype.copy
-* Object/plain/elevate -> Object.prototype.flatten
-* Object/plain/same -> Object.prototype.isDuplicate
-* Object/plain/setValue -> Object.getSet
-* String.format -> String.getFormat
-* String.indent -> String.getIndent
-* String.pad -> String.getPad
-* String.trimLeftStr -> String.prototype.trimCommonLeft
-* Object.merge -> Object.prototype.mergeProperties
-* Object/plain/pluck -> Object.prototype.get
-* Array.clone is now Array.prototype.copy and can be used also on any array-like
-	objects
-* List.isList -> Object.isList
-* List.toArray -> Object.prototype.toArray
-* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase
-
-Removed methods:
-* Array.compact - removed destructive version (that operated on same array), we
-	have now non destructive version as Array.prototype.compact.
-* Function.applyBind -> use apply.bind directly
-* Function.bindBind -> use bind.bind directly
-* Function.callBind -> use call.bind directly
-* Fuction.clone -> no valid use case
-* Function.dscope -> controversial approach, shouldn’t be considered seriously
-* Function.functionalize -> It was experimental but standards are standards
-* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’)
-* List.concat -> Concat’s for array-like’s makes no sense, just convert to array
-	first
-* List.every -> Use Array.prototype.every directly
-* List.filter -> Use Array.prototype.filter directly
-* List.forEach -> User Array.prototype.forEach directly
-* List.isListObject -> No valid use case, do: isList(list) && (typeof list ===
-	'object’)
-* List.map -> Use Array.prototype.map directly
-* List.reduce -> Use Array.prototype.reduce directly
-* List.shiftSame -> Use Array.prototype.commonLeft and do slice
-* List.slice -> Use Array.prototype.slice directly
-* List.some -> Use Array.prototype.some directly
-* Object.bindMethods -> it was version that considered descriptors, we have now
-	Object.prototype.bindMethods which operates only on enumerable properties
-* Object.every -> version that considered all properties, we have now
-	Object.prototype.every which iterates only enumerables
-* Object.invoke -> no use case
-* Object.mergeDeep -> no use case
-* Object.pluck -> no use case
-* Object.same -> it considered descriptors, now there’s only Object.isDuplicate
-	which compares only enumerable properties
-* Object.sameType -> no use case
-* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer
-	Object.descriptor functions
-* Object/plain/link -> no use case (it was used internally only by
-	Object/plain/merge)
-* Object/plain/setTrue -> now easily configurable by more universal
-	Object.getSet(true)
-* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be
-	added
-
-v0.6.3  --  2011.12.12
-* Cleared npm warning for misnamed property in package.json
-
-v0.6.2  --  2011.08.12
-* Calling String.indent without scope (global scope then) now treated as calling
-  it with null scope, it allows more direct invocations when using default nest
-  string: indent().call(str, nest)
-
-v0.6.1  --  2011.08.08
-* Added TAD test suite to devDependencies, configured test commands.
-  Tests can be run with 'make test' or 'npm test'
-
-v0.6.0  --  2011.08.07
-New methods:
-* Array: clone, compact (in place)
-* Date: format, duration, clone, monthDaysCount, day.floor, month.floor,
-  year.floor
-* Function: getApplyArg, , ncurry, rncurry, hold, cache, log
-* List: findSameStartLength, shiftSame, peek, isListObject
-* Number: pad
-* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor,
-  toDescriptors, invoke
-* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format
-
-Fixed:
-* Object.extend does now prototypal extend as exptected
-* Object.merge now tries to overwrite only configurable properties
-* Function.flip
-
-Improved:
-* Faster List.toArray
-* Better global retrieval
-* Functionalized all Function methods
-* Renamed bindApply and bindCall to applyBind and callBind
-* Removed Function.inherit (as it's unintuitive curry clone)
-* Straightforward logic in Function.k
-* Fixed naming of some tests files (letter case issue)
-* Renamed Function.saturate into Function.lock
-* String.dashToCamelCase digits support
-* Strings now considered as List objects
-* Improved List.compact
-* Concise logic for List.concat
-* Test wit TAD in clean ES5 context
-
-v0.5.1  --  2011.07.11
-* Function's bindBind, bindCall and bindApply now more versatile
-
-v0.5.0  --  2011.07.07
-* Removed Object.is and List.apply
-* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention
-  consistent)
-* Improved documentation
-
-v0.4.0  --  2011.07.05
-* Take most functions on Object to Object.plain to keep them away from object
-  descriptors
-* Object functions with ES5 standard in mind (object descriptors)
-
-v0.3.0  --  2011.06.24
-* New functions
-* Consistent file naming (dash instead of camelCase)
-
-v0.2.1  --  2011.05.28
-* Renamed Functions.K and Function.S to to lowercase versions (use consistent
-  naming)
-
-v0.2.0  --  2011.05.28
-* Renamed Array folder to List (as its generic functions for array-like objects)
-* Added Makefile
-* Added various functions
-
-v0.1.0  --  2011.05.24
-* Initial version
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE
deleted file mode 100644
index de39071f1b8bbf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2011-2015 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/README.md
deleted file mode 100644
index 11d8a343d57f1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/README.md
+++ /dev/null
@@ -1,993 +0,0 @@
-# es5-ext
-## ECMAScript 5 extensions
-### (with respect to ECMAScript 6 standard)
-
-Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind.
-
-It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board.
-
-When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims.
-
-### Installation
-
-	$ npm install es5-ext
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-### Usage
-
-#### ECMAScript 6 features
-
-You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already).
-
-```javascript
-require('es5-ext/array/from/implement');
-Array.from('foo'); // ['f', 'o', 'o']
-```
-
-You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not.
-
-```javascript
-var aFrom = require('es5-ext/array/from');
-aFrom('foo'); // ['f', 'o', 'o']
-```
-
-If you want to use shim unconditionally (even if native implementation exists) do:
-
-```javascript
-var aFrom = require('es5-ext/array/from/shim');
-aFrom('foo'); // ['f', 'o', 'o']
-```
-
-##### List of ES6 shims
-
-It's about properties introduced with ES6 and those that have been updated in new spec.
-
-- `Array.from` -> `require('es5-ext/array/from')`
-- `Array.of` -> `require('es5-ext/array/of')`
-- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')`
-- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')`
-- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')`
-- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')`
-- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')`
-- `Array.prototype.find` -> `require('es5-ext/array/#/find')`
-- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')`
-- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')`
-- `Array.prototype.map` -> `require('es5-ext/array/#/map')`
-- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')`
-- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')`
-- `Array.prototype.values` -> `require('es5-ext/array/#/values')`
-- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')`
-- `Math.acosh` -> `require('es5-ext/math/acosh')`
-- `Math.asinh` -> `require('es5-ext/math/asinh')`
-- `Math.atanh` -> `require('es5-ext/math/atanh')`
-- `Math.cbrt` -> `require('es5-ext/math/cbrt')`
-- `Math.clz32` -> `require('es5-ext/math/clz32')`
-- `Math.cosh` -> `require('es5-ext/math/cosh')`
-- `Math.exmp1` -> `require('es5-ext/math/expm1')`
-- `Math.fround` -> `require('es5-ext/math/fround')`
-- `Math.hypot` -> `require('es5-ext/math/hypot')`
-- `Math.imul` -> `require('es5-ext/math/imul')`
-- `Math.log1p` -> `require('es5-ext/math/log1p')`
-- `Math.log2` -> `require('es5-ext/math/log2')`
-- `Math.log10` -> `require('es5-ext/math/log10')`
-- `Math.sign` -> `require('es5-ext/math/sign')`
-- `Math.signh` -> `require('es5-ext/math/signh')`
-- `Math.tanh` -> `require('es5-ext/math/tanh')`
-- `Math.trunc` -> `require('es5-ext/math/trunc')`
-- `Number.EPSILON` -> `require('es5-ext/number/epsilon')`
-- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')`
-- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')`
-- `Number.isFinite` -> `require('es5-ext/number/is-finite')`
-- `Number.isInteger` -> `require('es5-ext/number/is-integer')`
-- `Number.isNaN` -> `require('es5-ext/number/is-nan')`
-- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')`
-- `Object.assign` -> `require('es5-ext/object/assign')`
-- `Object.keys` -> `require('es5-ext/object/keys')`
-- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')`
-- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')`
-- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')`
-- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')`
-- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')`
-- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')`
-- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')`
-- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')`
-- `String.raw` -> `require('es5-ext/string/raw')`
-- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')`
-- `String.prototype.contains` -> `require('es5-ext/string/#/contains')`
-- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')`
-- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')`
-- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')`
-- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')`
-- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')`
-
-#### Non ECMAScript standard features
-
-__es5-ext__ provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes:
-
-```javascript
-Object.defineProperty(Function.prototype, 'partial', { value: require('es5-ext/function/#/partial'),
-  configurable: true, enumerable: false, writable: true });
-Object.defineProperty(Array.prototype, 'flatten', { value: require('es5-ext/array/#/flatten'),
-  configurable: true, enumerable: false, writable: true });
-Object.defineProperty(String.prototype, 'capitalize', { value: require('es5-ext/string/#/capitalize'),
-  configurable: true, enumerable: false, writable: true });
-```
-
-See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. 
-
-__Important:__ Remember to __not__ extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine __only__ if you're the _owner_ of the global scope, so e.g. in final project you lead development of.
-
-When you're in situation when native extensions are not good idea, then you should use methods indirectly:
-
-
-```javascript
-var flatten = require('es5-ext/array/#/flatten');
-
-flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-for better convenience you can turn methods into functions:
-
-
-```javascript
-var call = Function.prototype.call
-var flatten = call.bind(require('es5-ext/array/#/flatten'));
-
-flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application
-
-```javascript
-var util = {};
-util.partial = call.bind(require('es5-ext/function/#/partial'));
-util.flatten = call.bind(require('es5-ext/array/#/flatten'));
-util.startsWith = call.bind(require('es5-ext/string/#/starts-with'));
-
-util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
-```
-
-As with native ones most methods are generic and can be run on any type of object.
-
-## API
-
-### Global extensions
-
-#### global _(es5-ext/global)_
-
-Object that represents global scope
-
-### Array Constructor extensions
-
-#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from).  
-Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned.
-
-#### generate([length[, …fill]]) _(es5-ext/array/generate)_
-
-Generate an array of pre-given _length_ built of repeated arguments.
-
-#### isPlainArray(x) _(es5-ext/array/is-plain-array)_
-
-Returns true if object is plain array (not instance of one of the Array's extensions).
-
-#### of([…items]) _(es5-ext/array/of)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of).  
-Create an array from given arguments.
-
-#### toArray(obj) _(es5-ext/array/to-array)_
-
-Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back.
-
-#### validArray(obj) _(es5-ext/array/valid-array)_
-
-Returns `obj` if it's an array, otherwise throws `TypeError`
-
-### Array Prototype extensions
-
-#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_
-
-In __sorted__ list search for index of item for which _compareFn_ returns value closest to _0_.  
-It's variant of binary search algorithm
-
-#### arr.clear() _(es5-ext/array/#/clear)_
-
-Clears the array
-
-#### arr.compact() _(es5-ext/array/#/compact)_
-
-Returns a copy of the context with all non-values (`null` or `undefined`) removed.
-
-#### arr.concat() _(es5-ext/array/#/concat)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat).  
-ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context.
-
-#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_
-
-Whether list contains the given value.
-
-#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin).  
-
-#### arr.diff(other) _(es5-ext/array/#/diff)_
-
-Returns the array of elements that are present in context list but not present in other list.
-
-#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_
-
-_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
-
-#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_
-
-_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision
-
-#### arr.entries() _(es5-ext/array/#/entries)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries).  
-Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value.
-
-#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_
-
-Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments).
-
-#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill).  
-
-#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter).  
-ES6's version of `filter`, returns array of same type as the context.
-
-#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find).  
-Return first element for which given function returns true
-
-#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex).  
-Return first index for which given function returns true
-
-#### arr.first() _(es5-ext/array/#/first)_
-
-Returns value for first defined index
-
-#### arr.firstIndex() _(es5-ext/array/#/first-index)_
-
-Returns first declared index of the array
-
-#### arr.flatten() _(es5-ext/array/#/flatten)_
-
-Returns flattened version of the array
-
-#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_
-
-`forEach` starting from last element
-
-#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_
-
-Group list elements by value returned by _cb_ function
-
-#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_
-
-Returns array of all indexes of given value
-
-#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_
-
-Computes the array of values that are the intersection of all lists (context list and lists given in arguments)
-
-#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_
-
-Returns true if both context and _other_ lists have same content
-
-#### arr.isUniq() _(es5-ext/array/#/is-uniq)_
-
-Returns true if all values in array are unique
-
-#### arr.keys() _(es5-ext/array/#/keys)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys).  
-Returns iterator object, which traverses all array indexes.
-
-#### arr.last() _(es5-ext/array/#/last)_
-
-Returns value of last defined index
-
-#### arr.lastIndex() _(es5-ext/array/#/last)_
-
-Returns last defined index of the array
-
-#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map).  
-ES6's version of `map`, returns array of same type as the context.
-
-#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_
-
-Remove values from the array
-
-#### arr.separate(sep) _(es5-ext/array/#/separate)_
-
-Returns array with items separated with `sep` value
-
-#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice).  
-ES6's version of `slice`, returns array of same type as the context.
-
-#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_
-
-`some` starting from last element
-
-#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice).  
-ES6's version of `splice`, returns array of same type as the context.
-
-#### arr.uniq() _(es5-ext/array/#/uniq)_
-
-Returns duplicate-free version of the array
-
-#### arr.values() _(es5-ext/array/#/values)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values).  
-Returns iterator object which traverses all array values.
-
-#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator).  
-Returns iterator object which traverses all array values.
-
-### Boolean Constructor extensions
-
-#### isBoolean(x) _(es5-ext/boolean/is-boolean)_
-
-Whether value is boolean
-
-### Date Constructor extensions
-
-#### isDate(x) _(es5-ext/date/is-date)_
-
-Whether value is date instance
-
-#### validDate(x) _(es5-ext/date/valid-date)_
-
-If given object is not date throw TypeError in other case return it.
-
-### Date Prototype extensions
-
-#### date.copy(date) _(es5-ext/date/#/copy)_
-
-Returns a copy of the date object
-
-#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_
-
-Returns number of days of date's month
-
-#### date.floorDay() _(es5-ext/date/#/floor-day)_
-
-Sets the date time to 00:00:00.000
-
-#### date.floorMonth() _(es5-ext/date/#/floor-month)_
-
-Sets date day to 1 and date time to 00:00:00.000
-
-#### date.floorYear() _(es5-ext/date/#/floor-year)_
-
-Sets date month to 0, day to 1 and date time to 00:00:00.000
-
-#### date.format(pattern) _(es5-ext/date/#/format)_
-
-Formats date up to given string. Supported patterns:
-
-* `%Y` - Year with century, 1999, 2003
-* `%y` - Year without century, 99, 03
-* `%m` - Month, 01..12
-* `%d` - Day of the month 01..31
-* `%H` - Hour (24-hour clock), 00..23
-* `%M` - Minute, 00..59
-* `%S` - Second, 00..59
-* `%L` - Milliseconds, 000..999
-
-### Error Constructor extensions
-
-#### custom(message/*, code, ext*/) _(es5-ext/error/custom)_
-
-Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object)  
-
-#### isError(x) _(es5-ext/error/is-error)_
-
-Whether value is an error (instance of `Error`).  
-
-#### validError(x) _(es5-ext/error/valid-error)_
-
-If given object is not error throw TypeError in other case return it.
-
-### Error Prototype extensions
-
-#### err.throw() _(es5-ext/error/#/throw)_
-
-Throws error
-
-### Function Constructor extensions
-
-Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
-
-#### constant(x) _(es5-ext/function/constant)_
-
-Returns a constant function that returns pregiven argument
-
-_k(x)(y)  =def  x_
-
-#### identity(x) _(es5-ext/function/identity)_
-
-Identity function. Returns first argument
-
-_i(x)  =def  x_
-
-#### invoke(name[, …args]) _(es5-ext/function/invoke)_
-
-Returns a function that takes an object as an argument, and applies object's
-_name_ method to arguments.  
-_name_ can be name of the method or method itself.
-
-_invoke(name, …args)(object, …args2)  =def  object\[name\]\(…args, …args2\)_
-
-#### isArguments(x) _(es5-ext/function/is-arguments)_
-
-Whether value is arguments object
-
-#### isFunction(arg) _(es5-ext/function/is-function)_
-
-Wether value is instance of function
-
-#### noop() _(es5-ext/function/noop)_
-
-No operation function
-
-#### pluck(name) _(es5-ext/function/pluck)_
-
-Returns a function that takes an object, and returns the value of its _name_
-property
-
-_pluck(name)(obj)  =def  obj[name]_
-
-#### validFunction(arg) _(es5-ext/function/valid-function)_
-
-If given object is not function throw TypeError in other case return it.
-
-### Function Prototype extensions
-
-Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele
-
-#### fn.compose([…fns]) _(es5-ext/function/#/compose)_
-
-Applies the functions in reverse argument-list order.
-
-_f1.compose(f2, f3, f4)(…args)  =def  f1(f2(f3(f4(…arg))))_
-
-#### fn.copy() _(es5-ext/function/#/copy)_
-
-Produces copy of given function
-
-#### fn.curry([n]) _(es5-ext/function/#/curry)_
-
-Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function.  
-If _n_ is not provided then it defaults to context function length
-
-_f.curry(4)(arg1, arg2)(arg3)(arg4)  =def  f(arg1, args2, arg3, arg4)_
-
-#### fn.lock([…args]) _(es5-ext/function/#/lock)_
-
-Returns a function that applies the underlying function to _args_, and ignores its own arguments.
-
-_f.lock(…args)(…args2)  =def  f(…args)_
-
-_Named after it's counterpart in Google Closure_
-
-#### fn.not() _(es5-ext/function/#/not)_
-
-Returns a function that returns boolean negation of value returned by underlying function.
-
-_f.not()(…args)  =def !f(…args)_
-
-#### fn.partial([…args]) _(es5-ext/function/#/partial)_
-
-Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args.
-
-_f.partial(…args1)(…args2)  =def  f(…args1, …args2)_
-
-#### fn.spread() _(es5-ext/function/#/spread)_
-
-Returns a function that applies underlying function with first list argument
-
-_f.match()(args)  =def  f.apply(null, args)_
-
-#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_
-
-Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties.
-
-### Math extensions
-
-#### acosh(x) _(es5-ext/math/acosh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh).  
-
-#### asinh(x) _(es5-ext/math/asinh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh).  
-
-#### atanh(x) _(es5-ext/math/atanh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh).  
-
-#### cbrt(x) _(es5-ext/math/cbrt)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt).  
-
-#### clz32(x) _(es5-ext/math/clz32)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32).  
-
-#### cosh(x) _(es5-ext/math/cosh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh).  
-
-#### expm1(x) _(es5-ext/math/expm1)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1).  
-
-#### fround(x) _(es5-ext/math/fround)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround).  
-
-#### hypot([…values]) _(es5-ext/math/hypot)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot).  
-
-#### imul(x, y) _(es5-ext/math/imul)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul).  
-
-#### log1p(x) _(es5-ext/math/log1p)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p).  
-
-#### log2(x) _(es5-ext/math/log2)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2).  
-
-#### log10(x) _(es5-ext/math/log10)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10).  
-
-#### sign(x) _(es5-ext/math/sign)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign).  
-
-#### sinh(x) _(es5-ext/math/sinh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh).  
-
-#### tanh(x) _(es5-ext/math/tanh)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh).  
-
-#### trunc(x) _(es5-ext/math/trunc)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc).  
-
-### Number Constructor extensions
-
-#### EPSILON _(es5-ext/number/epsilon)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon).  
-
-The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16.
-
-#### isFinite(x) _(es5-ext/number/is-finite)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite).  
-Whether value is finite. Differs from global isNaN that it doesn't do type coercion.
-
-#### isInteger(x) _(es5-ext/number/is-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger).  
-Whether value is integer.
-
-#### isNaN(x) _(es5-ext/number/is-nan)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan).  
-Whether value is NaN. Differs from global isNaN that it doesn't do type coercion.
-
-#### isNumber(x) _(es5-ext/number/is-number)_
-
-Whether given value is number
-
-#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger).  
-
-#### MAX_SAFE_INTEGER _(es5-ext/number/max-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger).  
-The value of Number.MAX_SAFE_INTEGER is 9007199254740991.
-
-#### MIN_SAFE_INTEGER _(es5-ext/number/min-safe-integer)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger).  
-The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1).
-
-#### toInteger(x) _(es5-ext/number/to-integer)_
-
-Converts value to integer
-
-#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_
-
-Converts value to positive integer. If provided value is less than 0, then 0 is returned
-
-#### toUint32(x) _(es5-ext/number/to-uint32)_
-
-Converts value to unsigned 32 bit integer. This type is used for array lengths.
-See: http://www.2ality.com/2012/02/js-integers.html
-
-### Number Prototype extensions
-
-#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_
-
-Pad given number with zeros. Returns string
-
-### Object Constructor extensions
-
-#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).  
-Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten.
-
-#### clear(obj) _(es5-ext/object/clear)_
-
-Remove all enumerable own properties of the object
-
-#### compact(obj) _(es5-ext/object/compact)_
-
-Returns copy of the object with all enumerable properties that have no falsy values
-
-#### compare(obj1, obj2) _(es5-ext/object/compare)_
-
-Universal cross-type compare function. To be used for e.g. array sort.
-
-#### copy(obj) _(es5-ext/object/copy)_
-
-Returns copy of the object with all enumerable properties.
-
-#### copyDeep(obj) _(es5-ext/object/copy-deep)_
-
-Returns deep copy of the object with all enumerable properties.
-
-#### count(obj) _(es5-ext/object/count)_
-
-Counts number of enumerable own properties on object
-
-#### create(obj[, properties]) _(es5-ext/object/create)_
-
-`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804).
-
-When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined.
-
-It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype.
-
-Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround.
-
-#### eq(x, y) _(es5-ext/object/eq)_
-
-Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
-
-#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_
-
-Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function.  
-Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_
-
-Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value.
-
-#### firstKey(obj) _(es5-ext/object/first-key)_
-
-Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object.
-
-#### flatten(obj) _(es5-ext/object/flatten)_
-
-Returns new object, with flatten properties of input object
-
-_flatten({ a: { b: 1 }, c: { d: 1 } })  =def  { b: 1, d: 1 }_
-
-#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_
-
-Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object
-Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### getPropertyNames() _(es5-ext/object/get-property-names)_
-
-Get all (not just own) property names of the object
-
-#### is(x, y) _(es5-ext/object/is)_
-
-Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm.
-
-#### isArrayLike(x) _(es5-ext/object/is-array-like)_
-
-Whether object is array-like object
-
-#### isCopy(x, y) _(es5-ext/object/is-copy)_
-
-Two values are considered a copy of same value when all of their own enumerable properties have same values.
-
-#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_
-
-Deep comparision of objects
-
-#### isEmpty(obj) _(es5-ext/object/is-empty)_
-
-True if object doesn't have any own enumerable property
-
-#### isObject(arg) _(es5-ext/object/is-object)_
-
-Whether value is not primitive
-
-#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_
-
-Whether object is plain object, its protototype should be Object.prototype and it cannot be host object.
-
-#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_
-
-Search object for value
-
-#### keys(obj) _(es5-ext/object/keys)_
-
-[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys).  
-ES6's version of `keys`, doesn't throw on primitive input
-
-#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_
-
-Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object.
-
-#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_
-
-Create new object with same values, but remapped keys
-
-#### mixin(target, source) _(es5-ext/object/mixin)_
-
-Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten).
-_It was for a moment part of ECMAScript 6 draft._
-
-#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_
-
-Extends _target_, with all source and source's prototype properties.
-Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support).
-
-#### normalizeOptions(options) _(es5-ext/object/normalize-options)_
-
-Normalizes options object into flat plain object.  
-
-Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use.
-
-- It never returns input `options` object back (always a copy is created)
-- `options` can be undefined in such case empty plain object is returned.
-- Copies all enumerable properties found down prototype chain.
-
-#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_
-
-Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true.
-
-#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_
-
-Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator
-
-#### serialize(value) _(es5-ext/object/serialize)_
-
-Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions.
-
-#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof).  
-If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed.
-
-#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_
-
-Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided
-testing function.  
-Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_
-
-Creates an array of results of calling a provided function on every key-value pair in this object.  
-Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key).
-
-#### unserialize(str) _(es5-ext/object/unserialize)_
-
-Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize)
-
-#### validCallable(x) _(es5-ext/object/valid-callable)_
-
-If given object is not callable throw TypeError in other case return it.
-
-#### validObject(x) _(es5-ext/object/valid-object)_
-
-Throws error if given value is not an object, otherwise it is returned.
-
-#### validValue(x) _(es5-ext/object/valid-value)_
-
-Throws error if given value is `null` or `undefined`, otherwise returns value.
-
-### RegExp Constructor extensions
-
-#### escape(str) _(es5-ext/reg-exp/escape)_
-
-Escapes string to be used in regular expression
-
-#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_
-
-Whether object is regular expression
-
-#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_
-
-If object is regular expression it is returned, otherwise TypeError is thrown.
-
-### RegExp Prototype extensions
-
-#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_
-
-Whether regular expression has `sticky` flag.
-
-It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented.
-
-#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_
-
-Whether regular expression has `unicode` flag.
-
-It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented.
-
-#### re.match(string) _(es5-ext/reg-exp/#/match)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match).  
-
-#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace).  
-
-#### re.search(string) _(es5-ext/reg-exp/#/search)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search).  
-
-#### re.split(string) _(es5-ext/reg-exp/#/search)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split).  
-
-#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky).  
-It's a getter, so only `implement` and `is-implemented` modules are provided.
-
-#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode).  
-It's a getter, so only `implement` and `is-implemented` modules are provided.
-
-### String Constructor extensions
-
-#### formatMethod(fMap) _(es5-ext/string/format-method)_
-
-Creates format method. It's used e.g. to create `Date.prototype.format` method
-
-#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint)
-
-#### isString(x) _(es5-ext/string/is-string)_
-
-Whether object is string
-
-#### randomUniq() _(es5-ext/string/random-uniq)_
-
-Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice)
-
-#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw)
-
-### String Prototype extensions
-
-#### str.at(pos) _(es5-ext/string/#/at)_
-
-_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_
-
-Returns a string at given position in Unicode-safe manner.
-Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at).
-
-#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_
-
-Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree.
-Useful when converting names from js property convention into filename convention.
-
-#### str.capitalize() _(es5-ext/string/#/capitalize)_
-
-Capitalize first character of a string
-
-#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_
-
-Case insensitive compare
-
-#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat)
-
-Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt).
-
-#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains)
-
-Whether string contains given string.
-
-#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith).  
-Whether strings ends with given string
-
-#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_
-
-Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree.
-Useful when converting names from filename convention to js property name convention.
-
-#### str.indent(str[, count]) _(es5-ext/string/#/indent)_
-
-Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times).
-
-#### str.last() _(es5-ext/string/#/last)_
-
-Return last character
-
-#### str.normalize([form]) _(es5-ext/string/#/normalize)_
-
-[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize).  
-Returns the Unicode Normalization Form of a given string.  
-Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js)
-
-#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_
-
-Pad string with _fill_.
-If _length_ si given than _fill_ is reapated _length_ times.
-If _length_ is negative then pad is applied from right.
-
-#### str.repeat(n) _(es5-ext/string/#/repeat)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat).  
-Repeat given string _n_ times
-
-#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_
-
-Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
-
-#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_
-
-Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case).
-
-#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith).  
-Whether strings starts with given string
-
-#### str[@@iterator] _(es5-ext/string/#/@@iterator)_
-
-[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator).  
-Returns iterator object which traverses all string characters (with respect to unicode symbols)
-
-### Tests [![Build Status](https://travis-ci.org/medikoo/es5-ext.png)](https://travis-ci.org/medikoo/es5-ext)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js
deleted file mode 100644
index 0f714a1d2795e3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, require('es6-symbol').iterator, { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js
deleted file mode 100644
index a69462650e7302..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Array.prototype[require('es6-symbol').iterator] : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
deleted file mode 100644
index 72eb1f8a27ff30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function () {
-	var arr = ['foo', 1], iterator, result;
-	if (typeof arr[iteratorSymbol] !== 'function') return false;
-	iterator = arr[iteratorSymbol]();
-	if (!iterator) return false;
-	if (typeof iterator.next !== 'function') return false;
-	result = iterator.next();
-	if (!result) return false;
-	if (result.value !== 'foo') return false;
-	if (result.done !== false) return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js
deleted file mode 100644
index ff295df9961e9a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('../values/shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js
deleted file mode 100644
index d8343ce306d3ca..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Used internally to sort array of lists by length
-
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer');
-
-module.exports = function (a, b) {
-	return toPosInt(a.length) - toPosInt(b.length);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js
deleted file mode 100644
index 8eb45675149256..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , floor    = Math.floor;
-
-module.exports = function (compareFn) {
-	var length, low, high, middle;
-
-	value(this);
-	callable(compareFn);
-
-	length = toPosInt(this.length);
-	low = 0;
-	high = length - 1;
-
-	while (low <= high) {
-		middle = floor((low + high) / 2);
-		if (compareFn(this[middle]) < 0) high = middle - 1;
-		else low = middle + 1;
-	}
-
-	if (high < 0) return 0;
-	if (high >= length) return length - 1;
-	return high;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js
deleted file mode 100644
index 3587bdf972d458..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Inspired by Google Closure:
-// http://closure-library.googlecode.com/svn/docs/
-// closure_goog_array_array.js.html#goog.array.clear
-
-'use strict';
-
-var value = require('../../object/valid-value');
-
-module.exports = function () {
-	value(this).length = 0;
-	return this;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js
deleted file mode 100644
index d529d5a2beab8f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Inspired by: http://documentcloud.github.com/underscore/#compact
-
-'use strict';
-
-var filter = Array.prototype.filter;
-
-module.exports = function () {
-	return filter.call(this, function (val) { return val != null; });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js
deleted file mode 100644
index 80c67cb4faf764..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'concat', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js
deleted file mode 100644
index db205ea54a41ad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.concat : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js
deleted file mode 100644
index cab8bc9e323bbd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var SubArray = require('../../_sub-array-dummy-safe');
-
-module.exports = function () {
-	return (new SubArray()).concat('foo') instanceof SubArray;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js
deleted file mode 100644
index 8b28e4ae03b70f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-var isPlainArray = require('../../is-plain-array')
-  , toPosInt     = require('../../../number/to-pos-integer')
-  , isObject     = require('../../../object/is-object')
-
-  , isArray = Array.isArray, concat = Array.prototype.concat
-  , forEach = Array.prototype.forEach
-
-  , isSpreadable;
-
-isSpreadable = function (value) {
-	if (!value) return false;
-	if (!isObject(value)) return false;
-	if (value['@@isConcatSpreadable'] !== undefined) {
-		return Boolean(value['@@isConcatSpreadable']);
-	}
-	return isArray(value);
-};
-
-module.exports = function (item/*, …items*/) {
-	var result;
-	if (!this || !isArray(this) || isPlainArray(this)) {
-		return concat.apply(this, arguments);
-	}
-	result = new this.constructor(this.length);
-	forEach.call(this, function (val, i) { result[i] = val; });
-	forEach.call(arguments, function (arg) {
-		var base;
-		if (isSpreadable(arg)) {
-			base = result.length;
-			result.length += toPosInt(arg.length);
-			forEach.call(arg, function (val, i) { result[base + i] = val; });
-			return;
-		}
-		result.push(arg);
-	});
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js
deleted file mode 100644
index 4a2f9f6731c8c6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var indexOf = require('./e-index-of');
-
-module.exports = function (searchElement/*, position*/) {
-	return indexOf.call(this, searchElement, arguments[1]) > -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js
deleted file mode 100644
index eedbad77eebe09..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'copyWithin',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js
deleted file mode 100644
index bb89d0b87934d1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.copyWithin : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js
deleted file mode 100644
index 8f17e06d816d14..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var arr = [1, 2, 3, 4, 5];
-	if (typeof arr.copyWithin !== 'function') return false;
-	return String(arr.copyWithin(1, 3)) === '1,4,5,4,5';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js
deleted file mode 100644
index c0bfb8b0609f4e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Taken from: https://github.com/paulmillr/es6-shim/
-
-'use strict';
-
-var toInteger  = require('../../../number/to-integer')
-  , toPosInt   = require('../../../number/to-pos-integer')
-  , validValue = require('../../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , max = Math.max, min = Math.min;
-
-module.exports = function (target, start/*, end*/) {
-	var o = validValue(this), end = arguments[2], l = toPosInt(o.length)
-	  , to, from, fin, count, direction;
-
-	target = toInteger(target);
-	start = toInteger(start);
-	end = (end === undefined) ? l : toInteger(end);
-
-	to = target < 0 ? max(l + target, 0) : min(target, l);
-	from = start < 0 ? max(l + start, 0) : min(start, l);
-	fin = end < 0 ? max(l + end, 0) : min(end, l);
-	count = min(fin - from, l - to);
-	direction = 1;
-
-	if ((from < to) && (to < (from + count))) {
-		direction = -1;
-		from += count - 1;
-		to += count - 1;
-	}
-	while (count > 0) {
-		if (hasOwnProperty.call(o, from)) o[to] = o[from];
-		else delete o[from];
-		from += direction;
-		to += direction;
-		count -= 1;
-	}
-	return o;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js
deleted file mode 100644
index a1f95419d4ed65..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var value    = require('../../object/valid-value')
-  , contains = require('./contains')
-
-  , filter = Array.prototype.filter;
-
-module.exports = function (other) {
-	(value(this) && value(other));
-	return filter.call(this, function (item) {
-		return !contains.call(other, item);
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js
deleted file mode 100644
index 80864d0666168a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , value    = require('../../object/valid-value')
-
-  , indexOf = Array.prototype.indexOf
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , abs = Math.abs, floor = Math.floor;
-
-module.exports = function (searchElement/*, fromIndex*/) {
-	var i, l, fromIndex, val;
-	if (searchElement === searchElement) { //jslint: ignore
-		return indexOf.apply(this, arguments);
-	}
-
-	l = toPosInt(value(this).length);
-	fromIndex = arguments[1];
-	if (isNaN(fromIndex)) fromIndex = 0;
-	else if (fromIndex >= 0) fromIndex = floor(fromIndex);
-	else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
-
-	for (i = fromIndex; i < l; ++i) {
-		if (hasOwnProperty.call(this, i)) {
-			val = this[i];
-			if (val !== val) return i; //jslint: ignore
-		}
-	}
-	return -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js
deleted file mode 100644
index 4fc536bd68082d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , value    = require('../../object/valid-value')
-
-  , lastIndexOf = Array.prototype.lastIndexOf
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , abs = Math.abs, floor = Math.floor;
-
-module.exports = function (searchElement/*, fromIndex*/) {
-	var i, fromIndex, val;
-	if (searchElement === searchElement) { //jslint: ignore
-		return lastIndexOf.apply(this, arguments);
-	}
-
-	value(this);
-	fromIndex = arguments[1];
-	if (isNaN(fromIndex)) fromIndex = (toPosInt(this.length) - 1);
-	else if (fromIndex >= 0) fromIndex = floor(fromIndex);
-	else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
-
-	for (i = fromIndex; i >= 0; --i) {
-		if (hasOwnProperty.call(this, i)) {
-			val = this[i];
-			if (val !== val) return i; //jslint: ignore
-		}
-	}
-	return -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js
deleted file mode 100644
index 490de60e207ab4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'entries', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js
deleted file mode 100644
index 292792cf159da8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.entries : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js
deleted file mode 100644
index e186c17237bd39..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var arr = [1, 'foo'], iterator, result;
-	if (typeof arr.entries !== 'function') return false;
-	iterator = arr.entries();
-	if (!iterator) return false;
-	if (typeof iterator.next !== 'function') return false;
-	result = iterator.next();
-	if (!result || !result.value) return false;
-	if (result.value[0] !== 0) return false;
-	if (result.value[1] !== 1) return false;
-	if (result.done !== false) return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js
deleted file mode 100644
index c052b53f01d89f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('es6-iterator/array');
-module.exports = function () { return new ArrayIterator(this, 'key+value'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js
deleted file mode 100644
index f08adc81c9631e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var value    = require('../../object/valid-value')
-  , aFrom    = require('../from')
-  , toArray  = require('../to-array')
-  , contains = require('./contains')
-  , byLength = require('./_compare-by-length')
-
-  , filter = Array.prototype.filter, push = Array.prototype.push;
-
-module.exports = function (/*…lists*/) {
-	var lists, seen, result;
-	if (!arguments.length) return aFrom(this);
-	push.apply(lists = [this], arguments);
-	lists.forEach(value);
-	seen = [];
-	result = [];
-	lists.sort(byLength).forEach(function (list) {
-		result = result.filter(function (item) {
-			return !contains.call(list, item);
-		}).concat(filter.call(list, function (x) {
-			return !contains.call(seen, x);
-		}));
-		push.apply(seen, toArray(list));
-	});
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js
deleted file mode 100644
index 22511919c516fe..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'fill', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js
deleted file mode 100644
index 36c1f66668b29d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.fill : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js
deleted file mode 100644
index b8e546888af2b4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var arr = [1, 2, 3, 4, 5, 6];
-	if (typeof arr.fill !== 'function') return false;
-	return String(arr.fill(-1, -3)) === '1,2,3,-1,-1,-1';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js
deleted file mode 100644
index 45823be51fc193..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Taken from: https://github.com/paulmillr/es6-shim/
-
-'use strict';
-
-var toInteger  = require('../../../number/to-integer')
-  , toPosInt   = require('../../../number/to-pos-integer')
-  , validValue = require('../../../object/valid-value')
-
-  , max = Math.max, min = Math.min;
-
-module.exports = function (value/*, start, end*/) {
-	var o = validValue(this), start = arguments[1], end = arguments[2]
-	  , l = toPosInt(o.length), relativeStart, i;
-
-	start = (start === undefined) ? 0 : toInteger(start);
-	end = (end === undefined) ? l : toInteger(end);
-
-	relativeStart = start < 0 ? max(l + start, 0) : min(start, l);
-	for (i = relativeStart; i < l && i < end; ++i) o[i] = value;
-	return o;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js
deleted file mode 100644
index 090c5f109aee35..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'filter', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js
deleted file mode 100644
index bcf0268dc2dcb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.filter : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js
deleted file mode 100644
index 5577273501531e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var SubArray = require('../../_sub-array-dummy-safe')
-
-  , pass = function () { return true; };
-
-module.exports = function () {
-	return (new SubArray()).filter(pass) instanceof SubArray;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js
deleted file mode 100644
index b0116defce5021..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var isPlainArray = require('../../is-plain-array')
-  , callable     = require('../../../object/valid-callable')
-
-  , isArray = Array.isArray, filter = Array.prototype.filter
-  , forEach = Array.prototype.forEach, call = Function.prototype.call;
-
-module.exports = function (callbackFn/*, thisArg*/) {
-	var result, thisArg, i;
-	if (!this || !isArray(this) || isPlainArray(this)) {
-		return filter.apply(this, arguments);
-	}
-	callable(callbackFn);
-	thisArg = arguments[1];
-	result = new this.constructor();
-	i = 0;
-	forEach.call(this, function (val, j, self) {
-		if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val;
-	});
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js
deleted file mode 100644
index 556cb846002b0e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'findIndex',
-		{ value: require('./shim'),
-			configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js
deleted file mode 100644
index 03a987e22347bf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.findIndex : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js
deleted file mode 100644
index dbd3c814b4650f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var fn = function (x) { return x > 3; };
-
-module.exports = function () {
-	var arr = [1, 2, 3, 4, 5, 6];
-	if (typeof arr.findIndex !== 'function') return false;
-	return arr.findIndex(fn) === 3;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js
deleted file mode 100644
index 957939f2ba224a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var callable = require('../../../object/valid-callable')
-  , value    = require('../../../object/valid-value')
-
-  , some = Array.prototype.some, apply = Function.prototype.apply;
-
-module.exports = function (predicate/*, thisArg*/) {
-	var k, self;
-	self = Object(value(this));
-	callable(predicate);
-
-	return some.call(self, function (value, index) {
-		if (apply.call(predicate, this, arguments)) {
-			k = index;
-			return true;
-		}
-		return false;
-	}, arguments[1]) ? k : -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js
deleted file mode 100644
index 0f37104ac8dbbf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'find', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js
deleted file mode 100644
index 96819d09f02198..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.find : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js
deleted file mode 100644
index cc7ec774df0fa4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var fn = function (x) { return x > 3; };
-
-module.exports = function () {
-	var arr = [1, 2, 3, 4, 5, 6];
-	if (typeof arr.find !== 'function') return false;
-	return arr.find(fn) === 4;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js
deleted file mode 100644
index c7ee9069a9a308..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var findIndex = require('../find-index/shim');
-
-module.exports = function (predicate/*, thisArg*/) {
-	var index = findIndex.apply(this, arguments);
-	return (index === -1) ? undefined : this[index];
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js
deleted file mode 100644
index 7a9e4c34736ca3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-module.exports = function () {
-	var i, l;
-	if (!(l = toPosInt(value(this).length))) return null;
-	i = 0;
-	while (!hasOwnProperty.call(this, i)) {
-		if (++i === l) return null;
-	}
-	return i;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js
deleted file mode 100644
index 11df571754857f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var firstIndex = require('./first-index');
-
-module.exports = function () {
-	var i;
-	if ((i = firstIndex.call(this)) !== null) return this[i];
-	return undefined;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js
deleted file mode 100644
index c95407d317fd3b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray, forEach = Array.prototype.forEach
-  , push = Array.prototype.push;
-
-module.exports = function flatten() {
-	var r = [];
-	forEach.call(this, function (x) {
-		push.apply(r, isArray(x) ? flatten.call(x) : [x]);
-	});
-	return r;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js
deleted file mode 100644
index 2f0ffaea84cb38..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , call = Function.prototype.call;
-
-module.exports = function (cb/*, thisArg*/) {
-	var i, self, thisArg;
-
-	self = Object(value(this));
-	callable(cb);
-	thisArg = arguments[1];
-
-	for (i = toPosInt(self.length); i >= 0; --i) {
-		if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js
deleted file mode 100644
index fbb178c35c1730..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Inspired by Underscore's groupBy:
-// http://documentcloud.github.com/underscore/#groupBy
-
-'use strict';
-
-var callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , forEach = Array.prototype.forEach, apply = Function.prototype.apply;
-
-module.exports = function (cb/*, thisArg*/) {
-	var r;
-
-	(value(this) && callable(cb));
-
-	r = {};
-	forEach.call(this, function (v) {
-		var key = apply.call(cb, this, arguments);
-		if (!r.hasOwnProperty(key)) r[key] = [];
-		r[key].push(v);
-	}, arguments[1]);
-	return r;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js
deleted file mode 100644
index 97ef65cfd42cf1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-module.exports = {
-	'@@iterator':   require('./@@iterator'),
-	binarySearch:   require('./binary-search'),
-	clear:          require('./clear'),
-	compact:        require('./compact'),
-	concat:         require('./concat'),
-	contains:       require('./contains'),
-	copyWithin:     require('./copy-within'),
-	diff:           require('./diff'),
-	eIndexOf:       require('./e-index-of'),
-	eLastIndexOf:   require('./e-last-index-of'),
-	entries:        require('./entries'),
-	exclusion:      require('./exclusion'),
-	fill:           require('./fill'),
-	filter:         require('./filter'),
-	find:           require('./find'),
-	findIndex:      require('./find-index'),
-	first:          require('./first'),
-	firstIndex:     require('./first-index'),
-	flatten:        require('./flatten'),
-	forEachRight:   require('./for-each-right'),
-	keys:           require('./keys'),
-	group:          require('./group'),
-	indexesOf:      require('./indexes-of'),
-	intersection:   require('./intersection'),
-	isCopy:         require('./is-copy'),
-	isUniq:         require('./is-uniq'),
-	last:           require('./last'),
-	lastIndex:      require('./last-index'),
-	map:            require('./map'),
-	remove:         require('./remove'),
-	separate:       require('./separate'),
-	slice:          require('./slice'),
-	someRight:      require('./some-right'),
-	splice:         require('./splice'),
-	uniq:           require('./uniq'),
-	values:         require('./values')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js
deleted file mode 100644
index 6b89157a35b805..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var indexOf = require('./e-index-of');
-
-module.exports = function (value/*, fromIndex*/) {
-	var r = [], i, fromIndex = arguments[1];
-	while ((i = indexOf.call(this, value, fromIndex)) !== -1) {
-		r.push(i);
-		fromIndex = i + 1;
-	}
-	return r;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js
deleted file mode 100644
index fadcb525308964..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var value    = require('../../object/valid-value')
-  , contains = require('./contains')
-  , byLength = require('./_compare-by-length')
-
-  , filter = Array.prototype.filter, push = Array.prototype.push
-  , slice = Array.prototype.slice;
-
-module.exports = function (/*…list*/) {
-	var lists;
-	if (!arguments.length) slice.call(this);
-	push.apply(lists = [this], arguments);
-	lists.forEach(value);
-	lists.sort(byLength);
-	return lists.reduce(function (a, b) {
-		return filter.call(a, function (x) { return contains.call(b, x); });
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js
deleted file mode 100644
index ac7c79bc4521ce..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , eq    = require('../../object/eq')
-  , value = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-module.exports = function (other) {
-	var i, l;
-	(value(this) && value(other));
-	l = toPosInt(this.length);
-	if (l !== toPosInt(other.length)) return false;
-	for (i = 0; i < l; ++i) {
-		if (hasOwnProperty.call(this, i) !== hasOwnProperty.call(other, i)) {
-			return false;
-		}
-		if (!eq(this[i], other[i])) return false;
-	}
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js
deleted file mode 100644
index b14f461d941ee5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var indexOf = require('./e-index-of')
-
-  , every = Array.prototype.every
-  , isFirst;
-
-isFirst = function (value, index) {
-	return indexOf.call(this, value) === index;
-};
-
-module.exports = function () { return every.call(this, isFirst, this); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js
deleted file mode 100644
index e18e61701fa028..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'keys', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js
deleted file mode 100644
index 2f89cffe101d61..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.keys : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js
deleted file mode 100644
index 06bd87bf296c15..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var arr = [1, 'foo'], iterator, result;
-	if (typeof arr.keys !== 'function') return false;
-	iterator = arr.keys();
-	if (!iterator) return false;
-	if (typeof iterator.next !== 'function') return false;
-	result = iterator.next();
-	if (!result) return false;
-	if (result.value !== 0) return false;
-	if (result.done !== false) return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js
deleted file mode 100644
index 83773f6ec955d2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('es6-iterator/array');
-module.exports = function () { return new ArrayIterator(this, 'key'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js
deleted file mode 100644
index a191d6e153d6ae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var toPosInt = require('../../number/to-pos-integer')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-module.exports = function () {
-	var i, l;
-	if (!(l = toPosInt(value(this).length))) return null;
-	i = l - 1;
-	while (!hasOwnProperty.call(this, i)) {
-		if (--i === -1) return null;
-	}
-	return i;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js
deleted file mode 100644
index bf9d2f29249d09..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var lastIndex = require('./last-index');
-
-module.exports = function () {
-	var i;
-	if ((i = lastIndex.call(this)) !== null) return this[i];
-	return undefined;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js
deleted file mode 100644
index 3aabb87440e099..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'map', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js
deleted file mode 100644
index 66f66607df4f14..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ?
-		Array.prototype.map : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js
deleted file mode 100644
index c328b473302cea..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var identity = require('../../../function/identity')
-  , SubArray = require('../../_sub-array-dummy-safe');
-
-module.exports = function () {
-	return (new SubArray()).map(identity) instanceof SubArray;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js
deleted file mode 100644
index 2ee731347b1aee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var isPlainArray = require('../../is-plain-array')
-  , callable     = require('../../../object/valid-callable')
-
-  , isArray = Array.isArray, map = Array.prototype.map
-  , forEach = Array.prototype.forEach, call = Function.prototype.call;
-
-module.exports = function (callbackFn/*, thisArg*/) {
-	var result, thisArg;
-	if (!this || !isArray(this) || isPlainArray(this)) {
-		return map.apply(this, arguments);
-	}
-	callable(callbackFn);
-	thisArg = arguments[1];
-	result = new this.constructor(this.length);
-	forEach.call(this, function (val, i, self) {
-		result[i] = call.call(callbackFn, thisArg, val, i, self);
-	});
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js
deleted file mode 100644
index dcf843313d5fcb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var indexOf = require('./e-index-of')
-
-  , forEach = Array.prototype.forEach, splice = Array.prototype.splice;
-
-module.exports = function (item/*, …item*/) {
-	forEach.call(arguments, function (item) {
-		var index = indexOf.call(this, item);
-		if (index !== -1) splice.call(this, index, 1);
-	}, this);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js
deleted file mode 100644
index dc974b832e07d2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var forEach = Array.prototype.forEach;
-
-module.exports = function (sep) {
-	var result = [];
-	forEach.call(this, function (val, i) { result.push(val, sep); });
-	result.pop();
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js
deleted file mode 100644
index cd488a063956e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'slice', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js
deleted file mode 100644
index 72200ca9e381b6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Array.prototype.slice : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js
deleted file mode 100644
index ec1985e70ee034..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var SubArray = require('../../_sub-array-dummy-safe');
-
-module.exports = function () {
-	return (new SubArray()).slice() instanceof SubArray;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js
deleted file mode 100644
index 2761a1aad8340d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-var toInteger    = require('../../../number/to-integer')
-  , toPosInt     = require('../../../number/to-pos-integer')
-  , isPlainArray = require('../../is-plain-array')
-
-  , isArray = Array.isArray, slice = Array.prototype.slice
-  , hasOwnProperty = Object.prototype.hasOwnProperty, max = Math.max;
-
-module.exports = function (start, end) {
-	var length, result, i;
-	if (!this || !isArray(this) || isPlainArray(this)) {
-		return slice.apply(this, arguments);
-	}
-	length = toPosInt(this.length);
-	start = toInteger(start);
-	if (start < 0) start = max(length + start, 0);
-	else if (start > length) start = length;
-	if (end === undefined) {
-		end = length;
-	} else {
-		end = toInteger(end);
-		if (end < 0) end = max(length + end, 0);
-		else if (end > length) end = length;
-	}
-	if (start > end) start = end;
-	result = new this.constructor(end - start);
-	i = 0;
-	while (start !== end) {
-		if (hasOwnProperty.call(this, start)) result[i] = this[start];
-		++i;
-		++start;
-	}
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js
deleted file mode 100644
index de7460d62234cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var callable = require('../../object/valid-callable')
-  , value    = require('../../object/valid-value')
-
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , call = Function.prototype.call;
-
-module.exports = function (cb/*, thisArg*/) {
-	var i, self, thisArg;
-	self = Object(value(this));
-	callable(cb);
-	thisArg = arguments[1];
-
-	for (i = self.length; i >= 0; --i) {
-		if (hasOwnProperty.call(self, i) &&
-				call.call(cb, thisArg, self[i], i, self)) {
-			return true;
-		}
-	}
-	return false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js
deleted file mode 100644
index aab1f8eff677b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'splice', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js
deleted file mode 100644
index e8ecf3cf856171..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Array.prototype.splice : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js
deleted file mode 100644
index ffddaa81ef83dd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var SubArray = require('../../_sub-array-dummy-safe');
-
-module.exports = function () {
-	return (new SubArray()).splice(0) instanceof SubArray;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js
deleted file mode 100644
index a8505a2ce2a201..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var isPlainArray = require('../../is-plain-array')
-
-  , isArray = Array.isArray, splice = Array.prototype.splice
-  , forEach = Array.prototype.forEach;
-
-module.exports = function (start, deleteCount/*, …items*/) {
-	var arr = splice.apply(this, arguments), result;
-	if (!this || !isArray(this) || isPlainArray(this)) return arr;
-	result = new this.constructor(arr.length);
-	forEach.call(arr, function (val, i) { result[i] = val; });
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js
deleted file mode 100644
index db0146555733a2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var indexOf = require('./e-index-of')
-
-  , filter = Array.prototype.filter
-
-  , isFirst;
-
-isFirst = function (value, index) {
-	return indexOf.call(this, value) === index;
-};
-
-module.exports = function () { return filter.call(this, isFirst, this); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js
deleted file mode 100644
index 237281fd3beed0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array.prototype, 'values', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js
deleted file mode 100644
index c0832c30ea4566..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ? Array.prototype.values : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js
deleted file mode 100644
index cc0c6294e2af14..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var arr = ['foo', 1], iterator, result;
-	if (typeof arr.values !== 'function') return false;
-	iterator = arr.values();
-	if (!iterator) return false;
-	if (typeof iterator.next !== 'function') return false;
-	result = iterator.next();
-	if (!result) return false;
-	if (result.value !== 'foo') return false;
-	if (result.done !== false) return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js
deleted file mode 100644
index f6555fd858e99a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('es6-iterator/array');
-module.exports = function () { return new ArrayIterator(this, 'value'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js
deleted file mode 100644
index 612320647b39f6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = (function () {
-	var SubArray = require('./_sub-array-dummy'), arr;
-
-	if (!SubArray) return false;
-	arr = new SubArray();
-	if (!Array.isArray(arr)) return false;
-	if (!(arr instanceof SubArray)) return false;
-
-	arr[34] = 'foo';
-	return (arr.length === 35);
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js
deleted file mode 100644
index 5baf8a8d1127a4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('../object/set-prototype-of')
-  , isExtensible   = require('./_is-extensible');
-
-module.exports = (function () {
-	var SubArray;
-
-	if (isExtensible) return require('./_sub-array-dummy');
-
-	if (!setPrototypeOf) return null;
-	SubArray = function () {
-		var arr = Array.apply(this, arguments);
-		setPrototypeOf(arr, SubArray.prototype);
-		return arr;
-	};
-	setPrototypeOf(SubArray, Array);
-	SubArray.prototype = Object.create(Array.prototype, {
-		constructor: { value: SubArray, enumerable: false, writable: true,
-			configurable: true }
-	});
-	return SubArray;
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js
deleted file mode 100644
index a926d1a32ddd7e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('../object/set-prototype-of');
-
-module.exports = (function () {
-	var SubArray;
-
-	if (!setPrototypeOf) return null;
-	SubArray = function () { Array.apply(this, arguments); };
-	setPrototypeOf(SubArray, Array);
-	SubArray.prototype = Object.create(Array.prototype, {
-		constructor: { value: SubArray, enumerable: false, writable: true,
-			configurable: true }
-	});
-	return SubArray;
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js
deleted file mode 100644
index f3411b13770743..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array, 'from', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js
deleted file mode 100644
index 3b99cda8ec3db6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Array.from
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js
deleted file mode 100644
index 63ff2a572a353b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var from = Array.from, arr, result;
-	if (typeof from !== 'function') return false;
-	arr = ['raz', 'dwa'];
-	result = from(arr);
-	return Boolean(result && (result !== arr) && (result[1] === 'dwa'));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js
deleted file mode 100644
index a90ba2f9730c54..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js
+++ /dev/null
@@ -1,106 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , isArguments    = require('../../function/is-arguments')
-  , isFunction     = require('../../function/is-function')
-  , toPosInt       = require('../../number/to-pos-integer')
-  , callable       = require('../../object/valid-callable')
-  , validValue     = require('../../object/valid-value')
-  , isString       = require('../../string/is-string')
-
-  , isArray = Array.isArray, call = Function.prototype.call
-  , desc = { configurable: true, enumerable: true, writable: true, value: null }
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (arrayLike/*, mapFn, thisArg*/) {
-	var mapFn = arguments[1], thisArg = arguments[2], Constructor, i, j, arr, l, code, iterator
-	  , result, getIterator, value;
-
-	arrayLike = Object(validValue(arrayLike));
-
-	if (mapFn != null) callable(mapFn);
-	if (!this || (this === Array) || !isFunction(this)) {
-		// Result: Plain array
-		if (!mapFn) {
-			if (isArguments(arrayLike)) {
-				// Source: Arguments
-				l = arrayLike.length;
-				if (l !== 1) return Array.apply(null, arrayLike);
-				arr = new Array(1);
-				arr[0] = arrayLike[0];
-				return arr;
-			}
-			if (isArray(arrayLike)) {
-				// Source: Array
-				arr = new Array(l = arrayLike.length);
-				for (i = 0; i < l; ++i) arr[i] = arrayLike[i];
-				return arr;
-			}
-		}
-		arr = [];
-	} else {
-		// Result: Non plain array
-		Constructor = this;
-	}
-
-	if (!isArray(arrayLike)) {
-		if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
-			// Source: Iterator
-			iterator = callable(getIterator).call(arrayLike);
-			if (Constructor) arr = new Constructor();
-			result = iterator.next();
-			i = 0;
-			while (!result.done) {
-				value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
-				if (!Constructor) {
-					arr[i] = value;
-				} else {
-					desc.value = value;
-					defineProperty(arr, i, desc);
-				}
-				result = iterator.next();
-				++i;
-			}
-			l = i;
-		} else if (isString(arrayLike)) {
-			// Source: String
-			l = arrayLike.length;
-			if (Constructor) arr = new Constructor();
-			for (i = 0, j = 0; i < l; ++i) {
-				value = arrayLike[i];
-				if ((i + 1) < l) {
-					code = value.charCodeAt(0);
-					if ((code >= 0xD800) && (code <= 0xDBFF)) value += arrayLike[++i];
-				}
-				value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
-				if (!Constructor) {
-					arr[j] = value;
-				} else {
-					desc.value = value;
-					defineProperty(arr, j, desc);
-				}
-				++j;
-			}
-			l = j;
-		}
-	}
-	if (l === undefined) {
-		// Source: array or array-like
-		l = toPosInt(arrayLike.length);
-		if (Constructor) arr = new Constructor(l);
-		for (i = 0; i < l; ++i) {
-			value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
-			if (!Constructor) {
-				arr[i] = value;
-			} else {
-				desc.value = value;
-				defineProperty(arr, i, desc);
-			}
-		}
-	}
-	if (Constructor) {
-		desc.value = null;
-		arr.length = l;
-	}
-	return arr;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js
deleted file mode 100644
index 5e066750b1d5ba..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var toPosInt = require('../number/to-pos-integer')
-  , value    = require('../object/valid-value')
-
-  , slice = Array.prototype.slice;
-
-module.exports = function (length/*, …fill*/) {
-	var arr, l;
-	length = toPosInt(value(length));
-	if (length === 0) return [];
-
-	arr = (arguments.length < 2) ? [undefined] :
-			slice.call(arguments, 1, 1 + length);
-
-	while ((l = arr.length) < length) {
-		arr = arr.concat(arr.slice(0, length - l));
-	}
-	return arr;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js
deleted file mode 100644
index 7a6867894b56dd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':          require('./#'),
-	from:         require('./from'),
-	generate:     require('./generate'),
-	isPlainArray: require('./is-plain-array'),
-	of:           require('./of'),
-	toArray:      require('./to-array'),
-	validArray:   require('./valid-array')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js
deleted file mode 100644
index 6b37e4069738b4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (obj) {
-	var proto;
-	if (!obj || !isArray(obj)) return false;
-	proto = getPrototypeOf(obj);
-	if (!isArray(proto)) return false;
-	return !isArray(getPrototypeOf(proto));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js
deleted file mode 100644
index bf2a5a54a740e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Array, 'of', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js
deleted file mode 100644
index 07ee54dbcd4283..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Array.of
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js
deleted file mode 100644
index 4390a10863326b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var of = Array.of, result;
-	if (typeof of !== 'function') return false;
-	result = of('foo', 'bar');
-	return Boolean(result && (result[1] === 'bar'));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js
deleted file mode 100644
index de72bc92291154..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var isFunction = require('../../function/is-function')
-
-  , slice = Array.prototype.slice, defineProperty = Object.defineProperty
-  , desc = { configurable: true, enumerable: true, writable: true, value: null };
-
-module.exports = function (/*…items*/) {
-	var result, i, l;
-	if (!this || (this === Array) || !isFunction(this)) return slice.call(arguments);
-	result = new this(l = arguments.length);
-	for (i = 0; i < l; ++i) {
-		desc.value = arguments[i];
-		defineProperty(result, i, desc);
-	}
-	desc.value = null;
-	result.length = l;
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js
deleted file mode 100644
index ce908dd912959b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var from = require('./from')
-
-  , isArray = Array.isArray;
-
-module.exports = function (arrayLike) {
-	return isArray(arrayLike) ? arrayLike : from(arrayLike);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js
deleted file mode 100644
index d86a8f5f242b27..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-
-module.exports = function (value) {
-	if (isArray(value)) return value;
-	throw new TypeError(value + " is not an array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js
deleted file mode 100644
index c193b948eb9d01..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = {
-	isBoolean: require('./is-boolean')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js
deleted file mode 100644
index 5d1a802e11211c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(true);
-
-module.exports = function (x) {
-	return (typeof x === 'boolean') || ((typeof x === 'object') &&
-		((x instanceof Boolean) || (toString.call(x) === id)));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js
deleted file mode 100644
index 69e2eb09fcbcf1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var getTime = Date.prototype.getTime;
-
-module.exports = function () { return new Date(getTime.call(this)); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js
deleted file mode 100644
index e780efe3c7f99e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var getMonth = Date.prototype.getMonth;
-
-module.exports = function () {
-	switch (getMonth.call(this)) {
-	case 1:
-		return this.getFullYear() % 4 ? 28 : 29;
-	case 3:
-	case 5:
-	case 8:
-	case 10:
-		return 30;
-	default:
-		return 31;
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js
deleted file mode 100644
index 0c9eb8b62788cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var setHours = Date.prototype.setHours;
-
-module.exports = function () {
-	setHours.call(this, 0, 0, 0, 0);
-	return this;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js
deleted file mode 100644
index 7328c250b36506..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var floorDay = require('./floor-day');
-
-module.exports = function () {
-	floorDay.call(this).setDate(1);
-	return this;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js
deleted file mode 100644
index 9c5085389fbf67..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var floorMonth = require('./floor-month');
-
-module.exports = function () {
-	floorMonth.call(this).setMonth(0);
-	return this;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js
deleted file mode 100644
index 15bd95f7eddf21..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var pad       = require('../../number/#/pad')
-  , date      = require('../valid-date')
-
-  , format;
-
-format = require('../../string/format-method')({
-	Y: function () { return String(this.getFullYear()); },
-	y: function () { return String(this.getFullYear()).slice(-2); },
-	m: function () { return pad.call(this.getMonth() + 1, 2); },
-	d: function () { return pad.call(this.getDate(), 2); },
-	H: function () { return pad.call(this.getHours(), 2); },
-	M: function () { return pad.call(this.getMinutes(), 2); },
-	S: function () { return pad.call(this.getSeconds(), 2); },
-	L: function () { return pad.call(this.getMilliseconds(), 3); }
-});
-
-module.exports = function (pattern) {
-	return format.call(date(this), pattern);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js
deleted file mode 100644
index f71b2950029e59..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = {
-	copy:        require('./copy'),
-	daysInMonth: require('./days-in-month'),
-	floorDay:    require('./floor-day'),
-	floorMonth:  require('./floor-month'),
-	floorYear:   require('./floor-year'),
-	format:      require('./format')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js
deleted file mode 100644
index eac33fbe6dddce..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':       require('./#'),
-	isDate:    require('./is-date'),
-	validDate: require('./valid-date')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js
deleted file mode 100644
index 6ba236ecbc0783..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(new Date());
-
-module.exports = function (x) {
-	return (x && ((x instanceof Date) || (toString.call(x) === id))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js
deleted file mode 100644
index 7d1a9b60d4748a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isDate = require('./is-date');
-
-module.exports = function (x) {
-	if (!isDate(x)) throw new TypeError(x + " is not a Date object");
-	return x;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js
deleted file mode 100644
index b984aa91fef8b4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = {
-	throw: require('./throw')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js
deleted file mode 100644
index 7e15ebd1cf028b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var error = require('../valid-error');
-
-module.exports = function () { throw error(this); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js
deleted file mode 100644
index bbc2dc20b462b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var assign = require('../object/assign')
-
-  , captureStackTrace = Error.captureStackTrace;
-
-exports = module.exports = function (message/*, code, ext*/) {
-	var err = new Error(), code = arguments[1], ext = arguments[2];
-	if (ext == null) {
-		if (code && (typeof code === 'object')) {
-			ext = code;
-			code = null;
-		}
-	}
-	if (ext != null) assign(err, ext);
-	err.message = String(message);
-	if (code != null) err.code = String(code);
-	if (captureStackTrace) captureStackTrace(err, exports);
-	return err;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js
deleted file mode 100644
index 62984b52de0871..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':        require('./#'),
-	custom:     require('./custom'),
-	isError:    require('./is-error'),
-	validError: require('./valid-error')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js
deleted file mode 100644
index 422705faf71d2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(new Error());
-
-module.exports = function (x) {
-	return (x && ((x instanceof Error) || (toString.call(x)) === id)) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js
deleted file mode 100644
index 0bef768a776d09..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isError = require('./is-error');
-
-module.exports = function (x) {
-	if (!isError(x)) throw new TypeError(x + " is not an Error object");
-	return x;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js
deleted file mode 100644
index 1da5e01162dcf5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var callable = require('../../object/valid-callable')
-  , aFrom    = require('../../array/from')
-
-  , apply = Function.prototype.apply, call = Function.prototype.call
-  , callFn = function (arg, fn) { return call.call(fn, this, arg); };
-
-module.exports = function (fn/*, …fnn*/) {
-	var fns, first;
-	if (!fn) callable(fn);
-	fns = [this].concat(aFrom(arguments));
-	fns.forEach(callable);
-	fns = fns.reverse();
-	first = fns[0];
-	fns = fns.slice(1);
-	return function (arg) {
-		return fns.reduce(callFn, apply.call(first, this, arguments));
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js
deleted file mode 100644
index e1467f7671946c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var mixin         = require('../../object/mixin')
-  , validFunction = require('../valid-function')
-
-  , re = /^\s*function\s*([\0-'\)-\uffff]+)*\s*\(([\0-\(\*-\uffff]*)\)\s*\{/;
-
-module.exports = function () {
-	var match = String(validFunction(this)).match(re), fn;
-
-	fn = new Function('fn', 'return function ' + match[1].trim() + '(' +
-		match[2] + ') { return fn.apply(this, arguments); };')(this);
-	try { mixin(fn, this); } catch (ignore) {}
-	return fn;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js
deleted file mode 100644
index 943d6faf860772..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var toPosInt     = require('../../number/to-pos-integer')
-  , callable     = require('../../object/valid-callable')
-  , defineLength = require('../_define-length')
-
-  , slice = Array.prototype.slice, apply = Function.prototype.apply
-  , curry;
-
-curry = function self(fn, length, preArgs) {
-	return defineLength(function () {
-		var args = preArgs ?
-				preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) :
-				slice.call(arguments, 0, length);
-		return (args.length === length) ? apply.call(fn, this, args) :
-				self(fn, length, args);
-	}, preArgs ? (length - preArgs.length) : length);
-};
-
-module.exports = function (/*length*/) {
-	var length = arguments[0];
-	return curry(callable(this),
-		isNaN(length) ? toPosInt(this.length) : toPosInt(length));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js
deleted file mode 100644
index 8d0da007fa182b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = {
-	compose:        require('./compose'),
-	copy:           require('./copy'),
-	curry:          require('./curry'),
-	lock:           require('./lock'),
-	not:            require('./not'),
-	partial:        require('./partial'),
-	spread:         require('./spread'),
-	toStringTokens: require('./to-string-tokens')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js
deleted file mode 100644
index 91e1a65cd91887..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var callable = require('../../object/valid-callable')
-
-  , apply    = Function.prototype.apply;
-
-module.exports = function (/*…args*/) {
-	var fn = callable(this)
-	  , args = arguments;
-
-	return function () { return apply.call(fn, this, args); };
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js
deleted file mode 100644
index c6dbe97fb6ecd9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var callable     = require('../../object/valid-callable')
-  , defineLength = require('../_define-length')
-
-  , apply = Function.prototype.apply;
-
-module.exports = function () {
-	var fn = callable(this);
-
-	return defineLength(function () {
-		return !apply.call(fn, this, arguments);
-	}, fn.length);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js
deleted file mode 100644
index bf31a3575a56df..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var callable     = require('../../object/valid-callable')
-  , aFrom        = require('../../array/from')
-  , defineLength = require('../_define-length')
-
-  , apply = Function.prototype.apply;
-
-module.exports = function (/*…args*/) {
-	var fn = callable(this)
-	  , args = aFrom(arguments);
-
-	return defineLength(function () {
-		return apply.call(fn, this, args.concat(aFrom(arguments)));
-	}, fn.length - args.length);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js
deleted file mode 100644
index d7c93b7e07ee15..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var callable = require('../../object/valid-callable')
-
-  , apply = Function.prototype.apply;
-
-module.exports = function () {
-	var fn = callable(this);
-	return function (args) { return apply.call(fn, this, args); };
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js
deleted file mode 100644
index 67afeae82def7e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var validFunction = require('../valid-function')
-
-  , re = new RegExp('^\\s*function[\\0-\'\\)-\\uffff]*' +
-	'\\(([\\0-\\(\\*-\\uffff]*)\\)\\s*\\{([\\0-\\uffff]*)\\}\\s*$');
-
-module.exports = function () {
-	var data = String(validFunction(this)).match(re);
-	return { args: data[1], body: data[2] };
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js
deleted file mode 100644
index 496ea62c52b612..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-var toPosInt = require('../number/to-pos-integer')
-
-  , test = function (a, b) {}, desc, defineProperty
-  , generate, mixin;
-
-try {
-	Object.defineProperty(test, 'length', { configurable: true, writable: false,
-		enumerable: false, value: 1 });
-} catch (ignore) {}
-
-if (test.length === 1) {
-	// ES6
-	desc = { configurable: true, writable: false, enumerable: false };
-	defineProperty = Object.defineProperty;
-	module.exports = function (fn, length) {
-		length = toPosInt(length);
-		if (fn.length === length) return fn;
-		desc.value = length;
-		return defineProperty(fn, 'length', desc);
-	};
-} else {
-	mixin = require('../object/mixin');
-	generate = (function () {
-		var cache = [];
-		return function (l) {
-			var args, i = 0;
-			if (cache[l]) return cache[l];
-			args = [];
-			while (l--) args.push('a' + (++i).toString(36));
-			return new Function('fn', 'return function (' + args.join(', ') +
-				') { return fn.apply(this, arguments); };');
-		};
-	}());
-	module.exports = function (src, length) {
-		var target;
-		length = toPosInt(length);
-		if (src.length === length) return src;
-		target = generate(length)(src);
-		try { mixin(target, src); } catch (ignore) {}
-		return target;
-	};
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js
deleted file mode 100644
index 10f1e203e2d023..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (x) {
-	return function () { return x; };
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js
deleted file mode 100644
index a9289f0b21dfac..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (x) { return x; };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js
deleted file mode 100644
index cfad3f3ec25bf8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Export all modules.
-
-'use strict';
-
-module.exports = {
-	'#':           require('./#'),
-	constant:      require('./constant'),
-	identity:      require('./identity'),
-	invoke:        require('./invoke'),
-	isArguments:   require('./is-arguments'),
-	isFunction:    require('./is-function'),
-	noop:          require('./noop'),
-	pluck:         require('./pluck'),
-	validFunction: require('./valid-function')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js
deleted file mode 100644
index 9195afddd8c1e8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var isCallable = require('../object/is-callable')
-  , value      = require('../object/valid-value')
-
-  , slice = Array.prototype.slice, apply = Function.prototype.apply;
-
-module.exports = function (name/*, …args*/) {
-	var args = slice.call(arguments, 1), isFn = isCallable(name);
-	return function (obj) {
-		value(obj);
-		return apply.call(isFn ? name : obj[name], obj,
-			args.concat(slice.call(arguments, 1)));
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js
deleted file mode 100644
index 9a29855f87dc6a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call((function () { return arguments; }()));
-
-module.exports = function (x) { return (toString.call(x) === id); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js
deleted file mode 100644
index ab4399ce25e98b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(require('./noop'));
-
-module.exports = function (f) {
-	return (typeof f === "function") && (toString.call(f) === id);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js
deleted file mode 100644
index aa43baedf1d5d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function () {};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js
deleted file mode 100644
index 7f70a30cbd95ee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var value   = require('../object/valid-value');
-
-module.exports = function (name) {
-	return function (o) { return value(o)[name]; };
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js
deleted file mode 100644
index 05fdee2c3debda..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isFunction = require('./is-function');
-
-module.exports = function (x) {
-	if (!isFunction(x)) throw new TypeError(x + " is not a function");
-	return x;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/global.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/global.js
deleted file mode 100644
index 872a40e814be44..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/global.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = new Function("return this")();
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/index.js
deleted file mode 100644
index db9a7600b47115..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = {
-	global:   require('./global'),
-
-	array:    require('./array'),
-	boolean:  require('./boolean'),
-	date:     require('./date'),
-	error:    require('./error'),
-	function: require('./function'),
-	iterable: require('./iterable'),
-	math:     require('./math'),
-	number:   require('./number'),
-	object:   require('./object'),
-	regExp:   require('./reg-exp'),
-	string:   require('./string')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js
deleted file mode 100644
index f1e20425b329a2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var forOf      = require('es6-iterator/for-of')
-  , isIterable = require('es6-iterator/is-iterable')
-  , iterable   = require('./validate')
-
-  , forEach = Array.prototype.forEach;
-
-module.exports = function (target, cb/*, thisArg*/) {
-	if (isIterable(iterable(target))) forOf(target, cb, arguments[2]);
-	else forEach.call(target, cb, arguments[2]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js
deleted file mode 100644
index a3e16a5e892c6c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = {
-	forEach:        require('./for-each'),
-	is:             require('./is'),
-	validate:       require('./validate'),
-	validateObject: require('./validate-object')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js
deleted file mode 100644
index bb8bf287276bee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , isArrayLike    = require('../object/is-array-like');
-
-module.exports = function (x) {
-	if (x == null) return false;
-	if (typeof x[iteratorSymbol] === 'function') return true;
-	return isArrayLike(x);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js
deleted file mode 100644
index 988a6adb6249e7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var isObject = require('../object/is-object')
-  , is       = require('./is');
-
-module.exports = function (x) {
-	if (is(x) && isObject(x)) return x;
-	throw new TypeError(x + " is not an iterable or array-like object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js
deleted file mode 100644
index 1be6d7fcd96e44..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var is = require('./is');
-
-module.exports = function (x) {
-	if (is(x)) return x;
-	throw new TypeError(x + " is not an iterable or array-like");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js
deleted file mode 100644
index eecda5654dad51..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js
+++ /dev/null
@@ -1,82 +0,0 @@
-// Credit: https://github.com/paulmillr/es6-shim/
-
-'use strict';
-
-var abs = Math.abs, floor = Math.floor, log = Math.log, min = Math.min
-  , pow = Math.pow, LN2 = Math.LN2
-  , roundToEven;
-
-roundToEven = function (n) {
-	var w = floor(n), f = n - w;
-	if (f < 0.5) return w;
-	if (f > 0.5) return w + 1;
-	return w % 2 ? w + 1 : w;
-};
-
-module.exports = function (v, ebits, fbits) {
-	var bias = (1 << (ebits - 1)) - 1, s, e, f, i, bits, str, bytes;
-
-	// Compute sign, exponent, fraction
-	if (isNaN(v)) {
-		// NaN
-		// http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
-		e = (1 << ebits) - 1;
-		f = pow(2, fbits - 1);
-		s = 0;
-	} else if (v === Infinity || v === -Infinity) {
-		e = (1 << ebits) - 1;
-		f = 0;
-		s = (v < 0) ? 1 : 0;
-	} else if (v === 0) {
-		e = 0;
-		f = 0;
-		s = (1 / v === -Infinity) ? 1 : 0;
-	} else {
-		s = v < 0;
-		v = abs(v);
-
-		if (v >= pow(2, 1 - bias)) {
-			e = min(floor(log(v) / LN2), 1023);
-			f = roundToEven(v / pow(2, e) * pow(2, fbits));
-			if (f / pow(2, fbits) >= 2) {
-				e = e + 1;
-				f = 1;
-			}
-			if (e > bias) {
-				// Overflow
-				e = (1 << ebits) - 1;
-				f = 0;
-			} else {
-				// Normal
-				e = e + bias;
-				f = f - pow(2, fbits);
-			}
-		} else {
-			// Subnormal
-			e = 0;
-			f = roundToEven(v / pow(2, 1 - bias - fbits));
-		}
-	}
-
-	// Pack sign, exponent, fraction
-	bits = [];
-	for (i = fbits; i; i -= 1) {
-		bits.push(f % 2 ? 1 : 0);
-		f = floor(f / 2);
-	}
-	for (i = ebits; i; i -= 1) {
-		bits.push(e % 2 ? 1 : 0);
-		e = floor(e / 2);
-	}
-	bits.push(s ? 1 : 0);
-	bits.reverse();
-	str = bits.join('');
-
-	// Bits to bytes
-	bytes = [];
-	while (str.length) {
-		bytes.push(parseInt(str.substring(0, 8), 2));
-		str = str.substring(8);
-	}
-	return bytes;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js
deleted file mode 100644
index c9f26f2bb6f12e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Credit: https://github.com/paulmillr/es6-shim/
-
-'use strict';
-
-var pow = Math.pow;
-
-module.exports = function (bytes, ebits, fbits) {
-	// Bytes to bits
-	var bits = [], i, j, b, str,
-	bias, s, e, f;
-
-	for (i = bytes.length; i; i -= 1) {
-		b = bytes[i - 1];
-		for (j = 8; j; j -= 1) {
-			bits.push(b % 2 ? 1 : 0);
-			b = b >> 1;
-		}
-	}
-	bits.reverse();
-	str = bits.join('');
-
-	// Unpack sign, exponent, fraction
-	bias = (1 << (ebits - 1)) - 1;
-	s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
-	e = parseInt(str.substring(1, 1 + ebits), 2);
-	f = parseInt(str.substring(1 + ebits), 2);
-
-	// Produce number
-	if (e === (1 << ebits) - 1) return f !== 0 ? NaN : s * Infinity;
-	if (e > 0) return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
-	if (f !== 0) return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
-	return s < 0 ? -0 : 0;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js
deleted file mode 100644
index f48ad11de722a1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'acosh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js
deleted file mode 100644
index 00ddea69dd7a46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.acosh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js
deleted file mode 100644
index 363f0d8bcdd61b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var acosh = Math.acosh;
-	if (typeof acosh !== 'function') return false;
-	return acosh(2) === 1.3169578969248166;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js
deleted file mode 100644
index 89a24b5d767e18..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var log = Math.log, sqrt = Math.sqrt;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x < 1) return NaN;
-	if (x === 1) return 0;
-	if (x === Infinity) return x;
-	return log(x + sqrt(x * x - 1));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js
deleted file mode 100644
index 21f64d50491960..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'asinh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js
deleted file mode 100644
index d415144eea7373..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.asinh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js
deleted file mode 100644
index 6c205f418cae9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var asinh = Math.asinh;
-	if (typeof asinh !== 'function') return false;
-	return asinh(2) === 1.4436354751788103;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js
deleted file mode 100644
index 42fbf1457f7604..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var log = Math.log, sqrt = Math.sqrt;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (!isFinite(x)) return x;
-	if (x < 0) {
-		x = -x;
-		return -log(x + sqrt(x * x + 1));
-	}
-	return log(x + sqrt(x * x + 1));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js
deleted file mode 100644
index 1a4851343b3196..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'atanh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js
deleted file mode 100644
index 785b3deba5eb11..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.atanh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js
deleted file mode 100644
index dbaf18ece2d2b0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var atanh = Math.atanh;
-	if (typeof atanh !== 'function') return false;
-	return atanh(0.5) === 0.5493061443340549;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js
deleted file mode 100644
index 531e2891fe2f67..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var log = Math.log;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x < -1) return NaN;
-	if (x > 1) return NaN;
-	if (x === -1) return -Infinity;
-	if (x === 1) return Infinity;
-	if (x === 0) return x;
-	return 0.5 * log((1 + x) / (1 - x));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js
deleted file mode 100644
index 3a12dde487eba3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'cbrt', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js
deleted file mode 100644
index 89f966dfe4ed1a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.cbrt
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js
deleted file mode 100644
index 69809f3cf4956d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var cbrt = Math.cbrt;
-	if (typeof cbrt !== 'function') return false;
-	return cbrt(2) === 1.2599210498948732;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js
deleted file mode 100644
index bca196026c730a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var pow = Math.pow;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (!isFinite(x)) return x;
-	if (x < 0) return -pow(-x, 1 / 3);
-	return pow(x, 1 / 3);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js
deleted file mode 100644
index 339df33ea71822..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'clz32', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js
deleted file mode 100644
index 1687b337e3bdf9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.clz32
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js
deleted file mode 100644
index ccc8f71337bf29..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var clz32 = Math.clz32;
-	if (typeof clz32 !== 'function') return false;
-	return clz32(1000) === 22;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js
deleted file mode 100644
index 2a582da3bf0b31..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (value) {
-	value = value >>> 0;
-	return value ? 32 - value.toString(2).length : 32;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js
deleted file mode 100644
index f90d83056c8b62..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'cosh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js
deleted file mode 100644
index 000636ab774ae5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.cosh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js
deleted file mode 100644
index c796bcbf314f05..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var cosh = Math.cosh;
-	if (typeof cosh !== 'function') return false;
-	return cosh(1) === 1.5430806348152437;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js
deleted file mode 100644
index f9062bd976c693..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var exp = Math.exp;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return 1;
-	if (!isFinite(x)) return Infinity;
-	return (exp(x) + exp(-x)) / 2;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js
deleted file mode 100644
index fc20c8cfa068c4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'expm1', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js
deleted file mode 100644
index 4c1bc77a222f78..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.expm1
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js
deleted file mode 100644
index 3b106d5d535858..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var expm1 = Math.expm1;
-	if (typeof expm1 !== 'function') return false;
-	return expm1(1).toFixed(15) === '1.718281828459045';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js
deleted file mode 100644
index 9c8c2360857e59..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Thanks: https://github.com/monolithed/ECMAScript-6
-
-'use strict';
-
-var exp = Math.exp;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (x === Infinity) return Infinity;
-	if (x === -Infinity) return -1;
-
-	if ((x > -1.0e-6) && (x < 1.0e-6)) return x + x * x / 2;
-	return exp(x) - 1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js
deleted file mode 100644
index c55b26c464bce5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'fround', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js
deleted file mode 100644
index a077ed0ba33aa7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.fround
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js
deleted file mode 100644
index ffbf094e6b3447..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var fround = Math.fround;
-	if (typeof fround !== 'function') return false;
-	return fround(1.337) === 1.3370000123977661;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js
deleted file mode 100644
index f2c86e46a41c7a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
-
-'use strict';
-
-var toFloat32;
-
-if (typeof Float32Array !== 'undefined') {
-	toFloat32 = (function () {
-		var float32Array = new Float32Array(1);
-		return function (x) {
-			float32Array[0] = x;
-			return float32Array[0];
-		};
-	}());
-} else {
-	toFloat32 = (function () {
-		var pack   = require('../_pack-ieee754')
-		  , unpack = require('../_unpack-ieee754');
-
-		return function (x) {
-			return unpack(pack(x, 8, 23), 8, 23);
-		};
-	}());
-}
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (!isFinite(x)) return x;
-
-	return toFloat32(x);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js
deleted file mode 100644
index b27fda7a0961b9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'hypot', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js
deleted file mode 100644
index 334bc584cf7778..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.hypot
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js
deleted file mode 100644
index e75c5d36be34c8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var hypot = Math.hypot;
-	if (typeof hypot !== 'function') return false;
-	return hypot(3, 4) === 5;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js
deleted file mode 100644
index 3d0988bc13dd4e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Thanks for hints: https://github.com/paulmillr/es6-shim
-
-'use strict';
-
-var some = Array.prototype.some, abs = Math.abs, sqrt = Math.sqrt
-
-  , compare = function (a, b) { return b - a; }
-  , divide = function (x) { return x / this; }
-  , add = function (sum, number) { return sum + number * number; };
-
-module.exports = function (val1, val2/*, …valn*/) {
-	var result, numbers;
-	if (!arguments.length) return 0;
-	some.call(arguments, function (val) {
-		if (isNaN(val)) {
-			result = NaN;
-			return;
-		}
-		if (!isFinite(val)) {
-			result = Infinity;
-			return true;
-		}
-		if (result !== undefined) return;
-		val = Number(val);
-		if (val === 0) return;
-		if (!numbers) numbers = [abs(val)];
-		else numbers.push(abs(val));
-	});
-	if (result !== undefined) return result;
-	if (!numbers) return 0;
-
-	numbers.sort(compare);
-	return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js
deleted file mode 100644
index ed207bd271f7f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'imul', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js
deleted file mode 100644
index 41e5d5f010383f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.imul
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js
deleted file mode 100644
index d8495dea2a8ec9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var imul = Math.imul;
-	if (typeof imul !== 'function') return false;
-	return imul(-1, 8) === -8;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js
deleted file mode 100644
index 8fd8a8d7a79111..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
-//         /Global_Objects/Math/imul
-
-'use strict';
-
-module.exports = function (x, y) {
-	var xh  = (x >>> 16) & 0xffff, xl = x & 0xffff
-	  , yh  = (y >>> 16) & 0xffff, yl = y & 0xffff;
-
-	// the shift by 0 fixes the sign on the high part
-	// the final |0 converts the unsigned value into a signed value
-	return ((xl * yl) + (((xh * yl + xl * yh) << 16) >>> 0) | 0);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js
deleted file mode 100644
index d112d0bfe0d04d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = {
-	acosh:  require('./acosh'),
-	asinh:  require('./asinh'),
-	atanh:  require('./atanh'),
-	cbrt:   require('./cbrt'),
-	clz32:  require('./clz32'),
-	cosh:   require('./cosh'),
-	expm1:  require('./expm1'),
-	fround: require('./fround'),
-	hypot:  require('./hypot'),
-	imul:   require('./imul'),
-	log10:  require('./log10'),
-	log2:   require('./log2'),
-	log1p:  require('./log1p'),
-	sign:   require('./sign'),
-	sinh:   require('./sinh'),
-	tanh:   require('./tanh'),
-	trunc:  require('./trunc')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js
deleted file mode 100644
index dd96edd80e0f20..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'log10', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js
deleted file mode 100644
index a9eee513130691..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.log10
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js
deleted file mode 100644
index c7f40ee7753bef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var log10 = Math.log10;
-	if (typeof log10 !== 'function') return false;
-	return log10(2) === 0.3010299956639812;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js
deleted file mode 100644
index fc77287f6176ff..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var log = Math.log, LOG10E = Math.LOG10E;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x < 0) return NaN;
-	if (x === 0) return -Infinity;
-	if (x === 1) return 0;
-	if (x === Infinity) return Infinity;
-
-	return log(x) * LOG10E;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js
deleted file mode 100644
index f62f91f6877d5b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'log1p', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js
deleted file mode 100644
index 107b114713cb57..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.log1p
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js
deleted file mode 100644
index 61e90974c5f5e0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var log1p = Math.log1p;
-	if (typeof log1p !== 'function') return false;
-	return log1p(1) === 0.6931471805599453;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js
deleted file mode 100644
index 10acebca4ab9af..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js
-
-'use strict';
-
-var log = Math.log;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x < -1) return NaN;
-	if (x === -1) return -Infinity;
-	if (x === 0) return x;
-	if (x === Infinity) return Infinity;
-
-	if (x > -1.0e-8 && x < 1.0e-8) return (x - x * x / 2);
-	return log(1 + x);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js
deleted file mode 100644
index 8483f0950aa965..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'log2', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js
deleted file mode 100644
index 87e9050abe0895..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.log2
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js
deleted file mode 100644
index 802322faf38e32..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var log2 = Math.log2;
-	if (typeof log2 !== 'function') return false;
-	return log2(3).toFixed(15) === '1.584962500721156';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js
deleted file mode 100644
index cd80994a72b7d5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var log = Math.log, LOG2E = Math.LOG2E;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x < 0) return NaN;
-	if (x === 0) return -Infinity;
-	if (x === 1) return 0;
-	if (x === Infinity) return Infinity;
-
-	return log(x) * LOG2E;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js
deleted file mode 100644
index b0db2f413fa598..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'sign', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js
deleted file mode 100644
index b2326333432fcb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.sign
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js
deleted file mode 100644
index 6d0de475aba61e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var sign = Math.sign;
-	if (typeof sign !== 'function') return false;
-	return ((sign(10) === 1) && (sign(-20) === -1));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js
deleted file mode 100644
index 4df9c95aa5d64f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (value) {
-	value = Number(value);
-	if (isNaN(value) || (value === 0)) return value;
-	return (value > 0) ? 1 : -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js
deleted file mode 100644
index f259a631b5718a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'sinh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js
deleted file mode 100644
index e5bea572f838d6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.sinh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js
deleted file mode 100644
index 888ec67a9c8cd8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var sinh = Math.sinh;
-	if (typeof sinh !== 'function') return false;
-	return ((sinh(1) === 1.1752011936438014) && (sinh(Number.MIN_VALUE) === 5e-324));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js
deleted file mode 100644
index 5b725bed656d95..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Parts of implementation taken from es6-shim project
-// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
-
-'use strict';
-
-var expm1 = require('../expm1')
-
-  , abs = Math.abs, exp = Math.exp, e = Math.E;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (!isFinite(x)) return x;
-	if (abs(x) < 1) return (expm1(x) - expm1(-x)) / 2;
-	return (exp(x - 1) - exp(-x - 1)) * e / 2;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js
deleted file mode 100644
index 5199a029c88b7e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'tanh', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js
deleted file mode 100644
index 6099c408a82be9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.tanh
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js
deleted file mode 100644
index a7d22237136416..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var tanh = Math.tanh;
-	if (typeof tanh !== 'function') return false;
-	return ((tanh(1) === 0.7615941559557649) && (tanh(Number.MAX_VALUE) === 1));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js
deleted file mode 100644
index f6e948f2c53797..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var exp = Math.exp;
-
-module.exports = function (x) {
-	var a, b;
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (x === Infinity) return 1;
-	if (x === -Infinity) return -1;
-	a = exp(x);
-	if (a === Infinity) return 1;
-	b = exp(-x);
-	if (b === Infinity) return -1;
-	return (a - b) / (a + b);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js
deleted file mode 100644
index 3ee80ab2a0a0b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Math, 'trunc', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js
deleted file mode 100644
index 0b0f9b2ac93882..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Math.trunc
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js
deleted file mode 100644
index 3e8cde1f0053dd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var trunc = Math.trunc;
-	if (typeof trunc !== 'function') return false;
-	return (trunc(13.67) === 13) && (trunc(-13.67) === -13);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js
deleted file mode 100644
index 02e2c2ad3bfcf4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var floor = Math.floor;
-
-module.exports = function (x) {
-	if (isNaN(x)) return NaN;
-	x = Number(x);
-	if (x === 0) return x;
-	if (x === Infinity) return Infinity;
-	if (x === -Infinity) return -Infinity;
-	if (x > 0) return floor(x);
-	return -floor(-x);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js
deleted file mode 100644
index 324811704b80a0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = {
-	pad: require('./pad')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js
deleted file mode 100644
index 4478f6a11e0c9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var pad      = require('../../string/#/pad')
-  , toPosInt = require('../to-pos-integer')
-
-  , toFixed = Number.prototype.toFixed;
-
-module.exports = function (length/*, precision*/) {
-	var precision;
-	length = toPosInt(length);
-	precision = toPosInt(arguments[1]);
-
-	return pad.call(precision ? toFixed.call(this, precision) : this,
-		'0', length + (precision ? (1 + precision) : 0));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js
deleted file mode 100644
index f0a670ae33824b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'EPSILON', { value: require('./'),
-		configurable: false, enumerable: false, writable: false });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js
deleted file mode 100644
index 4e4b621b7bc6f5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = 2.220446049250313e-16;
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js
deleted file mode 100644
index 141f5d2f24a512..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return (typeof Number.EPSILON === 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js
deleted file mode 100644
index 35daf78eea88c2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':              require('./#'),
-	EPSILON:          require('./epsilon'),
-	isFinite:         require('./is-finite'),
-	isInteger:        require('./is-integer'),
-	isNaN:            require('./is-nan'),
-	isNumber:         require('./is-number'),
-	isSafeInteger:    require('./is-safe-integer'),
-	MAX_SAFE_INTEGER: require('./max-safe-integer'),
-	MIN_SAFE_INTEGER: require('./min-safe-integer'),
-	toInteger:        require('./to-integer'),
-	toPosInteger:     require('./to-pos-integer'),
-	toUint32:         require('./to-uint32')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js
deleted file mode 100644
index 51d7cac07adb71..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'isFinite', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js
deleted file mode 100644
index 15d5f40588134c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Number.isFinite
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js
deleted file mode 100644
index 556e396bb0b0fd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var isFinite = Number.isFinite;
-	if (typeof isFinite !== 'function') return false;
-	return !isFinite('23') && isFinite(34) && !isFinite(Infinity);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js
deleted file mode 100644
index e3aee551a7053a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (value) {
-	return (typeof value === 'number') && isFinite(value);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js
deleted file mode 100644
index fe53f28143ad0c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'isInteger', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js
deleted file mode 100644
index 55e039a99d6d97..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Number.isInteger
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js
deleted file mode 100644
index a0e573be7c299d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var isInteger = Number.isInteger;
-	if (typeof isInteger !== 'function') return false;
-	return !isInteger('23') && isInteger(34) && !isInteger(32.34);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js
deleted file mode 100644
index 5402939806da40..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Credit: http://www.2ality.com/2014/05/is-integer.html
-
-'use strict';
-
-module.exports = function (value) {
-	if (typeof value !== 'number') return false;
-	return (value % 1 === 0);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js
deleted file mode 100644
index e1c5deea36a653..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'isNaN', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js
deleted file mode 100644
index 3b2c4ca6bd902a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Number.isNaN
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js
deleted file mode 100644
index 4cf276656365ca..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var isNaN = Number.isNaN;
-	if (typeof isNaN !== 'function') return false;
-	return !isNaN({}) && isNaN(NaN) && !isNaN(34);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js
deleted file mode 100644
index 070d96cd460d3a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (value) { return (value !== value); } //jslint: ignore
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js
deleted file mode 100644
index 19a99e4f194c2e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(1);
-
-module.exports = function (x) {
-	return ((typeof x === 'number') ||
-		((x instanceof Number) ||
-			((typeof x === 'object') && (toString.call(x) === id))));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js
deleted file mode 100644
index 51cef960212134..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'isSafeInteger', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js
deleted file mode 100644
index 49adeaaf784e23..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Number.isSafeInteger
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
deleted file mode 100644
index 510b60e4e4bd43..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var isSafeInteger = Number.isSafeInteger;
-	if (typeof isSafeInteger !== 'function') return false;
-	return !isSafeInteger('23') && isSafeInteger(34232322323) &&
-			!isSafeInteger(9007199254740992);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js
deleted file mode 100644
index 692acdd6ca7799..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var isInteger = require('../is-integer/shim')
-  , maxValue  = require('../max-safe-integer')
-
-  , abs = Math.abs;
-
-module.exports = function (value) {
-	if (!isInteger(value)) return false;
-	return abs(value) <= maxValue;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js
deleted file mode 100644
index 4e0bb5741d926d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'MAX_SAFE_INTEGER', { value: require('./'),
-		configurable: false, enumerable: false, writable: false });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js
deleted file mode 100644
index ed5d6a5379fe15..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = Math.pow(2, 53) - 1;
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
deleted file mode 100644
index 7bd08a9da4edc5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return (typeof Number.MAX_SAFE_INTEGER === 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js
deleted file mode 100644
index e3f110e419162f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Number, 'MIN_SAFE_INTEGER', { value: require('./'),
-		configurable: false, enumerable: false, writable: false });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js
deleted file mode 100644
index 1c6cc2744efe14..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = -(Math.pow(2, 53) - 1);
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
deleted file mode 100644
index efc9875f486d4a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return (typeof Number.MIN_SAFE_INTEGER === 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js
deleted file mode 100644
index 60e798c5fda58d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var sign = require('../math/sign')
-
-  , abs = Math.abs, floor = Math.floor;
-
-module.exports = function (value) {
-	if (isNaN(value)) return 0;
-	value = Number(value);
-	if ((value === 0) || !isFinite(value)) return value;
-	return sign(value) * floor(abs(value));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js
deleted file mode 100644
index 605a302c7106f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var toInteger = require('./to-integer')
-
-  , max = Math.max;
-
-module.exports = function (value) { return max(0, toInteger(value)); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js
deleted file mode 100644
index 6263e85ed6de95..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (value) { return value >>> 0; };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js
deleted file mode 100644
index bf2c55d08601d3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Internal method, used by iteration functions.
-// Calls a function for each key-value pair found in object
-// Optionally takes compareFn to iterate object in specific order
-
-'use strict';
-
-var isCallable = require('./is-callable')
-  , callable   = require('./valid-callable')
-  , value      = require('./valid-value')
-
-  , call = Function.prototype.call, keys = Object.keys
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-module.exports = function (method, defVal) {
-	return function (obj, cb/*, thisArg, compareFn*/) {
-		var list, thisArg = arguments[2], compareFn = arguments[3];
-		obj = Object(value(obj));
-		callable(cb);
-
-		list = keys(obj);
-		if (compareFn) {
-			list.sort(isCallable(compareFn) ? compareFn.bind(obj) : undefined);
-		}
-		return list[method](function (key, index) {
-			if (!propertyIsEnumerable.call(obj, key)) return defVal;
-			return call.call(cb, thisArg, obj[key], key, obj, index);
-		});
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js
deleted file mode 100644
index 3bcc68e31e1a44..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Object, 'assign', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js
deleted file mode 100644
index ab0f9f249e81a8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Object.assign
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js
deleted file mode 100644
index 579ad2ddc433b9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var assign = Object.assign, obj;
-	if (typeof assign !== 'function') return false;
-	obj = { foo: 'raz' };
-	assign(obj, { bar: 'dwa' }, { trzy: 'trzy' });
-	return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js
deleted file mode 100644
index 74da11a86a8556..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var keys  = require('../keys')
-  , value = require('../valid-value')
-
-  , max = Math.max;
-
-module.exports = function (dest, src/*, …srcn*/) {
-	var error, i, l = max(arguments.length, 2), assign;
-	dest = Object(value(dest));
-	assign = function (key) {
-		try { dest[key] = src[key]; } catch (e) {
-			if (!error) error = e;
-		}
-	};
-	for (i = 1; i < l; ++i) {
-		src = arguments[i];
-		keys(src).forEach(assign);
-	}
-	if (error !== undefined) throw error;
-	return dest;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js
deleted file mode 100644
index 85e463728550d0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var keys = require('./keys');
-
-module.exports = function (obj) {
-	var error;
-	keys(obj).forEach(function (key) {
-		try {
-			delete this[key];
-		} catch (e) {
-			if (!error) error = e;
-		}
-	}, obj);
-	if (error !== undefined) throw error;
-	return obj;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js
deleted file mode 100644
index d021da457e3914..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var filter = require('./filter');
-
-module.exports = function (obj) {
-	return filter(obj, function (val) { return val != null; });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js
deleted file mode 100644
index 2ab11f1a396350..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-var strCompare = require('../string/#/case-insensitive-compare')
-  , isObject   = require('./is-object')
-
-  , resolve, typeMap;
-
-typeMap = {
-	undefined: 0,
-	object: 1,
-	boolean: 2,
-	string: 3,
-	number: 4
-};
-
-resolve = function (a) {
-	if (isObject(a)) {
-		if (typeof a.valueOf !== 'function') return NaN;
-		a = a.valueOf();
-		if (isObject(a)) {
-			if (typeof a.toString !== 'function') return NaN;
-			a = a.toString();
-			if (typeof a !== 'string') return NaN;
-		}
-	}
-	return a;
-};
-
-module.exports = function (a, b) {
-	if (a === b) return 0; // Same
-
-	a = resolve(a);
-	b = resolve(b);
-	if (a == b) return typeMap[typeof a] - typeMap[typeof b]; //jslint: ignore
-	if (a == null) return -1;
-	if (b == null) return 1;
-	if ((typeof a === 'string') || (typeof b === 'string')) {
-		return strCompare.call(a, b);
-	}
-	if ((a !== a) && (b !== b)) return 0; //jslint: ignore
-	return Number(a) - Number(b);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js
deleted file mode 100644
index 548e3ee4b66bac..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-var isPlainObject = require('./is-plain-object')
-  , value         = require('./valid-value')
-
-  , keys = Object.keys
-  , copy;
-
-copy = function (source) {
-	var target = {};
-	this[0].push(source);
-	this[1].push(target);
-	keys(source).forEach(function (key) {
-		var index;
-		if (!isPlainObject(source[key])) {
-			target[key] = source[key];
-			return;
-		}
-		index = this[0].indexOf(source[key]);
-		if (index === -1) target[key] = copy.call(this, source[key]);
-		else target[key] = this[1][index];
-	}, this);
-	return target;
-};
-
-module.exports = function (source) {
-	var obj = Object(value(source));
-	if (obj !== source) return obj;
-	return copy.call([[], []], obj);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js
deleted file mode 100644
index 4d7177285fe5b3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var assign = require('./assign')
-  , value  = require('./valid-value');
-
-module.exports = function (obj) {
-	var copy = Object(value(obj));
-	if (copy !== obj) return copy;
-	return assign({}, obj);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js
deleted file mode 100644
index 29cfbb53fb40ae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var keys  = require('./keys');
-
-module.exports = function (obj) { return keys(obj).length; };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js
deleted file mode 100644
index f813b4661c4498..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Workaround for http://code.google.com/p/v8/issues/detail?id=2804
-
-'use strict';
-
-var create = Object.create, shim;
-
-if (!require('./set-prototype-of/is-implemented')()) {
-	shim = require('./set-prototype-of/shim');
-}
-
-module.exports = (function () {
-	var nullObject, props, desc;
-	if (!shim) return create;
-	if (shim.level !== 1) return create;
-
-	nullObject = {};
-	props = {};
-	desc = { configurable: false, enumerable: false, writable: true,
-		value: undefined };
-	Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
-		if (name === '__proto__') {
-			props[name] = { configurable: true, enumerable: false, writable: true,
-				value: undefined };
-			return;
-		}
-		props[name] = desc;
-	});
-	Object.defineProperties(nullObject, props);
-
-	Object.defineProperty(shim, 'nullPolyfill', { configurable: false,
-		enumerable: false, writable: false, value: nullObject });
-
-	return function (prototype, props) {
-		return create((prototype === null) ? nullObject : prototype, props);
-	};
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js
deleted file mode 100644
index 037937ea6e9749..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (x, y) {
-	return ((x === y) || ((x !== x) && (y !== y))); //jslint: ignore
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js
deleted file mode 100644
index 1303db20958f8d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./_iterate')('every', true);
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js
deleted file mode 100644
index e5edb49b1b1610..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var callable = require('./valid-callable')
-  , forEach  = require('./for-each')
-
-  , call = Function.prototype.call;
-
-module.exports = function (obj, cb/*, thisArg*/) {
-	var o = {}, thisArg = arguments[2];
-	callable(cb);
-	forEach(obj, function (value, key, obj, index) {
-		if (call.call(cb, thisArg, value, key, obj, index)) o[key] = obj[key];
-	});
-	return o;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js
deleted file mode 100644
index 7df10b2f7f948d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var value = require('./valid-value')
-
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-module.exports = function (obj) {
-	var i;
-	value(obj);
-	for (i in obj) {
-		if (propertyIsEnumerable.call(obj, i)) return i;
-	}
-	return null;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js
deleted file mode 100644
index e8b40444a94692..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var isPlainObject = require('./is-plain-object')
-  , forEach       = require('./for-each')
-
-  , process;
-
-process = function self(value, key) {
-	if (isPlainObject(value)) forEach(value, self, this);
-	else this[key] = value;
-};
-
-module.exports = function (obj) {
-	var flattened = {};
-	forEach(obj, process, flattened);
-	return flattened;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js
deleted file mode 100644
index 6674f8a614795b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./_iterate')('forEach');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js
deleted file mode 100644
index 54a01e5047a392..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var uniq  = require('../array/#/uniq')
-  , value = require('./valid-value')
-
-  , push = Array.prototype.push
-  , getOwnPropertyNames = Object.getOwnPropertyNames
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (obj) {
-	var keys;
-	obj = Object(value(obj));
-	keys = getOwnPropertyNames(obj);
-	while ((obj = getPrototypeOf(obj))) {
-		push.apply(keys, getOwnPropertyNames(obj));
-	}
-	return uniq.call(keys);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js
deleted file mode 100644
index 4bdf403583ace9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-module.exports = {
-	assign:                     require('./assign'),
-	clear:                      require('./clear'),
-	compact:                    require('./compact'),
-	compare:                    require('./compare'),
-	copy:                       require('./copy'),
-	copyDeep:                   require('./copy-deep'),
-	count:                      require('./count'),
-	create:                     require('./create'),
-	eq:                         require('./eq'),
-	every:                      require('./every'),
-	filter:                     require('./filter'),
-	firstKey:                   require('./first-key'),
-	flatten:                    require('./flatten'),
-	forEach:                    require('./for-each'),
-	getPropertyNames:           require('./get-property-names'),
-	is:                         require('./is'),
-	isArrayLike:                require('./is-array-like'),
-	isCallable:                 require('./is-callable'),
-	isCopy:                     require('./is-copy'),
-	isCopyDeep:                 require('./is-copy-deep'),
-	isEmpty:                    require('./is-empty'),
-	isObject:                   require('./is-object'),
-	isPlainObject:              require('./is-plain-object'),
-	keyOf:                      require('./key-of'),
-	keys:                       require('./keys'),
-	map:                        require('./map'),
-	mapKeys:                    require('./map-keys'),
-	normalizeOptions:           require('./normalize-options'),
-	mixin:                      require('./mixin'),
-	mixinPrototypes:            require('./mixin-prototypes'),
-	primitiveSet:               require('./primitive-set'),
-	safeTraverse:               require('./safe-traverse'),
-	serialize:                  require('./serialize'),
-	setPrototypeOf:             require('./set-prototype-of'),
-	some:                       require('./some'),
-	toArray:                    require('./to-array'),
-	unserialize:                require('./unserialize'),
-	validateArrayLike:          require('./validate-array-like'),
-	validateArrayLikeObject:    require('./validate-array-like-object'),
-	validCallable:              require('./valid-callable'),
-	validObject:                require('./valid-object'),
-	validateStringifiable:      require('./validate-stringifiable'),
-	validateStringifiableValue: require('./validate-stringifiable-value'),
-	validValue:                 require('./valid-value')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js
deleted file mode 100644
index b8beed225b05ad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var isFunction = require('../function/is-function')
-  , isObject   = require('./is-object');
-
-module.exports = function (x) {
-	return ((x != null) && (typeof x.length === 'number') &&
-
-		// Just checking ((typeof x === 'object') && (typeof x !== 'function'))
-		// won't work right for some cases, e.g.:
-		// type of instance of NodeList in Safari is a 'function'
-
-		((isObject(x) && !isFunction(x)) || (typeof x === "string"))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js
deleted file mode 100644
index 5d5d4b316b2a1c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// Deprecated
-
-'use strict';
-
-module.exports = function (obj) { return typeof obj === 'function'; };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js
deleted file mode 100644
index c4b2b42b100836..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var eq            = require('./eq')
-  , isPlainObject = require('./is-plain-object')
-  , value         = require('./valid-value')
-
-  , isArray = Array.isArray, keys = Object.keys
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable
-
-  , eqArr, eqVal, eqObj;
-
-eqArr = function (a, b, recMap) {
-	var i, l = a.length;
-	if (l !== b.length) return false;
-	for (i = 0; i < l; ++i) {
-		if (a.hasOwnProperty(i) !== b.hasOwnProperty(i)) return false;
-		if (!eqVal(a[i], b[i], recMap)) return false;
-	}
-	return true;
-};
-
-eqObj = function (a, b, recMap) {
-	var k1 = keys(a), k2 = keys(b);
-	if (k1.length !== k2.length) return false;
-	return k1.every(function (key) {
-		if (!propertyIsEnumerable.call(b, key)) return false;
-		return eqVal(a[key], b[key], recMap);
-	});
-};
-
-eqVal = function (a, b, recMap) {
-	var i, eqX, c1, c2;
-	if (eq(a, b)) return true;
-	if (isPlainObject(a)) {
-		if (!isPlainObject(b)) return false;
-		eqX = eqObj;
-	} else if (isArray(a) && isArray(b)) {
-		eqX = eqArr;
-	} else {
-		return false;
-	}
-	c1 = recMap[0];
-	c2 = recMap[1];
-	i = c1.indexOf(a);
-	if (i !== -1) {
-		if (c2[i].indexOf(b) !== -1) return true;
-	} else {
-		i = c1.push(a) - 1;
-		c2[i] = [];
-	}
-	c2[i].push(b);
-	return eqX(a, b, recMap);
-};
-
-module.exports = function (a, b) {
-	if (eq(value(a), value(b))) return true;
-	return eqVal(Object(a), Object(b), [[], []]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js
deleted file mode 100644
index 4fe639d4efcd2d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var eq     = require('./eq')
-  , value  = require('./valid-value')
-
-  , keys = Object.keys
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-module.exports = function (a, b) {
-	var k1, k2;
-
-	if (eq(value(a), value(b))) return true;
-
-	a = Object(a);
-	b = Object(b);
-
-	k1 = keys(a);
-	k2 = keys(b);
-	if (k1.length !== k2.length) return false;
-	return k1.every(function (key) {
-		if (!propertyIsEnumerable.call(b, key)) return false;
-		return eq(a[key], b[key]);
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js
deleted file mode 100644
index 7b51a87cf57e70..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var value = require('./valid-value')
-
-  , propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-module.exports = function (obj) {
-	var i;
-	value(obj);
-	for (i in obj) { //jslint: ignore
-		if (propertyIsEnumerable.call(obj, i)) return false;
-	}
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js
deleted file mode 100644
index a86facf187a86f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var map = { function: true, object: true };
-
-module.exports = function (x) {
-	return ((x != null) && map[typeof x]) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js
deleted file mode 100644
index 9a2823198e746f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var getPrototypeOf = Object.getPrototypeOf, prototype = Object.prototype
-  , toString = prototype.toString
-
-  , id = Object().toString();
-
-module.exports = function (value) {
-	var proto, constructor;
-	if (!value || (typeof value !== 'object') || (toString.call(value) !== id)) {
-		return false;
-	}
-	proto = getPrototypeOf(value);
-	if (proto === null) {
-		constructor = value.constructor;
-		if (typeof constructor !== 'function') return true;
-		return (constructor.prototype !== value);
-	}
-	return (proto === prototype) || (getPrototypeOf(proto) === null);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js
deleted file mode 100644
index 5778b502d924cd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// Implementation credits go to:
-// http://wiki.ecmascript.org/doku.php?id=harmony:egal
-
-'use strict';
-
-module.exports = function (x, y) {
-	return (x === y) ?
-			((x !== 0) || ((1 / x) === (1 / y))) :
-			((x !== x) && (y !== y)); //jslint: ignore
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js
deleted file mode 100644
index 8c44c8d8027f8b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var eq   = require('./eq')
-  , some = require('./some');
-
-module.exports = function (obj, searchValue) {
-	var r;
-	return some(obj, function (value, name) {
-		if (eq(value, searchValue)) {
-			r = name;
-			return true;
-		}
-		return false;
-	}) ? r : null;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js
deleted file mode 100644
index c6872bd02af0b2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(Object, 'keys', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js
deleted file mode 100644
index 5ef052233a76e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Object.keys
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js
deleted file mode 100644
index 40c32c33940c7c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	try {
-		Object.keys('primitive');
-		return true;
-	} catch (e) { return false; }
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js
deleted file mode 100644
index 034b6b2981185a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var keys = Object.keys;
-
-module.exports = function (object) {
-	return keys(object == null ? object : Object(object));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js
deleted file mode 100644
index 26f0ecacb8aef3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var callable = require('./valid-callable')
-  , forEach  = require('./for-each')
-
-  , call = Function.prototype.call;
-
-module.exports = function (obj, cb/*, thisArg*/) {
-	var o = {}, thisArg = arguments[2];
-	callable(cb);
-	forEach(obj, function (value, key, obj, index) {
-		o[call.call(cb, thisArg, key, value, this, index)] = value;
-	}, obj);
-	return o;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js
deleted file mode 100644
index 6b39d3c94b7421..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var callable = require('./valid-callable')
-  , forEach  = require('./for-each')
-
-  , call = Function.prototype.call;
-
-module.exports = function (obj, cb/*, thisArg*/) {
-	var o = {}, thisArg = arguments[2];
-	callable(cb);
-	forEach(obj, function (value, key, obj, index) {
-		o[key] = call.call(cb, thisArg, value, key, obj, index);
-	});
-	return o;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js
deleted file mode 100644
index 1ef5756423cd36..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-var value = require('./valid-value')
-  , mixin = require('./mixin')
-
-  , defineProperty = Object.defineProperty
-  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
-  , getOwnPropertyNames = Object.getOwnPropertyNames
-  , getPrototypeOf = Object.getPrototypeOf
-  , hasOwnProperty = Object.prototype.hasOwnProperty;
-
-module.exports = function (target, source) {
-	var error, end, define;
-	target = Object(value(target));
-	source = Object(value(source));
-	end = getPrototypeOf(target);
-	if (source === end) return target;
-	try {
-		mixin(target, source);
-	} catch (e) { error = e; }
-	source = getPrototypeOf(source);
-	define = function (name) {
-		if (hasOwnProperty.call(target, name)) return;
-		try {
-			defineProperty(target, name, getOwnPropertyDescriptor(source, name));
-		} catch (e) { error = e; }
-	};
-	while (source && (source !== end)) {
-		getOwnPropertyNames(source).forEach(define);
-		source = getPrototypeOf(source);
-	}
-	if (error) throw error;
-	return target;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js
deleted file mode 100644
index 80b5df5e04b9b3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var value = require('./valid-value')
-
-  , defineProperty = Object.defineProperty
-  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
-  , getOwnPropertyNames = Object.getOwnPropertyNames;
-
-module.exports = function (target, source) {
-	var error;
-	target = Object(value(target));
-	getOwnPropertyNames(Object(value(source))).forEach(function (name) {
-		try {
-			defineProperty(target, name, getOwnPropertyDescriptor(source, name));
-		} catch (e) { error = e; }
-	});
-	if (error !== undefined) throw error;
-	return target;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js
deleted file mode 100644
index cf8ed8d38cabd1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var forEach = Array.prototype.forEach, create = Object.create;
-
-var process = function (src, obj) {
-	var key;
-	for (key in src) obj[key] = src[key];
-};
-
-module.exports = function (options/*, …options*/) {
-	var result = create(null);
-	forEach.call(arguments, function (options) {
-		if (options == null) return;
-		process(Object(options), result);
-	});
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js
deleted file mode 100644
index ada109510d4bd9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var forEach = Array.prototype.forEach, create = Object.create;
-
-module.exports = function (arg/*, …args*/) {
-	var set = create(null);
-	forEach.call(arguments, function (name) { set[name] = true; });
-	return set;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js
deleted file mode 100644
index 7e1b5f41edf162..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var value = require('./valid-value');
-
-module.exports = function (obj/*, …names*/) {
-	var length, current = 1;
-	value(obj);
-	length = arguments.length - 1;
-	if (!length) return obj;
-	while (current < length) {
-		obj = obj[arguments[current++]];
-		if (obj == null) return undefined;
-	}
-	return obj[arguments[current]];
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js
deleted file mode 100644
index 8113b6801dd395..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var toArray  = require('./to-array')
-  , isDate   = require('../date/is-date')
-  , isRegExp = require('../reg-exp/is-reg-exp')
-
-  , isArray = Array.isArray, stringify = JSON.stringify
-  , keyValueToString = function (value, key) { return stringify(key) + ':' + exports(value); };
-
-var sparseMap = function (arr) {
-	var i, l = arr.length, result = new Array(l);
-	for (i = 0; i < l; ++i) {
-		if (!arr.hasOwnProperty(i)) continue;
-		result[i] = exports(arr[i]);
-	}
-	return result;
-};
-
-module.exports = exports = function (obj) {
-	if (obj == null) return String(obj);
-	switch (typeof obj) {
-	case 'string':
-		return stringify(obj);
-	case 'number':
-	case 'boolean':
-	case 'function':
-		return String(obj);
-	case 'object':
-		if (isArray(obj)) return '[' + sparseMap(obj) + ']';
-		if (isRegExp(obj)) return String(obj);
-		if (isDate(obj)) return 'new Date(' + obj.valueOf() + ')';
-		return '{' + toArray(obj, keyValueToString) + '}';
-	default:
-		throw new TypeError("Serialization of " + String(obj) + "is unsupported");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js
deleted file mode 100644
index 000e6bdbbebcb7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var shim;
-
-if (!require('./is-implemented')() && (shim = require('./shim'))) {
-	Object.defineProperty(Object, 'setPrototypeOf',
-		{ value: shim, configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js
deleted file mode 100644
index ccc40995b1e6b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? Object.setPrototypeOf
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
deleted file mode 100644
index 98d0c8436a8d46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var create = Object.create, getPrototypeOf = Object.getPrototypeOf
-  , x = {};
-
-module.exports = function (/*customCreate*/) {
-	var setPrototypeOf = Object.setPrototypeOf
-	  , customCreate = arguments[0] || create;
-	if (typeof setPrototypeOf !== 'function') return false;
-	return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js
deleted file mode 100644
index 4ec944675e5685..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js
+++ /dev/null
@@ -1,73 +0,0 @@
-// Big thanks to @WebReflection for sorting this out
-// https://gist.github.com/WebReflection/5593554
-
-'use strict';
-
-var isObject      = require('../is-object')
-  , value         = require('../valid-value')
-
-  , isPrototypeOf = Object.prototype.isPrototypeOf
-  , defineProperty = Object.defineProperty
-  , nullDesc = { configurable: true, enumerable: false, writable: true,
-		value: undefined }
-  , validate;
-
-validate = function (obj, prototype) {
-	value(obj);
-	if ((prototype === null) || isObject(prototype)) return obj;
-	throw new TypeError('Prototype must be null or an object');
-};
-
-module.exports = (function (status) {
-	var fn, set;
-	if (!status) return null;
-	if (status.level === 2) {
-		if (status.set) {
-			set = status.set;
-			fn = function (obj, prototype) {
-				set.call(validate(obj, prototype), prototype);
-				return obj;
-			};
-		} else {
-			fn = function (obj, prototype) {
-				validate(obj, prototype).__proto__ = prototype;
-				return obj;
-			};
-		}
-	} else {
-		fn = function self(obj, prototype) {
-			var isNullBase;
-			validate(obj, prototype);
-			isNullBase = isPrototypeOf.call(self.nullPolyfill, obj);
-			if (isNullBase) delete self.nullPolyfill.__proto__;
-			if (prototype === null) prototype = self.nullPolyfill;
-			obj.__proto__ = prototype;
-			if (isNullBase) defineProperty(self.nullPolyfill, '__proto__', nullDesc);
-			return obj;
-		};
-	}
-	return Object.defineProperty(fn, 'level', { configurable: false,
-		enumerable: false, writable: false, value: status.level });
-}((function () {
-	var x = Object.create(null), y = {}, set
-	  , desc = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__');
-
-	if (desc) {
-		try {
-			set = desc.set; // Opera crashes at this point
-			set.call(x, y);
-		} catch (ignore) { }
-		if (Object.getPrototypeOf(x) === y) return { set: set, level: 2 };
-	}
-
-	x.__proto__ = y;
-	if (Object.getPrototypeOf(x) === y) return { level: 2 };
-
-	x = {};
-	x.__proto__ = y;
-	if (Object.getPrototypeOf(x) === y) return { level: 1 };
-
-	return false;
-}())));
-
-require('../create');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js
deleted file mode 100644
index cde5ddeecdf749..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./_iterate')('some', false);
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js
deleted file mode 100644
index a954abb26fdffd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var callable = require('./valid-callable')
-  , forEach  = require('./for-each')
-
-  , call = Function.prototype.call
-
-  , defaultCb = function (value, key) { return [key, value]; };
-
-module.exports = function (obj/*, cb, thisArg, compareFn*/) {
-	var a = [], cb = arguments[1], thisArg = arguments[2];
-	cb = (cb == null) ? defaultCb : callable(cb);
-
-	forEach(obj, function (value, key, obj, index) {
-		a.push(call.call(cb, thisArg, value, key, this, index));
-	}, obj, arguments[3]);
-	return a;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js
deleted file mode 100644
index ce68e403ae1b6e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var value  = require('./valid-value');
-
-module.exports = exports = function (code) {
-	return (new Function('return ' + value(code)))();
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js
deleted file mode 100644
index c977527a4fd660..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (fn) {
-	if (typeof fn !== 'function') throw new TypeError(fn + " is not a function");
-	return fn;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js
deleted file mode 100644
index f82bd51ed106f2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isObject = require('./is-object');
-
-module.exports = function (value) {
-	if (!isObject(value)) throw new TypeError(value + " is not an Object");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js
deleted file mode 100644
index 36c8ec31e84731..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (value) {
-	if (value == null) throw new TypeError("Cannot use null or undefined");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js
deleted file mode 100644
index 89e12c51c5dfcf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var isArrayLike = require('./is-array-like')
-  , isObject    = require('./is-object');
-
-module.exports = function (obj) {
-	if (isObject(obj) && isArrayLike(obj)) return obj;
-	throw new TypeError(obj + " is not array-like object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js
deleted file mode 100644
index 6a35b54a14f677..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isArrayLike = require('./is-array-like');
-
-module.exports = function (obj) {
-	if (isArrayLike(obj)) return obj;
-	throw new TypeError(obj + " is not array-like value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js
deleted file mode 100644
index 9df3b668fb06c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var value         = require('./valid-value')
-  , stringifiable = require('./validate-stringifiable');
-
-module.exports = function (x) { return stringifiable(value(x)); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js
deleted file mode 100644
index eba7ce787cdfad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (stringifiable) {
-	try {
-		return String(stringifiable);
-	} catch (e) {
-		throw new TypeError("Passed argument cannot be stringifed");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/package.json b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/package.json
deleted file mode 100644
index 01d6532749e89c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-  "name": "es5-ext",
-  "version": "0.10.7",
-  "description": "ECMAScript 5 extensions and ES6 shims",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "ecmascript",
-    "ecmascript5",
-    "ecmascript6",
-    "es5",
-    "es6",
-    "extensions",
-    "ext",
-    "addons",
-    "extras",
-    "harmony",
-    "javascript",
-    "polyfill",
-    "shim",
-    "util",
-    "utils",
-    "utilities"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es5-ext.git"
-  },
-  "dependencies": {
-    "es6-iterator": "~0.1.3",
-    "es6-symbol": "~2.0.1"
-  },
-  "devDependencies": {
-    "tad": "~0.2.2",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "5b63ee02f50dfbc70dc1f62bc66b8718af443f83",
-  "bugs": {
-    "url": "https://github.com/medikoo/es5-ext/issues"
-  },
-  "homepage": "https://github.com/medikoo/es5-ext",
-  "_id": "es5-ext@0.10.7",
-  "_shasum": "dfaea50721301042e2d89c1719d43493fa821656",
-  "_from": "es5-ext@>=0.10.6 <0.11.0",
-  "_npmVersion": "2.7.4",
-  "_nodeVersion": "0.12.2",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "dfaea50721301042e2d89c1719d43493fa821656",
-    "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js
deleted file mode 100644
index f7e7a58ebd780a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = {
-	isSticky:  require('./is-sticky'),
-	isUnicode: require('./is-unicode'),
-	match:     require('./match'),
-	replace:   require('./replace'),
-	search:    require('./search'),
-	split:     require('./split')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js
deleted file mode 100644
index 830a481f7e9213..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var validRegExp = require('../valid-reg-exp')
-
-  , re = /\/[a-xz]*y[a-xz]*$/;
-
-module.exports = function () {
-	return Boolean(String(validRegExp(this)).match(re));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js
deleted file mode 100644
index b005f6d9194f1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var validRegExp = require('../valid-reg-exp')
-
-  , re = /\/[a-xz]*u[a-xz]*$/;
-
-module.exports = function () {
-	return Boolean(String(validRegExp(this)).match(re));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js
deleted file mode 100644
index 921c9368e780b6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'match', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js
deleted file mode 100644
index 0534ac3bc352b3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? RegExp.prototype.match
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
deleted file mode 100644
index b7e99643148089..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var re = /foo/;
-
-module.exports = function () {
-	if (typeof re.match !== 'function') return false;
-	return re.match('barfoobar') && !re.match('elo');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js
deleted file mode 100644
index 4f99cf4d1c02c5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var validRegExp = require('../../valid-reg-exp');
-
-module.exports = function (string) {
-	validRegExp(this);
-	return String(string).match(this);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js
deleted file mode 100644
index ad580de890618e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'replace', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js
deleted file mode 100644
index 5658177d804881..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? RegExp.prototype.replace
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
deleted file mode 100644
index 1b42d252430bd5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var re = /foo/;
-
-module.exports = function () {
-	if (typeof re.replace !== 'function') return false;
-	return re.replace('foobar', 'mar') === 'marbar';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js
deleted file mode 100644
index c3e6aebab04cf3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var validRegExp = require('../../valid-reg-exp');
-
-module.exports = function (string, replaceValue) {
-	validRegExp(this);
-	return String(string).replace(this, replaceValue);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js
deleted file mode 100644
index 3804f4eb1c3bb5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'search', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js
deleted file mode 100644
index 67995d4ac7b9f3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? RegExp.prototype.search
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
deleted file mode 100644
index efba889f81724d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var re = /foo/;
-
-module.exports = function () {
-	if (typeof re.search !== 'function') return false;
-	return re.search('barfoo') === 3;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js
deleted file mode 100644
index 6d9dcaed8ab26f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var validRegExp = require('../../valid-reg-exp');
-
-module.exports = function (string) {
-	validRegExp(this);
-	return String(string).search(this);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js
deleted file mode 100644
index 50facb6834d7c1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'split', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js
deleted file mode 100644
index f101f5af7503cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? RegExp.prototype.split
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
deleted file mode 100644
index 7244c998bf45fd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var re = /\|/;
-
-module.exports = function () {
-	if (typeof re.split !== 'function') return false;
-	return re.split('bar|foo')[1] === 'foo';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js
deleted file mode 100644
index 76154e7e3c0069..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var validRegExp = require('../../valid-reg-exp');
-
-module.exports = function (string) {
-	validRegExp(this);
-	return String(string).split(this);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js
deleted file mode 100644
index 7e8af1db31641b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isSticky = require('../is-sticky');
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'sticky', { configurable: true,
-		enumerable: false, get: isSticky });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
deleted file mode 100644
index 379c4a5a8fb1b8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return RegExp.prototype.sticky === false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js
deleted file mode 100644
index 5a82a4d1d23386..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isUnicode = require('../is-unicode');
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(RegExp.prototype, 'unicode', { configurable: true,
-		enumerable: false, get: isUnicode });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
deleted file mode 100644
index a8b15b3b38defb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	return RegExp.prototype.unicode === false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js
deleted file mode 100644
index a2363fcfc68a03..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Thanks to Andrew Clover:
-// http://stackoverflow.com/questions/3561493
-// /is-there-a-regexp-escape-function-in-javascript
-
-'use strict';
-
-var re = /[\-\/\\\^$*+?.()|\[\]{}]/g;
-
-module.exports = function (str) { return String(str).replace(re, '\\$&'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js
deleted file mode 100644
index 75ea3135a89afe..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':         require('./#'),
-	escape:      require('./escape'),
-	isRegExp:    require('./is-reg-exp'),
-	validRegExp: require('./valid-reg-exp')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js
deleted file mode 100644
index 6eb12977c031d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call(/a/);
-
-module.exports = function (x) {
-	return (x && (x instanceof RegExp || (toString.call(x) === id))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js
deleted file mode 100644
index d3a77641da0f86..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isRegExp = require('./is-reg-exp');
-
-module.exports = function (x) {
-	if (!isRegExp(x)) throw new TypeError(x + " is not a RegExp object");
-	return x;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js
deleted file mode 100644
index 4494d7b6af3d93..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, require('es6-symbol').iterator,
-		{ value: require('./shim'), configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js
deleted file mode 100644
index 22f15e69600bc0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype[require('es6-symbol').iterator] : require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
deleted file mode 100644
index f5c462deb91064..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function () {
-	var str = '🙈f', iterator, result;
-	if (typeof str[iteratorSymbol] !== 'function') return false;
-	iterator = str[iteratorSymbol]();
-	if (!iterator) return false;
-	if (typeof iterator.next !== 'function') return false;
-	result = iterator.next();
-	if (!result) return false;
-	if (result.value !== '🙈') return false;
-	if (result.done !== false) return false;
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js
deleted file mode 100644
index 0be30292f6e98d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var StringIterator = require('es6-iterator/string')
-  , value          = require('../../../object/valid-value');
-
-module.exports = function () { return new StringIterator(value(this)); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js
deleted file mode 100644
index 77bd251ac4f1ae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Based on: https://github.com/mathiasbynens/String.prototype.at
-// Thanks @mathiasbynens !
-
-'use strict';
-
-var toInteger  = require('../../number/to-integer')
-  , validValue = require('../../object/valid-value');
-
-module.exports = function (pos) {
-	var str = String(validValue(this)), size = str.length
-	  , cuFirst, cuSecond, nextPos, len;
-	pos = toInteger(pos);
-
-	// Account for out-of-bounds indices
-	// The odd lower bound is because the ToInteger operation is
-	// going to round `n` to `0` for `-1 < n <= 0`.
-	if (pos <= -1 || pos >= size) return '';
-
-	// Second half of `ToInteger`
-	pos = pos | 0;
-	// Get the first code unit and code unit value
-	cuFirst = str.charCodeAt(pos);
-	nextPos = pos + 1;
-	len = 1;
-	if ( // check if it’s the start of a surrogate pair
-		(cuFirst >= 0xD800) && (cuFirst <= 0xDBFF) && // high surrogate
-			(size > nextPos) // there is a next code unit
-	) {
-		cuSecond = str.charCodeAt(nextPos);
-		if (cuSecond >= 0xDC00 && cuSecond <= 0xDFFF) len = 2; // low surrogate
-	}
-	return str.slice(pos, pos + len);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js
deleted file mode 100644
index 1cb8d127796d8b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var replace = String.prototype.replace
-  , re = /([A-Z])/g;
-
-module.exports = function () {
-	var str = replace.call(this, re, "-$1").toLowerCase();
-	if (str[0] === '-') str = str.slice(1);
-	return str;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js
deleted file mode 100644
index ed768273651c9a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var value = require('../../object/valid-value');
-
-module.exports = function () {
-	var str = String(value(this));
-	return str.charAt(0).toUpperCase() + str.slice(1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js
deleted file mode 100644
index 599cb83469c149..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var toLowerCase = String.prototype.toLowerCase;
-
-module.exports = function (other) {
-	return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other)));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js
deleted file mode 100644
index 1e7a37bd4d34ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'codePointAt',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js
deleted file mode 100644
index 7e91d833a867e4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.codePointAt
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
deleted file mode 100644
index b27158913a91d1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var str = 'abc\uD834\uDF06def';
-
-module.exports = function () {
-	if (typeof str.codePointAt !== 'function') return false;
-	return str.codePointAt(3) === 0x1D306;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js
deleted file mode 100644
index 1c9038b3cb0a79..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt
-// Thanks @mathiasbynens !
-
-'use strict';
-
-var toInteger  = require('../../../number/to-integer')
-  , validValue = require('../../../object/valid-value');
-
-module.exports = function (pos) {
-	var str = String(validValue(this)), l = str.length, first, second;
-	pos = toInteger(pos);
-
-	// Account for out-of-bounds indices:
-	if (pos < 0 || pos >= l) return undefined;
-
-	// Get the first code unit
-	first = str.charCodeAt(pos);
-	if ((first >= 0xD800) && (first <= 0xDBFF) && (l > pos + 1)) {
-		second = str.charCodeAt(pos + 1);
-		if (second >= 0xDC00 && second <= 0xDFFF) {
-			// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
-			return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
-		}
-	}
-	return first;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js
deleted file mode 100644
index 6b7a3c08164c4e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'contains',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js
deleted file mode 100644
index abb3e3730bf103..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.contains
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js
deleted file mode 100644
index 6f7d4b719e218e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var str = 'razdwatrzy';
-
-module.exports = function () {
-	if (typeof str.contains !== 'function') return false;
-	return ((str.contains('dwa') === true) && (str.contains('foo') === false));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js
deleted file mode 100644
index 89e39e793324b7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var indexOf = String.prototype.indexOf;
-
-module.exports = function (searchString/*, position*/) {
-	return indexOf.call(this, searchString, arguments[1]) > -1;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js
deleted file mode 100644
index 0b09025b0cde8d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'endsWith',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js
deleted file mode 100644
index d2d9484827957e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.endsWith
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js
deleted file mode 100644
index f3bb00883bb978..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var str = 'razdwatrzy';
-
-module.exports = function () {
-	if (typeof str.endsWith !== 'function') return false;
-	return ((str.endsWith('trzy') === true) && (str.endsWith('raz') === false));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js
deleted file mode 100644
index 26cbdb1366be10..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var toInteger = require('../../../number/to-integer')
-  , value     = require('../../../object/valid-value')
-
-  , min = Math.min, max = Math.max;
-
-module.exports = function (searchString/*, endPosition*/) {
-	var self, start, endPos;
-	self = String(value(this));
-	searchString = String(searchString);
-	endPos = arguments[1];
-	start = ((endPos == null) ? self.length :
-			min(max(toInteger(endPos), 0), self.length)) - searchString.length;
-	return (start < 0) ? false : (self.indexOf(searchString, start) === start);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js
deleted file mode 100644
index 8928b02497f1a2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var replace = String.prototype.replace
-
-  , re = /-([a-z0-9])/g
-  , toUpperCase = function (m, a) { return a.toUpperCase(); };
-
-module.exports = function () { return replace.call(this, re, toUpperCase); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js
deleted file mode 100644
index 223bd82b0f1a97..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var repeat = require('./repeat')
-
-  , replace = String.prototype.replace
-  , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g;
-
-module.exports = function (indent/*, count*/) {
-	var count = arguments[1];
-	indent = repeat.call(String(indent), (count == null) ? 1 : count);
-	return indent + replace.call(this, re, '$1' + indent + '$2');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js
deleted file mode 100644
index d45d747cbe0954..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = {
-	'@@iterator':           require('./@@iterator'),
-	at:                     require('./at'),
-	camelToHyphen:          require('./camel-to-hyphen'),
-	capitalize:             require('./capitalize'),
-	caseInsensitiveCompare: require('./case-insensitive-compare'),
-	codePointAt:            require('./code-point-at'),
-	contains:               require('./contains'),
-	hyphenToCamel:          require('./hyphen-to-camel'),
-	endsWith:               require('./ends-with'),
-	indent:                 require('./indent'),
-	last:                   require('./last'),
-	normalize:              require('./normalize'),
-	pad:                    require('./pad'),
-	plainReplace:           require('./plain-replace'),
-	plainReplaceAll:        require('./plain-replace-all'),
-	repeat:                 require('./repeat'),
-	startsWith:             require('./starts-with')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js
deleted file mode 100644
index d5cf46ee5fb863..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var value = require('../../object/valid-value');
-
-module.exports = function () {
-	var self = String(value(this)), l = self.length;
-	return l ? self[l - 1] : null;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js
deleted file mode 100644
index e4e00a3298120f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-module.exports = { 0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]},
-	256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},
-	512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256]},
-	768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256]},
-	1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},
-	1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},
-	1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},
-	1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},
-	2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230]},
-	2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},
-	2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9]},
-	2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},
-	3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},
-	3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},
-	3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},
-	3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},
-	4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},
-	4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70080:[,9]},
-	4864:{4957:[,230],4958:[,230],4959:[,230]},
-	5632:{71350:[,9],71351:[,7]},
-	5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},
-	6144:{6313:[,228]},
-	6400:{6457:[,222],6458:[,230],6459:[,220]},
-	6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220]},
-	6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},
-	7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230]},
-	7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},
-	7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]},
-	7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]},
-	8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},
-	8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},
-	8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},
-	8960:{9001:[[12296]],9002:[[12297]]},
-	9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},
-	10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},
-	11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},
-	11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},
-	11776:{11935:[[27597],256],12019:[[40863],256]},
-	12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]},
-	12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},
-	12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},
-	12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]},
-	13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]},
-	42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42655:[,230],42736:[,230],42737:[,230]},
-	42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]},
-	43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},
-	43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},
-	43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},
-	43776:{44013:[,9]},
-	53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},
-	53760:{119362:[,230],119363:[,230],119364:[,230]},
-	54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]},
-	54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]},
-	54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]},
-	55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]},
-	60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},
-	61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},
-	61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},
-	63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]},
-	63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]},
-	64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},
-	64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]},
-	64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]},
-	64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]},
-	65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]},
-	65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js
deleted file mode 100644
index cfc710ea439174..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'normalize',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js
deleted file mode 100644
index 619b0965d69b9e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.normalize
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js
deleted file mode 100644
index 67c8d8da5cad63..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var str = 'æøåäüö';
-
-module.exports = function () {
-	if (typeof str.normalize !== 'function') return false;
-	return str.normalize('NFKD') === 'æøåäüö';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js
deleted file mode 100644
index a379989775737a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js
+++ /dev/null
@@ -1,289 +0,0 @@
-// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js
-
-/*
-	* UnicodeNormalizer 1.0.0
-	* Copyright (c) 2008 Matsuza
-	* Dual licensed under the MIT (MIT-LICENSE.txt) and
-	* GPL (GPL-LICENSE.txt) licenses.
-	* $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $
-	* $Rev: 13309 $
-*/
-
-'use strict';
-
-var primitiveSet = require('../../../object/primitive-set')
-  , validValue   = require('../../../object/valid-value')
-  , data         = require('./_data')
-
-  , floor = Math.floor
-  , forms = primitiveSet('NFC', 'NFD', 'NFKC', 'NFKD')
-
-  , DEFAULT_FEATURE = [null, 0, {}], CACHE_THRESHOLD = 10, SBase = 0xAC00
-  , LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21
-  , TCount = 28, NCount = VCount * TCount, SCount = LCount * NCount
-  , UChar, cache = {}, cacheCounter = [], i, fromCache, fromData, fromCpOnly
-  , fromRuleBasedJamo, fromCpFilter, strategies, UCharIterator
-  , RecursDecompIterator, DecompIterator, CompIterator, createIterator
-  , normalize;
-
-UChar = function (cp, feature) {
-	this.codepoint = cp;
-	this.feature = feature;
-};
-
-// Strategies
-for (i = 0; i <= 0xFF; ++i) cacheCounter[i] = 0;
-
-fromCache = function (next, cp, needFeature) {
-	var ret = cache[cp];
-	if (!ret) {
-		ret = next(cp, needFeature);
-		if (!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD) {
-			cache[cp] = ret;
-		}
-	}
-	return ret;
-};
-
-fromData = function (next, cp, needFeature) {
-	var hash = cp & 0xFF00, dunit = UChar.udata[hash] || {}, f = dunit[cp];
-	return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE);
-};
-fromCpOnly = function (next, cp, needFeature) {
-	return !!needFeature ? next(cp, needFeature) : new UChar(cp, null);
-};
-
-fromRuleBasedJamo = function (next, cp, needFeature) {
-	var c, base, i, arr, SIndex, TIndex, feature, j;
-	if (cp < LBase || (LBase + LCount <= cp && cp < SBase) ||
-			(SBase + SCount < cp)) {
-		return next(cp, needFeature);
-	}
-	if (LBase <= cp && cp < LBase + LCount) {
-		c = {};
-		base = (cp - LBase) * VCount;
-		for (i = 0; i < VCount; ++i) {
-			c[VBase + i] = SBase + TCount * (i + base);
-		}
-		arr = new Array(3);
-		arr[2] = c;
-		return new UChar(cp, arr);
-	}
-
-	SIndex = cp - SBase;
-	TIndex = SIndex % TCount;
-	feature = [];
-	if (TIndex !== 0) {
-		feature[0] = [SBase + SIndex - TIndex, TBase + TIndex];
-	} else {
-		feature[0] = [LBase + floor(SIndex / NCount), VBase +
-			floor((SIndex % NCount) / TCount)];
-		feature[2] = {};
-		for (j = 1; j < TCount; ++j) {
-			feature[2][TBase + j] = cp + j;
-		}
-	}
-	return new UChar(cp, feature);
-};
-
-fromCpFilter = function (next, cp, needFeature) {
-	return (cp < 60) || ((13311 < cp) && (cp < 42607))
-		? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature);
-};
-
-strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData];
-
-UChar.fromCharCode = strategies.reduceRight(function (next, strategy) {
-	return function (cp, needFeature) { return strategy(next, cp, needFeature); };
-}, null);
-
-UChar.isHighSurrogate = function (cp) { return cp >= 0xD800 && cp <= 0xDBFF; };
-UChar.isLowSurrogate = function (cp) { return cp >= 0xDC00 && cp <= 0xDFFF; };
-
-UChar.prototype.prepFeature = function () {
-	if (!this.feature) {
-		this.feature = UChar.fromCharCode(this.codepoint, true).feature;
-	}
-};
-
-UChar.prototype.toString = function () {
-	var x;
-	if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint);
-	x = this.codepoint - 0x10000;
-	return String.fromCharCode(floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00);
-};
-
-UChar.prototype.getDecomp = function () {
-	this.prepFeature();
-	return this.feature[0] || null;
-};
-
-UChar.prototype.isCompatibility = function () {
-	this.prepFeature();
-	return !!this.feature[1] && (this.feature[1] & (1 << 8));
-};
-UChar.prototype.isExclude = function () {
-	this.prepFeature();
-	return !!this.feature[1] && (this.feature[1] & (1 << 9));
-};
-UChar.prototype.getCanonicalClass = function () {
-	this.prepFeature();
-	return !!this.feature[1] ? (this.feature[1] & 0xff) : 0;
-};
-UChar.prototype.getComposite = function (following) {
-	var cp;
-	this.prepFeature();
-	if (!this.feature[2]) return null;
-	cp = this.feature[2][following.codepoint];
-	return cp ? UChar.fromCharCode(cp) : null;
-};
-
-UCharIterator = function (str) {
-	this.str = str;
-	this.cursor = 0;
-};
-UCharIterator.prototype.next = function () {
-	if (!!this.str && this.cursor < this.str.length) {
-		var cp = this.str.charCodeAt(this.cursor++), d;
-		if (UChar.isHighSurrogate(cp) && this.cursor < this.str.length &&
-				UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))) {
-			cp = (cp - 0xD800) * 0x400 + (d - 0xDC00) + 0x10000;
-			++this.cursor;
-		}
-		return UChar.fromCharCode(cp);
-	}
-	this.str = null;
-	return null;
-};
-
-RecursDecompIterator = function (it, cano) {
-	this.it = it;
-	this.canonical = cano;
-	this.resBuf = [];
-};
-
-RecursDecompIterator.prototype.next = function () {
-	var recursiveDecomp, uchar;
-	recursiveDecomp = function (cano, uchar) {
-		var decomp = uchar.getDecomp(), ret, i, a, j;
-		if (!!decomp && !(cano && uchar.isCompatibility())) {
-			ret = [];
-			for (i = 0; i < decomp.length; ++i) {
-				a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i]));
-				//ret.concat(a); //<-why does not this work?
-				//following block is a workaround.
-				for (j = 0; j < a.length; ++j) ret.push(a[j]);
-			}
-			return ret;
-		}
-		return [uchar];
-	};
-	if (this.resBuf.length === 0) {
-		uchar = this.it.next();
-		if (!uchar) return null;
-		this.resBuf = recursiveDecomp(this.canonical, uchar);
-	}
-	return this.resBuf.shift();
-};
-
-DecompIterator = function (it) {
-	this.it = it;
-	this.resBuf = [];
-};
-
-DecompIterator.prototype.next = function () {
-	var cc, uchar, inspt, uchar2, cc2;
-	if (this.resBuf.length === 0) {
-		do {
-			uchar = this.it.next();
-			if (!uchar) break;
-			cc = uchar.getCanonicalClass();
-			inspt = this.resBuf.length;
-			if (cc !== 0) {
-				for (inspt; inspt > 0; --inspt) {
-					uchar2 = this.resBuf[inspt - 1];
-					cc2 = uchar2.getCanonicalClass();
-					if (cc2 <= cc) break;
-				}
-			}
-			this.resBuf.splice(inspt, 0, uchar);
-		} while (cc !== 0);
-	}
-	return this.resBuf.shift();
-};
-
-CompIterator = function (it) {
-	this.it = it;
-	this.procBuf = [];
-	this.resBuf = [];
-	this.lastClass = null;
-};
-
-CompIterator.prototype.next = function () {
-	var uchar, starter, composite, cc;
-	while (this.resBuf.length === 0) {
-		uchar = this.it.next();
-		if (!uchar) {
-			this.resBuf = this.procBuf;
-			this.procBuf = [];
-			break;
-		}
-		if (this.procBuf.length === 0) {
-			this.lastClass = uchar.getCanonicalClass();
-			this.procBuf.push(uchar);
-		} else {
-			starter = this.procBuf[0];
-			composite = starter.getComposite(uchar);
-			cc = uchar.getCanonicalClass();
-			if (!!composite && (this.lastClass < cc || this.lastClass === 0)) {
-				this.procBuf[0] = composite;
-			} else {
-				if (cc === 0) {
-					this.resBuf = this.procBuf;
-					this.procBuf = [];
-				}
-				this.lastClass = cc;
-				this.procBuf.push(uchar);
-			}
-		}
-	}
-	return this.resBuf.shift();
-};
-
-createIterator = function (mode, str) {
-	switch (mode) {
-	case "NFD":
-		return new DecompIterator(
-			new RecursDecompIterator(new UCharIterator(str), true)
-		);
-	case "NFKD":
-		return new DecompIterator(
-			new RecursDecompIterator(new UCharIterator(str), false)
-		);
-	case "NFC":
-		return new CompIterator(new DecompIterator(
-			new RecursDecompIterator(new UCharIterator(str), true)
-		));
-	case "NFKC":
-		return new CompIterator(new DecompIterator(
-			new RecursDecompIterator(new UCharIterator(str), false)
-		));
-	}
-	throw mode + " is invalid";
-};
-normalize = function (mode, str) {
-	var it = createIterator(mode, str), ret = "", uchar;
-	while (!!(uchar = it.next())) ret += uchar.toString();
-	return ret;
-};
-
-/* Unicode data */
-UChar.udata =  data;
-
-module.exports = function (/*form*/) {
-	var str = String(validValue(this)), form = arguments[0];
-	if (form === undefined) form = 'NFC';
-	else form = String(form);
-	if (!forms[form]) throw new RangeError('Invalid normalization form: ' + form);
-	return normalize(form, str);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js
deleted file mode 100644
index f227f239de98c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var toInteger = require('../../number/to-integer')
-  , value     = require('../../object/valid-value')
-  , repeat    = require('./repeat')
-
-  , abs = Math.abs, max = Math.max;
-
-module.exports = function (fill/*, length*/) {
-	var self = String(value(this))
-	  , sLength = self.length
-	  , length = arguments[1];
-
-	length = isNaN(length) ? 1 : toInteger(length);
-	fill = repeat.call(String(fill), abs(length));
-	if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self;
-	return self + (((sLength + length) >= 0) ? '' : fill.slice(length + sLength));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js
deleted file mode 100644
index 678b1cbcff4b8d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var value = require('../../object/valid-value');
-
-module.exports = function (search, replace) {
-	var index, pos = 0, str = String(value(this)), sl, rl;
-	search = String(search);
-	replace = String(replace);
-	sl = search.length;
-	rl = replace.length;
-	while ((index = str.indexOf(search, pos)) !== -1) {
-		str = str.slice(0, index) + replace + str.slice(index + sl);
-		pos = index + rl;
-	}
-	return str;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js
deleted file mode 100644
index 24ce16d3bce6e1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var indexOf = String.prototype.indexOf, slice = String.prototype.slice;
-
-module.exports = function (search, replace) {
-	var index = indexOf.call(this, search);
-	if (index === -1) return String(this);
-	return slice.call(this, 0, index) + replace +
-		slice.call(this, index + String(search).length);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js
deleted file mode 100644
index 4c39b9fbe66cc6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'repeat',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js
deleted file mode 100644
index 15a800e8de9509..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.repeat
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js
deleted file mode 100644
index f7b8750f0fd8be..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var str = 'foo';
-
-module.exports = function () {
-	if (typeof str.repeat !== 'function') return false;
-	return (str.repeat(2) === 'foofoo');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js
deleted file mode 100644
index 0a3928b2c0dd76..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// Thanks: http://www.2ality.com/2014/01/efficient-string-repeat.html
-
-'use strict';
-
-var value     = require('../../../object/valid-value')
-  , toInteger = require('../../../number/to-integer');
-
-module.exports = function (count) {
-	var str = String(value(this)), result;
-	count = toInteger(count);
-	if (count < 0) throw new RangeError("Count must be >= 0");
-	if (!isFinite(count)) throw new RangeError("Count must be < ∞");
-	result = '';
-	if (!count) return result;
-	while (true) {
-		if (count & 1) result += str;
-		count >>>= 1;
-		if (count <= 0) break;
-		str += str;
-	}
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js
deleted file mode 100644
index d4f1eaf547f4a8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String.prototype, 'startsWith',
-		{ value: require('./shim'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js
deleted file mode 100644
index ec66a7c0057878..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.prototype.startsWith
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js
deleted file mode 100644
index a0556f196e9afa..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var str = 'razdwatrzy';
-
-module.exports = function () {
-	if (typeof str.startsWith !== 'function') return false;
-	return ((str.startsWith('trzy') === false) &&
-		(str.startsWith('raz') === true));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js
deleted file mode 100644
index aa5aaf4145ea58..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var value     = require('../../../object/valid-value')
-  , toInteger = require('../../../number/to-integer')
-
-  , max = Math.max, min = Math.min;
-
-module.exports = function (searchString/*, position*/) {
-	var start, self = String(value(this));
-	start = min(max(toInteger(arguments[1]), 0), self.length);
-	return (self.indexOf(searchString, start) === start);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js
deleted file mode 100644
index f1de1e301d4238..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var isCallable = require('../object/is-callable')
-  , value      = require('../object/valid-value')
-
-  , call = Function.prototype.call;
-
-module.exports = function (fmap) {
-	fmap = Object(value(fmap));
-	return function (pattern) {
-		var context = value(this);
-		pattern = String(pattern);
-		return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g,
-			function (match, token, escape) {
-				var t, r;
-				if (escape) return escape;
-				t = token;
-				while (t && !(r = fmap[t])) t = t.slice(0, -1);
-				if (!r) return match;
-				if (isCallable(r)) r = call.call(r, context);
-				return r + token.slice(t.length);
-			});
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js
deleted file mode 100644
index b062331cc597e2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String, 'fromCodePoint', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js
deleted file mode 100644
index 3f3110b6eb1f5a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.fromCodePoint
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js
deleted file mode 100644
index 840a20e3f36d87..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var fromCodePoint = String.fromCodePoint;
-	if (typeof fromCodePoint !== 'function') return false;
-	return fromCodePoint(0x1D306, 0x61, 0x1D307) === '\ud834\udf06a\ud834\udf07';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js
deleted file mode 100644
index 41fd7378f81c53..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// Based on:
-// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/
-// and:
-// https://github.com/mathiasbynens/String.fromCodePoint/blob/master
-// /fromcodepoint.js
-
-'use strict';
-
-var floor = Math.floor, fromCharCode = String.fromCharCode;
-
-module.exports = function (codePoint/*, …codePoints*/) {
-	var chars = [], l = arguments.length, i, c, result = '';
-	for (i = 0; i < l; ++i) {
-		c = Number(arguments[i]);
-		if (!isFinite(c) || c < 0 || c > 0x10FFFF || floor(c) !== c) {
-			throw new RangeError("Invalid code point " + c);
-		}
-
-		if (c < 0x10000) {
-			chars.push(c);
-		} else {
-			c -= 0x10000;
-			chars.push((c >> 10) + 0xD800, (c % 0x400) + 0xDC00);
-		}
-		if (i + 1 !== l && chars.length <= 0x4000) continue;
-		result += fromCharCode.apply(null, chars);
-		chars.length = 0;
-	}
-	return result;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js
deleted file mode 100644
index dbbcdf61f06cd8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = {
-	'#':           require('./#'),
-	formatMethod:  require('./format-method'),
-	fromCodePoint: require('./from-code-point'),
-	isString:      require('./is-string'),
-	randomUniq:    require('./random-uniq'),
-	raw:           require('./raw')
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js
deleted file mode 100644
index 719aeec16c5aa5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-var toString = Object.prototype.toString
-
-  , id = toString.call('');
-
-module.exports = function (x) {
-	return (typeof x === 'string') || (x && (typeof x === 'object') &&
-		((x instanceof String) || (toString.call(x) === id))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js
deleted file mode 100644
index 54ae6f8c9fd3c3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var generated = Object.create(null)
-
-  , random = Math.random;
-
-module.exports = function () {
-	var str;
-	do { str = random().toString(36).slice(2); } while (generated[str]);
-	return str;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js
deleted file mode 100644
index c417e659b2086c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(String, 'raw', { value: require('./shim'),
-		configurable: true, enumerable: false, writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js
deleted file mode 100644
index 504a5de24bf3ce..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')()
-	? String.raw
-	: require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js
deleted file mode 100644
index d7204c0c49e8a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var raw = String.raw, test;
-	if (typeof raw !== 'function') return false;
-	test = ['foo\nbar', 'marko\n'];
-	test.raw = ['foo\\nbar', 'marko\\n'];
-	return raw(test, 'INSE\nRT') === 'foo\\nbarINSE\nRTmarko\\n';
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js
deleted file mode 100644
index 7096efbc5671d1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var toPosInt   = require('../../number/to-pos-integer')
-  , validValue = require('../../object/valid-value')
-
-  , reduce = Array.prototype.reduce;
-
-module.exports = function (callSite/*,  …substitutions*/) {
-	var args, rawValue = Object(validValue(Object(validValue(callSite)).raw));
-	if (!toPosInt(rawValue.length)) return '';
-	args = arguments;
-	return reduce.call(rawValue, function (a, b, i) {
-		return a + String(args[i]) + b;
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js
deleted file mode 100644
index 884577887f5704..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-exports.context = null;
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js
deleted file mode 100644
index f0605399e0274e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/@@iterator/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js
deleted file mode 100644
index e590d8f28e7c0e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: '1', done: false });
-	a.deep(iterator.next(), { value: '2', done: false });
-	a.deep(iterator.next(), { value: '3', done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js
deleted file mode 100644
index e40c305b98fe68..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [4, 5, 6], y = { length: 8 }, w = {}, z = { length: 1 };
-
-	a.deep([x, y, w, z].sort(t), [w, z, x, y]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js
deleted file mode 100644
index cf3317371b3491..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var compare  = function (value) { return this - value; };
-
-module.exports = function (t, a) {
-	var arr;
-	arr = [2, 5, 5, 8, 34, 67, 98, 345, 678];
-
-	// highest, equal match
-	a(t.call(arr, compare.bind(1)), 0, "All higher");
-	a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower");
-	a(t.call(arr, compare.bind(4)), 0, "Mid");
-	a(t.call(arr, compare.bind(5)), 2, "Match");
-	a(t.call(arr, compare.bind(6)), 2, "Above");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js
deleted file mode 100644
index a5b1c977ad98cf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [1, 2, {}, 4];
-	a(t.call(x), x, "Returns same array");
-	a.deep(x, [], "Empties array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js
deleted file mode 100644
index 6390eb26dddf6b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"": function (t, a) {
-		var o, x, y, z;
-		o = {};
-		x = [0, 1, "", null, o, false, undefined, true];
-		y = x.slice(0);
-
-		a.not(z = t.call(x), x, "Returns different object");
-		a.deep(x, y, "Origin not changed");
-		a.deep(z, [0, 1, "", o, false, true], "Result");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js
deleted file mode 100644
index 3bdbe86812aaaa..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/concat/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js
deleted file mode 100644
index c30eb7eab08178..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr = [1, 3, 45], x = {}, subArr, subArr2, result;
-
-	a.deep(t.call(arr, '2d', x, ['ere', 'fe', x], false, null),
-		[1, 3, 45, '2d', x, 'ere', 'fe', x, false, null], "Plain array");
-
-	subArr = new SubArray('lol', 'miszko');
-	subArr2 = new SubArray('elo', 'fol');
-
-	result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', 'elo', 'fol', null],
-		"Spreable by default");
-
-	SubArray.prototype['@@isConcatSpreadable'] = false;
-
-	result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
-	a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', subArr2, null],
-		"Non spreadable");
-
-	delete SubArray.prototype['@@isConcatSpreadable'];
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js
deleted file mode 100644
index 21404a17a61358..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this, this[1]), true, "Contains");
-		a(t.call(this, {}), false, "Does Not contain");
-	},
-	"": function (t, a) {
-		var o, x = {}, y = {};
-
-		o = [1, 'raz', x];
-
-		a(t.call(o, 1), true, "First");
-		a(t.call(o, '1'), false, "Type coercion");
-		a(t.call(o, 'raz'), true, "Primitive");
-		a(t.call(o, 'foo'), false, "Primitive not found");
-		a(t.call(o, x), true, "Object found");
-		a(t.call(o, y), false, "Object not found");
-		a(t.call(o, 1, 1), false, "Position");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js
deleted file mode 100644
index 36070477d66802..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/copy-within/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js
deleted file mode 100644
index 93c85ea3114c24..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var args, x;
-
-	a.h1("2 args");
-	x = [1, 2, 3, 4, 5];
-	t.call(x, 0, 3);
-	a.deep(x, [4, 5, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]);
-
-	a.h1("3 args");
-	a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]);
-
-	a.h1("Negative args");
-	a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]);
-	a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]);
-
-	a.h1("Array-likes");
-	args = { 0: 1, 1: 2, 2: 3, length: 3 };
-	a.deep(t.call(args, -2, 0), { '0': 1, '1': 1, '2': 2, length: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js
deleted file mode 100644
index bcfa3a0bd12f84..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this), []);
-	},
-	"": function (t, a) {
-		var x = {}, y = {};
-
-		a.deep(t.call([1, 'raz', x, 2, 'trzy', y], [x, 2, 'trzy']), [1, 'raz', y],
-			"Scope longer");
-		a.deep(t.call([1, 'raz', x], [x, 2, 'trzy', 1, y]), ['raz'],
-			"Arg longer");
-		a.deep(t.call([1, 'raz', x], []), [1, 'raz', x], "Empty arg");
-		a.deep(t.call([], [1, y, 'sdfs']), [], "Empty scope");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js
deleted file mode 100644
index 4cf6c6359d44ee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([3, 'raz', {}, x, {}], x), 3, "Regular");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN), 2, "NaN");
-	a(t.call([3, 'raz', 0, {}, -0], -0), 2, "-0");
-	a(t.call([3, 'raz', -0, {}, 0], +0), 2, "+0");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 4, "fromIndex");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js
deleted file mode 100644
index ed4f700421a8f1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([3, 'raz', {}, x, {}, x], x), 5, "Regular");
-	a(t.call([3, 'raz', NaN, {}, x], NaN), 2, "NaN");
-	a(t.call([3, 'raz', 0, {}, -0], -0), 4, "-0");
-	a(t.call([3, 'raz', -0, {}, 0], +0), 4, "+0");
-	a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 2, "fromIndex");
-	a(t.call([3, 'raz', NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1");
-	a(t.call([3, 'raz', NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js
deleted file mode 100644
index 733209a1c80653..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/entries/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js
deleted file mode 100644
index bf40d31005df45..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: [0, '1'], done: false });
-	a.deep(iterator.next(), { value: [1, '2'], done: false });
-	a.deep(iterator.next(), { value: [2, '3'], done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js
deleted file mode 100644
index 07b32d8e8cbf9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var x = {};
-		a.deep(t.call(this, this, [this[0], this[2], x]), [x]);
-	},
-	"": function (t, a) {
-		var x = {}, y = {};
-
-		a.deep(t.call([x, y]), [x, y], "No arguments");
-		a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments");
-		a.deep(t.call([1, 'raz', x], [2, 'raz', y], [2, 'raz', x]), [1, y]);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js
deleted file mode 100644
index 2a01d2850a18a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/fill/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js
deleted file mode 100644
index d67300fcc23be8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-
-	x = [1, 2, 3, 4, 5, 6];
-	a(t.call(x, -1), x, "Returns self object");
-	a.deep(x, [-1, -1, -1, -1, -1, -1], "Value");
-
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1],
-		"Positive start");
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1],
-		"Negative start");
-	a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6],
-		"Large start");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js
deleted file mode 100644
index 6d6b87cc30a651..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/filter/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js
deleted file mode 100644
index e8b5c39849097f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, Boolean), ['foo', '2d', x], "Plain array");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, Boolean);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, ['foo', '2d', x], "Result of subclass");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js
deleted file mode 100644
index 8d85e618ccd6bc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/find-index/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js
deleted file mode 100644
index b5fee463811d49..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var count = 0, o = {}, self = Object(this);
-	a(t.call(self, function (value, i, scope) {
-		a(value, this[i], "Value");
-		a(i, count++, "Index");
-		a(scope, this, "Scope");
-	}, self), -1, "Falsy result");
-	a(count, 3);
-
-	count = -1;
-	a(t.call(this, function () {
-		return ++count ? o : null;
-	}, this), 1, "Truthy result");
-	a(count, 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js
deleted file mode 100644
index 29fac41e013353..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/find/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js
deleted file mode 100644
index ad2e645067db5d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var count = 0, o = {}, self = Object(this);
-	a(t.call(self, function (value, i, scope) {
-		a(value, this[i], "Value");
-		a(i, count++, "Index");
-		a(scope, this, "Scope");
-	}, self), undefined, "Falsy result");
-	a(count, 3);
-
-	count = -1;
-	a(t.call(this, function () {
-		return ++count ? o : null;
-	}, this), this[1], "Truthy result");
-	a(count, 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js
deleted file mode 100644
index 4aebad64b44e51..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t.call([]), null, "Empty");
-	a(t.call([null]), 0, "One value");
-	a(t.call([1, 2, 3]), 0, "Many values");
-	a(t.call(new Array(1000)), null, "Sparse empty");
-	x = [];
-	x[883] = undefined;
-	x[890] = null;
-	a(t.call(x), 883, "Manual sparse, distant value");
-	x = new Array(1000);
-	x[657] = undefined;
-	x[700] = null;
-	a(t.call(x), 657, "Sparse, distant value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js
deleted file mode 100644
index 87fde0357ef1b0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	a(t.call(this), this[0]);
-};
-exports[''] = function (t, a) {
-	var x;
-	a(t.call([]), undefined, "Empty");
-	a(t.call(new Array(234), undefined, "Sparse empty"));
-	x = new Array(2342);
-	x[434] = {};
-	a(t.call(x), x[434], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js
deleted file mode 100644
index 65f1214b04da93..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10];
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"Nested Arrays": function (t, a) {
-		a(t.call(o).length, 10);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js
deleted file mode 100644
index 2d24569d94d86d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, first, last, x, icount = this.length;
-		t.call(this, function (item, index, col) {
-			++count;
-			if (!first) {
-				first = item;
-			}
-			last = item;
-			x = col;
-			a(index, --icount, "Index");
-		});
-		a(count, this.length, "Iterated");
-		a(first, this[this.length - 1], "First is last");
-		a(last, this[0], "Last is first");
-		a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
-	},
-	"": function (t, a) {
-		var x = {}, y, count;
-		t.call([1], function () { y = this; }, x);
-		a(y, x, "Scope");
-		y = 0;
-		t.call([3, 4, 4], function (a, i) { y += i; });
-		a(y, 3, "Indexes");
-
-		x = [1, 3];
-		x[5] = 'x';
-		y = 0;
-		count = 0;
-		t.call(x, function (a, i) { ++count; y += i; });
-		a(y, 6, "Misssing Indexes");
-		a(count, 3, "Misssing Indexes, count");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js
deleted file mode 100644
index 32dc8c2dbb68bf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, self;
-
-		self = Object(this);
-		a.deep(t.call(self, function (v, i, scope) {
-			a(v, this[i], "Value");
-			a(i, count++, "Index");
-			a(scope, this, "Scope");
-			return i;
-		}, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] });
-	},
-	"": function (t, a) {
-		var r;
-		r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56],
-			function (v) {
-				return v % 2 ? 'odd' : 'even';
-			});
-		a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]);
-		a.deep(r.even, [2, 4, 6, 34, 56]);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js
deleted file mode 100644
index 3364170f1ec4a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this[1]), [1]);
-	},
-	"": function (t, a) {
-		var x = {};
-		a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result");
-		a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results");
-		a.deep(t.call([], x), [], "Empty array");
-		a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js
deleted file mode 100644
index b72b2fb074fc46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array');
-
-module.exports = {
-	__generic: function (t, a) {
-		a.deep(t.call(this, this, this), toArray(this));
-	},
-	"": function (t, a) {
-		var x = {}, y = {}, p, r;
-		a.deep(t.call([], [2, 3, 4]), [], "Empty #1");
-		a.deep(t.call([2, 3, 4], []), [], "Empty #2");
-		a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different");
-		p = t.call([3, 5, 'raz', {}, 'dwa', x], [1, 3, 'raz', 'dwa', 'trzy', x, {}],
-			[3, 'raz', x, 65]);
-		r = [3, 'raz', x];
-		p.sort();
-		r.sort();
-		a.deep(p, r, "Same parts");
-		a.deep(t.call(r, r), r, "Same");
-		a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]),
-			[1, 2, x, 4, 5, y, 7], "Long reverse same");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js
deleted file mode 100644
index e7f80e7a8d4ebc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([], []), true, "Empty");
-	a(t.call([], {}), true, "Empty lists");
-	a(t.call([1, x, 'raz'], [1, x, 'raz']), true, "Same");
-	a(t.call([1, x, 'raz'], { 0: 1, 1: x, 2: 'raz', length: 3 }), true,
-			"Same lists");
-	a(t.call([1, x, 'raz'], [x, 1, 'raz']), false, "Diff order");
-	a(t.call([1, x], [1, x, 'raz']), false, "Diff length #1");
-	a(t.call([1, x, 'raz'], [1, x]), false, "Diff length #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js
deleted file mode 100644
index 7349ba337135a7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t.call([]), true, "Empty");
-	a(t.call({}), true, "Empty lists");
-	a(t.call([1, x, 'raz']), true, "Uniq");
-	a(t.call([1, x, 1, 'raz']), false, "Not Uniq: primitive");
-	a(t.call([1, x, '1', 'raz']), true, "Uniq: primitive");
-	a(t.call([1, x, 1, {}, 'raz']), false, "Not Uniq: Obj");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js
deleted file mode 100644
index b0c1aa078f190e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/keys/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js
deleted file mode 100644
index a43c04cac103a6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: 0, done: false });
-	a.deep(iterator.next(), { value: 1, done: false });
-	a.deep(iterator.next(), { value: 2, done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js
deleted file mode 100644
index a1cac1073f8862..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t.call([]), null, "Empty");
-	a(t.call([null]), 0, "One value");
-	a(t.call([1, 2, 3]), 2, "Many values");
-	a(t.call(new Array(1000)), null, "Sparse empty");
-	x = [];
-	x[883] = null;
-	x[890] = undefined;
-	a(t.call(x), 890, "Manual sparse, distant value");
-	x = new Array(1000);
-	x[657] = null;
-	x[700] = undefined;
-	a(t.call(x), 700, "Sparse, distant value");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js
deleted file mode 100644
index 8d051bc8d2f5df..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	a(t.call(this), this[this.length - 1]);
-};
-
-exports[''] = function (t, a) {
-	var x;
-	a(t.call([]), undefined, "Empty");
-	a(t.call(new Array(234), undefined, "Sparse empty"));
-	x = new Array(2342);
-	x[434] = {};
-	x[450] = {};
-	a(t.call(x), x[450], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js
deleted file mode 100644
index cdcbc8df6206a5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/map/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js
deleted file mode 100644
index bbfefe8e333dc8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false],
-		"Plain array");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, Boolean);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [true, false, false, true, false, true, false],
-		"Result of subclass");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js
deleted file mode 100644
index 3ebdca2d0183df..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var y = {}, z = {}, x = [9, z, 5, y, 'foo'];
-	t.call(x, y);
-	a.deep(x, [9, z, 5, 'foo']);
-	t.call(x, {});
-	a.deep(x, [9, z, 5, 'foo'], "Not existing");
-	t.call(x, 5);
-	a.deep(x, [9, z, 'foo'], "Primitive");
-	x = [9, z, 5, y, 'foo'];
-	t.call(x, z, 5, 'foo');
-	a.deep(x, [9, y], "More than one argument");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js
deleted file mode 100644
index 42918b59711e32..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = [], y = {}, z = {};
-	a.deep(t.call(x, y), [], "Empty");
-	a.not(t.call(x), x, "Returns copy");
-	a.deep(t.call([1], y), [1], "One");
-	a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One");
-	a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More");
-	x = new Array(1000);
-	x[23] = 2;
-	x[3453] = 'raz';
-	x[500] = z;
-	a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js
deleted file mode 100644
index 855ae2fa4df88e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/slice/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js
deleted file mode 100644
index f674f3470037f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, 2, 4), [0, '2d'], "Plain array: result");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, 2, 4);
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [0, '2d'], "Subclass: result");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js
deleted file mode 100644
index 900771a6f818a4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		var count = 0, first, last, x, icount = this.length;
-		t.call(this, function (item, index, col) {
-			++count;
-			if (!first) {
-				first = item;
-			}
-			last = item;
-			x = col;
-			a(index, --icount, "Index");
-		});
-		a(count, this.length, "Iterated");
-		a(first, this[this.length - 1], "First is last");
-		a(last, this[0], "Last is first");
-		a.deep(x, Object(this), "Collection as third argument"); //jslint: skip
-	},
-	"": function (t, a) {
-		var x = {}, y, count;
-		t.call([1], function () { y = this; }, x);
-		a(y, x, "Scope");
-		y = 0;
-		t.call([3, 4, 4], function (a, i) { y += i; });
-		a(y, 3, "Indexes");
-
-		x = [1, 3];
-		x[5] = 'x';
-		y = 0;
-		count = 0;
-		a(t.call(x, function (a, i) { ++count; y += i; }), false, "Return");
-		a(y, 6, "Misssing Indexes");
-		a(count, 3, "Misssing Indexes, count");
-
-		count = 0;
-		a(t.call([-2, -3, -4, 2, -5], function (item) {
-			++count;
-			return item > 0;
-		}), true, "Return");
-		a(count, 2, "Break after true is returned");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js
deleted file mode 100644
index 0d9f46188b528b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/splice/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js
deleted file mode 100644
index 2c751e672400e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SubArray = require('../../../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr, x = {}, subArr, result;
-
-	arr = ['foo', undefined, 0, '2d', false, x, null];
-
-	a.deep(t.call(arr, 2, 2, 'bar'), [0, '2d'], "Plain array: result");
-	a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change");
-
-	subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
-
-	result = t.call(subArr, 2, 2, 'bar');
-	a(result instanceof SubArray, true, "Instance of subclass");
-	a.deep(result, [0, '2d'], "Subclass: result");
-	a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js
deleted file mode 100644
index 2f7e6c4ed1feb5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = {
-	__generic: function (t, a) {
-		a(t.call(this).length, 3);
-	},
-	"": function (t, a) {
-		var o, x = {}, y = {}, z = {}, w;
-		o = [1, 2, x, 3, 1, 'raz', '1', y, x, 'trzy', z, 'raz'];
-
-		a.not(w = t.call(o), o, "Returns different object");
-		a.deep(w, [1, 2, x, 3, 'raz', '1', y, 'trzy', z], "Result");
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js
deleted file mode 100644
index 9f40138c254b30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../array/#/values/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js
deleted file mode 100644
index e590d8f28e7c0e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.__generic = function (t, a) {
-	var iterator = t.call(this);
-	a.deep(iterator.next(), { value: '1', done: false });
-	a.deep(iterator.next(), { value: '2', done: false });
-	a.deep(iterator.next(), { value: '3', done: false });
-	a.deep(iterator.next(), { value: undefined, done: true });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js
deleted file mode 100644
index fc240d304869bb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-exports.Array = ['1', '2', '3'];
-
-exports.Arguments = (function () {
-	return arguments;
-}('1', '2', '3'));
-
-exports.String = "123";
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js
deleted file mode 100644
index d387126fe111ed..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'boolean');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
deleted file mode 100644
index 29d8699d461a85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-
-module.exports = function (t, a) {
-	t((t === null) || isArray(t.prototype), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js
deleted file mode 100644
index 29d8699d461a85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var isArray = Array.isArray;
-
-module.exports = function (t, a) {
-	t((t === null) || isArray(t.prototype), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js
deleted file mode 100644
index e0db846f99a0d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../array/from/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js
deleted file mode 100644
index 310302ac486645..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var o = [1, 2, 3], MyType;
-	a.not(t(o), o, "Array");
-	a.deep(t(o), o, "Array: same content");
-	a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
-	a.deep(t((function () { return arguments; }(3, o, 'raz'))),
-		[3, o, 'raz'], "Arguments");
-	a.deep(t((function () { return arguments; }(3))), [3],
-		"Arguments with one numeric value");
-
-	a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
-
-	a.deep(t(o, function (val) { return (val + 2) * 10; }, 10), [30, 40, 50],
-		"Mapping");
-
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.deep(t(3), [], "Primitive");
-
-	a(t.length, 1, "Length");
-	a.deep(t({ length: 0 }), [], "No values Array-like");
-	a.deep(t({ length: -1 }), [], "Invalid length Array-like");
-	a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2");
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.deep(t(false), [], "Boolean");
-	a.deep(t(-Infinity), [], "Inifity");
-	a.deep(t(-0), [], "-0");
-	a.deep(t(+0), [], "+0");
-	a.deep(t(1), [], "1");
-	a.deep(t(+Infinity), [], "+Infinity");
-	a.deep(t({}), [], "Plain object");
-	a.deep(t({ length: 1 }), [undefined], "Sparse array-like");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return x + x; }), ['aa', 'bb'],
-		"Map");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, undefined),
-		['undefined', 'undefined'], "Map context");
-	a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, 'x'),
-		['x', 'x'], "Map primitive context");
-	a.throws(function () { t({}, 'foo', 'x'); }, TypeError, "Non callable for map");
-
-	a.deep(t.call(null, { length: 1, '0': 'a' }), ['a'], "Null context");
-
-	a(t({ __proto__: { '0': 'abc', length: 1 } })[0], 'abc', "Values on prototype");
-
-	a.throws(function () { t.call(function () { return Object.freeze({}); }, {}); },
-		TypeError, "Contructor producing freezed objects");
-
-	// Ensure no setters are called for the indexes
-	// Ensure no setters are called for the indexes
-	MyType = function () {};
-	Object.defineProperty(MyType.prototype, '0', {
-		set: function (x) { throw new Error('Setter called: ' + x); }
-	});
-	a.deep(t.call(MyType, { '0': 'abc', length: 1 }), { '0': 'abc', length: 1 },
-		"Defined not set");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js
deleted file mode 100644
index d72e056887838b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-	a.deep(t(3), [undefined, undefined, undefined], "Just length");
-	a.deep(t(0, 'x'), [], "No repeat");
-	a.deep(t(1, x, y), [x], "Arguments length larger than repeat number");
-	a.deep(t(3, x), [x, x, x], "Single argument");
-	a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js
deleted file mode 100644
index 871a08aec21ff9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var SubArray = require('../../array/_sub-array-dummy-safe');
-
-module.exports = function (t, a) {
-	var arr = [1, 2, 3];
-	a(t(arr), true, "Array");
-	a(t(null), false, "Null");
-	a(t(), false, "Undefined");
-	a(t('234'), false, "String");
-	a(t(23), false, "Number");
-	a(t({}), false, "Plain object");
-	a(t({ length: 1, 0: 'raz' }), false, "Array-like");
-	a(t(Object.create(arr)), false, "Array extension");
-	if (!SubArray) return;
-	a(t(new SubArray(23)), false, "Subclass instance");
-	a(t(Array.prototype), false, "Array.prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js
deleted file mode 100644
index 30d53be2d7abbe..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../array/of/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js
deleted file mode 100644
index e6974420c1c274..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js
-// Thanks @mathiasbynens
-
-'use strict';
-
-var defineProperty = Object.defineProperty;
-
-module.exports = function (t, a) {
-	var x = {}, testObject, MyType;
-
-	a.deep(t(), [], "No arguments");
-	a.deep(t(3), [3], "One numeric argument");
-	a.deep(t(3, 'raz', null, x, undefined), [3, 'raz', null, x, undefined],
-		"Many arguments");
-
-	a(t.length, 0, "Length");
-
-	a.deep(t('abc'), ['abc'], "String");
-	a.deep(t(undefined), [undefined], "Undefined");
-	a.deep(t(null), [null], "Null");
-	a.deep(t(false), [false], "Boolean");
-	a.deep(t(-Infinity), [-Infinity], "Infinity");
-	a.deep(t(-0), [-0], "-0");
-	a.deep(t(+0), [+0], "+0");
-	a.deep(t(1), [1], "1");
-	a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args");
-	a.deep(t(+Infinity), [+Infinity], "+Infinity");
-	a.deep(t({ '0': 'a', '1': 'b', '2': 'c', length: 3 }),
-		[{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array like");
-	a.deep(t(undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
-		[undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy arguments");
-
-	a.h1("Null context");
-	a.deep(t.call(null, 'abc'), ['abc'], "String");
-	a.deep(t.call(null, undefined), [undefined], "Undefined");
-	a.deep(t.call(null, null), [null], "Null");
-	a.deep(t.call(null, false), [false], "Boolean");
-	a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity");
-	a.deep(t.call(null, -0), [-0], "-0");
-	a.deep(t.call(null, +0), [+0], "+0");
-	a.deep(t.call(null, 1), [1], "1");
-	a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric");
-	a.deep(t.call(null, +Infinity), [+Infinity], "+Infinity");
-	a.deep(t.call(null, { '0': 'a', '1': 'b', '2': 'c', length: 3 }),
-		[{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array-like");
-	a.deep(t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity),
-		[undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy");
-
-	a.h1("Other constructor context");
-	a.deep(t.call(Object, 1, 2, 3), { '0': 1, '1': 2, '2': 3, length: 3 }, "Many arguments");
-
-	testObject = Object(3);
-	testObject[0] = 1;
-	testObject[1] = 2;
-	testObject[2] = 3;
-	testObject.length = 3;
-	a.deep(t.call(Object, 1, 2, 3), testObject, "Test object");
-	a(t.call(Object).length, 0, "No arguments");
-	a.throws(function () { t.call(function () { return Object.freeze({}); }); }, TypeError,
-		"Frozen instance");
-
-	// Ensure no setters are called for the indexes
-	MyType = function () {};
-	defineProperty(MyType.prototype, '0', {
-		set: function (x) { throw new Error('Setter called: ' + x); }
-	});
-	a.deep(t.call(MyType, 'abc'), { '0': 'abc', length: 1 }, "Define, not set");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js
deleted file mode 100644
index 4985b5eaee9769..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = [1, 2, 3];
-	a(t(o), o, "Array");
-	a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
-	a.deep(t((function () { return arguments; }(3, o, 'raz'))),
-		[3, o, 'raz'], "Arguments");
-	a.deep(t((function () { return arguments; }(3))), [3],
-		"Arguments with one numeric value");
-
-	a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js
deleted file mode 100644
index 3732192d1bbd1f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(0); }, TypeError, "Number");
-	a.throws(function () { t(true); }, TypeError, "Boolean");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	a(t(x = []), x, "Array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js
deleted file mode 100644
index 4e6b3cb73e4f3b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(false), true, "Boolean");
-	a(t(new Boolean(false)), true, "Boolean object");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-	a(t(/a/), false, "Regular expression");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js
deleted file mode 100644
index 767c5e16a4d053..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = new Date(), o2;
-
-	o2 = t.call(o);
-	a.not(o, o2, "Different objects");
-	a.ok(o2 instanceof Date, "Instance of Date");
-	a(o.getTime(), o2.getTime(), "Same time");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js
deleted file mode 100644
index 9ddba55f74ac40..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2001, 0, 1)), 31, "January");
-	a(t.call(new Date(2001, 1, 1)), 28, "February");
-	a(t.call(new Date(2000, 1, 1)), 29, "February (leap)");
-	a(t.call(new Date(2001, 2, 1)), 31, "March");
-	a(t.call(new Date(2001, 3, 1)), 30, "April");
-	a(t.call(new Date(2001, 4, 1)), 31, "May");
-	a(t.call(new Date(2001, 5, 1)), 30, "June");
-	a(t.call(new Date(2001, 6, 1)), 31, "July");
-	a(t.call(new Date(2001, 7, 1)), 31, "August");
-	a(t.call(new Date(2001, 8, 1)), 30, "September");
-	a(t.call(new Date(2001, 9, 1)), 31, "October");
-	a(t.call(new Date(2001, 10, 1)), 30, "November");
-	a(t.call(new Date(2001, 11, 1)), 31, "December");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js
deleted file mode 100644
index d4f4a9087c059e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js
deleted file mode 100644
index b4a81bef6d0850..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js
deleted file mode 100644
index aae117e769b52c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(),
-		new Date(2000, 0, 1).valueOf());
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js
deleted file mode 100644
index e68e4bf782ef30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var dt = new Date(2011, 2, 3, 3, 5, 5, 32);
-	a(t.call(dt, ' %Y.%y.%m.%d.%H.%M.%S.%L '), ' 2011.11.03.03.03.05.05.032 ');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js
deleted file mode 100644
index 109093dfbe32f8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(new Date()), true, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js
deleted file mode 100644
index 98787e40781687..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var d = new Date();
-	a(t(d), d, "Date");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t({ valueOf: function () { return 20; } });
-	}, "Number object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js
deleted file mode 100644
index 1213cfc3b12791..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var e = new Error();
-	try {
-		t.call(e);
-	} catch (e2) {
-		a(e2, e);
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js
deleted file mode 100644
index d4ff500c9b30f2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var T = t, err = new T('My Error', 'MY_ERROR', { errno: 123 });
-	a(err instanceof Error, true, "Instance of error");
-	a(err.constructor, Error, "Constructor");
-	a(err.name, 'Error', "Name");
-	a(String(err), 'Error: My Error', "String representation");
-	a(err.code, 'MY_ERROR', "Code");
-	a(err.errno, 123, "Errno");
-	a(typeof err.stack, 'string', "Stack trace");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js
deleted file mode 100644
index f8b5e2000eb769..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), false, "Undefined");
-	a(t(1), false, "Primitive");
-	a(t({}), false, "Objectt");
-	a(t({ toString: function () { return '[object Error]'; } }), false,
-		"Fake error");
-	a(t(new Error()), true, "Error");
-	a(t(new EvalError()), true, "EvalError");
-	a(t(new RangeError()), true, "RangeError");
-	a(t(new ReferenceError()), true, "ReferenceError");
-	a(t(new SyntaxError()), true, "SyntaxError");
-	a(t(new TypeError()), true, "TypeError");
-	a(t(new URIError()), true, "URIError");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js
deleted file mode 100644
index e04cdb33b7cdf4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var e = new Error();
-	a(t(e), e, "Error");
-	a.throws(function () {
-		t({});
-	}, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js
deleted file mode 100644
index 83de5e844ac87d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var f = function (a, b) { return ['a', arguments.length, a, b]; }
-  , g = function (a) { return ['b', arguments.length].concat(a); }
-  , h = function (a) { return ['c', arguments.length].concat(a); };
-
-module.exports = function (t, a) {
-	a.deep(t.call(h, g, f)(1, 2), ['c', 1, 'b', 1, 'a', 2, 1, 2]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js
deleted file mode 100644
index 7a22e2f249276e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var foo = 'raz', bar = 'dwa'
-	  , fn = function marko(a, b) { return this + a + b + foo + bar; }
-	  , result, o = {};
-
-	fn.prototype = o;
-
-	fn.foo = 'raz';
-
-	result = t.call(fn);
-
-	a(result.length, fn.length, "Length");
-	a(result.name, fn.name, "Length");
-	a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Body");
-	a(result.prototype, fn.prototype, "Prototype");
-	a(result.foo, fn.foo, "Custom property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js
deleted file mode 100644
index 18fb0389e79b26..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array')
-
-  , f = function () { return toArray(arguments); };
-
-module.exports = function (t, a) {
-	var x, y = {}, z;
-	a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments");
-	x = t.call(f, 5, {});
-	a(x.length, 5, "Length #1");
-	z = x(1, 2);
-	a(z.length, 3, "Length #2");
-	z = z(3, 4);
-	a(z.length, 1, "Length #1");
-	a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments");
-	a.deep(x(8, 3)(y, 45)('raz', 6), [8, 3, y, 45, 'raz'], "Many arguments #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js
deleted file mode 100644
index 44a12d7b56c748..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(function () {
-		return arguments.length;
-	})(1, 2, 3), 0);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js
deleted file mode 100644
index c0f5e9d4b989a5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var identity = require('../../../function/identity')
-  , noop     = require('../../../function/noop');
-
-module.exports = function (t, a) {
-	a(t.call(identity)(''), true, "Falsy");
-	a(t.call(noop)(), true, "Undefined");
-	a(t.call(identity)({}), false, "Any object");
-	a(t.call(identity)(true), false, "True");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js
deleted file mode 100644
index bd00ce752f5202..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var toArray = require('../../../array/to-array')
-
-  , f = function () { return toArray(arguments); };
-
-module.exports = function (t, a) {
-	a.deep(t.call(f, 1)(2, 3), [1, 2, 3]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js
deleted file mode 100644
index b82dfecfe95045..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var f = function (a, b) { return this[a] + this[b]; }
-  , o = { a: 3, b: 4 };
-
-module.exports = function (t, a) {
-	a(t.call(f).call(o, ['a', 'b']), 7);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js
deleted file mode 100644
index 4c54d30354b405..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t.call(function (a, b) { return this[a] + this[b]; }),
-		{ args: 'a, b', body: ' return this[a] + this[b]; ' });
-	a.deep(t.call(function () {}),
-		{ args: '', body: '' });
-	a.deep(t.call(function (raz) {}),
-		{ args: 'raz', body: '' });
-	a.deep(t.call(function () { Object(); }),
-		{ args: '', body: ' Object(); ' });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js
deleted file mode 100644
index 8f037e857eaa09..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var foo = 'raz', bar = 'dwa'
-	  , fn = function (a, b) { return this + a + b + foo + bar; }
-	  , result;
-
-	result = t(fn, 3);
-	a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Content");
-	a(result.length, 3, "Length");
-	a(result.prototype, fn.prototype, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js
deleted file mode 100644
index fda52aa43710c1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = {};
-
-module.exports = function (t, a) {
-	a(t(o)(), o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js
deleted file mode 100644
index 8013e2e5af1288..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = {};
-
-module.exports = function (t, a) {
-	a(t(o), o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js
deleted file mode 100644
index fcce4aaaaafb87..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-var constant = require('../../function/constant')
-
-  , o = { b: constant('c') };
-
-module.exports = function (t, a) {
-	a(t('b')(o), 'c');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js
deleted file mode 100644
index f8de8812a5035d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var args, dummy;
-	args = (function () { return arguments; }());
-	dummy = { '0': 1, '1': 2 };
-	Object.defineProperty(dummy, 'length', { value: 2 });
-	a(t(args), true, "Arguments");
-	a(t(dummy), false, "Dummy");
-	a(t([]), false, "Array");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js
deleted file mode 100644
index 83acc42f9a6637..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var o = { call: Function.prototype.call, apply: Function.prototype.apply };
-
-module.exports = function (t, a) {
-	a(t(function () {}), true, "Function is function");
-	a(t(o), false, "Plain object is not function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js
deleted file mode 100644
index 4305c6fcfd51cd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t(1, 2, 3), 'undefined');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js
deleted file mode 100644
index 5bf9583ad52b3e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-var o = { foo: 'bar' };
-
-module.exports = function (t, a) {
-	a(t('foo')(o), o.foo);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js
deleted file mode 100644
index 59b16233b37978..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var f = function () {};
-	a(t(f), f, "Function");
-	f = new Function();
-	a(t(f), f, "Function");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t(/re/);
-	}, "RegExp");
-	a.throws(function () {
-		t({ call: function () { return 20; } });
-	}, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js
deleted file mode 100644
index 1f452aefb09827..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.ok(t && typeof t === 'object');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js
deleted file mode 100644
index 0fed8ad898990e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('es6-iterator/array')
-
-  , slice = Array.prototype.slice;
-
-module.exports = function (t, a) {
-	var i = 0, x = ['raz', 'dwa', 'trzy'], y = {};
-	t(x, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
-		a(this, y, "Array: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
-		a(this, y, "Arguments: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t({ 0: 'raz', 1: 'dwa', 2: 'trzy', length: 3 }, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#");
-		a(this, y, "Array-like: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(x = 'foo', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Regular String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	x = ['r', '💩', 'z'];
-	t('r💩z', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Unicode String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(new ArrayIterator(x), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
-		a(this, y, "Iterator: context:  " + (i++) + "#");
-	}, y);
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js
deleted file mode 100644
index c0d2a43ebfe17c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a(t([]), true, "Array");
-	a(t(""), true, "String");
-	a(t((function () { return arguments; }())), true, "Arguments");
-	a(t({ length: 0 }), true, "List object");
-	a(t(function () {}), false, "Function");
-	a(t({}), false, "Plain object");
-	a(t(/raz/), false, "Regexp");
-	a(t(), false, "No argument");
-	a(t(null), false, "Null");
-	a(t(undefined), false, "Undefined");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), true, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js
deleted file mode 100644
index da12529bc0368c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), x, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js
deleted file mode 100644
index bcc2ad3d0aa1c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a(t(''), '', "''");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-	x = {};
-	x[iteratorSymbol] = function () {};
-	a(t(x), x, "Iterable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js
deleted file mode 100644
index 9041431d7769c9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t(1.337, 8, 23), [63, 171, 34, 209]);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js
deleted file mode 100644
index ca30b8208dbb95..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js
deleted file mode 100644
index 01fb6d08224e2a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/acosh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js
deleted file mode 100644
index 3d710c7930d454..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-1), NaN, "Negative");
-	a(t(0), NaN, "Zero");
-	a(t(0.5), NaN, "Below 1");
-	a(t(1), 0, "1");
-	a(t(2), 1.3169578969248166, "Other");
-	a(t(Infinity), Infinity, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js
deleted file mode 100644
index d1fceceee13449..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/asinh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js
deleted file mode 100644
index d9fbe49edc2d99..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(-2), -1.4436354751788103, "Negative");
-	a(t(2), 1.4436354751788103, "Positive");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js
deleted file mode 100644
index cba8fad83e4082..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/atanh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js
deleted file mode 100644
index a857b496686048..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-2), NaN, "Less than -1");
-	a(t(2), NaN, "Greater than 1");
-	a(t(-1), -Infinity, "-1");
-	a(t(1), Infinity, "1");
-	a(t(0), 0, "Zero");
-	a(t(0.5), 0.5493061443340549, "Ohter");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js
deleted file mode 100644
index 374d4b383f5c5f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/cbrt/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js
deleted file mode 100644
index 43ab68b848f61a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(-1), -1, "-1");
-	a(t(1), 1, "1");
-	a(t(2), 1.2599210498948732, "Ohter");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js
deleted file mode 100644
index 44f8815526b7ec..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/clz32/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js
deleted file mode 100644
index a769b39b85b644..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(1), 31, "1");
-	a(t(1000), 22, "1000");
-	a(t(), 32, "No arguments");
-	a(t(Infinity), 32, "Infinity");
-	a(t(-Infinity), 32, "-Infinity");
-	a(t("foo"), 32, "String");
-	a(t(true), 31, "Boolean");
-	a(t(3.5), 30, "Float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js
deleted file mode 100644
index f3c712b1dfc977..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/cosh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js
deleted file mode 100644
index 419c12367dbcd2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 1, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), Infinity, "-Infinity");
-	a(t(1), 1.5430806348152437, "1");
-	a(t(Number.MAX_VALUE), Infinity);
-	a(t(-Number.MAX_VALUE), Infinity);
-	a(t(Number.MIN_VALUE), 1);
-	a(t(-Number.MIN_VALUE), 1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js
deleted file mode 100644
index c21296725dc07b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/expm1/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js
deleted file mode 100644
index 15f0e796ce565b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -1, "-Infinity");
-	a(t(1).toFixed(15), '1.718281828459045', "1");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js
deleted file mode 100644
index c909af7c300b22..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/fround/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js
deleted file mode 100644
index 4ef6d4ea9b199b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(1.337), 1.3370000123977661, "1");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js
deleted file mode 100644
index 99466464c122bc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/hypot/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js
deleted file mode 100644
index 91d950a5d32899..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), 0, "No arguments");
-	a(t(0, -0, 0), 0, "Zeros");
-	a(t(4, NaN, Infinity), Infinity, "Infinity");
-	a(t(4, NaN, -Infinity), Infinity, "Infinity");
-	a(t(4, NaN, 34), NaN, "NaN");
-	a(t(3, 4), 5, "#1");
-	a(t(3, 4, 5), 7.0710678118654755, "#2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js
deleted file mode 100644
index 7b2a2a61653299..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/imul/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js
deleted file mode 100644
index a2ca7fe78321ce..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(), 0, "No arguments");
-	a(t(0, 0), 0, "Zeros");
-	a(t(2, 4), 8, "#1");
-	a(t(-1, 8), -8, "#2");
-	a(t(0xfffffffe, 5), -10, "#3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js
deleted file mode 100644
index 4b3b4a4569fb81..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log10/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js
deleted file mode 100644
index 5fa0d5be3af861..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-0.5), NaN, "Less than 0");
-	a(t(0), -Infinity, "0");
-	a(t(1), 0, "1");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(2), 0.3010299956639812, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js
deleted file mode 100644
index 5d269bd3eaf09b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log1p/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js
deleted file mode 100644
index d495ce0496b76d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-1.5), NaN, "Less than -1");
-	a(t(-1), -Infinity, "-1");
-	a(t(0), 0, "0");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(1), 0.6931471805599453, "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js
deleted file mode 100644
index 92b501ac72abed..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/log2/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js
deleted file mode 100644
index faa9c32a8537ab..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(-0.5), NaN, "Less than 0");
-	a(t(0), -Infinity, "0");
-	a(t(1), 0, "1");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(3).toFixed(15), '1.584962500721156', "Other");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js
deleted file mode 100644
index 5875c42d608eb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/sign/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js
deleted file mode 100644
index b6b89c15889dc4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var is = require('../../../object/is');
-
-module.exports = function (t, a) {
-	a(is(t(0), +0), true, "+0");
-	a(is(t(-0), -0), true, "-0");
-	a(t({}), NaN, true, "NaN");
-	a(t(-234234234), -1, "Negative");
-	a(t(234234234), 1, "Positive");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js
deleted file mode 100644
index e52089e4507156..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/sinh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js
deleted file mode 100644
index 4f63b59e735bf0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(t(1), 1.1752011936438014, "1");
-	a(t(Number.MAX_VALUE), Infinity);
-	a(t(-Number.MAX_VALUE), -Infinity);
-	a(t(Number.MIN_VALUE), 5e-324);
-	a(t(-Number.MIN_VALUE), -5e-324);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js
deleted file mode 100644
index a96bf193366b30..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/tanh/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js
deleted file mode 100644
index 2c67aaf47049fd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), 1, "Infinity");
-	a(t(-Infinity), -1, "-Infinity");
-	a(t(1), 0.7615941559557649, "1");
-	a(t(Number.MAX_VALUE), 1);
-	a(t(-Number.MAX_VALUE), -1);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js
deleted file mode 100644
index 1830e61f69794d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../math/trunc/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js
deleted file mode 100644
index 9e5eed7910e13c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var is = require('../../../object/is');
-
-module.exports = function (t, a) {
-	a(t({}), NaN, "NaN");
-	a(t(0), 0, "Zero");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(-Infinity), -Infinity, "-Infinity");
-	a(is(t(0.234), 0), true, "0");
-	a(is(t(-0.234), -0), true, "-0");
-	a(t(13.7), 13, "Positive #1");
-	a(t(12.3), 12, "Positive #2");
-	a(t(-12.3), -12, "Negative #1");
-	a(t(-14.7), -14, "Negative #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js
deleted file mode 100644
index e02082353348dc..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(78, 4), '0078');
-	a(t.call(65.12323, 4, 3), '0065.123', "Precision");
-	a(t.call(65, 4, 3), '0065.000', "Precision integer");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js
deleted file mode 100644
index 574da75dcebb7f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/epsilon/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js
deleted file mode 100644
index b35345fa6ee762..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-finite/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js
deleted file mode 100644
index 5205d1c2602520..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js
deleted file mode 100644
index 127149ceeda9b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js
deleted file mode 100644
index 3f3985c3a05522..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t(2.34), false, "Float");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js
deleted file mode 100644
index 2f01d6d30ad9f6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-nan/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js
deleted file mode 100644
index 425723e74b07b9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), false, "Number");
-	a(t({}), false, "Not numeric");
-	a(t(NaN), true, "NaN");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js
deleted file mode 100644
index 275133476a61ff..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(0), true, "Zero");
-	a(t(NaN), true, "NaN");
-	a(t(Infinity), true, "Infinity");
-	a(t(12), true, "Number");
-	a(t(false), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new Number(2)), true, "Number object");
-	a(t('asdfaf'), false, "String");
-	a(t(''), false, "Empty String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js
deleted file mode 100644
index 33667e2e9afb60..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/is-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js
deleted file mode 100644
index 77e06674711795..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(2), true, "Number");
-	a(t(2.34), false, "Float");
-	a(t(Math.pow(2, 53)), false, "Too large");
-	a(t(Math.pow(2, 53) - 1), true, "Maximum");
-	a(t('23'), false, "Not numeric");
-	a(t(NaN), false, "NaN");
-	a(t(Infinity), false, "Infinity");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js
deleted file mode 100644
index bef00ca413d3cb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/max-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js
deleted file mode 100644
index fa440248bf47a6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../number/min-safe-integer/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js
deleted file mode 100644
index c892fd47d41c16..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(typeof t, 'number');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js
deleted file mode 100644
index ff326ba7a95bbb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "NaN");
-	a(t(20), 20, "Positive integer");
-	a(t('-20'), -20, "String negative integer");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(15.343), 15, "Float");
-	a(t(-15.343), -15, "Negative float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js
deleted file mode 100644
index 2f3b4e674ecc4b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "NaN");
-	a(t(20), 20, "Positive integer");
-	a(t(-20), 0, "Negative integer");
-	a(t(Infinity), Infinity, "Infinity");
-	a(t(15.343), 15, "Float");
-	a(t(-15.343), 0, "Negative float");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js
deleted file mode 100644
index 00d05bdfe346d7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "Not numeric");
-	a(t(-4), 4294967292, "Negative");
-	a(t(133432), 133432, "Positive");
-	a(t(8589934592), 0, "Greater than maximum");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js
deleted file mode 100644
index 179afed88ee845..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { raz: 1, dwa: 2, trzy: 3 }
-	  , o2 = {}, o3 = {}, arr, i = -1;
-
-	t = t('forEach');
-	t(o, function (value, name, self, index) {
-		o2[name] = value;
-		a(index, ++i, "Index");
-		a(self, o, "Self");
-		a(this, o3, "Scope");
-	}, o3);
-	a.deep(o2, o);
-
-	arr = [];
-	o2 = {};
-	i = -1;
-	t(o, function (value, name, self, index) {
-		arr.push(value);
-		o2[name] = value;
-		a(index, ++i, "Index");
-		a(self, o, "Self");
-		a(this, o3, "Scope");
-	}, o3, function (a, b) {
-		return o[b] - o[a];
-	});
-	a.deep(o2, o, "Sort by Values: Content");
-	a.deep(arr, [3, 2, 1], "Sort by Values: Order");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js
deleted file mode 100644
index 40065594187cb9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../object/assign/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js
deleted file mode 100644
index 9afe5f658c45b7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o1 = { a: 1, b: 2 }
-	  , o2 = { b: 3, c: 4 };
-
-	a(t(o1, o2), o1, "Returns self");
-	a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content");
-
-	a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js
deleted file mode 100644
index bfc08cc208420b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isEmpty = require('../../object/is-empty');
-
-module.exports = function (t, a) {
-	var x = {};
-	a(t(x), x, "Empty: Returns same object");
-	a(isEmpty(x), true, "Empty: Not changed");
-	x.foo = 'raz';
-	x.bar = 'dwa';
-	a(t(x), x, "Same object");
-	a(isEmpty(x), true, "Emptied");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js
deleted file mode 100644
index 9c9064c7886445..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {}, z;
-	z = t(x);
-	a.not(z, x, "Returns different object");
-	a.deep(z, {}, "Empty on empty");
-
-	x = { foo: 'bar', a: 0, b: false, c: '', d: '0', e: null, bar: y,
-		elo: undefined };
-	z = t(x);
-	a.deep(z, { foo: 'bar', a: 0, b: false, c: '', d: '0', bar: y },
-		"Cleared null values");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js
deleted file mode 100644
index cb9424109c334b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var d = new Date();
-
-	a.ok(t(12, 3) > 0, "Numbers");
-	a.ok(t(2, 13) < 0, "Numbers #2");
-	a.ok(t("aaa", "aa") > 0, "Strings");
-	a.ok(t("aa", "ab") < 0, "Strings #2");
-	a(t("aa", "aa"), 0, "Strings same");
-	a(t(d, new Date(d.getTime())), 0, "Same date");
-	a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js
deleted file mode 100644
index a4023bc8ac4bf6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var stringify = JSON.stringify;
-
-module.exports = function (t, a) {
-	var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
-	  , no = t(o);
-
-	a.not(no, o, "Return different object");
-	a(stringify(no), stringify(o), "Match properties and values");
-
-	o = { foo: 'bar', raz: { dwa: 'dwa',
-		trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
-		'dziewięć': function () { } }, 'dziesięć': 10 };
-	o.raz.rec = o;
-
-	no = t(o);
-	a.not(o.raz, no.raz, "Deep");
-	a.not(o.raz.trzy, no.raz.trzy, "Deep #2");
-	a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content");
-	a(no.raz.rec, no, "Recursive");
-	a.not(o.raz.osiem, no.raz.osiem, "Empty object");
-	a(o.raz['dziewięć'], no.raz['dziewięć'], "Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js
deleted file mode 100644
index 2f222ef809c6d7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var stringify = JSON.stringify;
-
-module.exports = function (t, a) {
-	var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
-	  , no = t(o);
-
-	a.not(no, o, "Return different object");
-	a(stringify(no), stringify(o), "Match properties and values");
-
-	o = { foo: 'bar', raz: { dwa: 'dwa',
-		trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
-		'dziewięć': function () { } }, 'dziesięć': 10 };
-	o.raz.rec = o;
-
-	no = t(o);
-	a(o.raz, no.raz, "Shallow");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js
deleted file mode 100644
index 494f4f163515eb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), 0, "Empty");
-	a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4,
-		"Some properties");
-	a(t(Object.defineProperties({}, {
-		raz: { value: 'raz' },
-		dwa: { value: 'dwa', enumerable: true }
-	})), 1, "Some properties hidden");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js
deleted file mode 100644
index 8b7be214136d2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('../../object/set-prototype-of')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, obj;
-
-	a(getPrototypeOf(t(x)), x, "Normal object");
-	a(getPrototypeOf(t(null)),
-		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");
-
-	a.h1("Properties");
-	a.h2("Normal object");
-	a(getPrototypeOf(obj = t(x, { foo: { value: 'bar' } })), x, "Prototype");
-	a(obj.foo, 'bar', "Property");
-	a.h2("Null");
-	a(getPrototypeOf(obj = t(null, { foo: { value: 'bar2' } })),
-		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype");
-	a(obj.foo, 'bar2', "Property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js
deleted file mode 100644
index 02b3f0027cbf82..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = {};
-	a(t(o, {}), false, "Different objects");
-	a(t(o, o), true, "Same objects");
-	a(t('1', '1'), true, "Same primitive");
-	a(t('1', 1), false, "Different primitive types");
-	a(t(NaN, NaN), true, "NaN");
-	a(t(0, 0), true, "0,0");
-	a(t(0, -0), true, "0,-0");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js
deleted file mode 100644
index 07d5bbbd61f7af..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var o = { 1: 1, 2: 2, 3: 3 };
-
-module.exports = function (t, a) {
-	var o2 = {};
-	t(o, function (value, name) {
-		o2[name] = value;
-		return true;
-	});
-	a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
-
-	a(t(o, function () {
-		return true;
-	}), true, "Succeeds");
-
-	a(t(o, function () {
-		return false;
-	}), false, "Fails");
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js
deleted file mode 100644
index 7307da8640fcd1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 },
-		function (value) { return Boolean(value % 2); }), { 1: 1, 3: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js
deleted file mode 100644
index 8169cd235344d9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = Object.create(null);
-	a(t(x), null, "Normal: Empty");
-	a(t(y), null, "Null extension: Empty");
-	x.foo = 'raz';
-	x.bar = 343;
-	a(['foo', 'bar'].indexOf(t(x)) !== -1, true, "Normal");
-	y.elo = 'foo';
-	y.mar = 'wew';
-	a(['elo', 'mar'].indexOf(t(y)) !== -1, true, "Null extension");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js
deleted file mode 100644
index ca342eab9c8ae4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }),
-		{ aa: 1, ab: 2, ba: 3, bb: 4 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js
deleted file mode 100644
index 8690d1e82179aa..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { raz: 1, dwa: 2, trzy: 3 }
-	  , o2 = {};
-	a(t(o, function (value, name) {
-		o2[name] = value;
-	}), undefined, "Return");
-	a.deep(o2, o);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js
deleted file mode 100644
index b91c3dd50e7bbf..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { first: 1, second: 4 }, r1, r2;
-	o = Object.create(o, {
-		third: { value: null }
-	});
-	o.first = 2;
-	o = Object.create(o);
-	o.fourth = 3;
-
-	r1 = t(o);
-	r1.sort();
-	r2 = ['first', 'second', 'third', 'fourth']
-		.concat(Object.getOwnPropertyNames(Object.prototype));
-	r2.sort();
-	a.deep(r1, r2);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js
deleted file mode 100644
index 6295973ca81acd..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t([]), true, "Array");
-	a(t(""), true, "String");
-	a(t((function () { return arguments; }())), true, "Arguments");
-	a(t({ length: 0 }), true, "List object");
-	a(t(function () {}), false, "Function");
-	a(t({}), false, "Plain object");
-	a(t(/raz/), false, "Regexp");
-	a(t(), false, "No argument");
-	a(t(null), false, "Null");
-	a(t(undefined), false, "Undefined");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js
deleted file mode 100644
index 625e221d2c3811..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(function () {}), true, "Function");
-	a(t({}), false, "Object");
-	a(t(), false, "Undefined");
-	a(t(null), false, "Null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js
deleted file mode 100644
index 4f14cbbe8108b2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x, y;
-
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Different property value");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
-		"Property only in source");
-	a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Property only in target");
-
-	a(t("raz", "dwa"), false, "String: diff");
-	a(t("raz", "raz"), true, "String: same");
-	a(t("32", 32), false, "String & Number");
-
-	a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
-	a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
-	a(t(['foo'], ['one']), false, "Array: One value comparision");
-
-	x = { foo: { bar: { mar: {} } } };
-	y = { foo: { bar: { mar: {} } } };
-	a(t(x, y), true, "Deep");
-
-	a(t({ foo: { bar: { mar: 'foo' } } }, { foo: { bar: { mar: {} } } }),
-		false, "Deep: false");
-
-	x = { foo: { bar: { mar: {} } } };
-	x.rec = { foo: x };
-
-	y = { foo: { bar: { mar: {} } } };
-	y.rec = { foo: x };
-
-	a(t(x, y), true, "Object: Infinite Recursion: Same #1");
-
-	x.rec.foo = y;
-	a(t(x, y), true, "Object: Infinite Recursion: Same #2");
-
-	x.rec.foo = x;
-	y.rec.foo = y;
-	a(t(x, y), true, "Object: Infinite Recursion: Same #3");
-
-	y.foo.bar.mar = 'raz';
-	a(t(x, y), false, "Object: Infinite Recursion: Diff");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js
deleted file mode 100644
index 394e2ed94c09f0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Different property value");
-	a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false,
-		"Property only in source");
-	a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false,
-		"Property only in target");
-
-	a(t("raz", "dwa"), false, "String: diff");
-	a(t("raz", "raz"), true, "String: same");
-	a(t("32", 32), false, "String & Number");
-
-	a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same");
-	a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js
deleted file mode 100644
index b560c2c36b0d4b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), true, "Empty");
-	a(t({ 1: 1 }), false, "Not empty");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js
deleted file mode 100644
index 72c8aa6daf4a3a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(null), false, "Null");
-	a(t(new Date()), true, "Date");
-	a(t(new String('raz')), true, "String object");
-	a(t({}), true, "Plain object");
-	a(t(/a/), true, "Regular expression");
-	a(t(function () {}), true, "Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js
deleted file mode 100644
index e988829d558ad0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t({}), true, "Empty {} is plain object");
-	a(t({ a: true }), true, "{} with property is plain object");
-	a(t({ prototype: 1, constructor: 2, __proto__:  3 }), true,
-		"{} with any property keys is plain object");
-	a(t(null), false, "Null is not plain object");
-	a(t('string'), false, "Primitive is not plain object");
-	a(t(function () {}), false, "Function is not plain object");
-	a(t(Object.create({})), false,
-		"Object whose prototype is not Object.prototype is not plain object");
-	a(t(Object.create(Object.prototype)), true,
-		"Object whose prototype is Object.prototype is plain object");
-	a(t(Object.create(null)), true,
-		"Object whose prototype is null is plain object");
-	a(t(Object.prototype), false, "Object.prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js
deleted file mode 100644
index 4f8948cbf344e1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = {};
-	a(t(o, {}), false, "Different objects");
-	a(t(o, o), true, "Same objects");
-	a(t('1', '1'), true, "Same primitive");
-	a(t('1', 1), false, "Different primitive types");
-	a(t(NaN, NaN), true, "NaN");
-	a(t(0, 0), true, "0,0");
-	a(t(0, -0), false, "0,-0");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js
deleted file mode 100644
index a9225a048c5c91..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x = {}, y = {}
-	  , o = { foo: 'bar', raz: x, trzy: 'cztery', five: '6' };
-
-	a(t(o, 'bar'), 'foo', "First property");
-	a(t(o, 6), null, "Primitive that's not there");
-	a(t(o, x), 'raz', "Object");
-	a(t(o, y), null, "Object that's not there");
-	a(t(o, '6'), 'five', "Last property");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js
deleted file mode 100644
index 179e1e5612ea8f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../object/keys/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js
deleted file mode 100644
index ed29eebcd751f7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ foo: 'bar' }), ['foo'], "Object");
-	a.deep(t('raz'), ['0', '1', '2'], "Primitive");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Undefined");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js
deleted file mode 100644
index be84825b1be711..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) {
-		return 'x' + (key + value);
-	}), { x11: 1, x22: 2, x33: 3 });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js
deleted file mode 100644
index f9cc09c01b3933..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var obj = { 1: 1, 2: 2, 3: 3 };
-	a.deep(t(obj, function (value, key, context) {
-		a(context, obj, "Context argument");
-		return (value + 1) + key;
-	}), { 1: '21', 2: '32', 3: '43' });
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js
deleted file mode 100644
index d1c727a95a7371..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o, o1, o2, x, y = {}, z = {};
-	o = { inherited: true, visible: 23 };
-	o1 = Object.create(o);
-	o1.visible = z;
-	o1.nonremovable = 'raz';
-	Object.defineProperty(o1, 'hidden', { value: 'hidden' });
-
-	o2 = Object.defineProperties({}, { nonremovable: { value: y } });
-	o2.other = 'other';
-
-	try { t(o2, o1); } catch (ignore) {}
-
-	a(o2.visible, z, "Enumerable");
-	a(o1.hidden, 'hidden', "Not Enumerable");
-	a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(o2.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(o2.inherited, true, "Extend deep");
-
-	a(o2.nonremovable, y, "Do not overwrite non configurable");
-	a(o2.other, 'other', "Own kept");
-
-	x = {};
-	t(x, o2);
-	try { t(x, o1); } catch (ignore) {}
-
-	a(x.visible, z, "Enumerable");
-	a(x.hidden, 'hidden', "Not Enumerable");
-	a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(x.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(x.inherited, true, "Extend deep");
-
-	a(x.nonremovable, y, "Ignored non configurable");
-	a(x.other, 'other', "Other");
-
-	x.visible = 3;
-	a(x.visible, 3, "Writable is writable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		x.hidden = 3;
-	}, "Not writable is not writable");
-
-	x = {};
-	t(x, o1);
-	delete x.visible;
-	a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		delete x.hidden;
-	}, "Not configurable is not configurable");
-
-	x = Object.defineProperty({}, 'foo',
-		{ configurable: false, writable: true, enumerable: false, value: 'bar' });
-
-	try { t(x, { foo: 'lorem' }); } catch (ignore) {}
-	a(x.foo, 'bar', "Writable, not enumerable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js
deleted file mode 100644
index 866005b03df29b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o, o1, o2, x, y = {}, z = {};
-	o = { inherited: true };
-	o1 = Object.create(o);
-	o1.visible = z;
-	o1.nonremovable = 'raz';
-	Object.defineProperty(o1, 'hidden', { value: 'hidden' });
-
-	o2 = Object.defineProperties({}, { nonremovable: { value: y } });
-	o2.other = 'other';
-
-	try { t(o2, o1); } catch (ignore) {}
-
-	a(o2.visible, z, "Enumerable");
-	a(o1.hidden, 'hidden', "Not Enumerable");
-	a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(o2.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(o2.hasOwnProperty('inherited'), false, "Extend only own");
-	a(o2.inherited, undefined, "Extend ony own: value");
-
-	a(o2.nonremovable, y, "Do not overwrite non configurable");
-	a(o2.other, 'other', "Own kept");
-
-	x = {};
-	t(x, o2);
-	try { t(x, o1); } catch (ignore) {}
-
-	a(x.visible, z, "Enumerable");
-	a(x.hidden, 'hidden', "Not Enumerable");
-	a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable");
-	a(x.propertyIsEnumerable('hidden'), false,
-		"Not enumerable is not enumerable");
-
-	a(x.hasOwnProperty('inherited'), false, "Extend only own");
-	a(x.inherited, undefined, "Extend ony own: value");
-
-	a(x.nonremovable, y, "Ignored non configurable");
-	a(x.other, 'other', "Other");
-
-	x.visible = 3;
-	a(x.visible, 3, "Writable is writable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		x.hidden = 3;
-	}, "Not writable is not writable");
-
-	x = {};
-	t(x, o1);
-	delete x.visible;
-	a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable");
-
-	x = {};
-	t(x, o1);
-	a.throws(function () {
-		delete x.hidden;
-	}, "Not configurable is not configurable");
-
-	x = Object.defineProperty({}, 'foo',
-		{ configurable: false, writable: true, enumerable: false, value: 'bar' });
-
-	try { t(x, { foo: 'lorem' }); } catch (ignore) {}
-	a(x.foo, 'bar', "Writable, not enumerable");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js
deleted file mode 100644
index 0d2d4da04a53b1..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-var create = Object.create, defineProperty = Object.defineProperty;
-
-module.exports = function (t, a) {
-	var x = { foo: 'raz', bar: 'dwa' }, y;
-	y = t(x);
-	a.not(y, x, "Returns copy");
-	a.deep(y, x, "Plain");
-
-	x = { raz: 'one', dwa: 'two' };
-	defineProperty(x, 'get', {
-		configurable: true,
-		enumerable: true,
-		get: function () { return this.dwa; }
-	});
-	x = create(x);
-	x.trzy = 'three';
-	x.cztery = 'four';
-	x = create(x);
-	x.dwa = 'two!';
-	x.trzy = 'three!';
-	x.piec = 'five';
-	x.szesc = 'six';
-
-	a.deep(t(x), { raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
-		piec: 'five', szesc: 'six', get: 'two!' }, "Deep object");
-
-	a.deep(t({ marko: 'raz', raz: 'foo' }, x, { szesc: 'elo', siedem: 'bibg' }),
-		{ marko: 'raz', raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four',
-			piec: 'five', szesc: 'elo', siedem: 'bibg', get: 'two!' }, "Multiple options");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js
deleted file mode 100644
index 839857eab3dd85..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var getPropertyNames = require('../../object/get-property-names')
-  , isPlainObject    = require('../../object/is-plain-object');
-
-module.exports = function (t, a) {
-	var x = t();
-	a(isPlainObject(x), true, "Plain object");
-	a.deep(getPropertyNames(x), [], "No properties");
-	x.foo = 'bar';
-	a.deep(getPropertyNames(x), ['foo'], "Extensible");
-
-	a.deep(t('raz', 'dwa', 3), { raz: true, dwa: true, 3: true },
-		"Arguments handling");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js
deleted file mode 100644
index d30cdefe68b8b6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var obj = { foo: { bar: { lorem: 12  } } };
-	a(t(obj), obj, "No props");
-	a(t(obj, 'foo'), obj.foo, "One");
-	a(t(obj, 'raz'), undefined, "One: Fail");
-	a(t(obj, 'foo', 'bar'), obj.foo.bar, "Two");
-	a(t(obj, 'dsd', 'raz'), undefined, "Two: Fail #1");
-	a(t(obj, 'foo', 'raz'), undefined, "Two: Fail #2");
-	a(t(obj, 'foo', 'bar', 'lorem'), obj.foo.bar.lorem, "Three");
-	a(t(obj, 'dsd', 'raz', 'fef'), undefined, "Three: Fail #1");
-	a(t(obj, 'foo', 'raz', 'asdf'), undefined, "Three: Fail #2");
-	a(t(obj, 'foo', 'bar', 'asd'), undefined, "Three: Fail #3");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js
deleted file mode 100644
index 43eed6a8616f9a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var fn = function (raz, dwa) { return raz + dwa; };
-	a(t(), 'undefined', "Undefined");
-	a(t(null), 'null', "Null");
-	a(t(null), 'null', "Null");
-	a(t('raz'), '"raz"', "String");
-	a(t('raz"ddwa\ntrzy'), '"raz\\"ddwa\\ntrzy"', "String with escape");
-	a(t(false), 'false', "Booelean");
-	a(t(fn), String(fn), "Function");
-
-	a(t(/raz-dwa/g), '/raz-dwa/g', "RegExp");
-	a(t(new Date(1234567)), 'new Date(1234567)', "Date");
-	a(t([]), '[]', "Empty array");
-	a(t([undefined, false, null, 'raz"ddwa\ntrzy', fn, /raz/g, new Date(1234567), ['foo']]),
-		'[undefined,false,null,"raz\\"ddwa\\ntrzy",' + String(fn) +
-		',/raz/g,new Date(1234567),["foo"]]', "Rich Array");
-	a(t({}), '{}', "Empty object");
-	a(t({ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', piec: fn, szesc: /raz/g,
-		siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } }),
-		'{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy","piec":' + String(fn) +
-		',"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
-		'"dziewiec":{"foo":"bar","dwa":343}}', "Rich object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js
deleted file mode 100644
index 30b2ac4b96ba2e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var create        = require('../../../object/create')
-  , isImplemented = require('../../../object/set-prototype-of/is-implemented');
-
-module.exports = function (a) { a(isImplemented(create), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js
deleted file mode 100644
index aec2605cc2661a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var create = require('../../../object/create')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-
-	if (t === null) return;
-	a(t(x, y), x, "Return self object");
-	a(getPrototypeOf(x), y, "Object");
-	a.throws(function () { t(x); }, TypeError, "Undefined");
-	a.throws(function () { t('foo'); }, TypeError, "Primitive");
-	a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
-	x = create(null);
-	a.h1("Change null prototype");
-	a(t(x, y), x, "Result");
-	a(getPrototypeOf(x), y, "Prototype");
-	a.h1("Set null prototype");
-	a(t(y, null), y, "Result");
-	a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js
deleted file mode 100644
index aec2605cc2661a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var create = require('../../../object/create')
-
-  , getPrototypeOf = Object.getPrototypeOf;
-
-module.exports = function (t, a) {
-	var x = {}, y = {};
-
-	if (t === null) return;
-	a(t(x, y), x, "Return self object");
-	a(getPrototypeOf(x), y, "Object");
-	a.throws(function () { t(x); }, TypeError, "Undefined");
-	a.throws(function () { t('foo'); }, TypeError, "Primitive");
-	a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
-	x = create(null);
-	a.h1("Change null prototype");
-	a(t(x, y), x, "Result");
-	a(getPrototypeOf(x), y, "Prototype");
-	a.h1("Set null prototype");
-	a(t(y, null), y, "Result");
-	a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js
deleted file mode 100644
index 490431e7acd543..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var o = { 1: 1, 2: 2, 3: 3 };
-
-module.exports = function (t, a) {
-	var o2 = {}, i = 0;
-	t(o, function (value, name) {
-		o2[name] = value;
-		return false;
-	});
-	a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
-
-	a(t(o, function () {
-		++i;
-		return true;
-	}), true, "Succeeds");
-	a(i, 1, "Stops iteration after condition is met");
-
-	a(t(o, function () {
-		return false;
-	}), false, "Fails");
-
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js
deleted file mode 100644
index 1f4beef7eae835..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var o = { 1: 1, 2: 2, 3: 3 }, o1 = {}
-	  , o2 = t(o, function (value, name, self) {
-		a(self, o, "Self");
-		a(this, o1, "Scope");
-		return value + Number(name);
-	}, o1);
-	a.deep(o2, [2, 4, 6]);
-
-	t(o).sort().forEach(function (item) {
-		a.deep(item, [item[0], o[item[0]]], "Default");
-	});
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js
deleted file mode 100644
index 405eef112ff76e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var fn = function (raz, dwa) { return raz + dwa; };
-	a(t('undefined'), undefined, "Undefined");
-	a(t('null'), null, "Null");
-	a(t('"raz"'), 'raz', "String");
-	a(t('"raz\\"ddwa\\ntrzy"'), 'raz"ddwa\ntrzy', "String with escape");
-	a(t('false'), false, "Booelean");
-	a(String(t(String(fn))), String(fn), "Function");
-
-	a.deep(t('/raz-dwa/g'), /raz-dwa/g, "RegExp");
-	a.deep(t('new Date(1234567)'), new Date(1234567), "Date");
-	a.deep(t('[]'), [], "Empty array");
-	a.deep(t('[undefined,false,null,"raz\\"ddwa\\ntrzy",/raz/g,new Date(1234567),["foo"]]'),
-		[undefined, false, null, 'raz"ddwa\ntrzy', /raz/g, new Date(1234567), ['foo']], "Rich Array");
-	a.deep(t('{}'), {}, "Empty object");
-	a.deep(t('{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy",' +
-		'"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' +
-		'"dziewiec":{"foo":"bar","dwa":343}}'),
-		{ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', szesc: /raz/g,
-			siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } },
-		"Rich object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js
deleted file mode 100644
index b40540b6ba61b0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var f = function () {};
-	a(t(f), f, "Function");
-	a.throws(function () {
-		t({});
-	}, "Not Function");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js
deleted file mode 100644
index eaa8e7bcb364b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "''");
-	a(t(x = {}), x, "Object");
-	a(t(x = function () {}), x, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-	a(t(x = new Date()), x, "Date");
-
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js
deleted file mode 100644
index f1eeafa9778863..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var numIsNaN = require('../../number/is-nan');
-
-module.exports = function (t, a) {
-	var x;
-	a(t(0), 0, "0");
-	a(t(false), false, "false");
-	a(t(''), '', "''");
-	a(numIsNaN(t(NaN)), true, "NaN");
-	a(t(x = {}), x, "{}");
-
-	a.throws(function () {
-		t();
-	}, "Undefined");
-	a.throws(function () {
-		t(null);
-	}, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js
deleted file mode 100644
index 2f3e31b442ebcb..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a.throws(function () { t(''); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js
deleted file mode 100644
index 53bd11249e3d04..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(0); }, TypeError, "0");
-	a.throws(function () { t(false); }, TypeError, "false");
-	a(t(''), '', "''");
-	a.throws(function () { t({}); }, TypeError, "Plain Object");
-	a.throws(function () { t(function () {}); }, TypeError, "Function");
-	a(t(x = new String('raz')), x, "String object"); //jslint: ignore
-
-	a(t(x = { length: 1 }), x, "Array like");
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "null");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js
deleted file mode 100644
index ae9bd17a59a028..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a(t(0), "0");
-	a(t(false), "false");
-	a(t(''), "");
-	a(t({}), String({}), "Object");
-	a(t(x = function () {}), String(x), "Function");
-	a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
-	a(t(x = new Date()), String(x), "Date");
-
-	a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js
deleted file mode 100644
index 4a46bb521900db..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var x;
-	a(t(), 'undefined', "Undefined");
-	a(t(null), 'null', "Null");
-	a(t(0), "0");
-	a(t(false), "false");
-	a(t(''), "");
-	a(t({}), String({}), "Object");
-	a(t(x = function () {}), String(x), "Function");
-	a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore
-	a(t(x = new Date()), String(x), "Date");
-
-	a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js
deleted file mode 100644
index ca2bd650615889..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var indexTest = require('tad/lib/utils/index-test')
-
-  , path = require('path').resolve(__dirname, '../../../reg-exp/#');
-
-module.exports = function (t, a, d) {
-	indexTest(indexTest.readDir(path).aside(function (data) {
-		delete data.sticky;
-		delete data.unicode;
-	}))(t, a, d);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
deleted file mode 100644
index e154ac2916557f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var re;
-	a(t.call(/raz/), false, "Normal");
-	a(t.call(/raz/g), false, "Global");
-	try { re = new RegExp('raz', 'y'); } catch (ignore) {}
-	if (!re) return;
-	a(t.call(re), true, "Sticky");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
deleted file mode 100644
index 2ffb9e869bd6a3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var re;
-	a(t.call(/raz/), false, "Normal");
-	a(t.call(/raz/g), false, "Global");
-	try { re = new RegExp('raz', 'u'); } catch (ignore) {}
-	if (!re) return;
-	a(t.call(re), true, "Unicode");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js
deleted file mode 100644
index 89825a45f6148d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/match/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js
deleted file mode 100644
index 5249139fff2277..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var result = ['foo'];
-	result.index = 0;
-	result.input = 'foobar';
-	a.deep(t.call(/foo/, 'foobar'), result);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
deleted file mode 100644
index c32b23a6d03e79..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/replace/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
deleted file mode 100644
index 2b378fd594e2ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(/foo/, 'foobar', 'mar'), 'marbar');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js
deleted file mode 100644
index ff1b8087f2c697..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/search/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js
deleted file mode 100644
index 596bcdb92ed203..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(/foo/, 'barfoo'), 3);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js
deleted file mode 100644
index 1cee441806c065..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/split/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js
deleted file mode 100644
index 6a95cd03d6ce68..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a.deep(t.call(/\|/, 'bar|foo'), ['bar', 'foo']);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
deleted file mode 100644
index d94e7b98d8fe46..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/sticky/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
deleted file mode 100644
index 9b1aa0f2ab992d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../reg-exp/#/unicode/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js
deleted file mode 100644
index 5b00f67f28ce45..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var str = "(?:^te|er)s{2}t\\[raz]+$";
-	a(RegExp('^' + t(str) + '$').test(str), true);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
deleted file mode 100644
index 785ca28c2ecb2c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t('arar'), false, "String");
-	a(t(12), false, "Number");
-	a(t(true), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), false, "String object");
-	a(t({}), false, "Plain object");
-	a(t(/a/), true, "Regular expression");
-	a(t(new RegExp('a')), true, "Regular expression via constructor");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
deleted file mode 100644
index cd12cf126a609a..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var r = /raz/;
-	a(t(r), r, "Direct");
-	r = new RegExp('foo');
-	a(t(r), r, "Constructor");
-	a.throws(function () {
-		t({});
-	}, "Object");
-	a.throws(function () {
-		t(function () {});
-	}, "Function");
-	a.throws(function () {
-		t({ exec: function () { return 20; } });
-	}, "Plain object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js
deleted file mode 100644
index 09bf3361acd6a2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/@@iterator/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js
deleted file mode 100644
index 3b0e0b7547ece9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	var it = t.call('r💩z');
-	a.deep(it.next(), { done: false, value: 'r' }, "#1");
-	a.deep(it.next(), { done: false, value: '💩' }, "#2");
-	a.deep(it.next(), { done: false, value: 'z' }, "#3");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js
deleted file mode 100644
index 2447a9f64d5d83..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// See tests at https://github.com/mathiasbynens/String.prototype.at
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.length, 1, "Length");
-
-	a.h1("BMP");
-	a(t.call('abc\uD834\uDF06def', -Infinity), '', "-Infinity");
-	a(t.call('abc\uD834\uDF06def', -1), '', "-1");
-	a(t.call('abc\uD834\uDF06def', -0), 'a', "-0");
-	a(t.call('abc\uD834\uDF06def', +0), 'a', "+0");
-	a(t.call('abc\uD834\uDF06def', 1), 'b', "1");
-	a(t.call('abc\uD834\uDF06def', 3), '\uD834\uDF06', "3");
-	a(t.call('abc\uD834\uDF06def', 4), '\uDF06', "4");
-	a(t.call('abc\uD834\uDF06def', 5), 'd', "5");
-	a(t.call('abc\uD834\uDF06def', 42), '', "42");
-	a(t.call('abc\uD834\uDF06def', +Infinity), '', "+Infinity");
-	a(t.call('abc\uD834\uDF06def', null), 'a', "null");
-	a(t.call('abc\uD834\uDF06def', undefined), 'a', "undefined");
-	a(t.call('abc\uD834\uDF06def'), 'a', "No argument");
-	a(t.call('abc\uD834\uDF06def', false), 'a', "false");
-	a(t.call('abc\uD834\uDF06def', NaN), 'a', "NaN");
-	a(t.call('abc\uD834\uDF06def', ''), 'a', "Empty string");
-	a(t.call('abc\uD834\uDF06def', '_'), 'a', "_");
-	a(t.call('abc\uD834\uDF06def', '1'), 'b', "'1'");
-	a(t.call('abc\uD834\uDF06def', []), 'a', "[]");
-	a(t.call('abc\uD834\uDF06def', {}), 'a', "{}");
-	a(t.call('abc\uD834\uDF06def', -0.9), 'a', "-0.9");
-	a(t.call('abc\uD834\uDF06def', 1.9), 'b', "1.9");
-	a(t.call('abc\uD834\uDF06def', 7.9), 'f', "7.9");
-	a(t.call('abc\uD834\uDF06def', Math.pow(2, 32)), '', "Big number");
-
-	a.h1("Astral symbol");
-	a(t.call('\uD834\uDF06def', -Infinity), '', "-Infinity");
-	a(t.call('\uD834\uDF06def', -1), '', "-1");
-	a(t.call('\uD834\uDF06def', -0), '\uD834\uDF06', "-0");
-	a(t.call('\uD834\uDF06def', +0), '\uD834\uDF06', "+0");
-	a(t.call('\uD834\uDF06def', 1), '\uDF06', "1");
-	a(t.call('\uD834\uDF06def', 2), 'd', "2");
-	a(t.call('\uD834\uDF06def', 3), 'e', "3");
-	a(t.call('\uD834\uDF06def', 4), 'f', "4");
-	a(t.call('\uD834\uDF06def', 42), '', "42");
-	a(t.call('\uD834\uDF06def', +Infinity), '', "+Infinity");
-	a(t.call('\uD834\uDF06def', null), '\uD834\uDF06', "null");
-	a(t.call('\uD834\uDF06def', undefined), '\uD834\uDF06', "undefined");
-	a(t.call('\uD834\uDF06def'), '\uD834\uDF06', "No arguments");
-	a(t.call('\uD834\uDF06def', false), '\uD834\uDF06', "false");
-	a(t.call('\uD834\uDF06def', NaN), '\uD834\uDF06', "NaN");
-	a(t.call('\uD834\uDF06def', ''), '\uD834\uDF06', "Empty string");
-	a(t.call('\uD834\uDF06def', '_'), '\uD834\uDF06', "_");
-	a(t.call('\uD834\uDF06def', '1'), '\uDF06', "'1'");
-
-	a.h1("Lone high surrogates");
-	a(t.call('\uD834abc', -Infinity), '', "-Infinity");
-	a(t.call('\uD834abc', -1), '',  "-1");
-	a(t.call('\uD834abc', -0), '\uD834', "-0");
-	a(t.call('\uD834abc', +0), '\uD834', "+0");
-	a(t.call('\uD834abc', 1), 'a', "1");
-	a(t.call('\uD834abc', 42), '', "42");
-	a(t.call('\uD834abc', +Infinity), '', "Infinity");
-	a(t.call('\uD834abc', null), '\uD834', "null");
-	a(t.call('\uD834abc', undefined), '\uD834', "undefined");
-	a(t.call('\uD834abc'), '\uD834', "No arguments");
-	a(t.call('\uD834abc', false), '\uD834', "false");
-	a(t.call('\uD834abc', NaN), '\uD834', "NaN");
-	a(t.call('\uD834abc', ''), '\uD834', "Empty string");
-	a(t.call('\uD834abc', '_'), '\uD834', "_");
-	a(t.call('\uD834abc', '1'), 'a', "'a'");
-
-	a.h1("Lone low surrogates");
-	a(t.call('\uDF06abc', -Infinity), '', "-Infinity");
-	a(t.call('\uDF06abc', -1), '', "-1");
-	a(t.call('\uDF06abc', -0), '\uDF06', "-0");
-	a(t.call('\uDF06abc', +0), '\uDF06', "+0");
-	a(t.call('\uDF06abc', 1), 'a', "1");
-	a(t.call('\uDF06abc', 42), '', "42");
-	a(t.call('\uDF06abc', +Infinity), '', "+Infinity");
-	a(t.call('\uDF06abc', null), '\uDF06', "null");
-	a(t.call('\uDF06abc', undefined), '\uDF06', "undefined");
-	a(t.call('\uDF06abc'), '\uDF06', "No arguments");
-	a(t.call('\uDF06abc', false), '\uDF06', "false");
-	a(t.call('\uDF06abc', NaN), '\uDF06', "NaN");
-	a(t.call('\uDF06abc', ''), '\uDF06', "Empty string");
-	a(t.call('\uDF06abc', '_'), '\uDF06', "_");
-	a(t.call('\uDF06abc', '1'), 'a', "'1'");
-
-	a.h1("Context");
-	a.throws(function () { t.call(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t.call(undefined, 4); }, TypeError,
-		"Undefined + argument");
-	a.throws(function () { t.call(null); }, TypeError, "Null");
-	a.throws(function () { t.call(null, 4); }, TypeError, "Null + argument");
-	a(t.call(42, 0), '4', "Number #1");
-	a(t.call(42, 1), '2', "Number #2");
-	a(t.call({ toString: function () { return 'abc'; } }, 2), 'c', "Object");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
deleted file mode 100644
index 8b47a8158a29d3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js
deleted file mode 100644
index fa11ff8eeff856..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz'), 'Raz', "Word");
-	a(t.call('BLA'), 'BLA', "Uppercase");
-	a(t.call(''), '', "Empty");
-	a(t.call('a'), 'A', "One letter");
-	a(t.call('this is a test'), 'This is a test', "Sentence");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
deleted file mode 100644
index 01a90c39ce8307..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call("AA", "aa"), 0, "Same");
-	a.ok(t.call("Amber", "zebra") < 0, "Less");
-	a.ok(t.call("Zebra", "amber") > 0, "Greater");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js
deleted file mode 100644
index 5e33cd715ff47b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-var isImplemented =
-	require('../../../../string/#/code-point-at/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js
deleted file mode 100644
index 0df4751c564421..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js
+++ /dev/null
@@ -1,81 +0,0 @@
-// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt
-//             /blob/master/tests/tests.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.length, 1, "Length");
-
-	// String that starts with a BMP symbol
-	a(t.call('abc\uD834\uDF06def', ''), 0x61);
-	a(t.call('abc\uD834\uDF06def', '_'), 0x61);
-	a(t.call('abc\uD834\uDF06def'), 0x61);
-	a(t.call('abc\uD834\uDF06def', -Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', -1), undefined);
-	a(t.call('abc\uD834\uDF06def', -0), 0x61);
-	a(t.call('abc\uD834\uDF06def', 0), 0x61);
-	a(t.call('abc\uD834\uDF06def', 3), 0x1D306);
-	a(t.call('abc\uD834\uDF06def', 4), 0xDF06);
-	a(t.call('abc\uD834\uDF06def', 5), 0x64);
-	a(t.call('abc\uD834\uDF06def', 42), undefined);
-	a(t.call('abc\uD834\uDF06def', Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', Infinity), undefined);
-	a(t.call('abc\uD834\uDF06def', NaN), 0x61);
-	a(t.call('abc\uD834\uDF06def', false), 0x61);
-	a(t.call('abc\uD834\uDF06def', null), 0x61);
-	a(t.call('abc\uD834\uDF06def', undefined), 0x61);
-
-	// String that starts with an astral symbol
-	a(t.call('\uD834\uDF06def', ''), 0x1D306);
-	a(t.call('\uD834\uDF06def', '1'), 0xDF06);
-	a(t.call('\uD834\uDF06def', '_'), 0x1D306);
-	a(t.call('\uD834\uDF06def'), 0x1D306);
-	a(t.call('\uD834\uDF06def', -1), undefined);
-	a(t.call('\uD834\uDF06def', -0), 0x1D306);
-	a(t.call('\uD834\uDF06def', 0), 0x1D306);
-	a(t.call('\uD834\uDF06def', 1), 0xDF06);
-	a(t.call('\uD834\uDF06def', 42), undefined);
-	a(t.call('\uD834\uDF06def', false), 0x1D306);
-	a(t.call('\uD834\uDF06def', null), 0x1D306);
-	a(t.call('\uD834\uDF06def', undefined), 0x1D306);
-
-	// Lone high surrogates
-	a(t.call('\uD834abc', ''), 0xD834);
-	a(t.call('\uD834abc', '_'), 0xD834);
-	a(t.call('\uD834abc'), 0xD834);
-	a(t.call('\uD834abc', -1), undefined);
-	a(t.call('\uD834abc', -0), 0xD834);
-	a(t.call('\uD834abc', 0), 0xD834);
-	a(t.call('\uD834abc', false), 0xD834);
-	a(t.call('\uD834abc', NaN), 0xD834);
-	a(t.call('\uD834abc', null), 0xD834);
-	a(t.call('\uD834abc', undefined), 0xD834);
-
-	// Lone low surrogates
-	a(t.call('\uDF06abc', ''), 0xDF06);
-	a(t.call('\uDF06abc', '_'), 0xDF06);
-	a(t.call('\uDF06abc'), 0xDF06);
-	a(t.call('\uDF06abc', -1), undefined);
-	a(t.call('\uDF06abc', -0), 0xDF06);
-	a(t.call('\uDF06abc', 0), 0xDF06);
-	a(t.call('\uDF06abc', false), 0xDF06);
-	a(t.call('\uDF06abc', NaN), 0xDF06);
-	a(t.call('\uDF06abc', null), 0xDF06);
-	a(t.call('\uDF06abc', undefined), 0xDF06);
-
-	a.throws(function () { t.call(undefined); }, TypeError);
-	a.throws(function () { t.call(undefined, 4); }, TypeError);
-	a.throws(function () { t.call(null); }, TypeError);
-	a.throws(function () { t.call(null, 4); }, TypeError);
-	a(t.call(42, 0), 0x34);
-	a(t.call(42, 1), 0x32);
-	a(t.call({ toString: function () { return 'abc'; } }, 2), 0x63);
-
-	a.throws(function () { t.apply(undefined); }, TypeError);
-	a.throws(function () { t.apply(undefined, [4]); }, TypeError);
-	a.throws(function () { t.apply(null); }, TypeError);
-	a.throws(function () { t.apply(null, [4]); }, TypeError);
-	a(t.apply(42, [0]), 0x34);
-	a(t.apply(42, [1]), 0x32);
-	a(t.apply({ toString: function () { return 'abc'; } }, [2]), 0x63);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js
deleted file mode 100644
index 220f50d4672f13..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/contains/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js
deleted file mode 100644
index a0ea4db20812e5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz', ''), true, "Empty");
-	a(t.call('', ''), true, "Both Empty");
-	a(t.call('raz', 'raz'), true, "Same");
-	a(t.call('razdwa', 'raz'), true, "Starts with");
-	a(t.call('razdwa', 'dwa'), true, "Ends with");
-	a(t.call('razdwa', 'zdw'), true, "In middle");
-	a(t.call('', 'raz'), false, "Something in empty");
-	a(t.call('az', 'raz'), false, "Longer");
-	a(t.call('azasdfasdf', 'azff'), false, "Not found");
-	a(t.call('razdwa', 'raz', 1), false, "Position");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js
deleted file mode 100644
index 93bd2ddcd6dc20..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/ends-with/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js
deleted file mode 100644
index e4b93c407bc2b5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// In some parts copied from:
-// http://closure-library.googlecode.com/svn/trunk/closure/goog/
-// string/string_test.html
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('abc', ''), true, "Empty needle");
-	a(t.call('abcd', 'cd'), true, "Ends with needle");
-	a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
-	a(t.call('abcd', 'ab'), false, "Doesn't end with needle");
-	a(t.call('abc', 'defg'), false, "Length trick");
-	a(t.call('razdwa', 'zd', 3), false, "Position: false");
-	a(t.call('razdwa', 'zd', 4), true, "Position: true");
-	a(t.call('razdwa', 'zd', 5), false, "Position: false #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
deleted file mode 100644
index bd7ded4befbc7d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js
deleted file mode 100644
index eb92b36f5438d6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('ra\nzz', ''), 'ra\nzz', "Empty");
-	a(t.call('ra\nzz', '\t', 3), '\t\t\tra\n\t\t\tzz', "String repeat");
-	a(t.call('ra\nzz\nsss\nfff\n', '\t'), '\tra\n\tzz\n\tsss\n\tfff\n',
-		"Multi-line");
-	a(t.call('ra\n\nzz\n', '\t'), '\tra\n\n\tzz\n', "Don't touch empty lines");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js
deleted file mode 100644
index ad36a213c6053e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call(''), null, "Null");
-	a(t.call('abcdef'), 'f', "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js
deleted file mode 100644
index c741addb0055a9..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t[0], 'object'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js
deleted file mode 100644
index 4886c9b834285b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/normalize/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js
deleted file mode 100644
index 28e27f595247be..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js
-
-'use strict';
-
-var str = 'äiti';
-
-module.exports = function (t, a) {
-	a(t.call(str), "\u00e4iti");
-	a(t.call(str, "NFC"), "\u00e4iti");
-	a(t.call(str, "NFD"), "a\u0308iti");
-	a(t.call(str, "NFKC"), "\u00e4iti");
-	a(t.call(str, "NFKD"), "a\u0308iti");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js
deleted file mode 100644
index 28c3fcaa10c4da..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-var partial = require('../../../function/#/partial');
-
-module.exports = {
-	Left: function (t, a) {
-		t = partial.call(t, 'x', 5);
-
-		a(t.call('yy'), 'xxxyy');
-		a(t.call(''), 'xxxxx', "Empty string");
-
-		a(t.call('yyyyy'), 'yyyyy', 'Equal length');
-		a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
-	},
-	Right: function (t, a) {
-		t = partial.call(t, 'x', -5);
-
-		a(t.call('yy'), 'yyxxx');
-		a(t.call(''), 'xxxxx', "Empty string");
-
-		a(t.call('yyyyy'), 'yyyyy', 'Equal length');
-		a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js
deleted file mode 100644
index a425c87a40553b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
-	a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
-	a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
-
-	a(t.call('$raz$$dwa$trzy$', '$', '&&'), '&&raz&&&&dwa&&trzy&&', "Multi");
-	a(t.call('$raz$$dwa$$$$trzy$', '$$', '&'), '$raz&dwa&&trzy$',
-		"Multi many chars");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js
deleted file mode 100644
index 54522ed749fe37..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic");
-	a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts");
-	a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js
deleted file mode 100644
index 7ff65a811068b4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/repeat/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js
deleted file mode 100644
index 7e0d077ec4bdb6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('a', 0), '', "Empty");
-	a(t.call('a', 1), 'a', "1");
-	a(t.call('\t', 5), '\t\t\t\t\t', "Whitespace");
-	a(t.call('raz', 3), 'razrazraz', "Many chars");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js
deleted file mode 100644
index fc8490fc916ac3..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../../string/#/starts-with/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js
deleted file mode 100644
index e0e123b324e115..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Inspired and in some parts copied from:
-// http://closure-library.googlecode.com/svn/trunk/closure/goog
-// /string/string_test.html
-
-'use strict';
-
-module.exports = function (t, a) {
-	a(t.call('abc', ''), true, "Empty needle");
-	a(t.call('abcd', 'ab'), true, "Starts with needle");
-	a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
-	a(t.call('abcd', 'bcde', 1), false, "Needle larger than haystack");
-	a(!t.call('abcd', 'cd'), true, "Doesn't start with needle");
-	a(t.call('abcd', 'bc', 1), true, "Position");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js
deleted file mode 100644
index bb5561ee45bb59..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	t = t({ a: 'A', aa: 'B', ab: 'C', b: 'D',
-		c: function () { return ++this.a; } });
-	a(t.call({ a: 0 }, ' %a%aab%abb%b\\%aa%ab%c%c '), ' ABbCbD%aaC12 ');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js
deleted file mode 100644
index 0aceb97efdcf36..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../string/from-code-point/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js
deleted file mode 100644
index 88cda3d6364719..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master
-//             /tests/tests.js
-
-'use strict';
-
-var pow = Math.pow;
-
-module.exports = function (t, a) {
-	var counter, result;
-
-	a(t.length, 1, "Length");
-	a(String.propertyIsEnumerable('fromCodePoint'), false, "Not enumerable");
-
-	a(t(''), '\0', "Empty string");
-	a(t(), '', "No arguments");
-	a(t(-0), '\0', "-0");
-	a(t(0), '\0', "0");
-	a(t(0x1D306), '\uD834\uDF06', "Unicode");
-	a(t(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07', "Complex unicode");
-	a(t(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07', "Complex");
-	a(t(false), '\0', "false");
-	a(t(null), '\0', "null");
-
-	a.throws(function () { t('_'); }, RangeError, "_");
-	a.throws(function () { t(Infinity); }, RangeError, "Infinity");
-	a.throws(function () { t(-Infinity); }, RangeError, "-Infinity");
-	a.throws(function () { t(-1); }, RangeError, "-1");
-	a.throws(function () { t(0x10FFFF + 1); }, RangeError, "Range error #1");
-	a.throws(function () { t(3.14); }, RangeError, "Range error #2");
-	a.throws(function () { t(3e-2); }, RangeError, "Range error #3");
-	a.throws(function () { t(-Infinity); }, RangeError, "Range error #4");
-	a.throws(function () { t(+Infinity); }, RangeError, "Range error #5");
-	a.throws(function () { t(NaN); }, RangeError, "Range error #6");
-	a.throws(function () { t(undefined); }, RangeError, "Range error #7");
-	a.throws(function () { t({}); }, RangeError, "Range error #8");
-	a.throws(function () { t(/re/); }, RangeError, "Range error #9");
-
-	counter = pow(2, 15) * 3 / 2;
-	result = [];
-	while (--counter >= 0) result.push(0); // one code unit per symbol
-	t.apply(null, result); // must not throw
-
-	counter = pow(2, 15) * 3 / 2;
-	result = [];
-	while (--counter >= 0) result.push(0xFFFF + 1); // two code units per symbol
-	t.apply(null, result); // must not throw
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js
deleted file mode 100644
index 32f595829168ee..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) {
-	a(t(null), false, "Null");
-	a(t(''), true, "Empty string");
-	a(t(12), false, "Number");
-	a(t(false), false, "Boolean");
-	a(t(new Date()), false, "Date");
-	a(t(new String('raz')), true, "String object");
-	a(t('asdfaf'), true, "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js
deleted file mode 100644
index 6791ac266e7530..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/);
-
-module.exports = function (t, a) {
-	a(typeof t(), 'string');
-	a.ok(t().length > 7);
-	a.not(t(), t());
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-	a.ok(isValidFormat(t()));
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js
deleted file mode 100644
index 59416de3af53ad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var isImplemented = require('../../../string/raw/is-implemented');
-
-module.exports = function (a) { a(isImplemented(), true); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js
deleted file mode 100644
index 2e0bfa3249d806..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./shim');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js
deleted file mode 100644
index 025ed780455667..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Partially taken from:
-// https://github.com/paulmillr/es6-shim/blob/master/test/string.js
-
-'use strict';
-
-module.exports = function (t, a) {
-	var callSite = [];
-
-	callSite.raw = ["The total is ", " ($", " with tax)"];
-	a(t(callSite, '{total}', '{total * 1.01}'),
-		'The total is {total} (${total * 1.01} with tax)');
-
-	callSite.raw = [];
-	a(t(callSite, '{total}', '{total * 1.01}'), '');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js
deleted file mode 100644
index 6dc1543b354531..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , d              = require('d')
-  , Iterator       = require('../')
-  , validIterable  = require('../valid-iterable')
-
-  , push = Array.prototype.push
-  , defineProperties = Object.defineProperties
-  , IteratorChain;
-
-IteratorChain = function (iterators) {
-	defineProperties(this, {
-		__iterators__: d('', iterators),
-		__current__: d('w', iterators.shift())
-	});
-};
-if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator);
-
-IteratorChain.prototype = Object.create(Iterator.prototype, {
-	constructor: d(IteratorChain),
-	next: d(function () {
-		var result;
-		if (!this.__current__) return { done: true, value: undefined };
-		result = this.__current__.next();
-		while (result.done) {
-			this.__current__ = this.__iterators__.shift();
-			if (!this.__current__) return { done: true, value: undefined };
-			result = this.__current__.next();
-		}
-		return result;
-	})
-});
-
-module.exports = function () {
-	var iterators = [this];
-	push.apply(iterators, arguments);
-	iterators.forEach(validIterable);
-	return new IteratorChain(iterators);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.lint b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.lint
deleted file mode 100644
index cf54d815684b2f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.lint
+++ /dev/null
@@ -1,11 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml
deleted file mode 100644
index 02c277cf565442..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-iterator@medikoo.com
-
-script: "npm test && npm run lint"
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES
deleted file mode 100644
index a2d1ec7c2af31c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES
+++ /dev/null
@@ -1,28 +0,0 @@
-v0.1.3  --  2015.02.02
-* Update dependencies
-* Fix spelling of LICENSE
-
-v0.1.2  --  2014.11.19
-* Optimise internal `_next` to not verify internal's list length at all times
-  (#2 thanks @RReverser)
-* Fix documentation examples
-* Configure lint scripts
-
-v0.1.1  --  2014.04.29
-* Fix es6-symbol dependency version
-
-v0.1.0  --  2014.04.29
-* Assure strictly npm hosted dependencies
-* Remove sparse arrays dedicated handling (as per spec)
-* Add: isIterable, validIterable and chain (method)
-* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from)
-* Add break possiblity to 'forOf' via 'doBreak' function argument
-* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator)
-* Provide @@toStringTag symbol
-* When available rely on @@iterator symbol
-* Remove 32bit integer maximum list length restriction
-* Improve Iterator internals
-* Update to use latest version of dependencies
-
-v0.0.0  --  2013.10.12
-Initial (dev version)
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE
deleted file mode 100644
index 04724a3ab1b70b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/README.md
deleted file mode 100644
index 288373da7ab506..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/README.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# es6-iterator
-## ECMAScript 6 Iterator interface
-
-### Installation
-
-	$ npm install es6-iterator
-	
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## API
-
-### Constructors
-
-#### Iterator(list) _(es6-iterator)_
-
-Abstract Iterator interface. Meant for extensions and not to be used on its own.
-
-Accepts any _list_ object (technically object with numeric _length_ property).
-
-_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_
-
-```javascript
-var Iterator = require('es6-iterator')
-var iterator = new Iterator([1, 2, 3]);
-
-iterator.next(); // { value: 1, done: false }
-iterator.next(); // { value: 2, done: false }
-iterator.next(); // { value: 3, done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-
-#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_
-
-Dedicated for arrays and array-likes. Supports three iteration kinds:
-* __value__ _(default)_ - Iterates values
-* __key__ - Iterates indexes
-* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.
-
-
-```javascript
-var ArrayIterator = require('es6-iterator/array')
-var iterator = new ArrayIterator([1, 2, 3], 'key+value');
-
-iterator.next(); // { value: [0, 1], done: false }
-iterator.next(); // { value: [1, 2], done: false }
-iterator.next(); // { value: [2, 3], done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-May also be used for _arguments_ objects:
-
-```javascript
-(function () {
-  var iterator = new ArrayIterator(arguments);
-
-  iterator.next(); // { value: 1, done: false }
-  iterator.next(); // { value: 2, done: false }
-  iterator.next(); // { value: 3, done: false }
-  iterator.next(); // { value: undefined, done: true }
-}(1, 2, 3));
-```
-
-#### StringIterator(str) _(es6-iterator/string)_
-
-Assures proper iteration over unicode symbols.  
-See: http://mathiasbynens.be/notes/javascript-unicode
-
-```javascript
-var StringIterator = require('es6-iterator/string');
-var iterator = new StringIterator('f🙈o🙉o🙊');
-
-iterator.next(); // { value: 'f', done: false }
-iterator.next(); // { value: '🙈', done: false }
-iterator.next(); // { value: 'o', done: false }
-iterator.next(); // { value: '🙉', done: false }
-iterator.next(); // { value: 'o', done: false }
-iterator.next(); // { value: '🙊', done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-### Function utilities
-
-#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_
-
-Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.
-
-```
-var forOf = require('es6-iterator/for-of');
-var result = [];
-
-forOf('🙈🙉🙊', function (monkey) { result.push(monkey); });
-console.log(result); // ['🙈', '🙉', '🙊'];
-```
-
-Optionally you can break iteration at any point:
-
-```javascript
-var result = [];
-
-forOf([1,2,3,4]', function (val, doBreak) {
-  result.push(monkey);
-  if (val >= 3) doBreak();
-});
-console.log(result); // [1, 2, 3];
-```
-
-#### get(obj) _(es6-iterator/get)_
-
-Return iterator for any iterable object.
-
-```javascript
-var getIterator = require('es6-iterator/get');
-var iterator = get([1,2,3]);
-
-iterator.next(); // { value: 1, done: false }
-iterator.next(); // { value: 2, done: false }
-iterator.next(); // { value: 3, done: false }
-iterator.next(); // { value: undefined, done: true }
-```
-
-#### isIterable(obj) _(es6-iterator/is-iterable)_
-
-Whether _obj_ is iterable
-
-```javascript
-var isIterable = require('es6-iterator/is-iterable');
-
-isIterable(null); // false
-isIterable(true); // false
-isIterable('str'); // true
-isIterable(['a', 'r', 'r']); // true
-isIterable(new ArrayIterator([])); // true
-```
-
-#### validIterable(obj) _(es6-iterator/valid-iterable)_
-
-If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.
-
-### Method extensions
-
-#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_
-
-Chain multiple iterators into one.
-
-### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/array.js
deleted file mode 100644
index 885ad0a4fd7870..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/array.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-var setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , contains       = require('es5-ext/string/#/contains')
-  , d              = require('d')
-  , Iterator       = require('./')
-
-  , defineProperty = Object.defineProperty
-  , ArrayIterator;
-
-ArrayIterator = module.exports = function (arr, kind) {
-	if (!(this instanceof ArrayIterator)) return new ArrayIterator(arr, kind);
-	Iterator.call(this, arr);
-	if (!kind) kind = 'value';
-	else if (contains.call(kind, 'key+value')) kind = 'key+value';
-	else if (contains.call(kind, 'key')) kind = 'key';
-	else kind = 'value';
-	defineProperty(this, '__kind__', d('', kind));
-};
-if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);
-
-ArrayIterator.prototype = Object.create(Iterator.prototype, {
-	constructor: d(ArrayIterator),
-	_resolve: d(function (i) {
-		if (this.__kind__ === 'value') return this.__list__[i];
-		if (this.__kind__ === 'key+value') return [i, this.__list__[i]];
-		return i;
-	}),
-	toString: d(function () { return '[object Array Iterator]'; })
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js
deleted file mode 100644
index 111f5522735204..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-var callable = require('es5-ext/object/valid-callable')
-  , isString = require('es5-ext/string/is-string')
-  , get      = require('./get')
-
-  , isArray = Array.isArray, call = Function.prototype.call;
-
-module.exports = function (iterable, cb/*, thisArg*/) {
-	var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
-	if (isArray(iterable)) mode = 'array';
-	else if (isString(iterable)) mode = 'string';
-	else iterable = get(iterable);
-
-	callable(cb);
-	doBreak = function () { broken = true; };
-	if (mode === 'array') {
-		iterable.some(function (value) {
-			call.call(cb, thisArg, value, doBreak);
-			if (broken) return true;
-		});
-		return;
-	}
-	if (mode === 'string') {
-		l = iterable.length;
-		for (i = 0; i < l; ++i) {
-			char = iterable[i];
-			if ((i + 1) < l) {
-				code = char.charCodeAt(0);
-				if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i];
-			}
-			call.call(cb, thisArg, char, doBreak);
-			if (broken) break;
-		}
-		return;
-	}
-	result = iterable.next();
-
-	while (!result.done) {
-		call.call(cb, thisArg, result.value, doBreak);
-		if (broken) return;
-		result = iterable.next();
-	}
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/get.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/get.js
deleted file mode 100644
index 38230fd85a2101..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/get.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isString = require('es5-ext/string/is-string')
-  , ArrayIterator  = require('./array')
-  , StringIterator = require('./string')
-  , iterable       = require('./valid-iterable')
-  , iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (obj) {
-	if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol]();
-	if (isString(obj)) return new StringIterator(obj);
-	return new ArrayIterator(obj);
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/index.js
deleted file mode 100644
index 10fd08958f68c7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/index.js
+++ /dev/null
@@ -1,90 +0,0 @@
-'use strict';
-
-var clear    = require('es5-ext/array/#/clear')
-  , assign   = require('es5-ext/object/assign')
-  , callable = require('es5-ext/object/valid-callable')
-  , value    = require('es5-ext/object/valid-value')
-  , d        = require('d')
-  , autoBind = require('d/auto-bind')
-  , Symbol   = require('es6-symbol')
-
-  , defineProperty = Object.defineProperty
-  , defineProperties = Object.defineProperties
-  , Iterator;
-
-module.exports = Iterator = function (list, context) {
-	if (!(this instanceof Iterator)) return new Iterator(list, context);
-	defineProperties(this, {
-		__list__: d('w', value(list)),
-		__context__: d('w', context),
-		__nextIndex__: d('w', 0)
-	});
-	if (!context) return;
-	callable(context.on);
-	context.on('_add', this._onAdd);
-	context.on('_delete', this._onDelete);
-	context.on('_clear', this._onClear);
-};
-
-defineProperties(Iterator.prototype, assign({
-	constructor: d(Iterator),
-	_next: d(function () {
-		var i;
-		if (!this.__list__) return;
-		if (this.__redo__) {
-			i = this.__redo__.shift();
-			if (i !== undefined) return i;
-		}
-		if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
-		this._unBind();
-	}),
-	next: d(function () { return this._createResult(this._next()); }),
-	_createResult: d(function (i) {
-		if (i === undefined) return { done: true, value: undefined };
-		return { done: false, value: this._resolve(i) };
-	}),
-	_resolve: d(function (i) { return this.__list__[i]; }),
-	_unBind: d(function () {
-		this.__list__ = null;
-		delete this.__redo__;
-		if (!this.__context__) return;
-		this.__context__.off('_add', this._onAdd);
-		this.__context__.off('_delete', this._onDelete);
-		this.__context__.off('_clear', this._onClear);
-		this.__context__ = null;
-	}),
-	toString: d(function () { return '[object Iterator]'; })
-}, autoBind({
-	_onAdd: d(function (index) {
-		if (index >= this.__nextIndex__) return;
-		++this.__nextIndex__;
-		if (!this.__redo__) {
-			defineProperty(this, '__redo__', d('c', [index]));
-			return;
-		}
-		this.__redo__.forEach(function (redo, i) {
-			if (redo >= index) this.__redo__[i] = ++redo;
-		}, this);
-		this.__redo__.push(index);
-	}),
-	_onDelete: d(function (index) {
-		var i;
-		if (index >= this.__nextIndex__) return;
-		--this.__nextIndex__;
-		if (!this.__redo__) return;
-		i = this.__redo__.indexOf(index);
-		if (i !== -1) this.__redo__.splice(i, 1);
-		this.__redo__.forEach(function (redo, i) {
-			if (redo > index) this.__redo__[i] = --redo;
-		}, this);
-	}),
-	_onClear: d(function () {
-		if (this.__redo__) clear.call(this.__redo__);
-		this.__nextIndex__ = 0;
-	})
-})));
-
-defineProperty(Iterator.prototype, Symbol.iterator, d(function () {
-	return this;
-}));
-defineProperty(Iterator.prototype, Symbol.toStringTag, d('', 'Iterator'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js
deleted file mode 100644
index bbcf10492e1dc0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var isString       = require('es5-ext/string/is-string')
-  , iteratorSymbol = require('es6-symbol').iterator
-
-  , isArray = Array.isArray;
-
-module.exports = function (value) {
-	if (value == null) return false;
-	if (isArray(value)) return true;
-	if (isString(value)) return true;
-	return (typeof value[iteratorSymbol] === 'function');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/package.json b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/package.json
deleted file mode 100644
index b861638ad5d27b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
-  "name": "es6-iterator",
-  "version": "0.1.3",
-  "description": "Iterator abstraction based on ES6 specification",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "iterator",
-    "array",
-    "list",
-    "set",
-    "map",
-    "generator"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-iterator.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.5",
-    "es6-symbol": "~2.0.1"
-  },
-  "devDependencies": {
-    "event-emitter": "~0.3.3",
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "2addc362c6f139e4941cf4726eeb59e5960c5cef",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-iterator/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-iterator",
-  "_id": "es6-iterator@0.1.3",
-  "_shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e",
-  "_from": "es6-iterator@>=0.1.3 <0.2.0",
-  "_npmVersion": "2.3.0",
-  "_nodeVersion": "0.11.16",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e",
-    "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/string.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/string.js
deleted file mode 100644
index cdb39ea4e49931..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/string.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Thanks @mathiasbynens
-// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols
-
-'use strict';
-
-var setPrototypeOf = require('es5-ext/object/set-prototype-of')
-  , d              = require('d')
-  , Iterator       = require('./')
-
-  , defineProperty = Object.defineProperty
-  , StringIterator;
-
-StringIterator = module.exports = function (str) {
-	if (!(this instanceof StringIterator)) return new StringIterator(str);
-	str = String(str);
-	Iterator.call(this, str);
-	defineProperty(this, '__length__', d('', str.length));
-
-};
-if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);
-
-StringIterator.prototype = Object.create(Iterator.prototype, {
-	constructor: d(StringIterator),
-	_next: d(function () {
-		if (!this.__list__) return;
-		if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;
-		this._unBind();
-	}),
-	_resolve: d(function (i) {
-		var char = this.__list__[i], code;
-		if (this.__nextIndex__ === this.__length__) return char;
-		code = char.charCodeAt(0);
-		if ((code >= 0xD800) && (code <= 0xDBFF)) return char + this.__list__[this.__nextIndex__++];
-		return char;
-	}),
-	toString: d(function () { return '[object String Iterator]'; })
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js
deleted file mode 100644
index a414c66d78f44f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var Iterator = require('../../');
-
-module.exports = function (t, a) {
-	var i1 = new Iterator(['raz', 'dwa', 'trzy'])
-	  , i2 = new Iterator(['cztery', 'pięć', 'sześć'])
-	  , i3 = new Iterator(['siedem', 'osiem', 'dziewięć'])
-
-	  , iterator = t.call(i1, i2, i3);
-
-	a.deep(iterator.next(), { done: false, value: 'raz' }, "#1");
-	a.deep(iterator.next(), { done: false, value: 'dwa' }, "#2");
-	a.deep(iterator.next(), { done: false, value: 'trzy' }, "#3");
-	a.deep(iterator.next(), { done: false, value: 'cztery' }, "#4");
-	a.deep(iterator.next(), { done: false, value: 'pięć' }, "#5");
-	a.deep(iterator.next(), { done: false, value: 'sześć' }, "#6");
-	a.deep(iterator.next(), { done: false, value: 'siedem' }, "#7");
-	a.deep(iterator.next(), { done: false, value: 'osiem' }, "#8");
-	a.deep(iterator.next(), { done: false, value: 'dziewięć' }, "#9");
-	a.deep(iterator.next(), { done: true, value: undefined }, "Done #1");
-	a.deep(iterator.next(), { done: true, value: undefined }, "Done #2");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js
deleted file mode 100644
index ae7c2199e84a72..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T) {
-	return {
-		Values: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: 'dwa' }, "Insert");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Keys & Values": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x, 'key+value');
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: [0, 'raz'] }, "#1");
-			a.deep(it.next(), { done: false, value: [1, 'dwa'] }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: [2, 'dwa'] }, "Insert");
-			a.deep(it.next(), { done: false, value: [3, 'trzy'] }, "#3");
-			a.deep(it.next(), { done: false, value: [4, 'cztery'] }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: [5, 'pięć'] }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Keys: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it;
-
-			it = new T(x, 'key');
-			a(it[iteratorSymbol](), it, "@@iterator");
-			a.deep(it.next(), { done: false, value: 0 }, "#1");
-			a.deep(it.next(), { done: false, value: 1 }, "#2");
-			x.splice(1, 0, 'elo');
-			a.deep(it.next(), { done: false, value: 2 }, "Insert");
-			a.deep(it.next(), { done: false, value: 3 }, "#3");
-			a.deep(it.next(), { done: false, value: 4 }, "#4");
-			x.pop();
-			a.deep(it.next(), { done: false, value: 5 }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		Sparse: function (a) {
-			var x = new Array(6), it;
-
-			x[2] = 'raz';
-			x[4] = 'dwa';
-			it = new T(x);
-			a.deep(it.next(), { done: false, value: undefined }, "#1");
-			a.deep(it.next(), { done: false, value: undefined }, "#2");
-			a.deep(it.next(), { done: false, value: 'raz' }, "#3");
-			a.deep(it.next(), { done: false, value: undefined }, "#4");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#5");
-			a.deep(it.next(), { done: false, value: undefined }, "#6");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js
deleted file mode 100644
index 502e7b767f61b2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-var ArrayIterator = require('../array')
-
-  , slice = Array.prototype.slice;
-
-module.exports = function (t, a) {
-	var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0;
-	t(x, function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
-		a(this, y, "Array: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(x = 'foo', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Regular String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	x = ['r', '💩', 'z'];
-	t('r💩z', function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
-		a(this, y, "Unicode String: context:  " + (i++) + "#");
-	}, y);
-	i = 0;
-	t(new ArrayIterator(x), function () {
-		a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
-		a(this, y, "Iterator: context:  " + (i++) + "#");
-	}, y);
-
-	t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) {
-		++called;
-		return doBreak();
-	});
-	a(called, 1, "Break");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js
deleted file mode 100644
index 7309590cba5689..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var iterator;
-	a.throws(function () { t(); }, TypeError, "Null");
-	a.throws(function () { t({}); }, TypeError, "Plain object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	iterator = {};
-	iterator[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(iterator) instanceof Iterator, true, "Iterator");
-	a(String(t([])), '[object Array Iterator]', " Array");
-	a(String(t('foo')), '[object String Iterator]', "String");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js
deleted file mode 100644
index ea3621adfebeb5..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-
-var ee             = require('event-emitter')
-  , iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T) {
-	return {
-		"": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it, y, z;
-
-			it = new T(x);
-			a(it[iteratorSymbol](), it, "@@iterator");
-			y = it.next();
-			a.deep(y, { done: false, value: 'raz' }, "#1");
-			z = it.next();
-			a.not(y, z, "Recreate result");
-			a.deep(z, { done: false, value: 'dwa' }, "#2");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			a.deep(it.next(), { done: false, value: 'pięć' }, "#5");
-			a.deep(y = it.next(), { done: true, value: undefined }, "End");
-			a.not(y, it.next(), "Recreate result on dead");
-		},
-		Emited: function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			y.emit('_add', x.push('sześć') - 1);
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			x.splice(5, 1);
-			y.emit('_delete', 5);
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited #2": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			x.splice(1, 0, '1.25');
-			y.emit('_add', 1);
-			x.splice(0, 1);
-			y.emit('_delete', 0);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
-			a.deep(it.next(), { done: false, value: 'trzy' }, "#3");
-			a.deep(it.next(), { done: false, value: 'cztery' }, "#4");
-			x.splice(5, 1);
-			y.emit('_delete', 5);
-			a.deep(it.next(), { done: false, value: 'sześć' }, "#5");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #1": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.length = 0;
-			y.emit('_clear');
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		},
-		"Emited: Clear #2": function (a) {
-			var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it;
-
-			y = ee();
-			it = new T(x, y);
-			a.deep(it.next(), { done: false, value: 'raz' }, "#1");
-			a.deep(it.next(), { done: false, value: 'dwa' }, "#2");
-			x.length = 0;
-			y.emit('_clear');
-			x.push('foo');
-			x.push('bar');
-			a.deep(it.next(), { done: false, value: 'foo' }, "#3");
-			a.deep(it.next(), { done: false, value: 'bar' }, "#4");
-			x.splice(1, 0, 'półtora');
-			y.emit('_add', 1);
-			x.splice(1, 0, '1.25');
-			y.emit('_add', 1);
-			x.splice(0, 1);
-			y.emit('_delete', 0);
-			a.deep(it.next(), { done: false, value: 'półtora' }, "Insert");
-			a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2");
-			a.deep(it.next(), { done: true, value: undefined }, "End");
-		}
-	};
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js
deleted file mode 100644
index 7c5c59b6d75a62..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var iterator;
-	a(t(), false, "Undefined");
-	a(t(123), false, "Number");
-	a(t({}), false, "Plain object");
-	a(t({ length: 0 }), false, "Array-like");
-	iterator = {};
-	iterator[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(iterator), true, "Iterator");
-	a(t([]), true, "Array");
-	a(t('foo'), true, "String");
-	a(t(''), true, "Empty string");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js
deleted file mode 100644
index d11855f2511609..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator;
-
-module.exports = function (T, a) {
-	var it = new T('foobar');
-
-	a(it[iteratorSymbol](), it, "@@iterator");
-	a.deep(it.next(), { done: false, value: 'f' }, "#1");
-	a.deep(it.next(), { done: false, value: 'o' }, "#2");
-	a.deep(it.next(), { done: false, value: 'o' }, "#3");
-	a.deep(it.next(), { done: false, value: 'b' }, "#4");
-	a.deep(it.next(), { done: false, value: 'a' }, "#5");
-	a.deep(it.next(), { done: false, value: 'r' }, "#6");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-
-	a.h1("Outside of BMP");
-	it = new T('r💩z');
-	a.deep(it.next(), { done: false, value: 'r' }, "#1");
-	a.deep(it.next(), { done: false, value: '💩' }, "#2");
-	a.deep(it.next(), { done: false, value: 'z' }, "#3");
-	a.deep(it.next(), { done: true, value: undefined }, "End");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js
deleted file mode 100644
index 7760b017826085..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var iteratorSymbol = require('es6-symbol').iterator
-  , Iterator       = require('../');
-
-module.exports = function (t, a) {
-	var obj;
-	a.throws(function () { t(); }, TypeError, "Undefined");
-	a.throws(function () { t({}); }, TypeError, "Plain object");
-	a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like");
-	obj = {};
-	obj[iteratorSymbol] = function () { return new Iterator([]); };
-	a(t(obj), obj, "Iterator");
-	obj = [];
-	a(t(obj), obj, 'Array');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js
deleted file mode 100644
index d330997cb1d6af..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isIterable = require('./is-iterable');
-
-module.exports = function (value) {
-	if (!isIterable(value)) throw new TypeError(value + " is not iterable");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.lint b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.lint
deleted file mode 100644
index 1851752f99bfda..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.lint
+++ /dev/null
@@ -1,13 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
-newcap
-vars
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml
deleted file mode 100644
index afd3509a26b27d..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
-  - 0.10
-  - 0.11
-
-notifications:
-  email:
-    - medikoo+es6-symbol@medikoo.com
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES
deleted file mode 100644
index df8c27efc38de2..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES
+++ /dev/null
@@ -1,34 +0,0 @@
-v2.0.1  --  2015.01.28
-* Fix Symbol.prototype[Symbol.isPrimitive] implementation
-* Improve validation within Symbol.prototype.toString and
-  Symbol.prototype.valueOf
-
-v2.0.0  --  2015.01.28
-* Update up to changes in specification:
-  * Implement `for` and `keyFor`
-  * Remove `Symbol.create` and `Symbol.isRegExp`
-  * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and
-    `Symbol.split`
-* Rename `validSymbol` to `validateSymbol`
-* Improve documentation
-* Remove dead test modules
-
-v1.0.0  --  2015.01.26
-* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value)
-* Introduce initialization via hidden constructor
-* Fix isSymbol handling of polyfill values when native Symbol is present
-* Fix spelling of LICENSE
-* Configure lint scripts
-
-v0.1.1  --  2014.10.07
-* Fix isImplemented, so it returns true in case of polyfill
-* Improve documentations
-
-v0.1.0  --  2014.04.28
-* Assure strictly npm dependencies
-* Update to use latest versions of dependencies
-* Fix implementation detection so it doesn't crash on `String(symbol)`
-* throw on `new Symbol()` (as decided by TC39)
-
-v0.0.0  --  2013.11.15
-* Initial (dev) version
\ No newline at end of file
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE
deleted file mode 100644
index 04724a3ab1b70b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.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/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/README.md
deleted file mode 100644
index 95d6780ba78cb4..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# es6-symbol
-## ECMAScript 6 Symbol polyfill
-
-For more information about symbols see following links
-- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
-- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
-- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
-
-### Limitations
-
-Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
-
-### Usage
-
-If you'd like to use native version when it exists and fallback to polyfill if it doesn't (but without implementing `Symbol` on global scope), do:
-
-```javascript
-var Symbol = require('es6-symbol');
-```
-
-If you want to make sure your environment implements `Symbol`, do:
-
-```javascript
-require('es6-symbol/implement');
-```
-
-If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
-
-```javascript
-var Symbol = require('es6-symbol/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Symbol = require('es6-symbol');
-
-var symbol = Symbol('My custom symbol');
-var x = {};
-
-x[symbol] = 'foo';
-console.log(x[symbol]); 'foo'
-
-// Detect iterable:
-var iterator, result;
-if (possiblyIterable[Symbol.iterator]) {
-  iterator = possiblyIterable[Symbol.iterator]();
-  result = iterator.next();
-  while(!result.done) {
-    console.log(result.value);
-    result = iterator.next();
-  }
-}
-```
-
-### Installation
-#### NPM
-
-In your project path:
-
-	$ npm install es6-symbol
-
-##### Browser
-
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
-
-	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js
deleted file mode 100644
index 153edacdbedf9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
-	Object.defineProperty(require('es5-ext/global'), 'Symbol',
-		{ value: require('./polyfill'), configurable: true, enumerable: false,
-			writable: true });
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/index.js
deleted file mode 100644
index 609f1faf551164..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js
deleted file mode 100644
index 53759f32124b1c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function () {
-	var symbol;
-	if (typeof Symbol !== 'function') return false;
-	symbol = Symbol('test symbol');
-	try { String(symbol); } catch (e) { return false; }
-	if (typeof Symbol.iterator === 'symbol') return true;
-
-	// Return 'true' for polyfills
-	if (typeof Symbol.isConcatSpreadable !== 'object') return false;
-	if (typeof Symbol.iterator !== 'object') return false;
-	if (typeof Symbol.toPrimitive !== 'object') return false;
-	if (typeof Symbol.toStringTag !== 'object') return false;
-	if (typeof Symbol.unscopables !== 'object') return false;
-
-	return true;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js
deleted file mode 100644
index a8cb8b8681ee69..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Exports true if environment provides native `Symbol` implementation
-
-'use strict';
-
-module.exports = (function () {
-	if (typeof Symbol !== 'function') return false;
-	return (typeof Symbol.iterator === 'symbol');
-}());
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js
deleted file mode 100644
index beeba2cb4fa23f..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (x) {
-	return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/package.json b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/package.json
deleted file mode 100644
index 0efffeaec90658..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
-  "name": "es6-symbol",
-  "version": "2.0.1",
-  "description": "ECMAScript6 Symbol polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "symbol",
-    "private",
-    "property",
-    "es6",
-    "ecmascript",
-    "harmony"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-symbol.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.5"
-  },
-  "devDependencies": {
-    "tad": "~0.2.1",
-    "xlint": "~0.2.2",
-    "xlint-jslint-medikoo": "~0.1.2"
-  },
-  "scripts": {
-    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
-    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "51f6938d7830269fefa38f02eb912f5472b3ccd7",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-symbol/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-symbol",
-  "_id": "es6-symbol@2.0.1",
-  "_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-  "_from": "es6-symbol@>=2.0.1 <2.1.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
-    "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js
deleted file mode 100644
index 735eb676b23c9b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-var d              = require('d')
-  , validateSymbol = require('./validate-symbol')
-
-  , create = Object.create, defineProperties = Object.defineProperties
-  , defineProperty = Object.defineProperty, objPrototype = Object.prototype
-  , Symbol, HiddenSymbol, globalSymbols = create(null);
-
-var generateName = (function () {
-	var created = create(null);
-	return function (desc) {
-		var postfix = 0, name;
-		while (created[desc + (postfix || '')]) ++postfix;
-		desc += (postfix || '');
-		created[desc] = true;
-		name = '@@' + desc;
-		defineProperty(objPrototype, name, d.gs(null, function (value) {
-			defineProperty(this, name, d(value));
-		}));
-		return name;
-	};
-}());
-
-HiddenSymbol = function Symbol(description) {
-	if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	return Symbol(description);
-};
-module.exports = Symbol = function Symbol(description) {
-	var symbol;
-	if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
-	symbol = create(HiddenSymbol.prototype);
-	description = (description === undefined ? '' : String(description));
-	return defineProperties(symbol, {
-		__description__: d('', description),
-		__name__: d('', generateName(description))
-	});
-};
-defineProperties(Symbol, {
-	for: d(function (key) {
-		if (globalSymbols[key]) return globalSymbols[key];
-		return (globalSymbols[key] = Symbol(String(key)));
-	}),
-	keyFor: d(function (s) {
-		var key;
-		validateSymbol(s);
-		for (key in globalSymbols) if (globalSymbols[key] === s) return key;
-	}),
-	hasInstance: d('', Symbol('hasInstance')),
-	isConcatSpreadable: d('', Symbol('isConcatSpreadable')),
-	iterator: d('', Symbol('iterator')),
-	match: d('', Symbol('match')),
-	replace: d('', Symbol('replace')),
-	search: d('', Symbol('search')),
-	species: d('', Symbol('species')),
-	split: d('', Symbol('split')),
-	toPrimitive: d('', Symbol('toPrimitive')),
-	toStringTag: d('', Symbol('toStringTag')),
-	unscopables: d('', Symbol('unscopables'))
-});
-defineProperties(HiddenSymbol.prototype, {
-	constructor: d(Symbol),
-	toString: d('', function () { return this.__name__; })
-});
-
-defineProperties(Symbol.prototype, {
-	toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
-	valueOf: d(function () { return validateSymbol(this); })
-});
-defineProperty(Symbol.prototype, Symbol.toPrimitive, d('',
-	function () { return validateSymbol(this); }));
-defineProperty(Symbol.prototype, Symbol.toStringTag, d('c', 'Symbol'));
-
-defineProperty(HiddenSymbol.prototype, Symbol.toPrimitive,
-	d('c', Symbol.prototype[Symbol.toPrimitive]));
-defineProperty(HiddenSymbol.prototype, Symbol.toStringTag,
-	d('c', Symbol.prototype[Symbol.toStringTag]));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js
deleted file mode 100644
index eb35c3018835c7..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js
deleted file mode 100644
index 62b3296df6fc5e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('d')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js
deleted file mode 100644
index bb0d64536ebbae..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global   = require('es5-ext/global')
-  , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
-	var cache;
-	a(typeof t(), 'boolean');
-	cache = global.Symbol;
-	global.Symbol = polyfill;
-	a(t(), true);
-	if (cache === undefined) delete global.Symbol;
-	else global.Symbol = cache;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js
deleted file mode 100644
index ac24b9abbff4e6..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof Symbol !== 'undefined') {
-		a(t(Symbol()), true, "Native");
-	}
-	a(t(SymbolPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js
deleted file mode 100644
index 83fb5e9253677b..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var d        = require('d')
-  , isSymbol = require('../is-symbol')
-
-  , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
-	var symbol = T('test'), x = {};
-	defineProperty(x, symbol, d('foo'));
-	a(x.test, undefined, "Name");
-	a(x[symbol], 'foo', "Get");
-	a(x instanceof T, false);
-
-	a(isSymbol(symbol), true, "Symbol");
-	a(isSymbol(T.iterator), true, "iterator");
-	a(isSymbol(T.toStringTag), true, "toStringTag");
-
-	x = {};
-	x[symbol] = 'foo';
-	a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
-		value: 'foo', writable: true });
-	symbol = T.for('marko');
-	a(isSymbol(symbol), true);
-	a(T.for('marko'), symbol);
-	a(T.keyFor(symbol), 'marko');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js
deleted file mode 100644
index 2c8f84c8239b6e..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var symbol;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof Symbol !== 'undefined') {
-		symbol = Symbol();
-		a(t(symbol), symbol, "Native");
-	}
-	symbol = SymbolPoly();
-	a(t(symbol), symbol, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js
deleted file mode 100644
index 42750043d4271c..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isSymbol = require('./is-symbol');
-
-module.exports = function (value) {
-	if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
-	return value;
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/package.json b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/package.json
deleted file mode 100644
index 07973dfab3e479..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
-  "name": "es6-weak-map",
-  "version": "0.1.4",
-  "description": "ECMAScript6 WeakMap polyfill",
-  "author": {
-    "name": "Mariusz Nowak",
-    "email": "medyk@medikoo.com",
-    "url": "http://www.medikoo.com/"
-  },
-  "keywords": [
-    "map",
-    "weakmap",
-    "collection",
-    "es6",
-    "harmony",
-    "list",
-    "hash",
-    "gc"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/medikoo/es6-weak-map.git"
-  },
-  "dependencies": {
-    "d": "~0.1.1",
-    "es5-ext": "~0.10.6",
-    "es6-iterator": "~0.1.3",
-    "es6-symbol": "~2.0.1"
-  },
-  "devDependencies": {
-    "tad": "~0.2.2"
-  },
-  "scripts": {
-    "test": "node ./node_modules/tad/bin/tad"
-  },
-  "license": "MIT",
-  "gitHead": "e68802395b82a700257374c379cfaafe84ee8552",
-  "bugs": {
-    "url": "https://github.com/medikoo/es6-weak-map/issues"
-  },
-  "homepage": "https://github.com/medikoo/es6-weak-map",
-  "_id": "es6-weak-map@0.1.4",
-  "_shasum": "706cef9e99aa236ba7766c239c8b9e286ea7d228",
-  "_from": "es6-weak-map@>=0.1.2 <0.2.0",
-  "_npmVersion": "2.7.4",
-  "_nodeVersion": "0.12.2",
-  "_npmUser": {
-    "name": "medikoo",
-    "email": "medikoo+npm@medikoo.com"
-  },
-  "maintainers": [
-    {
-      "name": "medikoo",
-      "email": "medikoo+npm@medikoo.com"
-    }
-  ],
-  "dist": {
-    "shasum": "706cef9e99aa236ba7766c239c8b9e286ea7d228",
-    "tarball": "http://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/polyfill.js
deleted file mode 100644
index 1d15660ac7de91..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/polyfill.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-var setPrototypeOf    = require('es5-ext/object/set-prototype-of')
-  , object            = require('es5-ext/object/valid-object')
-  , value             = require('es5-ext/object/valid-value')
-  , d                 = require('d')
-  , getIterator       = require('es6-iterator/get')
-  , forOf             = require('es6-iterator/for-of')
-  , toStringTagSymbol = require('es6-symbol').toStringTag
-  , isNative          = require('./is-native-implemented')
-
-  , isArray = Array.isArray, defineProperty = Object.defineProperty, random = Math.random
-  , hasOwnProperty = Object.prototype.hasOwnProperty
-  , genId, WeakMapPoly;
-
-genId = (function () {
-	var generated = Object.create(null);
-	return function () {
-		var id;
-		do { id = random().toString(36).slice(2); } while (generated[id]);
-		generated[id] = true;
-		return id;
-	};
-}());
-
-module.exports = WeakMapPoly = function (/*iterable*/) {
-	var iterable = arguments[0];
-	if (!(this instanceof WeakMapPoly)) return new WeakMapPoly(iterable);
-	if (this.__weakMapData__ !== undefined) {
-		throw new TypeError(this + " cannot be reinitialized");
-	}
-	if (iterable != null) {
-		if (!isArray(iterable)) iterable = getIterator(iterable);
-	}
-	defineProperty(this, '__weakMapData__', d('c', '$weakMap$' + genId()));
-	if (!iterable) return;
-	forOf(iterable, function (val) {
-		value(val);
-		this.set(val[0], val[1]);
-	}, this);
-};
-
-if (isNative) {
-	if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap);
-	WeakMapPoly.prototype = Object.create(WeakMap.prototype, {
-		constructor: d(WeakMapPoly)
-	});
-}
-
-Object.defineProperties(WeakMapPoly.prototype, {
-	clear: d(function () {
-		defineProperty(this, '__weakMapData__', d('c', '$weakMap$' + genId()));
-	}),
-	delete: d(function (key) {
-		if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
-			delete key[this.__weakMapData__];
-			return true;
-		}
-		return false;
-	}),
-	get: d(function (key) {
-		if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
-			return key[this.__weakMapData__];
-		}
-	}),
-	has: d(function (key) {
-		return hasOwnProperty.call(object(key), this.__weakMapData__);
-	}),
-	set: d(function (key, value) {
-		defineProperty(object(key), this.__weakMapData__, d('c', value));
-		return this;
-	}),
-	toString: d(function () { return '[object WeakMap]'; })
-});
-defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap'));
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/implement.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/implement.js
deleted file mode 100644
index 860027ed290974..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof WeakMap, 'function'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/index.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/index.js
deleted file mode 100644
index 9b26e4fa7e4a01..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) {
-	var x = {};
-	a((new T([[x, 'foo']])).get(x), 'foo');
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-implemented.js
deleted file mode 100644
index 1a8832889bf493..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t(), 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-native-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-weak-map.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-weak-map.js
deleted file mode 100644
index ba8c04519ca204..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/is-weak-map.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var WeakMapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	a(t(undefined), false, "Undefined");
-	a(t(null), false, "Null");
-	a(t(true), false, "Primitive");
-	a(t('raz'), false, "String");
-	a(t({}), false, "Object");
-	a(t([]), false, "Array");
-	if (typeof WeakMap !== 'undefined') {
-		a(t(new WeakMap()), true, "Native");
-	}
-	a(t(new WeakMapPoly()), true, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/polyfill.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/polyfill.js
deleted file mode 100644
index 1a4885be8354e0..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/polyfill.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-module.exports = function (T, a) {
-	var x = {}, y = {}, z = {}, arr = [[x, 'raz'], [y, 'dwa']], map = new T(arr);
-
-	a(map instanceof T, true, "WeakMap");
-	a(map.has(x), true, "Has: true");
-	a(map.get(x), 'raz', "Get: contains");
-	a(map.has(z), false, "Has: false");
-	a(map.get(z), undefined, "Get: doesn't contain");
-	a(map.set(z, 'trzy'), map, "Set: return");
-	a(map.has(z), true, "Add");
-	a(map.delete({}), false, "Delete: false");
-
-	a(map.delete(x), true, "Delete: true");
-	a(map.get(x), undefined, "Get: after delete");
-	a(map.has(x), false, "Has: after delete");
-
-	a(map.has(y), true, "Has: pre clear");
-	map.clear();
-	a(map.has(y), false, "Has: after clear");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/valid-weak-map.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/valid-weak-map.js
deleted file mode 100644
index a7823421a7c503..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/test/valid-weak-map.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var WeakMapPoly = require('../polyfill');
-
-module.exports = function (t, a) {
-	var map;
-	a.throws(function () { t(undefined); }, TypeError, "Undefined");
-	a.throws(function () { t(null); }, TypeError, "Null");
-	a.throws(function () { t(true); }, TypeError, "Primitive");
-	a.throws(function () { t('raz'); }, TypeError, "String");
-	a.throws(function () { t({}); }, TypeError, "Object");
-	a.throws(function () { t([]); }, TypeError, "Array");
-	if (typeof WeakMap !== 'undefined') {
-		map = new WeakMap();
-		a(t(map), map, "Native");
-	}
-	map = new WeakMapPoly();
-	a(t(map), map, "Polyfill");
-};
diff --git a/tools/eslint/node_modules/escope/node_modules/esrecurse/gulpfile.coffee b/tools/eslint/node_modules/escope/node_modules/esrecurse/gulpfile.coffee
deleted file mode 100644
index e7781896774265..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/esrecurse/gulpfile.coffee
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright (C) 2014 Yusuke Suzuki 
-#
-# 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  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.
-
-gulp = require 'gulp'
-mocha = require 'gulp-mocha'
-eslint = require 'gulp-eslint'
-minimist = require 'minimist'
-git = require 'gulp-git'
-bump = require 'gulp-bump'
-filter = require 'gulp-filter'
-tagVersion = require 'gulp-tag-version'
-require 'coffee-script/register'
-
-SOURCE = [
-    '*.js'
-]
-
-ESLINT_OPTION =
-    rules:
-        'quotes': 0
-        'eqeqeq': 0
-        'no-use-before-define': 0
-        'no-shadow': 0
-        'no-new': 0
-        'no-underscore-dangle': 0
-        'no-multi-spaces': false
-        'no-native-reassign': 0
-        'no-loop-func': 0
-    env:
-        'node': true
-
-gulp.task 'test', ->
-    options = minimist process.argv.slice(2),
-        string: 'test',
-        default:
-            test: 'test/*.coffee'
-    return gulp.src(options.test).pipe(mocha reporter: 'spec')
-
-gulp.task 'lint', ->
-    return gulp.src(SOURCE)
-    .pipe(eslint(ESLINT_OPTION))
-    .pipe(eslint.formatEach('stylish', process.stderr))
-    .pipe(eslint.failOnError())
-
-inc = (importance) ->
-    gulp.src(['./package.json'])
-        .pipe(bump({type: importance}))
-        .pipe(gulp.dest('./'))
-        .pipe(git.commit('Bumps package version'))
-        .pipe(filter('package.json'))
-        .pipe(tagVersion({
-            prefix: ''
-        }))
-
-gulp.task 'travis', [ 'lint', 'test' ]
-gulp.task 'default', [ 'travis' ]
-
-gulp.task 'patch', [ ], -> inc('patch')
-gulp.task 'minor', [ ], -> inc('minor')
-gulp.task 'major', [ ], -> inc('major')
diff --git a/tools/eslint/node_modules/escope/node_modules/esrecurse/package.json b/tools/eslint/node_modules/escope/node_modules/esrecurse/package.json
deleted file mode 100644
index 70f7d8569aaf79..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/esrecurse/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-  "name": "esrecurse",
-  "description": "ECMAScript scope analyzer",
-  "homepage": "http://github.com/estools/esrecurse",
-  "main": "esrecurse.js",
-  "version": "3.1.1",
-  "engines": {
-    "node": ">=0.10.0"
-  },
-  "maintainers": [
-    {
-      "name": "constellation",
-      "email": "utatane.tea@gmail.com"
-    },
-    {
-      "name": "michaelficarra",
-      "email": "npm@michael.ficarra.me"
-    }
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git+ssh://git@github.com/estools/esrecurse.git"
-  },
-  "dependencies": {
-    "estraverse": "~3.1.0"
-  },
-  "devDependencies": {
-    "chai": "^2.1.1",
-    "coffee-script": "^1.9.1",
-    "esprima": "^2.1.0",
-    "gulp": "~3.8.10",
-    "gulp-bump": "^0.2.2",
-    "gulp-eslint": "^0.6.0",
-    "gulp-filter": "^2.0.2",
-    "gulp-git": "^1.1.0",
-    "gulp-mocha": "~2.0.0",
-    "gulp-tag-version": "^1.2.1",
-    "jsdoc": "~3.3.0-alpha10",
-    "minimist": "^1.1.0"
-  },
-  "licenses": [
-    {
-      "type": "BSD",
-      "url": "http://github.com/estools/esrecurse/raw/master/LICENSE.BSD"
-    }
-  ],
-  "scripts": {
-    "test": "gulp travis",
-    "unit-test": "gulp test",
-    "lint": "gulp lint"
-  },
-  "gitHead": "600a8aac5e7b313875a873134fd110b47a76fc77",
-  "bugs": {
-    "url": "https://github.com/estools/esrecurse/issues"
-  },
-  "_id": "esrecurse@3.1.1",
-  "_shasum": "8feb963699d4d1b2d65a576cd4b1296672a0f0e9",
-  "_from": "esrecurse@>=3.1.1 <4.0.0",
-  "_npmVersion": "2.0.0-alpha-5",
-  "_npmUser": {
-    "name": "constellation",
-    "email": "utatane.tea@gmail.com"
-  },
-  "dist": {
-    "shasum": "8feb963699d4d1b2d65a576cd4b1296672a0f0e9",
-    "tarball": "http://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/.jshintrc b/tools/eslint/node_modules/escope/node_modules/estraverse/.jshintrc
deleted file mode 100644
index f642dae7683b81..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/estraverse/.jshintrc
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "curly": true,
-  "eqeqeq": true,
-  "immed": true,
-  "eqnull": true,
-  "latedef": true,
-  "noarg": true,
-  "noempty": true,
-  "quotmark": "single",
-  "undef": true,
-  "unused": true,
-  "strict": true,
-  "trailing": true,
-
-  "node": true
-}
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/gulpfile.js b/tools/eslint/node_modules/escope/node_modules/estraverse/gulpfile.js
deleted file mode 100644
index 8772bbcca542a8..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/estraverse/gulpfile.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-  Copyright (C) 2014 Yusuke Suzuki 
-
-  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  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.
-*/
-
-'use strict';
-
-var gulp = require('gulp'),
-    git = require('gulp-git'),
-    bump = require('gulp-bump'),
-    filter = require('gulp-filter'),
-    tagVersion = require('gulp-tag-version');
-
-var TEST = [ 'test/*.js' ];
-var POWERED = [ 'powered-test/*.js' ];
-var SOURCE = [ 'src/**/*.js' ];
-
-/**
- * Bumping version number and tagging the repository with it.
- * Please read http://semver.org/
- *
- * You can use the commands
- *
- *     gulp patch     # makes v0.1.0 -> v0.1.1
- *     gulp feature   # makes v0.1.1 -> v0.2.0
- *     gulp release   # makes v0.2.1 -> v1.0.0
- *
- * To bump the version numbers accordingly after you did a patch,
- * introduced a feature or made a backwards-incompatible release.
- */
-
-function inc(importance) {
-    // get all the files to bump version in
-    return gulp.src(['./package.json'])
-        // bump the version number in those files
-        .pipe(bump({type: importance}))
-        // save it back to filesystem
-        .pipe(gulp.dest('./'))
-        // commit the changed version number
-        .pipe(git.commit('Bumps package version'))
-        // read only one file to get the version number
-        .pipe(filter('package.json'))
-        // **tag it in the repository**
-        .pipe(tagVersion({
-            prefix: ''
-        }));
-}
-
-gulp.task('patch', [ ], function () { return inc('patch'); })
-gulp.task('minor', [ ], function () { return inc('minor'); })
-gulp.task('major', [ ], function () { return inc('major'); })
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/package.json b/tools/eslint/node_modules/escope/node_modules/estraverse/package.json
deleted file mode 100644
index 94ac9832e95781..00000000000000
--- a/tools/eslint/node_modules/escope/node_modules/estraverse/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
-  "name": "estraverse",
-  "description": "ECMAScript JS AST traversal functions",
-  "homepage": "https://github.com/estools/estraverse",
-  "main": "estraverse.js",
-  "version": "3.1.0",
-  "engines": {
-    "node": ">=0.10.0"
-  },
-  "maintainers": [
-    {
-      "name": "constellation",
-      "email": "utatane.tea@gmail.com"
-    },
-    {
-      "name": "michaelficarra",
-      "email": "npm@michael.ficarra.me"
-    }
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git+ssh://git@github.com/estools/estraverse.git"
-  },
-  "devDependencies": {
-    "chai": "^2.1.1",
-    "coffee-script": "^1.8.0",
-    "espree": "^1.11.0",
-    "gulp": "^3.8.10",
-    "gulp-bump": "^0.2.2",
-    "gulp-filter": "^2.0.0",
-    "gulp-git": "^1.0.1",
-    "gulp-tag-version": "^1.2.1",
-    "jshint": "^2.5.6",
-    "mocha": "^2.1.0"
-  },
-  "licenses": [
-    {
-      "type": "BSD",
-      "url": "http://github.com/estools/estraverse/raw/master/LICENSE.BSD"
-    }
-  ],
-  "scripts": {
-    "test": "npm run-script lint && npm run-script unit-test",
-    "lint": "jshint estraverse.js",
-    "unit-test": "mocha --compilers coffee:coffee-script/register"
-  },
-  "gitHead": "166ebbe0a8d45ceb2391b6f5ef5d1bab6bfb267a",
-  "bugs": {
-    "url": "https://github.com/estools/estraverse/issues"
-  },
-  "_id": "estraverse@3.1.0",
-  "_shasum": "15e28a446b8b82bc700ccc8b96c78af4da0d6cba",
-  "_from": "estraverse@>=3.1.0 <4.0.0",
-  "_npmVersion": "2.0.0-alpha-5",
-  "_npmUser": {
-    "name": "constellation",
-    "email": "utatane.tea@gmail.com"
-  },
-  "dist": {
-    "shasum": "15e28a446b8b82bc700ccc8b96c78af4da0d6cba",
-    "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz",
-  "readme": "ERROR: No README data found!"
-}
diff --git a/tools/eslint/node_modules/escope/package.json b/tools/eslint/node_modules/escope/package.json
index b5f1787ade5b68..8bbb8bc5e93ee2 100644
--- a/tools/eslint/node_modules/escope/package.json
+++ b/tools/eslint/node_modules/escope/package.json
@@ -1,12 +1,85 @@
 {
-  "name": "escope",
+  "_args": [
+    [
+      "escope@^3.3.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "escope@>=3.3.0 <4.0.0",
+  "_id": "escope@3.3.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/escope",
+  "_nodeVersion": "4.1.1",
+  "_npmUser": {
+    "email": "utatane.tea@gmail.com",
+    "name": "constellation"
+  },
+  "_npmVersion": "2.14.4",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "escope",
+    "raw": "escope@^3.3.0",
+    "rawSpec": "^3.3.0",
+    "scope": null,
+    "spec": ">=3.3.0 <4.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/escope/-/escope-3.3.0.tgz",
+  "_shasum": "6201c97285c2c13643afe4453b58de64481aa1a4",
+  "_shrinkwrap": null,
+  "_spec": "escope@^3.3.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
+  "bugs": {
+    "url": "https://github.com/estools/escope/issues"
+  },
+  "dependencies": {
+    "es6-map": "^0.1.2",
+    "es6-weak-map": "^2.0.1",
+    "esrecurse": "^3.1.1",
+    "estraverse": "^4.1.1"
+  },
   "description": "ECMAScript scope analyzer",
-  "homepage": "http://github.com/estools/escope",
-  "main": "lib/index.js",
-  "version": "3.1.0",
+  "devDependencies": {
+    "acorn": "^2.5.2",
+    "babel": "^4.7.12",
+    "browserify": "^12.0.1",
+    "chai": "^3.4.0",
+    "coffee-script": "^1.10.0",
+    "espree": "^2.2.5",
+    "esprima": "^2.7.0",
+    "gulp": "^3.9.0",
+    "gulp-babel": "^4.0.0",
+    "gulp-bump": "^1.0.0",
+    "gulp-coffee": "^2.3.1",
+    "gulp-eslint": "^1.0.0",
+    "gulp-espower": "^1.0.1",
+    "gulp-filter": "^3.0.1",
+    "gulp-git": "^1.6.0",
+    "gulp-mocha": "^2.1.3",
+    "gulp-plumber": "^1.0.1",
+    "gulp-sourcemaps": "^1.6.0",
+    "gulp-tag-version": "^1.3.0",
+    "jsdoc": "^3.3.3",
+    "lazypipe": "^1.0.1",
+    "minimist": "^1.2.0",
+    "vinyl-source-stream": "^1.1.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "6201c97285c2c13643afe4453b58de64481aa1a4",
+    "tarball": "http://registry.npmjs.org/escope/-/escope-3.3.0.tgz"
+  },
   "engines": {
     "node": ">=0.4.0"
   },
+  "gitHead": "a3402c3e5c04f4e3dc15c88fd2d7ce8608d26ba7",
+  "homepage": "http://github.com/estools/escope",
+  "license": "BSD-2-Clause",
+  "main": "lib/index.js",
   "maintainers": [
     {
       "name": "constellation",
@@ -15,68 +88,24 @@
     {
       "name": "michaelficarra",
       "email": "npm@michael.ficarra.me"
+    },
+    {
+      "name": "nzakas",
+      "email": "nicholas@nczconsulting.com"
     }
   ],
+  "name": "escope",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
   "repository": {
     "type": "git",
     "url": "git+https://github.com/estools/escope.git"
   },
-  "dependencies": {
-    "es6-map": "^0.1.1",
-    "es6-weak-map": "^0.1.2",
-    "esrecurse": "^3.1.1",
-    "estraverse": "^3.1.0"
-  },
-  "devDependencies": {
-    "acorn": "^0.12.0",
-    "babel": "^4.7.12",
-    "browserify": "^9.0.3",
-    "chai": "^2.1.1",
-    "coffee-script": "^1.9.1",
-    "espree": "^2.0.2",
-    "esprima": "^2.1.0",
-    "gulp": "~3.8.10",
-    "gulp-babel": "^4.0.0",
-    "gulp-bump": "^0.3.0",
-    "gulp-coffee": "^2.2.0",
-    "gulp-eslint": "^0.6.0",
-    "gulp-espower": "^0.10.0",
-    "gulp-filter": "^2.0.0",
-    "gulp-git": "^1.0.1",
-    "gulp-mocha": "~2.0.0",
-    "gulp-plumber": "^1.0.0",
-    "gulp-sourcemaps": "^1.3.0",
-    "gulp-tag-version": "^1.2.1",
-    "jsdoc": "=3.3.0-alpha13",
-    "lazypipe": "^0.2.2",
-    "minimist": "^1.1.0",
-    "vinyl-source-stream": "^1.0.0"
-  },
-  "license": "BSD-2-Clause",
   "scripts": {
-    "test": "gulp travis",
-    "unit-test": "gulp test",
+    "jsdoc": "jsdoc src/*.js README.md",
     "lint": "gulp lint",
-    "jsdoc": "jsdoc src/*.js README.md"
-  },
-  "gitHead": "f237eefd4bfadfcf397e451219c3079e9bc3bb81",
-  "bugs": {
-    "url": "https://github.com/estools/escope/issues"
-  },
-  "_id": "escope@3.1.0",
-  "_shasum": "92ca48f6286b380e4388e09188a904b0fa1d9b7e",
-  "_from": "escope@>=3.1.0 <4.0.0",
-  "_npmVersion": "2.10.1",
-  "_nodeVersion": "2.1.0",
-  "_npmUser": {
-    "name": "constellation",
-    "email": "utatane.tea@gmail.com"
-  },
-  "dist": {
-    "shasum": "92ca48f6286b380e4388e09188a904b0fa1d9b7e",
-    "tarball": "http://registry.npmjs.org/escope/-/escope-3.1.0.tgz"
+    "test": "gulp travis",
+    "unit-test": "gulp test"
   },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/escope/-/escope-3.1.0.tgz",
-  "readme": "ERROR: No README data found!"
+  "version": "3.3.0"
 }
diff --git a/tools/eslint/node_modules/escope/src/pattern-visitor.js b/tools/eslint/node_modules/escope/src/pattern-visitor.js
new file mode 100644
index 00000000000000..a6761a4384e029
--- /dev/null
+++ b/tools/eslint/node_modules/escope/src/pattern-visitor.js
@@ -0,0 +1,134 @@
+/*
+  Copyright (C) 2015 Yusuke Suzuki 
+
+  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  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.
+*/
+
+import { Syntax } from 'estraverse';
+import esrecurse from 'esrecurse';
+
+function getLast(xs) {
+    return xs[xs.length - 1] || null;
+}
+
+export default class PatternVisitor extends esrecurse.Visitor {
+    static isPattern(node) {
+        var nodeType = node.type;
+        return (
+            nodeType === Syntax.Identifier ||
+            nodeType === Syntax.ObjectPattern ||
+            nodeType === Syntax.ArrayPattern ||
+            nodeType === Syntax.SpreadElement ||
+            nodeType === Syntax.RestElement ||
+            nodeType === Syntax.AssignmentPattern
+        );
+    }
+
+    constructor(rootPattern, callback) {
+        super();
+        this.rootPattern = rootPattern;
+        this.callback = callback;
+        this.assignments = [];
+        this.rightHandNodes = [];
+        this.restElements = [];
+    }
+
+    Identifier(pattern) {
+        const lastRestElement = getLast(this.restElements);
+        this.callback(pattern, {
+            topLevel: pattern === this.rootPattern,
+            rest: lastRestElement != null && lastRestElement.argument === pattern,
+            assignments: this.assignments
+        });
+    }
+
+    Property(property) {
+        // Computed property's key is a right hand node.
+        if (property.computed) {
+            this.rightHandNodes.push(property.key);
+        }
+
+        // If it's shorthand, its key is same as its value.
+        // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
+        // If it's not shorthand, the name of new variable is its value's.
+        this.visit(property.value);
+    }
+
+    ArrayPattern(pattern) {
+        var i, iz, element;
+        for (i = 0, iz = pattern.elements.length; i < iz; ++i) {
+            element = pattern.elements[i];
+            this.visit(element);
+        }
+    }
+
+    AssignmentPattern(pattern) {
+        this.assignments.push(pattern);
+        this.visit(pattern.left);
+        this.rightHandNodes.push(pattern.right);
+        this.assignments.pop();
+    }
+
+    RestElement(pattern) {
+        this.restElements.push(pattern);
+        this.visit(pattern.argument);
+        this.restElements.pop();
+    }
+
+    MemberExpression(node) {
+        // Computed property's key is a right hand node.
+        if (node.computed) {
+            this.rightHandNodes.push(node.property);
+        }
+        // the object is only read, write to its property.
+        this.rightHandNodes.push(node.object);
+    }
+
+    //
+    // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
+    // By spec, LeftHandSideExpression is Pattern or MemberExpression.
+    //   (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
+    // But espree 2.0 and esprima 2.0 parse to ArrayExpression, ObjectExpression, etc...
+    //
+
+    SpreadElement(node) {
+        this.visit(node.argument);
+    }
+
+    ArrayExpression(node) {
+        node.elements.forEach(this.visit, this);
+    }
+
+    AssignmentExpression(node) {
+        this.assignments.push(node);
+        this.visit(node.left);
+        this.rightHandNodes.push(node.right);
+        this.assignments.pop();
+    }
+
+    CallExpression(node) {
+        // arguments are right hand nodes.
+        node.arguments.forEach(a => { this.rightHandNodes.push(a); });
+        this.visit(node.callee);
+    }
+}
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/escope/src/referencer.js b/tools/eslint/node_modules/escope/src/referencer.js
index 7f69a1a8560ad1..befe8c3b46aaac 100644
--- a/tools/eslint/node_modules/escope/src/referencer.js
+++ b/tools/eslint/node_modules/escope/src/referencer.js
@@ -25,118 +25,10 @@ import { Syntax } from 'estraverse';
 import esrecurse from 'esrecurse';
 import Reference from './reference';
 import Variable from './variable';
+import PatternVisitor from './pattern-visitor';
 import { ParameterDefinition, Definition } from './definition';
 import assert from 'assert';
 
-class PatternVisitor extends esrecurse.Visitor {
-    constructor(rootPattern, callback) {
-        super();
-        this.rootPattern = rootPattern;
-        this.callback = callback;
-        this.assignments = [];
-        this.rightHandNodes = [];
-        this.restElements = [];
-    }
-
-    Identifier(pattern) {
-        const lastRestElement = getLast(this.restElements);
-        this.callback(pattern, {
-            topLevel: pattern === this.rootPattern,
-            rest: lastRestElement != null && lastRestElement.argument === pattern,
-            assignments: this.assignments
-        });
-    }
-
-    ObjectPattern(pattern) {
-        var i, iz, property;
-        for (i = 0, iz = pattern.properties.length; i < iz; ++i) {
-            property = pattern.properties[i];
-
-            // Computed property's key is a right hand node.
-            if (property.computed) {
-                this.rightHandNodes.push(property.key);
-            }
-
-            // If it's shorthand, its key is same as its value.
-            // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
-            // If it's not shorthand, the name of new variable is its value's.
-            this.visit(property.value);
-        }
-    }
-
-    ArrayPattern(pattern) {
-        var i, iz, element;
-        for (i = 0, iz = pattern.elements.length; i < iz; ++i) {
-            element = pattern.elements[i];
-            this.visit(element);
-        }
-    }
-
-    AssignmentPattern(pattern) {
-        this.assignments.push(pattern);
-        this.visit(pattern.left);
-        this.rightHandNodes.push(pattern.right);
-        this.assignments.pop();
-    }
-
-    RestElement(pattern) {
-        this.restElements.push(pattern);
-        this.visit(pattern.argument);
-        this.restElements.pop();
-    }
-
-    MemberExpression(node) {
-        // Computed property's key is a right hand node.
-        if (node.computed) {
-            this.rightHandNodes.push(node.property);
-        }
-        // the object is only read, write to its property.
-        this.rightHandNodes.push(node.object);
-    }
-
-    //
-    // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
-    // By spec, LeftHandSideExpression is Pattern or MemberExpression.
-    //   (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
-    // But espree 2.0 and esprima 2.0 parse to ArrayExpression, ObjectExpression, etc...
-    //
-
-    SpreadElement(node) {
-        this.visit(node.argument);
-    }
-
-    ArrayExpression(node) {
-        node.elements.forEach(this.visit, this);
-    }
-
-    ObjectExpression(node) {
-        node.properties.forEach(property => {
-            // Computed property's key is a right hand node.
-            if (property.computed) {
-                this.rightHandNodes.push(property.key);
-            }
-            this.visit(property.value);
-        });
-    }
-
-    AssignmentExpression(node) {
-        this.assignments.push(node);
-        this.visit(node.left);
-        this.rightHandNodes.push(node.right);
-        this.assignments.pop();
-    }
-
-    CallExpression(node) {
-        // arguments are right hand nodes.
-        node.arguments.forEach(a => { this.rightHandNodes.push(a); });
-        this.visit(node.callee);
-    }
-}
-
-function getLast(xs) {
-    return xs[xs.length - 1] || null;
-}
-
 function traverseIdentifierInPattern(rootPattern, referencer, callback) {
     // Call the callback at left hand identifier nodes, and Collect right hand nodes.
     var visitor = new PatternVisitor(rootPattern, callback);
@@ -148,18 +40,6 @@ function traverseIdentifierInPattern(rootPattern, referencer, callback) {
     }
 }
 
-function isPattern(node) {
-    var nodeType = node.type;
-    return (
-        nodeType === Syntax.Identifier ||
-        nodeType === Syntax.ObjectPattern ||
-        nodeType === Syntax.ArrayPattern ||
-        nodeType === Syntax.SpreadElement ||
-        nodeType === Syntax.RestElement ||
-        nodeType === Syntax.AssignmentPattern
-    );
-}
-
 // Importing ImportDeclaration.
 // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation
 // https://github.com/estree/estree/blob/master/es6.md#importdeclaration
@@ -387,7 +267,7 @@ export default class Referencer extends esrecurse.Visitor {
             this.visit(node.key);
         }
 
-        isMethodDefinition = node.type === Syntax.MethodDefinition || node.method;
+        isMethodDefinition = node.type === Syntax.MethodDefinition;
         if (isMethodDefinition) {
             previous = this.pushInnerMethodDefinition(true);
         }
@@ -457,7 +337,7 @@ export default class Referencer extends esrecurse.Visitor {
     }
 
     AssignmentExpression(node) {
-        if (isPattern(node.left)) {
+        if (PatternVisitor.isPattern(node.left)) {
             if (node.operator === '=') {
                 this.visitPattern(node.left, {processRightHandNodes: true}, (pattern, info) => {
                     var maybeImplicitGlobal = null;
@@ -521,7 +401,7 @@ export default class Referencer extends esrecurse.Visitor {
     }
 
     UpdateExpression(node) {
-        if (isPattern(node.argument)) {
+        if (PatternVisitor.isPattern(node.argument)) {
             this.currentScope().__referencing(node.argument, Reference.RW, null);
         } else {
             this.visitChildren(node);
diff --git a/tools/eslint/node_modules/escope/src/scope-manager.js b/tools/eslint/node_modules/escope/src/scope-manager.js
index 63e66e0d8e234a..a202110e0adf22 100644
--- a/tools/eslint/node_modules/escope/src/scope-manager.js
+++ b/tools/eslint/node_modules/escope/src/scope-manager.js
@@ -50,6 +50,7 @@ export default class ScopeManager {
         this.__nodeToScope = new WeakMap();
         this.__currentScope = null;
         this.__options = options;
+        this.__declaredVariables = new WeakMap();
     }
 
     __useDirective() {
@@ -72,11 +73,25 @@ export default class ScopeManager {
         return this.__options.sourceType === 'module';
     }
 
-    // Returns appropliate scope for this node.
+    // Returns appropriate scope for this node.
     __get(node) {
         return this.__nodeToScope.get(node);
     }
 
+    /**
+     * Get variables that are declared by the node.
+     *
+     * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
+     * If the node declares nothing, this method returns an empty array.
+     * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
+     *
+     * @param {Esprima.Node} node - a node to get.
+     * @returns {Variable[]} variables that declared by the node.
+     */
+    getDeclaredVariables(node) {
+        return this.__declaredVariables.get(node) || [];
+    }
+
     /**
      * acquire scope from node.
      * @method ScopeManager#acquire
diff --git a/tools/eslint/node_modules/escope/src/scope.js b/tools/eslint/node_modules/escope/src/scope.js
index 57242d7c06399a..0e4d8c2d74f6c5 100644
--- a/tools/eslint/node_modules/escope/src/scope.js
+++ b/tools/eslint/node_modules/escope/src/scope.js
@@ -56,7 +56,7 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) {
     }
 
     if (scope.type === 'function') {
-        if (block.type === 'Program') {
+        if (block.type === Syntax.Program) {
             body = block;
         } else {
             body = block.body;
@@ -71,7 +71,7 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) {
     if (useDirective) {
         for (i = 0, iz = body.body.length; i < iz; ++i) {
             stmt = body.body[i];
-            if (stmt.type !== 'DirectiveStatement') {
+            if (stmt.type !== Syntax.DirectiveStatement) {
                 break;
             }
             if (stmt.raw === '"use strict"' || stmt.raw === '\'use strict\'') {
@@ -118,7 +118,7 @@ function registerScope(scopeManager, scope) {
 function shouldBeStatically(def) {
     return (
         (def.type === Variable.ClassName) ||
-        (def.type === Variable.Variable && def.parent.kind !== "var")
+        (def.type === Variable.Variable && def.parent.kind !== 'var')
     );
 }
 
@@ -149,7 +149,7 @@ export default class Scope {
          * a few exceptions to this rule. With 'global' and 'with' scopes you
          * can only decide at runtime which variable a reference refers to.
          * Moreover, if 'eval()' is used in a scope, it might introduce new
-         * bindings in this or its prarent scopes.
+         * bindings in this or its parent scopes.
          * All those scopes are considered 'dynamic'.
          * @member {boolean} Scope#dynamic
          */
@@ -227,6 +227,8 @@ export default class Scope {
             this.upper.childScopes.push(this);
         }
 
+        this.__declaredVariables = scopeManager.__declaredVariables;
+
         registerScope(scopeManager, this);
     }
 
@@ -315,6 +317,21 @@ export default class Scope {
         this.through.push(ref);
     }
 
+    __addDeclaredVariablesOfNode(variable, node) {
+        if (node == null) {
+            return;
+        }
+
+        var variables = this.__declaredVariables.get(node);
+        if (variables == null) {
+            variables = [];
+            this.__declaredVariables.set(node, variables);
+        }
+        if (variables.indexOf(variable) === -1) {
+            variables.push(variable);
+        }
+    }
+
     __defineGeneric(name, set, variables, node, def) {
         var variable;
 
@@ -327,6 +344,10 @@ export default class Scope {
 
         if (def) {
             variable.defs.push(def);
+            if (def.type !== Variable.TDZ) {
+                this.__addDeclaredVariablesOfNode(variable, def.node);
+                this.__addDeclaredVariablesOfNode(variable, def.parent);
+            }
         }
         if (node) {
             variable.identifiers.push(node);
diff --git a/tools/eslint/node_modules/espree/README.md b/tools/eslint/node_modules/espree/README.md
index b6c2001f1168ed..9d58ada601d278 100644
--- a/tools/eslint/node_modules/espree/README.md
+++ b/tools/eslint/node_modules/espree/README.md
@@ -119,6 +119,9 @@ var ast = espree.parse(code, {
         // enable parsing classes
         classes: true,
 
+        // enable parsing of new.target
+        newTarget: false,
+
         // enable parsing of modules
         modules: true,
 
@@ -126,7 +129,10 @@ var ast = espree.parse(code, {
         jsx: true,
 
         // enable return in global scope
-        globalReturn: true
+        globalReturn: true,
+
+        // allow experimental object rest/spread
+        experimentalObjectRestSpread: true
     }
 });
 ```
diff --git a/tools/eslint/node_modules/espree/espree.js b/tools/eslint/node_modules/espree/espree.js
index 7ccf2dd2982ef1..a83286c3fca967 100644
--- a/tools/eslint/node_modules/espree/espree.js
+++ b/tools/eslint/node_modules/espree/espree.js
@@ -580,6 +580,7 @@ function scanPunctuator() {
     // The ... operator (spread, restParams, JSX, etc.)
     if (extra.ecmaFeatures.spread ||
         extra.ecmaFeatures.restParams ||
+        extra.ecmaFeatures.experimentalObjectRestSpread ||
         (extra.ecmaFeatures.jsx && state.inJSXSpreadAttribute)
     ) {
         if (ch1 === "." && ch2 === "." && ch3 === ".") {
@@ -2069,7 +2070,7 @@ function throwError(token, messageFormat) {
         error = new Error("Line " + token.lineNumber + ": " + msg);
         error.index = token.range[0];
         error.lineNumber = token.lineNumber;
-        error.column = token.range[0] - lineStart + 1;
+        error.column = token.range[0] - token.lineStart + 1;
     } else {
         error = new Error("Line " + lineNumber + ": " + msg);
         error.index = index;
@@ -2464,6 +2465,7 @@ function parseObjectProperty() {
         allowShorthand = extra.ecmaFeatures.objectLiteralShorthandProperties,
         allowGenerators = extra.ecmaFeatures.generators,
         allowDestructuring = extra.ecmaFeatures.destructuring,
+        allowSpread = extra.ecmaFeatures.experimentalObjectRestSpread,
         marker = markerCreate();
 
     token = lookahead;
@@ -2612,6 +2614,12 @@ function parseObjectProperty() {
         );
     }
 
+    // object spread property
+    if (allowSpread && match("...")) {
+        lex();
+        return markerApply(marker, astNodeFactory.createExperimentalSpreadProperty(parseAssignmentExpression()));
+    }
+
     // only possibility in this branch is a shorthand generator
     if (token.type === Token.EOF || token.type === Token.Punctuator) {
         if (!allowGenerators || !match("*") || !allowMethod) {
@@ -2696,7 +2704,7 @@ function parseObjectInitialiser() {
 
         property = parseObjectProperty();
 
-        if (!property.computed) {
+        if (!property.computed && property.type.indexOf("Experimental") === -1) {
 
             name = getFieldName(property.key);
             propertyFn = (property.kind === "get") ? PropertyKind.Get : PropertyKind.Set;
@@ -2959,6 +2967,19 @@ function parseNewExpression() {
         marker = markerCreate();
 
     expectKeyword("new");
+
+    if (extra.ecmaFeatures.newTarget && match(".")) {
+        lex();
+        if (lookahead.type === Token.Identifier && lookahead.value === "target") {
+            if (state.inFunctionBody) {
+                lex();
+                return markerApply(marker, astNodeFactory.createMetaProperty("new", "target"));
+            }
+        }
+
+        throwUnexpected(lookahead);
+    }
+
     callee = parseLeftHandSideExpression();
     args = match("(") ? parseArguments() : [];
 
@@ -3288,7 +3309,7 @@ function reinterpretAsCoverFormalsList(expressions) {
                 throwError({}, Messages.UnexpectedToken, ".");
             }
 
-            reinterpretAsDestructuredParameter(options, param.argument);
+            validateParam(options, param.argument, param.argument.name);
             param.type = astNodeTypes.RestElement;
             params.push(param);
         } else if (param.type === astNodeTypes.RestElement) {
@@ -3300,6 +3321,17 @@ function reinterpretAsCoverFormalsList(expressions) {
             param.type = astNodeTypes.AssignmentPattern;
             delete param.operator;
 
+            if (param.right.type === astNodeTypes.YieldExpression) {
+                if (param.right.argument) {
+                    throwUnexpected(lookahead);
+                }
+
+                param.right.type = astNodeTypes.Identifier;
+                param.right.name = "yield";
+                delete param.right.argument;
+                delete param.right.delegate;
+            }
+
             params.push(param);
             validateParam(options, param.left, param.left.name);
         } else {
@@ -3324,10 +3356,15 @@ function reinterpretAsCoverFormalsList(expressions) {
 
 function parseArrowFunctionExpression(options, marker) {
     var previousStrict, body;
+    var arrowStart = lineNumber;
 
     expect("=>");
     previousStrict = strict;
 
+    if (lineNumber > arrowStart) {
+        throwError({}, Messages.UnexpectedToken, "=>");
+    }
+
     body = parseConciseBody();
 
     if (strict && options.firstRestricted) {
@@ -3351,7 +3388,8 @@ function parseArrowFunctionExpression(options, marker) {
 
 function reinterpretAsAssignmentBindingPattern(expr) {
     var i, len, property, element,
-        allowDestructuring = extra.ecmaFeatures.destructuring;
+        allowDestructuring = extra.ecmaFeatures.destructuring,
+        allowRest = extra.ecmaFeatures.experimentalObjectRestSpread;
 
     if (!allowDestructuring) {
         throwUnexpected(lex());
@@ -3361,6 +3399,18 @@ function reinterpretAsAssignmentBindingPattern(expr) {
         expr.type = astNodeTypes.ObjectPattern;
         for (i = 0, len = expr.properties.length; i < len; i += 1) {
             property = expr.properties[i];
+
+            if (allowRest && property.type === astNodeTypes.ExperimentalSpreadProperty) {
+
+                // only allow identifiers
+                if (property.argument.type !== astNodeTypes.Identifier) {
+                    throwErrorTolerant({}, "Invalid object rest.");
+                }
+
+                property.type = astNodeTypes.ExperimentalRestProperty;
+                return;
+            }
+
             if (property.kind !== "init") {
                 throwErrorTolerant({}, Messages.InvalidLHSInAssignment);
             }
@@ -3475,7 +3525,6 @@ function parseAssignmentExpression() {
     if (match("=>") &&
             (state.parenthesisCount === oldParenthesisCount ||
             state.parenthesisCount === (oldParenthesisCount + 1))) {
-
         if (node.type === astNodeTypes.Identifier) {
             params = reinterpretAsCoverFormalsList([ node ]);
         } else if (node.type === astNodeTypes.AssignmentExpression ||
@@ -3490,6 +3539,7 @@ function parseAssignmentExpression() {
         }
 
         if (params) {
+            state.parenthesisCount--;
             return parseArrowFunctionExpression(params, marker);
         }
     }
@@ -3510,6 +3560,7 @@ function parseAssignmentExpression() {
 
         token = lex();
         right = parseAssignmentExpression();
+
         node = markerApply(marker, astNodeFactory.createAssignmentExpression(token.value, left, right));
     }
 
@@ -3846,6 +3897,11 @@ function parseForStatement(opts) {
             init = parseExpression();
             state.allowIn = true;
 
+            if (init.type === astNodeTypes.ArrayExpression) {
+                init.type = astNodeTypes.ArrayPattern;
+            }
+
+
             if (allowForOf && matchContextualKeyword("of")) {
                 operator = lex();
                 left = init;
@@ -4353,7 +4409,7 @@ function parseFunctionSourceElements() {
     oldInIteration = state.inIteration;
     oldInSwitch = state.inSwitch;
     oldInFunctionBody = state.inFunctionBody;
-    oldParenthesisCount = state.parenthesizedCount;
+    oldParenthesisCount = state.parenthesisCount;
 
     state.labelSet = new StringMap();
     state.inIteration = false;
@@ -4381,7 +4437,7 @@ function parseFunctionSourceElements() {
     state.inIteration = oldInIteration;
     state.inSwitch = oldInSwitch;
     state.inFunctionBody = oldInFunctionBody;
-    state.parenthesizedCount = oldParenthesisCount;
+    state.parenthesisCount = oldParenthesisCount;
 
     return markerApply(marker, astNodeFactory.createBlockStatement(sourceElements));
 }
@@ -4726,7 +4782,7 @@ function parseExportNamedDeclaration() {
         do {
             isExportFromIdentifier = isExportFromIdentifier || matchKeyword("default");
             specifiers.push(parseExportSpecifier());
-        } while (match(",") && lex());
+        } while (match(",") && lex() && !match("}"));
     }
     expect("}");
 
@@ -4856,7 +4912,7 @@ function parseNamedImports() {
     if (!match("}")) {
         do {
             specifiers.push(parseImportSpecifier());
-        } while (match(",") && lex());
+        } while (match(",") && lex() && !match("}"));
     }
     expect("}");
     return specifiers;
@@ -5403,7 +5459,8 @@ function parse(code, options) {
                 generators: true,
                 destructuring: true,
                 classes: true,
-                modules: true
+                modules: true,
+                newTarget: true
             };
         }
 
diff --git a/tools/eslint/node_modules/espree/lib/ast-node-factory.js b/tools/eslint/node_modules/espree/lib/ast-node-factory.js
index 56bdbcadbf9c40..8d867393815425 100644
--- a/tools/eslint/node_modules/espree/lib/ast-node-factory.js
+++ b/tools/eslint/node_modules/espree/lib/ast-node-factory.js
@@ -212,6 +212,14 @@ module.exports = {
         };
     },
 
+    createMetaProperty: function(meta, property) {
+        return {
+            type: astNodeTypes.MetaProperty,
+            meta: meta,
+            property: property
+        };
+    },
+
     /**
      * Create an ASTNode representation of a conditional expression
      * @param {ASTNode} test The conditional to evaluate
@@ -498,6 +506,30 @@ module.exports = {
         };
     },
 
+    /**
+     * Create an ASTNode representation of an experimental rest property
+     * @param {ASTNode} argument The identifier being rested
+     * @returns {ASTNode} An ASTNode representing a rest element
+     */
+    createExperimentalRestProperty: function(argument) {
+        return {
+            type: astNodeTypes.ExperimentalRestProperty,
+            argument: argument
+        };
+    },
+
+    /**
+     * Create an ASTNode representation of an experimental spread property
+     * @param {ASTNode} argument The identifier being spread
+     * @returns {ASTNode} An ASTNode representing a spread element
+     */
+    createExperimentalSpreadProperty: function(argument) {
+        return {
+            type: astNodeTypes.ExperimentalSpreadProperty,
+            argument: argument
+        };
+    },
+
     /**
      * Create an ASTNode tagged template expression
      * @param {ASTNode} tag The tag expression
diff --git a/tools/eslint/node_modules/espree/lib/ast-node-types.js b/tools/eslint/node_modules/espree/lib/ast-node-types.js
index 5d14b7f4437283..ec9eaa1fbe377c 100644
--- a/tools/eslint/node_modules/espree/lib/ast-node-types.js
+++ b/tools/eslint/node_modules/espree/lib/ast-node-types.js
@@ -56,6 +56,8 @@ module.exports = {
     DoWhileStatement: "DoWhileStatement",
     DebuggerStatement: "DebuggerStatement",
     EmptyStatement: "EmptyStatement",
+    ExperimentalRestProperty: "ExperimentalRestProperty",
+    ExperimentalSpreadProperty: "ExperimentalSpreadProperty",
     ExpressionStatement: "ExpressionStatement",
     ForStatement: "ForStatement",
     ForInStatement: "ForInStatement",
@@ -68,6 +70,7 @@ module.exports = {
     LabeledStatement: "LabeledStatement",
     LogicalExpression: "LogicalExpression",
     MemberExpression: "MemberExpression",
+    MetaProperty: "MetaProperty",
     MethodDefinition: "MethodDefinition",
     NewExpression: "NewExpression",
     ObjectExpression: "ObjectExpression",
diff --git a/tools/eslint/node_modules/espree/lib/comment-attachment.js b/tools/eslint/node_modules/espree/lib/comment-attachment.js
index 3618bb3bf08823..dc98fd2e099a22 100644
--- a/tools/eslint/node_modules/espree/lib/comment-attachment.js
+++ b/tools/eslint/node_modules/espree/lib/comment-attachment.js
@@ -109,9 +109,21 @@ module.exports = {
         }
 
         if (lastChild) {
-            if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {
-                node.leadingComments = lastChild.leadingComments;
-                delete lastChild.leadingComments;
+            if (lastChild.leadingComments) {
+                if (lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {
+                    node.leadingComments = lastChild.leadingComments;
+                    delete lastChild.leadingComments;
+                } else {
+                    // A leading comment for an anonymous class had been stolen by its first MethodDefinition,
+                    // so this takes back the leading comment.
+                    // See Also: https://github.com/eslint/espree/issues/158
+                    for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
+                        if (lastChild.leadingComments[i].range[1] <= node.range[0]) {
+                            node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
+                            break;
+                        }
+                    }
+                }
             }
         } else if (extra.leadingComments.length > 0) {
 
diff --git a/tools/eslint/node_modules/espree/lib/features.js b/tools/eslint/node_modules/espree/lib/features.js
index c33274a441b7d3..209137dcdc466b 100644
--- a/tools/eslint/node_modules/espree/lib/features.js
+++ b/tools/eslint/node_modules/espree/lib/features.js
@@ -100,6 +100,9 @@ module.exports = {
     // enable parsing of classes
     classes: false,
 
+    // enable parsing of new.target
+    newTarget: false,
+
     // enable parsing of modules
     modules: false,
 
@@ -107,5 +110,8 @@ module.exports = {
     jsx: false,
 
     // allow return statement in global scope
-    globalReturn: false
+    globalReturn: false,
+
+    // allow experimental object rest/spread
+    experimentalObjectRestSpread: false
 };
diff --git a/tools/eslint/node_modules/espree/package.json b/tools/eslint/node_modules/espree/package.json
index 36fa14ff633654..b71ce3806e538c 100644
--- a/tools/eslint/node_modules/espree/package.json
+++ b/tools/eslint/node_modules/espree/package.json
@@ -1,43 +1,50 @@
 {
-  "name": "espree",
-  "description": "An actively-maintained fork of Esprima, the ECMAScript parsing infrastructure for multipurpose analysis",
+  "_args": [
+    [
+      "espree@^2.2.4",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "espree@>=2.2.4 <3.0.0",
+  "_id": "espree@2.2.5",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/espree",
+  "_npmUser": {
+    "email": "nicholas@nczconsulting.com",
+    "name": "nzakas"
+  },
+  "_npmVersion": "1.4.28",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "espree",
+    "raw": "espree@^2.2.4",
+    "rawSpec": "^2.2.4",
+    "scope": null,
+    "spec": ">=2.2.4 <3.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz",
+  "_shasum": "df691b9310889402aeb29cc066708c56690b854b",
+  "_shrinkwrap": null,
+  "_spec": "espree@^2.2.4",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
   "author": {
-    "name": "Nicholas C. Zakas",
-    "email": "nicholas+npm@nczconsulting.com"
+    "email": "nicholas+npm@nczconsulting.com",
+    "name": "Nicholas C. Zakas"
   },
-  "homepage": "https://github.com/eslint/espree",
-  "main": "espree.js",
   "bin": {
     "esparse": "./bin/esparse.js",
     "esvalidate": "./bin/esvalidate.js"
   },
-  "version": "2.0.4",
-  "files": [
-    "bin",
-    "lib",
-    "test/run.js",
-    "test/runner.js",
-    "test/test.js",
-    "test/compat.js",
-    "test/reflect.js",
-    "espree.js"
-  ],
-  "engines": {
-    "node": ">=0.10.0"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+ssh://git@github.com/eslint/espree.git"
-  },
   "bugs": {
     "url": "http://github.com/eslint/espree.git"
   },
-  "licenses": [
-    {
-      "type": "BSD",
-      "url": "http://github.com/nzakas/espree/raw/master/LICENSE"
-    }
-  ],
+  "dependencies": {},
+  "description": "An actively-maintained fork of Esprima, the ECMAScript parsing infrastructure for multipurpose analysis",
   "devDependencies": {
     "browserify": "^7.0.0",
     "chai": "^1.10.0",
@@ -58,6 +65,26 @@
     "shelljs-nodecli": "^0.1.1",
     "unicode-6.3.0": "~0.1.0"
   },
+  "directories": {},
+  "dist": {
+    "shasum": "df691b9310889402aeb29cc066708c56690b854b",
+    "tarball": "http://registry.npmjs.org/espree/-/espree-2.2.5.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "bin",
+    "espree.js",
+    "lib",
+    "test/compat.js",
+    "test/reflect.js",
+    "test/run.js",
+    "test/runner.js",
+    "test/test.js"
+  ],
+  "gitHead": "eeeeb05b879783901ff2308efcbd0cda76753cbe",
+  "homepage": "https://github.com/eslint/espree",
   "keywords": [
     "ast",
     "ecmascript",
@@ -65,44 +92,42 @@
     "parser",
     "syntax"
   ],
-  "scripts": {
-    "generate-regex": "node tools/generate-identifier-regex.js",
-    "test": "npm run-script lint && node Makefile.js test && node test/run.js",
-    "lint": "node Makefile.js lint",
-    "patch": "node Makefile.js patch",
-    "minor": "node Makefile.js minor",
-    "major": "node Makefile.js major",
-    "browserify": "node Makefile.js browserify",
-    "coverage": "npm run-script analyze-coverage && npm run-script check-coverage",
-    "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js",
-    "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement 99 --branch 99 --function 99",
-    "complexity": "npm run-script analyze-complexity && npm run-script check-complexity",
-    "analyze-complexity": "node tools/list-complexity.js",
-    "check-complexity": "node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w espree.js",
-    "benchmark": "node test/benchmarks.js",
-    "benchmark-quick": "node test/benchmarks.js quick"
-  },
-  "dependencies": {},
-  "gitHead": "21f73f3178c9c9709c9ee1474641bb8fdad2115c",
-  "_id": "espree@2.0.4",
-  "_shasum": "679289cc5aa99923540437905288a642f21b90e9",
-  "_from": "espree@>=2.0.1 <3.0.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "nzakas",
-    "email": "nicholas@nczconsulting.com"
-  },
+  "licenses": [
+    {
+      "type": "BSD",
+      "url": "http://github.com/nzakas/espree/raw/master/LICENSE"
+    }
+  ],
+  "main": "espree.js",
   "maintainers": [
     {
       "name": "nzakas",
       "email": "nicholas@nczconsulting.com"
     }
   ],
-  "dist": {
-    "shasum": "679289cc5aa99923540437905288a642f21b90e9",
-    "tarball": "http://registry.npmjs.org/espree/-/espree-2.0.4.tgz"
+  "name": "espree",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/eslint/espree.git"
   },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/espree/-/espree-2.0.4.tgz",
-  "readme": "ERROR: No README data found!"
+  "scripts": {
+    "analyze-complexity": "node tools/list-complexity.js",
+    "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js",
+    "benchmark": "node test/benchmarks.js",
+    "benchmark-quick": "node test/benchmarks.js quick",
+    "browserify": "node Makefile.js browserify",
+    "check-complexity": "node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w espree.js",
+    "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement 99 --branch 99 --function 99",
+    "complexity": "npm run-script analyze-complexity && npm run-script check-complexity",
+    "coverage": "npm run-script analyze-coverage && npm run-script check-coverage",
+    "generate-regex": "node tools/generate-identifier-regex.js",
+    "lint": "node Makefile.js lint",
+    "major": "node Makefile.js major",
+    "minor": "node Makefile.js minor",
+    "patch": "node Makefile.js patch",
+    "test": "npm run-script lint && node Makefile.js test && node test/run.js"
+  },
+  "version": "2.2.5"
 }
diff --git a/tools/eslint/node_modules/espree/test/compat.js b/tools/eslint/node_modules/espree/test/compat.js
deleted file mode 100644
index abd623aa254cf4..00000000000000
--- a/tools/eslint/node_modules/espree/test/compat.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-  Copyright (C) 2012 Joost-Wim Boekesteijn 
-  Copyright (C) 2011 Ariya Hidayat 
-
-  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  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.
-*/
-
-/*jslint node: true */
-/*global document: true, window:true, espree: true, testReflect: true */
-
-var runTests;
-
-function getContext(espree, reportCase, reportFailure) {
-    'use strict';
-
-    var Reflect, Pattern;
-
-    // Maps Mozilla Reflect object to our espree parser.
-    Reflect = {
-        parse: function (code) {
-            var result;
-
-            reportCase(code);
-
-            try {
-                result = espree.parse(code);
-            } catch (error) {
-                result = error;
-            }
-
-            return result;
-        }
-    };
-
-    // This is used by Reflect test suite to match a syntax tree.
-    Pattern = function (obj) {
-        var pattern;
-
-        // Poor man's deep object cloning.
-        pattern = JSON.parse(JSON.stringify(obj));
-
-        // Special handling for regular expression literal since we need to
-        // convert it to a string literal, otherwise it will be decoded
-        // as object "{}" and the regular expression would be lost.
-        if (obj.type && obj.type === 'Literal') {
-            if (obj.value instanceof RegExp) {
-                pattern = {
-                    type: obj.type,
-                    value: obj.value.toString()
-                };
-            }
-        }
-
-        // Special handling for branch statement because SpiderMonkey
-        // prefers to put the 'alternate' property before 'consequent'.
-        if (obj.type && obj.type === 'IfStatement') {
-            pattern = {
-                type: pattern.type,
-                test: pattern.test,
-                consequent: pattern.consequent,
-                alternate: pattern.alternate
-            };
-        }
-
-        // Special handling for do while statement because SpiderMonkey
-        // prefers to put the 'test' property before 'body'.
-        if (obj.type && obj.type === 'DoWhileStatement') {
-            pattern = {
-                type: pattern.type,
-                body: pattern.body,
-                test: pattern.test
-            };
-        }
-
-        // Remove special properties on Property node
-        if (obj.type && obj.type === 'Property') {
-            pattern = {
-                type: pattern.type,
-                key: pattern.key,
-                value: pattern.value,
-                kind: pattern.kind
-            };
-        }
-
-        function adjustRegexLiteralAndRaw(key, value) {
-            if (key === 'value' && value instanceof RegExp) {
-                value = value.toString();
-            } else if (key === 'raw' && typeof value === "string") {
-                // Ignore Espree-specific 'raw' property.
-                return undefined;
-            } else if (key === 'regex' && typeof value === "object") {
-                // Ignore Espree-specific 'regex' property.
-                return undefined;
-            }
-            return value;
-        }
-
-
-        if (obj.type && (obj.type === 'Program')) {
-            pattern.assert = function (tree) {
-                var actual, expected;
-                actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4);
-                expected = JSON.stringify(obj, null, 4);
-
-                if (expected !== actual) {
-                    reportFailure(expected, actual);
-                }
-            };
-        }
-
-        return pattern;
-    };
-
-    return {
-        Reflect: Reflect,
-        Pattern: Pattern
-    };
-}
-
-if (typeof window !== 'undefined') {
-    // Run all tests in a browser environment.
-    runTests = function () {
-        'use strict';
-
-        var total = 0,
-            failures = 0;
-
-        function setText(el, str) {
-            if (typeof el.innerText === 'string') {
-                el.innerText = str;
-            } else {
-                el.textContent = str;
-            }
-        }
-
-        function reportCase(code) {
-            var report, e;
-            report = document.getElementById('report');
-            e = document.createElement('pre');
-            e.setAttribute('class', 'code');
-            setText(e, code);
-            report.appendChild(e);
-            total += 1;
-        }
-
-        function reportFailure(expected, actual) {
-            var report, e;
-
-            failures += 1;
-
-            report = document.getElementById('report');
-
-            e = document.createElement('p');
-            setText(e, 'Expected');
-            report.appendChild(e);
-
-            e = document.createElement('pre');
-            e.setAttribute('class', 'expected');
-            setText(e, expected);
-            report.appendChild(e);
-
-            e = document.createElement('p');
-            setText(e, 'Actual');
-            report.appendChild(e);
-
-            e = document.createElement('pre');
-            e.setAttribute('class', 'actual');
-            setText(e, actual);
-            report.appendChild(e);
-        }
-
-        setText(document.getElementById('version'), espree.version);
-
-        window.setTimeout(function () {
-            var tick, context = getContext(espree, reportCase, reportFailure);
-
-            tick = new Date();
-            testReflect(context.Reflect, context.Pattern);
-            tick = (new Date()) - tick;
-
-            if (failures > 0) {
-                document.getElementById('status').className = 'alert-box alert';
-                setText(document.getElementById('status'), total + ' tests. ' +
-                    'Failures: ' + failures + '. ' + tick + ' ms');
-            } else {
-                document.getElementById('status').className = 'alert-box success';
-                setText(document.getElementById('status'), total + ' tests. ' +
-                    'No failure. ' + tick + ' ms');
-            }
-        }, 11);
-    };
-} else {
-    (function (global) {
-        'use strict';
-        var espree = require('../espree'),
-            tick,
-            total = 0,
-            failures = [],
-            header,
-            current,
-            context;
-
-        function reportCase(code) {
-            total += 1;
-            current = code;
-        }
-
-        function reportFailure(expected, actual) {
-            failures.push({
-                source: current,
-                expected: expected.toString(),
-                actual: actual.toString()
-            });
-        }
-
-        context = getContext(espree, reportCase, reportFailure);
-
-        tick = new Date();
-        require('./reflect').testReflect(context.Reflect, context.Pattern);
-        tick = (new Date()) - tick;
-
-        header = total + ' tests. ' + failures.length + ' failures. ' +
-            tick + ' ms';
-        if (failures.length) {
-            console.error(header);
-            failures.forEach(function (failure) {
-                console.error(failure.source + ': Expected\n    ' +
-                    failure.expected.split('\n').join('\n    ') +
-                    '\nto match\n    ' + failure.actual);
-            });
-        } else {
-            console.log(header);
-        }
-        process.exit(failures.length === 0 ? 0 : 1);
-    }(this));
-}
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/espree/test/reflect.js b/tools/eslint/node_modules/espree/test/reflect.js
deleted file mode 100644
index a4740fbb751fbd..00000000000000
--- a/tools/eslint/node_modules/espree/test/reflect.js
+++ /dev/null
@@ -1,422 +0,0 @@
-// This is modified from Mozilla Reflect.parse test suite (the file is located
-// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree).
-//
-// Some notable changes:
-//   * Removed unsupported features (destructuring, let, comprehensions...).
-//   * Removed tests for E4X (ECMAScript for XML).
-//   * Removed everything related to builder.
-//   * Enclosed every 'Pattern' construct with a scope.
-//   * Tweaked some expected tree to remove generator field.
-//   * Removed the test for bug 632030 and bug 632024.
-
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/
- */
-
-(function (exports) {
-
-function testReflect(Reflect, Pattern) {
-
-function program(elts) { return Pattern({ type: "Program", body: elts }) }
-function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) }
-function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) }
-function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) }
-function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) }
-function lit(val) { return Pattern({ type: "Literal", value: val }) }
-var thisExpr = Pattern({ type: "ThisExpression" });
-function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",
-                                             id: id,
-                                             params: params,
-                                             defaults: [],
-                                             body: body,
-                                             rest: null,
-                                             generator: false,
-                                             expression: false
-                                             }) }
-function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",
-                                                id: id,
-                                                params: params,
-                                                defaults: [],
-                                                body: body,
-                                                rest: null,
-                                                generator: false,
-                                                expression: false
-                                                }) }
-function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) }
-function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) }
-function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) }
-function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) }
-function ident(name) { return Pattern({ type: "Identifier", name: name }) }
-function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) }
-function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) }
-function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) }
-function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) }
-function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) }
-function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) }
-function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) }
-function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) }
-var emptyStmt = Pattern({ type: "EmptyStatement" });
-function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) }
-function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) }
-function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) }
-function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) }
-function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) }
-function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) }
-function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) }
-function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) }
-function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } }
-function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, handler: (catches.length > 0) ? catches[0] : null, finalizer: fin }) }
-function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) }
-function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression",
-                                                id: id,
-                                                params: args,
-                                                defaults: [],
-                                                body: body,
-                                                rest: null,
-                                                generator: false,
-                                                expression: false
-                                                }) }
-function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression",
-                                              id: id,
-                                              params: args,
-                                              defaults: [],
-                                              body: body,
-                                              rest: null,
-                                              generator: false,
-                                              expression: false
-                                              }) }
-
-function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }) }
-function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) }
-function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) }
-function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) }
-function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) }
-
-function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) }
-function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) }
-function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) }
-function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) }
-function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) }
-function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) }
-function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind }) }
-
-function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) }
-function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) }
-
-function localSrc(src) { return "(function(){ " + src + " })" }
-function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) }
-function blockSrc(src) { return "(function(){ { " + src + " } })" }
-function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) }
-
-function assertBlockStmt(src, patt) {
-    blockPatt(patt).assert(Reflect.parse(blockSrc(src)));
-}
-
-function assertBlockExpr(src, patt) {
-    assertBlockStmt(src, exprStmt(patt));
-}
-
-function assertBlockDecl(src, patt, builder) {
-    blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder}));
-}
-
-function assertLocalStmt(src, patt) {
-    localPatt(patt).assert(Reflect.parse(localSrc(src)));
-}
-
-function assertLocalExpr(src, patt) {
-    assertLocalStmt(src, exprStmt(patt));
-}
-
-function assertLocalDecl(src, patt) {
-    localPatt(patt).assert(Reflect.parse(localSrc(src)));
-}
-
-function assertGlobalStmt(src, patt, builder) {
-    program([patt]).assert(Reflect.parse(src, {builder: builder}));
-}
-
-function assertGlobalExpr(src, patt, builder) {
-    program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder}));
-    //assertStmt(src, exprStmt(patt));
-}
-
-function assertGlobalDecl(src, patt) {
-    program([patt]).assert(Reflect.parse(src));
-}
-
-function assertProg(src, patt) {
-    program(patt).assert(Reflect.parse(src));
-}
-
-function assertStmt(src, patt) {
-    assertLocalStmt(src, patt);
-    assertGlobalStmt(src, patt);
-    assertBlockStmt(src, patt);
-}
-
-function assertExpr(src, patt) {
-    assertLocalExpr(src, patt);
-    assertGlobalExpr(src, patt);
-    assertBlockExpr(src, patt);
-}
-
-function assertDecl(src, patt) {
-    assertLocalDecl(src, patt);
-    assertGlobalDecl(src, patt);
-    assertBlockDecl(src, patt);
-}
-
-function assertError(src, errorType) {
-    try {
-        Reflect.parse(src);
-    } catch (e) {
-        return;
-    }
-    throw new Error("expected " + errorType.name + " for " + uneval(src));
-}
-
-
-// general tests
-
-// NB: These are useful but for now jit-test doesn't do I/O reliably.
-
-//program(_).assert(Reflect.parse(snarf('data/flapjax.txt')));
-//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt')));
-//program(_).assert(Reflect.parse(snarf('data/prototype.js')));
-//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js')));
-//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js')));
-
-
-// declarations
-
-assertDecl("var x = 1, y = 2, z = 3",
-           varDecl([declarator(ident("x"), lit(1)),
-                    declarator(ident("y"), lit(2)),
-                    declarator(ident("z"), lit(3))]));
-assertDecl("var x, y, z",
-           varDecl([declarator(ident("x"), null),
-                    declarator(ident("y"), null),
-                    declarator(ident("z"), null)]));
-assertDecl("function foo() { }",
-           funDecl(ident("foo"), [], blockStmt([])));
-assertDecl("function foo() { return 42 }",
-           funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))])));
-
-
-// Bug 591437: rebound args have their defs turned into uses
-assertDecl("function f(a) { function a() { } }",
-           funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))])));
-assertDecl("function f(a,b,c) { function b() { } }",
-           funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))])));
-
-// expressions
-
-assertExpr("true", lit(true));
-assertExpr("false", lit(false));
-assertExpr("42", lit(42));
-assertExpr("(/asdf/)", lit(/asdf/));
-assertExpr("this", thisExpr);
-assertExpr("foo", ident("foo"));
-assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar")));
-assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar")));
-assertExpr("(function(){})", funExpr(null, [], blockStmt([])));
-assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([])));
-assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([])));
-assertExpr("(++x)", updExpr("++", ident("x"), true));
-assertExpr("(x++)", updExpr("++", ident("x"), false));
-assertExpr("(+x)", unExpr("+", ident("x")));
-assertExpr("(-x)", unExpr("-", ident("x")));
-assertExpr("(!x)", unExpr("!", ident("x")));
-assertExpr("(~x)", unExpr("~", ident("x")));
-assertExpr("(delete x)", unExpr("delete", ident("x")));
-assertExpr("(typeof x)", unExpr("typeof", ident("x")));
-assertExpr("(void x)", unExpr("void", ident("x")));
-assertExpr("(x == y)", binExpr("==", ident("x"), ident("y")));
-assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y")));
-assertExpr("(x === y)", binExpr("===", ident("x"), ident("y")));
-assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y")));
-assertExpr("(x < y)", binExpr("<", ident("x"), ident("y")));
-assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y")));
-assertExpr("(x > y)", binExpr(">", ident("x"), ident("y")));
-assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y")));
-assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y")));
-assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y")));
-assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y")));
-assertExpr("(x + y)", binExpr("+", ident("x"), ident("y")));
-assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z")));
-assertExpr("(x - y)", binExpr("-", ident("x"), ident("y")));
-assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z")));
-assertExpr("(x * y)", binExpr("*", ident("x"), ident("y")));
-assertExpr("(x / y)", binExpr("/", ident("x"), ident("y")));
-assertExpr("(x % y)", binExpr("%", ident("x"), ident("y")));
-assertExpr("(x | y)", binExpr("|", ident("x"), ident("y")));
-assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y")));
-assertExpr("(x & y)", binExpr("&", ident("x"), ident("y")));
-assertExpr("(x in y)", binExpr("in", ident("x"), ident("y")));
-assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y")));
-assertExpr("(x = y)", aExpr("=", ident("x"), ident("y")));
-assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y")));
-assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y")));
-assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y")));
-assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y")));
-assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y")));
-assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y")));
-assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y")));
-assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y")));
-assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y")));
-assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y")));
-assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y")));
-assertExpr("(x || y)", logExpr("||", ident("x"), ident("y")));
-assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y")));
-assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z")))
-assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z")));
-assertExpr("(x,y)", seqExpr([ident("x"),ident("y")]))
-assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")]))
-assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")]));
-assertExpr("(new Object)", newExpr(ident("Object"), []));
-assertExpr("(new Object())", newExpr(ident("Object"), []));
-assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)]));
-assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)]));
-assertExpr("(String())", callExpr(ident("String"), []));
-assertExpr("(String(42))", callExpr(ident("String"), [lit(42)]));
-assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)]));
-assertExpr("[]", arrExpr([]));
-assertExpr("[1]", arrExpr([lit(1)]));
-assertExpr("[1,2]", arrExpr([lit(1),lit(2)]));
-assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)]));
-assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)]));
-assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)]));
-assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)]));
-assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)]));
-assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)]));
-assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)]));
-assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)]));
-assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)]));
-assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined]));
-assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined]));
-assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined]));
-assertExpr("({})", objExpr([]));
-assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")]));
-assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"),
-                                    objProp(ident("y"), lit(2), "init")]));
-assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),
-                                         objProp(ident("y"), lit(2), "init"),
-                                         objProp(ident("z"), lit(3), "init") ]));
-assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),
-                                           objProp(lit("y"), lit(2), "init"),
-                                           objProp(ident("z"), lit(3), "init") ]));
-assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"),
-                                             objProp(lit("y"), lit(2), "init"),
-                                             objProp(ident("z"), lit(3), "init") ]));
-assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"),
-                                             objProp(lit("y"), lit(2), "init"),
-                                             objProp(lit(3), lit(3), "init") ]));
-
-// Bug 571617: eliminate constant-folding
-assertExpr("2 + 3", binExpr("+", lit(2), lit(3)));
-
-// Bug 632026: constant-folding
-assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a"))));
-
-// Bug 632056: constant-folding
-program([exprStmt(ident("f")),
-         ifStmt(lit(1),
-                funDecl(ident("f"), [], blockStmt([])),
-                null)]).assert(Reflect.parse("f; if (1) function f(){}"));
-
-// statements
-
-assertStmt("throw 42", throwStmt(lit(42)));
-assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null)));
-assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null)));
-assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null)));
-assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null)));
-assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null)));
-assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null)));
-assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null)));
-assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null)));
-assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null)));
-assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null)));
-assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null)));
-assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null)));
-assertStmt("{ }", blockStmt([]));
-assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]));
-assertStmt(";", emptyStmt);
-assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null));
-assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true))));
-assertStmt("if (foo) { throw 1; throw 2; throw 3; }",
-           ifStmt(ident("foo"),
-                  blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),
-                  null));
-assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;",
-           ifStmt(ident("foo"),
-                  blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),
-                  exprStmt(lit(true))));
-assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo")))));
-assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo")))));
-assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([])));
-assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))])));
-assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([])));
-assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))])));
-assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo")));
-assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo")));
-assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }",
-           switchStmt(ident("foo"),
-                      [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),
-                        caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),
-                        defaultClause([ exprStmt(lit(3)) ]) ]));
-assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }",
-           switchStmt(ident("foo"),
-                      [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),
-                        caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),
-                        defaultClause([ exprStmt(lit(3)) ]),
-                        caseClause(lit(42), [ exprStmt(lit(42)) ]) ]));
-assertStmt("try { } catch (e) { }",
-           tryStmt(blockStmt([]),
-                   [],
-                   [ catchClause(ident("e"), null, blockStmt([])) ],
-                   null));
-assertStmt("try { } catch (e) { } finally { }",
-           tryStmt(blockStmt([]),
-                   [],
-                   [ catchClause(ident("e"), null, blockStmt([])) ],
-                   blockStmt([])));
-assertStmt("try { } finally { }",
-           tryStmt(blockStmt([]),
-                   [],
-                   [],
-                   blockStmt([])));
-
-// redeclarations (TOK_NAME nodes with lexdef)
-
-assertStmt("function f() { function g() { } function g() { } }",
-           funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
-                                              funDecl(ident("g"), [], blockStmt([]))])));
-
-assertStmt("function f() { function g() { } function g() { return 42 } }",
-           funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
-                                              funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));
-
-assertStmt("function f() { var x = 42; var x = 43; }",
-           funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]),
-                                              varDecl([declarator(ident("x"),lit(43))])])));
-
-// getters and setters
-
- assertExpr("({ get x() { return 42 } })",
-            objExpr([ objProp(ident("x"),
-                              funExpr(null, [], blockStmt([returnStmt(lit(42))])),
-                              "get" ) ]));
- assertExpr("({ set x(v) { return 42 } })",
-            objExpr([ objProp(ident("x"),
-                              funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])),
-                              "set" ) ]));
-
-}
-
-exports.testReflect = testReflect;
-
-}(typeof exports === 'undefined' ? this : exports));
diff --git a/tools/eslint/node_modules/espree/test/run.js b/tools/eslint/node_modules/espree/test/run.js
deleted file mode 100644
index bd303e058e40fb..00000000000000
--- a/tools/eslint/node_modules/espree/test/run.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-  Copyright (C) 2012 Yusuke Suzuki 
-  Copyright (C) 2012 Ariya Hidayat 
-
-  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  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.
-*/
-
-/*jslint node:true */
-
-(function () {
-    'use strict';
-
-    var child = require('child_process'),
-        nodejs = '"' + process.execPath + '"',
-        ret = 0,
-        suites,
-        index;
-
-    suites = [
-        'runner',
-        // TODO: Figure out what to do about this test...remove?
-        // 'compat',
-        'parselibs'
-    ];
-
-    function nextTest() {
-        var suite = suites[index];
-
-        if (index < suites.length) {
-            child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) {
-                if (stdout) {
-                    process.stdout.write(suite + ': ' + stdout);
-                }
-                if (stderr) {
-                    process.stderr.write(suite + ': ' + stderr);
-                }
-                if (err) {
-                    ret = err.code;
-                }
-                index += 1;
-                nextTest();
-            });
-        } else {
-            process.exit(ret);
-        }
-    }
-
-    index = 0;
-    nextTest();
-}());
diff --git a/tools/eslint/node_modules/espree/test/runner.js b/tools/eslint/node_modules/espree/test/runner.js
deleted file mode 100644
index a29f29e1b407b3..00000000000000
--- a/tools/eslint/node_modules/espree/test/runner.js
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
-  Copyright (C) 2012 Ariya Hidayat 
-  Copyright (C) 2012 Joost-Wim Boekesteijn 
-  Copyright (C) 2012 Yusuke Suzuki 
-  Copyright (C) 2012 Arpad Borsos 
-  Copyright (C) 2011 Ariya Hidayat 
-  Copyright (C) 2011 Yusuke Suzuki 
-  Copyright (C) 2011 Arpad Borsos 
-
-  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  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.
-*/
-
-/*jslint browser:true node:true */
-/*global espree:true, testFixture:true */
-
-var runTests;
-
-// Special handling for regular expression literal since we need to
-// convert it to a string literal, otherwise it will be decoded
-// as object "{}" and the regular expression would be lost.
-function adjustRegexLiteral(key, value) {
-    'use strict';
-    if (key === 'value' && value instanceof RegExp) {
-        value = value.toString();
-    }
-    return value;
-}
-
-function NotMatchingError(expected, actual) {
-    'use strict';
-    Error.call(this, 'Expected ');
-    this.expected = expected;
-    this.actual = actual;
-}
-NotMatchingError.prototype = new Error();
-
-function errorToObject(e) {
-    'use strict';
-    var msg = e.toString();
-
-    // Opera 9.64 produces an non-standard string in toString().
-    if (msg.substr(0, 6) !== 'Error:') {
-        if (typeof e.message === 'string') {
-            msg = 'Error: ' + e.message;
-        }
-    }
-
-    return {
-        index: e.index,
-        lineNumber: e.lineNumber,
-        column: e.column,
-        message: msg
-    };
-}
-
-function sortedObject(o) {
-    if (o === null) {
-        return o;
-    }
-    if (o instanceof Array) {
-        return o.map(sortedObject);
-    }
-    if (typeof o !== 'object') {
-        return o;
-    }
-    if (o instanceof RegExp) {
-        return o;
-    }
-    var keys = Object.keys(o);
-    var result = {
-        range: undefined,
-        loc: undefined
-    };
-    keys.forEach(function (key) {
-        if (o.hasOwnProperty(key)){
-            result[key] = sortedObject(o[key]);
-        }
-    });
-    return result;
-}
-
-function hasAttachedComment(syntax) {
-    var key;
-    for (key in syntax) {
-        if (key === 'leadingComments' || key === 'trailingComments') {
-            return true;
-        }
-       if (typeof syntax[key] === 'object' && syntax[key] !== null) {
-           if (hasAttachedComment(syntax[key])) {
-               return true;
-           }
-       }
-    }
-    return false;
-}
-
-function testParse(espree, code, syntax) {
-    'use strict';
-    var expected, tree, actual, options, StringObject, i, len, err;
-
-    // alias, so that JSLint does not complain.
-    StringObject = String;
-
-    options = {
-        comment: (typeof syntax.comments !== 'undefined'),
-        range: true,
-        loc: true,
-        tokens: (typeof syntax.tokens !== 'undefined'),
-        raw: true,
-        tolerant: (typeof syntax.errors !== 'undefined'),
-        source: null
-    };
-
-    if (options.comment) {
-        options.attachComment = hasAttachedComment(syntax);
-    }
-
-    if (typeof syntax.tokens !== 'undefined') {
-        if (syntax.tokens.length > 0) {
-            options.range = (typeof syntax.tokens[0].range !== 'undefined');
-            options.loc = (typeof syntax.tokens[0].loc !== 'undefined');
-        }
-    }
-
-    if (typeof syntax.comments !== 'undefined') {
-        if (syntax.comments.length > 0) {
-            options.range = (typeof syntax.comments[0].range !== 'undefined');
-            options.loc = (typeof syntax.comments[0].loc !== 'undefined');
-        }
-    }
-
-    if (options.loc) {
-        options.source = syntax.loc.source;
-    }
-
-    syntax = sortedObject(syntax);
-    expected = JSON.stringify(syntax, null, 4);
-    try {
-        // Some variations of the options.
-        tree = espree.parse(code, { tolerant: options.tolerant });
-        tree = espree.parse(code, { tolerant: options.tolerant, range: true });
-        tree = espree.parse(code, { tolerant: options.tolerant, loc: true });
-
-        tree = espree.parse(code, options);
-        tree = (options.comment || options.tokens || options.tolerant) ? tree : tree.body[0];
-
-        if (options.tolerant) {
-            for (i = 0, len = tree.errors.length; i < len; i += 1) {
-                tree.errors[i] = errorToObject(tree.errors[i]);
-            }
-        }
-        tree = sortedObject(tree);
-        actual = JSON.stringify(tree, adjustRegexLiteral, 4);
-
-        // Only to ensure that there is no error when using string object.
-        espree.parse(new StringObject(code), options);
-
-    } catch (e) {
-        throw new NotMatchingError(expected, e.toString());
-    }
-    if (expected !== actual) {
-        throw new NotMatchingError(expected, actual);
-    }
-
-    function filter(key, value) {
-        if (key === 'value' && value instanceof RegExp) {
-            value = value.toString();
-        }
-        return (key === 'loc' || key === 'range') ? undefined : value;
-    }
-
-    if (options.tolerant) {
-        return;
-    }
-
-
-    // Check again without any location info.
-    options.range = false;
-    options.loc = false;
-    syntax = sortedObject(syntax);
-    expected = JSON.stringify(syntax, filter, 4);
-    try {
-        tree = espree.parse(code, options);
-        tree = (options.comment || options.tokens) ? tree : tree.body[0];
-
-        if (options.tolerant) {
-            for (i = 0, len = tree.errors.length; i < len; i += 1) {
-                tree.errors[i] = errorToObject(tree.errors[i]);
-            }
-        }
-        tree = sortedObject(tree);
-        actual = JSON.stringify(tree, filter, 4);
-    } catch (e) {
-        throw new NotMatchingError(expected, e.toString());
-    }
-    if (expected !== actual) {
-        throw new NotMatchingError(expected, actual);
-    }
-}
-
-function testTokenize(espree, code, tokens) {
-    'use strict';
-    var options, expected, actual, tree;
-
-    options = {
-        comment: true,
-        tolerant: true,
-        loc: true,
-        range: true
-    };
-
-    expected = JSON.stringify(tokens, null, 4);
-
-    try {
-        tree = espree.tokenize(code, options);
-        actual = JSON.stringify(tree, null, 4);
-    } catch (e) {
-        throw new NotMatchingError(expected, e.toString());
-    }
-    if (expected !== actual) {
-        throw new NotMatchingError(expected, actual);
-    }
-}
-
-function testError(espree, code, exception) {
-    'use strict';
-    var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize;
-
-    // Different parsing options should give the same error.
-    options = [
-        {},
-        { comment: true },
-        { raw: true },
-        { raw: true, comment: true }
-    ];
-
-    // If handleInvalidRegexFlag is true, an invalid flag in a regular expression
-    // will throw an exception. In some old version V8, this is not the case
-    // and hence handleInvalidRegexFlag is false.
-    handleInvalidRegexFlag = false;
-    try {
-        'test'.match(new RegExp('[a-z]', 'x'));
-    } catch (e) {
-        handleInvalidRegexFlag = true;
-    }
-
-    exception.description = exception.message.replace(/Error: Line [0-9]+: /, '');
-
-    if (exception.tokenize) {
-        tokenize = true;
-        exception.tokenize = undefined;
-    }
-    expected = JSON.stringify(exception);
-
-    for (i = 0; i < options.length; i += 1) {
-
-        try {
-            if (tokenize) {
-                espree.tokenize(code, options[i])
-            } else {
-                espree.parse(code, options[i]);
-            }
-        } catch (e) {
-            err = errorToObject(e);
-            err.description = e.description;
-            actual = JSON.stringify(err);
-        }
-
-        if (expected !== actual) {
-
-            // Compensate for old V8 which does not handle invalid flag.
-            if (exception.message.indexOf('Invalid regular expression') > 0) {
-                if (typeof actual === 'undefined' && !handleInvalidRegexFlag) {
-                    return;
-                }
-            }
-
-            throw new NotMatchingError(expected, actual);
-        }
-
-    }
-}
-
-function testAPI(espree, code, result) {
-    'use strict';
-    var expected, res, actual;
-
-    expected = JSON.stringify(result.result, null, 4);
-    try {
-        if (typeof result.property !== 'undefined') {
-            res = espree[result.property];
-        } else {
-            res = espree[result.call].apply(espree, result.args);
-        }
-        actual = JSON.stringify(res, adjustRegexLiteral, 4);
-    } catch (e) {
-        throw new NotMatchingError(expected, e.toString());
-    }
-    if (expected !== actual) {
-        throw new NotMatchingError(expected, actual);
-    }
-}
-
-function runTest(espree, code, result) {
-    'use strict';
-    if (result.hasOwnProperty('lineNumber')) {
-        testError(espree, code, result);
-    } else if (result.hasOwnProperty('result')) {
-        testAPI(espree, code, result);
-    } else if (result instanceof Array) {
-        testTokenize(espree, code, result);
-    } else {
-        testParse(espree, code, result);
-    }
-}
-
-if (typeof window !== 'undefined') {
-    // Run all tests in a browser environment.
-    runTests = function () {
-        'use strict';
-        var total = 0,
-            failures = 0,
-            category,
-            fixture,
-            source,
-            tick,
-            expected,
-            index,
-            len;
-
-        function setText(el, str) {
-            if (typeof el.innerText === 'string') {
-                el.innerText = str;
-            } else {
-                el.textContent = str;
-            }
-        }
-
-        function startCategory(category) {
-            var report, e;
-            report = document.getElementById('report');
-            e = document.createElement('h4');
-            setText(e, category);
-            report.appendChild(e);
-        }
-
-        function reportSuccess(code) {
-            var report, e;
-            report = document.getElementById('report');
-            e = document.createElement('pre');
-            e.setAttribute('class', 'code');
-            setText(e, code);
-            report.appendChild(e);
-        }
-
-        function reportFailure(code, expected, actual) {
-            var report, e;
-
-            report = document.getElementById('report');
-
-            e = document.createElement('p');
-            setText(e, 'Code:');
-            report.appendChild(e);
-
-            e = document.createElement('pre');
-            e.setAttribute('class', 'code');
-            setText(e, code);
-            report.appendChild(e);
-
-            e = document.createElement('p');
-            setText(e, 'Expected');
-            report.appendChild(e);
-
-            e = document.createElement('pre');
-            e.setAttribute('class', 'expected');
-            setText(e, expected);
-            report.appendChild(e);
-
-            e = document.createElement('p');
-            setText(e, 'Actual');
-            report.appendChild(e);
-
-            e = document.createElement('pre');
-            e.setAttribute('class', 'actual');
-            setText(e, actual);
-            report.appendChild(e);
-        }
-
-        setText(document.getElementById('version'), espree.version);
-
-        tick = new Date();
-        for (category in testFixture) {
-            if (testFixture.hasOwnProperty(category)) {
-                startCategory(category);
-                fixture = testFixture[category];
-                for (source in fixture) {
-                    if (fixture.hasOwnProperty(source)) {
-                        expected = fixture[source];
-                        total += 1;
-                        try {
-                            runTest(espree, source, expected);
-                            reportSuccess(source, JSON.stringify(expected, null, 4));
-                        } catch (e) {
-                            failures += 1;
-                            reportFailure(source, e.expected, e.actual);
-                        }
-                    }
-                }
-            }
-        }
-        tick = (new Date()) - tick;
-
-        if (failures > 0) {
-            document.getElementById('status').className = 'alert-box alert';
-            setText(document.getElementById('status'), total + ' tests. ' +
-                'Failures: ' + failures + '. ' + tick + ' ms.');
-        } else {
-            document.getElementById('status').className = 'alert-box success';
-            setText(document.getElementById('status'), total + ' tests. ' +
-                'No failure. ' + tick + ' ms.');
-        }
-    };
-} else {
-    (function () {
-        'use strict';
-
-        var espree = require('../espree'),
-            diff = require('json-diff').diffString,
-            total = 0,
-            failures = [],
-            tick = new Date(),
-            expected,
-            header,
-            testFixture = require("./test");
-
-        Object.keys(testFixture).forEach(function (category) {
-            Object.keys(testFixture[category]).forEach(function (source) {
-                total += 1;
-                expected = testFixture[category][source];
-                try {
-                    runTest(espree, source, expected);
-                } catch (e) {
-                    e.source = source;
-                    failures.push(e);
-                }
-            });
-        });
-        tick = (new Date()) - tick;
-
-        header = total + ' tests. ' + failures.length + ' failures. ' +
-            tick + ' ms';
-        if (failures.length) {
-            console.error(header);
-            failures.forEach(function (failure) {
-                try {
-                    var expectedObject = JSON.parse(failure.expected);
-                    var actualObject = JSON.parse(failure.actual);
-
-                    console.error(failure.source + ': Expected\n    ' +
-                        failure.expected.split('\n').join('\n    ') +
-                        '\nto match\n    ' + failure.actual + '\nDiff:\n' +
-                        diff(expectedObject, actualObject));
-                } catch (ex) {
-                    console.error(failure.source + ': Expected\n    ' +
-                        failure.expected.split('\n').join('\n    ') +
-                        '\nto match\n    ' + failure.actual);
-                }
-            });
-        } else {
-            console.log(header);
-        }
-        process.exit(failures.length === 0 ? 0 : 1);
-    }());
-}
diff --git a/tools/eslint/node_modules/espree/test/test.js b/tools/eslint/node_modules/espree/test/test.js
deleted file mode 100644
index 93193c7ea5d0e0..00000000000000
--- a/tools/eslint/node_modules/espree/test/test.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @fileoverview Tests for parsing/tokenization.
- * @author Nicholas C. Zakas
- * @copyright 2014 Nicholas C. Zakas. All rights reserved.
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var shelljs = require("shelljs"),
-    fs = require("fs"),
-    path = require("path");
-
-//------------------------------------------------------------------------------
-// Processing
-//------------------------------------------------------------------------------
-
-var files = shelljs.find("./tests/fixtures/ast");
-
-files.filter(function(filename) {
-    return path.extname(filename) === ".json";
-}).forEach(function(filename) {
-    var basename = path.basename(filename, ".json");
-    exports[basename] = JSON.parse(fs.readFileSync(filename, "utf8"), function(key, value) {
-
-        // JSON can't represent undefined, so we use a special value
-        if (value === "espree@undefined") {
-            return undefined;
-        } else {
-            return value;
-        }
-    });
-});
diff --git a/tools/eslint/node_modules/escope/node_modules/esrecurse/README.md b/tools/eslint/node_modules/esrecurse/README.md
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/esrecurse/README.md
rename to tools/eslint/node_modules/esrecurse/README.md
diff --git a/tools/eslint/node_modules/escope/node_modules/esrecurse/esrecurse.js b/tools/eslint/node_modules/esrecurse/esrecurse.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/esrecurse/esrecurse.js
rename to tools/eslint/node_modules/esrecurse/esrecurse.js
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/LICENSE.BSD b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/estraverse/LICENSE.BSD
rename to tools/eslint/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/README.md b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/README.md
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/estraverse/README.md
rename to tools/eslint/node_modules/esrecurse/node_modules/estraverse/README.md
diff --git a/tools/eslint/node_modules/escope/node_modules/estraverse/estraverse.js b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/estraverse.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/estraverse/estraverse.js
rename to tools/eslint/node_modules/esrecurse/node_modules/estraverse/estraverse.js
diff --git a/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json
new file mode 100644
index 00000000000000..243dbc38f21f9c
--- /dev/null
+++ b/tools/eslint/node_modules/esrecurse/node_modules/estraverse/package.json
@@ -0,0 +1,92 @@
+{
+  "_args": [
+    [
+      "estraverse@~3.1.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/esrecurse"
+    ]
+  ],
+  "_from": "estraverse@>=3.1.0 <3.2.0",
+  "_id": "estraverse@3.1.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/esrecurse/estraverse",
+  "_npmUser": {
+    "email": "utatane.tea@gmail.com",
+    "name": "constellation"
+  },
+  "_npmVersion": "2.0.0-alpha-5",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "estraverse",
+    "raw": "estraverse@~3.1.0",
+    "rawSpec": "~3.1.0",
+    "scope": null,
+    "spec": ">=3.1.0 <3.2.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/esrecurse"
+  ],
+  "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz",
+  "_shasum": "15e28a446b8b82bc700ccc8b96c78af4da0d6cba",
+  "_shrinkwrap": null,
+  "_spec": "estraverse@~3.1.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/esrecurse",
+  "bugs": {
+    "url": "https://github.com/estools/estraverse/issues"
+  },
+  "dependencies": {},
+  "description": "ECMAScript JS AST traversal functions",
+  "devDependencies": {
+    "chai": "^2.1.1",
+    "coffee-script": "^1.8.0",
+    "espree": "^1.11.0",
+    "gulp": "^3.8.10",
+    "gulp-bump": "^0.2.2",
+    "gulp-filter": "^2.0.0",
+    "gulp-git": "^1.0.1",
+    "gulp-tag-version": "^1.2.1",
+    "jshint": "^2.5.6",
+    "mocha": "^2.1.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "15e28a446b8b82bc700ccc8b96c78af4da0d6cba",
+    "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "gitHead": "166ebbe0a8d45ceb2391b6f5ef5d1bab6bfb267a",
+  "homepage": "https://github.com/estools/estraverse",
+  "licenses": [
+    {
+      "type": "BSD",
+      "url": "http://github.com/estools/estraverse/raw/master/LICENSE.BSD"
+    }
+  ],
+  "main": "estraverse.js",
+  "maintainers": [
+    {
+      "name": "constellation",
+      "email": "utatane.tea@gmail.com"
+    },
+    {
+      "name": "michaelficarra",
+      "email": "npm@michael.ficarra.me"
+    }
+  ],
+  "name": "estraverse",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/estools/estraverse.git"
+  },
+  "scripts": {
+    "lint": "jshint estraverse.js",
+    "test": "npm run-script lint && npm run-script unit-test",
+    "unit-test": "mocha --compilers coffee:coffee-script/register"
+  },
+  "version": "3.1.0"
+}
diff --git a/tools/eslint/node_modules/esrecurse/package.json b/tools/eslint/node_modules/esrecurse/package.json
new file mode 100644
index 00000000000000..71f5620cce5111
--- /dev/null
+++ b/tools/eslint/node_modules/esrecurse/package.json
@@ -0,0 +1,96 @@
+{
+  "_args": [
+    [
+      "esrecurse@^3.1.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope"
+    ]
+  ],
+  "_from": "esrecurse@>=3.1.1 <4.0.0",
+  "_id": "esrecurse@3.1.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/esrecurse",
+  "_npmUser": {
+    "email": "utatane.tea@gmail.com",
+    "name": "constellation"
+  },
+  "_npmVersion": "2.0.0-alpha-5",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "esrecurse",
+    "raw": "esrecurse@^3.1.1",
+    "rawSpec": "^3.1.1",
+    "scope": null,
+    "spec": ">=3.1.1 <4.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/escope"
+  ],
+  "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
+  "_shasum": "8feb963699d4d1b2d65a576cd4b1296672a0f0e9",
+  "_shrinkwrap": null,
+  "_spec": "esrecurse@^3.1.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/escope",
+  "bugs": {
+    "url": "https://github.com/estools/esrecurse/issues"
+  },
+  "dependencies": {
+    "estraverse": "~3.1.0"
+  },
+  "description": "ECMAScript scope analyzer",
+  "devDependencies": {
+    "chai": "^2.1.1",
+    "coffee-script": "^1.9.1",
+    "esprima": "^2.1.0",
+    "gulp": "~3.8.10",
+    "gulp-bump": "^0.2.2",
+    "gulp-eslint": "^0.6.0",
+    "gulp-filter": "^2.0.2",
+    "gulp-git": "^1.1.0",
+    "gulp-mocha": "~2.0.0",
+    "gulp-tag-version": "^1.2.1",
+    "jsdoc": "~3.3.0-alpha10",
+    "minimist": "^1.1.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "8feb963699d4d1b2d65a576cd4b1296672a0f0e9",
+    "tarball": "http://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "gitHead": "600a8aac5e7b313875a873134fd110b47a76fc77",
+  "homepage": "http://github.com/estools/esrecurse",
+  "licenses": [
+    {
+      "type": "BSD",
+      "url": "http://github.com/estools/esrecurse/raw/master/LICENSE.BSD"
+    }
+  ],
+  "main": "esrecurse.js",
+  "maintainers": [
+    {
+      "name": "constellation",
+      "email": "utatane.tea@gmail.com"
+    },
+    {
+      "name": "michaelficarra",
+      "email": "npm@michael.ficarra.me"
+    }
+  ],
+  "name": "esrecurse",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/estools/esrecurse.git"
+  },
+  "scripts": {
+    "lint": "gulp lint",
+    "test": "gulp travis",
+    "unit-test": "gulp test"
+  },
+  "version": "3.1.1"
+}
diff --git a/tools/eslint/node_modules/estraverse-fb/.npmignore b/tools/eslint/node_modules/estraverse-fb/.npmignore
deleted file mode 100644
index da23d0d4bab050..00000000000000
--- a/tools/eslint/node_modules/estraverse-fb/.npmignore
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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
-# Deployed apps should consider commenting this line out:
-# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
-node_modules
diff --git a/tools/eslint/node_modules/estraverse-fb/.travis.yml b/tools/eslint/node_modules/estraverse-fb/.travis.yml
deleted file mode 100644
index ffb9f710ac283a..00000000000000
--- a/tools/eslint/node_modules/estraverse-fb/.travis.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-language: node_js
-node_js: '0.10'
diff --git a/tools/eslint/node_modules/estraverse-fb/package.json b/tools/eslint/node_modules/estraverse-fb/package.json
index c96ec2f456d784..44d082f67dca9e 100644
--- a/tools/eslint/node_modules/estraverse-fb/package.json
+++ b/tools/eslint/node_modules/estraverse-fb/package.json
@@ -1,60 +1,86 @@
 {
-  "name": "estraverse-fb",
-  "version": "1.3.1",
-  "description": "Drop-in for estraverse that enables traversal over React's JSX nodes.",
-  "main": "estraverse-fb.js",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/RReverser/estraverse-fb.git"
+  "_args": [
+    [
+      "estraverse-fb@^1.3.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "estraverse-fb@>=1.3.1 <2.0.0",
+  "_id": "estraverse-fb@1.3.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/estraverse-fb",
+  "_npmUser": {
+    "email": "me@rreverser.com",
+    "name": "rreverser"
   },
-  "keywords": [
-    "traverse",
-    "ast",
-    "react",
-    "jsx"
+  "_npmVersion": "1.4.28",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "estraverse-fb",
+    "raw": "estraverse-fb@^1.3.1",
+    "rawSpec": "^1.3.1",
+    "scope": null,
+    "spec": ">=1.3.1 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
   ],
+  "_resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz",
+  "_shasum": "160e75a80e605b08ce894bcce2fe3e429abf92bf",
+  "_shrinkwrap": null,
+  "_spec": "estraverse-fb@^1.3.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
   "author": {
-    "name": "Ingvar Stepanyan",
     "email": "me@rreverser.com",
+    "name": "Ingvar Stepanyan",
     "url": "https://github.com/RReverser"
   },
-  "license": "MIT",
-  "scripts": {
-    "test": "mocha"
-  },
-  "peerDependencies": {
-    "estraverse": "*"
+  "bugs": {
+    "url": "https://github.com/RReverser/estraverse-fb/issues"
   },
+  "dependencies": {},
+  "description": "Drop-in for estraverse that enables traversal over React's JSX nodes.",
   "devDependencies": {
     "chai": "^1.9.1",
     "esprima-fb": "^8001.1001.0-dev-harmony-fb",
     "estraverse": "^1.7.0",
     "mocha": "^1.20.0"
   },
-  "gitHead": "776d565d897ad91e20efedd926972c7ab0c7221e",
-  "bugs": {
-    "url": "https://github.com/RReverser/estraverse-fb/issues"
+  "directories": {},
+  "dist": {
+    "shasum": "160e75a80e605b08ce894bcce2fe3e429abf92bf",
+    "tarball": "http://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz"
   },
+  "gitHead": "776d565d897ad91e20efedd926972c7ab0c7221e",
   "homepage": "https://github.com/RReverser/estraverse-fb",
-  "_id": "estraverse-fb@1.3.1",
-  "_shasum": "160e75a80e605b08ce894bcce2fe3e429abf92bf",
-  "_from": "estraverse-fb@>=1.3.1 <2.0.0",
-  "_npmVersion": "1.4.28",
-  "_npmUser": {
-    "name": "rreverser",
-    "email": "me@rreverser.com"
-  },
+  "keywords": [
+    "ast",
+    "jsx",
+    "react",
+    "traverse"
+  ],
+  "license": "MIT",
+  "main": "estraverse-fb.js",
   "maintainers": [
     {
       "name": "rreverser",
       "email": "me@rreverser.com"
     }
   ],
-  "dist": {
-    "shasum": "160e75a80e605b08ce894bcce2fe3e429abf92bf",
-    "tarball": "http://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz"
+  "name": "estraverse-fb",
+  "optionalDependencies": {},
+  "peerDependencies": {
+    "estraverse": "*"
   },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz",
-  "readme": "ERROR: No README data found!"
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/RReverser/estraverse-fb.git"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "version": "1.3.1"
 }
diff --git a/tools/eslint/node_modules/estraverse-fb/test.js b/tools/eslint/node_modules/estraverse-fb/test.js
deleted file mode 100644
index e0fca88a01689a..00000000000000
--- a/tools/eslint/node_modules/estraverse-fb/test.js
+++ /dev/null
@@ -1,116 +0,0 @@
-var assert = require('chai').assert;
-var parse = require('esprima-fb').parse;
-var originalKeys = require('./keys');
-
-describe('works', function () {
-	var code = ['class MyClass{',
-		'x: number;',
-		'y: number;',
-		'constructor(x: number, y: number){',
-			'this.x = x;',
-			'this.y = y;',
-		'}',
-		'render(){',
-			'return !{}',
-		'}',
-	'}'].join('\n');
-
-	var ast = parse(code);
-
-	var expectedKeys = [
-		'ClassProperty',
-		'TypeAnnotation',
-		'NumberTypeAnnotation',
-		'ClassProperty',
-		'TypeAnnotation',
-		'NumberTypeAnnotation',
-		'XJSElement',
-		'XJSOpeningElement',
-		'XJSNamespacedName',
-		'XJSIdentifier',
-		'XJSIdentifier',
-		'XJSAttribute',
-		'XJSIdentifier',
-		'XJSAttribute',
-		'XJSIdentifier',
-		'XJSExpressionContainer',
-		'XJSSpreadAttribute',
-		'XJSClosingElement',
-		'XJSNamespacedName',
-		'XJSIdentifier',
-		'XJSIdentifier',
-		'XJSElement',
-		'XJSOpeningElement',
-		'XJSMemberExpression',
-		'XJSIdentifier',
-		'XJSIdentifier',
-		'XJSClosingElement',
-		'XJSMemberExpression',
-		'XJSIdentifier',
-		'XJSIdentifier',
-		'XJSExpressionContainer',
-		'XJSEmptyExpression'
-	];
-
-	beforeEach(function () {
-		for (var key in require.cache) {
-			delete require.cache[key];
-		}
-	});
-
-	it('directly from dependency', function () {
-		var traverse = require('./').traverse;
-		var actualKeys = [];
-		var actualTypeKeys = [];
-
-		traverse(ast, {
-			enter: function (node) {
-				if (originalKeys[node.type] != null) {
-					actualKeys.push(node.type);
-				}
-			}
-		});
-
-		assert.deepEqual(actualKeys, expectedKeys);
-	});
-
-	it('in injected mode', function () {
-		require('./');
-		var traverse = require('estraverse').traverse;
-		var actualKeys = [];
-
-		traverse(ast, {
-			enter: function (node) {
-				if (originalKeys[node.type] != null) {
-					actualKeys.push(node.type);
-				}
-			}
-		});
-
-		assert.deepEqual(actualKeys, expectedKeys);
-	});
-
-	it('in single-pass mode', function () {
-		var traverse = require('estraverse').traverse;
-		var keys = require('./keys');
-
-		var actualKeys = [];
-
-		traverse(ast, {
-			enter: function (node) {
-				if (originalKeys[node.type] != null) {
-					actualKeys.push(node.type);
-				}
-			},
-			keys: keys
-		});
-
-		assert.throws(function () {
-			traverse(ast, {
-				enter: function () {}
-			});
-		});
-
-		assert.deepEqual(actualKeys, expectedKeys);
-	});
-});
diff --git a/tools/eslint/node_modules/estraverse/.jshintrc b/tools/eslint/node_modules/estraverse/.jshintrc
deleted file mode 100644
index f642dae7683b81..00000000000000
--- a/tools/eslint/node_modules/estraverse/.jshintrc
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "curly": true,
-  "eqeqeq": true,
-  "immed": true,
-  "eqnull": true,
-  "latedef": true,
-  "noarg": true,
-  "noempty": true,
-  "quotmark": "single",
-  "undef": true,
-  "unused": true,
-  "strict": true,
-  "trailing": true,
-
-  "node": true
-}
diff --git a/tools/eslint/node_modules/estraverse/README.md b/tools/eslint/node_modules/estraverse/README.md
index 4242c513309e9a..acefff6473c19c 100644
--- a/tools/eslint/node_modules/estraverse/README.md
+++ b/tools/eslint/node_modules/estraverse/README.md
@@ -66,7 +66,7 @@ var tree = {
 estraverse.traverse(tree, {
     enter: function (node) { },
 
-    // Extending the exising traversing rules.
+    // Extending the existing traversing rules.
     keys: {
         // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
         TestExpression: ['argument']
diff --git a/tools/eslint/node_modules/estraverse/estraverse.js b/tools/eslint/node_modules/estraverse/estraverse.js
index 1ea5caf21f01ba..0de6cec24f3ec6 100644
--- a/tools/eslint/node_modules/estraverse/estraverse.js
+++ b/tools/eslint/node_modules/estraverse/estraverse.js
@@ -506,7 +506,7 @@
                 }
 
                 node = element.node;
-                nodeType = element.wrap || node.type;
+                nodeType = node.type || element.wrap;
                 candidates = this.__keys[nodeType];
                 if (!candidates) {
                     if (this.__fallback) {
@@ -660,7 +660,7 @@
                 continue;
             }
 
-            nodeType = element.wrap || node.type;
+            nodeType = node.type || element.wrap;
             candidates = this.__keys[nodeType];
             if (!candidates) {
                 if (this.__fallback) {
diff --git a/tools/eslint/node_modules/estraverse/gulpfile.js b/tools/eslint/node_modules/estraverse/gulpfile.js
deleted file mode 100644
index 8772bbcca542a8..00000000000000
--- a/tools/eslint/node_modules/estraverse/gulpfile.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-  Copyright (C) 2014 Yusuke Suzuki 
-
-  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  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.
-*/
-
-'use strict';
-
-var gulp = require('gulp'),
-    git = require('gulp-git'),
-    bump = require('gulp-bump'),
-    filter = require('gulp-filter'),
-    tagVersion = require('gulp-tag-version');
-
-var TEST = [ 'test/*.js' ];
-var POWERED = [ 'powered-test/*.js' ];
-var SOURCE = [ 'src/**/*.js' ];
-
-/**
- * Bumping version number and tagging the repository with it.
- * Please read http://semver.org/
- *
- * You can use the commands
- *
- *     gulp patch     # makes v0.1.0 -> v0.1.1
- *     gulp feature   # makes v0.1.1 -> v0.2.0
- *     gulp release   # makes v0.2.1 -> v1.0.0
- *
- * To bump the version numbers accordingly after you did a patch,
- * introduced a feature or made a backwards-incompatible release.
- */
-
-function inc(importance) {
-    // get all the files to bump version in
-    return gulp.src(['./package.json'])
-        // bump the version number in those files
-        .pipe(bump({type: importance}))
-        // save it back to filesystem
-        .pipe(gulp.dest('./'))
-        // commit the changed version number
-        .pipe(git.commit('Bumps package version'))
-        // read only one file to get the version number
-        .pipe(filter('package.json'))
-        // **tag it in the repository**
-        .pipe(tagVersion({
-            prefix: ''
-        }));
-}
-
-gulp.task('patch', [ ], function () { return inc('patch'); })
-gulp.task('minor', [ ], function () { return inc('minor'); })
-gulp.task('major', [ ], function () { return inc('major'); })
diff --git a/tools/eslint/node_modules/estraverse/package.json b/tools/eslint/node_modules/estraverse/package.json
index c0a8b690c74c31..c419d453143dae 100644
--- a/tools/eslint/node_modules/estraverse/package.json
+++ b/tools/eslint/node_modules/estraverse/package.json
@@ -1,26 +1,44 @@
 {
-  "name": "estraverse",
-  "description": "ECMAScript JS AST traversal functions",
-  "homepage": "https://github.com/estools/estraverse",
-  "main": "estraverse.js",
-  "version": "4.1.0",
-  "engines": {
-    "node": ">=0.10.0"
+  "_args": [
+    [
+      "estraverse@^4.1.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "estraverse@>=4.1.1 <5.0.0",
+  "_id": "estraverse@4.1.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/estraverse",
+  "_nodeVersion": "4.1.1",
+  "_npmUser": {
+    "email": "utatane.tea@gmail.com",
+    "name": "constellation"
   },
-  "maintainers": [
-    {
-      "name": "constellation",
-      "email": "utatane.tea@gmail.com"
-    },
-    {
-      "name": "michaelficarra",
-      "email": "npm@michael.ficarra.me"
-    }
+  "_npmVersion": "2.14.4",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "estraverse",
+    "raw": "estraverse@^4.1.1",
+    "rawSpec": "^4.1.1",
+    "scope": null,
+    "spec": ">=4.1.1 <5.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint",
+    "/eslint/escope"
   ],
-  "repository": {
-    "type": "git",
-    "url": "git+ssh://git@github.com/estools/estraverse.git"
+  "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",
+  "_shasum": "f6caca728933a850ef90661d0e17982ba47111a2",
+  "_shrinkwrap": null,
+  "_spec": "estraverse@^4.1.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
+  "bugs": {
+    "url": "https://github.com/estools/estraverse/issues"
   },
+  "dependencies": {},
+  "description": "ECMAScript JS AST traversal functions",
   "devDependencies": {
     "chai": "^2.1.1",
     "coffee-script": "^1.8.0",
@@ -33,35 +51,43 @@
     "jshint": "^2.5.6",
     "mocha": "^2.1.0"
   },
-  "licenses": [
+  "directories": {},
+  "dist": {
+    "shasum": "f6caca728933a850ef90661d0e17982ba47111a2",
+    "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "gitHead": "bbcccbfe98296585e4311c8755e1d00dcd581e3c",
+  "homepage": "https://github.com/estools/estraverse",
+  "license": "BSD-2-Clause",
+  "main": "estraverse.js",
+  "maintainers": [
+    {
+      "name": "constellation",
+      "email": "utatane.tea@gmail.com"
+    },
     {
-      "type": "BSD",
-      "url": "http://github.com/estools/estraverse/raw/master/LICENSE.BSD"
+      "name": "michaelficarra",
+      "email": "npm@michael.ficarra.me"
+    },
+    {
+      "name": "nzakas",
+      "email": "nicholas@nczconsulting.com"
     }
   ],
+  "name": "estraverse",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/estools/estraverse.git"
+  },
   "scripts": {
-    "test": "npm run-script lint && npm run-script unit-test",
     "lint": "jshint estraverse.js",
+    "test": "npm run-script lint && npm run-script unit-test",
     "unit-test": "mocha --compilers coffee:coffee-script/register"
   },
-  "gitHead": "347d52996336719b5910c7ffb5ff3ea8ecb87cf3",
-  "bugs": {
-    "url": "https://github.com/estools/estraverse/issues"
-  },
-  "_id": "estraverse@4.1.0",
-  "_shasum": "40f23a76092041be6467d7f235c933b670766e05",
-  "_from": "estraverse@>=4.1.0 <5.0.0",
-  "_npmVersion": "2.8.3",
-  "_nodeVersion": "1.8.1",
-  "_npmUser": {
-    "name": "constellation",
-    "email": "utatane.tea@gmail.com"
-  },
-  "dist": {
-    "shasum": "40f23a76092041be6467d7f235c933b670766e05",
-    "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz",
-  "readme": "ERROR: No README data found!"
+  "version": "4.1.1"
 }
diff --git a/tools/eslint/node_modules/esutils/LICENSE.BSD b/tools/eslint/node_modules/esutils/LICENSE.BSD
new file mode 100644
index 00000000000000..3e580c355a96e5
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/LICENSE.BSD
@@ -0,0 +1,19 @@
+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  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/tools/eslint/node_modules/esutils/README.md b/tools/eslint/node_modules/esutils/README.md
new file mode 100644
index 00000000000000..610d8bde66ff81
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/README.md
@@ -0,0 +1,169 @@
+### esutils [![Build Status](https://secure.travis-ci.org/estools/esutils.svg)](http://travis-ci.org/estools/esutils)
+esutils ([esutils](http://github.com/estools/esutils)) is
+utility box for ECMAScript language tools.
+
+### API
+
+### ast
+
+#### ast.isExpression(node)
+
+Returns true if `node` is an Expression as defined in ECMA262 edition 5.1 section
+[11](https://es5.github.io/#x11).
+
+#### ast.isStatement(node)
+
+Returns true if `node` is a Statement as defined in ECMA262 edition 5.1 section
+[12](https://es5.github.io/#x12).
+
+#### ast.isIterationStatement(node)
+
+Returns true if `node` is an IterationStatement as defined in ECMA262 edition
+5.1 section [12.6](https://es5.github.io/#x12.6).
+
+#### ast.isSourceElement(node)
+
+Returns true if `node` is a SourceElement as defined in ECMA262 edition 5.1
+section [14](https://es5.github.io/#x14).
+
+#### ast.trailingStatement(node)
+
+Returns `Statement?` if `node` has trailing `Statement`.
+```js
+if (cond)
+    consequent;
+```
+When taking this `IfStatement`, returns `consequent;` statement.
+
+#### ast.isProblematicIfStatement(node)
+
+Returns true if `node` is a problematic IfStatement. If `node` is a problematic `IfStatement`, `node` cannot be represented as an one on one JavaScript code.
+```js
+{
+    type: 'IfStatement',
+    consequent: {
+        type: 'WithStatement',
+        body: {
+            type: 'IfStatement',
+            consequent: {type: 'EmptyStatement'}
+        }
+    },
+    alternate: {type: 'EmptyStatement'}
+}
+```
+The above node cannot be represented as a JavaScript code, since the top level `else` alternate belongs to an inner `IfStatement`.
+
+
+### code
+
+#### code.isDecimalDigit(code)
+
+Return true if provided code is decimal digit.
+
+#### code.isHexDigit(code)
+
+Return true if provided code is hexadecimal digit.
+
+#### code.isOctalDigit(code)
+
+Return true if provided code is octal digit.
+
+#### code.isWhiteSpace(code)
+
+Return true if provided code is white space. White space characters are formally defined in ECMA262.
+
+#### code.isLineTerminator(code)
+
+Return true if provided code is line terminator. Line terminator characters are formally defined in ECMA262.
+
+#### code.isIdentifierStart(code)
+
+Return true if provided code can be the first character of ECMA262 Identifier. They are formally defined in ECMA262.
+
+#### code.isIdentifierPart(code)
+
+Return true if provided code can be the trailing character of ECMA262 Identifier. They are formally defined in ECMA262.
+
+### keyword
+
+#### keyword.isKeywordES5(id, strict)
+
+Returns `true` if provided identifier string is a Keyword or Future Reserved Word
+in ECMA262 edition 5.1. They are formally defined in ECMA262 sections
+[7.6.1.1](http://es5.github.io/#x7.6.1.1) and [7.6.1.2](http://es5.github.io/#x7.6.1.2),
+respectively. If the `strict` flag is truthy, this function additionally checks whether
+`id` is a Keyword or Future Reserved Word under strict mode.
+
+#### keyword.isKeywordES6(id, strict)
+
+Returns `true` if provided identifier string is a Keyword or Future Reserved Word
+in ECMA262 edition 6. They are formally defined in ECMA262 sections
+[11.6.2.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-keywords) and
+[11.6.2.2](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-future-reserved-words),
+respectively. If the `strict` flag is truthy, this function additionally checks whether
+`id` is a Keyword or Future Reserved Word under strict mode.
+
+#### keyword.isReservedWordES5(id, strict)
+
+Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 5.1.
+They are formally defined in ECMA262 section [7.6.1](http://es5.github.io/#x7.6.1).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is a Reserved Word under strict mode.
+
+#### keyword.isReservedWordES6(id, strict)
+
+Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 6.
+They are formally defined in ECMA262 section [11.6.2](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-reserved-words).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is a Reserved Word under strict mode.
+
+#### keyword.isRestrictedWord(id)
+
+Returns `true` if provided identifier string is one of `eval` or `arguments`.
+They are restricted in strict mode code throughout ECMA262 edition 5.1 and
+in ECMA262 edition 6 section [12.1.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-identifiers-static-semantics-early-errors).
+
+#### keyword.isIdentifierName(id)
+
+Return true if provided identifier string is an IdentifierName as specified in
+ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6).
+
+#### keyword.isIdentifierES5(id, strict)
+
+Return true if provided identifier string is an Identifier as specified in
+ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6). If the `strict`
+flag is truthy, this function additionally checks whether `id` is an Identifier
+under strict mode.
+
+#### keyword.isIdentifierES6(id, strict)
+
+Return true if provided identifier string is an Identifier as specified in
+ECMA262 edition 6 section [12.1](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-identifiers).
+If the `strict` flag is truthy, this function additionally checks whether `id`
+is an Identifier under strict mode.
+
+### License
+
+Copyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation)
+ (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
+
+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  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/tools/eslint/node_modules/esutils/lib/ast.js b/tools/eslint/node_modules/esutils/lib/ast.js
new file mode 100644
index 00000000000000..8faadae1ce736d
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/lib/ast.js
@@ -0,0 +1,144 @@
+/*
+  Copyright (C) 2013 Yusuke Suzuki 
+
+  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  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.
+*/
+
+(function () {
+    'use strict';
+
+    function isExpression(node) {
+        if (node == null) { return false; }
+        switch (node.type) {
+            case 'ArrayExpression':
+            case 'AssignmentExpression':
+            case 'BinaryExpression':
+            case 'CallExpression':
+            case 'ConditionalExpression':
+            case 'FunctionExpression':
+            case 'Identifier':
+            case 'Literal':
+            case 'LogicalExpression':
+            case 'MemberExpression':
+            case 'NewExpression':
+            case 'ObjectExpression':
+            case 'SequenceExpression':
+            case 'ThisExpression':
+            case 'UnaryExpression':
+            case 'UpdateExpression':
+                return true;
+        }
+        return false;
+    }
+
+    function isIterationStatement(node) {
+        if (node == null) { return false; }
+        switch (node.type) {
+            case 'DoWhileStatement':
+            case 'ForInStatement':
+            case 'ForStatement':
+            case 'WhileStatement':
+                return true;
+        }
+        return false;
+    }
+
+    function isStatement(node) {
+        if (node == null) { return false; }
+        switch (node.type) {
+            case 'BlockStatement':
+            case 'BreakStatement':
+            case 'ContinueStatement':
+            case 'DebuggerStatement':
+            case 'DoWhileStatement':
+            case 'EmptyStatement':
+            case 'ExpressionStatement':
+            case 'ForInStatement':
+            case 'ForStatement':
+            case 'IfStatement':
+            case 'LabeledStatement':
+            case 'ReturnStatement':
+            case 'SwitchStatement':
+            case 'ThrowStatement':
+            case 'TryStatement':
+            case 'VariableDeclaration':
+            case 'WhileStatement':
+            case 'WithStatement':
+                return true;
+        }
+        return false;
+    }
+
+    function isSourceElement(node) {
+      return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
+    }
+
+    function trailingStatement(node) {
+        switch (node.type) {
+        case 'IfStatement':
+            if (node.alternate != null) {
+                return node.alternate;
+            }
+            return node.consequent;
+
+        case 'LabeledStatement':
+        case 'ForStatement':
+        case 'ForInStatement':
+        case 'WhileStatement':
+        case 'WithStatement':
+            return node.body;
+        }
+        return null;
+    }
+
+    function isProblematicIfStatement(node) {
+        var current;
+
+        if (node.type !== 'IfStatement') {
+            return false;
+        }
+        if (node.alternate == null) {
+            return false;
+        }
+        current = node.consequent;
+        do {
+            if (current.type === 'IfStatement') {
+                if (current.alternate == null)  {
+                    return true;
+                }
+            }
+            current = trailingStatement(current);
+        } while (current);
+
+        return false;
+    }
+
+    module.exports = {
+        isExpression: isExpression,
+        isStatement: isStatement,
+        isIterationStatement: isIterationStatement,
+        isSourceElement: isSourceElement,
+        isProblematicIfStatement: isProblematicIfStatement,
+
+        trailingStatement: trailingStatement
+    };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/esutils/lib/code.js b/tools/eslint/node_modules/esutils/lib/code.js
new file mode 100644
index 00000000000000..2a7c19d63c89b3
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/lib/code.js
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2013-2014 Yusuke Suzuki 
+  Copyright (C) 2014 Ivan Nikulin 
+
+  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  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.
+*/
+
+(function () {
+    'use strict';
+
+    var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
+
+    // See `tools/generate-identifier-regex.js`.
+    ES5Regex = {
+        // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
+        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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/,
+        // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
+        NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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\u1380-\u138F\u13A0-\u13F4\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-\u19D9\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]/
+    };
+
+    ES6Regex = {
+        // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
+        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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930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15\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]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\uD87E[\uDC00-\uDE1D]/,
+        // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
+        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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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-\u13F4\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
+    };
+
+    function isDecimalDigit(ch) {
+        return 0x30 <= ch && ch <= 0x39;  // 0..9
+    }
+
+    function isHexDigit(ch) {
+        return 0x30 <= ch && ch <= 0x39 ||  // 0..9
+            0x61 <= ch && ch <= 0x66 ||     // a..f
+            0x41 <= ch && ch <= 0x46;       // A..F
+    }
+
+    function isOctalDigit(ch) {
+        return ch >= 0x30 && ch <= 0x37;  // 0..7
+    }
+
+    // 7.2 White Space
+
+    NON_ASCII_WHITESPACES = [
+        0x1680, 0x180E,
+        0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
+        0x202F, 0x205F,
+        0x3000,
+        0xFEFF
+    ];
+
+    function isWhiteSpace(ch) {
+        return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
+            ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
+    }
+
+    // 7.3 Line Terminators
+
+    function isLineTerminator(ch) {
+        return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
+    }
+
+    // 7.6 Identifier Names and Identifiers
+
+    function fromCodePoint(cp) {
+        if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
+        var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
+        var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
+        return cu1 + cu2;
+    }
+
+    IDENTIFIER_START = new Array(0x80);
+    for(ch = 0; ch < 0x80; ++ch) {
+        IDENTIFIER_START[ch] =
+            ch >= 0x61 && ch <= 0x7A ||  // a..z
+            ch >= 0x41 && ch <= 0x5A ||  // A..Z
+            ch === 0x24 || ch === 0x5F;  // $ (dollar) and _ (underscore)
+    }
+
+    IDENTIFIER_PART = new Array(0x80);
+    for(ch = 0; ch < 0x80; ++ch) {
+        IDENTIFIER_PART[ch] =
+            ch >= 0x61 && ch <= 0x7A ||  // a..z
+            ch >= 0x41 && ch <= 0x5A ||  // A..Z
+            ch >= 0x30 && ch <= 0x39 ||  // 0..9
+            ch === 0x24 || ch === 0x5F;  // $ (dollar) and _ (underscore)
+    }
+
+    function isIdentifierStartES5(ch) {
+        return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+    }
+
+    function isIdentifierPartES5(ch) {
+        return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+    }
+
+    function isIdentifierStartES6(ch) {
+        return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+    }
+
+    function isIdentifierPartES6(ch) {
+        return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+    }
+
+    module.exports = {
+        isDecimalDigit: isDecimalDigit,
+        isHexDigit: isHexDigit,
+        isOctalDigit: isOctalDigit,
+        isWhiteSpace: isWhiteSpace,
+        isLineTerminator: isLineTerminator,
+        isIdentifierStartES5: isIdentifierStartES5,
+        isIdentifierPartES5: isIdentifierPartES5,
+        isIdentifierStartES6: isIdentifierStartES6,
+        isIdentifierPartES6: isIdentifierPartES6
+    };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/esutils/lib/keyword.js b/tools/eslint/node_modules/esutils/lib/keyword.js
new file mode 100644
index 00000000000000..13c8c6a967caf0
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/lib/keyword.js
@@ -0,0 +1,165 @@
+/*
+  Copyright (C) 2013 Yusuke Suzuki 
+
+  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  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.
+*/
+
+(function () {
+    'use strict';
+
+    var code = require('./code');
+
+    function isStrictModeReservedWordES6(id) {
+        switch (id) {
+        case 'implements':
+        case 'interface':
+        case 'package':
+        case 'private':
+        case 'protected':
+        case 'public':
+        case 'static':
+        case 'let':
+            return true;
+        default:
+            return false;
+        }
+    }
+
+    function isKeywordES5(id, strict) {
+        // yield should not be treated as keyword under non-strict mode.
+        if (!strict && id === 'yield') {
+            return false;
+        }
+        return isKeywordES6(id, strict);
+    }
+
+    function isKeywordES6(id, strict) {
+        if (strict && isStrictModeReservedWordES6(id)) {
+            return true;
+        }
+
+        switch (id.length) {
+        case 2:
+            return (id === 'if') || (id === 'in') || (id === 'do');
+        case 3:
+            return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
+        case 4:
+            return (id === 'this') || (id === 'else') || (id === 'case') ||
+                (id === 'void') || (id === 'with') || (id === 'enum');
+        case 5:
+            return (id === 'while') || (id === 'break') || (id === 'catch') ||
+                (id === 'throw') || (id === 'const') || (id === 'yield') ||
+                (id === 'class') || (id === 'super');
+        case 6:
+            return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
+                (id === 'switch') || (id === 'export') || (id === 'import');
+        case 7:
+            return (id === 'default') || (id === 'finally') || (id === 'extends');
+        case 8:
+            return (id === 'function') || (id === 'continue') || (id === 'debugger');
+        case 10:
+            return (id === 'instanceof');
+        default:
+            return false;
+        }
+    }
+
+    function isReservedWordES5(id, strict) {
+        return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
+    }
+
+    function isReservedWordES6(id, strict) {
+        return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
+    }
+
+    function isRestrictedWord(id) {
+        return id === 'eval' || id === 'arguments';
+    }
+
+    function isIdentifierNameES5(id) {
+        var i, iz, ch;
+
+        if (id.length === 0) { return false; }
+
+        ch = id.charCodeAt(0);
+        if (!code.isIdentifierStartES5(ch)) {
+            return false;
+        }
+
+        for (i = 1, iz = id.length; i < iz; ++i) {
+            ch = id.charCodeAt(i);
+            if (!code.isIdentifierPartES5(ch)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    function decodeUtf16(lead, trail) {
+        return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
+    }
+
+    function isIdentifierNameES6(id) {
+        var i, iz, ch, lowCh, check;
+
+        if (id.length === 0) { return false; }
+
+        check = code.isIdentifierStartES6;
+        for (i = 0, iz = id.length; i < iz; ++i) {
+            ch = id.charCodeAt(i);
+            if (0xD800 <= ch && ch <= 0xDBFF) {
+                ++i;
+                if (i >= iz) { return false; }
+                lowCh = id.charCodeAt(i);
+                if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
+                    return false;
+                }
+                ch = decodeUtf16(ch, lowCh);
+            }
+            if (!check(ch)) {
+                return false;
+            }
+            check = code.isIdentifierPartES6;
+        }
+        return true;
+    }
+
+    function isIdentifierES5(id, strict) {
+        return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
+    }
+
+    function isIdentifierES6(id, strict) {
+        return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
+    }
+
+    module.exports = {
+        isKeywordES5: isKeywordES5,
+        isKeywordES6: isKeywordES6,
+        isReservedWordES5: isReservedWordES5,
+        isReservedWordES6: isReservedWordES6,
+        isRestrictedWord: isRestrictedWord,
+        isIdentifierNameES5: isIdentifierNameES5,
+        isIdentifierNameES6: isIdentifierNameES6,
+        isIdentifierES5: isIdentifierES5,
+        isIdentifierES6: isIdentifierES6
+    };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/esutils/lib/utils.js b/tools/eslint/node_modules/esutils/lib/utils.js
new file mode 100644
index 00000000000000..ce18faa6bc80fa
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/lib/utils.js
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2013 Yusuke Suzuki 
+
+  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  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.
+*/
+
+
+(function () {
+    'use strict';
+
+    exports.ast = require('./ast');
+    exports.code = require('./code');
+    exports.keyword = require('./keyword');
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/eslint/node_modules/esutils/package.json b/tools/eslint/node_modules/esutils/package.json
new file mode 100644
index 00000000000000..830b4f3383429e
--- /dev/null
+++ b/tools/eslint/node_modules/esutils/package.json
@@ -0,0 +1,97 @@
+{
+  "_args": [
+    [
+      "esutils@^2.0.2",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "esutils@>=2.0.2 <3.0.0",
+  "_id": "esutils@2.0.2",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/esutils",
+  "_nodeVersion": "0.12.0",
+  "_npmUser": {
+    "email": "npm@michael.ficarra.me",
+    "name": "michaelficarra"
+  },
+  "_npmVersion": "2.5.1",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "esutils",
+    "raw": "esutils@^2.0.2",
+    "rawSpec": "^2.0.2",
+    "scope": null,
+    "spec": ">=2.0.2 <3.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+  "_shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b",
+  "_shrinkwrap": null,
+  "_spec": "esutils@^2.0.2",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
+  "bugs": {
+    "url": "https://github.com/estools/esutils/issues"
+  },
+  "dependencies": {},
+  "description": "utility box for ECMAScript language tools",
+  "devDependencies": {
+    "chai": "~1.7.2",
+    "coffee-script": "~1.6.3",
+    "jshint": "2.6.3",
+    "mocha": "~2.2.1",
+    "regenerate": "~1.2.1",
+    "unicode-7.0.0": "^0.1.5"
+  },
+  "directories": {
+    "lib": "./lib"
+  },
+  "dist": {
+    "shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b",
+    "tarball": "http://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "LICENSE.BSD",
+    "README.md",
+    "lib"
+  ],
+  "gitHead": "3ffd1c403f3f29db9e8a9574b1895682e57b6a7f",
+  "homepage": "https://github.com/estools/esutils",
+  "licenses": [
+    {
+      "type": "BSD",
+      "url": "http://github.com/estools/esutils/raw/master/LICENSE.BSD"
+    }
+  ],
+  "main": "lib/utils.js",
+  "maintainers": [
+    {
+      "name": "constellation",
+      "email": "utatane.tea@gmail.com"
+    },
+    {
+      "name": "michaelficarra",
+      "email": "npm@michael.ficarra.me"
+    }
+  ],
+  "name": "esutils",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/estools/esutils.git"
+  },
+  "scripts": {
+    "generate-regex": "node tools/generate-identifier-regex.js",
+    "lint": "jshint lib/*.js",
+    "test": "npm run-script lint && npm run-script unit-test",
+    "unit-test": "mocha --compilers coffee:coffee-script -R spec"
+  },
+  "version": "2.0.2"
+}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.lint b/tools/eslint/node_modules/event-emitter/.lint
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.lint
rename to tools/eslint/node_modules/event-emitter/.lint
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.testignore b/tools/eslint/node_modules/event-emitter/.testignore
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/.testignore
rename to tools/eslint/node_modules/event-emitter/.testignore
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/LICENSE b/tools/eslint/node_modules/event-emitter/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/LICENSE
rename to tools/eslint/node_modules/event-emitter/LICENSE
diff --git a/tools/eslint/node_modules/event-emitter/README.md b/tools/eslint/node_modules/event-emitter/README.md
new file mode 100644
index 00000000000000..5ad489c0f0c7e3
--- /dev/null
+++ b/tools/eslint/node_modules/event-emitter/README.md
@@ -0,0 +1,95 @@
+# event-emitter
+## Environment agnostic event emitter
+
+### Installation
+
+	$ npm install event-emitter
+
+To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
+
+### Usage
+
+```javascript
+var ee = require('event-emitter');
+
+var emitter = ee({}), listener;
+
+emitter.on('test', listener = function (args) {
+  // …emitter logic
+});
+
+emitter.once('test', function (args) {
+  // …invoked only once(!)
+});
+
+emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked
+emitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked
+
+emitter.off('test', listener);              // Removed first listener
+emitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked
+```
+### Additional utilities
+
+#### allOff(obj) _(event-emitter/all-off)_
+
+Removes all listeners from given event emitter object
+
+#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_
+
+Whether object has some listeners attached to the object.
+When `name` is provided, it checks listeners for specific event name
+
+```javascript
+var emitter = ee();
+var hasListeners = require('event-emitter/has-listeners');
+var listener = function () {};
+
+hasListeners(emitter); // false
+
+emitter.on('foo', listener);
+hasListeners(emitter); // true
+hasListeners(emitter, 'foo'); // true
+hasListeners(emitter, 'bar'); // false
+
+emitter.off('foo', listener);
+hasListeners(emitter, 'foo'); // false
+```
+
+#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_
+
+Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way).
+Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_.
+It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument.
+
+#### unify(emitter1, emitter2) _(event-emitter/unify)_
+
+Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitter on _emitter2_, and other way back.
+Non reversible.
+
+```javascript
+var eeUnify = require('event-emitter/unify');
+
+var emitter1 = ee(), listener1, listener3;
+var emitter2 = ee(), listener2, listener4;
+
+emitter1.on('test', listener1 = function () { });
+emitter2.on('test', listener2 = function () { });
+
+emitter1.emit('test'); // Invoked listener1
+emitter2.emit('test'); // Invoked listener2
+
+var unify = eeUnify(emitter1, emitter2);
+
+emitter1.emit('test'); // Invoked listener1 and listener2
+emitter2.emit('test'); // Invoked listener1 and listener2
+
+emitter1.on('test', listener3 = function () { });
+emitter2.on('test', listener4 = function () { });
+
+emitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4
+emitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4
+```
+
+### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter)
+
+	$ npm test
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/all-off.js b/tools/eslint/node_modules/event-emitter/all-off.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/all-off.js
rename to tools/eslint/node_modules/event-emitter/all-off.js
diff --git a/tools/eslint/node_modules/event-emitter/emit-error.js b/tools/eslint/node_modules/event-emitter/emit-error.js
new file mode 100644
index 00000000000000..769b4c53e1dd65
--- /dev/null
+++ b/tools/eslint/node_modules/event-emitter/emit-error.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var ensureError  = require('es5-ext/error/valid-error')
+  , ensureObject = require('es5-ext/object/valid-object')
+
+  , hasOwnProperty = Object.prototype.hasOwnProperty;
+
+module.exports = function (err) {
+	(ensureObject(this) && ensureError(err));
+	if (!hasOwnProperty.call(ensureObject(this), '__ee__')) throw err;
+	if (!this.__ee__.error) throw err;
+	this.emit('error', err);
+};
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/has-listeners.js b/tools/eslint/node_modules/event-emitter/has-listeners.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/has-listeners.js
rename to tools/eslint/node_modules/event-emitter/has-listeners.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/index.js b/tools/eslint/node_modules/event-emitter/index.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/index.js
rename to tools/eslint/node_modules/event-emitter/index.js
diff --git a/tools/eslint/node_modules/event-emitter/package.json b/tools/eslint/node_modules/event-emitter/package.json
new file mode 100644
index 00000000000000..96da6ffc4e915c
--- /dev/null
+++ b/tools/eslint/node_modules/event-emitter/package.json
@@ -0,0 +1,91 @@
+{
+  "_args": [
+    [
+      "event-emitter@~0.3.4",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map"
+    ]
+  ],
+  "_from": "event-emitter@>=0.3.4 <0.4.0",
+  "_id": "event-emitter@0.3.4",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/event-emitter",
+  "_nodeVersion": "4.1.1",
+  "_npmUser": {
+    "email": "medikoo+npm@medikoo.com",
+    "name": "medikoo"
+  },
+  "_npmVersion": "2.14.4",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "event-emitter",
+    "raw": "event-emitter@~0.3.4",
+    "rawSpec": "~0.3.4",
+    "scope": null,
+    "spec": ">=0.3.4 <0.4.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/es6-map",
+    "/eslint/es6-set"
+  ],
+  "_resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz",
+  "_shasum": "8d63ddfb4cfe1fae3b32ca265c4c720222080bb5",
+  "_shrinkwrap": null,
+  "_spec": "event-emitter@~0.3.4",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/es6-map",
+  "author": {
+    "email": "medyk@medikoo.com",
+    "name": "Mariusz Nowak",
+    "url": "http://www.medikoo.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/medikoo/event-emitter/issues"
+  },
+  "dependencies": {
+    "d": "~0.1.1",
+    "es5-ext": "~0.10.7"
+  },
+  "description": "Environment agnostic event emitter",
+  "devDependencies": {
+    "tad": "~0.2.3",
+    "xlint": "~0.2.2",
+    "xlint-jslint-medikoo": "~0.1.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "8d63ddfb4cfe1fae3b32ca265c4c720222080bb5",
+    "tarball": "http://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz"
+  },
+  "gitHead": "adc27b543a53528b9af8a82f7c88db3292f0faa0",
+  "homepage": "https://github.com/medikoo/event-emitter#readme",
+  "keywords": [
+    "emitter",
+    "event",
+    "events",
+    "listener",
+    "observer",
+    "pubsub",
+    "trigger"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "medikoo",
+      "email": "medikoo+npm@medikoo.com"
+    }
+  ],
+  "name": "event-emitter",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/medikoo/event-emitter.git"
+  },
+  "scripts": {
+    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
+    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
+    "test": "node ./node_modules/tad/bin/tad"
+  },
+  "version": "0.3.4"
+}
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/pipe.js b/tools/eslint/node_modules/event-emitter/pipe.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/pipe.js
rename to tools/eslint/node_modules/event-emitter/pipe.js
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/unify.js b/tools/eslint/node_modules/event-emitter/unify.js
similarity index 100%
rename from tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/event-emitter/unify.js
rename to tools/eslint/node_modules/event-emitter/unify.js
diff --git a/tools/eslint/node_modules/exit-hook/index.js b/tools/eslint/node_modules/exit-hook/index.js
new file mode 100644
index 00000000000000..e18013fdb7c87a
--- /dev/null
+++ b/tools/eslint/node_modules/exit-hook/index.js
@@ -0,0 +1,30 @@
+'use strict';
+
+var cbs = [];
+var called = false;
+
+function exit(exit, signal) {
+	if (called) {
+		return;
+	}
+
+	called = true;
+
+	cbs.forEach(function (el) {
+		el();
+	});
+
+	if (exit === true) {
+		process.exit(128 + signal);
+	}
+};
+
+module.exports = function (cb) {
+	cbs.push(cb);
+
+	if (cbs.length === 1) {
+		process.once('exit', exit);
+		process.once('SIGINT', exit.bind(null, true, 2));
+		process.once('SIGTERM', exit.bind(null, true, 15));
+	}
+};
diff --git a/tools/eslint/node_modules/exit-hook/package.json b/tools/eslint/node_modules/exit-hook/package.json
new file mode 100644
index 00000000000000..fa1d94d40d5e16
--- /dev/null
+++ b/tools/eslint/node_modules/exit-hook/package.json
@@ -0,0 +1,93 @@
+{
+  "_args": [
+    [
+      "exit-hook@^1.0.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/restore-cursor"
+    ]
+  ],
+  "_from": "exit-hook@>=1.0.0 <2.0.0",
+  "_id": "exit-hook@1.1.1",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/exit-hook",
+  "_npmUser": {
+    "email": "sindresorhus@gmail.com",
+    "name": "sindresorhus"
+  },
+  "_npmVersion": "1.4.9",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "exit-hook",
+    "raw": "exit-hook@^1.0.0",
+    "rawSpec": "^1.0.0",
+    "scope": null,
+    "spec": ">=1.0.0 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/restore-cursor"
+  ],
+  "_resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
+  "_shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8",
+  "_shrinkwrap": null,
+  "_spec": "exit-hook@^1.0.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/restore-cursor",
+  "author": {
+    "email": "sindresorhus@gmail.com",
+    "name": "Sindre Sorhus",
+    "url": "http://sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/exit-hook/issues"
+  },
+  "dependencies": {},
+  "description": "Run some code when the process exits",
+  "devDependencies": {
+    "ava": "0.0.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8",
+    "tarball": "http://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/sindresorhus/exit-hook",
+  "keywords": [
+    "event",
+    "exit",
+    "graceful",
+    "handler",
+    "hook",
+    "kill",
+    "process",
+    "quit",
+    "shutdown",
+    "sigint",
+    "sigterm",
+    "stop",
+    "terminate"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "sindresorhus",
+      "email": "sindresorhus@gmail.com"
+    }
+  ],
+  "name": "exit-hook",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/sindresorhus/exit-hook.git"
+  },
+  "scripts": {
+    "test": "node test.js"
+  },
+  "version": "1.1.1"
+}
diff --git a/tools/eslint/node_modules/exit-hook/readme.md b/tools/eslint/node_modules/exit-hook/readme.md
new file mode 100644
index 00000000000000..4dc64b9c5f42b0
--- /dev/null
+++ b/tools/eslint/node_modules/exit-hook/readme.md
@@ -0,0 +1,40 @@
+# exit-hook [![Build Status](https://travis-ci.org/sindresorhus/exit-hook.svg?branch=master)](https://travis-ci.org/sindresorhus/exit-hook)
+
+> Run some code when the process exits
+
+The `process.on('exit')` event doesn't catch all the ways a process can exit.
+
+Useful for cleaning up.
+
+
+## Install
+
+```sh
+$ npm install --save exit-hook
+```
+
+
+## Usage
+
+```js
+var exitHook = require('exit-hook');
+
+exitHook(function () {
+	console.log('exiting');
+});
+
+// you can add multiple hooks, even across files
+exitHook(function () {
+	console.log('exiting 2');
+});
+
+throw new Error('unicorns');
+
+//=> exiting
+//=> exiting 2
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/eslint/node_modules/fast-levenshtein/LICENSE.md b/tools/eslint/node_modules/fast-levenshtein/LICENSE.md
new file mode 100644
index 00000000000000..79b86692645bc2
--- /dev/null
+++ b/tools/eslint/node_modules/fast-levenshtein/LICENSE.md
@@ -0,0 +1,24 @@
+(MIT License)
+
+Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.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/eslint/node_modules/optionator/node_modules/fast-levenshtein/README.md b/tools/eslint/node_modules/fast-levenshtein/README.md
similarity index 100%
rename from tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/README.md
rename to tools/eslint/node_modules/fast-levenshtein/README.md
diff --git a/tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/levenshtein.js b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js
similarity index 99%
rename from tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/levenshtein.js
rename to tools/eslint/node_modules/fast-levenshtein/levenshtein.js
index 0028f405ac4bfe..c16930e0eecb6a 100644
--- a/tools/eslint/node_modules/optionator/node_modules/fast-levenshtein/levenshtein.js
+++ b/tools/eslint/node_modules/fast-levenshtein/levenshtein.js
@@ -195,4 +195,3 @@
     window.Levenshtein = Levenshtein;
   }
 }());
-
diff --git a/tools/eslint/node_modules/fast-levenshtein/package.json b/tools/eslint/node_modules/fast-levenshtein/package.json
new file mode 100644
index 00000000000000..34445d2a9170ab
--- /dev/null
+++ b/tools/eslint/node_modules/fast-levenshtein/package.json
@@ -0,0 +1,93 @@
+{
+  "_args": [
+    [
+      "fast-levenshtein@~1.0.6",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator"
+    ]
+  ],
+  "_from": "fast-levenshtein@>=1.0.6 <1.1.0",
+  "_id": "fast-levenshtein@1.0.7",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/fast-levenshtein",
+  "_nodeVersion": "0.12.0",
+  "_npmUser": {
+    "email": "ram@hiddentao.com",
+    "name": "hiddentao"
+  },
+  "_npmVersion": "2.7.6",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "fast-levenshtein",
+    "raw": "fast-levenshtein@~1.0.6",
+    "rawSpec": "~1.0.6",
+    "scope": null,
+    "spec": ">=1.0.6 <1.1.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/optionator"
+  ],
+  "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz",
+  "_shasum": "0178dcdee023b92905193af0959e8a7639cfdcb9",
+  "_shrinkwrap": null,
+  "_spec": "fast-levenshtein@~1.0.6",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator",
+  "author": {
+    "email": "ram@hiddentao.com",
+    "name": "Ramesh Nair",
+    "url": "http://www.hiddentao.com/"
+  },
+  "bugs": {
+    "url": "https://github.com/hiddentao/fast-levenshtein/issues"
+  },
+  "dependencies": {},
+  "description": "Efficient implementation of Levenshtein algorithm with asynchronous callback support",
+  "devDependencies": {
+    "chai": "~1.5.0",
+    "grunt": "~0.4.1",
+    "grunt-benchmark": "~0.2.0",
+    "grunt-contrib-jshint": "~0.4.3",
+    "grunt-contrib-uglify": "~0.2.0",
+    "grunt-mocha-test": "~0.2.2",
+    "grunt-npm-install": "~0.1.0",
+    "load-grunt-tasks": "~0.6.0",
+    "lodash": "~1.2.0",
+    "mocha": "~1.9.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "0178dcdee023b92905193af0959e8a7639cfdcb9",
+    "tarball": "http://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz"
+  },
+  "files": [
+    "levenshtein.js"
+  ],
+  "gitHead": "321ca56691c248823bbdb73b6fda57d6973f7f8c",
+  "homepage": "https://github.com/hiddentao/fast-levenshtein",
+  "keywords": [
+    "distance",
+    "levenshtein",
+    "string"
+  ],
+  "license": "MIT",
+  "main": "levenshtein.js",
+  "maintainers": [
+    {
+      "name": "hiddentao",
+      "email": "ram@hiddentao.com"
+    }
+  ],
+  "name": "fast-levenshtein",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/hiddentao/fast-levenshtein.git"
+  },
+  "scripts": {
+    "benchmark": "grunt benchmark",
+    "build": "grunt build"
+  },
+  "version": "1.0.7"
+}
diff --git a/tools/eslint/node_modules/figures/index.js b/tools/eslint/node_modules/figures/index.js
new file mode 100644
index 00000000000000..aabd817a9c7fa3
--- /dev/null
+++ b/tools/eslint/node_modules/figures/index.js
@@ -0,0 +1,89 @@
+'use strict';
+var platform = process.platform;
+
+var main = {
+	tick: '✔',
+	cross: '✖',
+	star: '★',
+	square: '▇',
+	squareSmall: '◻',
+	squareSmallFilled: '◼',
+	circle: '◯',
+	circleFilled: '◉',
+	circleDotted: '◌',
+	circleDouble: '◎',
+	circleCircle: 'ⓞ',
+	circleCross: 'ⓧ',
+	circlePipe: 'Ⓘ',
+	circleQuestionMark: '?⃝',
+	bullet: '●',
+	dot: '․',
+	line: '─',
+	ellipsis: '…',
+	pointer: '❯',
+	pointerSmall: '›',
+	info: 'ℹ',
+	warning: '⚠',
+	hamburger: '☰',
+	smiley: '㋡',
+	mustache: '෴',
+	heart: '♥',
+	arrowUp: '↑',
+	arrowDown: '↓',
+	arrowLeft: '←',
+	arrowRight: '→',
+	radioOn: '◉',
+	radioOff: '◯',
+	checkboxOn: '☒',
+	checkboxOff: '☐',
+	checkboxCircleOn: 'ⓧ',
+	checkboxCircleOff: 'Ⓘ',
+	questionMarkPrefix: '?⃝'
+};
+
+var win = {
+	tick: '√',
+	cross: '×',
+	star: '*',
+	square: '█',
+	squareSmall: '[ ]',
+	squareSmallFilled: '[█]',
+	circle: '( )',
+	circleFilled: '(*)',
+	circleDotted: '( )',
+	circleDouble: '( )',
+	circleCircle: '(○)',
+	circleCross: '(×)',
+	circlePipe: '(│)',
+	circleQuestionMark: '(?)',
+	bullet: '*',
+	dot: '.',
+	line: '─',
+	ellipsis: '...',
+	pointer: '>',
+	pointerSmall: '»',
+	info: 'i',
+	warning: '‼',
+	hamburger: '≡',
+	smiley: '☺',
+	mustache: '┌─┐',
+	heart: main.heart,
+	arrowUp: main.arrowUp,
+	arrowDown: main.arrowDown,
+	arrowLeft: main.arrowLeft,
+	arrowRight: main.arrowRight,
+	radioOn: '(*)',
+	radioOff: '( )',
+	checkboxOn: '[×]',
+	checkboxOff: '[ ]',
+	checkboxCircleOn: '(×)',
+	checkboxCircleOff: '( )',
+	questionMarkPrefix: '?'
+};
+
+if (platform === 'linux') {
+	// the main one doesn't look that good on Ubuntu
+	main.questionMarkPrefix = '?';
+}
+
+module.exports = platform === 'win32' ? win : main;
diff --git a/tools/eslint/node_modules/figures/license b/tools/eslint/node_modules/figures/license
new file mode 100644
index 00000000000000..654d0bfe943437
--- /dev/null
+++ b/tools/eslint/node_modules/figures/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+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/eslint/node_modules/figures/package.json b/tools/eslint/node_modules/figures/package.json
new file mode 100644
index 00000000000000..c5c6170aa39eaa
--- /dev/null
+++ b/tools/eslint/node_modules/figures/package.json
@@ -0,0 +1,93 @@
+{
+  "_args": [
+    [
+      "figures@^1.3.5",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer"
+    ]
+  ],
+  "_from": "figures@>=1.3.5 <2.0.0",
+  "_id": "figures@1.4.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/figures",
+  "_nodeVersion": "4.1.0",
+  "_npmUser": {
+    "email": "sindresorhus@gmail.com",
+    "name": "sindresorhus"
+  },
+  "_npmVersion": "2.14.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "figures",
+    "raw": "figures@^1.3.5",
+    "rawSpec": "^1.3.5",
+    "scope": null,
+    "spec": ">=1.3.5 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/inquirer"
+  ],
+  "_resolved": "https://registry.npmjs.org/figures/-/figures-1.4.0.tgz",
+  "_shasum": "eb8f56390dbe3081044a5c2a9d9089075a48432f",
+  "_shrinkwrap": null,
+  "_spec": "figures@^1.3.5",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer",
+  "author": {
+    "email": "sindresorhus@gmail.com",
+    "name": "Sindre Sorhus",
+    "url": "http://sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/figures/issues"
+  },
+  "dependencies": {},
+  "description": "Unicode symbols with Windows CMD fallbacks",
+  "devDependencies": {
+    "ava": "0.0.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "eb8f56390dbe3081044a5c2a9d9089075a48432f",
+    "tarball": "http://registry.npmjs.org/figures/-/figures-1.4.0.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "index.js"
+  ],
+  "gitHead": "6b8b7482290192d6eeb3e80508f59ad33bc012f7",
+  "homepage": "https://github.com/sindresorhus/figures#readme",
+  "keywords": [
+    "char",
+    "characters",
+    "cli",
+    "cmd",
+    "command-line",
+    "fallback",
+    "figure",
+    "figures",
+    "symbol",
+    "symbols",
+    "unicode"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "sindresorhus",
+      "email": "sindresorhus@gmail.com"
+    }
+  ],
+  "name": "figures",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/figures.git"
+  },
+  "scripts": {
+    "test": "node test.js"
+  },
+  "version": "1.4.0"
+}
diff --git a/tools/eslint/node_modules/figures/readme.md b/tools/eslint/node_modules/figures/readme.md
new file mode 100644
index 00000000000000..bb7ddf0054bded
--- /dev/null
+++ b/tools/eslint/node_modules/figures/readme.md
@@ -0,0 +1,34 @@
+# figures [![Build Status](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures)
+
+> Unicode symbols with Windows CMD fallbacks
+
+[![](screenshot.png)](index.js)
+
+[*and more...*](index.js)
+
+Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
+
+
+## Install
+
+```
+$ npm install --save figures
+```
+
+
+## Usage
+
+See the [source](index.js) for supported symbols.
+
+```js
+var figures = require('figures');
+
+console.log(figures.tick);
+// On real OSes:  ✔︎
+// On Windows:    √
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/eslint/node_modules/file-entry-cache/LICENSE b/tools/eslint/node_modules/file-entry-cache/LICENSE
new file mode 100644
index 00000000000000..7394b8ff84b090
--- /dev/null
+++ b/tools/eslint/node_modules/file-entry-cache/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Roy Riojas
+
+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/eslint/node_modules/file-entry-cache/README.md b/tools/eslint/node_modules/file-entry-cache/README.md
new file mode 100644
index 00000000000000..842ef1e158fb00
--- /dev/null
+++ b/tools/eslint/node_modules/file-entry-cache/README.md
@@ -0,0 +1,94 @@
+# file-entry-cache
+> Super simple cache for file metadata, useful for process that work o a given series of files
+> and that only need to repeat the job on the changed ones since the previous run of the process — Edit
+
+[![NPM Version](http://img.shields.io/npm/v/file-entry-cache.svg?style=flat)](https://npmjs.org/package/file-entry-cache)
+[![Build Status](http://img.shields.io/travis/royriojas/file-entry-cache.svg?style=flat)](https://travis-ci.org/royriojas/file-entry-cache)
+
+## install
+
+```bash
+npm i --save file-entry-cache
+```
+
+## Usage
+
+```js
+// loads the cache, if one does not exists for the given
+// Id a new one will be prepared to be created
+var fileEntryCache = require('file-entry-cache');
+
+var cache = fileEntryCache.create('testCache');
+
+var files = expand('../fixtures/*.txt');
+
+// the first time this method is called, will return all the files
+var oFiles = cache.getUpdatedFiles(files);
+
+// this will persist this to disk checking each file stats and
+// updating the meta attributes `size` and `mtime`.
+// custom fields could also be added to the meta object and will be persisted
+// in order to retrieve them later
+cache.reconcile();
+
+// on a second run
+var cache2 = fileEntryCache.create('testCache');
+
+// will return now only the files that were modified or none
+// if no files were modified previous to the execution of this function
+var oFiles = cache.getUpdatedFiles(files);
+
+// if you want to prevent a file from being considered non modified
+// something useful if a file failed some sort of validation
+// you can then remove the entry from the cache doing
+cache.removeEntry('path/to/file'); // path to file should be the same path of the file received on `getUpdatedFiles`
+// that will effectively make the file to appear again as modified until the validation is passed. In that
+// case you should not remove it from the cache
+
+// if you need all the files, so you can determine what to do with the changed ones
+// you can call
+var oFiles = cache.normalizeEntries(files);
+
+// oFiles will be an array of objects like the following
+entry = {
+  key: 'some/name/file', the path to the file
+  changed: true, // if the file was changed since previous run
+  meta: {
+    size: 3242, // the size of the file
+    mtime: 231231231, // the modification time of the file
+    data: {} // some extra field stored for this file (useful to save the result of a transformation on the file
+  }
+}
+
+```
+
+## Motivation for this module
+
+I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make
+a script that will beautify files with `esformatter` to execute only on the files that were changed since the last run.
+
+In doing so the process of beautifying files was reduced from several seconds to a small fraction of a second.
+
+This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with
+optional file persistance.
+
+The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed,
+then store the new state of the files. The next time this module request for `getChangedFiles` will return only
+the files that were modified. Making the process to end faster.
+
+This module could also be used by processes that modify the files applying a transform, in that case the result of the
+transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted.
+Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the
+entries with a `changed` field that can be used to determine if the file was changed or not. If it was not changed
+the transformed stored data could be used instead of actually applying the transformation, saving time in case of only
+a few files changed.
+
+In the worst case scenario all the files will be processed. In the best case scenario only a few of them will be processed.
+
+## Important notes
+- The values set on the meta attribute of the entries should be `stringify-able` ones, meaning no circular references
+- All the changes to the cache state are done to memory first and only persisted after reconcile
+
+## License
+
+MIT
diff --git a/tools/eslint/node_modules/file-entry-cache/cache.js b/tools/eslint/node_modules/file-entry-cache/cache.js
new file mode 100644
index 00000000000000..e4590a1bb33604
--- /dev/null
+++ b/tools/eslint/node_modules/file-entry-cache/cache.js
@@ -0,0 +1,190 @@
+var path = require( 'path' );
+
+module.exports = {
+  createFromFile: function ( filePath ) {
+    var fname = path.basename( filePath );
+    var dir = path.dirname( filePath );
+    return this.create( fname, dir );
+  },
+
+  create: function ( cacheId, _path ) {
+    var fs = require( 'fs' );
+    var flatCache = require( 'flat-cache' );
+    var cache = flatCache.load( cacheId, _path );
+    var assign = require( 'object-assign' );
+    var normalizedEntries = { };
+
+    return {
+      /**
+       * the flat cache storage used to persist the metadata of the files
+       * @type {Object}
+       */
+      cache: cache,
+      /**
+       * Return whether or not a file has changed since last time reconcile was called.
+       * @method hasFileChanged
+       * @param  {String}  file  the filepath to check
+       * @return {Boolean}       wheter or not the file has changed
+       */
+      hasFileChanged: function ( file ) {
+        return this.getFileDescriptor( file ).changed;
+      },
+
+      /**
+       * given an array of file paths it return and object with three arrays:
+       *  - changedFiles: Files that changed since previous run
+       *  - notChangedFiles: Files that haven't change
+       *  - notFoundFiles: Files that were not found, probably deleted
+       *
+       * @param  {Array} files the files to analyze and compare to the previous seen files
+       * @return {[type]}       [description]
+       */
+      analyzeFiles: function ( files ) {
+        var me = this;
+        files = files || [ ];
+
+        var res = {
+          changedFiles: [],
+          notFoundFiles: [],
+          notChangedFiles: []
+        };
+
+        me.normalizeEntries( files ).forEach( function ( entry ) {
+          if ( entry.changed ) {
+            res.changedFiles.push( entry.key );
+            return;
+          }
+          if ( entry.notFound ) {
+            res.notFoundFiles.push( entry.key );
+            return;
+          }
+          res.notChangedFiles.push( entry.key );
+        } );
+        return res;
+      },
+
+      getFileDescriptor: function ( file ) {
+        var meta = cache.getKey( file );
+        var cacheExists = !!meta;
+        var fstat;
+        var me = this;
+
+        try {
+          fstat = fs.statSync( file );
+        } catch (ex) {
+          me.removeEntry( file );
+          return { key: file, notFound: true, err: ex };
+        }
+
+        var cSize = fstat.size;
+        var cTime = fstat.mtime.getTime();
+
+        if ( !meta ) {
+          meta = { size: cSize, mtime: cTime };
+        } else {
+          var isDifferentDate = cTime !== meta.mtime;
+          var isDifferentSize = cSize !== meta.size;
+        }
+
+        var nEntry = normalizedEntries[ file ] = {
+          key: file,
+          changed: !cacheExists || isDifferentDate || isDifferentSize,
+          meta: meta
+        };
+
+        return nEntry;
+      },
+
+      /**
+       * Return the list o the files that changed compared
+       * against the ones stored in the cache
+       *
+       * @method getUpdated
+       * @param files {Array} the array of files to compare against the ones in the cache
+       * @returns {Array}
+       */
+      getUpdatedFiles: function ( files ) {
+        var me = this;
+        files = files || [ ];
+
+        return me.normalizeEntries( files ).filter( function ( entry ) {
+          return entry.changed;
+        } ).map( function ( entry ) {
+          return entry.key;
+        } );
+      },
+
+      /**
+       * return the list of files
+       * @method normalizeEntries
+       * @param files
+       * @returns {*}
+       */
+      normalizeEntries: function ( files ) {
+        files = files || [ ];
+
+        var me = this;
+        var nEntries = files.map( function ( file ) {
+          return me.getFileDescriptor( file );
+        } );
+
+        //normalizeEntries = nEntries;
+        return nEntries;
+      },
+
+      /**
+       * Remove an entry from the file-entry-cache. Useful to force the file to still be considered
+       * modified the next time the process is run
+       *
+       * @method removeEntry
+       * @param entryName
+       */
+      removeEntry: function ( entryName ) {
+        delete normalizedEntries[ entryName ];
+        cache.removeKey( entryName );
+      },
+
+      /**
+       * Delete the cache file from the disk
+       * @method deleteCacheFile
+       */
+      deleteCacheFile: function () {
+        cache.removeCacheFile();
+      },
+
+      /**
+       * remove the cache from the file and clear the memory cache
+       */
+      destroy: function () {
+        normalizedEntries = { };
+        cache.destroy();
+      },
+      /**
+       * Sync the files and persist them to the cache
+       *
+       * @method reconcile
+       */
+      reconcile: function () {
+        var entries = normalizedEntries;
+
+        var keys = Object.keys( entries );
+        if ( keys.length === 0 ) {
+          return;
+        }
+        keys.forEach( function ( entryName ) {
+          var cacheEntry = entries[ entryName ];
+          var stat = fs.statSync( cacheEntry.key );
+
+          var meta = assign( cacheEntry.meta, {
+            size: stat.size,
+            mtime: stat.mtime.getTime()
+          } );
+
+          cache.setKey( entryName, meta );
+        } );
+
+        cache.save();
+      }
+    };
+  }
+};
diff --git a/tools/eslint/node_modules/file-entry-cache/changelog.md b/tools/eslint/node_modules/file-entry-cache/changelog.md
new file mode 100644
index 00000000000000..46fcd57bc82b5a
--- /dev/null
+++ b/tools/eslint/node_modules/file-entry-cache/changelog.md
@@ -0,0 +1,57 @@
+
+# file-entry-cache - Changelog
+## v1.2.4
+- **Enhancements**
+  - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 20:26:33
+
+
+## v1.2.3
+- **Build Scripts Changes**
+  - update flat-cache dep - [cc7b9ce]( https://github.com/royriojas/file-entry-cache/commit/cc7b9ce ), [royriojas](https://github.com/royriojas), 11/09/2015 18:04:44
+
+
+## v1.2.2
+- **Build Scripts Changes**
+  - Add changelogx section to package.json - [a3916ff]( https://github.com/royriojas/file-entry-cache/commit/a3916ff ), [royriojas](https://github.com/royriojas), 11/09/2015 18:00:26
+
+
+## v1.2.1
+- **Build Scripts Changes**
+  - update flat-cache dep - [e49b0d4]( https://github.com/royriojas/file-entry-cache/commit/e49b0d4 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:55:25
+
+
+- **Other changes**
+  - Update dependencies Replaced lodash.assign with smaller object-assign Fixed tests for windows - [0ad3000]( https://github.com/royriojas/file-entry-cache/commit/0ad3000 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:44:18
+
+
+## v1.2.0
+- **Features**
+  - analyzeFiles now returns also the files that were removed - [6ac2431]( https://github.com/royriojas/file-entry-cache/commit/6ac2431 ), [royriojas](https://github.com/royriojas), 04/09/2015 14:40:53
+
+
+## v1.1.1
+- **Features**
+  - Add method to check if a file hasChanged - [3640e2b]( https://github.com/royriojas/file-entry-cache/commit/3640e2b ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 07:33:32
+
+
+## v1.1.0
+- **Features**
+  - Create the cache directly from a file path - [a23de61]( https://github.com/royriojas/file-entry-cache/commit/a23de61 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:41:33
+
+
+  - Add a method to remove an entry from the filecache - [7af29fc]( https://github.com/royriojas/file-entry-cache/commit/7af29fc ), [Roy Riojas](https://github.com/Roy Riojas), 03/03/2015 02:25:32
+
+
+  - cache module finished - [1f95544]( https://github.com/royriojas/file-entry-cache/commit/1f95544 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:08:08
+
+
+- **Build Scripts Changes**
+  - set the version for the first release - [7472eaa]( https://github.com/royriojas/file-entry-cache/commit/7472eaa ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:54
+
+
+- **Documentation**
+  - Updated documentation - [557358f]( https://github.com/royriojas/file-entry-cache/commit/557358f ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:29
+
+
+- **Other changes**
+  - Initial commit - [3d5f42b]( https://github.com/royriojas/file-entry-cache/commit/3d5f42b ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 00:58:29
diff --git a/tools/eslint/node_modules/file-entry-cache/package.json b/tools/eslint/node_modules/file-entry-cache/package.json
new file mode 100644
index 00000000000000..c26bb60bb4d47a
--- /dev/null
+++ b/tools/eslint/node_modules/file-entry-cache/package.json
@@ -0,0 +1,140 @@
+{
+  "_args": [
+    [
+      "file-entry-cache@^1.1.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "file-entry-cache@>=1.1.1 <2.0.0",
+  "_id": "file-entry-cache@1.2.4",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/file-entry-cache",
+  "_nodeVersion": "0.12.0",
+  "_npmUser": {
+    "email": "royriojas@gmail.com",
+    "name": "royriojas"
+  },
+  "_npmVersion": "2.14.5",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "file-entry-cache",
+    "raw": "file-entry-cache@^1.1.1",
+    "rawSpec": "^1.1.1",
+    "scope": null,
+    "spec": ">=1.1.1 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz",
+  "_shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c",
+  "_shrinkwrap": null,
+  "_spec": "file-entry-cache@^1.1.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
+  "author": {
+    "name": "Roy Riojas",
+    "url": "http://royriojas.com"
+  },
+  "bugs": {
+    "url": "https://github.com/royriojas/file-entry-cache/issues"
+  },
+  "changelogx": {
+    "authorURL": "https://github.com/{0}",
+    "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}",
+    "ignoreRegExp": [
+      "BLD: Release",
+      "DOC: Generate Changelog",
+      "Generated Changelog"
+    ],
+    "issueIDRegExp": "#(\\d+)",
+    "issueIDURL": "https://github.com/royriojas/file-entry-cache/issues/{0}",
+    "projectName": "file-entry-cache"
+  },
+  "dependencies": {
+    "flat-cache": "^1.0.9",
+    "object-assign": "^4.0.1"
+  },
+  "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process",
+  "devDependencies": {
+    "chai": "^3.2.0",
+    "changelogx": "^1.0.18",
+    "commander": "^2.6.0",
+    "del": "^2.0.2",
+    "esbeautifier": "^4.2.11",
+    "eslinter": "^2.3.3",
+    "glob-expand": "^0.1.0",
+    "istanbul": "^0.3.6",
+    "mocha": "^2.1.0",
+    "precommit": "^1.1.5",
+    "prepush": "^3.1.4",
+    "proxyquire": "^1.3.1",
+    "read-file": "^0.2.0",
+    "sinon": "^1.12.2",
+    "sinon-chai": "^2.7.0",
+    "watch-run": "^1.2.1",
+    "write": "^0.2.1"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c",
+    "tarball": "http://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "cache.js"
+  ],
+  "gitHead": "3ca70d84f97822df7f769409f49ecf22c8908412",
+  "homepage": "https://github.com/royriojas/file-entry-cache#readme",
+  "keywords": [
+    "cache",
+    "file cache",
+    "file cache",
+    "key par",
+    "key value",
+    "task cache files"
+  ],
+  "license": "MIT",
+  "main": "cache.js",
+  "maintainers": [
+    {
+      "name": "royriojas",
+      "email": "royriojas@gmail.com"
+    }
+  ],
+  "name": "file-entry-cache",
+  "optionalDependencies": {},
+  "precommit": [
+    "npm run verify"
+  ],
+  "prepush": [
+    "npm run verify"
+  ],
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/royriojas/file-entry-cache.git"
+  },
+  "scripts": {
+    "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'",
+    "beautify-check": "esbeautifier -k 'cache.js' 'specs/**/*.js'",
+    "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v",
+    "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v",
+    "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v",
+    "changelog": "changelogx -f markdown -o ./changelog.md",
+    "cover": "istanbul cover test/runner.js html text-summary",
+    "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify",
+    "eslint": "eslinter 'cache.js' 'specs/**/*.js'",
+    "install-hooks": "prepush install && changelogx install-hook && precommit install",
+    "lint": "npm run beautify && npm run eslint",
+    "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify",
+    "pre-v": "npm run verify",
+    "test": "mocha -R spec test/specs",
+    "verify": "npm run beautify-check && npm run eslint",
+    "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary"
+  },
+  "version": "1.2.4"
+}
diff --git a/tools/eslint/node_modules/flat-cache/LICENSE b/tools/eslint/node_modules/flat-cache/LICENSE
new file mode 100644
index 00000000000000..7394b8ff84b090
--- /dev/null
+++ b/tools/eslint/node_modules/flat-cache/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Roy Riojas
+
+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/eslint/node_modules/flat-cache/README.md b/tools/eslint/node_modules/flat-cache/README.md
new file mode 100644
index 00000000000000..d0eddf2e9c8832
--- /dev/null
+++ b/tools/eslint/node_modules/flat-cache/README.md
@@ -0,0 +1,67 @@
+# flat-cache
+> A stupidly simple key/value storage using files to persist the data
+
+[![NPM Version](http://img.shields.io/npm/v/flat-cache.svg?style=flat)](https://npmjs.org/package/flat-cache)
+[![Build Status](http://img.shields.io/travis/royriojas/flat-cache.svg?style=flat)](https://travis-ci.org/royriojas/flat-cache)
+
+## install
+
+```bash
+npm i --save flat-cache
+```
+
+## Usage
+
+```js
+var flatCache = require('flat-cache')
+// loads the cache, if one does not exists for the given
+// Id a new one will be prepared to be created
+var cache = flatCache.load('cacheId');
+
+// sets a key on the cache
+cache.setKey('key', { foo: 'var' });
+
+// get a key from the cache
+cache.getKey('key') // { foo: 'var' }
+
+// remove a key
+cache.removeKey('key'); // removes a key from the cache
+
+// save it to disk
+cache.save(); // very important, if you don't save no changes will be persisted.
+
+// loads the cache from a given directory, if one does
+// not exists for the given Id a new one will be prepared to be created
+var cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
+
+// The following methods are useful to clear the cache
+// delete a given cache
+flatCache.clearCacheById('cacheId') // removes the cacheId document if one exists.
+
+// delete all cache
+flatCache.clearAll(); // remove the cache directory
+```
+
+## Motivation for this module
+
+I needed a super simple and dumb **in-memory cache** with optional disk persistance in order to make
+a script that will beutify files with `esformatter` only execute on the files that were changed since the last run.
+To make that possible we need to store the `fileSize` and `modificationTime` of the files. So a simple `key/value`
+storage was needed and Bam! this module was born.
+
+## Important notes
+- If no directory is especified when the `load` method is called, a folder named `.cache` will be created
+  inside the module directory when `cache.save` is called. If you're committing your `node_modules` to any vcs, you
+  might want to ignore the default `.cache` folder, or specify a custom directory.
+- The values set on the keys of the cache should be `stringify-able` ones, meaning no circular references
+- All the changes to the cache state are done to memory
+- I could have used a timer or `Object.observe` to deliver the changes to disk, but I wanted to keep this module
+  intentionally dumb and simple
+
+## License
+
+MIT
+
+## Changelog
+
+[changelog](./changelog.md)
diff --git a/tools/eslint/node_modules/flat-cache/cache.js b/tools/eslint/node_modules/flat-cache/cache.js
new file mode 100644
index 00000000000000..90b8e77c30057f
--- /dev/null
+++ b/tools/eslint/node_modules/flat-cache/cache.js
@@ -0,0 +1,187 @@
+var path = require( 'path' );
+var fs = require( 'graceful-fs' );
+var readJSON = require( 'read-json-sync' );
+var write = require( 'write' );
+var del = require( 'del' ).sync;
+
+var cache = {
+  /**
+   * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
+   * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
+   * then the cache module directory `./cache` will be used instead
+   *
+   * @method load
+   * @param docId {String} the id of the cache, would also be used as the name of the file cache
+   * @param [cacheDir] {String} directory for the cache entry
+   */
+  load: function ( docId, cacheDir ) {
+    var me = this;
+
+    me._visited = { };
+    me._persisted = { };
+    me._pathToFile = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
+
+    if ( fs.existsSync( me._pathToFile ) ) {
+      me._persisted = readJSON( me._pathToFile );
+    }
+  },
+
+  /**
+   * Load the cache from the provided file
+   * @method loadFile
+   * @param  {String} pathToFile the path to the file containing the info for the cache
+   */
+  loadFile: function ( pathToFile ) {
+    var me = this;
+    var dir = path.dirname( pathToFile );
+    var fName = path.basename( pathToFile );
+
+    me.load( fName, dir );
+  },
+
+  keys: function () {
+    return Object.keys( this._persisted );
+  },
+  /**
+   * sets a key to a given value
+   * @method setKey
+   * @param key {string} the key to set
+   * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
+   */
+  setKey: function ( key, value ) {
+    this._visited[ key ] = true;
+    this._persisted[ key ] = value;
+  },
+  /**
+   * remove a given key from the cache
+   * @method removeKey
+   * @param key {String} the key to remove from the object
+   */
+  removeKey: function ( key ) {
+    delete this._visited[ key ]; // esfmt-ignore-line
+    delete this._persisted[ key ]; // esfmt-ignore-line
+  },
+  /**
+   * Return the value of the provided key
+   * @method getKey
+   * @param key {String} the name of the key to retrieve
+   * @returns {*} the value from the key
+   */
+  getKey: function ( key ) {
+    this._visited[ key ] = true;
+    return this._persisted[ key ];
+  },
+
+  /**
+   * Remove keys that were not accessed/set since the
+   * last time the `prune` method was called.
+   * @method _prune
+   * @private
+   */
+  _prune: function () {
+    var me = this;
+    var obj = { };
+
+    var keys = Object.keys( me._visited );
+
+    // no keys visited for either get or set value
+    if ( keys.length === 0 ) {
+      return;
+    }
+
+    keys.forEach( function ( key ) {
+      obj[ key ] = me._persisted[ key ];
+    } );
+
+    me._visited = { };
+    me._persisted = obj;
+  },
+
+  /**
+   * Save the state of the cache identified by the docId to disk
+   * as a JSON structure
+   * @method save
+   */
+  save: function () {
+    var me = this;
+
+    me._prune();
+    write.sync( me._pathToFile, JSON.stringify( me._persisted ) );
+  },
+
+  /**
+   * remove the file where the cache is persisted
+   * @method removeCacheFile
+   * @return {Boolean} true or false if the file was successfully deleted
+   */
+  removeCacheFile: function () {
+    return del( this._pathToFile, { force: true } );
+  },
+  /**
+   * Destroy the file cache and cache content.
+   * @method destroy
+   */
+  destroy: function () {
+    var me = this;
+    me._visited = { };
+    me._persisted = { };
+
+    me.removeCacheFile();
+  }
+};
+
+module.exports = {
+  /**
+   * Alias for create. Should be considered depreacted. Will be removed in next releases
+   *
+   * @method load
+   * @param docId {String} the id of the cache, would also be used as the name of the file cache
+   * @param [cacheDir] {String} directory for the cache entry
+   * @returns {cache} cache instance
+   */
+  load: function ( docId, cacheDir ) {
+    return this.create( docId, cacheDir );
+  },
+
+  /**
+  * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
+  * cache storage.
+  *
+  * @method create
+  * @param docId {String} the id of the cache, would also be used as the name of the file cache
+  * @param [cacheDir] {String} directory for the cache entry
+  * @returns {cache} cache instance
+  */
+  create: function ( docId, cacheDir ) {
+    var obj = Object.create( cache );
+    obj.load( docId, cacheDir );
+    return obj;
+  },
+
+  createFromFile: function ( filePath ) {
+    var obj = Object.create( cache );
+    obj.loadFile( filePath );
+    return obj;
+  },
+  /**
+   * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
+   *
+   * @method clearCache
+   * @param docId {String} the id of the cache, would also be used as the name of the file cache
+   * @param cacheDir {String} the directory where the cache file was written
+   * @returns {Boolean} true if the cache folder was deleted. False otherwise
+   */
+  clearCacheById: function ( docId, cacheDir ) {
+    var filePath = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
+    return del( filePath, { force: true } ).length > 0;
+  },
+  /**
+   * Remove all cache stored in the cache directory
+   * @method clearAll
+   * @returns {Boolean} true if the cache folder was deleted. False otherwise
+   */
+  clearAll: function ( cacheDir ) {
+    var filePath = cacheDir ? path.resolve( cacheDir ) : path.resolve( __dirname, './.cache/' );
+    return del( filePath, { force: true } ).length > 0;
+  }
+};
diff --git a/tools/eslint/node_modules/flat-cache/changelog.md b/tools/eslint/node_modules/flat-cache/changelog.md
new file mode 100644
index 00000000000000..571757c9d9ba6d
--- /dev/null
+++ b/tools/eslint/node_modules/flat-cache/changelog.md
@@ -0,0 +1,72 @@
+
+# flat-cache - Changelog
+## v1.0.10
+- **Build Scripts Changes**
+  - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08
+
+
+  - make sure the test script also verify beautification and linting of files before running tests - [e94e176]( https://github.com/royriojas/flat-cache/commit/e94e176 ), [royriojas](https://github.com/royriojas), 01/11/2015 14:54:48
+
+
+- **Other changes**
+  - add clearAll for cacheDir - [97383d9]( https://github.com/royriojas/flat-cache/commit/97383d9 ), [xieyaowu](https://github.com/xieyaowu), 31/10/2015 23:02:18
+
+
+## v1.0.9
+- **Bug Fixes**
+  - wrong default values for changelogx user repo name - [7bb52d1]( https://github.com/royriojas/flat-cache/commit/7bb52d1 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:59:30
+
+
+## v1.0.8
+- **Build Scripts Changes**
+  - test against node 4 - [c395b66]( https://github.com/royriojas/flat-cache/commit/c395b66 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:51:39
+
+
+## v1.0.7
+- **Other changes**
+  - Move dependencies into devDep - [7e47099]( https://github.com/royriojas/flat-cache/commit/7e47099 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:10:57
+
+
+- **Documentation**
+  - Add missing changelog link - [f51197a]( https://github.com/royriojas/flat-cache/commit/f51197a ), [royriojas](https://github.com/royriojas), 11/09/2015 16:48:05
+
+
+## v1.0.6
+- **Build Scripts Changes**
+  - Add helpers/code check scripts - [bdb82f3]( https://github.com/royriojas/flat-cache/commit/bdb82f3 ), [royriojas](https://github.com/royriojas), 11/09/2015 16:44:31
+
+
+## v1.0.5
+- **Documentation**
+  - better description for the module - [436817f]( https://github.com/royriojas/flat-cache/commit/436817f ), [royriojas](https://github.com/royriojas), 11/09/2015 16:35:33
+
+
+- **Other changes**
+  - Update dependencies - [be88aa3]( https://github.com/royriojas/flat-cache/commit/be88aa3 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:47:41
+
+
+## v1.0.4
+- **Refactoring**
+  - load a cache file using the full filepath - [b8f68c2]( https://github.com/royriojas/flat-cache/commit/b8f68c2 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:19:14
+
+
+- **Documentation**
+  - Add documentation about `clearAll` and `clearCacheById` - [13947c1]( https://github.com/royriojas/flat-cache/commit/13947c1 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:44:05
+
+
+- **Features**
+  - Add methods to remove the cache documents created - [af40443]( https://github.com/royriojas/flat-cache/commit/af40443 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:39:27
+
+
+## v1.0.1
+- **Other changes**
+  - Update README.md - [c2b6805]( https://github.com/royriojas/flat-cache/commit/c2b6805 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:28:07
+
+
+## v1.0.0
+- **Refactoring**
+  - flat-cache v.1.0.0 - [c984274]( https://github.com/royriojas/flat-cache/commit/c984274 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:11:50
+
+
+- **Other changes**
+  - Initial commit - [d43cccf]( https://github.com/royriojas/flat-cache/commit/d43cccf ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 04:12:16
diff --git a/tools/eslint/node_modules/flat-cache/package.json b/tools/eslint/node_modules/flat-cache/package.json
new file mode 100644
index 00000000000000..6ef8fd399db818
--- /dev/null
+++ b/tools/eslint/node_modules/flat-cache/package.json
@@ -0,0 +1,141 @@
+{
+  "_args": [
+    [
+      "flat-cache@^1.0.9",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/file-entry-cache"
+    ]
+  ],
+  "_from": "flat-cache@>=1.0.9 <2.0.0",
+  "_id": "flat-cache@1.0.10",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/flat-cache",
+  "_nodeVersion": "0.12.0",
+  "_npmUser": {
+    "email": "royriojas@gmail.com",
+    "name": "royriojas"
+  },
+  "_npmVersion": "2.14.5",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "flat-cache",
+    "raw": "flat-cache@^1.0.9",
+    "rawSpec": "^1.0.9",
+    "scope": null,
+    "spec": ">=1.0.9 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/file-entry-cache"
+  ],
+  "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz",
+  "_shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a",
+  "_shrinkwrap": null,
+  "_spec": "flat-cache@^1.0.9",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/file-entry-cache",
+  "author": {
+    "name": "Roy Riojas",
+    "url": "http://royriojas.com"
+  },
+  "bugs": {
+    "url": "https://github.com/royriojas/flat-cache/issues"
+  },
+  "changelogx": {
+    "authorURL": "https://github.com/{0}",
+    "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}",
+    "ignoreRegExp": [
+      "BLD: Release",
+      "DOC: Generate Changelog",
+      "Generated Changelog"
+    ],
+    "issueIDRegExp": "#(\\d+)",
+    "issueIDURL": "https://github.com/royriojas/flat-cache/issues/{0}",
+    "projectName": "flat-cache"
+  },
+  "dependencies": {
+    "del": "^2.0.2",
+    "graceful-fs": "^4.1.2",
+    "read-json-sync": "^1.1.0",
+    "write": "^0.2.1"
+  },
+  "description": "A stupidly simple key/value storage using files to persist some data",
+  "devDependencies": {
+    "chai": "^3.2.0",
+    "changelogx": "^1.0.18",
+    "esbeautifier": "^6.1.8",
+    "eslinter": "^3.2.1",
+    "glob-expand": "^0.1.0",
+    "istanbul": "^0.3.19",
+    "mocha": "^2.3.2",
+    "precommit": "^1.1.5",
+    "prepush": "^3.1.4",
+    "proxyquire": "^1.7.2",
+    "sinon": "^1.16.1",
+    "sinon-chai": "^2.8.0",
+    "watch-run": "^1.2.2"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a",
+    "tarball": "http://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "cache.js"
+  ],
+  "gitHead": "58bb40ccc87d79eb16146629be79d7577e6632da",
+  "homepage": "https://github.com/royriojas/flat-cache#readme",
+  "keywords": [
+    "cache",
+    "file cache",
+    "json cache",
+    "key par",
+    "key value",
+    "simple cache"
+  ],
+  "license": "MIT",
+  "main": "cache.js",
+  "maintainers": [
+    {
+      "name": "royriojas",
+      "email": "royriojas@gmail.com"
+    }
+  ],
+  "name": "flat-cache",
+  "optionalDependencies": {},
+  "precommit": [
+    "npm run verify --silent"
+  ],
+  "prepush": [
+    "npm run verify --silent"
+  ],
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/royriojas/flat-cache.git"
+  },
+  "scripts": {
+    "autofix": "npm run beautify && npm run eslint-fix",
+    "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'",
+    "beautify-check": "npm run beautify -- -k",
+    "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v",
+    "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v",
+    "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v",
+    "changelog": "changelogx -f markdown -o ./changelog.md",
+    "check": "npm run beautify-check && npm run eslint",
+    "cover": "istanbul cover test/runner.js html text-summary",
+    "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify",
+    "eslint": "eslinter 'cache.js' 'specs/**/*.js'",
+    "eslint-fix": "npm run eslint -- --fix",
+    "install-hooks": "prepush install && changelogx install-hook && precommit install",
+    "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify",
+    "pre-v": "npm run verify",
+    "test": "npm run verify --silent",
+    "test:cache": "mocha -R spec test/specs",
+    "verify": "npm run check && npm run test:cache",
+    "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary"
+  },
+  "version": "1.0.10"
+}
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/README.md b/tools/eslint/node_modules/generate-function/README.md
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/README.md
rename to tools/eslint/node_modules/generate-function/README.md
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/example.js b/tools/eslint/node_modules/generate-function/example.js
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/example.js
rename to tools/eslint/node_modules/generate-function/example.js
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/index.js b/tools/eslint/node_modules/generate-function/index.js
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/index.js
rename to tools/eslint/node_modules/generate-function/index.js
diff --git a/tools/eslint/node_modules/generate-function/package.json b/tools/eslint/node_modules/generate-function/package.json
new file mode 100644
index 00000000000000..9f8867e86c8e08
--- /dev/null
+++ b/tools/eslint/node_modules/generate-function/package.json
@@ -0,0 +1,79 @@
+{
+  "_args": [
+    [
+      "generate-function@^2.0.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid"
+    ]
+  ],
+  "_from": "generate-function@>=2.0.0 <3.0.0",
+  "_id": "generate-function@2.0.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/generate-function",
+  "_npmUser": {
+    "email": "mathiasbuus@gmail.com",
+    "name": "mafintosh"
+  },
+  "_npmVersion": "1.4.23",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "generate-function",
+    "raw": "generate-function@^2.0.0",
+    "rawSpec": "^2.0.0",
+    "scope": null,
+    "spec": ">=2.0.0 <3.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/is-my-json-valid"
+  ],
+  "_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
+  "_shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+  "_shrinkwrap": null,
+  "_spec": "generate-function@^2.0.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid",
+  "author": {
+    "name": "Mathias Buus"
+  },
+  "bugs": {
+    "url": "https://github.com/mafintosh/generate-function/issues"
+  },
+  "dependencies": {},
+  "description": "Module that helps you write generated functions in Node",
+  "devDependencies": {
+    "tape": "^2.13.4"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
+    "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
+  },
+  "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149",
+  "homepage": "https://github.com/mafintosh/generate-function",
+  "keywords": [
+    "code",
+    "function",
+    "generate",
+    "generation",
+    "performance"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "maintainers": [
+    {
+      "name": "mafintosh",
+      "email": "mathiasbuus@gmail.com"
+    }
+  ],
+  "name": "generate-function",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/mafintosh/generate-function.git"
+  },
+  "scripts": {
+    "test": "tape test.js"
+  },
+  "version": "2.0.0"
+}
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE b/tools/eslint/node_modules/generate-object-property/LICENSE
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE
rename to tools/eslint/node_modules/generate-object-property/LICENSE
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md b/tools/eslint/node_modules/generate-object-property/README.md
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md
rename to tools/eslint/node_modules/generate-object-property/README.md
diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js b/tools/eslint/node_modules/generate-object-property/index.js
similarity index 100%
rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js
rename to tools/eslint/node_modules/generate-object-property/index.js
diff --git a/tools/eslint/node_modules/generate-object-property/package.json b/tools/eslint/node_modules/generate-object-property/package.json
new file mode 100644
index 00000000000000..2215cd1df4bbd7
--- /dev/null
+++ b/tools/eslint/node_modules/generate-object-property/package.json
@@ -0,0 +1,76 @@
+{
+  "_args": [
+    [
+      "generate-object-property@^1.1.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid"
+    ]
+  ],
+  "_from": "generate-object-property@>=1.1.0 <2.0.0",
+  "_id": "generate-object-property@1.2.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/generate-object-property",
+  "_nodeVersion": "2.0.1",
+  "_npmUser": {
+    "email": "mathiasbuus@gmail.com",
+    "name": "mafintosh"
+  },
+  "_npmVersion": "2.9.0",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "generate-object-property",
+    "raw": "generate-object-property@^1.1.0",
+    "rawSpec": "^1.1.0",
+    "scope": null,
+    "spec": ">=1.1.0 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/is-my-json-valid"
+  ],
+  "_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+  "_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
+  "_shrinkwrap": null,
+  "_spec": "generate-object-property@^1.1.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid",
+  "author": {
+    "name": "Mathias Buus",
+    "url": "@mafintosh"
+  },
+  "bugs": {
+    "url": "https://github.com/mafintosh/generate-object-property/issues"
+  },
+  "dependencies": {
+    "is-property": "^1.0.0"
+  },
+  "description": "Generate safe JS code that can used to reference a object property",
+  "devDependencies": {
+    "tape": "^2.13.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
+    "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
+  },
+  "gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c",
+  "homepage": "https://github.com/mafintosh/generate-object-property",
+  "license": "MIT",
+  "main": "index.js",
+  "maintainers": [
+    {
+      "name": "mafintosh",
+      "email": "mathiasbuus@gmail.com"
+    }
+  ],
+  "name": "generate-object-property",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/mafintosh/generate-object-property.git"
+  },
+  "scripts": {
+    "test": "tape test.js"
+  },
+  "version": "1.2.0"
+}
diff --git a/tools/eslint/node_modules/glob/LICENSE b/tools/eslint/node_modules/glob/LICENSE
new file mode 100644
index 00000000000000..19129e315fe593
--- /dev/null
+++ b/tools/eslint/node_modules/glob/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tools/eslint/node_modules/glob/README.md b/tools/eslint/node_modules/glob/README.md
new file mode 100644
index 00000000000000..063cf950ac0c29
--- /dev/null
+++ b/tools/eslint/node_modules/glob/README.md
@@ -0,0 +1,377 @@
+[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
+
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+This is a glob implementation in JavaScript.  It uses the `minimatch`
+library to do its matching.
+
+![](oh-my-glob.gif)
+
+## Usage
+
+```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`.
+
+### Negation
+
+The intent for negation would be for a pattern starting with `!` to
+match everything that *doesn't* match the supplied pattern.  However,
+the implementation is weird, and for the time being, this should be
+avoided.  The behavior is deprecated in version 5, and will be removed
+entirely in version 6.
+
+### 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
+  * `'DIR'` - Path exists, and is not a directory
+  * `'FILE'` - 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 matched.
+* `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 patterns to exclude matches.
+* `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)
+* `nonegate` Suppress deprecated `negate` behavior.  (See below.)
+  Default=true
+* `nocomment` Suppress deprecated `comment` behavior.  (See below.)
+  Default=true
+
+## 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
+
+**Note**: In version 5 of this module, negation and comments are
+**disabled** by default.  You can explicitly set `nonegate:false` or
+`nocomment:false` to re-enable them.  They are going away entirely in
+version 6.
+
+The intent for negation would be for a pattern starting with `!` to
+match everything that *doesn't* match the supplied pattern.  However,
+the implementation is weird.  It is better to use the `ignore` option
+to set a pattern or set of patterns to exclude from matches.  If you
+want the "everything except *x*" type of behavior, you can use `**` as
+the main pattern, and set an `ignore` for the things to exclude.
+
+The comments feature is added in minimatch, primarily to more easily
+support use cases like ignore files, where a `#` at the start of a
+line makes the pattern "empty".  However, in the context of a
+straightforward filesystem globber, "comments" don't make much sense.
+
+## 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.
+
+## 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/tools/eslint/node_modules/glob/common.js b/tools/eslint/node_modules/glob/common.js
new file mode 100644
index 00000000000000..e36a631cab20c4
--- /dev/null
+++ b/tools/eslint/node_modules/glob/common.js
@@ -0,0 +1,245 @@
+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)
+  }
+}
+
+function ignoreMap (pattern) {
+  var gmatcher = null
+  if (pattern.slice(-3) === '/**') {
+    var gpattern = pattern.replace(/(\/\*\*)+$/, '')
+    gmatcher = new Minimatch(gpattern)
+  }
+
+  return {
+    matcher: new Minimatch(pattern),
+    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.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 = options.cwd
+    self.changedCwd = path.resolve(options.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, "/")
+
+  self.nomount = !!options.nomount
+
+  // disable comments and negation unless the user explicitly
+  // passes in false as the option.
+  options.nonegate = options.nonegate === false ? false : true
+  options.nocomment = options.nocomment === false ? false : true
+  deprecationWarning(options)
+
+  self.minimatch = new Minimatch(pattern, options)
+  self.options = self.minimatch.options
+}
+
+// TODO(isaacs): remove entirely in v6
+// exported to reset in tests
+exports.deprecationWarned
+function deprecationWarning(options) {
+  if (!options.nonegate || !options.nocomment) {
+    if (process.noDeprecation !== true && !exports.deprecationWarned) {
+      var msg = 'glob WARNING: comments and negation will be disabled in v6'
+      if (process.throwDeprecation)
+        throw new Error(msg)
+      else if (process.traceDeprecation)
+        console.trace(msg)
+      else
+        console.error(msg)
+
+      exports.deprecationWarned = true
+    }
+  }
+}
+
+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) {
+        return !(/\/$/.test(e))
+      })
+    }
+  }
+
+  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)
+  }
+  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/tools/eslint/node_modules/glob/glob.js b/tools/eslint/node_modules/glob/glob.js
new file mode 100644
index 00000000000000..022d2ac8c6e58b
--- /dev/null
+++ b/tools/eslint/node_modules/glob/glob.js
@@ -0,0 +1,752 @@
+// 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 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
+
+glob.hasMagic = function (pattern, options_) {
+  var options = util._extend({}, options_)
+  options.noprocess = true
+
+  var g = new Glob(pattern, options)
+  var set = g.minimatch.set
+  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
+  var n = this.minimatch.set.length
+  this._processing = 0
+  this.matches = new Array(n)
+
+  this._emitQueue = []
+  this._processQueue = []
+  this.paused = false
+
+  if (this.noprocess)
+    return this
+
+  if (n === 0)
+    return done()
+
+  for (var i = 0; i < n; i ++) {
+    this._process(this.minimatch.set[i], i, false, done)
+  }
+
+  function done () {
+    --self._processing
+    if (self._processing <= 0)
+      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)
+    fs.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 (this.matches[index][e])
+    return
+
+  if (isIgnored(this, e))
+    return
+
+  if (this.paused) {
+    this._emitQueue.push([index, e])
+    return
+  }
+
+  var abs = this._makeAbs(e)
+
+  if (this.nodir) {
+    var c = this.cache[abs]
+    if (c === 'DIR' || Array.isArray(c))
+      return
+  }
+
+  if (this.mark)
+    e = this._mark(e)
+
+  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)
+      return cb()
+
+    var isSym = 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.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.
+      this.cache[this._makeAbs(f)] = 'FILE'
+      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) {
+    this.statCache[abs] = false
+    return cb()
+  }
+
+  var needDir = f.slice(-1) === '/'
+  this.statCache[abs] = stat
+
+  if (abs.slice(-1) === '/' && !stat.isDirectory())
+    return cb(null, false, stat)
+
+  var c = stat.isDirectory() ? 'DIR' : 'FILE'
+  this.cache[abs] = this.cache[abs] || c
+
+  if (needDir && c !== 'DIR')
+    return cb()
+
+  return cb(null, c, stat)
+}
diff --git a/tools/eslint/node_modules/glob/package.json b/tools/eslint/node_modules/glob/package.json
new file mode 100644
index 00000000000000..77f22feb3af951
--- /dev/null
+++ b/tools/eslint/node_modules/glob/package.json
@@ -0,0 +1,98 @@
+{
+  "_args": [
+    [
+      "glob@^5.0.14",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "glob@>=5.0.14 <6.0.0",
+  "_id": "glob@5.0.15",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/glob",
+  "_nodeVersion": "4.0.0",
+  "_npmUser": {
+    "email": "isaacs@npmjs.com",
+    "name": "isaacs"
+  },
+  "_npmVersion": "3.3.2",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "glob",
+    "raw": "glob@^5.0.14",
+    "rawSpec": "^5.0.14",
+    "scope": null,
+    "spec": ">=5.0.14 <6.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+  "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
+  "_shrinkwrap": null,
+  "_spec": "glob@^5.0.14",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
+  "author": {
+    "email": "i@izs.me",
+    "name": "Isaac Z. Schlueter",
+    "url": "http://blog.izs.me/"
+  },
+  "bugs": {
+    "url": "https://github.com/isaacs/node-glob/issues"
+  },
+  "dependencies": {
+    "inflight": "^1.0.4",
+    "inherits": "2",
+    "minimatch": "2 || 3",
+    "once": "^1.3.0",
+    "path-is-absolute": "^1.0.0"
+  },
+  "description": "a little globber",
+  "devDependencies": {
+    "mkdirp": "0",
+    "rimraf": "^2.2.8",
+    "tap": "^1.1.4",
+    "tick": "0.0.6"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
+    "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz"
+  },
+  "engines": {
+    "node": "*"
+  },
+  "files": [
+    "common.js",
+    "glob.js",
+    "sync.js"
+  ],
+  "gitHead": "3a7e71d453dd80e75b196fd262dd23ed54beeceb",
+  "homepage": "https://github.com/isaacs/node-glob#readme",
+  "license": "ISC",
+  "main": "glob.js",
+  "maintainers": [
+    {
+      "name": "isaacs",
+      "email": "i@izs.me"
+    }
+  ],
+  "name": "glob",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "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": "5.0.15"
+}
diff --git a/tools/eslint/node_modules/glob/sync.js b/tools/eslint/node_modules/glob/sync.js
new file mode 100644
index 00000000000000..09883d2ce0c9de
--- /dev/null
+++ b/tools/eslint/node_modules/glob/sync.js
@@ -0,0 +1,460 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var fs = require('fs')
+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
+
+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 = fs.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.matches[index][e] = true
+    }
+    // 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) {
+  var abs = this._makeAbs(e)
+  if (this.mark)
+    e = this._mark(e)
+
+  if (this.matches[index][e])
+    return
+
+  if (this.nodir) {
+    var c = this.cache[this._makeAbs(e)]
+    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) {
+    // lstat failed, doesn't exist
+    return null
+  }
+
+  var isSym = 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.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.
+      this.cache[this._makeAbs(f)] = 'FILE'
+      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.matches[index][prefix] = true
+}
+
+// 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) {
+      return false
+    }
+
+    if (lstat.isSymbolicLink()) {
+      try {
+        stat = fs.statSync(abs)
+      } catch (er) {
+        stat = lstat
+      }
+    } else {
+      stat = lstat
+    }
+  }
+
+  this.statCache[abs] = stat
+
+  var c = stat.isDirectory() ? 'DIR' : 'FILE'
+  this.cache[abs] = this.cache[abs] || c
+
+  if (needDir && c !== 'DIR')
+    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/tools/eslint/node_modules/globals/globals.json b/tools/eslint/node_modules/globals/globals.json
index ad5c25f3e83d22..38a7d72e997870 100644
--- a/tools/eslint/node_modules/globals/globals.json
+++ b/tools/eslint/node_modules/globals/globals.json
@@ -59,23 +59,152 @@
 		"WeakMap": false,
 		"WeakSet": false
 	},
+	"es5": {
+		"Array": false,
+		"Boolean": false,
+		"constructor": false,
+		"Date": false,
+		"decodeURI": false,
+		"decodeURIComponent": false,
+		"encodeURI": false,
+		"encodeURIComponent": false,
+		"Error": false,
+		"escape": false,
+		"eval": false,
+		"EvalError": false,
+		"Float32Array": false,
+		"Float64Array": false,
+		"Function": false,
+		"hasOwnProperty": false,
+		"Infinity": false,
+		"isFinite": false,
+		"isNaN": false,
+		"isPrototypeOf": false,
+		"JSON": false,
+		"Math": false,
+		"NaN": false,
+		"Number": false,
+		"Object": false,
+		"parseFloat": false,
+		"parseInt": false,
+		"propertyIsEnumerable": false,
+		"RangeError": false,
+		"ReferenceError": false,
+		"RegExp": false,
+		"String": false,
+		"SyntaxError": false,
+		"toLocaleString": false,
+		"toString": false,
+		"TypeError": false,
+		"undefined": false,
+		"unescape": false,
+		"URIError": false,
+		"valueOf": false
+	},
+	"es6": {
+		"Array": false,
+		"ArrayBuffer": false,
+		"Boolean": false,
+		"constructor": false,
+		"DataView": false,
+		"Date": false,
+		"decodeURI": false,
+		"decodeURIComponent": false,
+		"encodeURI": false,
+		"encodeURIComponent": false,
+		"Error": false,
+		"escape": false,
+		"eval": false,
+		"EvalError": false,
+		"Float32Array": false,
+		"Float64Array": false,
+		"Function": false,
+		"hasOwnProperty": false,
+		"Infinity": false,
+		"Int16Array": false,
+		"Int32Array": false,
+		"Int8Array": false,
+		"isFinite": false,
+		"isNaN": false,
+		"isPrototypeOf": false,
+		"JSON": false,
+		"Map": false,
+		"Math": false,
+		"NaN": false,
+		"Number": false,
+		"Object": false,
+		"parseFloat": false,
+		"parseInt": false,
+		"Promise": false,
+		"propertyIsEnumerable": false,
+		"Proxy": false,
+		"RangeError": false,
+		"ReferenceError": false,
+		"Reflect": false,
+		"RegExp": false,
+		"Set": false,
+		"String": false,
+		"Symbol": false,
+		"SyntaxError": false,
+		"System": false,
+		"toLocaleString": false,
+		"toString": false,
+		"TypeError": false,
+		"Uint16Array": false,
+		"Uint32Array": false,
+		"Uint8Array": false,
+		"Uint8ClampedArray": false,
+		"undefined": false,
+		"unescape": false,
+		"URIError": false,
+		"valueOf": false,
+		"WeakMap": false,
+		"WeakSet": false
+	},
 	"browser": {
 		"addEventListener": false,
 		"alert": false,
+		"AnalyserNode": false,
+		"AnimationEvent": false,
 		"applicationCache": false,
+		"ApplicationCache": false,
+		"ApplicationCacheErrorEvent": false,
 		"atob": false,
+		"Attr": false,
 		"Audio": false,
+		"AudioBuffer": false,
+		"AudioBufferSourceNode": false,
+		"AudioContext": false,
+		"AudioDestinationNode": false,
+		"AudioListener": false,
+		"AudioNode": false,
+		"AudioParam": false,
 		"AudioProcessingEvent": false,
+		"AutocompleteErrorEvent": false,
+		"BarProp": false,
+		"BatteryManager": false,
 		"BeforeUnloadEvent": false,
+		"BiquadFilterNode": false,
 		"Blob": false,
 		"blur": false,
 		"btoa": false,
+		"Cache": false,
+		"caches": false,
+		"CacheStorage": false,
 		"cancelAnimationFrame": false,
 		"CanvasGradient": false,
 		"CanvasPattern": false,
 		"CanvasRenderingContext2D": false,
+		"CDATASection": false,
+		"ChannelMergerNode": false,
+		"ChannelSplitterNode": false,
+		"CharacterData": false,
 		"clearInterval": false,
 		"clearTimeout": false,
+		"clientInformation": false,
+		"ClientRect": false,
+		"ClientRectList": false,
+		"ClipboardEvent": false,
 		"close": false,
 		"closed": false,
 		"CloseEvent": false,
@@ -83,52 +212,106 @@
 		"CompositionEvent": false,
 		"confirm": false,
 		"console": false,
+		"ConvolverNode": false,
 		"crypto": false,
+		"Crypto": false,
+		"CryptoKey": false,
 		"CSS": false,
+		"CSSFontFaceRule": false,
+		"CSSImportRule": false,
+		"CSSKeyframeRule": false,
+		"CSSKeyframesRule": false,
+		"CSSMediaRule": false,
+		"CSSPageRule": false,
+		"CSSRule": false,
+		"CSSRuleList": false,
+		"CSSStyleDeclaration": false,
+		"CSSStyleRule": false,
+		"CSSStyleSheet": false,
+		"CSSSupportsRule": false,
+		"CSSUnknownRule": false,
+		"CSSViewportRule": false,
 		"CustomEvent": false,
+		"DataTransfer": false,
+		"DataTransferItem": false,
+		"DataTransferItemList": false,
 		"Debug": false,
 		"defaultStatus": false,
+		"defaultstatus": false,
+		"DelayNode": false,
+		"DeviceMotionEvent": false,
+		"DeviceOrientationEvent": false,
 		"devicePixelRatio": false,
 		"dispatchEvent": false,
 		"document": false,
 		"Document": false,
 		"DocumentFragment": false,
+		"DocumentType": false,
+		"DOMError": false,
+		"DOMException": false,
+		"DOMImplementation": false,
 		"DOMParser": false,
+		"DOMSettableTokenList": false,
+		"DOMStringList": false,
+		"DOMStringMap": false,
+		"DOMTokenList": false,
 		"DragEvent": false,
+		"DynamicsCompressorNode": false,
 		"Element": false,
 		"ElementTimeControl": false,
 		"ErrorEvent": false,
 		"event": false,
 		"Event": false,
 		"EventSource": false,
+		"EventTarget": false,
+		"external": false,
+		"fetch": false,
+		"File": false,
+		"FileError": false,
 		"FileList": false,
 		"FileReader": false,
-		"fetch": false,
 		"find": false,
 		"focus": false,
 		"FocusEvent": false,
+		"FontFace": false,
 		"FormData": false,
 		"frameElement": false,
 		"frames": false,
+		"GainNode": false,
+		"Gamepad": false,
+		"GamepadButton": false,
 		"GamepadEvent": false,
 		"getComputedStyle": false,
 		"getSelection": false,
 		"HashChangeEvent": false,
 		"Headers": false,
 		"history": false,
+		"History": false,
+		"HTMLAllCollection": false,
 		"HTMLAnchorElement": false,
+		"HTMLAppletElement": false,
+		"HTMLAreaElement": false,
+		"HTMLAudioElement": false,
 		"HTMLBaseElement": false,
 		"HTMLBlockquoteElement": false,
 		"HTMLBodyElement": false,
 		"HTMLBRElement": false,
 		"HTMLButtonElement": false,
 		"HTMLCanvasElement": false,
+		"HTMLCollection": false,
+		"HTMLContentElement": false,
+		"HTMLDataListElement": false,
+		"HTMLDetailsElement": false,
+		"HTMLDialogElement": false,
 		"HTMLDirectoryElement": false,
 		"HTMLDivElement": false,
 		"HTMLDListElement": false,
+		"HTMLDocument": false,
 		"HTMLElement": false,
+		"HTMLEmbedElement": false,
 		"HTMLFieldSetElement": false,
 		"HTMLFontElement": false,
+		"HTMLFormControlsCollection": false,
 		"HTMLFormElement": false,
 		"HTMLFrameElement": false,
 		"HTMLFrameSetElement": false,
@@ -140,25 +323,36 @@
 		"HTMLImageElement": false,
 		"HTMLInputElement": false,
 		"HTMLIsIndexElement": false,
+		"HTMLKeygenElement": false,
 		"HTMLLabelElement": false,
 		"HTMLLayerElement": false,
 		"HTMLLegendElement": false,
 		"HTMLLIElement": false,
 		"HTMLLinkElement": false,
 		"HTMLMapElement": false,
+		"HTMLMarqueeElement": false,
+		"HTMLMediaElement": false,
 		"HTMLMenuElement": false,
 		"HTMLMetaElement": false,
+		"HTMLMeterElement": false,
 		"HTMLModElement": false,
 		"HTMLObjectElement": false,
 		"HTMLOListElement": false,
 		"HTMLOptGroupElement": false,
 		"HTMLOptionElement": false,
+		"HTMLOptionsCollection": false,
+		"HTMLOutputElement": false,
 		"HTMLParagraphElement": false,
 		"HTMLParamElement": false,
+		"HTMLPictureElement": false,
 		"HTMLPreElement": false,
+		"HTMLProgressElement": false,
 		"HTMLQuoteElement": false,
 		"HTMLScriptElement": false,
 		"HTMLSelectElement": false,
+		"HTMLShadowElement": false,
+		"HTMLSourceElement": false,
+		"HTMLSpanElement": false,
 		"HTMLStyleElement": false,
 		"HTMLTableCaptionElement": false,
 		"HTMLTableCellElement": false,
@@ -166,9 +360,12 @@
 		"HTMLTableElement": false,
 		"HTMLTableRowElement": false,
 		"HTMLTableSectionElement": false,
+		"HTMLTemplateElement": false,
 		"HTMLTextAreaElement": false,
 		"HTMLTitleElement": false,
+		"HTMLTrackElement": false,
 		"HTMLUListElement": false,
+		"HTMLUnknownElement": false,
 		"HTMLVideoElement": false,
 		"IDBCursor": false,
 		"IDBCursorWithValue": false,
@@ -183,30 +380,71 @@
 		"IDBTransaction": false,
 		"IDBVersionChangeEvent": false,
 		"Image": false,
+		"ImageBitmap": false,
+		"ImageData": false,
 		"indexedDB": false,
 		"innerHeight": false,
 		"innerWidth": false,
 		"InputEvent": false,
+		"InputMethodContext": false,
 		"Intl": false,
 		"KeyboardEvent": false,
 		"length": false,
 		"localStorage": false,
 		"location": false,
+		"Location": false,
+		"locationbar": false,
 		"matchMedia": false,
+		"MediaElementAudioSourceNode": false,
+		"MediaEncryptedEvent": false,
+		"MediaError": false,
+		"MediaKeyError": false,
+		"MediaKeyEvent": false,
+		"MediaKeyMessageEvent": false,
+		"MediaKeys": false,
+		"MediaKeySession": false,
+		"MediaKeyStatusMap": false,
+		"MediaKeySystemAccess": false,
+		"MediaList": false,
+		"MediaQueryList": false,
+		"MediaQueryListEvent": false,
+		"MediaSource": false,
+		"MediaStreamAudioDestinationNode": false,
+		"MediaStreamAudioSourceNode": false,
+		"MediaStreamEvent": false,
+		"MediaStreamTrack": false,
+		"menubar": false,
 		"MessageChannel": false,
 		"MessageEvent": false,
 		"MessagePort": false,
+		"MIDIAccess": false,
+		"MIDIConnectionEvent": false,
+		"MIDIInput": false,
+		"MIDIInputMap": false,
+		"MIDIMessageEvent": false,
+		"MIDIOutput": false,
+		"MIDIOutputMap": false,
+		"MIDIPort": false,
+		"MimeType": false,
+		"MimeTypeArray": false,
 		"MouseEvent": false,
 		"moveBy": false,
 		"moveTo": false,
+		"MutationEvent": false,
 		"MutationObserver": false,
+		"MutationRecord": false,
 		"name": false,
+		"NamedNodeMap": false,
 		"navigator": false,
+		"Navigator": false,
 		"Node": false,
 		"NodeFilter": false,
+		"NodeIterator": false,
 		"NodeList": false,
 		"Notification": false,
 		"OfflineAudioCompletionEvent": false,
+		"OfflineAudioContext": false,
+		"offscreenBuffering": false,
 		"onbeforeunload": true,
 		"onblur": true,
 		"onerror": true,
@@ -219,42 +457,86 @@
 		"opener": false,
 		"opera": false,
 		"Option": false,
+		"OscillatorNode": false,
 		"outerHeight": false,
 		"outerWidth": false,
 		"PageTransitionEvent": false,
 		"pageXOffset": false,
 		"pageYOffset": false,
 		"parent": false,
+		"Path2D": false,
+		"performance": false,
+		"Performance": false,
+		"PerformanceEntry": false,
+		"PerformanceMark": false,
+		"PerformanceMeasure": false,
+		"PerformanceNavigation": false,
+		"PerformanceResourceTiming": false,
+		"PerformanceTiming": false,
+		"PeriodicWave": false,
+		"Permissions": false,
+		"PermissionStatus": false,
+		"personalbar": false,
+		"Plugin": false,
+		"PluginArray": false,
 		"PopStateEvent": false,
 		"postMessage": false,
 		"print": false,
+		"ProcessingInstruction": false,
 		"ProgressEvent": false,
 		"prompt": false,
+		"PushManager": false,
+		"PushSubscription": false,
+		"RadioNodeList": false,
 		"Range": false,
-		"Request": false,
-		"Response": false,
+		"ReadableByteStream": false,
+		"ReadableStream": false,
 		"removeEventListener": false,
+		"Request": false,
 		"requestAnimationFrame": false,
 		"resizeBy": false,
 		"resizeTo": false,
+		"Response": false,
+		"RTCIceCandidate": false,
+		"RTCSessionDescription": false,
 		"screen": false,
+		"Screen": false,
+		"screenLeft": false,
+		"ScreenOrientation": false,
+		"screenTop": false,
 		"screenX": false,
 		"screenY": false,
+		"ScriptProcessorNode": false,
 		"scroll": false,
 		"scrollbars": false,
 		"scrollBy": false,
 		"scrollTo": false,
 		"scrollX": false,
 		"scrollY": false,
+		"SecurityPolicyViolationEvent": false,
+		"Selection": false,
 		"self": false,
+		"ServiceWorker": false,
+		"ServiceWorkerContainer": false,
+		"ServiceWorkerRegistration": false,
 		"sessionStorage": false,
 		"setInterval": false,
 		"setTimeout": false,
+		"ShadowRoot": false,
 		"SharedWorker": false,
 		"showModalDialog": false,
+		"speechSynthesis": false,
+		"SpeechSynthesisEvent": false,
+		"SpeechSynthesisUtterance": false,
 		"status": false,
+		"statusbar": false,
 		"stop": false,
+		"Storage": false,
 		"StorageEvent": false,
+		"styleMedia": false,
+		"StyleSheet": false,
+		"StyleSheetList": false,
+		"SubtleCrypto": false,
 		"SVGAElement": false,
 		"SVGAltGlyphDefElement": false,
 		"SVGAltGlyphElement": false,
@@ -289,6 +571,7 @@
 		"SVGCursorElement": false,
 		"SVGDefsElement": false,
 		"SVGDescElement": false,
+		"SVGDiscardElement": false,
 		"SVGDocument": false,
 		"SVGElement": false,
 		"SVGElementInstance": false,
@@ -304,6 +587,7 @@
 		"SVGFEDiffuseLightingElement": false,
 		"SVGFEDisplacementMapElement": false,
 		"SVGFEDistantLightElement": false,
+		"SVGFEDropShadowElement": false,
 		"SVGFEFloodElement": false,
 		"SVGFEFuncAElement": false,
 		"SVGFEFuncBElement": false,
@@ -331,9 +615,11 @@
 		"SVGFontFaceUriElement": false,
 		"SVGForeignObjectElement": false,
 		"SVGGElement": false,
+		"SVGGeometryElement": false,
 		"SVGGlyphElement": false,
 		"SVGGlyphRefElement": false,
 		"SVGGradientElement": false,
+		"SVGGraphicsElement": false,
 		"SVGHKernElement": false,
 		"SVGICCColor": false,
 		"SVGImageElement": false,
@@ -411,14 +697,31 @@
 		"SVGViewSpec": false,
 		"SVGVKernElement": false,
 		"SVGZoomAndPan": false,
+		"SVGZoomEvent": false,
 		"Text": false,
 		"TextDecoder": false,
 		"TextEncoder": false,
+		"TextEvent": false,
+		"TextMetrics": false,
+		"TextTrack": false,
+		"TextTrackCue": false,
+		"TextTrackCueList": false,
+		"TextTrackList": false,
 		"TimeEvent": false,
+		"TimeRanges": false,
+		"toolbar": false,
 		"top": false,
+		"Touch": false,
 		"TouchEvent": false,
+		"TouchList": false,
+		"TrackEvent": false,
+		"TransitionEvent": false,
+		"TreeWalker": false,
 		"UIEvent": false,
 		"URL": false,
+		"ValidityState": false,
+		"VTTCue": false,
+		"WaveShaperNode": false,
 		"WebGLActiveInfo": false,
 		"WebGLBuffer": false,
 		"WebGLContextEvent": false,
@@ -436,19 +739,87 @@
 		"Window": false,
 		"Worker": false,
 		"XDomainRequest": false,
+		"XMLDocument": false,
 		"XMLHttpRequest": false,
+		"XMLHttpRequestEventTarget": false,
+		"XMLHttpRequestProgressEvent": false,
+		"XMLHttpRequestUpload": false,
 		"XMLSerializer": false,
 		"XPathEvaluator": false,
 		"XPathException": false,
 		"XPathExpression": false,
 		"XPathNamespace": false,
 		"XPathNSResolver": false,
-		"XPathResult": false
+		"XPathResult": false,
+		"XSLTProcessor": false
 	},
 	"worker": {
+		"applicationCache": false,
+		"atob": false,
+		"Blob": false,
+		"BroadcastChannel": false,
+		"btoa": false,
+		"Cache": false,
+		"caches": false,
+		"clearInterval": false,
+		"clearTimeout": false,
+		"close": true,
+		"console": false,
+		"fetch": false,
+		"FileReaderSync": false,
+		"FormData": false,
+		"Headers": false,
+		"IDBCursor": false,
+		"IDBCursorWithValue": false,
+		"IDBDatabase": false,
+		"IDBFactory": false,
+		"IDBIndex": false,
+		"IDBKeyRange": false,
+		"IDBObjectStore": false,
+		"IDBOpenDBRequest": false,
+		"IDBRequest": false,
+		"IDBTransaction": false,
+		"IDBVersionChangeEvent": false,
+		"ImageData": false,
 		"importScripts": true,
+		"indexedDB": false,
+		"location": false,
+		"MessageChannel": false,
+		"MessagePort": false,
+		"name": false,
+		"navigator": false,
+		"Notification": false,
+		"onclose": true,
+		"onconnect": true,
+		"onerror": true,
+		"onlanguagechange": true,
+		"onmessage": true,
+		"onoffline": true,
+		"ononline": true,
+		"onrejectionhandled": true,
+		"onunhandledrejection": true,
+		"performance": false,
+		"Performance": false,
+		"PerformanceEntry": false,
+		"PerformanceMark": false,
+		"PerformanceMeasure": false,
+		"PerformanceNavigation": false,
+		"PerformanceResourceTiming": false,
+		"PerformanceTiming": false,
 		"postMessage": true,
-		"self": true
+		"Promise": false,
+		"Request": false,
+		"Response": false,
+		"self": true,
+		"ServiceWorkerRegistration": false,
+		"setInterval": false,
+		"setTimeout": false,
+		"TextDecoder": false,
+		"TextEncoder": false,
+		"URL": false,
+		"WebSocket": false,
+		"Worker": false,
+		"XMLHttpRequest": false
 	},
 	"node": {
 		"__dirname": false,
@@ -470,6 +841,12 @@
 		"setInterval": false,
 		"setTimeout": false
 	},
+	"commonjs": {
+		"exports": true,
+		"module": false,
+		"require": false,
+		"global": false
+	},
 	"amd": {
 		"define": false,
 		"require": false
@@ -515,6 +892,18 @@
 		"xdescribe": false,
 		"xit": false
 	},
+	"jest": {
+		"afterEach": false,
+		"beforeEach": false,
+		"describe": false,
+		"expect": false,
+		"it": false,
+		"jest": false,
+		"pit": false,
+		"require": false,
+		"xdescribe": false,
+		"xit": false
+	},
 	"qunit": {
 		"asyncTest": false,
 		"deepEqual": false,
@@ -523,6 +912,7 @@
 		"module": false,
 		"notDeepEqual": false,
 		"notEqual": false,
+		"notOk": false,
 		"notPropEqual": false,
 		"notStrictEqual": false,
 		"ok": false,
@@ -578,6 +968,26 @@
 		"toint32": false,
 		"version": false
 	},
+	"nashorn": {
+		"__DIR__": false,
+		"__FILE__": false,
+		"__LINE__": false,
+		"com": false,
+		"edu": false,
+		"exit": false,
+		"Java": false,
+		"java": false,
+		"javafx": false,
+		"JavaImporter": false,
+		"javax": false,
+		"JSAdapter": false,
+		"load": false,
+		"loadWithNewGlobal": false,
+		"org": false,
+		"Packages": false,
+		"print": false,
+		"quit": false
+	},
 	"wsh": {
 		"ActiveXObject": true,
 		"Enumerator": true,
@@ -615,6 +1025,7 @@
 		"find": false,
 		"grep": false,
 		"ls": false,
+		"ln": false,
 		"mkdir": false,
 		"mv": false,
 		"popd": false,
@@ -725,6 +1136,8 @@
 		"Mongo": false,
 		"ObjectId": false,
 		"PlanCache": false,
+		"print": false,
+		"printjson": false,
 		"pwd": false,
 		"quit": false,
 		"removeFile": false,
@@ -746,5 +1159,87 @@
 		"Path": false,
 		"Progress": false,
 		"Ref": false
+	},
+	"serviceworker": {
+		"caches": false,
+		"Cache": false,
+		"CacheStorage": false,
+		"Client": false,
+		"clients": false,
+		"Clients": false,
+		"ExtendableEvent": false,
+		"ExtendableMessageEvent": false,
+		"FetchEvent": false,
+		"importScripts": false,
+		"registration": false,
+		"self": false,
+		"ServiceWorker": false,
+		"ServiceWorkerContainer": false,
+		"ServiceWorkerGlobalScope": false,
+		"ServiceWorkerMessageEvent": false,
+		"ServiceWorkerRegistration": false,
+		"skipWaiting": false,
+		"WindowClient": false
+	},
+	"atomtest": {
+		"advanceClock": false,
+		"fakeClearInterval": false,
+		"fakeClearTimeout": false,
+		"fakeSetInterval": false,
+		"fakeSetTimeout": false,
+		"resetTimeouts": false,
+		"waitsForPromise": false
+	},
+	"embertest": {
+		"andThen": false,
+		"click": false,
+		"currentPath": false,
+		"currentRouteName": false,
+		"currentURL": false,
+		"fillIn": false,
+		"find": false,
+		"findWithAssert": false,
+		"keyEvent": false,
+		"pauseTest": false,
+		"triggerEvent": false,
+		"visit": false
+	},
+	"protractor": {
+		"$": false,
+		"$$": false,
+		"browser": false,
+		"By": false,
+		"by": false,
+		"DartObject": false,
+		"element": false,
+		"protractor": false
+	},
+	"shared-node-browser": {
+		"clearInterval": false,
+		"clearTimeout": false,
+		"console": false,
+		"setInterval": false,
+		"setTimeout": false
+	},
+	"webextensions": {
+		"browser": false,
+		"chrome": false,
+		"opr": false
+	},
+	"greasemonkey": {
+		"GM_addStyle": false,
+		"GM_deleteValue": false,
+		"GM_getResourceText": false,
+		"GM_getResourceURL": false,
+		"GM_getValue": false,
+		"GM_info": false,
+		"GM_listValues": false,
+		"GM_log": false,
+		"GM_openInTab": false,
+		"GM_registerMenuCommand": false,
+		"GM_setClipboard": false,
+		"GM_setValue": false,
+		"GM_xmlhttpRequest": false,
+		"unsafeWindow": false
 	}
 }
diff --git a/tools/eslint/node_modules/globals/package.json b/tools/eslint/node_modules/globals/package.json
index a2c763000d296e..bd280978115d25 100644
--- a/tools/eslint/node_modules/globals/package.json
+++ b/tools/eslint/node_modules/globals/package.json
@@ -1,72 +1,103 @@
 {
-  "name": "globals",
-  "version": "8.1.0",
-  "description": "Global identifiers from different JavaScript environments",
-  "license": "MIT",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/sindresorhus/globals"
+  "_args": [
+    [
+      "globals@^8.11.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint"
+    ]
+  ],
+  "_from": "globals@>=8.11.0 <9.0.0",
+  "_id": "globals@8.18.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/globals",
+  "_nodeVersion": "5.3.0",
+  "_npmUser": {
+    "email": "sindresorhus@gmail.com",
+    "name": "sindresorhus"
   },
+  "_npmVersion": "3.3.12",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "globals",
+    "raw": "globals@^8.11.0",
+    "rawSpec": "^8.11.0",
+    "scope": null,
+    "spec": ">=8.11.0 <9.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint"
+  ],
+  "_resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz",
+  "_shasum": "93d4a62bdcac38cfafafc47d6b034768cb0ffcb4",
+  "_shrinkwrap": null,
+  "_spec": "globals@^8.11.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint",
   "author": {
-    "name": "Sindre Sorhus",
     "email": "sindresorhus@gmail.com",
+    "name": "Sindre Sorhus",
     "url": "http://sindresorhus.com"
   },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/globals/issues"
+  },
+  "dependencies": {},
+  "description": "Global identifiers from different JavaScript environments",
+  "devDependencies": {
+    "mocha": "*"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "93d4a62bdcac38cfafafc47d6b034768cb0ffcb4",
+    "tarball": "http://registry.npmjs.org/globals/-/globals-8.18.0.tgz"
+  },
   "engines": {
     "node": ">=0.10.0"
   },
-  "scripts": {
-    "test": "mocha"
-  },
   "files": [
-    "index.js",
-    "globals.json"
+    "globals.json",
+    "index.js"
   ],
+  "gitHead": "d929a0c638008d4cbf87cc7faac5bc5169e2b86d",
+  "homepage": "https://github.com/sindresorhus/globals",
   "keywords": [
-    "globals",
+    "environments",
+    "eslint",
     "global",
+    "globals",
     "identifiers",
-    "variables",
-    "vars",
     "jshint",
-    "eslint",
-    "environments"
+    "variables",
+    "vars"
   ],
-  "devDependencies": {
-    "mocha": "*"
-  },
-  "gitHead": "f86075648ac672a540e64c2a46de8ef49c15fc0b",
-  "bugs": {
-    "url": "https://github.com/sindresorhus/globals/issues"
-  },
-  "homepage": "https://github.com/sindresorhus/globals",
-  "_id": "globals@8.1.0",
-  "_shasum": "f491df47705dfb94e06ff4ff2352babde95e10b8",
-  "_from": "globals@>=8.0.0 <9.0.0",
-  "_npmVersion": "2.10.1",
-  "_nodeVersion": "0.12.4",
-  "_npmUser": {
-    "name": "sindresorhus",
-    "email": "sindresorhus@gmail.com"
-  },
-  "dist": {
-    "shasum": "f491df47705dfb94e06ff4ff2352babde95e10b8",
-    "tarball": "http://registry.npmjs.org/globals/-/globals-8.1.0.tgz"
-  },
+  "license": "MIT",
   "maintainers": [
     {
-      "name": "sindresorhus",
-      "email": "sindresorhus@gmail.com"
+      "name": "byk",
+      "email": "ben@byk.im"
+    },
+    {
+      "name": "lo1tuma",
+      "email": "schreck.mathias@gmail.com"
     },
     {
       "name": "nzakas",
       "email": "nicholas@nczconsulting.com"
     },
     {
-      "name": "lo1tuma",
-      "email": "schreck.mathias@gmail.com"
+      "name": "sindresorhus",
+      "email": "sindresorhus@gmail.com"
     }
   ],
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/globals/-/globals-8.1.0.tgz"
+  "name": "globals",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/globals.git"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "version": "8.18.0"
 }
diff --git a/tools/eslint/node_modules/globals/readme.md b/tools/eslint/node_modules/globals/readme.md
index dc23c97f35433c..3eb024e5a5b190 100644
--- a/tools/eslint/node_modules/globals/readme.md
+++ b/tools/eslint/node_modules/globals/readme.md
@@ -2,7 +2,7 @@
 
 > Global identifiers from different JavaScript environments
 
-Extracted from [JSHint](https://github.com/jshint/jshint/blob/master/src/vars.js) and [ESLint](https://github.com/nzakas/eslint/blob/master/conf/environments.json) and merged.
+Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged.
 
 It's just a [JSON file](globals.json), so use it in whatever environment you like.
 
diff --git a/tools/eslint/node_modules/globby/index.js b/tools/eslint/node_modules/globby/index.js
new file mode 100644
index 00000000000000..8f20018ff44a75
--- /dev/null
+++ b/tools/eslint/node_modules/globby/index.js
@@ -0,0 +1,68 @@
+'use strict';
+var Promise = require('pinkie-promise');
+var arrayUnion = require('array-union');
+var objectAssign = require('object-assign');
+var glob = require('glob');
+var arrify = require('arrify');
+var pify = require('pify');
+
+function sortPatterns(patterns) {
+	patterns = arrify(patterns);
+
+	var positives = [];
+	var negatives = [];
+
+	patterns.forEach(function (pattern, index) {
+		var isNegative = pattern[0] === '!';
+		(isNegative ? negatives : positives).push({
+			index: index,
+			pattern: isNegative ? pattern.slice(1) : pattern
+		});
+	});
+
+	return {
+		positives: positives,
+		negatives: negatives
+	};
+}
+
+function setIgnore(opts, negatives, positiveIndex) {
+	opts = objectAssign({}, opts);
+
+	var negativePatterns = negatives.filter(function (negative) {
+		return negative.index > positiveIndex;
+	}).map(function (negative) {
+		return negative.pattern;
+	});
+
+	opts.ignore = (opts.ignore || []).concat(negativePatterns);
+	return opts;
+}
+
+module.exports = function (patterns, opts) {
+	var sortedPatterns = sortPatterns(patterns);
+	opts = opts || {};
+
+	if (sortedPatterns.positives.length === 0) {
+		return Promise.resolve([]);
+	}
+
+	return Promise.all(sortedPatterns.positives.map(function (positive) {
+		var globOpts = setIgnore(opts, sortedPatterns.negatives, positive.index);
+		return pify(glob, Promise)(positive.pattern, globOpts);
+	})).then(function (paths) {
+		return arrayUnion.apply(null, paths);
+	});
+};
+
+module.exports.sync = function (patterns, opts) {
+	var sortedPatterns = sortPatterns(patterns);
+
+	if (sortedPatterns.positives.length === 0) {
+		return [];
+	}
+
+	return sortedPatterns.positives.reduce(function (ret, positive) {
+		return arrayUnion(ret, glob.sync(positive.pattern, setIgnore(opts, sortedPatterns.negatives, positive.index)));
+	}, []);
+};
diff --git a/tools/eslint/node_modules/globby/license b/tools/eslint/node_modules/globby/license
new file mode 100644
index 00000000000000..654d0bfe943437
--- /dev/null
+++ b/tools/eslint/node_modules/globby/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+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/eslint/node_modules/globby/node_modules/glob/LICENSE b/tools/eslint/node_modules/globby/node_modules/glob/LICENSE
new file mode 100644
index 00000000000000..19129e315fe593
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tools/eslint/node_modules/globby/node_modules/glob/README.md b/tools/eslint/node_modules/globby/node_modules/glob/README.md
new file mode 100644
index 00000000000000..6960483bac63c6
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/README.md
@@ -0,0 +1,359 @@
+# 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.
+
+![](oh-my-glob.gif)
+
+## Usage
+
+```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)
+
+## 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.
+
+## 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/tools/eslint/node_modules/globby/node_modules/glob/common.js b/tools/eslint/node_modules/globby/node_modules/glob/common.js
new file mode 100644
index 00000000000000..c9127eb334f18b
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/common.js
@@ -0,0 +1,226 @@
+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.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 = options.cwd
+    self.changedCwd = path.resolve(options.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, "/")
+
+  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) {
+        return !(/\/$/.test(e))
+      })
+    }
+  }
+
+  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)
+  }
+  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/tools/eslint/node_modules/globby/node_modules/glob/glob.js b/tools/eslint/node_modules/globby/node_modules/glob/glob.js
new file mode 100644
index 00000000000000..a62da27ebd507a
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/glob.js
@@ -0,0 +1,765 @@
+// 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 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 (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
+  var n = this.minimatch.set.length
+  this._processing = 0
+  this.matches = new Array(n)
+
+  this._emitQueue = []
+  this._processQueue = []
+  this.paused = false
+
+  if (this.noprocess)
+    return this
+
+  if (n === 0)
+    return done()
+
+  for (var i = 0; i < n; i ++) {
+    this._process(this.minimatch.set[i], i, false, done)
+  }
+
+  function done () {
+    --self._processing
+    if (self._processing <= 0)
+      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)
+    fs.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 (this.matches[index][e])
+    return
+
+  if (isIgnored(this, e))
+    return
+
+  if (this.paused) {
+    this._emitQueue.push([index, e])
+    return
+  }
+
+  var abs = this._makeAbs(e)
+
+  if (this.nodir) {
+    var c = this.cache[abs]
+    if (c === 'DIR' || Array.isArray(c))
+      return
+  }
+
+  if (this.mark)
+    e = this._mark(e)
+
+  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)
+      return cb()
+
+    var isSym = 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.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.
+      this.cache[this._makeAbs(f)] = 'FILE'
+      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) {
+    this.statCache[abs] = false
+    return cb()
+  }
+
+  var needDir = f.slice(-1) === '/'
+  this.statCache[abs] = stat
+
+  if (abs.slice(-1) === '/' && !stat.isDirectory())
+    return cb(null, false, stat)
+
+  var c = stat.isDirectory() ? 'DIR' : 'FILE'
+  this.cache[abs] = this.cache[abs] || c
+
+  if (needDir && c !== 'DIR')
+    return cb()
+
+  return cb(null, c, stat)
+}
diff --git a/tools/eslint/node_modules/globby/node_modules/glob/package.json b/tools/eslint/node_modules/globby/node_modules/glob/package.json
new file mode 100644
index 00000000000000..ec5b08b6f20dd9
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/package.json
@@ -0,0 +1,98 @@
+{
+  "_args": [
+    [
+      "glob@^6.0.1",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby"
+    ]
+  ],
+  "_from": "glob@>=6.0.1 <7.0.0",
+  "_id": "glob@6.0.4",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/globby/glob",
+  "_nodeVersion": "4.0.0",
+  "_npmUser": {
+    "email": "i@izs.me",
+    "name": "isaacs"
+  },
+  "_npmVersion": "2.14.15",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "glob",
+    "raw": "glob@^6.0.1",
+    "rawSpec": "^6.0.1",
+    "scope": null,
+    "spec": ">=6.0.1 <7.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/globby"
+  ],
+  "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz",
+  "_shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22",
+  "_shrinkwrap": null,
+  "_spec": "glob@^6.0.1",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby",
+  "author": {
+    "email": "i@izs.me",
+    "name": "Isaac Z. Schlueter",
+    "url": "http://blog.izs.me/"
+  },
+  "bugs": {
+    "url": "https://github.com/isaacs/node-glob/issues"
+  },
+  "dependencies": {
+    "inflight": "^1.0.4",
+    "inherits": "2",
+    "minimatch": "2 || 3",
+    "once": "^1.3.0",
+    "path-is-absolute": "^1.0.0"
+  },
+  "description": "a little globber",
+  "devDependencies": {
+    "mkdirp": "0",
+    "rimraf": "^2.2.8",
+    "tap": "^5.0.0",
+    "tick": "0.0.6"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22",
+    "tarball": "http://registry.npmjs.org/glob/-/glob-6.0.4.tgz"
+  },
+  "engines": {
+    "node": "*"
+  },
+  "files": [
+    "common.js",
+    "glob.js",
+    "sync.js"
+  ],
+  "gitHead": "3bd419c538737e56fda7e21c21ff52ca0c198df6",
+  "homepage": "https://github.com/isaacs/node-glob#readme",
+  "license": "ISC",
+  "main": "glob.js",
+  "maintainers": [
+    {
+      "name": "isaacs",
+      "email": "i@izs.me"
+    }
+  ],
+  "name": "glob",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "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": "6.0.4"
+}
diff --git a/tools/eslint/node_modules/globby/node_modules/glob/sync.js b/tools/eslint/node_modules/globby/node_modules/glob/sync.js
new file mode 100644
index 00000000000000..09883d2ce0c9de
--- /dev/null
+++ b/tools/eslint/node_modules/globby/node_modules/glob/sync.js
@@ -0,0 +1,460 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var fs = require('fs')
+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
+
+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 = fs.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.matches[index][e] = true
+    }
+    // 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) {
+  var abs = this._makeAbs(e)
+  if (this.mark)
+    e = this._mark(e)
+
+  if (this.matches[index][e])
+    return
+
+  if (this.nodir) {
+    var c = this.cache[this._makeAbs(e)]
+    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) {
+    // lstat failed, doesn't exist
+    return null
+  }
+
+  var isSym = 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.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.
+      this.cache[this._makeAbs(f)] = 'FILE'
+      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.matches[index][prefix] = true
+}
+
+// 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) {
+      return false
+    }
+
+    if (lstat.isSymbolicLink()) {
+      try {
+        stat = fs.statSync(abs)
+      } catch (er) {
+        stat = lstat
+      }
+    } else {
+      stat = lstat
+    }
+  }
+
+  this.statCache[abs] = stat
+
+  var c = stat.isDirectory() ? 'DIR' : 'FILE'
+  this.cache[abs] = this.cache[abs] || c
+
+  if (needDir && c !== 'DIR')
+    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/tools/eslint/node_modules/globby/package.json b/tools/eslint/node_modules/globby/package.json
new file mode 100644
index 00000000000000..1fe00f61138b6d
--- /dev/null
+++ b/tools/eslint/node_modules/globby/package.json
@@ -0,0 +1,137 @@
+{
+  "_args": [
+    [
+      "globby@^4.0.0",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del"
+    ]
+  ],
+  "_from": "globby@>=4.0.0 <5.0.0",
+  "_id": "globby@4.0.0",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/globby",
+  "_nodeVersion": "4.2.1",
+  "_npmUser": {
+    "email": "sindresorhus@gmail.com",
+    "name": "sindresorhus"
+  },
+  "_npmVersion": "2.14.7",
+  "_phantomChildren": {
+    "inflight": "1.0.4",
+    "inherits": "2.0.1",
+    "minimatch": "3.0.0",
+    "once": "1.3.3",
+    "path-is-absolute": "1.0.0"
+  },
+  "_requested": {
+    "name": "globby",
+    "raw": "globby@^4.0.0",
+    "rawSpec": "^4.0.0",
+    "scope": null,
+    "spec": ">=4.0.0 <5.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/del"
+  ],
+  "_resolved": "https://registry.npmjs.org/globby/-/globby-4.0.0.tgz",
+  "_shasum": "36ff06c5a9dc1dbc201f700074992882857e9817",
+  "_shrinkwrap": null,
+  "_spec": "globby@^4.0.0",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del",
+  "author": {
+    "email": "sindresorhus@gmail.com",
+    "name": "Sindre Sorhus",
+    "url": "sindresorhus.com"
+  },
+  "bugs": {
+    "url": "https://github.com/sindresorhus/globby/issues"
+  },
+  "dependencies": {
+    "array-union": "^1.0.1",
+    "arrify": "^1.0.0",
+    "glob": "^6.0.1",
+    "object-assign": "^4.0.1",
+    "pify": "^2.0.0",
+    "pinkie-promise": "^2.0.0"
+  },
+  "description": "Extends `glob` with support for multiple patterns and exposes a Promise API",
+  "devDependencies": {
+    "glob-stream": "git+https://github.com/wearefractal/glob-stream.git#master",
+    "globby": "git+https://github.com/sindresorhus/globby.git#master",
+    "matcha": "^0.6.0",
+    "mocha": "*",
+    "rimraf": "^2.2.8",
+    "xo": "*"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "36ff06c5a9dc1dbc201f700074992882857e9817",
+    "tarball": "http://registry.npmjs.org/globby/-/globby-4.0.0.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "index.js"
+  ],
+  "gitHead": "70389b06d4633868ea016ce38956d0a86aa90a23",
+  "homepage": "https://github.com/sindresorhus/globby",
+  "keywords": [
+    "all",
+    "array",
+    "directories",
+    "dirs",
+    "expand",
+    "files",
+    "filesystem",
+    "filter",
+    "find",
+    "fnmatch",
+    "folders",
+    "fs",
+    "glob",
+    "globbing",
+    "globs",
+    "gulpfriendly",
+    "match",
+    "matcher",
+    "minimatch",
+    "multi",
+    "multiple",
+    "paths",
+    "pattern",
+    "patterns",
+    "promise",
+    "traverse",
+    "util",
+    "utility",
+    "wildcard",
+    "wildcards"
+  ],
+  "license": "MIT",
+  "maintainers": [
+    {
+      "name": "sindresorhus",
+      "email": "sindresorhus@gmail.com"
+    }
+  ],
+  "name": "globby",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/globby.git"
+  },
+  "scripts": {
+    "bench": "npm update globby glob-stream && matcha bench.js",
+    "test": "xo && mocha"
+  },
+  "version": "4.0.0",
+  "xo": {
+    "envs": [
+      "mocha",
+      "node"
+    ]
+  }
+}
diff --git a/tools/eslint/node_modules/globby/readme.md b/tools/eslint/node_modules/globby/readme.md
new file mode 100644
index 00000000000000..e0881d54febc09
--- /dev/null
+++ b/tools/eslint/node_modules/globby/readme.md
@@ -0,0 +1,75 @@
+# globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby)
+
+> Extends [glob](https://github.com/isaacs/node-glob) with support for multiple patterns and exposes a Promise API
+
+
+## Install
+
+```
+$ npm install --save globby
+```
+
+
+## Usage
+
+```
+├── unicorn
+├── cake
+└── rainbow
+```
+
+```js
+const globby = require('globby');
+
+globby(['*', '!cake']).then(paths => {
+	console.log(paths);
+	//=> ['unicorn', 'rainbow']
+});
+```
+
+
+## API
+
+### globby(patterns, [options])
+
+Returns a promise that resolves to an array of matching paths.
+
+### globby.sync(patterns, [options])
+
+Returns an array of matching paths.
+
+#### patterns
+
+Type: `string`, `array`
+
+See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
+
+#### options
+
+Type: `object`
+
+See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
+
+
+## Globbing patterns
+
+Just a quick overview.
+
+- `*` matches any number of characters, but not `/`
+- `?` matches a single character, but not `/`
+- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
+- `{}` allows for a comma-separated list of "or" expressions
+- `!` at the beginning of a pattern will negate the match
+
+[Various patterns and expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js).
+
+
+## Related
+
+- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem.
+- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/eslint/node_modules/graceful-fs/LICENSE b/tools/eslint/node_modules/graceful-fs/LICENSE
new file mode 100644
index 00000000000000..9d2c8036969bed
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, 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/tools/eslint/node_modules/graceful-fs/README.md b/tools/eslint/node_modules/graceful-fs/README.md
new file mode 100644
index 00000000000000..13a2e86050a3eb
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/README.md
@@ -0,0 +1,36 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over [fs module](http://api.nodejs.org/fs.html)
+
+graceful-fs:
+
+* Queues up `open` and `readdir` calls, and retries them once
+  something closes if there is an EMFILE error from too many file
+  descriptors.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+  `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## USAGE
+
+```javascript
+// use just like fs
+var fs = require('graceful-fs')
+
+// now go and do stuff with it...
+fs.readFileSync('some-file-or-whatever')
+```
diff --git a/tools/eslint/node_modules/graceful-fs/fs.js b/tools/eslint/node_modules/graceful-fs/fs.js
new file mode 100644
index 00000000000000..8ad4a383965b7b
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/fs.js
@@ -0,0 +1,21 @@
+'use strict'
+
+var fs = require('fs')
+
+module.exports = clone(fs)
+
+function clone (obj) {
+  if (obj === null || typeof obj !== 'object')
+    return obj
+
+  if (obj instanceof Object)
+    var copy = { __proto__: obj.__proto__ }
+  else
+    var copy = Object.create(null)
+
+  Object.getOwnPropertyNames(obj).forEach(function (key) {
+    Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
+  })
+
+  return copy
+}
diff --git a/tools/eslint/node_modules/graceful-fs/graceful-fs.js b/tools/eslint/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 00000000000000..fe3b17cb60adee
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,251 @@
+var fs = require('fs')
+var polyfills = require('./polyfills.js')
+var legacy = require('./legacy-streams.js')
+var queue = []
+
+var util = require('util')
+
+function noop () {}
+
+var debug = noop
+if (util.debuglog)
+  debug = util.debuglog('gfs4')
+else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
+  debug = function() {
+    var m = util.format.apply(util, arguments)
+    m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
+    console.error(m)
+  }
+
+if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
+  process.on('exit', function() {
+    debug(queue)
+    require('assert').equal(queue.length, 0)
+  })
+}
+
+module.exports = patch(require('./fs.js'))
+if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
+  module.exports = patch(fs)
+}
+
+// Always patch fs.close/closeSync, because we want to
+// retry() whenever a close happens *anywhere* in the program.
+// This is essential when multiple graceful-fs instances are
+// in play at the same time.
+fs.close = (function (fs$close) { return function (fd, cb) {
+  return fs$close.call(fs, fd, function (err) {
+    if (!err)
+      retry()
+
+    if (typeof cb === 'function')
+      cb.apply(this, arguments)
+  })
+}})(fs.close)
+
+fs.closeSync = (function (fs$closeSync) { return function (fd) {
+  // Note that graceful-fs also retries when fs.closeSync() fails.
+  // Looks like a bug to me, although it's probably a harmless one.
+  var rval = fs$closeSync.apply(fs, arguments)
+  retry()
+  return rval
+}})(fs.closeSync)
+
+function patch (fs) {
+  // Everything that references the open() function needs to be in here
+  polyfills(fs)
+  fs.gracefulify = patch
+  fs.FileReadStream = ReadStream;  // Legacy name.
+  fs.FileWriteStream = WriteStream;  // Legacy name.
+  fs.createReadStream = createReadStream
+  fs.createWriteStream = createWriteStream
+  var fs$readFile = fs.readFile
+  fs.readFile = readFile
+  function readFile (path, options, cb) {
+    if (typeof options === 'function')
+      cb = options, options = null
+
+    return go$readFile(path, options, cb)
+
+    function go$readFile (path, options, cb) {
+      return fs$readFile(path, options, function (err) {
+        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+          enqueue([go$readFile, [path, options, cb]])
+        else {
+          if (typeof cb === 'function')
+            cb.apply(this, arguments)
+          retry()
+        }
+      })
+    }
+  }
+
+  var fs$writeFile = fs.writeFile
+  fs.writeFile = writeFile
+  function writeFile (path, data, options, cb) {
+    if (typeof options === 'function')
+      cb = options, options = null
+
+    return go$writeFile(path, data, options, cb)
+
+    function go$writeFile (path, data, options, cb) {
+      return fs$writeFile(path, data, options, function (err) {
+        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+          enqueue([go$writeFile, [path, data, options, cb]])
+        else {
+          if (typeof cb === 'function')
+            cb.apply(this, arguments)
+          retry()
+        }
+      })
+    }
+  }
+
+  var fs$appendFile = fs.appendFile
+  if (fs$appendFile)
+    fs.appendFile = appendFile
+  function appendFile (path, data, options, cb) {
+    if (typeof options === 'function')
+      cb = options, options = null
+
+    return go$appendFile(path, data, options, cb)
+
+    function go$appendFile (path, data, options, cb) {
+      return fs$appendFile(path, data, options, function (err) {
+        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+          enqueue([go$appendFile, [path, data, options, cb]])
+        else {
+          if (typeof cb === 'function')
+            cb.apply(this, arguments)
+          retry()
+        }
+      })
+    }
+  }
+
+  var fs$readdir = fs.readdir
+  fs.readdir = readdir
+  function readdir (path, cb) {
+    return go$readdir(path, cb)
+
+    function go$readdir () {
+      return fs$readdir(path, function (err, files) {
+        if (files && files.sort)
+          files.sort();  // Backwards compatibility with graceful-fs.
+
+        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+          enqueue([go$readdir, [path, cb]])
+        else {
+          if (typeof cb === 'function')
+            cb.apply(this, arguments)
+          retry()
+        }
+      })
+    }
+  }
+
+
+  if (process.version.substr(0, 4) === 'v0.8') {
+    var legStreams = legacy(fs)
+    ReadStream = legStreams.ReadStream
+    WriteStream = legStreams.WriteStream
+  }
+
+  var fs$ReadStream = fs.ReadStream
+  ReadStream.prototype = Object.create(fs$ReadStream.prototype)
+  ReadStream.prototype.open = ReadStream$open
+
+  var fs$WriteStream = fs.WriteStream
+  WriteStream.prototype = Object.create(fs$WriteStream.prototype)
+  WriteStream.prototype.open = WriteStream$open
+
+  fs.ReadStream = ReadStream
+  fs.WriteStream = WriteStream
+
+  function ReadStream (path, options) {
+    if (this instanceof ReadStream)
+      return fs$ReadStream.apply(this, arguments), this
+    else
+      return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
+  }
+
+  function ReadStream$open () {
+    var that = this
+    open(that.path, that.flags, that.mode, function (err, fd) {
+      if (err) {
+        if (that.autoClose)
+          that.destroy()
+
+        that.emit('error', err)
+      } else {
+        that.fd = fd
+        that.emit('open', fd)
+        that.read()
+      }
+    })
+  }
+
+  function WriteStream (path, options) {
+    if (this instanceof WriteStream)
+      return fs$WriteStream.apply(this, arguments), this
+    else
+      return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
+  }
+
+  function WriteStream$open () {
+    var that = this
+    open(that.path, that.flags, that.mode, function (err, fd) {
+      if (err) {
+        that.destroy()
+        that.emit('error', err)
+      } else {
+        that.fd = fd
+        that.emit('open', fd)
+      }
+    })
+  }
+
+  function createReadStream (path, options) {
+    return new ReadStream(path, options)
+  }
+
+  function createWriteStream (path, options) {
+    return new WriteStream(path, options)
+  }
+
+  var fs$open = fs.open
+  fs.open = open
+  function open (path, flags, mode, cb) {
+    if (typeof mode === 'function')
+      cb = mode, mode = null
+
+    return go$open(path, flags, mode, cb)
+
+    function go$open (path, flags, mode, cb) {
+      return fs$open(path, flags, mode, function (err, fd) {
+        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+          enqueue([go$open, [path, flags, mode, cb]])
+        else {
+          if (typeof cb === 'function')
+            cb.apply(this, arguments)
+          retry()
+        }
+      })
+    }
+  }
+
+  return fs
+}
+
+function enqueue (elem) {
+  debug('ENQUEUE', elem[0].name, elem[1])
+  queue.push(elem)
+}
+
+function retry () {
+  var elem = queue.shift()
+  if (elem) {
+    debug('RETRY', elem[0].name, elem[1])
+    elem[0].apply(null, elem[1])
+  }
+}
diff --git a/tools/eslint/node_modules/graceful-fs/legacy-streams.js b/tools/eslint/node_modules/graceful-fs/legacy-streams.js
new file mode 100644
index 00000000000000..d617b50fc0832d
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/legacy-streams.js
@@ -0,0 +1,118 @@
+var Stream = require('stream').Stream
+
+module.exports = legacy
+
+function legacy (fs) {
+  return {
+    ReadStream: ReadStream,
+    WriteStream: WriteStream
+  }
+
+  function ReadStream (path, options) {
+    if (!(this instanceof ReadStream)) return new ReadStream(path, options);
+
+    Stream.call(this);
+
+    var self = this;
+
+    this.path = path;
+    this.fd = null;
+    this.readable = true;
+    this.paused = false;
+
+    this.flags = 'r';
+    this.mode = 438; /*=0666*/
+    this.bufferSize = 64 * 1024;
+
+    options = options || {};
+
+    // Mixin options into this
+    var keys = Object.keys(options);
+    for (var index = 0, length = keys.length; index < length; index++) {
+      var key = keys[index];
+      this[key] = options[key];
+    }
+
+    if (this.encoding) this.setEncoding(this.encoding);
+
+    if (this.start !== undefined) {
+      if ('number' !== typeof this.start) {
+        throw TypeError('start must be a Number');
+      }
+      if (this.end === undefined) {
+        this.end = Infinity;
+      } else if ('number' !== typeof this.end) {
+        throw TypeError('end must be a Number');
+      }
+
+      if (this.start > this.end) {
+        throw new Error('start must be <= end');
+      }
+
+      this.pos = this.start;
+    }
+
+    if (this.fd !== null) {
+      process.nextTick(function() {
+        self._read();
+      });
+      return;
+    }
+
+    fs.open(this.path, this.flags, this.mode, function (err, fd) {
+      if (err) {
+        self.emit('error', err);
+        self.readable = false;
+        return;
+      }
+
+      self.fd = fd;
+      self.emit('open', fd);
+      self._read();
+    })
+  }
+
+  function WriteStream (path, options) {
+    if (!(this instanceof WriteStream)) return new WriteStream(path, options);
+
+    Stream.call(this);
+
+    this.path = path;
+    this.fd = null;
+    this.writable = true;
+
+    this.flags = 'w';
+    this.encoding = 'binary';
+    this.mode = 438; /*=0666*/
+    this.bytesWritten = 0;
+
+    options = options || {};
+
+    // Mixin options into this
+    var keys = Object.keys(options);
+    for (var index = 0, length = keys.length; index < length; index++) {
+      var key = keys[index];
+      this[key] = options[key];
+    }
+
+    if (this.start !== undefined) {
+      if ('number' !== typeof this.start) {
+        throw TypeError('start must be a Number');
+      }
+      if (this.start < 0) {
+        throw new Error('start must be >= zero');
+      }
+
+      this.pos = this.start;
+    }
+
+    this.busy = false;
+    this._queue = [];
+
+    if (this.fd === null) {
+      this._open = fs.open;
+      this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
+      this.flush();
+    }
+  }
+}
diff --git a/tools/eslint/node_modules/graceful-fs/package.json b/tools/eslint/node_modules/graceful-fs/package.json
new file mode 100644
index 00000000000000..0fa9cc10498699
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/package.json
@@ -0,0 +1,100 @@
+{
+  "_args": [
+    [
+      "graceful-fs@^4.1.2",
+      "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/flat-cache"
+    ]
+  ],
+  "_from": "graceful-fs@>=4.1.2 <5.0.0",
+  "_id": "graceful-fs@4.1.2",
+  "_inCache": true,
+  "_installable": true,
+  "_location": "/eslint/graceful-fs",
+  "_nodeVersion": "2.2.1",
+  "_npmUser": {
+    "email": "isaacs@npmjs.com",
+    "name": "isaacs"
+  },
+  "_npmVersion": "3.0.0",
+  "_phantomChildren": {},
+  "_requested": {
+    "name": "graceful-fs",
+    "raw": "graceful-fs@^4.1.2",
+    "rawSpec": "^4.1.2",
+    "scope": null,
+    "spec": ">=4.1.2 <5.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/eslint/flat-cache",
+    "/eslint/read-json-sync"
+  ],
+  "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz",
+  "_shasum": "fe2239b7574972e67e41f808823f9bfa4a991e37",
+  "_shrinkwrap": null,
+  "_spec": "graceful-fs@^4.1.2",
+  "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/flat-cache",
+  "bugs": {
+    "url": "https://github.com/isaacs/node-graceful-fs/issues"
+  },
+  "dependencies": {},
+  "description": "A drop-in replacement for fs, making various improvements.",
+  "devDependencies": {
+    "mkdirp": "^0.5.0",
+    "rimraf": "^2.2.8",
+    "tap": "^1.2.0"
+  },
+  "directories": {
+    "test": "test"
+  },
+  "dist": {
+    "shasum": "fe2239b7574972e67e41f808823f9bfa4a991e37",
+    "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz"
+  },
+  "engines": {
+    "node": ">=0.4.0"
+  },
+  "files": [
+    "fs.js",
+    "graceful-fs.js",
+    "legacy-streams.js",
+    "polyfills.js"
+  ],
+  "gitHead": "c286080071b6be9aa9ba108b0bb9b44ff122926d",
+  "homepage": "https://github.com/isaacs/node-graceful-fs#readme",
+  "keywords": [
+    "EACCESS",
+    "EAGAIN",
+    "EINVAL",
+    "EMFILE",
+    "EPERM",
+    "error",
+    "errors",
+    "fs",
+    "handling",
+    "module",
+    "queue",
+    "reading",
+    "retries",
+    "retry"
+  ],
+  "license": "ISC",
+  "main": "graceful-fs.js",
+  "maintainers": [
+    {
+      "name": "isaacs",
+      "email": "i@izs.me"
+    }
+  ],
+  "name": "graceful-fs",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/isaacs/node-graceful-fs.git"
+  },
+  "scripts": {
+    "test": "node test.js | tap -"
+  },
+  "version": "4.1.2"
+}
diff --git a/tools/eslint/node_modules/graceful-fs/polyfills.js b/tools/eslint/node_modules/graceful-fs/polyfills.js
new file mode 100644
index 00000000000000..5e4f4804618d17
--- /dev/null
+++ b/tools/eslint/node_modules/graceful-fs/polyfills.js
@@ -0,0 +1,252 @@
+var fs = require('./fs.js')
+var constants = require('constants')
+
+var origCwd = process.cwd
+var cwd = null
+process.cwd = function() {
+  if (!cwd)
+    cwd = origCwd.call(process)
+  return cwd
+}
+try {
+  process.cwd()
+} catch (er) {}
+
+var chdir = process.chdir
+process.chdir = function(d) {
+  cwd = null
+  chdir.call(process, d)
+}
+
+module.exports = patch
+
+function patch (fs) {
+  // (re-)implement some things that are known busted or missing.
+
+  // lchmod, broken prior to 0.6.2
+  // back-port the fix here.
+  if (constants.hasOwnProperty('O_SYMLINK') &&
+      process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+    patchLchmod(fs)
+  }
+
+  // lutimes implementation, or no-op
+  if (!fs.lutimes) {
+    patchLutimes(fs)
+  }
+
+  // https://github.com/isaacs/node-graceful-fs/issues/4
+  // Chown should not fail on einval or eperm if non-root.
+  // It should not fail on enosys ever, as this just indicates
+  // that a fs doesn't support the intended operation.
+
+  fs.chown = chownFix(fs.chown)
+  fs.fchown = chownFix(fs.fchown)
+  fs.lchown = chownFix(fs.lchown)
+
+  fs.chmod = chownFix(fs.chmod)
+  fs.fchmod = chownFix(fs.fchmod)
+  fs.lchmod = chownFix(fs.lchmod)
+
+  fs.chownSync = chownFixSync(fs.chownSync)
+  fs.fchownSync = chownFixSync(fs.fchownSync)
+  fs.lchownSync = chownFixSync(fs.lchownSync)
+
+  fs.chmodSync = chownFix(fs.chmodSync)
+  fs.fchmodSync = chownFix(fs.fchmodSync)
+  fs.lchmodSync = chownFix(fs.lchmodSync)
+
+  // if lchmod/lchown do not exist, then make them no-ops
+  if (!fs.lchmod) {
+    fs.lchmod = function (path, mode, cb) {
+      process.nextTick(cb)
+    }
+    fs.lchmodSync = function () {}
+  }
+  if (!fs.lchown) {
+    fs.lchown = function (path, uid, gid, cb) {
+      process.nextTick(cb)
+    }
+    fs.lchownSync = function () {}
+  }
+
+  // on Windows, A/V software can lock the directory, causing this
+  // to fail with an EACCES or EPERM if the directory contains newly
+  // created files.  Try again on failure, for up to 1 second.
+  if (process.platform === "win32") {
+    fs.rename = (function (fs$rename) { return function (from, to, cb) {
+      var start = Date.now()
+      fs$rename(from, to, function CB (er) {
+        if (er
+            && (er.code === "EACCES" || er.code === "EPERM")
+            && Date.now() - start < 1000) {
+          return fs$rename(from, to, CB)
+        }
+        if (cb) cb(er)
+      })
+    }})(fs.rename)
+  }
+
+  // if read() returns EAGAIN, then just try it again.
+  fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) {
+    var callback
+    if (callback_ && typeof callback_ === 'function') {
+      var eagCounter = 0
+      callback = function (er, _, __) {
+        if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+          eagCounter ++
+          return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+        }
+        callback_.apply(this, arguments)
+      }
+    }
+    return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+  }})(fs.read)
+
+  fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
+    var eagCounter = 0
+    while (true) {
+      try {
+        return fs$readSync.call(fs, fd, buffer, offset, length, position)
+      } catch (er) {
+        if (er.code === 'EAGAIN' && eagCounter < 10) {
+          eagCounter ++
+          continue
+        }
+        throw er
+      }
+    }
+  }})(fs.readSync)
+}
+
+function patchLchmod (fs) {
+  fs.lchmod = function (path, mode, callback) {
+    callback = callback || noop
+    fs.open( path
+           , constants.O_WRONLY | constants.O_SYMLINK
+           , mode
+           , function (err, fd) {
+      if (err) {
+        callback(err)
+        return
+      }
+      // prefer to return the chmod error, if one occurs,
+      // but still try to close, and report closing errors if they occur.
+      fs.fchmod(fd, mode, function (err) {
+        fs.close(fd, function(err2) {
+          callback(err || err2)
+        })
+      })
+    })
+  }
+
+  fs.lchmodSync = function (path, mode) {
+    var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+    // prefer to return the chmod error, if one occurs,
+    // but still try to close, and report closing errors if they occur.
+    var threw = true
+    var ret
+    try {
+      ret = fs.fchmodSync(fd, mode)
+      threw = false
+    } finally {
+      if (threw) {
+        try {
+          fs.closeSync(fd)
+        } catch (er) {}
+      } else {
+        fs.closeSync(fd)
+      }
+    }
+    return ret
+  }
+}
+
+function patchLutimes (fs) {
+  if (constants.hasOwnProperty("O_SYMLINK")) {
+    fs.lutimes = function (path, at, mt, cb) {
+      fs.open(path, constants.O_SYMLINK, function (er, fd) {
+        cb = cb || noop
+        if (er) return cb(er)
+        fs.futimes(fd, at, mt, function (er) {
+          fs.close(fd, function (er2) {
+            return cb(er || er2)
+          })
+        })
+      })
+    }
+
+    fs.lutimesSync = function (path, at, mt) {
+      var fd = fs.openSync(path, constants.O_SYMLINK)
+      var ret
+      var threw = true
+      try {
+        ret = fs.futimesSync(fd, at, mt)
+        threw = false
+      } finally {
+        if (threw) {
+          try {
+            fs.closeSync(fd)
+          } catch (er) {}
+        } else {
+          fs.closeSync(fd)
+        }
+      }
+      return ret
+    }
+
+  } else {
+    fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+    fs.lutimesSync = function () {}
+  }
+}
+
+function chownFix (orig) {
+  if (!orig) return orig
+  return function (target, uid, gid, cb) {
+    return orig.call(fs, target, uid, gid, function (er, res) {
+      if (chownErOk(er)) er = null
+      cb(er, res)
+    })
+  }
+}
+
+function chownFixSync (orig) {
+  if (!orig) return orig
+  return function (target, uid, gid) {
+    try {
+      return orig.call(fs, target, uid, gid)
+    } catch (er) {
+      if (!chownErOk(er)) throw er
+    }
+  }
+}
+
+// ENOSYS means that the fs doesn't support the op. Just ignore
+// that, because it doesn't matter.
+//
+// if there's no getuid, or if getuid() is something other
+// than 0, and the error is EINVAL or EPERM, then just ignore
+// it.
+//
+// This specific case is a silent failure in cp, install, tar,
+// and most other unix tools that manage permissions.
+//
+// When running as root, or if other types of errors are
+// encountered, then it's strict.
+function chownErOk (er) {
+  if (!er)
+    return true
+
+  if (er.code === "ENOSYS")
+    return true
+
+  var nonroot = !process.getuid || process.getuid() !== 0
+  if (nonroot) {
+    if (er.code === "EINVAL" || er.code === "EPERM")
+      return true
+  }
+
+  return false
+}
diff --git a/tools/eslint/node_modules/handlebars/.istanbul.yml b/tools/eslint/node_modules/handlebars/.istanbul.yml
new file mode 100644
index 00000000000000..e6911f1908cbb6
--- /dev/null
+++ b/tools/eslint/node_modules/handlebars/.istanbul.yml
@@ -0,0 +1,2 @@
+instrumentation:
+    excludes: ['**/spec/**']
diff --git a/tools/eslint/node_modules/handlebars/FAQ.md b/tools/eslint/node_modules/handlebars/FAQ.md
new file mode 100644
index 00000000000000..1ae625ddb3adbc
--- /dev/null
+++ b/tools/eslint/node_modules/handlebars/FAQ.md
@@ -0,0 +1,60 @@
+# Frequently Asked Questions
+
+1. How can I file a bug report:
+
+  See our guidelines on [reporting issues](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).
+
+1. Why isn't my Mustache template working?
+
+  Handlebars deviates from Mustache slightly on a few behaviors. These variations are documented in our [readme](https://github.com/wycats/handlebars.js#differences-between-handlebarsjs-and-mustache).
+
+1. Why is it slower when compiling?
+
+  The Handlebars compiler must parse the template and construct a JavaScript program which can then be run. Under some environments such as older mobile devices this can have a performance impact which can be avoided by precompiling. Generally it's recommended that precompilation and the runtime library be used on all clients.
+
+1. Why doesn't this work with Content Security Policy restrictions?
+
+  When not using the precompiler, Handlebars generates a dynamic function for each template which can cause issues with pages that have enabled Content Policy. It's recommended that templates are precompiled or the `unsafe-eval` policy is enabled for sites that must generate dynamic templates at runtime.
+
+1. How can I include script tags in my template?
+
+  If loading the template via an inlined `
+  ```
+
+  It's generally recommended that templates are served through external, precompiled, files, which do not suffer from this issue.
+
+1. Why are my precompiled scripts throwing exceptions?
+
+  When using the precompiler, it's important that a supporting version of the Handlebars runtime be loaded on the target page. In version 1.x there were rudimentary checks to compare the version but these did not always work. This is fixed under 2.x but the version checking does not work between these two versions. If you see unexpected errors such as `undefined is not a function` or similar, please verify that the same version is being used for both the precompiler and the client. This can be checked via:
+
+  ```sh
+  handlebars --version
+  ```
+  If using the integrated precompiler and
+
+  ```javascript
+  console.log(Handlebars.VERSION);
+  ```
+  On the client side.
+
+  We include the built client libraries in the npm package for those who want to be certain that they are using the same client libraries as the compiler.
+
+  Should these match, please file an issue with us, per our [issue filing guidelines](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).
+
+1. Why doesn't IE like the `default` name in the AMD module?
+
+  Some browsers such as particular versions of IE treat `default` as a reserved word in JavaScript source files. To safely use this you need to reference this via the `Handlebars['default']` lookup method. This is an unfortunate side effect of the shims necessary to backport the Handlebars ES6 code to all current browsers.
+
+1. How do I load the runtime library when using AMD?
+
+  There are two options for loading under AMD environments. The first is to use the `handlebars.runtime.amd.js` file. This may require a [path mapping](https://github.com/wycats/handlebars.js/blob/master/spec/amd-runtime.html#L31) as well as access via the `default` field.
+
+  The other option is to load the `handlebars.runtime.js` UMD build, which might not require path configuration and exposes the library as both the module root and the `default` field for compatibility.
+
+  If not using ES6 transpilers or accessing submodules in the build the former option should be sufficient for most use cases.
diff --git a/tools/eslint/node_modules/handlebars/LICENSE b/tools/eslint/node_modules/handlebars/LICENSE
new file mode 100644
index 00000000000000..4effa3916bee28
--- /dev/null
+++ b/tools/eslint/node_modules/handlebars/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2011-2015 by Yehuda Katz
+
+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/eslint/node_modules/handlebars/README.markdown b/tools/eslint/node_modules/handlebars/README.markdown
new file mode 100644
index 00000000000000..904b9e0c67da44
--- /dev/null
+++ b/tools/eslint/node_modules/handlebars/README.markdown
@@ -0,0 +1,165 @@
+[![Travis Build Status](https://img.shields.io/travis/wycats/handlebars.js/master.svg)](https://travis-ci.org/wycats/handlebars.js)
+[![Selenium Test Status](https://saucelabs.com/buildstatus/handlebars)](https://saucelabs.com/u/handlebars)
+
+Handlebars.js
+=============
+
+Handlebars.js is an extension to the [Mustache templating
+language](http://mustache.github.com/) created by Chris Wanstrath.
+Handlebars.js and Mustache are both logicless templating languages that
+keep the view and the code separated like we all know they should be.
+
+Checkout the official Handlebars docs site at
+[http://www.handlebarsjs.com](http://www.handlebarsjs.com) and the live demo at [http://tryhandlebarsjs.com/](http://tryhandlebarsjs.com/).
+
+Installing
+----------
+
+See our [installation documentation](http://handlebarsjs.com/installation.html).
+
+Usage
+-----
+In general, the syntax of Handlebars.js templates is a superset
+of Mustache templates. For basic syntax, check out the [Mustache
+manpage](http://mustache.github.com/mustache.5.html).
+
+Once you have a template, use the `Handlebars.compile` method to compile
+the template into a function. The generated function takes a context
+argument, which will be used to render the template.
+
+```js
+var source = "

Hello, my name is {{name}}. I am from {{hometown}}. I have " + + "{{kids.length}} kids:

" + + "
    {{#kids}}
  • {{name}} is {{age}}
  • {{/kids}}
"; +var template = Handlebars.compile(source); + +var data = { "name": "Alan", "hometown": "Somewhere, TX", + "kids": [{"name": "Jimmy", "age": "12"}, {"name": "Sally", "age": "4"}]}; +var result = template(data); + +// Would render: +//

Hello, my name is Alan. I am from Somewhere, TX. I have 2 kids:

+//
    +//
  • Jimmy is 12
  • +//
  • Sally is 4
  • +//
+``` + +Full documentation and more examples are at [handlebarsjs.com](http://handlebarsjs.com/). + +Precompiling Templates +---------------------- + +Handlebars allows templates to be precompiled and included as javascript code rather than the handlebars template allowing for faster startup time. Full details are located [here](http://handlebarsjs.com/precompilation.html). + +Differences Between Handlebars.js and Mustache +---------------------------------------------- +Handlebars.js adds a couple of additional features to make writing +templates easier and also changes a tiny detail of how partials work. + +- [Nested Paths](http://handlebarsjs.com/#paths) +- [Helpers](http://handlebarsjs.com/#helpers) +- [Block Expressions](http://handlebarsjs.com/#block-expressions) +- [Literal Values](http://handlebarsjs.com/#literals) +- [Delimited Comments](http://handlebarsjs.com/#comments) + +Block expressions have the same syntax as mustache sections but should not be confused with one another. Sections are akin to an implicit `each` or `with` statement depending on the input data and helpers are explicit pieces of code that are free to implement whatever behavior they like. The [mustache spec](http://mustache.github.io/mustache.5.html) defines the exact behavior of sections. In the case of name conflicts, helpers are given priority. + +### Compatibility + +There are a few Mustache behaviors that Handlebars does not implement. +- Handlebars deviates from Mustache slightly in that it does not perform recursive lookup by default. The compile time `compat` flag must be set to enable this functionality. Users should note that there is a performance cost for enabling this flag. The exact cost varies by template, but it's recommended that performance sensitive operations should avoid this mode and instead opt for explicit path references. +- The optional Mustache-style lambdas are not supported. Instead Handlebars provides its own lambda resolution that follows the behaviors of helpers. +- Alternative delimiters are not supported. + + +Supported Environments +---------------------- + +Handlebars has been designed to work in any ECMAScript 3 environment. This includes + +- Node.js +- Chrome +- Firefox +- Safari 5+ +- Opera 11+ +- IE 6+ + +Older versions and other runtimes are likely to work but have not been formally +tested. The compiler requires `JSON.stringify` to be implemented natively or via a polyfill. If using the precompiler this is not necessary. + +[![Selenium Test Status](https://saucelabs.com/browser-matrix/handlebars.svg)](https://saucelabs.com/u/handlebars) + +Performance +----------- + +In a rough performance test, precompiled Handlebars.js templates (in +the original version of Handlebars.js) rendered in about half the +time of Mustache templates. It would be a shame if it were any other +way, since they were precompiled, but the difference in architecture +does have some big performance advantages. Justin Marney, a.k.a. +[gotascii](http://github.com/gotascii), confirmed that with an +[independent test](http://sorescode.com/2010/09/12/benchmarks.html). The +rewritten Handlebars (current version) is faster than the old version, +with many [performance tests](https://travis-ci.org/wycats/handlebars.js/builds/33392182#L538) being 5 to 7 times faster than the Mustache equivalent. + + +Upgrading +--------- + +See [release-notes.md](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) for upgrade notes. + +Known Issues +------------ + +See [FAQ.md](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for known issues and common pitfalls. + + +Handlebars in the Wild +---------------------- + +* [Assemble](http://assemble.io), by [@jonschlinkert](https://github.com/jonschlinkert) + and [@doowb](https://github.com/doowb), is a static site generator that uses Handlebars.js + as its template engine. +* [CoSchedule](http://coschedule.com) An editorial calendar for WordPress that uses Handlebars.js +* [dashbars](https://github.com/pismute/dashbars) A modern helper library for Handlebars.js. +* [Ember.js](http://www.emberjs.com) makes Handlebars.js the primary way to + structure your views, also with automatic data binding support. +* [Ghost](https://ghost.org/) Just a blogging platform. +* [handlebars_assets](http://github.com/leshill/handlebars_assets): A Rails Asset Pipeline gem + from Les Hill (@leshill). +* [handlebars-helpers](https://github.com/assemble/handlebars-helpers) is an extensive library + with 100+ handlebars helpers. +* [handlebars-layouts](https://github.com/shannonmoeller/handlebars-layouts) is a set of helpers which implement extendible and embeddable layout blocks as seen in other popular templating languages. +* [hbs](http://github.com/donpark/hbs): An Express.js view engine adapter for Handlebars.js, + from Don Park. +* [koa-hbs](https://github.com/jwilm/koa-hbs): [koa](https://github.com/koajs/koa) generator based + renderer for Handlebars.js. +* [jblotus](http://github.com/jblotus) created [http://tryhandlebarsjs.com](http://tryhandlebarsjs.com) + for anyone who would like to try out Handlebars.js in their browser. +* [jQuery plugin](http://71104.github.io/jquery-handlebars/): allows you to use + Handlebars.js with [jQuery](http://jquery.com/). +* [Lumbar](http://walmartlabs.github.io/lumbar) provides easy module-based template management for + handlebars projects. +* [Marionette.Handlebars](https://github.com/hashchange/marionette.handlebars) adds support for Handlebars and Mustache templates to Marionette. +* [sammy.js](http://github.com/quirkey/sammy) by Aaron Quint, a.k.a. quirkey, + supports Handlebars.js as one of its template plugins. +* [SproutCore](http://www.sproutcore.com) uses Handlebars.js as its main + templating engine, extending it with automatic data binding support. +* [YUI](http://yuilibrary.com/yui/docs/handlebars/) implements a port of handlebars +* [Swag](https://github.com/elving/swag) by [@elving](https://github.com/elving) is a growing collection of helpers for handlebars.js. Give your handlebars.js templates some swag son! +* [DOMBars](https://github.com/blakeembrey/dombars) is a DOM-based templating engine built on the Handlebars parser and runtime **DEPRECATED** +* [promised-handlebars](https://github.com/nknapp/promised-handlebars) is a wrapper for Handlebars that allows helpers to return Promises. + +External Resources +------------------ + +* [Gist about Synchronous and asynchronous loading of external handlebars templates](https://gist.github.com/2287070) + +Have a project using Handlebars? Send us a [pull request][pull-request]! + +License +------- +Handlebars.js is released under the MIT license. + +[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master diff --git a/tools/eslint/node_modules/handlebars/bin/handlebars b/tools/eslint/node_modules/handlebars/bin/handlebars new file mode 100755 index 00000000000000..7645adf3677250 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/bin/handlebars @@ -0,0 +1,128 @@ +#!/usr/bin/env node + +var optimist = require('optimist') + .usage('Precompile handlebar templates.\nUsage: $0 [template|directory]...', { + 'f': { + 'type': 'string', + 'description': 'Output File', + 'alias': 'output' + }, + 'map': { + 'type': 'string', + 'description': 'Source Map File' + }, + 'a': { + 'type': 'boolean', + 'description': 'Exports amd style (require.js)', + 'alias': 'amd' + }, + 'c': { + 'type': 'string', + 'description': 'Exports CommonJS style, path to Handlebars module', + 'alias': 'commonjs', + 'default': null + }, + 'h': { + 'type': 'string', + 'description': 'Path to handlebar.js (only valid for amd-style)', + 'alias': 'handlebarPath', + 'default': '' + }, + 'k': { + 'type': 'string', + 'description': 'Known helpers', + 'alias': 'known' + }, + 'o': { + 'type': 'boolean', + 'description': 'Known helpers only', + 'alias': 'knownOnly' + }, + 'm': { + 'type': 'boolean', + 'description': 'Minimize output', + 'alias': 'min' + }, + 'n': { + 'type': 'string', + 'description': 'Template namespace', + 'alias': 'namespace', + 'default': 'Handlebars.templates' + }, + 's': { + 'type': 'boolean', + 'description': 'Output template function only.', + 'alias': 'simple' + }, + 'N': { + 'type': 'string', + 'description': 'Name of passed string templates. Optional if running in a simple mode. Required when operating on multiple templates.', + 'alias': 'name' + }, + 'i': { + 'type': 'string', + 'description': 'Generates a template from the passed CLI argument.\n"-" is treated as a special value and causes stdin to be read for the template value.', + 'alias': 'string' + }, + 'r': { + 'type': 'string', + 'description': 'Template root. Base value that will be stripped from template names.', + 'alias': 'root' + }, + 'p': { + 'type': 'boolean', + 'description': 'Compiling a partial template', + 'alias': 'partial' + }, + 'd': { + 'type': 'boolean', + 'description': 'Include data when compiling', + 'alias': 'data' + }, + 'e': { + 'type': 'string', + 'description': 'Template extension.', + 'alias': 'extension', + 'default': 'handlebars' + }, + 'b': { + 'type': 'boolean', + 'description': 'Removes the BOM (Byte Order Mark) from the beginning of the templates.', + 'alias': 'bom' + }, + 'v': { + 'type': 'boolean', + 'description': 'Prints the current compiler version', + 'alias': 'version' + }, + + 'help': { + 'type': 'boolean', + 'description': 'Outputs this message' + } + }) + + .wrap(120) + .check(function(argv) { + if (argv.version) { + return; + } + }); + + +var argv = optimist.argv; +argv.files = argv._; +delete argv._; + +var Precompiler = require('../dist/cjs/precompiler'); +Precompiler.loadTemplates(argv, function(err, opts) { + if (err) { + throw err; + } + + if (opts.help || (!opts.templates.length && !opts.version)) { + optimist.showHelp(); + } else { + Precompiler.cli(opts); + } +}); diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars.js new file mode 100644 index 00000000000000..a9800bb3e62ffe --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars.js @@ -0,0 +1,51 @@ +define(['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _runtime = _interopRequireDefault(_handlebarsRuntime); + + // Compiler imports + + var _AST = _interopRequireDefault(_handlebarsCompilerAst); + + var _JavaScriptCompiler = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + + var _Visitor = _interopRequireDefault(_handlebarsCompilerVisitor); + + var _noConflict = _interopRequireDefault(_handlebarsNoConflict); + + var _create = _runtime['default'].create; + function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _AST['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _JavaScriptCompiler['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + + return hb; + } + + var inst = create(); + inst.create = create; + + _noConflict['default'](inst); + + inst.Visitor = _Visitor['default']; + + inst['default'] = inst; + + module.exports = inst; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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1xuXG4gIGhiLkFTVCA9IEFTVDtcbiAgaGIuQ29tcGlsZXIgPSBDb21waWxlcjtcbiAgaGIuSmF2YVNjcmlwdENvbXBpbGVyID0gSmF2YVNjcmlwdENvbXBpbGVyO1xuICBoYi5QYXJzZXIgPSBQYXJzZXI7XG4gIGhiLnBhcnNlID0gcGFyc2U7XG5cbiAgcmV0dXJuIGhiO1xufVxuXG5sZXQgaW5zdCA9IGNyZWF0ZSgpO1xuaW5zdC5jcmVhdGUgPSBjcmVhdGU7XG5cbm5vQ29uZmxpY3QoaW5zdCk7XG5cbmluc3QuVmlzaXRvciA9IFZpc2l0b3I7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars.runtime.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars.runtime.js new file mode 100644 index 00000000000000..62e563c1e47654 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars.runtime.js @@ -0,0 +1,44 @@ +define(['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _SafeString = _interopRequireDefault(_handlebarsSafeString); + + var _Exception = _interopRequireDefault(_handlebarsException); + + var _noConflict = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new _handlebarsBase.HandlebarsEnvironment(); + + _handlebarsUtils.extend(hb, _handlebarsBase); + hb.SafeString = _SafeString['default']; + hb.Exception = _Exception['default']; + hb.Utils = _handlebarsUtils; + hb.escapeExpression = _handlebarsUtils.escapeExpression; + + hb.VM = _handlebarsRuntime; + hb.template = function (spec) { + return _handlebarsRuntime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _noConflict['default'](inst); + + inst['default'] = inst; + + module.exports = inst; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFZQSxXQUFTLE1BQU0sR0FBRztBQUNoQixRQUFJLEVBQUUsR0FBRyxJQUFJLGdCQUFLLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLHFCQUFNLE1BQU0sQ0FBQyxFQUFFLGtCQUFPLENBQUM7QUFDdkIsTUFBRSxDQUFDLFVBQVUseUJBQWEsQ0FBQztBQUMzQixNQUFFLENBQUMsU0FBUyx3QkFBWSxDQUFDO0FBQ3pCLE1BQUUsQ0FBQyxLQUFLLG1CQUFRLENBQUM7QUFDakIsTUFBRSxDQUFDLGdCQUFnQixHQUFHLGlCQUFNLGdCQUFnQixDQUFDOztBQUU3QyxNQUFFLENBQUMsRUFBRSxxQkFBVSxDQUFDO0FBQ2hCLE1BQUUsQ0FBQyxRQUFRLEdBQUcsVUFBUyxJQUFJLEVBQUU7QUFDM0IsYUFBTyxtQkFBUSxRQUFRLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0tBQ25DLENBQUM7O0FBRUYsV0FBTyxFQUFFLENBQUM7R0FDWDs7QUFFRCxNQUFJLElBQUksR0FBRyxNQUFNLEVBQUUsQ0FBQztBQUNwQixNQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQzs7QUFFckIseUJBQVcsSUFBSSxDQUFDLENBQUM7O0FBRWpCLE1BQUksQ0FBQyxTQUFTLENBQUMsR0F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2FwZUV4cHJlc3Npb24gPSBVdGlscy5lc2NhcGVFeHByZXNzaW9uO1xuXG4gIGhiLlZNID0gcnVudGltZTtcbiAgaGIudGVtcGxhdGUgPSBmdW5jdGlvbihzcGVjKSB7XG4gICAgcmV0dXJuIHJ1bnRpbWUudGVtcGxhdGUoc3BlYywgaGIpO1xuICB9O1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/base.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/base.js new file mode 100644 index 00000000000000..5aca097f37d65b --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/base.js @@ -0,0 +1,96 @@ +define(['exports', './utils', './exception', './helpers', './decorators', './logger'], function (exports, _utils, _exception, _helpers, _decorators, _logger) { + 'use strict'; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU1PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7OztBQUU1QixNQUFNLGdCQUFnQixHQUFHO0FBQzlCLEtBQUMsRUFBRSxhQUFhO0FBQ2hCLEtBQUMsRUFBRSxlQUFlO0FBQ2xCLEtBQUMsRUFBRSxlQUFlO0FBQ2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iler/ast.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js new file mode 100644 index 00000000000000..c28ffeb432c762 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js @@ -0,0 +1,31 @@ +define(['exports', 'module'], function (exports, module) { + 'use strict'; + + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } + }; + + // Must be exported as an object rather than the root of the module as the jison lexer + // must modify the object to operate properly. + module.exports = AST; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFJLEdBQUcsR0FBRzs7QUFFUixXQUFPLEVBQUU7Ozs7QUFJUCxzQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsZUFBTyxBQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssZUFBZSxJQUM3QixDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssbUJBQW1CLElBQUksSUFBSSxDQUFDLElBQUksS0FBSyxnQkFBZ0IsQ0FBQSxJQUNuRSxDQUFDLEVBQUUsQUFBQyxJQUFJLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFLLElBQUksQ0FBQyxJQUFJLENBQUEsQUFBQyxB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Z3RoKSB8fCBub2RlLmhhc2gpKTtcbiAgICB9LFxuXG4gICAgc2NvcGVkSWQ6IGZ1bmN0aW9uKHBhdGgpIHtcbiAgICAgIHJldHVybiAoL15cXC58dGhpc1xcYi8pLnRlc3QocGF0aC5vcmlnaW5hbCk7XG4gICAgfSxcblxuICAgIC8vIGFuIElEIGlzIHNpbXBsZSBpZiBpdCBvbmx5IGhhcyBvbmUgcGFydCwgYW5kIHRoYXQgcGFydCBpcyBub3RcbiAgICAvLyBgLi5gIG9yIGB0aGlzYC5cbiAgICBzaW1wbGVJZDogZnVuY3Rpb24ocGF0aCkge1xuICAgICAgcmV0dXJuIHBhdGgucGFydHMubGVuZ3RoID09PSAxICYmICFBU1QuaGVscGVycy5zY29wZWRJZChwYXRoKSAmJiAhcGF0aC5kZXB0aDtcbiAgICB9XG4gIH1cbn07XG5cblxuLy8gTXVzdCBiZSBleHBvcnRlZCBhcyBhbiBvYmplY3QgcmF0aGVyIHRoYW4gdGhlIHJvb3Qgb2YgdGhlIG1vZHVsZSBhcyB0aGUgamlzb24gbGV4ZXJcbi8vIG11c3QgbW9kaWZ5IHRoZSBvYmplY3QgdG8gb3BlcmF0ZSBwcm9wZXJseS5cbmV4cG9ydCBkZWZhdWx0IEFTVDtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/base.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/base.js new file mode 100644 index 00000000000000..b4c65ccdbae06a --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/base.js @@ -0,0 +1,36 @@ +define(['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) { + 'use strict'; + + exports.__esModule = true; + exports.parse = parse; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _parser2 = _interopRequireDefault(_parser); + + var _WhitespaceControl = _interopRequireDefault(_whitespaceControl); + + exports.parser = _parser2['default']; + + var yy = {}; + _utils.extend(yy, _helpers); + + function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var strip = new _WhitespaceControl['default'](options); + return strip.accept(_parser2['default'].parse(input)); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztVQUtTLE1BQU07O0FBRWYsTUFBSSxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ1osU0FMUyxNQUFNLENBS1IsRUFBRSxXQUFVLENBQUM7O0FBRWIsV0FBUyxLQUFLLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRTs7QUFFcEMsUUFBSSxLQUFLLENBQUMsSUFBSSxLQUFLLFNBQVMsRUFBRTtBQUFFLGFBQU8sS0FBSyxDQUFDO0tBQUU7O0FBRS9DLHdCQUFPLEVBQUUsR0FBRyxFQUFFLENBQUM7OztBQUdmLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxPQUFPLEVBQUU7QUFDN0IsYUFBTyxJQUFJLEVBQUUsQ0FBQyxjQUFjLENBQUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDbkUsQ0FBQzs7QUFFRixRQUFJLEtBQUssR0FBRyxrQ0FBc0IsT0FBTyxDQUFDLENBQUM7QUFDM0MsV0FBTyxLQUFLLENBQUMsTUFBTSxDQUFDLG9CQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0dBQzFDIiwiZmlsZSI6ImJhc2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGFyc2VyIGZyb20gJy4vcGFyc2VyJztcbmltcG9ydCBXaGl0ZXNwYWNlQ29udHJvbCBmcm9tICcuL3doaXRlc3BhY2UtY29udHJvbCc7XG5pbXBvcnQgKiBhcyBIZWxwZXJzIGZyb20gJy4vaGVscGVycyc7XG5pbXBvcnQgeyBleHRlbmQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCB7IHBhcnNlciB9O1xuXG5sZXQgeXkgPSB7fTtcbmV4dGVuZCh5eSwgSGVscGVycyk7XG5cbmV4cG9ydCBmdW5jdGlvbiBwYXJzZShpbnB1dCwgb3B0aW9ucykge1xuICAvLyBKdXN0IHJldHVybiBpZiBhbiBhbHJlYWR5LWNvbXBpbGVkIEFTVCB3YXMgcGFzc2VkIGluLlxuICBpZiAoaW5wdXQudHlwZSA9PT0gJ1Byb2dyYW0nKSB7IHJldHVybiBpbnB1dDsgfVxuXG4gIHBhcnNlci55eSA9IHl5O1xuXG4gIC8vIEFsdGVyaW5nIHRoZSBzaGFyZWQgb2JqZWN0IGhlcmUsIGJ1dCB0aGlzIGlzIG9rIGFzIHBhcnNlciBpcyBhIHN5bmMgb3BlcmF0aW9uXG4gIHl5LmxvY0luZm8gPSBmdW5jdGlvbihsb2NJbmZvKSB7XG4gICAgcmV0dXJuIG5ldyB5eS5Tb3VyY2VMb2NhdGlvbihvcHRpb25zICYmIG9wdGlvbnMuc3JjTmFtZSwgbG9jSW5mbyk7XG4gIH07XG5cbiAgbGV0IHN0cmlwID0gbmV3IFdoaXRlc3BhY2VDb250cm9sKG9wdGlvbnMpO1xuICByZXR1cm4gc3RyaXAuYWNjZXB0KHBhcnNlci5wYXJzZShpbnB1dCkpO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js new file mode 100644 index 00000000000000..f3cc80c0d7c90b --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js @@ -0,0 +1,163 @@ +define(['exports', 'module', '../utils'], function (exports, module, _utils) { + /* global define */ + 'use strict'; + + var SourceNode = undefined; + + try { + /* istanbul ignore next */ + if (typeof define !== 'function' || !define.amd) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } + } catch (err) {} + /* NOP */ + + /* istanbul ignore if: tested but not covered in istanbul due to dist build */ + if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; + } + + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + var pairs = []; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + var value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } + }; + + module.exports = CodeGen; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFHQSxNQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLE1BQUk7O0FBRUYsUUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFH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dlbmVyYXRlTGlzdChwYWlycyk7XG4gICAgcmV0LnByZXBlbmQoJ3snKTtcbiAgICByZXQuYWRkKCd9Jyk7XG4gICAgcmV0dXJuIHJldDtcbiAgfSxcblxuXG4gIGdlbmVyYXRlTGlzdDogZnVuY3Rpb24oZW50cmllcykge1xuICAgIGxldCByZXQgPSB0aGlzLmVtcHR5KCk7XG5cbiAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gZW50cmllcy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgaWYgKGkpIHtcbiAgICAgICAgcmV0LmFkZCgnLCcpO1xuICAgICAgfVxuXG4gICAgICByZXQuYWRkKGNhc3RDaHVuayhlbnRyaWVzW2ldLCB0aGlzKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJldDtcbiAgfSxcblxuICBnZW5lcmF0ZUFycmF5OiBmdW5jdGlvbihlbnRyaWVzKSB7XG4gICAgbGV0IHJldCA9IHRoaXMuZ2VuZXJhdGVMaXN0KGVudHJpZXMpO1xuICAgIHJldC5wcmVwZW5kKCdbJyk7XG4gICAgcmV0LmFkZCgnXScpO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29kZUdlbjtcblxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js new file mode 100644 index 00000000000000..71edc15deb492f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js @@ -0,0 +1,568 @@ +define(['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { + /* eslint-disable new-cap */ + + 'use strict'; + + exports.__esModule = true; + exports.Compiler = Compiler; + exports.precompile = precompile; + exports.compile = compile; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _AST = _interopRequireDefault(_ast); + + var slice = [].slice; + + function Compiler() {} + + // the foundHelper register will disambiguate helper lookup from finding a + // function in a context. This is necessary for mustache compatibility, which + // requires that context functions in blocks are evaluated by blockHelperMissing, + // and then proceed as if the resulting value was provided to blockHelperMissing. + + Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + var knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (var _name in knownHelpers) { + /* istanbul ignore else */ + if (_name in knownHelpers) { + options.knownHelpers[_name] = knownHelpers[_name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _Exception['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _Exception['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _Exception['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _AST['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _AST['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _AST['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _AST['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name2 = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[_name2]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_AST['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + + function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); + } + + function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + + function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBTUEsTUFBTSxLQUFLLEdBQUcsRUFBRSxDQUFDLEt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4cHIpIHtcbiAgaWYgKCFzZXhwci5wYXRoLnBhcnRzKSB7XG4gICAgbGV0IGxpdGVyYWwgPSBzZXhwci5wYXRoO1xuICAgIC8vIENhc3RpbmcgdG8gc3RyaW5nIGhlcmUgdG8gbWFrZSBmYWxzZSBhbmQgMCBsaXRlcmFsIHZhbHVlcyBwbGF5IG5pY2VseSB3aXRoIHRoZSByZXN0XG4gICAgLy8gb2YgdGhlIHN5c3RlbS5cbiAgICBzZXhwci5wYXRoID0ge1xuICAgICAgdHlwZTogJ1BhdGhFeHByZXNzaW9uJyxcbiAgICAgIGRhdGE6IGZhbHNlLFxuICAgICAgZGVwdGg6IDAsXG4gICAgICBwYXJ0czogW2xpdGVyYWwub3JpZ2luYWwgKyAnJ10sXG4gICAgICBvcmlnaW5hbDogbGl0ZXJhbC5vcmlnaW5hbCArICcnLFxuICAgICAgbG9jOiBsaXRlcmFsLmxvY1xuICAgIH07XG4gIH1cbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js new file mode 100644 index 00000000000000..60bc119a79070b --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js @@ -0,0 +1,230 @@ +define(['exports', '../exception'], function (exports, _exception) { + 'use strict'; + + exports.__esModule = true; + exports.SourceLocation = SourceLocation; + exports.id = id; + exports.stripFlags = stripFlags; + exports.stripComment = stripComment; + exports.preparePath = preparePath; + exports.prepareMustache = prepareMustache; + exports.prepareRawBlock = prepareRawBlock; + exports.prepareBlock = prepareBlock; + exports.prepareProgram = prepareProgram; + exports.preparePartialBlock = preparePartialBlock; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _Exception['default'](open.path.original + " doesn't match " + close, errorNode); + } + } + + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } + } + + function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; + } + + function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); + } + + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _Exception['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; + } + + function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _Exception['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; + } + + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxXQUFTLGFBQWEsQ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iAgICAgICAgc291cmNlOiBmaXJzdExvYy5zb3VyY2UsXG4gICAgICAgIHN0YXJ0OiB7XG4gICAgICAgICAgbGluZTogZmlyc3RMb2Muc3RhcnQubGluZSxcbiAgICAgICAgICBjb2x1bW46IGZpcnN0TG9jLnN0YXJ0LmNvbHVtblxuICAgICAgICB9LFxuICAgICAgICBlbmQ6IHtcbiAgICAgICAgICBsaW5lOiBsYXN0TG9jLmVuZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogbGFzdExvYy5lbmQuY29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUHJvZ3JhbScsXG4gICAgYm9keTogc3RhdGVtZW50cyxcbiAgICBzdHJpcDoge30sXG4gICAgbG9jOiBsb2NcbiAgfTtcbn1cblxuXG5leHBvcnQgZnVuY3Rpb24gcHJlcGFyZVBhcnRpYWxCbG9jayhvcGVuLCBwcm9ncmFtLCBjbG9zZSwgbG9jSW5mbykge1xuICB2YWxpZGF0ZUNsb3NlKG9wZW4sIGNsb3NlKTtcblxuICByZXR1cm4ge1xuICAgIHR5cGU6ICdQYXJ0aWFsQmxvY2tTdGF0ZW1lbnQnLFxuICAgIG5hbWU6IG9wZW4ucGF0aCxcbiAgICBwYXJhbXM6IG9wZW4ucGFyYW1zLFxuICAgIGhhc2g6IG9wZW4uaGFzaCxcbiAgICBwcm9ncmFtLFxuICAgIG9wZW5TdHJpcDogb3Blbi5zdHJpcCxcbiAgICBjbG9zZVN0cmlwOiBjbG9zZSAmJiBjbG9zZS5zdHJpcCxcbiAgICBsb2M6IHRoaXMubG9jSW5mbyhsb2NJbmZvKVxuICB9O1xufVxuXG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js new file mode 100644 index 00000000000000..1c438c80c22aeb --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js @@ -0,0 +1,1118 @@ +define(['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _CodeGen = _interopRequireDefault(_codeGen); + + function Literal(value) { + this.value = value; + } + + function JavaScriptCompiler() {} + + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _Exception['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _CodeGen['default'](this.options.srcName); + this.decorators = new _CodeGen['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + for (var alias in this.aliases) { + // eslint-disable-line guard-for-in + var node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + var lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _Exception['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _Exception['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } + }; + + (function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + + JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + + function strictLookup(requireTerminal, compiler, parts, type) { + var stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } + } + + module.exports = JavaScriptCompiler; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFLQSxXQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsUUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7R0FDcEI7O0FBRUQsV0FBUyxrQkFBa0IsR0FBRyxFQUFFOztBQUVoQyxvQkFBa0IsQ0FBQyxTQUFTLEdBQUc7OztBQUc3QixjQUFVLEVBQUUsb0JBQVMsTUFBTSxFQUFFLElBQUksY0FBYTtBQUM1QyxVQUFJLGtCQUFrQixDQUFDLDZCQUE2QixDQUFDLElBQUksQ0FBQyxFQUFFO0FBQzFELGVBQU8sQ0FBQyxNQUFNLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDO09BQzVCLE1BQU07QUFDTCxlQUFPLENBQUMsTUFBTSxFQUFFLEdBQUcsRUFBRSxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDO09BQ2pEO0tBQ0Y7QUFDRCxpQkFBYSxFQUFFLHVCQUFTLElBQUksRUFBRTtBQUM1QixhQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLFlBQVksRUFBRSxJQUFJLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDdkU7O0FBRUQsZ0JBQVksRUFBRSx3QkFBVztBQUN2QixVQUFNLFFBQVEsU0ExQlQsaUJBQWlCLEFBMEJZO1VBQzVCLFFBQVEsR0FBRyxNQTNCTyxnQkFBZ0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BmdW5jdGlvbihuYW1lKSB7XG4gIHJldHVybiAhSmF2YVNjcmlwdENvbXBpbGVyLlJFU0VSVkVEX1dPUkRTW25hbWVdICYmICgvXlthLXpBLVpfJF1bMC05YS16QS1aXyRdKiQvKS50ZXN0KG5hbWUpO1xufTtcblxuZnVuY3Rpb24gc3RyaWN0TG9va3VwKHJlcXVpcmVUZXJtaW5hbCwgY29tcGlsZXIsIHBhcnRzLCB0eXBlKSB7XG4gIGxldCBzdGFjayA9IGNvbXBpbGVyLnBvcFN0YWNrKCksXG4gICAgICBpID0gMCxcbiAgICAgIGxlbiA9IHBhcnRzLmxlbmd0aDtcbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIGxlbi0tO1xuICB9XG5cbiAgZm9yICg7IGkgPCBsZW47IGkrKykge1xuICAgIHN0YWNrID0gY29tcGlsZXIubmFtZUxvb2t1cChzdGFjaywgcGFydHNbaV0sIHR5cGUpO1xuICB9XG5cbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIHJldHVybiBbY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksICcoJywgc3RhY2ssICcsICcsIGNvbXBpbGVyLnF1b3RlZFN0cmluZyhwYXJ0c1tpXSksICcpJ107XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js new file mode 100644 index 00000000000000..58748e0859ad4f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js @@ -0,0 +1,740 @@ +define(["exports"], function (exports) { + /* istanbul ignore next */ + /* Jison generated parser */ + "use strict"; + + var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ + /**/) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = [$$[$0]]; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START + /**/) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); + })();exports.__esModule = true; + exports['default'] = handlebars; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLFFBQUksVUFBVSxHQUFHLENBQUMsWUFBVTtBQUM1QixZQUFJLE1BQU0sR0FBRyxFQUFDLEtBQUssRUFBRSxTQUFTLEtBQUssR0FBRyxFQUFHO0FBQ3pDLGNBQUUsRUFBRSxFQUFFO0FBQ04sb0JBQVEsRUFBRSxFQUFDLE9BQU8sRUFBQyxDQUFDLEVBQUMsTUFBTSxFQUFDLENBQUMsRUFBQyxTQUFTLEVBQUMsQ0FBQyxFQUFDLEtBQUssRUFBQyxDQUFDLEVBQUMscUJBQXFCLEVBQUMsQ0FBQyxFQUFD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YgKHRoaXMudGVybWluYWxzX1twXSAmJiBwID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0ZWQucHVzaChcIidcIiArIHRoaXMudGVybWluYWxzX1twXSArIFwiJ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmxleGVyLnNob3dQb3NpdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBlcnJTdHIgPSBcIlBhcnNlIGVycm9yIG9uIGxpbmUgXCIgKyAoeXlsaW5lbm8gKyAxKSArIFwiOlxcblwiICsgdGhpcy5sZXhlci5zaG93UG9zaXRpb24oKSArIFwiXFxuRXhwZWN0aW5nIFwiICsgZXhwZWN0ZWQuam9pbihcIiwgXCIpICsgXCIsIGdvdCAnXCIgKyAodGhpcy50ZXJtaW5hbHNfW3N5bWJvbF0gfHwgc3ltYm9sKSArIFwiJ1wiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVyclN0ciA9IFwiUGFyc2UgZXJyb3Igb24gbGluZSBcIiArICh5eWxpbmVubyArIDEpICsgXCI6IFVuZXhwZWN0ZWQgXCIgKyAoc3ltYm9sID09IDE/XCJlbmQgb2YgaW5wdXRcIjpcIidcIiArICh0aGlzLnRlcm1pbmFsc19bc3ltYm9sXSB8fCBzeW1ib2wpICsgXCInXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnBhcnNlRXJyb3IoZXJyU3RyLCB7dGV4dDogdGhpcy5sZXhlci5tYXRjaCwgdG9rZW46IHRoaXMudGVybWluYWxzX1tzeW1ib2xdIHx8IHN5bWJvbCwgbGluZTogdGhpcy5sZXhlci55eWxpbmVubywgbG9jOiB5eWxvYywgZXhwZWN0ZWQ6IGV4cGVjdGVkfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFjdGlvblswXSBpbnN0YW5jZW9mIEFycmF5ICYmIGFjdGlvbi5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJQYXJzZSBFcnJvcjogbXVsdGlwbGUgYWN0aW9ucyBwb3NzaWJsZSBhdCBzdGF0ZTogXCIgKyBzdGF0ZSArIFwiLCB0b2tlbjogXCIgKyBzeW1ib2wpO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoYWN0aW9uWzBdKSB7XG4gICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIHN0YWNrLnB1c2goc3ltYm9sKTtcbiAgICAgICAgICAgIHZzdGFjay5wdXNoKHRoaXMubGV4ZXIueXl0ZXh0KTtcbiAgICAgICAgICAgIGxzdGFjay5wdXNoKHRoaXMubGV4ZXIueXlsbG9jKTtcbiAgICAgICAgICAgIHN0YWNrLnB1c2goYWN0aW9uWzFdKTtcbiAgICAgICAgICAgIHN5bWJvbCA9IG51bGw7XG4gICAgICAgICAgICBpZiAoIXByZUVycm9yU3ltYm9sKSB7XG4gICAgICAgICAgICAgICAgeXlsZW5nID0gdGhpcy5sZXhlci55eWxlbmc7XG4gICAgICAgICAgICAgICAgeXl0ZXh0ID0gdGhpcy5sZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgeXlsaW5lbm8gPSB0aGlzLmxleGVyLnl5bGluZW5vO1xuICAgICAgICAgICAgICAgIHl5bG9jID0gdGhpcy5sZXhlci55eWxsb2M7XG4gICAgICAgICAgICAgICAgaWYgKHJlY292ZXJpbmcgPiAwKVxuICAgICAgICAgICAgICAgICAgICByZWNvdmVyaW5nLS07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN5bWJvbCA9IHByZUVycm9yU3ltYm9sO1xuICAgICAgICAgICAgICAgIHByZUVycm9yU3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICBsZW4gPSB0aG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GVuZ3RoID4gMjAgPyAnLi4uJzonJykpLnJlcGxhY2UoL1xcbi9nLCBcIlwiKTtcbiAgICB9LFxuc2hvd1Bvc2l0aW9uOmZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHByZSA9IHRoaXMucGFzdElucHV0KCk7XG4gICAgICAgIHZhciBjID0gbmV3IEFycmF5KHByZS5sZW5ndGggKyAxKS5qb2luKFwiLVwiKTtcbiAgICAgICAgcmV0dXJuIHByZSArIHRoaXMudXBjb21pbmdJbnB1dCgpICsgXCJcXG5cIiArIGMrXCJeXCI7XG4gICAgfSxcbm5leHQ6ZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCF0aGlzLl9pbnB1dCkgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgICB2YXIgdG9rZW4sXG4gICAgICAgICAgICBtYXRjaCxcbiAgICAgICAgICAgIHRlbXBNYXRjaCxcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgY29sLFxuICAgICAgICAgICAgbGluZXM7XG4gICAgICAgIGlmICghdGhpcy5fbW9yZSkge1xuICAgICAgICAgICAgdGhpcy55eXRleHQgPSAnJztcbiAgICAgICAgICAgIHRoaXMubWF0Y2ggPSAnJztcbiAgICAgICAgfVxuICAgICAgICB2YXIgcnVsZXMgPSB0aGlzLl9jdXJyZW50UnVsZXMoKTtcbiAgICAgICAgZm9yICh2YXIgaT0wO2kgPCBydWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdGVtcE1hdGNoID0gdGhpcy5faW5wdXQubWF0Y2godGhpcy5ydWxlc1tydWxlc1tpXV0pO1xuICAgICAgICAgICAgaWYgKHRlbXBNYXRjaCAmJiAoIW1hdGNoIHx8IHRlbXBNYXRjaFswXS5sZW5ndGggPiBtYXRjaFswXS5sZW5ndGgpKSB7XG4gICAgICAgICAgICAgICAgbWF0Y2ggPSB0ZW1wTWF0Y2g7XG4gICAgICAgICAgICAgICAgaW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5vcHRpb25zLmZsZXgpIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgbGluZXMgPSBtYXRjaFswXS5tYXRjaCgvKD86XFxyXFxuP3xcXG4pLiovZyk7XG4gICAgICAgICAgICBpZiAobGluZXMpIHRoaXMueXlsaW5lbm8gKz0gbGluZXMubGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy55eWxsb2MgPSB7Zmlyc3RfbGluZTogdGhpcy55eWxsb2MubGFzdF9saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9saW5lOiB0aGlzLnl5bGluZW5vKzEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdF9jb2x1bW46IHRoaXMueXlsbG9jLmxhc3RfY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9jb2x1bW46IGxpbmVzID8gbGluZXNbbGluZXMubGVuZ3RoLTFdLmxlbmd0aC1saW5lc1tsaW5lcy5sZW5ndGgtMV0ubWF0Y2goL1xccj9cXG4/LylbMF0ubGVuZ3RoIDogdGhpcy55eWxsb2MubGFzdF9jb2x1bW4gKyBtYXRjaFswXS5sZW5ndGh9O1xuICAgICAgICAgICAgdGhpcy55eXRleHQgKz0gbWF0Y2hbMF07XG4gICAgICAgICAgICB0aGlzLm1hdGNoICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgdGhpcy5tYXRjaGVzID0gbWF0Y2g7XG4gICAgICAgICAgICB0aGlzLnl5bGVuZyA9IHRoaXMueXl0ZXh0Lmxlbmd0aDtcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMucmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgdGhpcy55eWxsb2MucmFuZ2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XIgWVlTVEFURT1ZWV9TVEFSVFxuc3dpdGNoKCRhdm9pZGluZ19uYW1lX2NvbGxpc2lvbnMpIHtcbmNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeXlfLnl5dGV4dC5zbGljZSgtMikgPT09IFwiXFxcXFxcXFxcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcIm11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYoeXlfLnl5dGV4dC5zbGljZSgtMSkgPT09IFwiXFxcXFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaXAoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwiZW11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmVnaW4oXCJtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih5eV8ueXl0ZXh0KSByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAxOnJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDM6dGhpcy5iZWdpbigncmF3Jyk7IHJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucG9wU3RhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTaG91bGQgYmUgdXNpbmcgYHRoaXMudG9wU3RhdGUoKWAgYmVsb3csIGJ1dCBpdCBjdXJyZW50bHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm5zIHRoZSBzZWNvbmQgdG9wIGluc3RlYWQgb2YgdGhlIGZpcnN0IHRvcC4gT3BlbmVkIGFuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXNzdWUgYWJvdXQgaXQgYXQgaHR0cHM6Ly9naXRodWIuY29tL3phYWNoL2ppc29uL2lzc3Vlcy8yOTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSA9PT0gJ3JhdycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeXlfLnl5dGV4dCA9IHl5Xy55eXRleHQuc3Vic3RyKDUsIHl5Xy55eWxlbmctOSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ0VORF9SQVdfQkxPQ0snO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDU6IHJldHVybiAxNTsgXG5icmVhaztcbmNhc2UgNjpcbiAgdGhpcy5wb3BTdGF0ZSgpO1xuICByZXR1cm4gMTQ7XG5cbmJyZWFrO1xuY2FzZSA3OnJ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vLC9eKD86W15cXHgwMF17Mix9Pyg/PShcXHtcXHt8XFxcXFxce1xce3xcXFxcXFxcXFxce1xce3wkKSkpLywvXig/Olxce1xce1xce1xceyg/PVteXFwvXSkpLywvXig/Olxce1xce1xce1xce1xcL1teXFxzIVwiIyUtLFxcLlxcLzstPkBcXFstXFxeYFxcey1+XSsoPz1bPX1cXHNcXC8uXSlcXH1cXH1cXH1cXH0pLywvXig/OlteXFx4MDBdKj8oPz0oXFx7XFx7XFx7XFx7KSkpLywvXig/OltcXHNcXFNdKj8tLSh+KT9cXH1cXH0pLywvXig/OlxcKCkvLC9eKD86XFwpKS8sL14oPzpcXHtcXHtcXHtcXHspLywvXig/OlxcfVxcfVxcfVxcfSkvLC9eKD86XFx7XFx7KH4pPz4pLywvXig/Olxce1xceyh+KT8jPikvLC9eKD86XFx7XFx7KH4pPyNcXCo/KS8sL14oPzpcXHtcXHsofik/XFwvKS8sL14oPzpcXHtcXHsofik/XFxeXFxzKih+KT9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXHMqZWxzZVxccyoofik/XFx9XFx9KS8sL14oPzpcXHtcXHsofik/XFxeKS8sL14oPzpcXHtcXHsofik/XFxzKmVsc2VcXGIpLywvXig/Olxce1xceyh+KT9cXHspLywvXig/Olxce1xceyh+KT8mKS8sL14oPzpcXHtcXHsofik/IS0tKS8sL14oPzpcXHtcXHsofik/IVtcXHNcXFNdKj9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXCo/KS8sL14oPzo9KS8sL14oPzpcXC5cXC4pLywvXig/OlxcLig/PShbPX59XFxzXFwvLil8XSkpKS8sL14oPzpbXFwvLl0pLywvXig/OlxccyspLywvXig/OlxcfSh+KT9cXH1cXH0pLywvXig/Oih+KT9cXH1cXH0pLywvXig/OlwiKFxcXFxbXCJdfFteXCJdKSpcIikvLC9eKD86JyhcXFxcWyddfFteJ10pKicpLywvXig/OkApLywvXig/OnRydWUoPz0oW359XFxzKV0pKSkvLC9eKD86ZmFsc2UoPz0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dWx0J10gPSBoYW5kbGViYXJzO1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js new file mode 100644 index 00000000000000..4f9f9c35ad7030 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js @@ -0,0 +1,186 @@ +define(['exports', './visitor'], function (exports, _visitor) { + /* eslint-disable new-cap */ + 'use strict'; + + exports.__esModule = true; + exports.print = print; + exports.PrintVisitor = PrintVisitor; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Visitor = _interopRequireDefault(_visitor); + + function print(ast) { + return new PrintVisitor().accept(ast); + } + + function PrintVisitor() { + this.padding = 0; + } + + PrintVisitor.prototype = new _Visitor['default'](); + + PrintVisitor.prototype.pad = function (string) { + var out = ''; + + for (var i = 0, l = this.padding; i < l; i++) { + out += ' '; + } + + out += string + '\n'; + return out; + }; + + PrintVisitor.prototype.Program = function (program) { + var out = '', + body = program.body, + i = undefined, + l = undefined; + + if (program.blockParams) { + var blockParams = 'BLOCK PARAMS: ['; + for (i = 0, l = program.blockParams.length; i < l; i++) { + blockParams += ' ' + program.blockParams[i]; + } + blockParams += ' ]'; + out += this.pad(blockParams); + } + + for (i = 0, l = body.length; i < l; i++) { + out += this.accept(body[i]); + } + + this.padding--; + + return out; + }; + + PrintVisitor.prototype.MustacheStatement = function (mustache) { + return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); + }; + PrintVisitor.prototype.Decorator = function (mustache) { + return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); + }; + + PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function (block) { + var out = ''; + + out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); + this.padding++; + out += this.pad(this.SubExpression(block)); + if (block.program) { + out += this.pad('PROGRAM:'); + this.padding++; + out += this.accept(block.program); + this.padding--; + } + if (block.inverse) { + if (block.program) { + this.padding++; + } + out += this.pad('{{^}}'); + this.padding++; + out += this.accept(block.inverse); + this.padding--; + if (block.program) { + this.padding--; + } + } + this.padding--; + + return out; + }; + + PrintVisitor.prototype.PartialStatement = function (partial) { + var content = 'PARTIAL:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + return this.pad('{{> ' + content + ' }}'); + }; + PrintVisitor.prototype.PartialBlockStatement = function (partial) { + var content = 'PARTIAL BLOCK:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + + content += ' ' + this.pad('PROGRAM:'); + this.padding++; + content += this.accept(partial.program); + this.padding--; + + return this.pad('{{> ' + content + ' }}'); + }; + + PrintVisitor.prototype.ContentStatement = function (content) { + return this.pad("CONTENT[ '" + content.value + "' ]"); + }; + + PrintVisitor.prototype.CommentStatement = function (comment) { + return this.pad("{{! '" + comment.value + "' }}"); + }; + + PrintVisitor.prototype.SubExpression = function (sexpr) { + var params = sexpr.params, + paramStrings = [], + hash = undefined; + + for (var i = 0, l = params.length; i < l; i++) { + paramStrings.push(this.accept(params[i])); + } + + params = '[' + paramStrings.join(', ') + ']'; + + hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; + + return this.accept(sexpr.path) + ' ' + params + hash; + }; + + PrintVisitor.prototype.PathExpression = function (id) { + var path = id.parts.join('/'); + return (id.data ? '@' : '') + 'PATH:' + path; + }; + + PrintVisitor.prototype.StringLiteral = function (string) { + return '"' + string.value + '"'; + }; + + PrintVisitor.prototype.NumberLiteral = function (number) { + return 'NUMBER{' + number.value + '}'; + }; + + PrintVisitor.prototype.BooleanLiteral = function (bool) { + return 'BOOLEAN{' + bool.value + '}'; + }; + + PrintVisitor.prototype.UndefinedLiteral = function () { + return 'UNDEFINED'; + }; + + PrintVisitor.prototype.NullLiteral = function () { + return 'NULL'; + }; + + PrintVisitor.prototype.Hash = function (hash) { + var pairs = hash.pairs, + joinedPairs = []; + + for (var i = 0, l = pairs.length; i < l; i++) { + joinedPairs.push(this.accept(pairs[i])); + } + + return 'HASH{' + joinedPairs.join(', ') + '}'; + }; + PrintVisitor.prototype.HashPair = function (pair) { + return pair.key + '=' + this.accept(pair.value); + }; + /* eslint-enable new-cap */ +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3ByaW50ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUdPLFdBQVMsS0FBSyxDQUFDLEdBQUcsRUFBRTtBQUN6QixXQUFPLElBQUksWUFBWSxFQUFFLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0dBQ3ZDOztBQUVNLFdBQVMsWUFBWSxHQUFHO0FBQzdCLFFBQUksQ0FBQyxPQUFPLEdBQUcsQ0FBQyxDQUFDO0dBQ2xCOztBQUVELGNBQVksQ0FBQyxTQUFTLEdBQUcseUJBQWEsQ0FBQzs7QUFFdkMsY0FBWSxDQUFDLFNBQVMsQ0FBQyxHQUFHLEdBQUcsVUFBUyxNQUFNLEVBQUU7QUFDNUMsUUFBSSxHQUFHLEdBQUcsRUFBRSxDQUFDOztBQUViLFNBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDNUMsU0FBRyxJQUFJLElBQUksQ0FBQztLQUNiOztBQUVELE9BQUcsSUFBSSxNQUFNLEdBQUcsSUFBSSxDQUFDO0FBQ3JCLFdBQU8sR0FBRyxDQUFDO0dBQ1osQ0F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nVuY3Rpb24obnVtYmVyKSB7XG4gIHJldHVybiAnTlVNQkVSeycgKyBudW1iZXIudmFsdWUgKyAnfSc7XG59O1xuXG5QcmludFZpc2l0b3IucHJvdG90eXBlLkJvb2xlYW5MaXRlcmFsID0gZnVuY3Rpb24oYm9vbCkge1xuICByZXR1cm4gJ0JPT0xFQU57JyArIGJvb2wudmFsdWUgKyAnfSc7XG59O1xuXG5QcmludFZpc2l0b3IucHJvdG90eXBlLlVuZGVmaW5lZExpdGVyYWwgPSBmdW5jdGlvbigpIHtcbiAgcmV0dXJuICdVTkRFRklORUQnO1xufTtcblxuUHJpbnRWaXNpdG9yLnByb3RvdHlwZS5OdWxsTGl0ZXJhbCA9IGZ1bmN0aW9uKCkge1xuICByZXR1cm4gJ05VTEwnO1xufTtcblxuUHJpbnRWaXNpdG9yLnByb3RvdHlwZS5IYXNoID0gZnVuY3Rpb24oaGFzaCkge1xuICBsZXQgcGFpcnMgPSBoYXNoLnBhaXJzLFxuICAgICAgam9pbmVkUGFpcnMgPSBbXTtcblxuICBmb3IgKGxldCBpID0gMCwgbCA9IHBhaXJzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgIGpvaW5lZFBhaXJzLnB1c2godGhpcy5hY2NlcHQocGFpcnNbaV0pKTtcbiAgfVxuXG4gIHJldHVybiAnSEFTSHsnICsgam9pbmVkUGFpcnMuam9pbignLCAnKSArICd9Jztcbn07XG5QcmludFZpc2l0b3IucHJvdG90eXBlLkhhc2hQYWlyID0gZnVuY3Rpb24ocGFpcikge1xuICByZXR1cm4gcGFpci5rZXkgKyAnPScgKyB0aGlzLmFjY2VwdChwYWlyLnZhbHVlKTtcbn07XG4vKiBlc2xpbnQtZW5hYmxlIG5ldy1jYXAgKi9cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js new file mode 100644 index 00000000000000..b74d9870df3d21 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js @@ -0,0 +1,138 @@ +define(['exports', 'module', '../exception'], function (exports, module, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function Visitor() { + this.parents = []; + } + + Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _Exception['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _Exception['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _Exception['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } + }; + + function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); + } + function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); + } + + module.exports = Visitor; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3Zpc2l0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBRUEsV0FBUyxPQUFPLEdBQUc7QUFDakIsUUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7R0FDbkI7O0FBRUQsU0FBTyxDQUFDLFNBQVMsR0FBRztBQUNsQixlQUFXLEVBQUUsT0FBTztBQUNwQixZQUFRLEVBQUUsS0FBSzs7O0FBR2YsYUFBUyxFQUFFLG1CQUFTLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDOUIsVUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUNwQyxVQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7OztBQUdqQixZQUFJLEtBQUssSUFBSSx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WNjZXB0UmVxdWlyZWQocGFpciwgJ3ZhbHVlJyk7XG4gIH1cbn07XG5cbmZ1bmN0aW9uIHZpc2l0U3ViRXhwcmVzc2lvbihtdXN0YWNoZSkge1xuICB0aGlzLmFjY2VwdFJlcXVpcmVkKG11c3RhY2hlLCAncGF0aCcpO1xuICB0aGlzLmFjY2VwdEFycmF5KG11c3RhY2hlLnBhcmFtcyk7XG4gIHRoaXMuYWNjZXB0S2V5KG11c3RhY2hlLCAnaGFzaCcpO1xufVxuZnVuY3Rpb24gdmlzaXRCbG9jayhibG9jaykge1xuICB2aXNpdFN1YkV4cHJlc3Npb24uY2FsbCh0aGlzLCBibG9jayk7XG5cbiAgdGhpcy5hY2NlcHRLZXkoYmxvY2ssICdwcm9ncmFtJyk7XG4gIHRoaXMuYWNjZXB0S2V5KGJsb2NrLCAnaW52ZXJzZScpO1xufVxuZnVuY3Rpb24gdmlzaXRQYXJ0aWFsKHBhcnRpYWwpIHtcbiAgdGhpcy5hY2NlcHRSZXF1aXJlZChwYXJ0aWFsLCAnbmFtZScpO1xuICB0aGlzLmFjY2VwdEFycmF5KHBhcnRpYWwucGFyYW1zKTtcbiAgdGhpcy5hY2NlcHRLZXkocGFydGlhbCwgJ2hhc2gnKTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgVmlzaXRvcjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js new file mode 100644 index 00000000000000..47c365a96226d2 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js @@ -0,0 +1,219 @@ +define(['exports', 'module', './visitor'], function (exports, module, _visitor) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Visitor = _interopRequireDefault(_visitor); + + function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; + } + WhitespaceControl.prototype = new _Visitor['default'](); + + WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; + }; + + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; + }; + + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; + }; + + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + + function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + + // Marks the node to the right of the position as omitted. + // I.e. {{foo}}' ' will mark the ' ' node as omitted. + // + // If i is undefined, then the first child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; + } + + // Marks the node to the left of the position as omitted. + // I.e. ' '{{foo}} will mark the ' ' node as omitted. + // + // If i is undefined then the last child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + + module.exports = WhitespaceControl; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3doaXRlc3BhY2UtY29udHJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFFQSxXQUFTLGlCQUFpQixHQUFlO1FBQWQsT0FBTyx5REFBRyxFQUFFOztBQUNyQyxRQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztHQUN4QjtBQUNELG1CQUFpQixDQUFDLFNBQVMsR0FBRyx5QkFBYSxDQUFDOztBQUU1QyxtQkFBaUIsQ0FBQyxTQUFTLENBQUMsT0FBTyxHQUFHLFVBQVMsT0FBTyxFQUFFO0FBQ3RELFFBQU0sWUFBWSxHQUFHLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQzs7QUFFcEQsUUFBSSxNQUFNLEdBQUcsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDO0FBQzlCLFFBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDOztBQUV2QixRQUFJLElBQUksR0FBRyxPQUFPLENBQU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GFzIHN1Y2guXG4vL1xuLy8gSWYgbXVsaXRwbGUgaXMgdHJ1dGh5IHRoZW4gYWxsIHdoaXRlc3BhY2Ugd2lsbCBiZSBzdHJpcHBlZCBvdXQgdW50aWwgbm9uLXdoaXRlc3BhY2Vcbi8vIGNvbnRlbnQgaXMgbWV0LlxuZnVuY3Rpb24gb21pdExlZnQoYm9keSwgaSwgbXVsdGlwbGUpIHtcbiAgbGV0IGN1cnJlbnQgPSBib2R5W2kgPT0gbnVsbCA/IGJvZHkubGVuZ3RoIC0gMSA6IGkgLSAxXTtcbiAgaWYgKCFjdXJyZW50IHx8IGN1cnJlbnQudHlwZSAhPT0gJ0NvbnRlbnRTdGF0ZW1lbnQnIHx8ICghbXVsdGlwbGUgJiYgY3VycmVudC5sZWZ0U3RyaXBwZWQpKSB7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgLy8gV2Ugb21pdCB0aGUgbGFzdCBub2RlIGlmIGl0J3Mgd2hpdGVzcGFjZSBvbmx5IGFuZCBub3QgcHJlY2VlZGVkIGJ5IGEgbm9uLWNvbnRlbnQgbm9kZS5cbiAgbGV0IG9yaWdpbmFsID0gY3VycmVudC52YWx1ZTtcbiAgY3VycmVudC52YWx1ZSA9IGN1cnJlbnQudmFsdWUucmVwbGFjZShtdWx0aXBsZSA/ICgvXFxzKyQvKSA6ICgvWyBcXHRdKyQvKSwgJycpO1xuICBjdXJyZW50LmxlZnRTdHJpcHBlZCA9IGN1cnJlbnQudmFsdWUgIT09IG9yaWdpbmFsO1xuICByZXR1cm4gY3VycmVudC5sZWZ0U3RyaXBwZWQ7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFdoaXRlc3BhY2VDb250cm9sO1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators.js new file mode 100644 index 00000000000000..7c23cab92ca8af --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators.js @@ -0,0 +1,16 @@ +define(['exports', './decorators/inline'], function (exports, _decoratorsInline) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerInline = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _registerInline['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js new file mode 100644 index 00000000000000..125e39642f0bcf --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js @@ -0,0 +1,25 @@ +define(['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWckIsTUFBTSxDQVVzQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLG1CQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixpQkFBTyxHQUFHLENBQUM7U0FDWixDQUFDO09BQ0g7O0FBRUQsV0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFN0MsYUFBTyxHQUFHLENBQUM7S0FDWixDQUFDLENBQUM7R0FDSiIsImZpbGUiOiJpbmxpbmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2V4dGVuZH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckRlY29yYXRvcignaW5saW5lJywgZnVuY3Rpb24oZm4sIHByb3BzLCBjb250YWluZXIsIG9wdGlvbnMpIHtcbiAgICBsZXQgcmV0ID0gZm47XG4gICAgaWYgKCFwcm9wcy5wYXJ0aWFscykge1xuICAgICAgcHJvcHMucGFydGlhbHMgPSB7fTtcbiAgICAgIHJldCA9IGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICAgICAgLy8gQ3JlYXRlIGEgbmV3IHBhcnRpYWxzIHN0YWNrIGZyYW1lIHByaW9yIHRvIGV4ZWMuXG4gICAgICAgIGxldCBvcmlnaW5hbCA9IGNvbnRhaW5lci5wYXJ0aWFscztcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gZXh0ZW5kKHt9LCBvcmlnaW5hbCwgcHJvcHMucGFydGlhbHMpO1xuICAgICAgICBsZXQgcmV0ID0gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IG9yaWdpbmFsO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfTtcbiAgICB9XG5cbiAgICBwcm9wcy5wYXJ0aWFsc1tvcHRpb25zLmFyZ3NbMF1dID0gb3B0aW9ucy5mbjtcblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/exception.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/exception.js new file mode 100644 index 00000000000000..d9f8ebd172c2a0 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/exception.js @@ -0,0 +1,39 @@ +define(['exports', 'module'], function (exports, module) { + 'use strict'; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + module.exports = Exception; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxNQUFNLFVBQVUsR0FBRyxDQUFDLGFBQWEsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDOztBQUVuRyxXQUFTLFNBQVMsQ0FBQyxPQUFPLEVBQUUsSUFBSSxFQUFFO0FBQ2hDLFFBQUksR0FBRyxHQUFHLElBQUksSUFBSSxJQUFJLENBQUMsR0FBRztRQUN0QixJQUFJLFlBQUE7UUFDSixNQUFNLFlBQUEsQ0FBQztBQUNYLFFBQUksR0FBRyxFQUFFO0FBQ1AsVUFBSSxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDO0FBQ3RCLFlBQU0sR0FBRyxHQUFHLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQzs7QUFFMUIsYUFBTyxJQUFJLEtBQUssR0FBRyxJQUFJL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1bW47XG4gIGlmIChsb2MpIHtcbiAgICBsaW5lID0gbG9jLnN0YXJ0LmxpbmU7XG4gICAgY29sdW1uID0gbG9jLnN0YXJ0LmNvbHVtbjtcblxuICAgIG1lc3NhZ2UgKz0gJyAtICcgKyBsaW5lICsgJzonICsgY29sdW1uO1xuICB9XG5cbiAgbGV0IHRtcCA9IEVycm9yLnByb3RvdHlwZS5jb25zdHJ1Y3Rvci5jYWxsKHRoaXMsIG1lc3NhZ2UpO1xuXG4gIC8vIFVuZm9ydHVuYXRlbHkgZXJyb3JzIGFyZSBub3QgZW51bWVyYWJsZSBpbiBDaHJvbWUgKGF0IGxlYXN0KSwgc28gYGZvciBwcm9wIGluIHRtcGAgZG9lc24ndCB3b3JrLlxuICBmb3IgKGxldCBpZHggPSAwOyBpZHggPCBlcnJvclByb3BzLmxlbmd0aDsgaWR4KyspIHtcbiAgICB0aGlzW2Vycm9yUHJvcHNbaWR4XV0gPSB0bXBbZXJyb3JQcm9wc1tpZHhdXTtcbiAgfVxuXG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gIGlmIChFcnJvci5jYXB0dXJlU3RhY2tUcmFjZSkge1xuICAgIEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKHRoaXMsIEV4Y2VwdGlvbik7XG4gIH1cblxuICBpZiAobG9jKSB7XG4gICAgdGhpcy5saW5lTnVtYmVyID0gbGluZTtcbiAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgfVxufVxuXG5FeGNlcHRpb24ucHJvdG90eXBlID0gbmV3IEVycm9yKCk7XG5cbmV4cG9ydCBkZWZhdWx0IEV4Y2VwdGlvbjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers.js new file mode 100644 index 00000000000000..38cb5065b46040 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers.js @@ -0,0 +1,34 @@ +define(['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); + + var _registerEach = _interopRequireDefault(_helpersEach); + + var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); + + var _registerIf = _interopRequireDefault(_helpersIf); + + var _registerLog = _interopRequireDefault(_helpersLog); + + var _registerLookup = _interopRequireDefault(_helpersLookup); + + var _registerWith = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _registerBlockHelperMissing['default'](instance); + _registerEach['default'](instance); + _registerHelperMissing['default'](instance); + _registerIf['default'](instance); + _registerLog['default'](instance); + _registerLookup['default'](instance); + _registerWith['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFRTyxXQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFBRTtBQUMvQywyQ0FBMkIsUUFBUSxDQUFDLENBQUM7QUFDckMsNkJBQWEsUUFBUSxDQUFDLENBQUM7QUFDdkIsc0NBQXNCLFFBQVEsQ0FBQyxDQUFDO0FBQ2hDLDJCQUFXLFFBQVEsQ0FBQyxDQUFDO0FBQ3JCLDRCQUFZLFFBQVEsQ0FBQyxDQUFDO0FBQ3RCLCtCQUFlLFFBQVEsQ0FBQyxDQUFDO0FBQ3pCLDZCQUFhLFFBQVEsQ0FBQyxDQUFDO0dBQ3hCIiwiZmlsZSI6ImhlbHBlcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcmVnaXN0ZXJCbG9ja0hlbHBlck1pc3NpbmcgZnJvbSAnLi9oZWxwZXJzL2Jsb2NrLWhlbHBlci1taXNzaW5nJztcbmltcG9ydCByZWdpc3RlckVhY2ggZnJvbSAnLi9oZWxwZXJzL2VhY2gnO1xuaW1wb3J0IHJlZ2lzdGVySGVscGVyTWlzc2luZyBmcm9tICcuL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcnO1xuaW1wb3J0IHJlZ2lzdGVySWYgZnJvbSAnLi9oZWxwZXJzL2lmJztcbmltcG9ydCByZWdpc3RlckxvZyBmcm9tICcuL2hlbHBlcnMvbG9nJztcbmltcG9ydCByZWdpc3Rlckxvb2t1cCBmcm9tICcuL2hlbHBlcnMvbG9va3VwJztcbmltcG9ydCByZWdpc3RlcldpdGggZnJvbSAnLi9oZWxwZXJzL3dpdGgnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0SGVscGVycyhpbnN0YW5jZSkge1xuICByZWdpc3RlckJsb2NrSGVscGVyTWlzc2luZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyRWFjaChpbnN0YW5jZSk7XG4gIHJlZ2lzdGVySGVscGVyTWlzc2luZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVySWYoaW5zdGFuY2UpO1xuICByZWdpc3RlckxvZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9va3VwKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJXaXRoKGluc3RhbmNlKTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js new file mode 100644 index 00000000000000..1469897521f96d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js @@ -0,0 +1,35 @@ +define(['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFVBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQ3pCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVwQixVQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsZUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxlQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztPQUN0QixNQUFNLElBQUksT0FYeUIsT0FBTyxDQVd4QixPQUFPLENBQUMsRUFBRTtBQUMzQixZQUFJLE9BQU8sQ0FBQyxNQUFNLEdBQUc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24oY29udGV4dCwgb3B0aW9ucykge1xuICAgIGxldCBpbnZlcnNlID0gb3B0aW9ucy5pbnZlcnNlLFxuICAgICAgICBmbiA9IG9wdGlvbnMuZm47XG5cbiAgICBpZiAoY29udGV4dCA9PT0gdHJ1ZSkge1xuICAgICAgcmV0dXJuIGZuKHRoaXMpO1xuICAgIH0gZWxzZSBpZiAoY29udGV4dCA9PT0gZmFsc2UgfHwgY29udGV4dCA9PSBudWxsKSB7XG4gICAgICByZXR1cm4gaW52ZXJzZSh0aGlzKTtcbiAgICB9IGVsc2UgaWYgKGlzQXJyYXkoY29udGV4dCkpIHtcbiAgICAgIGlmIChjb250ZXh0Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgaWYgKG9wdGlvbnMuaWRzKSB7XG4gICAgICAgICAgb3B0aW9ucy5pZHMgPSBbb3B0aW9ucy5uYW1lXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzLmVhY2goY29udGV4dCwgb3B0aW9ucyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gaW52ZXJzZSh0aGlzKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBsZXQgZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgICAgIGRhdGEuY29udGV4dFBhdGggPSBhcHBlbmRDb250ZXh0UGF0aChvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsIG9wdGlvbnMubmFtZSk7XG4gICAgICAgIG9wdGlvbnMgPSB7ZGF0YTogZGF0YX07XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICB9XG4gIH0pO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/each.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/each.js new file mode 100644 index 00000000000000..48ecf2ae4c8054 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/each.js @@ -0,0 +1,89 @@ +define(['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _Exception['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdz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RQYXRoICsgZmllbGQsIG51bGxdKVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgJiYgdHlwZW9mIGNvbnRleHQgPT09ICdvYmplY3QnKSB7XG4gICAgICBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBpZiAoaSBpbiBjb250ZXh0KSB7XG4gICAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBsZXQgcHJpb3JLZXk7XG5cbiAgICAgICAgZm9yIChsZXQga2V5IGluIGNvbnRleHQpIHtcbiAgICAgICAgICBpZiAoY29udGV4dC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAgIC8vIHRoZSBsYXN0IGl0ZXJhdGlvbiB3aXRob3V0IGhhdmUgdG8gc2NhbiB0aGUgb2JqZWN0IHR3aWNlIGFuZCBjcmVhdGVcbiAgICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICAgIGkrKztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js new file mode 100644 index 00000000000000..75d43f63a83e37 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js @@ -0,0 +1,22 @@ +define(['exports', 'module', '../exception'], function (exports, module, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQWMsbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxDQUFDO09BQ3ZGO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/if.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/if.js new file mode 100644 index 00000000000000..d1aa02166689e7 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/if.js @@ -0,0 +1,25 @@ +define(['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxVQUFJLE9BSlMsVUFBVSxDQUlSLFdBQVcsQ0FBQyxFQUFFO0FBQUUsbUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQUU7Ozs7O0FBS3RFLFVBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLE9BVC9DLE9BQU8sQ0FTZ0QsV0FBVyxDQUFDLEVBQUU7QUFDdkUsZUFBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO09BQzlCLE1BQU07QUFDTCxlQUFPLE9BQU8sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDekI7S0FDRixDQUFDLENBQUM7O0FBRUgsWUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxXQUFXLEVBQUUsT0FBTyxFQUFFO0FBQy9EL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ICYmICFjb25kaXRpb25hbCkgfHwgaXNFbXB0eShjb25kaXRpb25hbCkpIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmZuKHRoaXMpO1xuICAgIH1cbiAgfSk7XG5cbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ3VubGVzcycsIGZ1bmN0aW9uKGNvbmRpdGlvbmFsLCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnNbJ2lmJ10uY2FsbCh0aGlzLCBjb25kaXRpb25hbCwge2ZuOiBvcHRpb25zLmludmVyc2UsIGludmVyc2U6IG9wdGlvbnMuZm4sIGhhc2g6IG9wdGlvbnMuaGFzaH0pO1xuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/log.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/log.js new file mode 100644 index 00000000000000..7ea90803d11e58 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/log.js @@ -0,0 +1,24 @@ +define(['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0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cmdzID0gW3VuZGVmaW5lZF0sXG4gICAgICAgIG9wdGlvbnMgPSBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdO1xuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgYXJncy5wdXNoKGFyZ3VtZW50c1tpXSk7XG4gICAgfVxuXG4gICAgbGV0IGxldmVsID0gMTtcbiAgICBpZiAob3B0aW9ucy5oYXNoLmxldmVsICE9IG51bGwpIHtcbiAgICAgIGxldmVsID0gb3B0aW9ucy5oYXNoLmxldmVsO1xuICAgIH0gZWxzZSBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuZGF0YS5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuZGF0YS5sZXZlbDtcbiAgICB9XG4gICAgYXJnc1swXSA9IGxldmVsO1xuXG4gICAgaW5zdGFuY2UubG9nKC4uLiBhcmdzKTtcbiAgfSk7XG59XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js new file mode 100644 index 00000000000000..8ed79c6e76d8d3 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js @@ -0,0 +1,10 @@ +define(['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUU7QUFDckQsYUFBTyxHQUFHLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQzFCLENBQUMsQ0FBQztHQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkKSB7XG4gICAgcmV0dXJuIG9iaiAmJiBvYmpbZmllbGRdO1xuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/with.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/with.js new file mode 100644 index 00000000000000..1428bac6b249e6 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/helpers/with.js @@ -0,0 +1,29 @@ +define(['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7bUJBRWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQ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mFtcywgY3JlYXRlRnJhbWUsIGlzRW1wdHksIGlzRnVuY3Rpb259IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ3dpdGgnLCBmdW5jdGlvbihjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgaWYgKGlzRnVuY3Rpb24oY29udGV4dCkpIHsgY29udGV4dCA9IGNvbnRleHQuY2FsbCh0aGlzKTsgfVxuXG4gICAgbGV0IGZuID0gb3B0aW9ucy5mbjtcblxuICAgIGlmICghaXNFbXB0eShjb250ZXh0KSkge1xuICAgICAgbGV0IGRhdGEgPSBvcHRpb25zLmRhdGE7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGRhdGEgPSBjcmVhdGVGcmFtZShvcHRpb25zLmRhdGEpO1xuICAgICAgICBkYXRhLmNvbnRleHRQYXRoID0gYXBwZW5kQ29udGV4dFBhdGgob3B0aW9ucy5kYXRhLmNvbnRleHRQYXRoLCBvcHRpb25zLmlkc1swXSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBmbihjb250ZXh0LCB7XG4gICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dF0sIFtkYXRhICYmIGRhdGEuY29udGV4dFBhdGhdKVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/logger.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/logger.js new file mode 100644 index 00000000000000..7786edaa40124b --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/logger.js @@ -0,0 +1,44 @@ +define(['exports', 'module', './utils'], function (exports, module, _utils) { + 'use strict'; + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + module.exports = logger; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0sR0FBRztBQUNYLGFBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxTQUFLLEVBQUUsTUFBTTs7O0FBR2IsZUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixVQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixZQUFJLFFBQVEsR0FBRyxPQVRiLE9BQU8sQ0FTYyxNQUFNLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO0FBQzlELFlBQUksUUFBUSxJQUFJLENBQUMsRUFBRTtBQUNqQixlQUFLLEdBQUcsUUFBUSxDQUFDO1NBQ2xCLE1BQU07QUFDT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bmcnKSB7XG4gICAgICBsZXQgbGV2ZWxNYXAgPSBpbmRleE9mKGxvZ2dlci5tZXRob2RNYXAsIGxldmVsLnRvTG93ZXJDYXNlKCkpO1xuICAgICAgaWYgKGxldmVsTWFwID49IDApIHtcbiAgICAgICAgbGV2ZWwgPSBsZXZlbE1hcDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGxldmVsID0gcGFyc2VJbnQobGV2ZWwsIDEwKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWwpIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIGlmICghY29uc29sZVttZXRob2RdKSB7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgICAgIG1ldGhvZCA9ICdsb2cnO1xuICAgICAgfVxuICAgICAgY29uc29sZVttZXRob2RdKC4uLm1lc3NhZ2UpOyAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbiAgICB9XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGxvZ2dlcjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/no-conflict.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/no-conflict.js new file mode 100644 index 00000000000000..567ff2b81d8543 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/no-conflict.js @@ -0,0 +1,18 @@ +define(['exports', 'module'], function (exports, module) { + /* global window */ + 'use strict'; + + module.exports = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7bUJBQ2UsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLFFBQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtRQUN0RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFbEMsY0FBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFVBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsWUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7T0FDL0I7QUFDRCxhQUFPLFVBQVUsQ0FBQztLQUNuQixDQUFDO0dBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBnbG9iYWwgd2luZG93ICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/runtime.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/runtime.js new file mode 100644 index 00000000000000..682a4e3e0062f9 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/runtime.js @@ -0,0 +1,282 @@ +define(['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) { + 'use strict'; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _Exception['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = _utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _Exception['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: _utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = _utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _Exception['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _Exception['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = _utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _Exception['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + _utils.extend(prog, props); + } + return prog; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUlPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztRQUN2RCxlQUFlLFNBSmQsaUJBQWlCLEFBSWlCLENBQUM7O0FBRTFDLFFBQUksZ0JBQWdCLEtBQUssZUFBZSxFQUFFO0FBQ3hDLFVBQUksZ0JBQWdCLEdBQUcsZUFBZSxFQUFFO0FBQ3RDLFlBQU0sZUFBZ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4gJyc7IH1cblxuZnVuY3Rpb24gaW5pdERhdGEoY29udGV4dCwgZGF0YSkge1xuICBpZiAoIWRhdGEgfHwgISgncm9vdCcgaW4gZGF0YSkpIHtcbiAgICBkYXRhID0gZGF0YSA/IGNyZWF0ZUZyYW1lKGRhdGEpIDoge307XG4gICAgZGF0YS5yb290ID0gY29udGV4dDtcbiAgfVxuICByZXR1cm4gZGF0YTtcbn1cblxuZnVuY3Rpb24gZXhlY3V0ZURlY29yYXRvcnMoZm4sIHByb2csIGNvbnRhaW5lciwgZGVwdGhzLCBkYXRhLCBibG9ja1BhcmFtcykge1xuICBpZiAoZm4uZGVjb3JhdG9yKSB7XG4gICAgbGV0IHByb3BzID0ge307XG4gICAgcHJvZyA9IGZuLmRlY29yYXRvcihwcm9nLCBwcm9wcywgY29udGFpbmVyLCBkZXB0aHMgJiYgZGVwdGhzWzBdLCBkYXRhLCBibG9ja1BhcmFtcywgZGVwdGhzKTtcbiAgICBVdGlscy5leHRlbmQocHJvZywgcHJvcHMpO1xuICB9XG4gIHJldHVybiBwcm9nO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/safe-string.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/safe-string.js new file mode 100644 index 00000000000000..1118c12deac570 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/safe-string.js @@ -0,0 +1,15 @@ +define(['exports', 'module'], function (exports, module) { + // Build out our basic SafeString type + 'use strict'; + + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + module.exports = SafeString; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/handlebars/utils.js b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/utils.js new file mode 100644 index 00000000000000..a6d5692dbef27e --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/handlebars/utils.js @@ -0,0 +1,126 @@ +define(['exports'], function (exports) { + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWF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hY2UoYmFkQ2hhcnMsIGVzY2FwZUNoYXIpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNFbXB0eSh2YWx1ZSkge1xuICBpZiAoIXZhbHVlICYmIHZhbHVlICE9PSAwKSB7XG4gICAgcmV0dXJuIHRydWU7XG4gIH0gZWxzZSBpZiAoaXNBcnJheSh2YWx1ZSkgJiYgdmFsdWUubGVuZ3RoID09PSAwKSB7XG4gICAgcmV0dXJuIHRydWU7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVGcmFtZShvYmplY3QpIHtcbiAgbGV0IGZyYW1lID0gZXh0ZW5kKHt9LCBvYmplY3QpO1xuICBmcmFtZS5fcGFyZW50ID0gb2JqZWN0O1xuICByZXR1cm4gZnJhbWU7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBibG9ja1BhcmFtcyhwYXJhbXMsIGlkcykge1xuICBwYXJhbXMucGF0aCA9IGlkcztcbiAgcmV0dXJuIHBhcmFtcztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGFwcGVuZENvbnRleHRQYXRoKGNvbnRleHRQYXRoLCBpZCkge1xuICByZXR1cm4gKGNvbnRleHRQYXRoID8gY29udGV4dFBhdGggKyAnLicgOiAnJykgKyBpZDtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/amd/precompiler.js b/tools/eslint/node_modules/handlebars/dist/amd/precompiler.js new file mode 100644 index 00000000000000..70a80f96b01665 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/amd/precompiler.js @@ -0,0 +1,292 @@ +define(['exports', 'async', 'fs', './handlebars', 'path', 'source-map', 'uglify-js'], function (exports, _async, _fs, _handlebars, _path, _sourceMap, _uglifyJs) { + /* eslint-disable no-console */ + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Async = _interopRequireDefault(_async); + + var _fs2 = _interopRequireDefault(_fs); + + var _uglify = _interopRequireDefault(_uglifyJs); + + module.exports.loadTemplates = function (opts, callback) { + loadStrings(opts, function (err, strings) { + if (err) { + callback(err); + } else { + loadFiles(opts, function (err, files) { + if (err) { + callback(err); + } else { + opts.templates = strings.concat(files); + callback(undefined, opts); + } + }); + } + }); + }; + + function loadStrings(opts, callback) { + var strings = arrayCast(opts.string), + names = arrayCast(opts.name); + + if (names.length !== strings.length && strings.length > 1) { + return callback(new _handlebars.Exception('Number of names did not match the number of string inputs')); + } + + _Async['default'].map(strings, function (string, callback) { + if (string !== '-') { + callback(undefined, string); + } else { + (function () { + // Load from stdin + var buffer = ''; + process.stdin.setEncoding('utf8'); + + process.stdin.on('data', function (chunk) { + buffer += chunk; + }); + process.stdin.on('end', function () { + callback(undefined, buffer); + }); + })(); + } + }, function (err, strings) { + strings = strings.map(function (string, index) { + return { + name: names[index], + path: names[index], + source: string + }; + }); + callback(err, strings); + }); + } + + function loadFiles(opts, callback) { + // Build file extension pattern + var extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-\[\]]/g, function (arg) { + return '\\' + arg; + }); + extension = new RegExp('\\.' + extension + '$'); + + var ret = [], + queue = (opts.files || []).map(function (template) { + return { template: template, root: opts.root }; + }); + _Async['default'].whilst(function () { + return queue.length; + }, function (callback) { + var _queue$shift = queue.shift(); + + var path = _queue$shift.template; + var root = _queue$shift.root; + + _fs2['default'].stat(path, function (err, stat) { + if (err) { + return callback(new _handlebars.Exception('Unable to open template file "' + path + '"')); + } + + if (stat.isDirectory()) { + opts.hasDirectory = true; + + _fs2['default'].readdir(path, function (err, children) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + children.forEach(function (file) { + var childPath = path + '/' + file; + + if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) { + queue.push({ template: childPath, root: root || path }); + } + }); + + callback(); + }); + } else { + _fs2['default'].readFile(path, 'utf8', function (err, data) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + + if (opts.bom && data.indexOf('') === 0) { + data = data.substring(1); + } + + // Clean the template name + var name = path; + if (!root) { + name = _path.basename(name); + } else if (name.indexOf(root) === 0) { + name = name.substring(root.length + 1); + } + name = name.replace(extension, ''); + + ret.push({ + path: path, + name: name, + source: data + }); + + callback(); + }); + } + }); + }, function (err) { + if (err) { + callback(err); + } else { + callback(undefined, ret); + } + }); + } + + module.exports.cli = function (opts) { + if (opts.version) { + console.log(_handlebars.VERSION); + return; + } + + if (!opts.templates.length && !opts.hasDirectory) { + throw new _handlebars.Exception('Must define at least one template or directory.'); + } + + if (opts.simple && opts.min) { + throw new _handlebars.Exception('Unable to minimize simple output'); + } + + var multiple = opts.templates.length !== 1 || opts.hasDirectory; + if (opts.simple && multiple) { + throw new _handlebars.Exception('Unable to output multiple templates in simple mode'); + } + + // Force simple mode if we have only one template and it's unnamed. + if (!opts.amd && !opts.commonjs && opts.templates.length === 1 && !opts.templates[0].name) { + opts.simple = true; + } + + // Convert the known list into a hash + var known = {}; + if (opts.known && !Array.isArray(opts.known)) { + opts.known = [opts.known]; + } + if (opts.known) { + for (var i = 0, len = opts.known.length; i < len; i++) { + known[opts.known[i]] = true; + } + } + + var objectName = opts.partial ? 'Handlebars.partials' : 'templates'; + + var output = new _sourceMap.SourceNode(); + if (!opts.simple) { + if (opts.amd) { + output.add('define([\'' + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); + } else if (opts.commonjs) { + output.add('var Handlebars = require("' + opts.commonjs + '");'); + } else { + output.add('(function() {\n'); + } + output.add(' var template = Handlebars.template, templates = '); + if (opts.namespace) { + output.add(opts.namespace); + output.add(' = '); + output.add(opts.namespace); + output.add(' || '); + } + output.add('{};\n'); + } + + opts.templates.forEach(function (template) { + var options = { + knownHelpers: known, + knownHelpersOnly: opts.o + }; + + if (opts.map) { + options.srcName = template.path; + } + if (opts.data) { + options.data = true; + } + + var precompiled = _handlebars.precompile(template.source, options); + + // If we are generating a source map, we have to reconstruct the SourceNode object + if (opts.map) { + var consumer = new _sourceMap.SourceMapConsumer(precompiled.map); + precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); + } + + if (opts.simple) { + output.add([precompiled, '\n']); + } else { + if (!template.name) { + throw new _handlebars.Exception('Name missing for template'); + } + + if (opts.amd && !multiple) { + output.add('return '); + } + output.add([objectName, '[\'', template.name, '\'] = template(', precompiled, ');\n']); + } + }); + + // Output the content + if (!opts.simple) { + if (opts.amd) { + if (multiple) { + output.add(['return ', objectName, ';\n']); + } + output.add('});'); + } else if (!opts.commonjs) { + output.add('})();'); + } + } + + if (opts.map) { + output.add('\n//# sourceMappingURL=' + opts.map + '\n'); + } + + output = output.toStringWithSourceMap(); + output.map = output.map + ''; + + if (opts.min) { + output = _uglify['default'].minify(output.code, { + fromString: true, + + outSourceMap: opts.map, + inSourceMap: JSON.parse(output.map) + }); + if (opts.map) { + output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; + } + } + + if (opts.map) { + _fs2['default'].writeFileSync(opts.map, output.map, 'utf8'); + } + output = output.code; + + if (opts.output) { + _fs2['default'].writeFileSync(opts.output, output, 'utf8'); + } else { + console.log(output); + } + }; + + function arrayCast(value) { + value = value != null ? value : []; + if (!Array.isArray(value)) { + value = [value]; + } + return value; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wcmVjb21waWxlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQVFBLFFBQU0sQ0FBQyxPQUFPLENBQUMsYUFBYSxHQUFHLFVBQVMsSUFBSSxFQUFFLFFBQVEsRUFBRTtBQUN0RCxlQUFXLENBQUMsSUFBSSxFQUFFLFVBQVMsR0FBRyxFQUFFLE9BQU8sRUFBRTtBQUN2QyxVQUFJLEdBQUcsRUFBRT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XRoID0gcGF0aCArICcvJyArIGZpbGU7XG5cbiAgICAgICAgICAgIGlmIChleHRlbnNpb24udGVzdChjaGlsZFBhdGgpIHx8IGZzLnN0YXRTeW5jKGNoaWxkUGF0aCkuaXNEaXJlY3RvcnkoKSkge1xuICAgICAgICAgICAgICBxdWV1ZS5wdXNoKHt0ZW1wbGF0ZTogY2hpbGRQYXRoLCByb290OiByb290IHx8IHBhdGh9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZnMucmVhZEZpbGUocGF0aCwgJ3V0ZjgnLCBmdW5jdGlvbihlcnIsIGRhdGEpIHtcbiAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCA6IFJhY2UgY29uZGl0aW9uIHRoYXQgYmVpbmcgdG9vIGxhenkgdG8gdGVzdCAqL1xuICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChvcHRzLmJvbSAmJiBkYXRhLmluZGV4T2YoJ1xcdUZFRkYnKSA9PT0gMCkge1xuICAgICAgICAgICAgZGF0YSA9IGRhdGEuc3Vic3RyaW5nKDEpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIENsZWFuIHRoZSB0ZW1wbGF0ZSBuYW1lXG4gICAgICAgICAgbGV0IG5hbWUgPSBwYXRoO1xuICAgICAgICAgIGlmICghcm9vdCkge1xuICAgICAgICAgICAgbmFtZSA9IGJhc2VuYW1lKG5hbWUpO1xuICAgICAgICAgIH0gZWxzZSBpZiAobmFtZS5pbmRleE9mKHJvb3QpID09PSAwKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZS5zdWJzdHJpbmcocm9vdC5sZW5ndGggKyAxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgbm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yB2YWx1ZSA6IFtdO1xuICBpZiAoIUFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgdmFsdWUgPSBbdmFsdWVdO1xuICB9XG4gIHJldHVybiB2YWx1ZTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.js new file mode 100644 index 00000000000000..6bb5415760dc73 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.js @@ -0,0 +1,65 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _handlebarsRuntime = require('./handlebars.runtime'); + +var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + +// Compiler imports + +var _handlebarsCompilerAst = require('./handlebars/compiler/ast'); + +var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + +var _handlebarsCompilerBase = require('./handlebars/compiler/base'); + +var _handlebarsCompilerCompiler = require('./handlebars/compiler/compiler'); + +var _handlebarsCompilerJavascriptCompiler = require('./handlebars/compiler/javascript-compiler'); + +var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + +var _handlebarsCompilerVisitor = require('./handlebars/compiler/visitor'); + +var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + +var _handlebarsNoConflict = require('./handlebars/no-conflict'); + +var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + +var _create = _handlebarsRuntime2['default'].create; +function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _handlebarsCompilerAst2['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + + return hb; +} + +var inst = create(); +inst.create = create; + +_handlebarsNoConflict2['default'](inst); + +inst.Visitor = _handlebarsCompilerVisitor2['default']; + +inst['default'] = inst; + +exports['default'] = inst; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7aUNBQW9CLHNCQUFzQjs7Ozs7O3FDQUcxQiwyQkFBMkI7Ozs7c0NBQ0gsNEJBQTRCOzswQ0FDdEIsZ0NBQWdDOztvREFDL0MsMkNBQTJDOzs7O3lDQUN0RCwrQkFBK0I7Ozs7b0NBRTVCLDBCQUEwQjs7OztBQUVqRCxJQUFJLE9BQU8sR0FBRywrQkFBUSxNQUFNLENBQUM7QUFDN0IsU0FBUyxNQUFNLEdBQUc7QUFDaEIsTUFBSSxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUM7O0FBRW5CLElBQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3BDLFdBQU8sb0NBQVEsS0FBSyxFQUFFLE9BQU8sRUFBRSxFQUFFLENBQUMsQ0FBQztHQUNwQyxDQUFDO0FBQ0YsSUFBRSxDQUFDLFVBQVUsR0FBRyxVQUFTLEtBQUssRUFBRSxPQUFPLEVBQUU7QUFDdkMsV0FBTyx1Q0FBVyxLQUFLLEVBQUUsT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFDO0dBQ3ZDLENBQUM7O0FBRUYsSUFBRSxDQUFDLEdBQUcscUNBQU0sQ0FBQztBQUNiLElBQUUsQ0FBQyxRQUFRLHVDQUFXLENBQUM7QUFDdkIsSUFBRSxDQUFDLGtCQUFrQixvREFBcUIsQ0FBQztBQUMzQyxJQUFFLENB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Y3JlYXRlKCkge1xuICBsZXQgaGIgPSBfY3JlYXRlKCk7XG5cbiAgaGIuY29tcGlsZSA9IGZ1bmN0aW9uKGlucHV0LCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGNvbXBpbGUoaW5wdXQsIG9wdGlvbnMsIGhiKTtcbiAgfTtcbiAgaGIucHJlY29tcGlsZSA9IGZ1bmN0aW9uKGlucHV0LCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIHByZWNvbXBpbGUoaW5wdXQsIG9wdGlvbnMsIGhiKTtcbiAgfTtcblxuICBoYi5BU1QgPSBBU1Q7XG4gIGhiLkNvbXBpbGVyID0gQ29tcGlsZXI7XG4gIGhiLkphdmFTY3JpcHRDb21waWxlciA9IEphdmFTY3JpcHRDb21waWxlcjtcbiAgaGIuUGFyc2VyID0gUGFyc2VyO1xuICBoYi5wYXJzZSA9IHBhcnNlO1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0LlZpc2l0b3IgPSBWaXNpdG9yO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.runtime.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.runtime.js new file mode 100644 index 00000000000000..37550bcbf89094 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars.runtime.js @@ -0,0 +1,66 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _handlebarsBase = require('./handlebars/base'); + +var base = _interopRequireWildcard(_handlebarsBase); + +// Each of these augment the Handlebars object. No need to setup here. +// (This is done to easily share code between commonjs and browse envs) + +var _handlebarsSafeString = require('./handlebars/safe-string'); + +var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + +var _handlebarsException = require('./handlebars/exception'); + +var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + +var _handlebarsUtils = require('./handlebars/utils'); + +var Utils = _interopRequireWildcard(_handlebarsUtils); + +var _handlebarsRuntime = require('./handlebars/runtime'); + +var runtime = _interopRequireWildcard(_handlebarsRuntime); + +var _handlebarsNoConflict = require('./handlebars/no-conflict'); + +var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + +// For compatibility and usage outside of module systems, make the Handlebars object a namespace +function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; +} + +var inst = create(); +inst.create = create; + +_handlebarsNoConflict2['default'](inst); + +inst['default'] = inst; + +exports['default'] = inst; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OEJBQXNCLG1CQUFtQjs7SUFBN0IsSUFBSTs7Ozs7b0NBSU8sMEJBQTBCOzs7O21DQUMzQix3QkFBd0I7Ozs7K0JBQ3ZCLG9CQUFvQjs7SUFBL0IsS0FBSzs7aUNBQ1Esc0JBQXNCOztJQUFuQyxPQUFPOztvQ0FFSSwwQkFBMEI7Ozs7O0FBR2pELFNBQVMsTUFB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QoaW5zdCk7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/base.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/base.js new file mode 100644 index 00000000000000..d1cfc561d9c47a --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/base.js @@ -0,0 +1,104 @@ +'use strict'; + +exports.__esModule = true; +exports.HandlebarsEnvironment = HandlebarsEnvironment; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('./utils'); + +var _exception = require('./exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _helpers = require('./helpers'); + +var _decorators = require('./decorators'); + +var _logger = require('./logger'); + +var _logger2 = _interopRequireDefault(_logger); + +var VERSION = '4.0.5'; +exports.VERSION = VERSION; +var COMPILER_REVISION = 7; + +exports.COMPILER_REVISION = COMPILER_REVISION; +var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' +}; + +exports.REVISION_CHANGES = REVISION_CHANGES; +var objectType = '[object Object]'; + +function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); +} + +HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } +}; + +var log = _logger2['default'].log; + +exports.log = log; +exports.createFrame = _utils.createFrame; +exports.logger = _logger2['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7cUJBQTRDLFNBQVM7O3lCQUMvQixhQUFhOzs7O3VCQUNFLFdBQVc7OzBCQUNSLGNBQWM7O3NCQUNuQyxVQUFVOzs7O0FBRXRCLElBQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsSUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7OztBQUU1QixJQUFNLGdCQUFnQixHQUFHO0FBQzlCLEdBQUMsRUFBRSxhQUFhO0FBQ2hCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxlQUFlO0FBQ2xCLEdBQUMsRUFBRSxVQUFVO0FBQ2IsR0FBQyxFQUFFLGtCQUFrQjtBQUNyQixHQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEdBQUMsRUFBRSxVQUFVO0NBQ2QsQ0FBQzs7O0FBRUYsSUFBTSxVQUFVLEdBQUcsaUJBQWlCLENBQUM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O1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlclBhcnRpYWw6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICBkZWxldGUgdGhpcy5wYXJ0aWFsc1tuYW1lXTtcbiAgfSxcblxuICByZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSwgZm4pIHtcbiAgICBpZiAodG9TdHJpbmcuY2FsbChuYW1lKSA9PT0gb2JqZWN0VHlwZSkge1xuICAgICAgaWYgKGZuKSB7IHRocm93IG5ldyBFeGNlcHRpb24oJ0FyZyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpOyB9XG4gICAgICBleHRlbmQodGhpcy5kZWNvcmF0b3JzLCBuYW1lKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5kZWNvcmF0b3JzW25hbWVdID0gZm47XG4gICAgfVxuICB9LFxuICB1bnJlZ2lzdGVyRGVjb3JhdG9yOiBmdW5jdGlvbihuYW1lKSB7XG4gICAgZGVsZXRlIHRoaXMuZGVjb3JhdG9yc1tuYW1lXTtcbiAgfVxufTtcblxuZXhwb3J0IGxldCBsb2cgPSBsb2dnZXIubG9nO1xuXG5leHBvcnQge2NyZWF0ZUZyYW1lLCBsb2dnZXJ9O1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js new file mode 100644 index 00000000000000..33c65fe8d9f016 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js @@ -0,0 +1,31 @@ +'use strict'; + +exports.__esModule = true; +var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } +}; + +// Must be exported as an object rather than the root of the module as the jison lexer +// must modify the object to operate properly. +exports['default'] = AST; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFJLEdBQUcsR0FBRzs7QUFFUixTQUFPLEVBQUU7Ozs7QUFJUCxvQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsYUFBTyxBQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssZUFBZSxJQUM3QixDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssbUJBQW1CLElBQUksSUFBSSxDQUFDLElBQUksS0FBSyxnQkFBZ0IsQ0FBQSxJQUNuRSxDQUFDLEVBQUUsQUFBQyxJQUFJLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFLLElBQUksQ0FBQyxJQUFJLENBQUEsQUFBQyxBQUFDLENBQUM7S0FDaEU7O0FBRUQsWUFBUSxFQUFFLGtCQUFTLElBQUksRUFBRTtBQUN2QixhQUFPLEFBQUMsYUFBWSxDQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDO1FBQUM7S0FDM0M7Ozs7QUFJRCxZQUFRLEVBQUUsa0JBQVMsSUFBSSxFQUFFO0FBQ3ZCLGFBQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDL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uICAgICAgcmV0dXJuIHBhdGgucGFydHMubGVuZ3RoID09PSAxICYmICFBU1QuaGVscGVycy5zY29wZWRJZChwYXRoKSAmJiAhcGF0aC5kZXB0aDtcbiAgICB9XG4gIH1cbn07XG5cblxuLy8gTXVzdCBiZSBleHBvcnRlZCBhcyBhbiBvYmplY3QgcmF0aGVyIHRoYW4gdGhlIHJvb3Qgb2YgdGhlIG1vZHVsZSBhcyB0aGUgamlzb24gbGV4ZXJcbi8vIG11c3QgbW9kaWZ5IHRoZSBvYmplY3QgdG8gb3BlcmF0ZSBwcm9wZXJseS5cbmV4cG9ydCBkZWZhdWx0IEFTVDtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js new file mode 100644 index 00000000000000..1aef63c3bc59a4 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js @@ -0,0 +1,48 @@ +'use strict'; + +exports.__esModule = true; +exports.parse = parse; +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _parser = require('./parser'); + +var _parser2 = _interopRequireDefault(_parser); + +var _whitespaceControl = require('./whitespace-control'); + +var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + +var _helpers = require('./helpers'); + +var Helpers = _interopRequireWildcard(_helpers); + +var _utils = require('../utils'); + +exports.parser = _parser2['default']; + +var yy = {}; +_utils.extend(yy, Helpers); + +function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var strip = new _whitespaceControl2['default'](options); + return strip.accept(_parser2['default'].parse(input)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O3NCQUFtQixVQUFVOzs7O2lDQUNDLHNCQUFzQjs7Ozt1QkFDM0IsV0FBVzs7SUFBeEIsT0FBTzs7cUJBQ0ksVUFBVTs7UUFFeEIsTUFBTTs7QUFFZixJQUFJLEVBQUUsR0FBRyxFQUFFLENBQUM7QUFDWixjQUFPLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQzs7QUFFYixTQUFTLEtBQUssQ0FBQyxLQUFLLEVBQUUsT0FBTyxFQUFFOztBQUVwQyxNQUFJLEtBQUssQ0FBQyxJQUFJLEtBQUssU0FBUyxFQUFFO0FBQUUsV0FBTyxLQUFLLENBQUM7R0FBRTs7QUFFL0Msc0JBQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQzs7O0FBR2YsSUFBRSxDQUFDLE9BQU8sR0FBRyxVQUFTLE9BQU8sRUFBRTtBQUM3QixXQUFPLElBQUksRUFBRSxDQUFDLGNBQWMsQ0FBQyxPQUFPLElBQUksT0FBTyxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztHQUNuRSxDQUFDOztBQUVGLE1BQUksS0FBSyxHQUFHLG1DQUFzQixPQUFPLENBQUMsQ0FBQztBQUMzQyxTQUFPLEtBQUssQ0FBQyxNQUFNLENBQUMsb0JBQU8sS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7Q0FDMUMiLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBwYXJzZXIgZnJvbSAnLi9wYXJzZXInO1xuaW1wb3J0IFdoaXRlc3BhY2VDb250cm9sIGZyb20gJy4vd2hpdGVzcGFjZS1jb250cm9sJztcbmltcG9ydCAqIGFzIEhlbHBlcnMgZnJvbSAnLi9oZWxwZXJzJztcbmltcG9ydCB7IGV4dGVuZCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IHsgcGFyc2VyIH07XG5cbmxldCB5eSA9IHt9O1xuZXh0ZW5kKHl5LCBIZWxwZXJzKTtcblxuZXhwb3J0IGZ1bmN0aW9uIHBhcnNlKGlucHV0LCBvcHRpb25zKSB7XG4gIC8vIEp1c3QgcmV0dXJuIGlmIGFuIGFscmVhZHktY29tcGlsZWQgQVNUIHdhcyBwYXNzZWQgaW4uXG4gIGlmIChpbnB1dC50eXBlID09PSAnUHJvZ3JhbScpIHsgcmV0dXJuIGlucHV0OyB9XG5cbiAgcGFyc2VyLnl5ID0geXk7XG5cbiAgLy8gQWx0ZXJpbmcgdGhlIHNoYXJlZCBvYmplY3QgaGVyZSwgYnV0IHRoaXMgaXMgb2sgYXMgcGFyc2VyIGlzIGEgc3luYyBvcGVyYXRpb25cbiAgeXkubG9jSW5mbyA9IGZ1bmN0aW9uKGxvY0luZm8pIHtcbiAgICByZXR1cm4gbmV3IHl5LlNvdXJjZUxvY2F0aW9uKG9wdGlvbnMgJiYgb3B0aW9ucy5zcmNOYW1lLCBsb2NJbmZvKTtcbiAgfTtcblxuICBsZXQgc3RyaXAgPSBuZXcgV2hpdGVzcGFjZUNvbnRyb2wob3B0aW9ucyk7XG4gIHJldHVybiBzdHJpcC5hY2NlcHQocGFyc2VyLnBhcnNlKGlucHV0KSk7XG59XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js new file mode 100644 index 00000000000000..b5b3615f93ffdf --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js @@ -0,0 +1,166 @@ +/* global define */ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +var SourceNode = undefined; + +try { + /* istanbul ignore next */ + if (typeof define !== 'function' || !define.amd) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } +} catch (err) {} +/* NOP */ + +/* istanbul ignore if: tested but not covered in istanbul due to dist build */ +if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; +} + +function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; +} + +function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; +} + +CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + var pairs = []; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + var value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } +}; + +exports['default'] = CodeGen; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O3FCQUNzQixVQUFVOztBQUVoQyxJQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLElBQUk7O0FBRUYsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFHL0MsUUFBSSxTQUFTLEdBQUcsT0FBTyxDQUF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gcmV0dXJuIHJldDtcbiAgfSxcblxuXG4gIGdlbmVyYXRlTGlzdDogZnVuY3Rpb24oZW50cmllcykge1xuICAgIGxldCByZXQgPSB0aGlzLmVtcHR5KCk7XG5cbiAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gZW50cmllcy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgaWYgKGkpIHtcbiAgICAgICAgcmV0LmFkZCgnLCcpO1xuICAgICAgfVxuXG4gICAgICByZXQuYWRkKGNhc3RDaHVuayhlbnRyaWVzW2ldLCB0aGlzKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJldDtcbiAgfSxcblxuICBnZW5lcmF0ZUFycmF5OiBmdW5jdGlvbihlbnRyaWVzKSB7XG4gICAgbGV0IHJldCA9IHRoaXMuZ2VuZXJhdGVMaXN0KGVudHJpZXMpO1xuICAgIHJldC5wcmVwZW5kKCdbJyk7XG4gICAgcmV0LmFkZCgnXScpO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29kZUdlbjtcblxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js new file mode 100644 index 00000000000000..65b45855a6b17d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js @@ -0,0 +1,572 @@ +/* eslint-disable new-cap */ + +'use strict'; + +exports.__esModule = true; +exports.Compiler = Compiler; +exports.precompile = precompile; +exports.compile = compile; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _utils = require('../utils'); + +var _ast = require('./ast'); + +var _ast2 = _interopRequireDefault(_ast); + +var slice = [].slice; + +function Compiler() {} + +// the foundHelper register will disambiguate helper lookup from finding a +// function in a context. This is necessary for mustache compatibility, which +// requires that context functions in blocks are evaluated by blockHelperMissing, +// and then proceed as if the resulting value was provided to blockHelperMissing. + +Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + var knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (var _name in knownHelpers) { + /* istanbul ignore else */ + if (_name in knownHelpers) { + options.knownHelpers[_name] = knownHelpers[_name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _exception2['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _ast2['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name2 = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[_name2]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } +}; + +function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); +} + +function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; +} + +function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } +} + +function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozt5QkFFc0IsY0FBYzs7OztxQkFDTCxVQUFVOzttQkFDekIsT0FBTzs7OztBQUV2QixJQUFNLEtBQUssR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDOztBQUVoQixTQUFTLFFBQV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BhbmQgMCBsaXRlcmFsIHZhbHVlcyBwbGF5IG5pY2VseSB3aXRoIHRoZSByZXN0XG4gICAgLy8gb2YgdGhlIHN5c3RlbS5cbiAgICBzZXhwci5wYXRoID0ge1xuICAgICAgdHlwZTogJ1BhdGhFeHByZXNzaW9uJyxcbiAgICAgIGRhdGE6IGZhbHNlLFxuICAgICAgZGVwdGg6IDAsXG4gICAgICBwYXJ0czogW2xpdGVyYWwub3JpZ2luYWwgKyAnJ10sXG4gICAgICBvcmlnaW5hbDogbGl0ZXJhbC5vcmlnaW5hbCArICcnLFxuICAgICAgbG9jOiBsaXRlcmFsLmxvY1xuICAgIH07XG4gIH1cbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js new file mode 100644 index 00000000000000..0f5cbf258bf43a --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js @@ -0,0 +1,230 @@ +'use strict'; + +exports.__esModule = true; +exports.SourceLocation = SourceLocation; +exports.id = id; +exports.stripFlags = stripFlags; +exports.stripComment = stripComment; +exports.preparePath = preparePath; +exports.prepareMustache = prepareMustache; +exports.prepareRawBlock = prepareRawBlock; +exports.prepareBlock = prepareBlock; +exports.prepareProgram = prepareProgram; +exports.preparePartialBlock = preparePartialBlock; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); + } +} + +function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; +} + +function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } +} + +function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; +} + +function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); +} + +function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; +} + +function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; +} + +function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; +} + +function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} + +function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; +} + +function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7eUJBQXNCLGNBQWM7Ozs7QUFFcEMsU0FBUyxhQUFhLENBQUMsSUFBSSxFQUFFLEtBQUssRUFBRTtBQUNsQyxPQUFLLEdBQUcsS0FBSyxDQUFDLElBQUksR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDLFFBQVEsR0FBRyxLQUFLLENBQUM7O0FB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aXJzdExvYy5zdGFydC5jb2x1bW5cbiAgICAgICAgfSxcbiAgICAgICAgZW5kOiB7XG4gICAgICAgICAgbGluZTogbGFzdExvYy5lbmQubGluZSxcbiAgICAgICAgICBjb2x1bW46IGxhc3RMb2MuZW5kLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgdHlwZTogJ1Byb2dyYW0nLFxuICAgIGJvZHk6IHN0YXRlbWVudHMsXG4gICAgc3RyaXA6IHt9LFxuICAgIGxvYzogbG9jXG4gIH07XG59XG5cblxuZXhwb3J0IGZ1bmN0aW9uIHByZXBhcmVQYXJ0aWFsQmxvY2sob3BlbiwgcHJvZ3JhbSwgY2xvc2UsIGxvY0luZm8pIHtcbiAgdmFsaWRhdGVDbG9zZShvcGVuLCBjbG9zZSk7XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUGFydGlhbEJsb2NrU3RhdGVtZW50JyxcbiAgICBuYW1lOiBvcGVuLnBhdGgsXG4gICAgcGFyYW1zOiBvcGVuLnBhcmFtcyxcbiAgICBoYXNoOiBvcGVuLmhhc2gsXG4gICAgcHJvZ3JhbSxcbiAgICBvcGVuU3RyaXA6IG9wZW4uc3RyaXAsXG4gICAgY2xvc2VTdHJpcDogY2xvc2UgJiYgY2xvc2Uuc3RyaXAsXG4gICAgbG9jOiB0aGlzLmxvY0luZm8obG9jSW5mbylcbiAgfTtcbn1cblxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js new file mode 100644 index 00000000000000..2a4581ee6eb714 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js @@ -0,0 +1,1126 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _base = require('../base'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _utils = require('../utils'); + +var _codeGen = require('./code-gen'); + +var _codeGen2 = _interopRequireDefault(_codeGen); + +function Literal(value) { + this.value = value; +} + +function JavaScriptCompiler() {} + +JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _codeGen2['default'](this.options.srcName); + this.decorators = new _codeGen2['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + for (var alias in this.aliases) { + // eslint-disable-line guard-for-in + var node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + var lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _exception2['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _exception2['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } +}; + +(function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } +})(); + +JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); +}; + +function strictLookup(requireTerminal, compiler, parts, type) { + var stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } +} + +exports['default'] = JavaScriptCompiler; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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XlthLXpBLVpfJF1bMC05YS16QS1aXyRdKiQvKS50ZXN0KG5hbWUpO1xufTtcblxuZnVuY3Rpb24gc3RyaWN0TG9va3VwKHJlcXVpcmVUZXJtaW5hbCwgY29tcGlsZXIsIHBhcnRzLCB0eXBlKSB7XG4gIGxldCBzdGFjayA9IGNvbXBpbGVyLnBvcFN0YWNrKCksXG4gICAgICBpID0gMCxcbiAgICAgIGxlbiA9IHBhcnRzLmxlbmd0aDtcbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIGxlbi0tO1xuICB9XG5cbiAgZm9yICg7IGkgPCBsZW47IGkrKykge1xuICAgIHN0YWNrID0gY29tcGlsZXIubmFtZUxvb2t1cChzdGFjaywgcGFydHNbaV0sIHR5cGUpO1xuICB9XG5cbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIHJldHVybiBbY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksICcoJywgc3RhY2ssICcsICcsIGNvbXBpbGVyLnF1b3RlZFN0cmluZyhwYXJ0c1tpXSksICcpJ107XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js new file mode 100644 index 00000000000000..cef854c3ef494d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js @@ -0,0 +1,738 @@ +/* istanbul ignore next */ +/* Jison generated parser */ +"use strict"; + +var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ + /**/) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = [$$[$0]]; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START + /**/) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); +})();exports.__esModule = true; +exports['default'] = handlebars; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUEsSUFBSSxVQUFVLEdBQUcsQ0FBQyxZQUFVO0FBQzVCLFFBQUksTUFBTSxHQUFHLEVBQUMsS0FBSyxFQUFFLFNBQVMsS0FBSyxHQUFHLEVBQUc7QUFDekMsVUFBRSxFQUFFLEVBQUU7QUFDTixnQkFBUSxFQUFFLEVBQUMsT0FBTyxFQUFDLENBQUMsRUFBQyxNQUFNLEVBQUMsQ0FBQyxFQUFDLFNBQVMsRUFBQyxDQUFDLEVBQUMsS0FBSyxFQUFDLENBQUMsRUFBQyxxQkFBcUIsRUFBQyxDQUFDLEVBQUMsV0FBVyxFQUFDLENBQUMsRUFBQyxVQUFVLEVBQUMsQ0FBQyxFQUFDLE9BQU8sRUFBQyxDQUFDLEVBQUMsVUFBVSxFQUFDLEVBQUUsRU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ICAgICAgICAgICAgICAgZm9yIChwIGluIHRhYmxlW3N0YXRlXSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudGVybWluYWxzX1twXSAmJiBwID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0ZWQucHVzaChcIidcIiArIHRoaXMudGVybWluYWxzX1twXSArIFwiJ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmxleGVyLnNob3dQb3NpdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBlcnJTdHIgPSBcIlBhcnNlIGVycm9yIG9uIGxpbmUgXCIgKyAoeXlsaW5lbm8gKyAxKSArIFwiOlxcblwiICsgdGhpcy5sZXhlci5zaG93UG9zaXRpb24oKSArIFwiXFxuRXhwZWN0aW5nIFwiICsgZXhwZWN0ZWQuam9pbihcIiwgXCIpICsgXCIsIGdvdCAnXCIgKyAodGhpcy50ZXJtaW5hbHNfW3N5bWJvbF0gfHwgc3ltYm9sKSArIFwiJ1wiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVyclN0ciA9IFwiUGFyc2UgZXJyb3Igb24gbGluZSBcIiArICh5eWxpbmVubyArIDEpICsgXCI6IFVuZXhwZWN0ZWQgXCIgKyAoc3ltYm9sID09IDE/XCJlbmQgb2YgaW5wdXRcIjpcIidcIiArICh0aGlzLnRlcm1pbmFsc19bc3ltYm9sXSB8fCBzeW1ib2wpICsgXCInXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnBhcnNlRXJyb3IoZXJyU3RyLCB7dGV4dDogdGhpcy5sZXhlci5tYXRjaCwgdG9rZW46IHRoaXMudGVybWluYWxzX1tzeW1ib2xdIHx8IHN5bWJvbCwgbGluZTogdGhpcy5sZXhlci55eWxpbmVubywgbG9jOiB5eWxvYywgZXhwZWN0ZWQ6IGV4cGVjdGVkfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFjdGlvblswXSBpbnN0YW5jZW9mIEFycmF5ICYmIGFjdGlvbi5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJQYXJzZSBFcnJvcjogbXVsdGlwbGUgYWN0aW9ucyBwb3NzaWJsZSBhdCBzdGF0ZTogXCIgKyBzdGF0ZSArIFwiLCB0b2tlbjogXCIgKyBzeW1ib2wpO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoYWN0aW9uWzBdKSB7XG4gICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIHN0YWNrLnB1c2goc3ltYm9sKTtcbiAgICAgICAgICAgIHZzdGFjay5wdXNoKHRoaXMubGV4ZXIueXl0ZXh0KTtcbiAgICAgICAgICAgIGxzdGFjay5wdXNoKHRoaXMubGV4ZXIueXlsbG9jKTtcbiAgICAgICAgICAgIHN0YWNrLnB1c2goYWN0aW9uWzFdKTtcbiAgICAgICAgICAgIHN5bWJvbCA9IG51bGw7XG4gICAgICAgICAgICBpZiAoIXByZUVycm9yU3ltYm9sKSB7XG4gICAgICAgICAgICAgICAgeXlsZW5nID0gdGhpcy5sZXhlci55eWxlbmc7XG4gICAgICAgICAgICAgICAgeXl0ZXh0ID0gdGhpcy5sZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgeXlsaW5lbm8gPSB0aGlzLmxleGVyLnl5bGluZW5vO1xuICAgICAgICAgICAgICAgIHl5bG9jID0gdGhpcy5sZXhlci55eWxsb2M7XG4gICAgICAgICAgICAgICAgaWYgKHJlY292ZXJpbmcgPiAwKVxuICAgICAgICAgICAgICAgICAgICByZWNvdmVyaW5nLS07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN5bWJvbCA9IHByZUVycm9yU3ltYm9sO1xuICAgICAgICAgICAgICAgIHByZUVycm9yU3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIH1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ICAgICAgIHZzdGFjayA9IHZzdGFjay5zbGljZSgwLCAtMSAqIGxlbik7XG4gICAgICAgICAgICAgICAgbHN0YWNrID0gbHN0YWNrLnNsaWNlKDAsIC0xICogbGVuKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHN0YWNrLnB1c2godGhpcy5wcm9kdWN0aW9uc19bYWN0aW9uWzFdXVswXSk7XG4gICAgICAgICAgICB2c3RhY2sucHVzaCh5eXZhbC4kKTtcbiAgICAgICAgICAgIGxzdGFjay5wdXNoKHl5dmFsLl8kKTtcbiAgICAgICAgICAgIG5ld1N0YXRlID0gdGFibGVbc3RhY2tbc3RhY2subGVuZ3RoIC0gMl1dW3N0YWNrW3N0YWNrLmxlbmd0aCAtIDFdXTtcbiAgICAgICAgICAgIHN0YWNrLnB1c2gobmV3U3RhdGUpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xufVxufTtcbi8qIEppc29uIGdlbmVyYXRlZCBsZXhlciAqL1xudmFyIGxleGVyID0gKGZ1bmN0aW9uKCl7XG52YXIgbGV4ZXIgPSAoe0VPRjoxLFxucGFyc2VFcnJvcjpmdW5jdGlvbiBwYXJzZUVycm9yKHN0ciwgaGFzaCkge1xuICAgICAgICBpZiAodGhpcy55eS5wYXJzZXIpIHtcbiAgICAgICAgICAgIHRoaXMueXkucGFyc2VyLnBhcnNlRXJyb3Ioc3RyLCBoYXNoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihzdHIpO1xuICAgICAgICB9XG4gICAgfSxcbnNldElucHV0OmZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICB0aGlzLl9pbnB1dCA9IGlucHV0O1xuICAgICAgICB0aGlzLl9tb3JlID0gdGhpcy5fbGVzcyA9IHRoaXMuZG9uZSA9IGZh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5ndGgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAobmV4dC5zdWJzdHIoMCwyMCkrKG5leHQubGVuZ3RoID4gMjAgPyAnLi4uJzonJykpLnJlcGxhY2UoL1xcbi9nLCBcIlwiKTtcbiAgICB9LFxuc2hvd1Bvc2l0aW9uOmZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHByZSA9IHRoaXMucGFzdElucHV0KCk7XG4gICAgICAgIHZhciBjID0gbmV3IEFycmF5KHByZS5sZW5ndGggKyAxKS5qb2luKFwiLVwiKTtcbiAgICAgICAgcmV0dXJuIHByZSArIHRoaXMudXBjb21pbmdJbnB1dCgpICsgXCJcXG5cIiArIGMrXCJeXCI7XG4gICAgfSxcbm5leHQ6ZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCF0aGlzLl9pbnB1dCkgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgICB2YXIgdG9rZW4sXG4gICAgICAgICAgICBtYXRjaCxcbiAgICAgICAgICAgIHRlbXBNYXRjaCxcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgY29sLFxuICAgICAgICAgICAgbGluZXM7XG4gICAgICAgIGlmICghdGhpcy5fbW9yZSkge1xuICAgICAgICAgICAgdGhpcy55eXRleHQgPSAnJztcbiAgICAgICAgICAgIHRoaXMubWF0Y2ggPSAnJztcbiAgICAgICAgfVxuICAgICAgICB2YXIgcnVsZXMgPSB0aGlzLl9jdXJyZW50UnVsZXMoKTtcbiAgICAgICAgZm9yICh2YXIgaT0wO2kgPCBydWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdGVtcE1hdGNoID0gdGhpcy5faW5wdXQubWF0Y2godGhpcy5ydWxlc1tydWxlc1tpXV0pO1xuICAgICAgICAgICAgaWYgKHRlbXBNYXRjaCAmJiAoIW1hdGNoIHx8IHRlbXBNYXRjaFswXS5sZW5ndGggPiBtYXRjaFswXS5sZW5ndGgpKSB7XG4gICAgICAgICAgICAgICAgbWF0Y2ggPSB0ZW1wTWF0Y2g7XG4gICAgICAgICAgICAgICAgaW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5vcHRpb25zLmZsZXgpIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgbGluZXMgPSBtYXRjaFswXS5tYXRjaCgvKD86XFxyXFxuP3xcXG4pLiovZyk7XG4gICAgICAgICAgICBpZiAobGluZXMpIHRoaXMueXlsaW5lbm8gKz0gbGluZXMubGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy55eWxsb2MgPSB7Zmlyc3RfbGluZTogdGhpcy55eWxsb2MubGFzdF9saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9saW5lOiB0aGlzLnl5bGluZW5vKzEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdF9jb2x1bW46IHRoaXMueXlsbG9jLmxhc3RfY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9jb2x1bW46IGxpbmVzID8gbGluZXNbbGluZXMubGVuZ3RoLTFdLmxlbmd0aC1saW5lc1tsaW5lcy5sZW5ndGgtMV0ubWF0Y2goL1xccj9cXG4/LylbMF0ubGVuZ3RoIDogdGhpcy55eWxsb2MubGFzdF9jb2x1bW4gKyBtYXRjaFswXS5sZW5ndGh9O1xuICAgICAgICAgICAgdGhpcy55eXRleHQgKz0gbWF0Y2hbMF07XG4gICAgICAgICAgICB0aGlzLm1hdGNoICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgdGhpcy5tYXRjaGVzID0gbWF0Y2g7XG4gICAgICAgICAgICB0aGlzLnl5bGVuZyA9IHRoaXMueXl0ZXh0Lmxlbmd0aDtcbiAgICAgICAgICAgIGlmICh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ID0geXlfLnl5dGV4dC5zdWJzdHIoc3RhcnQsIHl5Xy55eWxlbmctZW5kKTtcbn1cblxuXG52YXIgWVlTVEFURT1ZWV9TVEFSVFxuc3dpdGNoKCRhdm9pZGluZ19uYW1lX2NvbGxpc2lvbnMpIHtcbmNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeXlfLnl5dGV4dC5zbGljZSgtMikgPT09IFwiXFxcXFxcXFxcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcIm11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYoeXlfLnl5dGV4dC5zbGljZSgtMSkgPT09IFwiXFxcXFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaXAoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwiZW11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmVnaW4oXCJtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih5eV8ueXl0ZXh0KSByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAxOnJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDM6dGhpcy5iZWdpbigncmF3Jyk7IHJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucG9wU3RhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTaG91bGQgYmUgdXNpbmcgYHRoaXMudG9wU3RhdGUoKWAgYmVsb3csIGJ1dCBpdCBjdXJyZW50bHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm5zIHRoZSBzZWNvbmQgdG9wIGluc3RlYWQgb2YgdGhlIGZpcnN0IHRvcC4gT3BlbmVkIGFuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXNzdWUgYWJvdXQgaXQgYXQgaHR0cHM6Ly9naXRodWIuY29tL3phYWNoL2ppc29uL2lzc3Vlcy8yOTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSA9PT0gJ3JhdycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeXlfLnl5dGV4dCA9IHl5Xy55eXRleHQuc3Vic3RyKDUsIHl5Xy55eWxlbmctOSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ0VORF9SQVdfQkxPQ0snO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDU6IHJldHVybiAxNTsgXG5icmVhaztcbmNhc2UgNjpcbi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lci5ydWxlcyA9IFsvXig/OlteXFx4MDBdKj8oPz0oXFx7XFx7KSkpLywvXig/OlteXFx4MDBdKykvLC9eKD86W15cXHgwMF17Mix9Pyg/PShcXHtcXHt8XFxcXFxce1xce3xcXFxcXFxcXFxce1xce3wkKSkpLywvXig/Olxce1xce1xce1xceyg/PVteXFwvXSkpLywvXig/Olxce1xce1xce1xce1xcL1teXFxzIVwiIyUtLFxcLlxcLzstPkBcXFstXFxeYFxcey1+XSsoPz1bPX1cXHNcXC8uXSlcXH1cXH1cXH1cXH0pLywvXig/OlteXFx4MDBdKj8oPz0oXFx7XFx7XFx7XFx7KSkpLywvXig/OltcXHNcXFNdKj8tLSh+KT9cXH1cXH0pLywvXig/OlxcKCkvLC9eKD86XFwpKS8sL14oPzpcXHtcXHtcXHtcXHspLywvXig/OlxcfVxcfVxcfVxcfSkvLC9eKD86XFx7XFx7KH4pPz4pLywvXig/Olxce1xceyh+KT8jPikvLC9eKD86XFx7XFx7KH4pPyNcXCo/KS8sL14oPzpcXHtcXHsofik/XFwvKS8sL14oPzpcXHtcXHsofik/XFxeXFxzKih+KT9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXHMqZWxzZVxccyoofik/XFx9XFx9KS8sL14oPzpcXHtcXHsofik/XFxeKS8sL14oPzpcXHtcXHsofik/XFxzKmVsc2VcXGIpLywvXig/Olxce1xceyh+KT9cXHspLywvXig/Olxce1xceyh+KT8mKS8sL14oPzpcXHtcXHsofik/IS0tKS8sL14oPzpcXHtcXHsofik/IVtcXHNcXFNdKj9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXCo/KS8sL14oPzo9KS8sL14oPzpcXC5cXC4pLywvXig/OlxcLig/PShbPX59XFxzXFwvLil8XSkpKS8sL14oPzpbXFwvLl0pLywvXig/OlxccyspLywvXig/OlxcfSh+KT9cXH1cXH0pLywvXig/Oih+KT9cXH1cXH0pLywvXig/OlwiKFxcXFxbXCJdfFteXCJdKSpcIikvLC9eKD86JyhcXFxcWydd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yBQYXJzZXI7XG59KSgpO2V4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5leHBvcnRzWydkZWZhdWx0J10gPSBoYW5kbGViYXJzO1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js new file mode 100644 index 00000000000000..069645da2f4fe7 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js @@ -0,0 +1,186 @@ +/* eslint-disable new-cap */ +'use strict'; + +exports.__esModule = true; +exports.print = print; +exports.PrintVisitor = PrintVisitor; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _visitor = require('./visitor'); + +var _visitor2 = _interopRequireDefault(_visitor); + +function print(ast) { + return new PrintVisitor().accept(ast); +} + +function PrintVisitor() { + this.padding = 0; +} + +PrintVisitor.prototype = new _visitor2['default'](); + +PrintVisitor.prototype.pad = function (string) { + var out = ''; + + for (var i = 0, l = this.padding; i < l; i++) { + out += ' '; + } + + out += string + '\n'; + return out; +}; + +PrintVisitor.prototype.Program = function (program) { + var out = '', + body = program.body, + i = undefined, + l = undefined; + + if (program.blockParams) { + var blockParams = 'BLOCK PARAMS: ['; + for (i = 0, l = program.blockParams.length; i < l; i++) { + blockParams += ' ' + program.blockParams[i]; + } + blockParams += ' ]'; + out += this.pad(blockParams); + } + + for (i = 0, l = body.length; i < l; i++) { + out += this.accept(body[i]); + } + + this.padding--; + + return out; +}; + +PrintVisitor.prototype.MustacheStatement = function (mustache) { + return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); +}; +PrintVisitor.prototype.Decorator = function (mustache) { + return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); +}; + +PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function (block) { + var out = ''; + + out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); + this.padding++; + out += this.pad(this.SubExpression(block)); + if (block.program) { + out += this.pad('PROGRAM:'); + this.padding++; + out += this.accept(block.program); + this.padding--; + } + if (block.inverse) { + if (block.program) { + this.padding++; + } + out += this.pad('{{^}}'); + this.padding++; + out += this.accept(block.inverse); + this.padding--; + if (block.program) { + this.padding--; + } + } + this.padding--; + + return out; +}; + +PrintVisitor.prototype.PartialStatement = function (partial) { + var content = 'PARTIAL:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + return this.pad('{{> ' + content + ' }}'); +}; +PrintVisitor.prototype.PartialBlockStatement = function (partial) { + var content = 'PARTIAL BLOCK:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + + content += ' ' + this.pad('PROGRAM:'); + this.padding++; + content += this.accept(partial.program); + this.padding--; + + return this.pad('{{> ' + content + ' }}'); +}; + +PrintVisitor.prototype.ContentStatement = function (content) { + return this.pad("CONTENT[ '" + content.value + "' ]"); +}; + +PrintVisitor.prototype.CommentStatement = function (comment) { + return this.pad("{{! '" + comment.value + "' }}"); +}; + +PrintVisitor.prototype.SubExpression = function (sexpr) { + var params = sexpr.params, + paramStrings = [], + hash = undefined; + + for (var i = 0, l = params.length; i < l; i++) { + paramStrings.push(this.accept(params[i])); + } + + params = '[' + paramStrings.join(', ') + ']'; + + hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; + + return this.accept(sexpr.path) + ' ' + params + hash; +}; + +PrintVisitor.prototype.PathExpression = function (id) { + var path = id.parts.join('/'); + return (id.data ? '@' : '') + 'PATH:' + path; +}; + +PrintVisitor.prototype.StringLiteral = function (string) { + return '"' + string.value + '"'; +}; + +PrintVisitor.prototype.NumberLiteral = function (number) { + return 'NUMBER{' + number.value + '}'; +}; + +PrintVisitor.prototype.BooleanLiteral = function (bool) { + return 'BOOLEAN{' + bool.value + '}'; +}; + +PrintVisitor.prototype.UndefinedLiteral = function () { + return 'UNDEFINED'; +}; + +PrintVisitor.prototype.NullLiteral = function () { + return 'NULL'; +}; + +PrintVisitor.prototype.Hash = function (hash) { + var pairs = hash.pairs, + joinedPairs = []; + + for (var i = 0, l = pairs.length; i < l; i++) { + joinedPairs.push(this.accept(pairs[i])); + } + + return 'HASH{' + joinedPairs.join(', ') + '}'; +}; +PrintVisitor.prototype.HashPair = function (pair) { + return pair.key + '=' + this.accept(pair.value); +}; +/* eslint-enable new-cap */ +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3ByaW50ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozt1QkFDb0IsV0FBVzs7OztBQUV4QixTQUFTLEtBQUssQ0FBQyxHQUFHLEVBQUU7QUFDekIsU0FBTyxJQUFJLFlBQVksRUFBRSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUN2Qzs7QUFFTSxTQUFTLFlBQVksR0FBRztBQUM3QixNQUFJLENBQUMsT0FBTyxHQUFHLENBQUMsQ0FBQztDQUNsQjs7QUFFRCxZQUFZLENBQUMsU0FBUyxHQUFHLDBCQUFhLENBQUM7O0FBRXZDLFlBQVksQ0FBQyxTQUFTLENBQUMsR0FBRyxHQUFHLFVBQVMsTUFBTSxFQUFFO0FBQzVDLE1BQUksR0FBRyxHQUFHLEVBQUUsQ0FBQzs7QUFFYixPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQzVDLE9BQUcsSUFBSSxJQUFJLENBQUM7R0FDYjs7QUFFRCxLQUFHLElB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XG5QcmludFZpc2l0b3IucHJvdG90eXBlLk51bWJlckxpdGVyYWwgPSBmdW5jdGlvbihudW1iZXIpIHtcbiAgcmV0dXJuICdOVU1CRVJ7JyArIG51bWJlci52YWx1ZSArICd9Jztcbn07XG5cblByaW50VmlzaXRvci5wcm90b3R5cGUuQm9vbGVhbkxpdGVyYWwgPSBmdW5jdGlvbihib29sKSB7XG4gIHJldHVybiAnQk9PTEVBTnsnICsgYm9vbC52YWx1ZSArICd9Jztcbn07XG5cblByaW50VmlzaXRvci5wcm90b3R5cGUuVW5kZWZpbmVkTGl0ZXJhbCA9IGZ1bmN0aW9uKCkge1xuICByZXR1cm4gJ1VOREVGSU5FRCc7XG59O1xuXG5QcmludFZpc2l0b3IucHJvdG90eXBlLk51bGxMaXRlcmFsID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnTlVMTCc7XG59O1xuXG5QcmludFZpc2l0b3IucHJvdG90eXBlLkhhc2ggPSBmdW5jdGlvbihoYXNoKSB7XG4gIGxldCBwYWlycyA9IGhhc2gucGFpcnMsXG4gICAgICBqb2luZWRQYWlycyA9IFtdO1xuXG4gIGZvciAobGV0IGkgPSAwLCBsID0gcGFpcnMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgam9pbmVkUGFpcnMucHVzaCh0aGlzLmFjY2VwdChwYWlyc1tpXSkpO1xuICB9XG5cbiAgcmV0dXJuICdIQVNIeycgKyBqb2luZWRQYWlycy5qb2luKCcsICcpICsgJ30nO1xufTtcblByaW50VmlzaXRvci5wcm90b3R5cGUuSGFzaFBhaXIgPSBmdW5jdGlvbihwYWlyKSB7XG4gIHJldHVybiBwYWlyLmtleSArICc9JyArIHRoaXMuYWNjZXB0KHBhaXIudmFsdWUpO1xufTtcbi8qIGVzbGludC1lbmFibGUgbmV3LWNhcCAqL1xuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js new file mode 100644 index 00000000000000..7814d1e817085b --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js @@ -0,0 +1,140 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +function Visitor() { + this.parents = []; +} + +Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _exception2['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _exception2['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } +}; + +function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); +} +function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); +} +function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); +} + +exports['default'] = Visitor; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3Zpc2l0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztBQUVwQyxTQUFTLE9BQU8sR0FBRztBQUNqQixNQUFJLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztDQUNuQjs7QUFFRCxPQUFPLENBQUMsU0FBUyxHQUFHO0FBQ2xCLGFBQVcsRUFBRSxPQUFPO0FBQ3BCLFVBQVEsRUFBRSxLQUFLOzs7QUFHZixXQUFTLEVBQUUsbUJBQVMsSUFBSSxFQUFFLElBQUksRUFBRTtBQUM5QixRQUFJLEtBQUssR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0FBQ3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GlvbihoYXNoKSB7XG4gICAgdGhpcy5hY2NlcHRBcnJheShoYXNoLnBhaXJzKTtcbiAgfSxcbiAgSGFzaFBhaXI6IGZ1bmN0aW9uKHBhaXIpIHtcbiAgICB0aGlzLmFjY2VwdFJlcXVpcmVkKHBhaXIsICd2YWx1ZScpO1xuICB9XG59O1xuXG5mdW5jdGlvbiB2aXNpdFN1YkV4cHJlc3Npb24obXVzdGFjaGUpIHtcbiAgdGhpcy5hY2NlcHRSZXF1aXJlZChtdXN0YWNoZSwgJ3BhdGgnKTtcbiAgdGhpcy5hY2NlcHRBcnJheShtdXN0YWNoZS5wYXJhbXMpO1xuICB0aGlzLmFjY2VwdEtleShtdXN0YWNoZSwgJ2hhc2gnKTtcbn1cbmZ1bmN0aW9uIHZpc2l0QmxvY2soYmxvY2spIHtcbiAgdmlzaXRTdWJFeHByZXNzaW9uLmNhbGwodGhpcywgYmxvY2spO1xuXG4gIHRoaXMuYWNjZXB0S2V5KGJsb2NrLCAncHJvZ3JhbScpO1xuICB0aGlzLmFjY2VwdEtleShibG9jaywgJ2ludmVyc2UnKTtcbn1cbmZ1bmN0aW9uIHZpc2l0UGFydGlhbChwYXJ0aWFsKSB7XG4gIHRoaXMuYWNjZXB0UmVxdWlyZWQocGFydGlhbCwgJ25hbWUnKTtcbiAgdGhpcy5hY2NlcHRBcnJheShwYXJ0aWFsLnBhcmFtcyk7XG4gIHRoaXMuYWNjZXB0S2V5KHBhcnRpYWwsICdoYXNoJyk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFZpc2l0b3I7XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js new file mode 100644 index 00000000000000..e453b53bd35752 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js @@ -0,0 +1,221 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _visitor = require('./visitor'); + +var _visitor2 = _interopRequireDefault(_visitor); + +function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; +} +WhitespaceControl.prototype = new _visitor2['default'](); + +WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; +}; + +WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; +}; + +WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; +}; + +WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; +}; + +function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } +} +function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } +} + +// Marks the node to the right of the position as omitted. +// I.e. {{foo}}' ' will mark the ' ' node as omitted. +// +// If i is undefined, then the first child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; +} + +// Marks the node to the left of the position as omitted. +// I.e. ' '{{foo}} will mark the ' ' node as omitted. +// +// If i is undefined then the last child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; +} + +exports['default'] = WhitespaceControl; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3doaXRlc3BhY2UtY29udHJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3VCQUFvQixXQUFXOzs7O0FBRS9CLFNBQVMsaUJBQWlCLEdBQWU7TUFBZCxPQUFPLHlEQUFHLEVBQUU7O0FBQ3JDLE1BQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0NBQ3hCO0FBQ0QsaUJBQWlCLENBQUMsU0FBUyxHQUFHLDBCQUFhLENBQUM7O0FBRTVDLGlCQUFpQixDQUFDLFNBQVMsQ0FBQyxPQUFPLEdBQUcsVUFBUyxPQUFPLEVBQUU7QUFDdEQsTUFBTSxZQUFZLEdBQUcsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLGdCQUFnQ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/cjs/handlebars/decorators.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators.js new file mode 100644 index 00000000000000..e82e0efb67ce2d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators.js @@ -0,0 +1,16 @@ +'use strict'; + +exports.__esModule = true; +exports.registerDefaultDecorators = registerDefaultDecorators; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _decoratorsInline = require('./decorators/inline'); + +var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + +function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Z0NBQTJCLHFCQUFxQjs7OztBQUV6QyxTQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCxnQ0FBZSxRQUFRLENBQUMsQ0FBQztDQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js new file mode 100644 index 00000000000000..f2f1c7cc2fc62e --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js @@ -0,0 +1,29 @@ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQXFCLFVBQVU7O3FCQUVoQixVQUFTLFFBQVEsRUFBRTtBQUNoQyxVQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFFBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFFBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLFdBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFNBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLFlBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsY0FBTyxFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxZQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLGlCQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixlQUFPLEdBQUcsQ0FBQztPQ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4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/exception.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/exception.js new file mode 100644 index 00000000000000..bad4195edcfba7 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/exception.js @@ -0,0 +1,40 @@ +'use strict'; + +exports.__esModule = true; + +var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + +function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } +} + +Exception.prototype = new Error(); + +exports['default'] = Exception; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQ0EsSUFBTSxVQUFVLEdBQUcsQ0FBQyxhQUFhLEVBQUUsVUFBVSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRSxPQUFPLENBQUMsQ0FBQzs7QUFFbkcsU0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxNQUFJLEdBQUcsR0FBRyxJQUFJLElBQUksSUFBSSxDQUFDLEdBQUc7TUFDdEIsSUFBSSxZQUFBO01BQ0osTUFBTSxZQUFBLENBQUM7QUFDWCxNQUFJLEdBQUcsRUFBRTtBQUNQLFF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js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers.js new file mode 100644 index 00000000000000..1ab84a48042bdf --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers.js @@ -0,0 +1,46 @@ +'use strict'; + +exports.__esModule = true; +exports.registerDefaultHelpers = registerDefaultHelpers; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _helpersBlockHelperMissing = require('./helpers/block-helper-missing'); + +var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + +var _helpersEach = require('./helpers/each'); + +var _helpersEach2 = _interopRequireDefault(_helpersEach); + +var _helpersHelperMissing = require('./helpers/helper-missing'); + +var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + +var _helpersIf = require('./helpers/if'); + +var _helpersIf2 = _interopRequireDefault(_helpersIf); + +var _helpersLog = require('./helpers/log'); + +var _helpersLog2 = _interopRequireDefault(_helpersLog); + +var _helpersLookup = require('./helpers/lookup'); + +var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + +var _helpersWith = require('./helpers/with'); + +var _helpersWith2 = _interopRequireDefault(_helpersWith); + +function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7eUNBQXVDLGdDQUFnQzs7OzsyQkFDOUMsZ0JBQWdCOzs7O29DQUNQLDBCQUEwQjs7Ozt5QkFDckMsY0FBYzs7OzswQkFDYixlQUFlOzs7OzZCQUNaLGtCQUFrQjs7OzsyQk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AgcmVnaXN0ZXJJZihpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js new file mode 100644 index 00000000000000..f82d2aca6cdbf6 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js @@ -0,0 +1,39 @@ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBc0QsVUFBVTs7cUJBRWpELFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFFBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1FBQ3pCLEVBQUUsR0F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uZENvbnRleHRQYXRoKG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCwgb3B0aW9ucy5uYW1lKTtcbiAgICAgICAgb3B0aW9ucyA9IHtkYXRhOiBkYXRhfTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js new file mode 100644 index 00000000000000..003274b0e96d13 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js @@ -0,0 +1,94 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('../utils'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQUErRSxVQUFVOzt5QkFDbkUsY0FBYzs7OztxQkFFckIsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFFBQUksQ0FBQyxPQUFPLEVBQUU7QUFDWixZQUFNLDJCQUFjLDZCQUE2QixDQUFDLENBQUM7S0FDcEQ7O0FBRUQsUUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUU7UUFDZixPQUFPLEdBQUcsT0FBTyxDQUFDLE9BQU87UUFDekIsQ0FBQyxHQUFHLENBQUM7UUFDTCxHQUFHLEdBQUcsRUFBRTtRQUNSLElBQUksWUFBQTtRQUNKLFdBQVcsWUFBQSxDQUFDOztBQUVoQixRQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixpQkFBVyxHQUFHLHlCQUFrQixPQUFPLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDO0tBQ2pGOztBQUVELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFBRSxhQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztL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RhdGEuY29udGV4dFBhdGggPSBjb250ZXh0UGF0aCArIGZpZWxkO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldCA9IHJldCArIGZuKGNvbnRleHRbZmllbGRdLCB7XG4gICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dFtmaWVsZF0sIGZpZWxkXSwgW2NvbnRleHRQYXRoICsgZmllbGQsIG51bGxdKVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgJiYgdHlwZW9mIGNvbnRleHQgPT09ICdvYmplY3QnKSB7XG4gICAgICBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBpZiAoaSBpbiBjb250ZXh0KSB7XG4gICAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBsZXQgcHJpb3JLZXk7XG5cbiAgICAgICAgZm9yIChsZXQga2V5IGluIGNvbnRleHQpIHtcbiAgICAgICAgICBpZiAoY29udGV4dC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAgIC8vIHRoZSBsYXN0IGl0ZXJhdGlvbiB3aXRob3V0IGhhdmUgdG8gc2NhbiB0aGUgb2JqZWN0IHR3aWNlIGFuZCBjcmVhdGVcbiAgICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICAgIGkrKztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js new file mode 100644 index 00000000000000..1ff367a89139d4 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js @@ -0,0 +1,25 @@ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js new file mode 100644 index 00000000000000..1abfa4b7b33731 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js @@ -0,0 +1,29 @@ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBa0MsVUFBVTs7cUJBRTdCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxRQUFJLGtCQUFXLFdBQVcsQ0FBQyxFQUFFO0FBQUUsaUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0tBQUU7Ozs7O0FBS3RFLFFBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLGVBQVEsV0FBVyxDQUFDLEVBQUU7QUFD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gY29uZHRpb25hbCBhcyBwdXJlbHkgbm90IGVtcHR5IGJhc2VkIG9uIHRoZVxuICAgIC8vIGJlaGF2aW9yIG9mIGlzRW1wdHkuIEVmZmVjdGl2ZWx5IHRoaXMgZGV0ZXJtaW5lcyBpZiAwIGlzIGhhbmRsZWQgYnkgdGhlIHBvc2l0aXZlIHBhdGggb3IgbmVnYXRpdmUuXG4gICAgaWYgKCghb3B0aW9ucy5oYXNoLmluY2x1ZGVaZXJvICYmICFjb25kaXRpb25hbCkgfHwgaXNFbXB0eShjb25kaXRpb25hbCkpIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmZuKHRoaXMpO1xuICAgIH1cbiAgfSk7XG5cbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ3VubGVzcycsIGZ1bmN0aW9uKGNvbmRpdGlvbmFsLCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnNbJ2lmJ10uY2FsbCh0aGlzLCBjb25kaXRpb25hbCwge2ZuOiBvcHRpb25zLmludmVyc2UsIGludmVyc2U6IG9wdGlvbnMuZm4sIGhhc2g6IG9wdGlvbnMuaGFzaH0pO1xuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js new file mode 100644 index 00000000000000..042b6fcbe37590 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js @@ -0,0 +1,26 @@ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsa0NBQWlDO0FBQzlELFFBQUksSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDO1FBQ2xCLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUM5QyxTQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDN0MsVUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUN6Qjs7QUFFRCxRQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7QUFDZCxRQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksRUFBRTtBQUM5QixXQUFLLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7S0FDNUIsTUFBTSxJQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFFO0FBQ3JELFdBQUssR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztLQUM1QjtBQUNELFFBQUksQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRWhCLFlBQVEsQ0FBQyxHQUFHLE1BQUEsQ0FBWixRQUFRLEVBQVMsSUFBSSxDQUFDLENBQUM7R0FDeEIsQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoibG9nLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvZycsIGZ1bmN0aW9uKC8qIG1lc3NhZ2UsIG9wdGlvbnMgKi8pIHtcbiAgICBsZXQgYXJncyA9IFt1bmRlZmluZWRdLFxuICAgICAgICBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGggLSAxOyBpKyspIHtcbiAgICAgIGFyZ3MucHVzaChhcmd1bWVudHNbaV0pO1xuICAgIH1cblxuICAgIGxldCBsZXZlbCA9IDE7XG4gICAgaWYgKG9wdGlvbnMuaGFzaC5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuaGFzaC5sZXZlbDtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmRhdGEubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmRhdGEubGV2ZWw7XG4gICAgfVxuICAgIGFyZ3NbMF0gPSBsZXZlbDtcblxuICAgIGluc3RhbmNlLmxvZyguLi4gYXJncyk7XG4gIH0pO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js new file mode 100644 index 00000000000000..e5efdcea23d1b6 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js @@ -0,0 +1,12 @@ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxHQUFHLEVBQUUsS0FBSyxFQUFFO0FBQ3JELFdBQU8sR0FBRyxJQUFJLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQztHQUMxQixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJsb29rdXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcignbG9va3VwJywgZnVuY3Rpb24ob2JqLCBmaWVsZCkge1xuICAgIHJldHVybiBvYmogJiYgb2JqW2ZpZWxkXTtcbiAgfSk7XG59XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js new file mode 100644 index 00000000000000..c23cddec1e5e02 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js @@ -0,0 +1,33 @@ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUErRSxVQUFVOztxQkFFMUUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFBRSxhQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUFFOztBQUUxRCxRQUFJLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVwQixRQUFJLENBQUMsZUFBUSxPQUFPLENBQUMsRUFBRTtBQUNyQixVQUFJLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLFVBQUksT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsR0FBRyxFQUFFO0FBQy9CLFlBQUksR0FBRyxtQkFBWSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDakMsWUFBSSxDQUFDLFdBQVcsR0FBRyx5QkFBa0IsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO09BQ2hGOztBQUVELGFBQU8sRUFBRSxDQUFDLE9BQU8sRUFBRTtBQUNqQixZQUFJLEVBQUUsSUFBSTtBQUNWLG1CQUFXLEVBQUUsbUJBQVksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLElBQUksSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLEN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ICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/logger.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/logger.js new file mode 100644 index 00000000000000..76782445d01918 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/logger.js @@ -0,0 +1,47 @@ +'use strict'; + +exports.__esModule = true; + +var _utils = require('./utils'); + +var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } +}; + +exports['default'] = logger; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUFzQixTQUFTOztBQUUvQixJQUFJLE1BQU0sR0FBRztBQUNYLFdBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxPQUFLLEVBQUUsTUFBTTs7O0FBR2IsYUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMz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AgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbiAgICB9XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGxvZ2dlcjtcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js new file mode 100644 index 00000000000000..882ff0010944a2 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js @@ -0,0 +1,20 @@ +/* global window */ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; +}; + +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O3FCQUNlLFVBQVMsVUFBVSxFQUFFOztBQUVsQyxNQUFJLElBQUksR0FBRyxPQUFPLE1BQU0sS0FBSyxXQUFXLEdBQUcsTUFBTSxHQUFHLE1BQU07TUFDdEQsV0FBVyxHQUFHLElBQUksQ0FBQyxVQUFVLENBQUM7O0FBRWxDLFlBQVUsQ0FBQyxVQUFVLEdBQUcsWUFBVztBQUNqQyxRQUFJLElBQUksQ0FBQyxVQUFVLEtBQUssVUFBVSxFQUFFO0FBQ2xDLFVBQUksQ0FBQyxVQUFVLEdBQUcsV0FBVyxDQUFDO0tBQy9CO0FBQ0QsV0FBTyxVQUFVLENBQUM7R0FDbkIsQ0FBQztDQUNIIiwiZmlsZSI6Im5vLWNvbmZsaWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyogZ2xvYmFsIHdpbmRvdyAqL1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oSGFuZGxlYmFycykge1xuICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICBsZXQgcm9vdCA9IHR5cGVvZiBnbG9iYWwgIT09ICd1bmRlZmluZWQnID8gZ2xvYmFsIDogd2luZG93LFxuICAgICAgJEhhbmRsZWJhcnMgPSByb290LkhhbmRsZWJhcnM7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIEhhbmRsZWJhcnMubm9Db25mbGljdCA9IGZ1bmN0aW9uKCkge1xuICAgIGlmIChyb290LkhhbmRsZWJhcnMgPT09IEhhbmRsZWJhcnMpIHtcbiAgICAgIHJvb3QuSGFuZGxlYmFycyA9ICRIYW5kbGViYXJzO1xuICAgIH1cbiAgICByZXR1cm4gSGFuZGxlYmFycztcbiAgfTtcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/runtime.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/runtime.js new file mode 100644 index 00000000000000..4053aecf05ade2 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/runtime.js @@ -0,0 +1,292 @@ +'use strict'; + +exports.__esModule = true; +exports.checkRevision = checkRevision; +exports.template = template; +exports.wrapProgram = wrapProgram; +exports.resolvePartial = resolvePartial; +exports.invokePartial = invokePartial; +exports.noop = noop; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _utils = require('./utils'); + +var Utils = _interopRequireWildcard(_utils); + +var _exception = require('./exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _base = require('./base'); + +function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } +} + +function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; +} + +function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; +} + +function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; +} + +function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = Utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } +} + +function noop() { + return ''; +} + +function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; +} + +function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; +} +//# sourceMappingURL=data:application/json;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ZXR1cm4gcHJvZztcbn1cbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/safe-string.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/safe-string.js new file mode 100644 index 00000000000000..428b3a1dcd740f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/safe-string.js @@ -0,0 +1,15 @@ +// Build out our basic SafeString type +'use strict'; + +exports.__esModule = true; +function SafeString(string) { + this.string = string; +} + +SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; +}; + +exports['default'] = SafeString; +module.exports = exports['default']; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/utils.js b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/utils.js new file mode 100644 index 00000000000000..2d1521469025f1 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/handlebars/utils.js @@ -0,0 +1,124 @@ +'use strict'; + +exports.__esModule = true; +exports.extend = extend; +exports.indexOf = indexOf; +exports.escapeExpression = escapeExpression; +exports.isEmpty = isEmpty; +exports.createFrame = createFrame; +exports.blockParams = blockParams; +exports.appendContextPath = appendContextPath; +var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' +}; + +var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + +function escapeChar(chr) { + return escape[chr]; +} + +function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; +} + +var toString = Object.prototype.toString; + +exports.toString = toString; +// Sourced from lodash +// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt +/* eslint-disable func-style */ +var isFunction = function isFunction(value) { + return typeof value === 'function'; +}; +// fallback for older versions of Chrome and Safari +/* istanbul ignore next */ +if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; +} +exports.isFunction = isFunction; + +/* eslint-enable func-style */ + +/* istanbul ignore next */ +var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; +}; + +exports.isArray = isArray; +// Older IE versions do not directly support indexOf so we must implement our own, sadly. + +function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; +} + +function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); +} + +function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } +} + +function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; +} + +function blockParams(params, ids) { + params.path = ids; + return params; +} + +function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNLE1BQU0sR0FBRztBQUNiLEtBQUcsRUFBRSxPQUFPO0FBQ1osS0FBRyxFQUFFLE1BQU07QUFDWCxLQUFHLEVBQUUsTUFBTTtBQUNYLEtBQUcsRUFBRSxRQUFRO0FBQ2IsS0FBRyxFQUFFLFFBQVE7QUFDYixLQUFHLEVBQUUsUUFBUTtBQUNiLEtBQUcsRUFBRSxRQUFRO0NBQ2QsQ0FBQzs7QUFFRixJQUFNLFFBQVEsR0FBRyxZQUFZO0lBQ3ZCLFFBQVEsR0FBRyxXQUFXLENBQUM7O0FBRTdCLFNBQVMsVUFBVSxDQUFDLEdBQUcsRUFBRTtBQUN2QixTQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUNwQjs7QUFFTSxTQUFTLE1BQU0sQ0FBQyxHQUFHLG9CQUFtQjtBQUMzQyxPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1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7XG4gIHBhcmFtcy5wYXRoID0gaWRzO1xuICByZXR1cm4gcGFyYW1zO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXBwZW5kQ29udGV4dFBhdGgoY29udGV4dFBhdGgsIGlkKSB7XG4gIHJldHVybiAoY29udGV4dFBhdGggPyBjb250ZXh0UGF0aCArICcuJyA6ICcnKSArIGlkO1xufVxuIl19 diff --git a/tools/eslint/node_modules/handlebars/dist/cjs/precompiler.js b/tools/eslint/node_modules/handlebars/dist/cjs/precompiler.js new file mode 100644 index 00000000000000..bddca8e1ee4810 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/cjs/precompiler.js @@ -0,0 +1,308 @@ +/* eslint-disable no-console */ +'use strict'; + +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _async = require('async'); + +var _async2 = _interopRequireDefault(_async); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _handlebars = require('./handlebars'); + +var Handlebars = _interopRequireWildcard(_handlebars); + +var _path = require('path'); + +var _sourceMap = require('source-map'); + +var _uglifyJs = require('uglify-js'); + +var _uglifyJs2 = _interopRequireDefault(_uglifyJs); + +module.exports.loadTemplates = function (opts, callback) { + loadStrings(opts, function (err, strings) { + if (err) { + callback(err); + } else { + loadFiles(opts, function (err, files) { + if (err) { + callback(err); + } else { + opts.templates = strings.concat(files); + callback(undefined, opts); + } + }); + } + }); +}; + +function loadStrings(opts, callback) { + var strings = arrayCast(opts.string), + names = arrayCast(opts.name); + + if (names.length !== strings.length && strings.length > 1) { + return callback(new Handlebars.Exception('Number of names did not match the number of string inputs')); + } + + _async2['default'].map(strings, function (string, callback) { + if (string !== '-') { + callback(undefined, string); + } else { + (function () { + // Load from stdin + var buffer = ''; + process.stdin.setEncoding('utf8'); + + process.stdin.on('data', function (chunk) { + buffer += chunk; + }); + process.stdin.on('end', function () { + callback(undefined, buffer); + }); + })(); + } + }, function (err, strings) { + strings = strings.map(function (string, index) { + return { + name: names[index], + path: names[index], + source: string + }; + }); + callback(err, strings); + }); +} + +function loadFiles(opts, callback) { + // Build file extension pattern + var extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-\[\]]/g, function (arg) { + return '\\' + arg; + }); + extension = new RegExp('\\.' + extension + '$'); + + var ret = [], + queue = (opts.files || []).map(function (template) { + return { template: template, root: opts.root }; + }); + _async2['default'].whilst(function () { + return queue.length; + }, function (callback) { + var _queue$shift = queue.shift(); + + var path = _queue$shift.template; + var root = _queue$shift.root; + + _fs2['default'].stat(path, function (err, stat) { + if (err) { + return callback(new Handlebars.Exception('Unable to open template file "' + path + '"')); + } + + if (stat.isDirectory()) { + opts.hasDirectory = true; + + _fs2['default'].readdir(path, function (err, children) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + children.forEach(function (file) { + var childPath = path + '/' + file; + + if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) { + queue.push({ template: childPath, root: root || path }); + } + }); + + callback(); + }); + } else { + _fs2['default'].readFile(path, 'utf8', function (err, data) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + + if (opts.bom && data.indexOf('') === 0) { + data = data.substring(1); + } + + // Clean the template name + var name = path; + if (!root) { + name = _path.basename(name); + } else if (name.indexOf(root) === 0) { + name = name.substring(root.length + 1); + } + name = name.replace(extension, ''); + + ret.push({ + path: path, + name: name, + source: data + }); + + callback(); + }); + } + }); + }, function (err) { + if (err) { + callback(err); + } else { + callback(undefined, ret); + } + }); +} + +module.exports.cli = function (opts) { + if (opts.version) { + console.log(Handlebars.VERSION); + return; + } + + if (!opts.templates.length && !opts.hasDirectory) { + throw new Handlebars.Exception('Must define at least one template or directory.'); + } + + if (opts.simple && opts.min) { + throw new Handlebars.Exception('Unable to minimize simple output'); + } + + var multiple = opts.templates.length !== 1 || opts.hasDirectory; + if (opts.simple && multiple) { + throw new Handlebars.Exception('Unable to output multiple templates in simple mode'); + } + + // Force simple mode if we have only one template and it's unnamed. + if (!opts.amd && !opts.commonjs && opts.templates.length === 1 && !opts.templates[0].name) { + opts.simple = true; + } + + // Convert the known list into a hash + var known = {}; + if (opts.known && !Array.isArray(opts.known)) { + opts.known = [opts.known]; + } + if (opts.known) { + for (var i = 0, len = opts.known.length; i < len; i++) { + known[opts.known[i]] = true; + } + } + + var objectName = opts.partial ? 'Handlebars.partials' : 'templates'; + + var output = new _sourceMap.SourceNode(); + if (!opts.simple) { + if (opts.amd) { + output.add('define([\'' + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); + } else if (opts.commonjs) { + output.add('var Handlebars = require("' + opts.commonjs + '");'); + } else { + output.add('(function() {\n'); + } + output.add(' var template = Handlebars.template, templates = '); + if (opts.namespace) { + output.add(opts.namespace); + output.add(' = '); + output.add(opts.namespace); + output.add(' || '); + } + output.add('{};\n'); + } + + opts.templates.forEach(function (template) { + var options = { + knownHelpers: known, + knownHelpersOnly: opts.o + }; + + if (opts.map) { + options.srcName = template.path; + } + if (opts.data) { + options.data = true; + } + + var precompiled = Handlebars.precompile(template.source, options); + + // If we are generating a source map, we have to reconstruct the SourceNode object + if (opts.map) { + var consumer = new _sourceMap.SourceMapConsumer(precompiled.map); + precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); + } + + if (opts.simple) { + output.add([precompiled, '\n']); + } else { + if (!template.name) { + throw new Handlebars.Exception('Name missing for template'); + } + + if (opts.amd && !multiple) { + output.add('return '); + } + output.add([objectName, '[\'', template.name, '\'] = template(', precompiled, ');\n']); + } + }); + + // Output the content + if (!opts.simple) { + if (opts.amd) { + if (multiple) { + output.add(['return ', objectName, ';\n']); + } + output.add('});'); + } else if (!opts.commonjs) { + output.add('})();'); + } + } + + if (opts.map) { + output.add('\n//# sourceMappingURL=' + opts.map + '\n'); + } + + output = output.toStringWithSourceMap(); + output.map = output.map + ''; + + if (opts.min) { + output = _uglifyJs2['default'].minify(output.code, { + fromString: true, + + outSourceMap: opts.map, + inSourceMap: JSON.parse(output.map) + }); + if (opts.map) { + output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; + } + } + + if (opts.map) { + _fs2['default'].writeFileSync(opts.map, output.map, 'utf8'); + } + output = output.code; + + if (opts.output) { + _fs2['default'].writeFileSync(opts.output, output, 'utf8'); + } else { + console.log(output); + } +}; + +function arrayCast(value) { + value = value != null ? value : []; + if (!Array.isArray(value)) { + value = [value]; + } + return value; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wcmVjb21waWxlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztxQkFDa0IsT0FBTzs7OztrQkFDVixJQUFJOzs7OzBCQUNTLGNBQWM7O0lBQTlCLFVBQVU7O29CQUNDLE1BQU07O3lCQUNlLFlBQVk7O3dCQUNyQyxXQUFXOzs7O0FBRTlCLE1BQU0sQ0FBQyxPQUFPLENBQUMsYUFBYSxHQUFHLFVBQVMsSUFBSSxFQUFFLFFBQVEsRUFBRTtBQUN0RCxhQUFXLENBQUMsSUFBSSxFQUFFLFVBQVMsR0FBRyxFQUFFLE9BQU8sRUFBRTtBQUN2QyxRQUFJLEdBQUcsRUFBRTtBQUNQLGNBQVEsQ0FBQyxHQUFHLENBQUMsQ0FBQztLQUNmLE1BQU07QUFDTCxlQUFTLENBQUMsSUFBSSxFQUFFLFVBQVMsR0FBRyxFQUFFLEtBQUssRUFBRTtBQUNuQyxZQUFJLEdBQUcsRUFBRTtBQUNQLGtCQUFRLENBQUMsR0FBRyxDQUFDLENBQUM7U0FDZixNQUFNO0FBQ0wsY0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sYmFjaygpO1xuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGZzLnJlYWRGaWxlKHBhdGgsICd1dGY4JywgZnVuY3Rpb24oZXJyLCBkYXRhKSB7XG4gICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgOiBSYWNlIGNvbmRpdGlvbiB0aGF0IGJlaW5nIHRvbyBsYXp5IHRvIHRlc3QgKi9cbiAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAob3B0cy5ib20gJiYgZGF0YS5pbmRleE9mKCdcXHVGRUZGJykgPT09IDApIHtcbiAgICAgICAgICAgIGRhdGEgPSBkYXRhLnN1YnN0cmluZygxKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBDbGVhbiB0aGUgdGVtcGxhdGUgbmFtZVxuICAgICAgICAgIGxldCBuYW1lID0gcGF0aDtcbiAgICAgICAgICBpZiAoIXJvb3QpIHtcbiAgICAgICAgICAgIG5hbWUgPSBiYXNlbmFtZShuYW1lKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUuaW5kZXhPZihyb290KSA9PT0gMCkge1xuICAgICAgICAgICAgbmFtZSA9IG5hbWUuc3Vic3RyaW5nKHJvb3QubGVuZ3RoICsgMSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5hbWUgPSBuYW1lLnJlcGxhY2UoZXh0ZW5zaW9uLCAnJyk7XG5cbiAgICAgICAgICByZXQucHVzaCh7XG4gICAgICAgICAgICBwYXRoOiBwYXRoLFxuICAgICAgICAgICAgbmFtZTogbmFtZSxcbiAgICAgICAgICAgIHNvdXJjZTogZGF0YVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSk7XG4gIH0sXG4gIGZ1bmN0aW9uKGVycikge1xu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KTtcbiAgb3V0cHV0Lm1hcCA9IG91dHB1dC5tYXAgKyAnJztcblxuICBpZiAob3B0cy5taW4pIHtcbiAgICBvdXRwdXQgPSB1Z2xpZnkubWluaWZ5KG91dHB1dC5jb2RlLCB7XG4gICAgICBmcm9tU3RyaW5nOiB0cnVlLFxuXG4gICAgICBvdXRTb3VyY2VNYXA6IG9wdHMubWFwLFxuICAgICAgaW5Tb3VyY2VNYXA6IEpTT04ucGFyc2Uob3V0cHV0Lm1hcClcbiAgICB9KTtcbiAgICBpZiAob3B0cy5tYXApIHtcbiAgICAgIG91dHB1dC5jb2RlICs9ICdcXG4vLyMgc291cmNlTWFwcGluZ1VSTD0nICsgb3B0cy5tYXAgKyAnXFxuJztcbiAgICB9XG4gIH1cblxuICBpZiAob3B0cy5tYXApIHtcbiAgICBmcy53cml0ZUZpbGVTeW5jKG9wdHMubWFwLCBvdXRwdXQubWFwLCAndXRmOCcpO1xuICB9XG4gIG91dHB1dCA9IG91dHB1dC5jb2RlO1xuXG4gIGlmIChvcHRzLm91dHB1dCkge1xuICAgIGZzLndyaXRlRmlsZVN5bmMob3B0cy5vdXRwdXQsIG91dHB1dCwgJ3V0ZjgnKTtcbiAgfSBlbHNlIHtcbiAgICBjb25zb2xlLmxvZyhvdXRwdXQpO1xuICB9XG59O1xuXG5mdW5jdGlvbiBhcnJheUNhc3QodmFsdWUpIHtcbiAgdmFsdWUgPSB2YWx1ZSAhPSBudWxsID8gdmFsdWUgOiBbXTtcbiAgaWYgKCFBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgIHZhbHVlID0gW3ZhbHVlXTtcbiAgfVxuICByZXR1cm4gdmFsdWU7XG59XG4iXX0= diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.amd.js b/tools/eslint/node_modules/handlebars/dist/handlebars.amd.js new file mode 100644 index 00000000000000..23ca81f619ecf6 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.amd.js @@ -0,0 +1,4321 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +define('handlebars/utils',['exports'], function (exports) { + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsTUFBTSxNQUFNLEdBQUc7QUFDYixPQUFHLEVBQUUsT0FBTztBQUNaLE9BQUcsRUFBRSxNQUFNO0FBQ1gsT0FBRyxFQUFFLE1BQU07QUFDWCxPQUFHLEVBQUUsUUFBUTtBQUNiLE9BQUcsRUFBRSxRQUFRO0FBQ2IsT0FBRyxFQUFFLFFBQVE7QUFD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4gICAgcmV0dXJuIHRydWU7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVGcmFtZShvYmplY3QpIHtcbiAgbGV0IGZyYW1lID0gZXh0ZW5kKHt9LCBvYmplY3QpO1xuICBmcmFtZS5fcGFyZW50ID0gb2JqZWN0O1xuICByZXR1cm4gZnJhbWU7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBibG9ja1BhcmFtcyhwYXJhbXMsIGlkcykge1xuICBwYXJhbXMucGF0aCA9IGlkcztcbiAgcmV0dXJuIHBhcmFtcztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGFwcGVuZENvbnRleHRQYXRoKGNvbnRleHRQYXRoLCBpZCkge1xuICByZXR1cm4gKGNvbnRleHRQYXRoID8gY29udGV4dFBhdGggKyAnLicgOiAnJykgKyBpZDtcbn1cbiJdfQ== +; +define('handlebars/exception',['exports', 'module'], function (exports, module) { + 'use strict'; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + module.exports = Exception; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF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IGlnbm9yZSBlbHNlICovXG4gIGlmIChFcnJvci5jYXB0dXJlU3RhY2tUcmFjZSkge1xuICAgIEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKHRoaXMsIEV4Y2VwdGlvbik7XG4gIH1cblxuICBpZiAobG9jKSB7XG4gICAgdGhpcy5saW5lTnVtYmVyID0gbGluZTtcbiAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgfVxufVxuXG5FeGNlcHRpb24ucHJvdG90eXBlID0gbmV3IEVycm9yKCk7XG5cbmV4cG9ydCBkZWZhdWx0IEV4Y2VwdGlvbjtcbiJdfQ== +; +define('handlebars/helpers/block-helper-missing',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFVBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQ3pCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQ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nMuZGF0YSk7XG4gICAgICAgIGRhdGEuY29udGV4dFBhdGggPSBhcHBlbmRDb250ZXh0UGF0aChvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsIG9wdGlvbnMubmFtZSk7XG4gICAgICAgIG9wdGlvbnMgPSB7ZGF0YTogZGF0YX07XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICB9XG4gIH0pO1xufVxuIl19 +; +define('handlebars/helpers/each',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _Exception['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return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ICAgIHJldCA9IHJldCArIGZuKGNvbnRleHRbZmllbGRdLCB7XG4gICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dFtmaWVsZF0sIGZpZWxkXSwgW2NvbnRleHRQYXRoICsgZmllbGQsIG51bGxdKVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgJiYgdHlwZW9mIGNvbnRleHQgPT09ICdvYmplY3QnKSB7XG4gICAgICBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBpZiAoaSBpbiBjb250ZXh0KSB7XG4gICAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBsZXQgcHJpb3JLZXk7XG5cbiAgICAgICAgZm9yIChsZXQga2V5IGluIGNvbnRleHQpIHtcbiAgICAgICAgICBpZiAoY29udGV4dC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAgIC8vIHRoZSBsYXN0IGl0ZXJhdGlvbiB3aXRob3V0IGhhdmUgdG8gc2NhbiB0aGUgb2JqZWN0IHR3aWNlIGFuZCBjcmVhdGVcbiAgICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICAgIGkrKztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/helper-missing',['exports', 'module', '../exception'], function (exports, module, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQWMsbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxDQUFDO09BQ3ZGO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/if',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxVQUFJLE9BSlMsVUFBVSxDQUlSLFdBQVcsQ0FBQyxFQUFFO0FBQUUsbUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQUU7Ozs7O0FBS3RFLFVBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLE9BVC9DLE9BQU8sQ0FTZ0QsV0FBVyxDQUFDLEVBQUU7QUFDdkUsZUFBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO09BQzlCLE1BQU07QUFDTCxlQUFPLE9BQU8sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDekI7S0FDRixDQUFDLENBQUM7O0FBRUgsWUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxXQUFXLEVBQUUsT0FBTyxFQUFFO0FBQy9ELGFBQU8sUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLFdBQVcsRUFBRSxFQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLENBQUM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fSk7XG5cbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ3VubGVzcycsIGZ1bmN0aW9uKGNvbmRpdGlvbmFsLCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnNbJ2lmJ10uY2FsbCh0aGlzLCBjb25kaXRpb25hbCwge2ZuOiBvcHRpb25zLmludmVyc2UsIGludmVyc2U6IG9wdGlvbnMuZm4sIGhhc2g6IG9wdGlvbnMuaGFzaH0pO1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/log',['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7VUFDbEIsT0FBTyxHQUFHLFNBQVMsQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQzlDLFdBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM3QyxZQUFJLENBQUMsSUFBSSxDQUFDLFNB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1xuICAgIH0gZWxzZSBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuZGF0YS5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuZGF0YS5sZXZlbDtcbiAgICB9XG4gICAgYXJnc1swXSA9IGxldmVsO1xuXG4gICAgaW5zdGFuY2UubG9nKC4uLiBhcmdzKTtcbiAgfSk7XG59XG4iXX0= +; +define('handlebars/helpers/lookup',['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUU7QUFDckQsYUFBTyxHQUFHLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQzFCLENBQUMsQ0FBQztHQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkKSB7XG4gICAgcmV0dXJuIG9iaiAmJiBvYmpbZmllbGRdO1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/with',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7bUJBRWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFVBQUksT0FKc0QsVUFBVSxDQUlyRCxPQUFPLENBQUMsRUFBRTtBQUFFLGVBQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQUU7O0FBRTFELFVBQUksRUFBRSxHQUFHLE9BQU8sQ0FBQyxFQUFFLENBQUM7O0FBRXBCLFVBQUksQ0FBQyxPQVI0QyxPQUFPLENBUTNDLE9BQU8sQ0FBQyxFQUFFO0FBQ3JCLFlBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7QUFDeEIsWUFBSSxPQUFPLENBQUMsSUFBSSxJQUFJLE9BQU8sQ0FBQyxHQUFHLEVBQUU7QUFDL0IsY0FBSSxHQUFHLE9BWHlCLFdBQVcsQ0FXeEIsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pDLGNBQUksQ0FBQyxXQUFXLEdBQUcsT0FabkIsaUJBQWlCLENBWW9CLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUNoRjs7QUFFRCxlQU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VybiBmbihjb250ZXh0LCB7XG4gICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dF0sIFtkYXRhICYmIGRhdGEuY29udGV4dFBhdGhdKVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers',['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); + + var _registerEach = _interopRequireDefault(_helpersEach); + + var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); + + var _registerIf = _interopRequireDefault(_helpersIf); + + var _registerLog = _interopRequireDefault(_helpersLog); + + var _registerLookup = _interopRequireDefault(_helpersLookup); + + var _registerWith = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _registerBlockHelperMissing['default'](instance); + _registerEach['default'](instance); + _registerHelperMissing['default'](instance); + _registerIf['default'](instance); + _registerLog['default'](instance); + _registerLookup['default'](instance); + _registerWith['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFRTyxXQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFB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nN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9va3VwKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJXaXRoKGluc3RhbmNlKTtcbn1cbiJdfQ== +; +define('handlebars/decorators/inline',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWckIsTUFBTSxDQVVzQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLEN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V0O1xuICAgICAgfTtcbiAgICB9XG5cbiAgICBwcm9wcy5wYXJ0aWFsc1tvcHRpb25zLmFyZ3NbMF1dID0gb3B0aW9ucy5mbjtcblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 +; +define('handlebars/decorators',['exports', './decorators/inline'], function (exports, _decoratorsInline) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerInline = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _registerInline['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== +; +define('handlebars/logger',['exports', 'module', './utils'], function (exports, module, _utils) { + 'use strict'; + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + module.exports = logger; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0sR0FBRztBQUNYLGFBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxTQUFLLEVBQUUsTUFBTTs7O0FBR2IsZUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixVQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixZQUFJLFFBQVEsR0FBRyxPQVRiLE9BQU8sQ0FTYyxNQUFNLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO0FBQzlELFlBQUksUUFBUSxJQUFJLENBQUMsRUFBRTtBQUNqQixlQUFLLEdBQUcsUUFBUSxDQUFDO1NBQ2xCLE1BQU07QUFDTCxlQUFLLEdBQUcsUUFBUSxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztTQUM3QjtPQUNGOztBQUVELGFBQU8sS0FBSyxDQUFDO0tBQ2Q7OztBQUdELE9BQUcsRUFBRSxhQUFTLEtBQUssRUFBYztBQUMvQixXQUFLLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxLQUFL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ID0gcGFyc2VJbnQobGV2ZWwsIDEwKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWwpIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIGlmICghY29uc29sZVttZXRob2RdKSB7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgICAgIG1ldGhvZCA9ICdsb2cnO1xuICAgICAgfVxuICAgICAgY29uc29sZVttZXRob2RdKC4uLm1lc3NhZ2UpOyAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbiAgICB9XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGxvZ2dlcjtcbiJdfQ== +; +define('handlebars/base',['exports', './utils', './exception', './helpers', './decorators', './logger'], function (exports, _utils, _exception, _helpers, _decorators, _logger) { + 'use strict'; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU1PLE1BQU0sT0FB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ZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHtjcmVhdGVGcmFtZSwgbG9nZ2VyfTtcbiJdfQ== +; +define('handlebars/safe-string',['exports', 'module'], function (exports, module) { + // Build out our basic SafeString type + 'use strict'; + + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + module.exports = SafeString; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== +; +define('handlebars/runtime',['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) { + 'use strict'; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _Exception['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = _utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _Exception['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: _utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = _utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _Exception['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _Exception['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = _utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _Exception['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + _utils.extend(prog, props); + } + return prog; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUlPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztRQUN2RCxlQUFlLFNBSmQsaUJBQWlCLEFBSWlCLENBQUM7O0FBRTFDLFFBQUksZ0JBQWdCLEtBQUssZUFBZSxFQUFFO0FBQ3hDLFVBQUksZ0JBQWdCLEdBQUcsZUFBZSxFQUFFO0FBQ3RDLFlBQU0sZUFBZSxHQUFHLE1BUkYsZ0JBQWdCLENBUUcsZUFBZSxDQUFDO1lBQ25ELGdCQUFnQixHQUFHLE1BVEgsZ0JBQWdCLENBU0ksZ0JBQWdCLENBQUMsQ0FBQztBQUM1RCxjQUFNLDBCQUFjLHlGQUF5RixHQUN2RyxxREFBcUQsR0FBRyxlQUFlLEdBQUcsbURBQW1ELEdBQUcsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLENBQUM7T0FDaEssTUFBTTs7QUFFTCxjQUFNLDBCQUFjLHdGQUF3RixHQUN0RyxpREFBaUQsR0FBRyxZQUFZLENBQUMsQ0FBQyxDQUFDLEdBQUcsSU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dG9yKSB7XG4gICAgbGV0IHByb3BzID0ge307XG4gICAgcHJvZyA9IGZuLmRlY29yYXRvcihwcm9nLCBwcm9wcywgY29udGFpbmVyLCBkZXB0aHMgJiYgZGVwdGhzWzBdLCBkYXRhLCBibG9ja1BhcmFtcywgZGVwdGhzKTtcbiAgICBVdGlscy5leHRlbmQocHJvZywgcHJvcHMpO1xuICB9XG4gIHJldHVybiBwcm9nO1xufVxuIl19 +; +define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { + /* global window */ + 'use strict'; + + module.exports = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7bUJBQ2UsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLFFBQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtRQUN0RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFbEMsY0FBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFVBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsWUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7T0FDL0I7QUFDRCxhQUFPLFVBQVUsQ0FBQztLQUNuQixDQUFDO0dBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBnbG9iYWwgd2luZG93ICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 +; +define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _SafeString = _interopRequireDefault(_handlebarsSafeString); + + var _Exception = _interopRequireDefault(_handlebarsException); + + var _noConflict = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new _handlebarsBase.HandlebarsEnvironment(); + + _handlebarsUtils.extend(hb, _handlebarsBase); + hb.SafeString = _SafeString['default']; + hb.Exception = _Exception['default']; + hb.Utils = _handlebarsUtils; + hb.escapeExpression = _handlebarsUtils.escapeExpression; + + hb.VM = _handlebarsRuntime; + hb.template = function (spec) { + return _handlebarsRuntime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _noConflict['default'](inst); + + inst['default'] = inst; + + module.exports = inst; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFZQSxXQUFTLE1BQU0sR0FBRztBQUNoQixRQUFJLEVBQUUsR0FBRyxJQUFJLGdCQUFLLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLHFCQUFNLE1BQU0sQ0FBQyxFQUFFLGtCQUFPLENBQUM7QUFDdkIsTUFBRSxDQUFDLFVBQVUseUJBQWEsQ0FBQztBQUMzQixNQUFFLENBQUMsU0FBUyx3QkFBWSxDQUFDO0FBQ3pCLE1BQUUsQ0FBQyxLQUFLLG1CQUFRLENBQUM7QUFDakIsTUFBRSxDQUFDLGdCQUFnQixHQUFHLGlCQUFNLGdCQUFnQixDQUFDOztBQUU3QyxNQUFFLENBQUMsRUFBRSxxQkFBVSxDQUFDO0FBQ2hCLE1BQUUsQ0FBQyxRQUFRLEdBQUcsVUFBUyxJQUFJLEVBQUU7QUFDM0IsYUFBTyxtQkFBUSxRQUFRLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0tBQ25DLENBQUM7O0FBRUYsV0FBTyxFQUFFLENBQUM7R0FDWDs7QUFFRCxNQUFJLElBQUksR0FBRyxNQUFNLEVBQUUsQ0FBQztBQUNwQixNQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQzs7QUFFckIseUJBQVcsSUFBSSxDQUFDLENBQUM7O0FBRWpCLE1BQUksQ0FBQyxTQUFTLENBQUMsR0FBRyxJQUFJLENBQUM7O21CQUVSLElBQUkiLCJmaWxlIjoiaGFuZGxlYmFycy5ydW50aW1lLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYmFzZSBmcm9t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G4gICAgcmV0dXJuIHJ1bnRpbWUudGVtcGxhdGUoc3BlYywgaGIpO1xuICB9O1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 +; +define('handlebars/compiler/ast',['exports', 'module'], function (exports, module) { + 'use strict'; + + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } + }; + + // Must be exported as an object rather than the root of the module as the jison lexer + // must modify the object to operate properly. + module.exports = AST; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFJLEdBQUcsR0FBRzs7QUFFUixXQUFPLEVBQUU7Ozs7QUFJUCxzQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsZUFBTyxBQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssZUFBZSxJQUM3QixDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssbUJBQW1CLElBQUksSUFBSSxDQUFDLElBQUksS0FBSyxnQkFBZ0IsQ0FBQSxJQUNuRSx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3RhdGVtZW50JyB8fCBub2RlLnR5cGUgPT09ICdCbG9ja1N0YXRlbWVudCcpXG4gICAgICAgICAgICAmJiAhISgobm9kZS5wYXJhbXMgJiYgbm9kZS5wYXJhbXMubGVuZ3RoKSB8fCBub2RlLmhhc2gpKTtcbiAgICB9LFxuXG4gICAgc2NvcGVkSWQ6IGZ1bmN0aW9uKHBhdGgpIHtcbiAgICAgIHJldHVybiAoL15cXC58dGhpc1xcYi8pLnRlc3QocGF0aC5vcmlnaW5hbCk7XG4gICAgfSxcblxuICAgIC8vIGFuIElEIGlzIHNpbXBsZSBpZiBpdCBvbmx5IGhhcyBvbmUgcGFydCwgYW5kIHRoYXQgcGFydCBpcyBub3RcbiAgICAvLyBgLi5gIG9yIGB0aGlzYC5cbiAgICBzaW1wbGVJZDogZnVuY3Rpb24ocGF0aCkge1xuICAgICAgcmV0dXJuIHBhdGgucGFydHMubGVuZ3RoID09PSAxICYmICFBU1QuaGVscGVycy5zY29wZWRJZChwYXRoKSAmJiAhcGF0aC5kZXB0aDtcbiAgICB9XG4gIH1cbn07XG5cblxuLy8gTXVzdCBiZSBleHBvcnRlZCBhcyBhbiBvYmplY3QgcmF0aGVyIHRoYW4gdGhlIHJvb3Qgb2YgdGhlIG1vZHVsZSBhcyB0aGUgamlzb24gbGV4ZXJcbi8vIG11c3QgbW9kaWZ5IHRoZSBvYmplY3QgdG8gb3BlcmF0ZSBwcm9wZXJseS5cbmV4cG9ydCBkZWZhdWx0IEFTVDtcbiJdfQ== +; +define('handlebars/compiler/parser',["exports"], function (exports) { + /* istanbul ignore next */ + /* Jison generated parser */ + "use strict"; + + var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ + /**/) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = [$$[$0]]; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START + /**/) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); + })();exports.__esModule = true; + exports['default'] = handlebars; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLFFBQUksVUFBVSxHQUFHLENBQUMsWUFBVTtBQUM1QixZQUFJLE1BQU0sR0FBRyxFQUFDLEtBQUssRUFBRSxTQUFTLEtBQUssR0FBRyxFQUFHO0FBQ3pDLGNBQUUsRUFBRSxFQUFFO0FBQ04sb0JBQVEsRUFBRSxFQUFDLE9BQU8sRUFBQyxDQUFDLEVBQUMsTUFBTSxFQUFDLENBQUMsRUFBQyxTQUFTLEVBQUMsQ0FBQyxFQUFDLEtBQUssRUFBQyxDQUFDLEVBQUMscUJBQXFCLEVBQUMsQ0FBQyxFQUFDLFdBQVcsRUFBQyxDQUFDLEVBQUMsVUFBVSxFQUFDLENBQUMsRUFBQyxPQUFPLEVBQUMsQ0FBQyxFQUFDLFVBQVUsRUFBQyxFQUFFLEVBQUMsU0FBUyxFQUFDLEVBQUUsRUFBQyxjQUFjLEVBQU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ZSArIFwiLCB0b2tlbjogXCIgKyBzeW1ib2wpO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoYWN0aW9uWzBdKSB7XG4gICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIHN0YWNrLnB1c2goc3ltYm9sKTtcbiAgICAgICAgICAgIHZzdGFjay5wdXNoKHRoaXMubGV4ZXIueXl0ZXh0KTtcbiAgICAgICAgICAgIGxzdGFjay5wdXNoKHRoaXMubGV4ZXIueXlsbG9jKTtcbiAgICAgICAgICAgIHN0YWNrLnB1c2goYWN0aW9uWzFdKTtcbiAgICAgICAgICAgIHN5bWJvbCA9IG51bGw7XG4gICAgICAgICAgICBpZiAoIXByZUVycm9yU3ltYm9sKSB7XG4gICAgICAgICAgICAgICAgeXlsZW5nID0gdGhpcy5sZXhlci55eWxlbmc7XG4gICAgICAgICAgICAgICAgeXl0ZXh0ID0gdGhpcy5sZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgeXlsaW5lbm8gPSB0aGlzLmxleGVyLnl5bGluZW5vO1xuICAgICAgICAgICAgICAgIHl5bG9jID0gdGhpcy5sZXhlci55eWxsb2M7XG4gICAgICAgICAgICAgICAgaWYgKHJlY292ZXJpbmcgPiAwKVxuICAgICAgICAgICAgICAgICAgICByZWNvdmVyaW5nLS07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN5bWJvbCA9IHByZUVycm9yU3ltYm9sO1xuICAgICAgICAgICAgICAgIHByZUVycm9yU3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICBsZW4gPSB0aGlzLnByb2R1Y3Rpb25zX1thY3Rpb25bMV1dWzFdO1xuICAgICAgICAgICAgeXl2YWwuJCA9IHZzdGFja1t2c3RhY2subGVuZ3RoIC0gbGVuXTtcbiAgICAgICAgICAgIHl5dmFsLl8kID0ge2ZpcnN0X2xpbm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0KCk7XG4gICAgICAgIHZhciBjID0gbmV3IEFycmF5KHByZS5sZW5ndGggKyAxKS5qb2luKFwiLVwiKTtcbiAgICAgICAgcmV0dXJuIHByZSArIHRoaXMudXBjb21pbmdJbnB1dCgpICsgXCJcXG5cIiArIGMrXCJeXCI7XG4gICAgfSxcbm5leHQ6ZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCF0aGlzLl9pbnB1dCkgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgICB2YXIgdG9rZW4sXG4gICAgICAgICAgICBtYXRjaCxcbiAgICAgICAgICAgIHRlbXBNYXRjaCxcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgY29sLFxuICAgICAgICAgICAgbGluZXM7XG4gICAgICAgIGlmICghdGhpcy5fbW9yZSkge1xuICAgICAgICAgICAgdGhpcy55eXRleHQgPSAnJztcbiAgICAgICAgICAgIHRoaXMubWF0Y2ggPSAnJztcbiAgICAgICAgfVxuICAgICAgICB2YXIgcnVsZXMgPSB0aGlzLl9jdXJyZW50UnVsZXMoKTtcbiAgICAgICAgZm9yICh2YXIgaT0wO2kgPCBydWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdGVtcE1hdGNoID0gdGhpcy5faW5wdXQubWF0Y2godGhpcy5ydWxlc1tydWxlc1tpXV0pO1xuICAgICAgICAgICAgaWYgKHRlbXBNYXRjaCAmJiAoIW1hdGNoIHx8IHRlbXBNYXRjaFswXS5sZW5ndGggPiBtYXRjaFswXS5sZW5ndGgpKSB7XG4gICAgICAgICAgICAgICAgbWF0Y2ggPSB0ZW1wTWF0Y2g7XG4gICAgICAgICAgICAgICAgaW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5vcHRpb25zLmZsZXgpIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgbGluZXMgPSBtYXRjaFswXS5tYXRjaCgvKD86XFxyXFxuP3xcXG4pLiovZyk7XG4gICAgICAgICAgICBpZiAobGluZXMpIHRoaXMueXlsaW5lbm8gKz0gbGluZXMubGVuZ3RoO1xuICAgICAgICAgICAgdGhpcy55eWxsb2MgPSB7Zmlyc3RfbGluZTogdGhpcy55eWxsb2MubGFzdF9saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9saW5lOiB0aGlzLnl5bGluZW5vKzEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdF9jb2x1bW46IHRoaXMueXlsbG9jLmxhc3RfY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9jb2x1bW46IGxpbmVzID8gbGluZXNbbGluZXMubGVuZ3RoLTFdLmxlbmd0aC1saW5lc1tsaW5lcy5sZW5ndGgtMV0ubWF0Y2goL1xccj9cXG4/LylbMF0ubGVuZ3RoIDogdGhpcy55eWxsb2MubGFzdF9jb2x1bW4gKyBtYXRjaFswXS5sZW5ndGh9O1xuICAgICAgICAgICAgdGhpcy55eXRleHQgKz0gbWF0Y2hbMF07XG4gICAgICAgICAgICB0aGlzLm1hdGNoICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgdGhpcy5tYXRjaGVzID0gbWF0Y2g7XG4gICAgICAgICAgICB0aGlzLnl5bGVuZyA9IHRoaXMueXl0ZXh0Lmxlbmd0aDtcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMucmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgdGhpcy55eWxsb2MucmFuZ2UgPSBbdGhpcy5vZmZzZXQsIHRoaXMub2Zmc2V0ICs9IHRoaXMueXlsZW5nXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX21vcmUgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuX2lucHV0ID0gdGhpcy5faW5wdXQuc2xpY2UobWF0Y2hbMF0ubGVuZ3RoKTtcbiAgICAgICAgICAgIHRoaXMubWF0Y2hlZCArPSBtYXRjaFswXTtcbiAgICAgICAgICAgIHRva2VuID0gdGhpcy5wZXJmb3JtQWN0aW9uLmNhbGwodGhpcywgdGhpcy55eSwgdGhpcywgcnVsZXNbaW5kZXhdLHRoaXMuY29uZGl0aW9uU3RhY2tbdGhpcy5jb25kaXRpb25TdGFjay5sZW5ndGgtMV0pO1xuICAgICAgICAgICAgaWYgKHRoaXMuZG9uZSAmJiB0aGlzLl9pbnB1dCkgdGhpcy5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAodG9rZW4pIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgIGVsc2UgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLl9pbnB1dCA9PT0gXCJcIikge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuRU9GO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VFcnJvcignTGV4aWNhbCBlcnJvciBvbiBsaW5lICcrKHRoaXMueXlsaW5lbm8rMSkrJy4gVW5yZWNvZ25pemVkIHRleHQuXFxuJyt0aGlzLnNob3dQb3NpdGlvbigpLFxuICAgICAgICAgICAgICAgICAgICB7dGV4dDogXCJcIiwgdG9rZW46IG51bGwsIGxpbmU6IHRoaXMueXlsaW5lbm99KTtcbiAgICAgICAgfVxuICAgIH0sXG5sZXg6ZnVuY3Rpb24gbGV4KCkge1xuICAgICAgICB2YXIgciA9IHRoaXMubmV4dCgpO1xuICAgICAgICBpZiAodHlwZW9mIHIgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICByZXR1cm4gcjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmxleCgpO1xuICAgICAgICB9XG4gICAgfSxcbmJlZ2luOmZ1bmN0aW9uI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ZSgtMikgPT09IFwiXFxcXFxcXFxcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcIm11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYoeXlfLnl5dGV4dC5zbGljZSgtMSkgPT09IFwiXFxcXFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaXAoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwiZW11XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmVnaW4oXCJtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih5eV8ueXl0ZXh0KSByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAxOnJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDM6dGhpcy5iZWdpbigncmF3Jyk7IHJldHVybiAxNTtcbmJyZWFrO1xuY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucG9wU3RhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTaG91bGQgYmUgdXNpbmcgYHRoaXMudG9wU3RhdGUoKWAgYmVsb3csIGJ1dCBpdCBjdXJyZW50bHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm5zIHRoZSBzZWNvbmQgdG9wIGluc3RlYWQgb2YgdGhlIGZpcnN0IHRvcC4gT3BlbmVkIGFuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXNzdWUgYWJvdXQgaXQgYXQgaHR0cHM6Ly9naXRodWIuY29tL3phYWNoL2ppc29uL2lzc3Vlcy8yOTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSA9PT0gJ3JhdycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeXlfLnl5dGV4dCA9IHl5Xy55eXRleHQuc3Vic3RyKDUsIHl5Xy55eWxlbmctOSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ0VORF9SQVdfQkxPQ0snO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuYnJlYWs7XG5jYXNlIDU6IHJldHVybiAxNTsgXG5icmVhaztcbmNhc2UgNjpcbiAgdGhpcy5wb3BTdGF0ZSgpO1xuICByZXR1cm4gMTQ7XG5cbmJyZWFrO1xuY2FzZSA3OnJldHVybiA2NTtcbmJyZWFrO1xuY2FzZSA4OnJldHVybiA2ODtcbmJyZWFrO1xuY2FzZSA5OiByZXR1cm4gMTk7IFxuYnJlYWs7XG5jYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoa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xcLlxcLzstPkBcXFstXFxeYFxcey1+XSsoPz1bPX1cXHNcXC8uXSlcXH1cXH1cXH1cXH0pLywvXig/OlteXFx4MDBdKj8oPz0oXFx7XFx7XFx7XFx7KSkpLywvXig/OltcXHNcXFNdKj8tLSh+KT9cXH1cXH0pLywvXig/OlxcKCkvLC9eKD86XFwpKS8sL14oPzpcXHtcXHtcXHtcXHspLywvXig/OlxcfVxcfVxcfVxcfSkvLC9eKD86XFx7XFx7KH4pPz4pLywvXig/Olxce1xceyh+KT8jPikvLC9eKD86XFx7XFx7KH4pPyNcXCo/KS8sL14oPzpcXHtcXHsofik/XFwvKS8sL14oPzpcXHtcXHsofik/XFxeXFxzKih+KT9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXHMqZWxzZVxccyoofik/XFx9XFx9KS8sL14oPzpcXHtcXHsofik/XFxeKS8sL14oPzpcXHtcXHsofik/XFxzKmVsc2VcXGIpLywvXig/Olxce1xceyh+KT9cXHspLywvXig/Olxce1xceyh+KT8mKS8sL14oPzpcXHtcXHsofik/IS0tKS8sL14oPzpcXHtcXHsofik/IVtcXHNcXFNdKj9cXH1cXH0pLywvXig/Olxce1xceyh+KT9cXCo/KS8sL14oPzo9KS8sL14oPzpcXC5cXC4pLywvXig/OlxcLig/PShbPX59XFxzXFwvLil8XSkpKS8sL14oPzpbXFwvLl0pLywvXig/OlxccyspLywvXig/OlxcfSh+KT9cXH1cXH0pLywvXig/Oih+KT9cXH1cXH0pLywvXig/OlwiKFxcXFxbXCJdfFteXCJdKSpcIikvLC9eKD86JyhcXFxcWyddfFteJ10pKicpLywvXig/OkApLywvXig/OnRydWUoPz0oW359XFxzKV0pKSkvLC9eKD86ZmFsc2UoPz0oW359XFxzKV0pKSkvLC9eKD86dW5kZWZpbmVkKD89KFt+fVxccyldKSkpLywvXig/Om51bGwoPz0oW359XFxzKV0pKSkvLC9eKD86LT9bMC05XSsoPzpcXC5bMC05XSspPyg/PShbfn1cXHMpXSkpKS8sL14oPzphc1xccytcXHwpLywvXig/OlxcfCkvLC9eKD86KFteXFxzIVwiIyUtLFxcLlxcLzstPkBcXFstXFxeYFxcey1+XSsoPz0oWz1+fVxcc1xcLy4pfF0pKSkpLywvXig/OlxcWyhcXFxcXFxdfFteXFxdXSkqXFxdKS8sL14oPzouKS8sL14oPzokKS9dO1xubGV4ZXIuY29uZGl0aW9ucyA9IHtcIm11XCI6e1wicnVsZXNcIjpbNyw4LDksMTAsMTEsMTIsMTMsMTQsMTUsMTYsMTcsMTgsMTksMjAsMjEsMjIsMjMsMjQsMjUsMjYsMjcsMjgsMjksMzAsMzEsMzIsMzMsMzQsMzUsMzYsMzcsMzgsMzksNDAsNDEsNDIsNDMsNDRdLFwiaW5jbHVzaXZlXCI6ZmFsc2V9LFwiZW11XCI6e1wicnVsZXNcIjpbMl0sXCJpbmNsdXNpdmVcIjpmYWxzZX0sXCJjb21cIjp7XCJydWxlc1wiOls2XSxcImluY2x1c2l2ZVwiOmZhbHNlfSxcInJhd1wiOntcInJ1bGVzXCI6WzMsNCw1XSxcImluY2x1c2l2ZVwiOmZhbHNlfSxcIklOSVRJQUxcIjp7XCJydWxlc1wiOlswLDEsNDRdLFwiaW5jbHVzaXZlXCI6dHJ1ZX19O1xucmV0dXJuIGxleGVyO30pKClcbnBhcnNlci5sZXhlciA9IGxleGVyO1xuZnVuY3Rpb24gUGFyc2VyICgpIHsgdGhpcy55eSA9IHt9OyB9UGFyc2VyLnByb3RvdHlwZSA9IHBhcnNlcjtwYXJzZXIuUGFyc2VyID0gUGFyc2VyO1xucmV0dXJuIG5ldyBQYXJzZXI7XG59KSgpO2V4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5leHBvcnRzWydkZWZhdWx0J10gPSBoYW5kbGViYXJzO1xuIl19 +; +define('handlebars/compiler/visitor',['exports', 'module', '../exception'], function (exports, module, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function Visitor() { + this.parents = []; + } + + Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _Exception['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _Exception['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _Exception['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } + }; + + function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); + } + function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); + } + + module.exports = Visitor; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3Zpc2l0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBRUEsV0FBUyxPQUFPLEdBQUc7QUFDakIsUUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7R0FDbkI7O0FBRUQsU0FBTyxDQUFDLFNBQVMsR0FBRztBQUNsQixlQUFXLEVBQUUsT0FBTztBQUNwQixZQUFRLEVBQUUsS0FBSzs7O0FBR2YsYUFBUyxFQUFFLG1CQUFTLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDOUIsVUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUNwQyxVQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7OztBQUdqQixZQUFJLEtBQUssSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxFQUFFO0FBQzNDLGdCQUFNLDBCQUFjLHdCQUF3QixHQUFHLEtBQUssQ0FBQyxJQUFJLEdBQUcseUJBQXlCLEdBQUcsSUFBSSxHQU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cpO1xuICB0aGlzLmFjY2VwdEFycmF5KG11c3RhY2hlLnBhcmFtcyk7XG4gIHRoaXMuYWNjZXB0S2V5KG11c3RhY2hlLCAnaGFzaCcpO1xufVxuZnVuY3Rpb24gdmlzaXRCbG9jayhibG9jaykge1xuICB2aXNpdFN1YkV4cHJlc3Npb24uY2FsbCh0aGlzLCBibG9jayk7XG5cbiAgdGhpcy5hY2NlcHRLZXkoYmxvY2ssICdwcm9ncmFtJyk7XG4gIHRoaXMuYWNjZXB0S2V5KGJsb2NrLCAnaW52ZXJzZScpO1xufVxuZnVuY3Rpb24gdmlzaXRQYXJ0aWFsKHBhcnRpYWwpIHtcbiAgdGhpcy5hY2NlcHRSZXF1aXJlZChwYXJ0aWFsLCAnbmFtZScpO1xuICB0aGlzLmFjY2VwdEFycmF5KHBhcnRpYWwucGFyYW1zKTtcbiAgdGhpcy5hY2NlcHRLZXkocGFydGlhbCwgJ2hhc2gnKTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgVmlzaXRvcjtcbiJdfQ== +; +define('handlebars/compiler/whitespace-control',['exports', 'module', './visitor'], function (exports, module, _visitor) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Visitor = _interopRequireDefault(_visitor); + + function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; + } + WhitespaceControl.prototype = new _Visitor['default'](); + + WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; + }; + + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; + }; + + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; + }; + + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + + function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + + // Marks the node to the right of the position as omitted. + // I.e. {{foo}}' ' will mark the ' ' node as omitted. + // + // If i is undefined, then the first child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; + } + + // Marks the node to the left of the position as omitted. + // I.e. ' '{{foo}} will mark the ' ' node as omitted. + // + // If i is undefined then the last child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + + module.exports = WhitespaceControl; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3doaXRlc3BhY2UtY29udHJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFFQSxXQUFTLGlCQUFpQixHQUFlO1FBQWQsT0FBTyx5REFBRyxFQUFFOztBQUNyQyxRQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztHQUN4QjtBQUNELG1CQUFpQixDQUFDLFNBQVMsR0FBRyx5QkFBYSxDQUFDOztBQUU1QyxtQkFBaUIsQ0FBQyxTQUFTLENBQUMsT0FBTyxHQUFHLFVBQVMsT0FBTyxFQUFFO0FBQ3RELFFBQU0sWUFBWSxHQUFHLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQzs7QUFFcEQsUUFBSSxNQUFNLEdBQUcsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDO0FBQzlCLFFBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDOztBQUV2QixRQUFJLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLFNBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDM0MsVUFBSSxPQUFPLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0FBQztVQUNqQixLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQzs7QUFFakMsVUFBSSxDQUFDLEtBQUssRUFBRTtBQUNWLGlCQUFTO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1cnJlbnQudHlwZSAhPT0gJ0NvbnRlbnRTdGF0ZW1lbnQnIHx8ICghbXVsdGlwbGUgJiYgY3VycmVudC5sZWZ0U3RyaXBwZWQpKSB7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgLy8gV2Ugb21pdCB0aGUgbGFzdCBub2RlIGlmIGl0J3Mgd2hpdGVzcGFjZSBvbmx5IGFuZCBub3QgcHJlY2VlZGVkIGJ5IGEgbm9uLWNvbnRlbnQgbm9kZS5cbiAgbGV0IG9yaWdpbmFsID0gY3VycmVudC52YWx1ZTtcbiAgY3VycmVudC52YWx1ZSA9IGN1cnJlbnQudmFsdWUucmVwbGFjZShtdWx0aXBsZSA/ICgvXFxzKyQvKSA6ICgvWyBcXHRdKyQvKSwgJycpO1xuICBjdXJyZW50LmxlZnRTdHJpcHBlZCA9IGN1cnJlbnQudmFsdWUgIT09IG9yaWdpbmFsO1xuICByZXR1cm4gY3VycmVudC5sZWZ0U3RyaXBwZWQ7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFdoaXRlc3BhY2VDb250cm9sO1xuIl19 +; +define('handlebars/compiler/helpers',['exports', '../exception'], function (exports, _exception) { + 'use strict'; + + exports.__esModule = true; + exports.SourceLocation = SourceLocation; + exports.id = id; + exports.stripFlags = stripFlags; + exports.stripComment = stripComment; + exports.preparePath = preparePath; + exports.prepareMustache = prepareMustache; + exports.prepareRawBlock = prepareRawBlock; + exports.prepareBlock = prepareBlock; + exports.prepareProgram = prepareProgram; + exports.preparePartialBlock = preparePartialBlock; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _Exception['default'](open.path.original + " doesn't match " + close, errorNode); + } + } + + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } + } + + function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; + } + + function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); + } + + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _Exception['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; + } + + function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _Exception['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; + } + + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxXQUFTLGFBQWEsQ0FBQyxJQUFJLEVBQUUsS0FBSyxFQUFFO0FBQ2xDLFNBQUssR0FBRyxLQUFLLENBQUMsSUFBSSxHQUFHLEtBQUssQ0FBQy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c3RhcnQubGluZSxcbiAgICAgICAgICBjb2x1bW46IGZpcnN0TG9jLnN0YXJ0LmNvbHVtblxuICAgICAgICB9LFxuICAgICAgICBlbmQ6IHtcbiAgICAgICAgICBsaW5lOiBsYXN0TG9jLmVuZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogbGFzdExvYy5lbmQuY29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUHJvZ3JhbScsXG4gICAgYm9keTogc3RhdGVtZW50cyxcbiAgICBzdHJpcDoge30sXG4gICAgbG9jOiBsb2NcbiAgfTtcbn1cblxuXG5leHBvcnQgZnVuY3Rpb24gcHJlcGFyZVBhcnRpYWxCbG9jayhvcGVuLCBwcm9ncmFtLCBjbG9zZSwgbG9jSW5mbykge1xuICB2YWxpZGF0ZUNsb3NlKG9wZW4sIGNsb3NlKTtcblxuICByZXR1cm4ge1xuICAgIHR5cGU6ICdQYXJ0aWFsQmxvY2tTdGF0ZW1lbnQnLFxuICAgIG5hbWU6IG9wZW4ucGF0aCxcbiAgICBwYXJhbXM6IG9wZW4ucGFyYW1zLFxuICAgIGhhc2g6IG9wZW4uaGFzaCxcbiAgICBwcm9ncmFtLFxuICAgIG9wZW5TdHJpcDogb3Blbi5zdHJpcCxcbiAgICBjbG9zZVN0cmlwOiBjbG9zZSAmJiBjbG9zZS5zdHJpcCxcbiAgICBsb2M6IHRoaXMubG9jSW5mbyhsb2NJbmZvKVxuICB9O1xufVxuXG4iXX0= +; +define('handlebars/compiler/base',['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) { + 'use strict'; + + exports.__esModule = true; + exports.parse = parse; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _parser2 = _interopRequireDefault(_parser); + + var _WhitespaceControl = _interopRequireDefault(_whitespaceControl); + + exports.parser = _parser2['default']; + + var yy = {}; + _utils.extend(yy, _helpers); + + function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var strip = new _WhitespaceControl['default'](options); + return strip.accept(_parser2['default'].parse(input)); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztVQUtTLE1BQU07O0FBRWYsTUFBSSxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ1osU0FMUyxNQUFNLENBS1IsRUFBRSxXQUFVLENBQUM7O0FBRWIsV0FBUyxLQUFLLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRTs7QUFFcEMsUUFBSSxLQUFLLENBQUMsSUFBSSxLQUFLLFNBQVMsRUFBRTtBQUFFLGFBQU8sS0FBSyxDQUFDO0tBQUU7O0FBRS9DLHdCQUFPLEVBQUUsR0FBRyxFQUFFLENBQUM7OztBQUdmLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxPQUFPLEVBQUU7QUFDN0IsYUFBTyxJQUFJLEVBQUUsQ0FBQyxjQUFjLENBQUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDbkUsQ0FBQzs7QUFFRixRQUFJLEtBQUssR0FBRyxrQ0FBc0IsT0FBTyxDQUFDLENBQUM7QUFDM0MsV0FBTyxLQUFLLENBQUMsTUFBTSxDQUFDLG9CQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0dBQzFDIiwiZmlsZSI6ImJhc2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGFyc2VyIGZyb20gJy4vcGFyc2VyJztcbmltcG9ydCBXaGl0ZXNwYWNlQ29udHJvbCBmcm9tICcuL3doaXRlc3BhY2UtY29udHJvbCc7XG5pbXBvcnQgKiBhcyBIZWxwZXJzIGZyb20gJy4vaGVscGVycyc7XG5pbXBvcnQgeyBleHRlbmQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCB7IHBhcnNlciB9O1xuXG5sZXQgeXkgPSB7fTtcbmV4dGVuZCh5eSwgSGVscGVycyk7XG5cbmV4cG9ydCBmdW5jdGlvbiBwYXJzZShpbnB1dCwgb3B0aW9ucykge1xuICAvLyBKdXN0IHJldHVybiBpZiBhbiBhbHJlYWR5LWNvbXBpbGVkIEFTVCB3YXMgcGFzc2VkIGluLlxuICBpZiAoaW5wdXQudHlwZSA9PT0gJ1Byb2dyYW0nKSB7IHJldHVybiBpbnB1dDsgfVxuXG4gIHBhcnNlci55eSA9IHl5O1xuXG4gIC8vIEFsdGVyaW5nIHRoZSBzaGFyZWQgb2JqZWN0IGhlcmUsIGJ1dCB0aGlzIGlzIG9rIGFzIHBhcnNlciBpcyBhIHN5bmMgb3BlcmF0aW9uXG4gIHl5LmxvY0luZm8gPSBmdW5jdGlvbihsb2NJbmZvKSB7XG4gICAgcmV0dXJuIG5ldyB5eS5Tb3VyY2VMb2NhdGlvbihvcHRpb25zICYmIG9wdGlvbnMuc3JjTmFtZSwgbG9jSW5mbyk7XG4gIH07XG5cbiAgbGV0IHN0cmlwID0gbmV3IFdoaXRlc3BhY2VDb250cm9sKG9wdGlvbnMpO1xuICByZXR1cm4gc3RyaXAuYWNjZXB0KHBhcnNlci5wYXJzZShpbnB1dCkpO1xufVxuIl19 +; +define('handlebars/compiler/compiler',['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { + /* eslint-disable new-cap */ + + 'use strict'; + + exports.__esModule = true; + exports.Compiler = Compiler; + exports.precompile = precompile; + exports.compile = compile; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _AST = _interopRequireDefault(_ast); + + var slice = [].slice; + + function Compiler() {} + + // the foundHelper register will disambiguate helper lookup from finding a + // function in a context. This is necessary for mustache compatibility, which + // requires that context functions in blocks are evaluated by blockHelperMissing, + // and then proceed as if the resulting value was provided to blockHelperMissing. + + Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + var knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (var _name in knownHelpers) { + /* istanbul ignore else */ + if (_name in knownHelpers) { + options.knownHelpers[_name] = knownHelpers[_name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _Exception['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _Exception['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _Exception['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _AST['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _AST['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _AST['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _AST['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name2 = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[_name2]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_AST['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + + function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); + } + + function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + + function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjp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4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG59XG5cbmZ1bmN0aW9uIHRyYW5zZm9ybUxpdGVyYWxUb1BhdGgoc2V4cHIpIHtcbiAgaWYgKCFzZXhwci5wYXRoLnBhcnRzKSB7XG4gICAgbGV0IGxpdGVyYWwgPSBzZXhwci5wYXRoO1xuICAgIC8vIENhc3RpbmcgdG8gc3RyaW5nIGhlcmUgdG8gbWFrZSBmYWxzZSBhbmQgMCBsaXRlcmFsIHZhbHVlcyBwbGF5IG5pY2VseSB3aXRoIHRoZSByZXN0XG4gICAgLy8gb2YgdGhlIHN5c3RlbS5cbiAgICBzZXhwci5wYXRoID0ge1xuICAgICAgdHlwZTogJ1BhdGhFeHByZXNzaW9uJyxcbiAgICAgIGRhdGE6IGZhbHNlLFxuICAgICAgZGVwdGg6IDAsXG4gICAgICBwYXJ0czogW2xpdGVyYWwub3JpZ2luYWwgKyAnJ10sXG4gICAgICBvcmlnaW5hbDogbGl0ZXJhbC5vcmlnaW5hbCArICcnLFxuICAgICAgbG9jOiBsaXRlcmFsLmxvY1xuICAgIH07XG4gIH1cbn1cbiJdfQ== +; +define('handlebars/compiler/code-gen',['exports', 'module', '../utils'], function (exports, module, _utils) { + /* global define */ + 'use strict'; + + var SourceNode = undefined; + + try { + /* istanbul ignore next */ + if (typeof define !== 'function' || !define.amd) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } + } catch (err) {} + /* NOP */ + + /* istanbul ignore if: tested but not covered in istanbul due to dist build */ + if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; + } + + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + var pairs = []; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + var value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } + }; + + module.exports = CodeGen; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFHQSxNQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLE1BQUk7O0FBRUYsUUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFHL0MsVUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3RDLGdCQUFVLEdBQUcsU0FBUyxDQUFDLFVBQVUsQ0FBQztLQUNuQztHQUNGLENBQUMsT0FBTyxHQUFHLEVBQUUsRUFFYjs7OztBQUFBLEFBR0QsTUFBSSxDQUFDLFVBQVUsRUFBRTtBQUNmLGNBQVUsR0FBRyxVQUFTLElBQUksRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRTtBQUNuRCxVQUFJLENBQUMsR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNkLFVBQUksTUFBTSxFQUFFO0FBQ1YsWUFBSSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQztPQUNsQjtLQUNGLENBQUM7O0FBRUYsY0FBVSxDQUFDLFNBQVMsR0FBRztBQUNyQixTQUFHLEVBQUUsYUFBUyxNQUFNLE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oaXMuZ2VuZXJhdGVMaXN0KGVudHJpZXMpO1xuICAgIHJldC5wcmVwZW5kKCdbJyk7XG4gICAgcmV0LmFkZCgnXScpO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29kZUdlbjtcblxuIl19 +; +define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _CodeGen = _interopRequireDefault(_codeGen); + + function Literal(value) { + this.value = value; + } + + function JavaScriptCompiler() {} + + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _Exception['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _CodeGen['default'](this.options.srcName); + this.decorators = new _CodeGen['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + for (var alias in this.aliases) { + // eslint-disable-line guard-for-in + var node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + var lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _Exception['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _Exception['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } + }; + + (function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + + JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + + function strictLookup(requireTerminal, compiler, parts, type) { + var stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } + } + + module.exports = JavaScriptCompiler; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFLQSxXQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsUUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7R0FDcEI7O0FBRUQsV0FBUyxrQkFBa0IsR0FBRyxFQUFFOztBQUVoQyxvQkFBa0IsQ0FBQyxTQUFTLEdBQUc7OztBQUc3QixjQUFVLEVBQUUsb0JBQVMsTUFBTSxFQUFFLElBQUksY0FBYTtBQUM1QyxVQUFJLGtCQUFrQixDQUFDLDZCQUE2QixDQUFDLElBQUksQ0FBQyxFQUFFO0FBQzFELGVBQU8sQ0FBQyxNQUFNLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDO09BQzVCLE1BQU07QUFDTCxlQUFPLENBQUMsTUFBTSxFQUFFLEdBQUcsRUFBRSxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDO09BQ2pEO0tBQ0Y7QUFDRCxpQkFBYSxFQUFFLHVCQUFTLElBQUksRUFBRTtBQUM1QixhQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLFlBQVksRUFBRSxJQUFJLEVBQUUsSUFBSSxDQ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ZWxwZXInKSxcbiAgICAgICAgY2FsbENvbnRleHQgPSB0aGlzLmFsaWFzYWJsZShgJHt0aGlzLmNvbnRleHROYW1lKDApfSAhPSBudWxsID8gJHt0aGlzLmNvbnRleHROYW1lKDApfSA6IHt9YCk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgcGFyYW1zOiBwYXJhbXMsXG4gICAgICBwYXJhbXNJbml0OiBwYXJhbXNJbml0LFxuICAgICAgbmFtZTogZm91bmRIZWxwZXIsXG4gICAgICBjYWxsUGFyYW1zOiBbY2FsbENvbnRleHRdLmNvbmNhdChwYXJhbXMpXG4gICAgfTtcbiAgfSxcblxuICBzZXR1cFBhcmFtczogZnVuY3Rpb24oaGVscGVyLCBwYXJhbVNpemUsIHBhcmFtcykge1xuICAgIGxldCBvcHRpb25zID0ge30sXG4gICAgICAgIGNvbnRleHRzID0gW10sXG4gICAgICAgIHR5cGVzID0gW10sXG4gICAgICAgIGlkcyA9IFtdLFxuICAgICAgICBvYmplY3RBcmdzID0gIXBhcmFtcyxcbiAgICAgICAgcGFyYW07XG5cbiAgICBpZiAob2JqZWN0QXJncykge1xuICAgICAgcGFyYW1zID0gW107XG4gICAgfVxuXG4gICAgb3B0aW9ucy5uYW1lID0gdGhpcy5xdW90ZWRTdHJpbmcoaGVscGVyKTtcbiAgICBvcHRpb25zLmhhc2ggPSB0aGlzLnBvcFN0YWNrKCk7XG5cbiAgICBpZiAodGhpcy50cmFja0lkcykge1xuICAgICAgb3B0aW9ucy5oYXNoSWRzID0gdGhpcy5wb3BTdGFjaygpO1xuICAgIH1cbiAgICBpZiAodGhpcy5zdHJpbmdQYXJhbXMpIHtcbiAgICAgIG9wdGlvbnMuaGFzaFR5cGVzID0gdGhpcy5wb3BTdGFjaygpO1xuICAgICAgb3B0aW9ucy5oYXNoQ29udGV4dHMgPSB0aGlzLnBvcFN0YWNrKCk7XG4gICAgfVxuXG4gICAgbGV0IGludmVyc2UgPSB0aGlzLnBvcFN0YWNrKCksXG4gICAgIC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VyV29yZHNbcmVzZXJ2ZWRXb3Jkc1tpXV0gPSB0cnVlO1xuICB9XG59KCkpO1xuXG5KYXZhU2NyaXB0Q29tcGlsZXIuaXNWYWxpZEphdmFTY3JpcHRWYXJpYWJsZU5hbWUgPSBmdW5jdGlvbihuYW1lKSB7XG4gIHJldHVybiAhSmF2YVNjcmlwdENvbXBpbGVyLlJFU0VSVkVEX1dPUkRTW25hbWVdICYmICgvXlthLXpBLVpfJF1bMC05YS16QS1aXyRdKiQvKS50ZXN0KG5hbWUpO1xufTtcblxuZnVuY3Rpb24gc3RyaWN0TG9va3VwKHJlcXVpcmVUZXJtaW5hbCwgY29tcGlsZXIsIHBhcnRzLCB0eXBlKSB7XG4gIGxldCBzdGFjayA9IGNvbXBpbGVyLnBvcFN0YWNrKCksXG4gICAgICBpID0gMCxcbiAgICAgIGxlbiA9IHBhcnRzLmxlbmd0aDtcbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIGxlbi0tO1xuICB9XG5cbiAgZm9yICg7IGkgPCBsZW47IGkrKykge1xuICAgIHN0YWNrID0gY29tcGlsZXIubmFtZUxvb2t1cChzdGFjaywgcGFydHNbaV0sIHR5cGUpO1xuICB9XG5cbiAgaWYgKHJlcXVpcmVUZXJtaW5hbCkge1xuICAgIHJldHVybiBbY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksICcoJywgc3RhY2ssICcsICcsIGNvbXBpbGVyLnF1b3RlZFN0cmluZyhwYXJ0c1tpXSksICcpJ107XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== +; +define('handlebars',['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _runtime = _interopRequireDefault(_handlebarsRuntime); + + // Compiler imports + + var _AST = _interopRequireDefault(_handlebarsCompilerAst); + + var _JavaScriptCompiler = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + + var _Visitor = _interopRequireDefault(_handlebarsCompilerVisitor); + + var _noConflict = _interopRequireDefault(_handlebarsNoConflict); + + var _create = _runtime['default'].create; + function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _AST['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _JavaScriptCompiler['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + + return hb; + } + + var inst = create(); + inst.create = create; + + _noConflict['default'](inst); + + inst.Visitor = _Visitor['default']; + + inst['default'] = inst; + + module.exports = inst; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFXQSxNQUFJLE9BQU8sR0FBRyxvQkFBUSxNQUFNLENBQUM7QUFDN0IsV0FBUyxNQUFNLEdBQUc7QUFDaEIsUUFBSSxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUM7O0FBRW5CLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3BDLGFBQU8sNEJBWFEsT0F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2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0= +; diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.amd.min.js b/tools/eslint/node_modules/handlebars/dist/handlebars.amd.min.js new file mode 100644 index 00000000000000..8e345fd9409446 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.amd.min.js @@ -0,0 +1,29 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return a||0===a?o(a)&&0===a.length?!0:!1:!0}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===m.call(a):!1};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;l>h;h++)h in a&&d(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&d(m,h-1),m=n,h++);void 0!==m&&d(m,h-1,!0)}return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("if",function(a,b){return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=h;var i=g(c),j=g(f),k="4.0.5";a.VERSION=k;var l=7;a.COMPILER_REVISION=l;var m={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};a.REVISION_CHANGES=m;var n="[object Object]";h.prototype={constructor:h,logger:j["default"],log:j["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===n){if(c)throw new i["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===n)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new i["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===n){if(c)throw new i["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]}};var o=j["default"].log;a.log=o,a.createFrame=b.createFrame,a.logger=j["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/runtime",["exports","./utils","./exception","./base"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(b!==c){if(c>b){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new n["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new n["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function g(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f);var g=c.VM.invokePartial.call(this,d,e,f);if(null==g&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),g=f.partials[f.name](e,f)),null!=g){if(f.indent){for(var h=g.split("\n"),i=0,j=h.length;j>i&&(h[i]||i+1!==j);i++)h[i]=f.indent+h[i];g=h.join("\n")}return g}throw new n["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function e(b){function c(b){return""+a.main(f,b,f.helpers,f.partials,g,i,h)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=d.data;e._setup(d),!d.partial&&a.useData&&(g=l(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=d.depths?b!==d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=m(a.main,c,f,d.depths||[],g,i))(b,d)}if(!c)throw new n["default"]("No environment passed to template");if(!a||!a.main)throw new n["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var f={strict:function(a,b){if(!(b in a))throw new n["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=h(this,a,g,b,c,d,e):f||(f=this.programs[a]=h(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},noop:c.VM.noop,compilerInfo:a.compiler};return e.isTop=!0,e._setup=function(b){b.partial?(f.helpers=b.helpers,f.partials=b.partials,f.decorators=b.decorators):(f.helpers=f.merge(b.helpers,c.helpers),a.usePartial&&(f.partials=f.merge(b.partials,c.partials)),(a.usePartial||a.useDecorators)&&(f.decorators=f.merge(b.decorators,c.decorators)))},e._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new n["default"]("must pass block params");if(a.useDepths&&!e)throw new n["default"]("must pass parent depths");return h(f,b,a[b],c,0,d,e)},e}function h(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=m(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function i(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function j(a,c,e){e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var f=void 0;if(e.fn&&e.fn!==k&&(e.data=d.createFrame(e.data),f=e.data["partial-block"]=e.fn,f.partials&&(e.partials=b.extend({},e.partials,f.partials))),void 0===a&&f&&(a=f),void 0===a)throw new n["default"]("The partial "+e.name+" could not be found");return a instanceof Function?a(c,e):void 0}function k(){return""}function l(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function m(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}a.__esModule=!0,a.checkRevision=f,a.template=g,a.wrapProgram=h,a.resolvePartial=i,a.invokePartial=j,a.noop=k;var n=e(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){var b="undefined"!=typeof global?global:window,c=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=c),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n}),define("handlebars/compiler/ast",["exports","module"],function(a,b){"use strict";var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b.exports=c}),define("handlebars/compiler/parser",["exports"],function(a){"use strict";var b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l); +var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();a.__esModule=!0,a["default"]=b}),define("handlebars/compiler/visitor",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){this.parents=[]}function f(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function g(a){f.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function h(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var i=d(c);e.prototype={constructor:e,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!e.prototype[c.type])throw new i["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new i["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new i["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:f,Decorator:f,BlockStatement:g,DecoratorBlock:g,PartialStatement:h,PartialBlockStatement:function(a){h.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:f,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b.exports=e}),define("handlebars/compiler/whitespace-control",["exports","module","./visitor"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function f(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function g(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function h(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function i(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var j=d(c);e.prototype=new j["default"],e.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,e=0,j=d.length;j>e;e++){var k=d[e],l=this.accept(k);if(l){var m=f(d,e,c),n=g(d,e,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&h(d,e,!0),l.open&&i(d,e,!0),b&&q&&(h(d,e),i(d,e)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[e-1].original)[1])),b&&o&&(h((k.program||k.inverse).body),i(d,e)),b&&p&&(h(d,e),i((k.inverse||k.program).body))}}return a},e.prototype.BlockStatement=e.prototype.DecoratorBlock=e.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,e=c;if(c&&c.chained)for(d=c.body[0].program;e.chained;)e=e.body[e.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:g(b.body),closeStandalone:f((d||b).body)};if(a.openStrip.close&&h(b.body,null,!0),c){var k=a.inverseStrip;k.open&&i(b.body,null,!0),k.close&&h(d.body,null,!0),a.closeStrip.open&&i(e.body,null,!0),!this.options.ignoreStandalone&&f(b.body)&&g(d.body)&&(i(b.body),h(d.body))}else a.closeStrip.open&&i(b.body,null,!0);return j},e.prototype.Decorator=e.prototype.MustacheStatement=function(a){return a.strip},e.prototype.PartialStatement=e.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b.exports=e}),define("handlebars/compiler/helpers",["exports","../exception"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new o["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new o["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new o["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}a.__esModule=!0,a.SourceLocation=e,a.id=f,a.stripFlags=g,a.stripComment=h,a.preparePath=i,a.prepareMustache=j,a.prepareRawBlock=k,a.prepareBlock=l,a.prepareProgram=m,a.preparePartialBlock=n;var o=c(b)}),define("handlebars/compiler/base",["exports","./parser","./whitespace-control","./helpers","../utils"],function(a,b,c,d,e){"use strict";function f(a){return a&&a.__esModule?a:{"default":a}}function g(a,b){if("Program"===a.type)return a;h["default"].yy=j,j.locInfo=function(a){return new j.SourceLocation(b&&b.srcName,a)};var c=new i["default"](b);return c.accept(h["default"].parse(a))}a.__esModule=!0,a.parse=g;var h=f(b),i=f(c);a.parser=h["default"];var j={};e.extend(j,d)}),define("handlebars/compiler/compiler",["exports","../exception","../utils","./ast"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(){}function g(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function h(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function i(a,b){if(a===b)return!0;if(c.isArray(a)&&c.isArray(b)&&a.length===b.length){for(var d=0;dc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!i(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){j(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){j(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,l["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=l["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:m.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=l["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&l["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||l["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,d=this.options.blockParams.length;d>b;b++){var e=this.options.blockParams[b],f=e&&c.indexOf(e,a);if(e&&f>=0)return[b,f]}}}}),define("handlebars/compiler/code-gen",["exports","module","../utils"],function(a,b,c){"use strict";function d(a,b,d){if(c.isArray(a)){for(var e=[],f=0,g=a.length;g>f;f++)e.push(b.wrap(a[f],d));return e}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=void 0;try{if("function"!=typeof define||!define.amd){var g=require("source-map");f=g.SourceNode}}catch(h){}f||(f=function(a,b,c,d){this.src="",d&&this.add(d)},f.prototype={add:function(a){c.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){c.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new f(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof f?a:(a=d(a,this,b),new f(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b.exports=e}),define("handlebars/compiler/javascript-compiler",["exports","module","../base","../exception","../utils","./code-gen"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a){this.value=a}function i(){}function j(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var k=g(d),l=g(f);i.prototype={nameLookup:function(a,b){return i.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=c.COMPILER_REVISION,b=c.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return e.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new l["default"](this.options.srcName),this.decorators=new l["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var f=this;if(this.options.strict||this.options.assumeObjects)return void this.push(j(this.options.strict&&e,this,b,a));for(var g=b.length;g>c;c++)this.replaceStack(function(e){var g=f.nameLookup(e,b[c],a);return d?[" && ",g]:[" != null ? ",g," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"), +this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof h||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new h(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,d=void 0,e=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var f=this.popStack(!0);if(f instanceof h)c=[f.value],b=["(",c],e=!0;else{d=!0;var g=this.incrStack();b=["((",this.push(g)," = ",f,")"],c=this.topStack()}var i=a.call(this,c);e||this.popStack(),d&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var d=a[b];if(d instanceof h)this.compileStack.push(d);else{var e=this.incrStack();this.pushSource([e," = ",d,";"]),this.compileStack.push(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof h)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof h?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=i.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),i.isValidJavaScriptVariableName=function(a){return!i.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b.exports=i}),define("handlebars",["exports","module","./handlebars.runtime","./handlebars/compiler/ast","./handlebars/compiler/base","./handlebars/compiler/compiler","./handlebars/compiler/javascript-compiler","./handlebars/compiler/visitor","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h,i){"use strict";function j(a){return a&&a.__esModule?a:{"default":a}}function k(){var a=q();return a.compile=function(b,c){return f.compile(b,c,a)},a.precompile=function(b,c){return f.precompile(b,c,a)},a.AST=m["default"],a.Compiler=f.Compiler,a.JavaScriptCompiler=n["default"],a.Parser=e.parser,a.parse=e.parse,a}var l=j(c),m=j(d),n=j(g),o=j(h),p=j(i),q=l["default"].create,r=k();r.create=k,p["default"](r),r.Visitor=o["default"],r["default"]=r,b.exports=r}); \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.js b/tools/eslint/node_modules/handlebars/dist/handlebars.js new file mode 100644 index 00000000000000..182c1be831dee5 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.js @@ -0,0 +1,4608 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsRuntime = __webpack_require__(2); + + var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + + // Compiler imports + + var _handlebarsCompilerAst = __webpack_require__(21); + + var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + + var _handlebarsCompilerBase = __webpack_require__(22); + + var _handlebarsCompilerCompiler = __webpack_require__(27); + + var _handlebarsCompilerJavascriptCompiler = __webpack_require__(28); + + var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + + var _handlebarsCompilerVisitor = __webpack_require__(25); + + var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + + var _handlebarsNoConflict = __webpack_require__(20); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + var _create = _handlebarsRuntime2['default'].create; + function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _handlebarsCompilerAst2['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst.Visitor = _handlebarsCompilerVisitor2['default']; + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(4); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(18); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(6); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(19); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(20); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(7); + + var _decorators = __webpack_require__(15); + + var _logger = __webpack_require__(17); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + + var _helpersBlockHelperMissing = __webpack_require__(8); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(9); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(10); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(11); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(12); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(13); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(14); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(16); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(4); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = Utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global window */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } + }; + + // Must be exported as an object rather than the root of the module as the jison lexer + // must modify the object to operate properly. + exports['default'] = AST; + module.exports = exports['default']; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + exports.__esModule = true; + exports.parse = parse; + + var _parser = __webpack_require__(23); + + var _parser2 = _interopRequireDefault(_parser); + + var _whitespaceControl = __webpack_require__(24); + + var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + + var _helpers = __webpack_require__(26); + + var Helpers = _interopRequireWildcard(_helpers); + + var _utils = __webpack_require__(5); + + exports.parser = _parser2['default']; + + var yy = {}; + _utils.extend(yy, Helpers); + + function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var strip = new _whitespaceControl2['default'](options); + return strip.accept(_parser2['default'].parse(input)); + } + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + /* istanbul ignore next */ + /* Jison generated parser */ + "use strict"; + + var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ + /**/) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = [$$[$0]]; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START + /**/) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); + })();exports.__esModule = true; + exports['default'] = handlebars; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _visitor = __webpack_require__(25); + + var _visitor2 = _interopRequireDefault(_visitor); + + function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; + } + WhitespaceControl.prototype = new _visitor2['default'](); + + WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; + }; + + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; + }; + + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; + }; + + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + + function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + + // Marks the node to the right of the position as omitted. + // I.e. {{foo}}' ' will mark the ' ' node as omitted. + // + // If i is undefined, then the first child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; + } + + // Marks the node to the left of the position as omitted. + // I.e. ' '{{foo}} will mark the ' ' node as omitted. + // + // If i is undefined then the last child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + + exports['default'] = WhitespaceControl; + module.exports = exports['default']; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function Visitor() { + this.parents = []; + } + + Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _exception2['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _exception2['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } + }; + + function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); + } + function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); + } + + exports['default'] = Visitor; + module.exports = exports['default']; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.SourceLocation = SourceLocation; + exports.id = id; + exports.stripFlags = stripFlags; + exports.stripComment = stripComment; + exports.preparePath = preparePath; + exports.prepareMustache = prepareMustache; + exports.prepareRawBlock = prepareRawBlock; + exports.prepareBlock = prepareBlock; + exports.prepareProgram = prepareProgram; + exports.preparePartialBlock = preparePartialBlock; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); + } + } + + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } + } + + function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; + } + + function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); + } + + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; + } + + function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; + } + + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /* eslint-disable new-cap */ + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.Compiler = Compiler; + exports.precompile = precompile; + exports.compile = compile; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _ast = __webpack_require__(21); + + var _ast2 = _interopRequireDefault(_ast); + + var slice = [].slice; + + function Compiler() {} + + // the foundHelper register will disambiguate helper lookup from finding a + // function in a context. This is necessary for mustache compatibility, which + // requires that context functions in blocks are evaluated by blockHelperMissing, + // and then proceed as if the resulting value was provided to blockHelperMissing. + + Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + var knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (var _name in knownHelpers) { + /* istanbul ignore else */ + if (_name in knownHelpers) { + options.knownHelpers[_name] = knownHelpers[_name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _exception2['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _ast2['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name2 = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[_name2]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + + function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); + } + + function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + + function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } + } + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _base = __webpack_require__(4); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _codeGen = __webpack_require__(29); + + var _codeGen2 = _interopRequireDefault(_codeGen); + + function Literal(value) { + this.value = value; + } + + function JavaScriptCompiler() {} + + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _codeGen2['default'](this.options.srcName); + this.decorators = new _codeGen2['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + for (var alias in this.aliases) { + // eslint-disable-line guard-for-in + var node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + var lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _exception2['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _exception2['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } + }; + + (function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + + JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + + function strictLookup(requireTerminal, compiler, parts, type) { + var stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } + } + + exports['default'] = JavaScriptCompiler; + module.exports = exports['default']; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + /* global define */ + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var SourceNode = undefined; + + try { + /* istanbul ignore next */ + if (false) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } + } catch (err) {} + /* NOP */ + + /* istanbul ignore if: tested but not covered in istanbul due to dist build */ + if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; + } + + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + var pairs = []; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + var value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } + }; + + exports['default'] = CodeGen; + module.exports = exports['default']; + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.min.js b/tools/eslint/node_modules/handlebars/dist/handlebars.min.js new file mode 100644 index 00000000000000..4e2aa8fe698c07 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.min.js @@ -0,0 +1,29 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(21),i=e(h),j=c(22),k=c(27),l=c(28),m=e(l),n=c(25),o=e(n),p=c(20),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(18),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(19),p=e(o),q=c(20),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(7),j=c(15),k=c(17),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(23),h=e(g),i=c(24),j=e(i),k=c(26),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16], +48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(25),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;j>i;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;cc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;c>b;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(29),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;h>c;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e), +d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;g>e;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])}); \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.js b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.js new file mode 100644 index 00000000000000..d92447924ea8d1 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.js @@ -0,0 +1,1017 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +define('handlebars/utils',['exports'], function (exports) { + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsTUFBTSxNQUFNLEdBQUc7QUFDYixPQUFHLEVBQUUsT0FBTztBQUNaLE9BQUcsRUFBRSxNQUFNO0FBQ1gsT0FBRyxFQUFFLE1BQU07QUFDWCxPQUFHLEVBQUUsUUFBUTtBQUNiLE9BQUcsRUFBRSxRQUFRO0FBQ2IsT0FBRyxFQUFFLFFBQVE7QUFDYixPQUFHLEVBQUUsUUFBUTtHQUNkLENBQUM7O0FBRUYsTUFBTSxRQUFRLEd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NlO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVGcmFtZShvYmplY3QpIHtcbiAgbGV0IGZyYW1lID0gZXh0ZW5kKHt9LCBvYmplY3QpO1xuICBmcmFtZS5fcGFyZW50ID0gb2JqZWN0O1xuICByZXR1cm4gZnJhbWU7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBibG9ja1BhcmFtcyhwYXJhbXMsIGlkcykge1xuICBwYXJhbXMucGF0aCA9IGlkcztcbiAgcmV0dXJuIHBhcmFtcztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGFwcGVuZENvbnRleHRQYXRoKGNvbnRleHRQYXRoLCBpZCkge1xuICByZXR1cm4gKGNvbnRleHRQYXRoID8gY29udGV4dFBhdGggKyAnLicgOiAnJykgKyBpZDtcbn1cbiJdfQ== +; +define('handlebars/exception',['exports', 'module'], function (exports, module) { + 'use strict'; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + module.exports = Exception; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxNQUFNLFVBQVUsR0FBRyxDQUFDLGFBQWEsRUFBRSxVQUFVLEVBQUUs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Skge1xuICAgIEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKHRoaXMsIEV4Y2VwdGlvbik7XG4gIH1cblxuICBpZiAobG9jKSB7XG4gICAgdGhpcy5saW5lTnVtYmVyID0gbGluZTtcbiAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgfVxufVxuXG5FeGNlcHRpb24ucHJvdG90eXBlID0gbmV3IEVycm9yKCk7XG5cbmV4cG9ydCBkZWZhdWx0IEV4Y2VwdGlvbjtcbiJdfQ== +; +define('handlebars/helpers/block-helper-missing',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFVBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQ3pCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVwQixVQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsZUFB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ZXh0UGF0aChvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsIG9wdGlvbnMubmFtZSk7XG4gICAgICAgIG9wdGlvbnMgPSB7ZGF0YTogZGF0YX07XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICB9XG4gIH0pO1xufVxuIl19 +; +define('handlebars/helpers/each',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _Exception['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3V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GE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dFtmaWVsZF0sIGZpZWxkXSwgW2NvbnRleHRQYXRoICsgZmllbGQsIG51bGxdKVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgaWYgKGNvbnRleHQgJiYgdHlwZW9mIGNvbnRleHQgPT09ICdvYmplY3QnKSB7XG4gICAgICBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgICBmb3IgKGxldCBqID0gY29udGV4dC5sZW5ndGg7IGkgPCBqOyBpKyspIHtcbiAgICAgICAgICBpZiAoaSBpbiBjb250ZXh0KSB7XG4gICAgICAgICAgICBleGVjSXRlcmF0aW9uKGksIGksIGkgPT09IGNvbnRleHQubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBsZXQgcHJpb3JLZXk7XG5cbiAgICAgICAgZm9yIChsZXQga2V5IGluIGNvbnRleHQpIHtcbiAgICAgICAgICBpZiAoY29udGV4dC5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAgIC8vIHRoZSBsYXN0IGl0ZXJhdGlvbiB3aXRob3V0IGhhdmUgdG8gc2NhbiB0aGUgb2JqZWN0IHR3aWNlIGFuZCBjcmVhdGVcbiAgICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICAgIGkrKztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/helper-missing',['exports', 'module', '../exception'], function (exports, module, _exception) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + module.exports = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQWMsbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxDQUFDO09BQ3ZGO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/if',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, condit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Z1bmN0aW9uKGNvbmRpdGlvbmFsLCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnNbJ2lmJ10uY2FsbCh0aGlzLCBjb25kaXRpb25hbCwge2ZuOiBvcHRpb25zLmludmVyc2UsIGludmVyc2U6IG9wdGlvbnMuZm4sIGhhc2g6IG9wdGlvbnMuaGFzaH0pO1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/log',['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7VUFDbEIsT0FBTyxHQUFHLFNBQVMsQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQzlDLFdBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM3QyxZQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO09BQ3pCOztBQUVELFVBQU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S5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuZGF0YS5sZXZlbDtcbiAgICB9XG4gICAgYXJnc1swXSA9IGxldmVsO1xuXG4gICAgaW5zdGFuY2UubG9nKC4uLiBhcmdzKTtcbiAgfSk7XG59XG4iXX0= +; +define('handlebars/helpers/lookup',['exports', 'module'], function (exports, module) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUU7QUFDckQsYUFBTyxHQUFHLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQzFCLENBQUMsQ0FBQztHQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkKSB7XG4gICAgcmV0dXJuIG9iaiAmJiBvYmpbZmllbGRdO1xuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers/with',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7bUJBRWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFVBQUksT0FKc0QsVUFBVSxDQUlyRCxPQUFPLENBQUMsRUFBRTtBQUFFLGVBQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQUU7O0FBRTFELFVBQUksRUFBRSxHQUFHLE9BQU8sQ0FBQyxFQUFFLENBQUM7O0FBRXBCLFVBQUksQ0FBQyxPQVI0QyxPQUFPLENBUTNDLE9BQU8sQ0FBQyxFQUFFO0FBQ3JCLFlBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7QUFDeEIsWUFBSSxPQUFPLENBQUMsSUFBSSxJQUFJLE9BQU8sQ0FBQyxHQUFHLEVBQUU7QUFDL0IsY0FBSSxHQUFHLE9BWHlCLFdBQVcsQ0FXeEIsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pDLGNBQUksQ0FBQyxXQUFXLEdBQUcsT0FabkIsaUJBQWlCLENBWW9CLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUNoRjs7QUFFRCxlQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUU7QUFDakIsY0FBSSxFQUFFLElBQUk7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Jsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dF0sIFtkYXRhICYmIGRhdGEuY29udGV4dFBhdGhdKVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== +; +define('handlebars/helpers',['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); + + var _registerEach = _interopRequireDefault(_helpersEach); + + var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); + + var _registerIf = _interopRequireDefault(_helpersIf); + + var _registerLog = _interopRequireDefault(_helpersLog); + + var _registerLookup = _interopRequireDefault(_helpersLookup); + + var _registerWith = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _registerBlockHelperMissing['default'](instance); + _registerEach['default'](instance); + _registerHelperMissing['default'](instance); + _registerIf['default'](instance); + _registerLog['default'](instance); + _registerLookup['default'](instance); + _registerWith['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFRTyxXQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFBRTtBQUMvQywyQ0FBMkIsUUFBUSxDQUFDLENBQUM7QUFDckMsNkJBQWEsUUF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naXN0ZXJXaXRoKGluc3RhbmNlKTtcbn1cbiJdfQ== +; +define('handlebars/decorators/inline',['exports', 'module', '../utils'], function (exports, module, _utils) { + 'use strict'; + + module.exports = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWckIsTUFBTSxDQVVzQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLG1CQUFTLENB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Rpb25zLmFyZ3NbMF1dID0gb3B0aW9ucy5mbjtcblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 +; +define('handlebars/decorators',['exports', './decorators/inline'], function (exports, _decoratorsInline) { + 'use strict'; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _registerInline = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _registerInline['default'](instance); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== +; +define('handlebars/logger',['exports', 'module', './utils'], function (exports, module, _utils) { + 'use strict'; + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + module.exports = logger; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0sR0FBRztBQUNYLGFBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxTQUFLLEVBQUUsTUFBTTs7O0FBR2IsZUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixVQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixZQUFJLFFBQVEsR0FBRyxPQVRiLE9BQU8sQ0FTYyxNQUFNLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO0FBQzlELFlBQUksUUFBUSxJQUFJLENBQUMsRUFBRTtBQUNqQixlQUFLLEdBQUcsUUFBUSxDQUFDO1NBQ2xCLE1BQU07QUFDTCxlQUFLLEdBQUcsUUFBUSxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztTQUM3QjtPQUNGOztBQUVELGFBQU8sS0FBSyxDQUFDO0tBQ2Q7OztBQUdELE9BQUcsRUFBRSxhQUFTLEtBQUssRUFBYztBQUMvQixXQUFLLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxLQUFLLENBQUMsQ0FBQzs7QUFFbEMsVUFBSSxPQUFPLE9BQU8sS0FBSyxXQUFXL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ICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWwpIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIGlmICghY29uc29sZVttZXRob2RdKSB7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgICAgIG1ldGhvZCA9ICdsb2cnO1xuICAgICAgfVxuICAgICAgY29uc29sZVttZXRob2RdKC4uLm1lc3NhZ2UpOyAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbiAgICB9XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGxvZ2dlcjtcbiJdfQ== +; +define('handlebars/base',['exports', './utils', './exception', './helpers', './decorators', './logger'], function (exports, _utils, _exception, _helpers, _decorators, _logger) { + 'use strict'; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _Exception['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU1PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxD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bn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHtjcmVhdGVGcmFtZSwgbG9nZ2VyfTtcbiJdfQ== +; +define('handlebars/safe-string',['exports', 'module'], function (exports, module) { + // Build out our basic SafeString type + 'use strict'; + + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + module.exports = SafeString; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== +; +define('handlebars/runtime',['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) { + 'use strict'; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Exception = _interopRequireDefault(_exception); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _Exception['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = _utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _Exception['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: _utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = _utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _Exception['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _Exception['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = _utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _Exception['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + _utils.extend(prog, props); + } + return prog; + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUlPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztRQUN2RCxlQUFlLFNBSmQsaUJBQWlCLEFBSWlCLENBQUM7O0FBRTFDLFFBQUksZ0JBQWdCLEtBQUssZUFBZSxFQUFFO0FBQ3hDLFVBQUksZ0JBQWdCLEdBQUcsZUFBZSxFQUFFO0FBQ3RDLFlBQU0sZUFBZSxHQUFHLE1BUkYsZ0JBQWdCLENBUUcsZUFBZSxDQUFDO1lBQ25ELGdCQUFnQixHQUFHLE1BVEgsZ0JBQWdCLENBU0ksZ0JBQWdCLENBQUMsQ0FBQztBQUM1RCxjQUFNLDBCQUFjLHlGQUF5RixHQUN2RyxxREFBcUQsR0FBRyxlQUFlLEdBQUcsbURBQW1ELEdBQUcsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLENBQUM7T0FDaEssTUFBTTs7QUFFTCxjQUFNLDBCQUFjLHdGQUF3RixHQUN0RyxpREFBaUQsR0FBRyxZQUFZLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7T0FDbkY7S0FDRjtHQUNGOztBQUVNLFdBQVMsUUFBU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YXRvcihwcm9nLCBwcm9wcywgY29udGFpbmVyLCBkZXB0aHMgJiYgZGVwdGhzWzBdLCBkYXRhLCBibG9ja1BhcmFtcywgZGVwdGhzKTtcbiAgICBVdGlscy5leHRlbmQocHJvZywgcHJvcHMpO1xuICB9XG4gIHJldHVybiBwcm9nO1xufVxuIl19 +; +define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { + /* global window */ + 'use strict'; + + module.exports = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7bUJBQ2UsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLFFBQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtRQUN0RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFbEMsY0FBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFVBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsWUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7T0FDL0I7QUFDRCxhQUFPLFVBQVUsQ0FBQztLQUNuQixDQUFDO0dBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBnbG9iYWwgd2luZG93ICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 +; +define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { + 'use strict'; + + // istanbul ignore next + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _SafeString = _interopRequireDefault(_handlebarsSafeString); + + var _Exception = _interopRequireDefault(_handlebarsException); + + var _noConflict = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new _handlebarsBase.HandlebarsEnvironment(); + + _handlebarsUtils.extend(hb, _handlebarsBase); + hb.SafeString = _SafeString['default']; + hb.Exception = _Exception['default']; + hb.Utils = _handlebarsUtils; + hb.escapeExpression = _handlebarsUtils.escapeExpression; + + hb.VM = _handlebarsRuntime; + hb.template = function (spec) { + return _handlebarsRuntime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _noConflict['default'](inst); + + inst['default'] = inst; + + module.exports = inst; +}); +//# sourceMappingURL=data:application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1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 +; diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.min.js b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.min.js new file mode 100644 index 00000000000000..9e770092e5584c --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.amd.min.js @@ -0,0 +1,27 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return a||0===a?o(a)&&0===a.length?!0:!1:!0}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===m.call(a):!1};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;l>h;h++)h in a&&d(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&d(m,h-1),m=n,h++);void 0!==m&&d(m,h-1,!0)}return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("if",function(a,b){return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=h;var i=g(c),j=g(f),k="4.0.5";a.VERSION=k;var l=7;a.COMPILER_REVISION=l;var m={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};a.REVISION_CHANGES=m;var n="[object Object]";h.prototype={constructor:h,logger:j["default"],log:j["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===n){if(c)throw new i["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===n)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new i["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===n){if(c)throw new i["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]}};var o=j["default"].log;a.log=o,a.createFrame=b.createFrame,a.logger=j["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/runtime",["exports","./utils","./exception","./base"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(b!==c){if(c>b){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new n["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new n["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function g(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f);var g=c.VM.invokePartial.call(this,d,e,f);if(null==g&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),g=f.partials[f.name](e,f)),null!=g){if(f.indent){for(var h=g.split("\n"),i=0,j=h.length;j>i&&(h[i]||i+1!==j);i++)h[i]=f.indent+h[i];g=h.join("\n")}return g}throw new n["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function e(b){function c(b){return""+a.main(f,b,f.helpers,f.partials,g,i,h)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=d.data;e._setup(d),!d.partial&&a.useData&&(g=l(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=d.depths?b!==d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=m(a.main,c,f,d.depths||[],g,i))(b,d)}if(!c)throw new n["default"]("No environment passed to template");if(!a||!a.main)throw new n["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var f={strict:function(a,b){if(!(b in a))throw new n["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=h(this,a,g,b,c,d,e):f||(f=this.programs[a]=h(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},noop:c.VM.noop,compilerInfo:a.compiler};return e.isTop=!0,e._setup=function(b){b.partial?(f.helpers=b.helpers,f.partials=b.partials,f.decorators=b.decorators):(f.helpers=f.merge(b.helpers,c.helpers),a.usePartial&&(f.partials=f.merge(b.partials,c.partials)),(a.usePartial||a.useDecorators)&&(f.decorators=f.merge(b.decorators,c.decorators)))},e._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new n["default"]("must pass block params");if(a.useDepths&&!e)throw new n["default"]("must pass parent depths");return h(f,b,a[b],c,0,d,e)},e}function h(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=m(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function i(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function j(a,c,e){e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var f=void 0;if(e.fn&&e.fn!==k&&(e.data=d.createFrame(e.data),f=e.data["partial-block"]=e.fn,f.partials&&(e.partials=b.extend({},e.partials,f.partials))),void 0===a&&f&&(a=f),void 0===a)throw new n["default"]("The partial "+e.name+" could not be found");return a instanceof Function?a(c,e):void 0}function k(){return""}function l(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function m(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}a.__esModule=!0,a.checkRevision=f,a.template=g,a.wrapProgram=h,a.resolvePartial=i,a.invokePartial=j,a.noop=k;var n=e(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){var b="undefined"!=typeof global?global:window,c=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=c),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n}); \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.js b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.js new file mode 100644 index 00000000000000..95049f3b8d4dd8 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.js @@ -0,0 +1,1240 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(3); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(17); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(5); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(18); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(19); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(6); + + var _decorators = __webpack_require__(14); + + var _logger = __webpack_require__(16); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + + var _helpersBlockHelperMissing = __webpack_require__(7); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(8); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(9); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(10); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(11); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(12); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(13); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(15); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(3); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = Utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global window */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.min.js b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.min.js new file mode 100644 index 00000000000000..47658a569636d6 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/dist/handlebars.runtime.min.js @@ -0,0 +1,27 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +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. + +@license +*/ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(1)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(3),h=e(g),i=c(17),j=f(i),k=c(5),l=f(k),m=c(4),n=e(m),o=c(18),p=e(o),q=c(19),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(2)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(4),g=c(5),h=e(g),i=c(6),j=c(14),k=c(16),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(4),f=c(5),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(5),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(1)["default"],m=c(2)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(4),o=l(n),p=c(5),q=m(p),r=c(3)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())}])}); \ No newline at end of file diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars.js b/tools/eslint/node_modules/handlebars/lib/handlebars.js new file mode 100644 index 00000000000000..f11495905bdbbb --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars.js @@ -0,0 +1,41 @@ +import runtime from './handlebars.runtime'; + +// Compiler imports +import AST from './handlebars/compiler/ast'; +import { parser as Parser, parse } from './handlebars/compiler/base'; +import { Compiler, compile, precompile } from './handlebars/compiler/compiler'; +import JavaScriptCompiler from './handlebars/compiler/javascript-compiler'; +import Visitor from './handlebars/compiler/visitor'; + +import noConflict from './handlebars/no-conflict'; + +let _create = runtime.create; +function create() { + let hb = _create(); + + hb.compile = function(input, options) { + return compile(input, options, hb); + }; + hb.precompile = function(input, options) { + return precompile(input, options, hb); + }; + + hb.AST = AST; + hb.Compiler = Compiler; + hb.JavaScriptCompiler = JavaScriptCompiler; + hb.Parser = Parser; + hb.parse = parse; + + return hb; +} + +let inst = create(); +inst.create = create; + +noConflict(inst); + +inst.Visitor = Visitor; + +inst['default'] = inst; + +export default inst; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars.runtime.js b/tools/eslint/node_modules/handlebars/lib/handlebars.runtime.js new file mode 100644 index 00000000000000..3d05b54489410a --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars.runtime.js @@ -0,0 +1,37 @@ +import * as base from './handlebars/base'; + +// Each of these augment the Handlebars object. No need to setup here. +// (This is done to easily share code between commonjs and browse envs) +import SafeString from './handlebars/safe-string'; +import Exception from './handlebars/exception'; +import * as Utils from './handlebars/utils'; +import * as runtime from './handlebars/runtime'; + +import noConflict from './handlebars/no-conflict'; + +// For compatibility and usage outside of module systems, make the Handlebars object a namespace +function create() { + let hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = SafeString; + hb.Exception = Exception; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function(spec) { + return runtime.template(spec, hb); + }; + + return hb; +} + +let inst = create(); +inst.create = create; + +noConflict(inst); + +inst['default'] = inst; + +export default inst; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/base.js b/tools/eslint/node_modules/handlebars/lib/handlebars/base.js new file mode 100644 index 00000000000000..836422d1eace59 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/base.js @@ -0,0 +1,78 @@ +import {createFrame, extend, toString} from './utils'; +import Exception from './exception'; +import {registerDefaultHelpers} from './helpers'; +import {registerDefaultDecorators} from './decorators'; +import logger from './logger'; + +export const VERSION = '4.0.5'; +export const COMPILER_REVISION = 7; + +export const REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' +}; + +const objectType = '[object Object]'; + +export function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + registerDefaultHelpers(this); + registerDefaultDecorators(this); +} + +HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: logger, + log: logger.log, + + registerHelper: function(name, fn) { + if (toString.call(name) === objectType) { + if (fn) { throw new Exception('Arg not supported with multiple helpers'); } + extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function(name) { + delete this.helpers[name]; + }, + + registerPartial: function(name, partial) { + if (toString.call(name) === objectType) { + extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new Exception(`Attempting to register a partial called "${name}" as undefined`); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function(name) { + delete this.partials[name]; + }, + + registerDecorator: function(name, fn) { + if (toString.call(name) === objectType) { + if (fn) { throw new Exception('Arg not supported with multiple decorators'); } + extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function(name) { + delete this.decorators[name]; + } +}; + +export let log = logger.log; + +export {createFrame, logger}; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/ast.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/ast.js new file mode 100644 index 00000000000000..1699569ba86a55 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/ast.js @@ -0,0 +1,28 @@ +let AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function(node) { + return (node.type === 'SubExpression') + || ((node.type === 'MustacheStatement' || node.type === 'BlockStatement') + && !!((node.params && node.params.length) || node.hash)); + }, + + scopedId: function(path) { + return (/^\.|this\b/).test(path.original); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } +}; + + +// Must be exported as an object rather than the root of the module as the jison lexer +// must modify the object to operate properly. +export default AST; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/base.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/base.js new file mode 100644 index 00000000000000..c6871d399f3b98 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/base.js @@ -0,0 +1,24 @@ +import parser from './parser'; +import WhitespaceControl from './whitespace-control'; +import * as Helpers from './helpers'; +import { extend } from '../utils'; + +export { parser }; + +let yy = {}; +extend(yy, Helpers); + +export function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { return input; } + + parser.yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function(locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + let strip = new WhitespaceControl(options); + return strip.accept(parser.parse(input)); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/code-gen.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/code-gen.js new file mode 100644 index 00000000000000..1ae5e092cca47e --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/code-gen.js @@ -0,0 +1,167 @@ +/* global define */ +import {isArray} from '../utils'; + +let SourceNode; + +try { + /* istanbul ignore next */ + if (typeof define !== 'function' || !define.amd) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + let SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } +} catch (err) { + /* NOP */ +} + +/* istanbul ignore if: tested but not covered in istanbul due to dist build */ +if (!SourceNode) { + SourceNode = function(line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function(chunks) { + if (isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function(chunks) { + if (isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function() { + return {code: this.toString()}; + }, + toString: function() { + return this.src; + } + }; +} + + +function castChunk(chunk, codeGen, loc) { + if (isArray(chunk)) { + let ret = []; + + for (let i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; +} + + +function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; +} + +CodeGen.prototype = { + isEmpty() { + return !this.source.length; + }, + prepend: function(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function() { + let source = this.empty(); + this.each(function(line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function(iter) { + for (let i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function() { + let loc = this.currentLocation || {start: {}}; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function(chunk, loc = this.currentLocation || {start: {}}) { + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function(str) { + return '"' + (str + '') + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function(obj) { + let pairs = []; + + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + let value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + let ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + + generateList: function(entries) { + let ret = this.empty(); + + for (let i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function(entries) { + let ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } +}; + +export default CodeGen; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/compiler.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/compiler.js new file mode 100644 index 00000000000000..987d0d4594f17f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/compiler.js @@ -0,0 +1,558 @@ +/* eslint-disable new-cap */ + +import Exception from '../exception'; +import {isArray, indexOf} from '../utils'; +import AST from './ast'; + +const slice = [].slice; + +export function Compiler() {} + +// the foundHelper register will disambiguate helper lookup from finding a +// function in a context. This is necessary for mustache compatibility, which +// requires that context functions in blocks are evaluated by blockHelperMissing, +// and then proceed as if the resulting value was provided to blockHelperMissing. + +Compiler.prototype = { + compiler: Compiler, + + equals: function(other) { + let len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (let i = 0; i < len; i++) { + let opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (let i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + let knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (let name in knownHelpers) { + /* istanbul ignore else */ + if (name in knownHelpers) { + options.knownHelpers[name] = knownHelpers[name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function(program) { + let childCompiler = new this.compiler(), // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new Exception('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + let ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function(program) { + this.options.blockParams.unshift(program.blockParams); + + let body = program.body, + bodyLength = body.length; + for (let i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function(block) { + transformLiteralToPath(block); + + let program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + let type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock(decorator) { + let program = decorator.program && this.compileProgram(decorator.program); + let params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function(partial) { + this.usePartial = true; + + let program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + let params = partial.params; + if (params.length > 1) { + throw new Exception('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({type: 'PathExpression', parts: [], depth: 0}); + } + } + + let partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + let indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + + ContentStatement: function(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function() {}, + + SubExpression: function(sexpr) { + transformLiteralToPath(sexpr); + let type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function(sexpr, program, inverse) { + let path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function(sexpr) { + let path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function(sexpr, program, inverse) { + let params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new Exception('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, AST.helpers.simpleId(path)); + } + }, + + PathExpression: function(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + let name = path.parts[0], + scoped = AST.helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function(hash) { + let pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function(sexpr) { + let isSimple = AST.helpers.simpleId(sexpr.path); + + let isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + let isHelper = !isBlockParam && AST.helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + let isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + let name = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[name]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function(params) { + for (let i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function(val) { + let value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value + .replace(/^(\.?\.\/)*/g, '') + .replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + let blockParamIndex; + if (val.parts && !AST.helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + let blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value + .replace(/^this(?:\.|$)/, '') + .replace(/^\.\//, '') + .replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function(sexpr, program, inverse, omitEmpty) { + let params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function(name) { + for (let depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + let blockParams = this.options.blockParams[depth], + param = blockParams && indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } +}; + +export function precompile(input, options, env) { + if (input == null || (typeof input !== 'string' && input.type !== 'Program')) { + throw new Exception('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + let ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); +} + +export function compile(input, options = {}, env) { + if (input == null || (typeof input !== 'string' && input.type !== 'Program')) { + throw new Exception('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + let compiled; + + function compileInput() { + let ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function(setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function(i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; +} + +function argEquals(a, b) { + if (a === b) { + return true; + } + + if (isArray(a) && isArray(b) && a.length === b.length) { + for (let i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } +} + +function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + let literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/helpers.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/helpers.js new file mode 100644 index 00000000000000..d860ff794ac95e --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/helpers.js @@ -0,0 +1,211 @@ +import Exception from '../exception'; + +function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + let errorNode = {loc: open.path.loc}; + + throw new Exception(open.path.original + " doesn't match " + close, errorNode); + } +} + +export function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; +} + +export function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } +} + +export function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; +} + +export function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '') + .replace(/-?-?~?\}\}$/, ''); +} + +export function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + let original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (let i = 0, l = parts.length; i < l; i++) { + let part = parts[i].part, + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new Exception('Invalid path: ' + original, {loc}); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data, + depth, + parts: dig, + original, + loc + }; +} + +export function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + let escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + let decorator = (/\*/.test(open)); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path, + params, + hash, + escaped, + strip, + loc: this.locInfo(locInfo) + }; +} + +export function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + let program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; +} + +export function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + let decorator = (/\*/.test(openBlock.open)); + + program.blockParams = openBlock.blockParams; + + let inverse, + inverseStrip; + + if (inverseAndProgram) { + if (decorator) { + throw new Exception('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program, + inverse, + openStrip: openBlock.strip, + inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} + +export function prepareProgram(statements, loc) { + if (!loc && statements.length) { + const firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; +} + + +export function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js new file mode 100644 index 00000000000000..97939df0045354 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js @@ -0,0 +1,1135 @@ +import { COMPILER_REVISION, REVISION_CHANGES } from '../base'; +import Exception from '../exception'; +import {isArray} from '../utils'; +import CodeGen from './code-gen'; + +function Literal(value) { + this.value = value; +} + +function JavaScriptCompiler() {} + +JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function(parent, name/* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function() { + const revision = COMPILER_REVISION, + versions = REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + let opcodes = environment.opcodes, + opcode, + firstLoc, + i, + l; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new Exception('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + let fn = this.createFunctionContext(asObject); + if (!this.isChild) { + let ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + let {programs, decorators} = this.context; + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = {start: {line: 1, column: 0}}; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({file: options.destName}); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new CodeGen(this.options.srcName); + this.decorators = new CodeGen(this.options.srcName); + }, + + createFunctionContext: function(asObject) { + let varDeclarations = ''; + + let locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + let aliasCount = 0; + for (let alias in this.aliases) { // eslint-disable-line guard-for-in + let node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + (++aliasCount) + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + let params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + let source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function(varDeclarations) { + let isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst, + + sourceSeen, + bufferStart, + bufferEnd; + this.source.each((line) => { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function(name) { + let blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + let blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function() { + // We're being a bit cheeky and reusing the options value from the prior exec + let blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + let current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource([ + 'if (!', this.lastHelper, ') { ', + current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), + '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function() { + if (this.isInline()) { + this.replaceStack((current) => [' != null ? ', current, ' : ""']); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + let local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function() { + this.pushSource(this.appendToBuffer( + [this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function(parts, falsy, strict, scoped) { + let i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function(type, parts, i, falsy, strict) { + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + let len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack((current) => { + let lookup = this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = {values: [], types: [], contexts: [], ids: []}; + }, + popHash: function() { + let hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator(paramSize, name) { + let foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push([ + 'fn = ', + this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), + ' || fn;' + ]); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function(paramSize, name, isSimple) { + let nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + let lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function(paramSize, name) { + let helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function(name, helperCall) { + this.useRegister('helper'); + + let nonHelper = this.popStack(); + + this.emptyHash(); + let helper = this.setupHelper(0, name, helperCall); + + let helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + let lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push( + ' != null ? helper : ', + this.aliasable('helpers.helperMissing') + ); + } + + this.push([ + '(', lookup, + (helper.paramsInit ? ['),(', helper.paramsInit] : []), '),', + '(typeof helper === ', this.aliasable('"function"'), ' ? ', + this.source.functionCall('helper', 'call', helper.callParams), ' : helper))' + ]); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function(isDynamic, name, indent) { + let params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function(key) { + let value = this.popStack(), + context, + type, + id; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + let hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral( + 'blockParams[' + name[0] + '].path[' + name[1] + ']' + + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function(environment, options) { + let children = environment.children, child, compiler; + + for (let i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + let index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function(child) { + for (let i = 0, len = this.context.environments.length; i < len; i++) { + let environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function(guid) { + let child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function(item) { + this.push(new Literal(item)); + }, + + pushSource: function(source) { + if (this.pendingContent) { + this.source.push( + this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function(callback) { + let prefix = ['('], + stack, + createdStack, + usedLiteral; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new Exception('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + let top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + let name = this.incrStack(); + + prefix = ['((', this.push(name), ' = ', top, ')']; + stack = this.topStack(); + } + + let item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { this.stackVars.push('stack' + this.stackSlot); } + return this.topStackName(); + }, + topStackName: function() { + return 'stack' + this.stackSlot; + }, + flushInline: function() { + let inlineStack = this.inlineStack; + this.inlineStack = []; + for (let i = 0, len = inlineStack.length; i < len; i++) { + let entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + let stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function() { + return this.inlineStack.length; + }, + + popStack: function(wrapped) { + let inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && (item instanceof Literal)) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new Exception('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function() { + let stack = (this.isInline() ? this.inlineStack : this.compileStack), + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function(name) { + let ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function(paramSize, name, blockHelper) { + let params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + let foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(`${this.contextName(0)} != null ? ${this.contextName(0)} : {}`); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function(helper, paramSize, params) { + let options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + let inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + let i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function(helper, paramSize, params, useRegister) { + let options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } +}; + + +(function() { + const reservedWords = ( + 'break else new var' + + ' case finally return void' + + ' catch for switch while' + + ' continue function this with' + + ' default if throw' + + ' delete in try' + + ' do instanceof typeof' + + ' abstract enum int short' + + ' boolean export interface static' + + ' byte extends long super' + + ' char final native synchronized' + + ' class float package throws' + + ' const goto private transient' + + ' debugger implements protected volatile' + + ' double import public let yield await' + + ' null true false' + ).split(' '); + + const compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (let i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } +}()); + +JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/).test(name); +}; + +function strictLookup(requireTerminal, compiler, parts, type) { + let stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } +} + +export default JavaScriptCompiler; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/parser.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/parser.js new file mode 100644 index 00000000000000..c17b208636c884 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/parser.js @@ -0,0 +1,623 @@ +/* istanbul ignore next */ +/* Jison generated parser */ +var handlebars = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"partialBlock":12,"content":13,"COMMENT":14,"CONTENT":15,"openRawBlock":16,"rawBlock_repetition_plus0":17,"END_RAW_BLOCK":18,"OPEN_RAW_BLOCK":19,"helperName":20,"openRawBlock_repetition0":21,"openRawBlock_option0":22,"CLOSE_RAW_BLOCK":23,"openBlock":24,"block_option0":25,"closeBlock":26,"openInverse":27,"block_option1":28,"OPEN_BLOCK":29,"openBlock_repetition0":30,"openBlock_option0":31,"openBlock_option1":32,"CLOSE":33,"OPEN_INVERSE":34,"openInverse_repetition0":35,"openInverse_option0":36,"openInverse_option1":37,"openInverseChain":38,"OPEN_INVERSE_CHAIN":39,"openInverseChain_repetition0":40,"openInverseChain_option0":41,"openInverseChain_option1":42,"inverseAndProgram":43,"INVERSE":44,"inverseChain":45,"inverseChain_option0":46,"OPEN_ENDBLOCK":47,"OPEN":48,"mustache_repetition0":49,"mustache_option0":50,"OPEN_UNESCAPED":51,"mustache_repetition1":52,"mustache_option1":53,"CLOSE_UNESCAPED":54,"OPEN_PARTIAL":55,"partialName":56,"partial_repetition0":57,"partial_option0":58,"openPartialBlock":59,"OPEN_PARTIAL_BLOCK":60,"openPartialBlock_repetition0":61,"openPartialBlock_option0":62,"param":63,"sexpr":64,"OPEN_SEXPR":65,"sexpr_repetition0":66,"sexpr_option0":67,"CLOSE_SEXPR":68,"hash":69,"hash_repetition_plus0":70,"hashSegment":71,"ID":72,"EQUALS":73,"blockParams":74,"OPEN_BLOCK_PARAMS":75,"blockParams_repetition_plus0":76,"CLOSE_BLOCK_PARAMS":77,"path":78,"dataName":79,"STRING":80,"NUMBER":81,"BOOLEAN":82,"UNDEFINED":83,"NULL":84,"DATA":85,"pathSegments":86,"SEP":87,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"}, +productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$ +/**/) { + +var $0 = $$.length - 1; +switch (yystate) { +case 1: return $$[$0-1]; +break; +case 2:this.$ = yy.prepareProgram($$[$0]); +break; +case 3:this.$ = $$[$0]; +break; +case 4:this.$ = $$[$0]; +break; +case 5:this.$ = $$[$0]; +break; +case 6:this.$ = $$[$0]; +break; +case 7:this.$ = $$[$0]; +break; +case 8:this.$ = $$[$0]; +break; +case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + +break; +case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + +break; +case 11:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$); +break; +case 12:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1] }; +break; +case 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$); +break; +case 14:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$); +break; +case 15:this.$ = { open: $$[$0-5], path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; +break; +case 16:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; +break; +case 17:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; +break; +case 18:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] }; +break; +case 19: + var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0-1].loc); + program.chained = true; + + this.$ = { strip: $$[$0-2].strip, program: program, chain: true }; + +break; +case 20:this.$ = $$[$0]; +break; +case 21:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])}; +break; +case 22:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$); +break; +case 23:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$); +break; +case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0-3], + params: $$[$0-2], + hash: $$[$0-1], + indent: '', + strip: yy.stripFlags($$[$0-4], $$[$0]), + loc: yy.locInfo(this._$) + }; + +break; +case 25:this.$ = yy.preparePartialBlock($$[$0-2], $$[$0-1], $$[$0], this._$); +break; +case 26:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1], strip: yy.stripFlags($$[$0-4], $$[$0]) }; +break; +case 27:this.$ = $$[$0]; +break; +case 28:this.$ = $$[$0]; +break; +case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0-3], + params: $$[$0-2], + hash: $$[$0-1], + loc: yy.locInfo(this._$) + }; + +break; +case 30:this.$ = {type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$)}; +break; +case 31:this.$ = {type: 'HashPair', key: yy.id($$[$0-2]), value: $$[$0], loc: yy.locInfo(this._$)}; +break; +case 32:this.$ = yy.id($$[$0-1]); +break; +case 33:this.$ = $$[$0]; +break; +case 34:this.$ = $$[$0]; +break; +case 35:this.$ = {type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$)}; +break; +case 36:this.$ = {type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$)}; +break; +case 37:this.$ = {type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$)}; +break; +case 38:this.$ = {type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$)}; +break; +case 39:this.$ = {type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$)}; +break; +case 40:this.$ = $$[$0]; +break; +case 41:this.$ = $$[$0]; +break; +case 42:this.$ = yy.preparePath(true, $$[$0], this._$); +break; +case 43:this.$ = yy.preparePath(false, $$[$0], this._$); +break; +case 44: $$[$0-2].push({part: yy.id($$[$0]), original: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; +break; +case 45:this.$ = [{part: yy.id($$[$0]), original: $$[$0]}]; +break; +case 46:this.$ = []; +break; +case 47:$$[$0-1].push($$[$0]); +break; +case 48:this.$ = [$$[$0]]; +break; +case 49:$$[$0-1].push($$[$0]); +break; +case 50:this.$ = []; +break; +case 51:$$[$0-1].push($$[$0]); +break; +case 58:this.$ = []; +break; +case 59:$$[$0-1].push($$[$0]); +break; +case 64:this.$ = []; +break; +case 65:$$[$0-1].push($$[$0]); +break; +case 70:this.$ = []; +break; +case 71:$$[$0-1].push($$[$0]); +break; +case 78:this.$ = []; +break; +case 79:$$[$0-1].push($$[$0]); +break; +case 82:this.$ = []; +break; +case 83:$$[$0-1].push($$[$0]); +break; +case 86:this.$ = []; +break; +case 87:$$[$0-1].push($$[$0]); +break; +case 90:this.$ = []; +break; +case 91:$$[$0-1].push($$[$0]); +break; +case 94:this.$ = []; +break; +case 95:$$[$0-1].push($$[$0]); +break; +case 98:this.$ = [$$[$0]]; +break; +case 99:$$[$0-1].push($$[$0]); +break; +case 100:this.$ = [$$[$0]]; +break; +case 101:$$[$0-1].push($$[$0]); +break; +} +}, +table: [{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}], +defaultActions: {4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START +/**/) { + + +function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng-end); +} + + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0: + if(yy_.yytext.slice(-2) === "\\\\") { + strip(0,1); + this.begin("mu"); + } else if(yy_.yytext.slice(-1) === "\\") { + strip(0,1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if(yy_.yytext) return 15; + +break; +case 1:return 15; +break; +case 2: + this.popState(); + return 15; + +break; +case 3:this.begin('raw'); return 15; +break; +case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length-1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng-9); + return 'END_RAW_BLOCK'; + } + +break; +case 5: return 15; +break; +case 6: + this.popState(); + return 14; + +break; +case 7:return 65; +break; +case 8:return 68; +break; +case 9: return 19; +break; +case 10: + this.popState(); + this.begin('raw'); + return 23; + +break; +case 11:return 55; +break; +case 12:return 60; +break; +case 13:return 29; +break; +case 14:return 47; +break; +case 15:this.popState(); return 44; +break; +case 16:this.popState(); return 44; +break; +case 17:return 34; +break; +case 18:return 39; +break; +case 19:return 51; +break; +case 20:return 48; +break; +case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + +break; +case 22: + this.popState(); + return 14; + +break; +case 23:return 48; +break; +case 24:return 73; +break; +case 25:return 72; +break; +case 26:return 72; +break; +case 27:return 87; +break; +case 28:// ignore whitespace +break; +case 29:this.popState(); return 54; +break; +case 30:this.popState(); return 33; +break; +case 31:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 80; +break; +case 32:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 80; +break; +case 33:return 85; +break; +case 34:return 82; +break; +case 35:return 82; +break; +case 36:return 83; +break; +case 37:return 84; +break; +case 38:return 81; +break; +case 39:return 75; +break; +case 40:return 77; +break; +case 41:return 72; +break; +case 42:yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g,'$1'); return 72; +break; +case 43:return 'INVALID'; +break; +case 44:return 5; +break; +} +}; +lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/]; +lexer.conditions = {"mu":{"rules":[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})();exports.__esModule = true; +exports['default'] = handlebars; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/printer.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/printer.js new file mode 100644 index 00000000000000..6ad43baec26e3f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/printer.js @@ -0,0 +1,171 @@ +/* eslint-disable new-cap */ +import Visitor from './visitor'; + +export function print(ast) { + return new PrintVisitor().accept(ast); +} + +export function PrintVisitor() { + this.padding = 0; +} + +PrintVisitor.prototype = new Visitor(); + +PrintVisitor.prototype.pad = function(string) { + let out = ''; + + for (let i = 0, l = this.padding; i < l; i++) { + out += ' '; + } + + out += string + '\n'; + return out; +}; + +PrintVisitor.prototype.Program = function(program) { + let out = '', + body = program.body, + i, l; + + if (program.blockParams) { + let blockParams = 'BLOCK PARAMS: ['; + for (i = 0, l = program.blockParams.length; i < l; i++) { + blockParams += ' ' + program.blockParams[i]; + } + blockParams += ' ]'; + out += this.pad(blockParams); + } + + for (i = 0, l = body.length; i < l; i++) { + out += this.accept(body[i]); + } + + this.padding--; + + return out; +}; + +PrintVisitor.prototype.MustacheStatement = function(mustache) { + return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); +}; +PrintVisitor.prototype.Decorator = function(mustache) { + return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); +}; + +PrintVisitor.prototype.BlockStatement = +PrintVisitor.prototype.DecoratorBlock = function(block) { + let out = ''; + + out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); + this.padding++; + out += this.pad(this.SubExpression(block)); + if (block.program) { + out += this.pad('PROGRAM:'); + this.padding++; + out += this.accept(block.program); + this.padding--; + } + if (block.inverse) { + if (block.program) { this.padding++; } + out += this.pad('{{^}}'); + this.padding++; + out += this.accept(block.inverse); + this.padding--; + if (block.program) { this.padding--; } + } + this.padding--; + + return out; +}; + +PrintVisitor.prototype.PartialStatement = function(partial) { + let content = 'PARTIAL:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + return this.pad('{{> ' + content + ' }}'); +}; +PrintVisitor.prototype.PartialBlockStatement = function(partial) { + let content = 'PARTIAL BLOCK:' + partial.name.original; + if (partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); + } + if (partial.hash) { + content += ' ' + this.accept(partial.hash); + } + + content += ' ' + this.pad('PROGRAM:'); + this.padding++; + content += this.accept(partial.program); + this.padding--; + + return this.pad('{{> ' + content + ' }}'); +}; + +PrintVisitor.prototype.ContentStatement = function(content) { + return this.pad("CONTENT[ '" + content.value + "' ]"); +}; + +PrintVisitor.prototype.CommentStatement = function(comment) { + return this.pad("{{! '" + comment.value + "' }}"); +}; + +PrintVisitor.prototype.SubExpression = function(sexpr) { + let params = sexpr.params, + paramStrings = [], + hash; + + for (let i = 0, l = params.length; i < l; i++) { + paramStrings.push(this.accept(params[i])); + } + + params = '[' + paramStrings.join(', ') + ']'; + + hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; + + return this.accept(sexpr.path) + ' ' + params + hash; +}; + +PrintVisitor.prototype.PathExpression = function(id) { + let path = id.parts.join('/'); + return (id.data ? '@' : '') + 'PATH:' + path; +}; + + +PrintVisitor.prototype.StringLiteral = function(string) { + return '"' + string.value + '"'; +}; + +PrintVisitor.prototype.NumberLiteral = function(number) { + return 'NUMBER{' + number.value + '}'; +}; + +PrintVisitor.prototype.BooleanLiteral = function(bool) { + return 'BOOLEAN{' + bool.value + '}'; +}; + +PrintVisitor.prototype.UndefinedLiteral = function() { + return 'UNDEFINED'; +}; + +PrintVisitor.prototype.NullLiteral = function() { + return 'NULL'; +}; + +PrintVisitor.prototype.Hash = function(hash) { + let pairs = hash.pairs, + joinedPairs = []; + + for (let i = 0, l = pairs.length; i < l; i++) { + joinedPairs.push(this.accept(pairs[i])); + } + + return 'HASH{' + joinedPairs.join(', ') + '}'; +}; +PrintVisitor.prototype.HashPair = function(pair) { + return pair.key + '=' + this.accept(pair.value); +}; +/* eslint-enable new-cap */ diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/visitor.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/visitor.js new file mode 100644 index 00000000000000..2c504d1b23a907 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/visitor.js @@ -0,0 +1,129 @@ +import Exception from '../exception'; + +function Visitor() { + this.parents = []; +} + +Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function(node, name) { + let value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new Exception('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new Exception(node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function(array) { + for (let i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new Exception('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + let ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function(/* content */) {}, + CommentStatement: function(/* comment */) {}, + + SubExpression: visitSubExpression, + + PathExpression: function(/* path */) {}, + + StringLiteral: function(/* string */) {}, + NumberLiteral: function(/* number */) {}, + BooleanLiteral: function(/* bool */) {}, + UndefinedLiteral: function(/* literal */) {}, + NullLiteral: function(/* literal */) {}, + + Hash: function(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function(pair) { + this.acceptRequired(pair, 'value'); + } +}; + +function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); +} +function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); +} +function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); +} + +export default Visitor; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js new file mode 100644 index 00000000000000..e11483c9149966 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js @@ -0,0 +1,216 @@ +import Visitor from './visitor'; + +function WhitespaceControl(options = {}) { + this.options = options; +} +WhitespaceControl.prototype = new Visitor(); + +WhitespaceControl.prototype.Program = function(program) { + const doStandalone = !this.options.ignoreStandalone; + + let isRoot = !this.isRootSeen; + this.isRootSeen = true; + + let body = program.body; + for (let i = 0, l = body.length; i < l; i++) { + let current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + let _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = (/([ \t]+$)/).exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; +}; + +WhitespaceControl.prototype.BlockStatement = +WhitespaceControl.prototype.DecoratorBlock = +WhitespaceControl.prototype.PartialBlockStatement = function(block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + let program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + let strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + let inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone + && isPrevWhitespace(program.body) + && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; +}; + +WhitespaceControl.prototype.Decorator = +WhitespaceControl.prototype.MustacheStatement = function(mustache) { + return mustache.strip; +}; + +WhitespaceControl.prototype.PartialStatement = + WhitespaceControl.prototype.CommentStatement = function(node) { + /* istanbul ignore next */ + let strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; +}; + + +function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + let prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? (/\r?\n\s*?$/) : (/(^|\r?\n)\s*?$/)).test(prev.original); + } +} +function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + let next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? (/^\s*?\r?\n/) : (/^\s*?(\r?\n|$)/)).test(next.original); + } +} + +// Marks the node to the right of the position as omitted. +// I.e. {{foo}}' ' will mark the ' ' node as omitted. +// +// If i is undefined, then the first child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitRight(body, i, multiple) { + let current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || (!multiple && current.rightStripped)) { + return; + } + + let original = current.value; + current.value = current.value.replace(multiple ? (/^\s+/) : (/^[ \t]*\r?\n?/), ''); + current.rightStripped = current.value !== original; +} + +// Marks the node to the left of the position as omitted. +// I.e. ' '{{foo}} will mark the ' ' node as omitted. +// +// If i is undefined then the last child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitLeft(body, i, multiple) { + let current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || (!multiple && current.leftStripped)) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + let original = current.value; + current.value = current.value.replace(multiple ? (/\s+$/) : (/[ \t]+$/), ''); + current.leftStripped = current.value !== original; + return current.leftStripped; +} + +export default WhitespaceControl; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/decorators.js b/tools/eslint/node_modules/handlebars/lib/handlebars/decorators.js new file mode 100644 index 00000000000000..d9d5e8a962bd91 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/decorators.js @@ -0,0 +1,5 @@ +import registerInline from './decorators/inline'; + +export function registerDefaultDecorators(instance) { + registerInline(instance); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/decorators/inline.js b/tools/eslint/node_modules/handlebars/lib/handlebars/decorators/inline.js new file mode 100644 index 00000000000000..214246620c0c8a --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/decorators/inline.js @@ -0,0 +1,22 @@ +import {extend} from '../utils'; + +export default function(instance) { + instance.registerDecorator('inline', function(fn, props, container, options) { + let ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function(context, options) { + // Create a new partials stack frame prior to exec. + let original = container.partials; + container.partials = extend({}, original, props.partials); + let ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/exception.js b/tools/eslint/node_modules/handlebars/lib/handlebars/exception.js new file mode 100644 index 00000000000000..52499c0ca17f41 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/exception.js @@ -0,0 +1,35 @@ + +const errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + +function Exception(message, node) { + let loc = node && node.loc, + line, + column; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + let tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (let idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } +} + +Exception.prototype = new Error(); + +export default Exception; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers.js new file mode 100644 index 00000000000000..7a4365aea2138f --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers.js @@ -0,0 +1,17 @@ +import registerBlockHelperMissing from './helpers/block-helper-missing'; +import registerEach from './helpers/each'; +import registerHelperMissing from './helpers/helper-missing'; +import registerIf from './helpers/if'; +import registerLog from './helpers/log'; +import registerLookup from './helpers/lookup'; +import registerWith from './helpers/with'; + +export function registerDefaultHelpers(instance) { + registerBlockHelperMissing(instance); + registerEach(instance); + registerHelperMissing(instance); + registerIf(instance); + registerLog(instance); + registerLookup(instance); + registerWith(instance); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js new file mode 100644 index 00000000000000..6639ddb9dd5783 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js @@ -0,0 +1,32 @@ +import {appendContextPath, createFrame, isArray} from '../utils'; + +export default function(instance) { + instance.registerHelper('blockHelperMissing', function(context, options) { + let inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + let data = createFrame(options.data); + data.contextPath = appendContextPath(options.data.contextPath, options.name); + options = {data: data}; + } + + return fn(context, options); + } + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/each.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/each.js new file mode 100644 index 00000000000000..fb11903c871150 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/each.js @@ -0,0 +1,79 @@ +import {appendContextPath, blockParams, createFrame, isArray, isFunction} from '../utils'; +import Exception from '../exception'; + +export default function(instance) { + instance.registerHelper('each', function(context, options) { + if (!options) { + throw new Exception('Must pass iterator to #each'); + } + + let fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data, + contextPath; + + if (options.data && options.ids) { + contextPath = appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (isFunction(context)) { context = context.call(this); } + + if (options.data) { + data = createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (isArray(context)) { + for (let j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + let priorKey; + + for (let key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js new file mode 100644 index 00000000000000..ec32e8245612c0 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js @@ -0,0 +1,13 @@ +import Exception from '../exception'; + +export default function(instance) { + instance.registerHelper('helperMissing', function(/* [args, ]options */) { + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/if.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/if.js new file mode 100644 index 00000000000000..11d08df912e1d8 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/if.js @@ -0,0 +1,20 @@ +import {isEmpty, isFunction} from '../utils'; + +export default function(instance) { + instance.registerHelper('if', function(conditional, options) { + if (isFunction(conditional)) { conditional = conditional.call(this); } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if ((!options.hash.includeZero && !conditional) || isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function(conditional, options) { + return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash}); + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js new file mode 100644 index 00000000000000..4bde4a10d58768 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/log.js @@ -0,0 +1,19 @@ +export default function(instance) { + instance.registerHelper('log', function(/* message, options */) { + let args = [undefined], + options = arguments[arguments.length - 1]; + for (let i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + let level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log(... args); + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/lookup.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/lookup.js new file mode 100644 index 00000000000000..a52e77a04fef6e --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/lookup.js @@ -0,0 +1,5 @@ +export default function(instance) { + instance.registerHelper('lookup', function(obj, field) { + return obj && obj[field]; + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/with.js b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/with.js new file mode 100644 index 00000000000000..7418cd0662f9c5 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/helpers/with.js @@ -0,0 +1,24 @@ +import {appendContextPath, blockParams, createFrame, isEmpty, isFunction} from '../utils'; + +export default function(instance) { + instance.registerHelper('with', function(context, options) { + if (isFunction(context)) { context = context.call(this); } + + let fn = options.fn; + + if (!isEmpty(context)) { + let data = options.data; + if (options.data && options.ids) { + data = createFrame(options.data); + data.contextPath = appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/logger.js b/tools/eslint/node_modules/handlebars/lib/handlebars/logger.js new file mode 100644 index 00000000000000..1ab0051f502b25 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/logger.js @@ -0,0 +1,35 @@ +import {indexOf} from './utils'; + +let logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function(level) { + if (typeof level === 'string') { + let levelMap = indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function(level, ...message) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + let method = logger.methodMap[level]; + if (!console[method]) { // eslint-disable-line no-console + method = 'log'; + } + console[method](...message); // eslint-disable-line no-console + } + } +}; + +export default logger; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/no-conflict.js b/tools/eslint/node_modules/handlebars/lib/handlebars/no-conflict.js new file mode 100644 index 00000000000000..40a44d7a674138 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/no-conflict.js @@ -0,0 +1,13 @@ +/* global window */ +export default function(Handlebars) { + /* istanbul ignore next */ + let root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function() { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/runtime.js b/tools/eslint/node_modules/handlebars/lib/handlebars/runtime.js new file mode 100644 index 00000000000000..b47d9615d570b4 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/runtime.js @@ -0,0 +1,269 @@ +import * as Utils from './utils'; +import Exception from './exception'; +import { COMPILER_REVISION, REVISION_CHANGES, createFrame } from './base'; + +export function checkRevision(compilerInfo) { + const compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + const runtimeVersions = REVISION_CHANGES[currentRevision], + compilerVersions = REVISION_CHANGES[compilerRevision]; + throw new Exception('Template was precompiled with an older version of Handlebars than the current runtime. ' + + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new Exception('Template was precompiled with a newer version of Handlebars than the current runtime. ' + + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } +} + +export function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new Exception('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new Exception('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + let result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + let lines = result.split('\n'); + for (let i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new Exception('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + let container = { + strict: function(obj, name) { + if (!(name in obj)) { + throw new Exception('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function(depths, name) { + const len = depths.length; + for (let i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function(i) { + let ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function(i, data, declaredBlockParams, blockParams, depths) { + let programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function(param, common) { + let obj = param || common; + + if (param && common && (param !== common)) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context, options = {}) { + let data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + let depths, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context/*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function(options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function(i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new Exception('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new Exception('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; +} + +export function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context, options = {}) { + let currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, + context, + container.helpers, container.partials, + options.data || data, + blockParams && [options.blockParams].concat(blockParams), + currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; +} + +export function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; +} + +export function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + let partialBlock; + if (options.fn && options.fn !== noop) { + options.data = createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = Utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new Exception('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } +} + +export function noop() { return ''; } + +function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? createFrame(data) : {}; + data.root = context; + } + return data; +} + +function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + let props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; +} diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/safe-string.js b/tools/eslint/node_modules/handlebars/lib/handlebars/safe-string.js new file mode 100644 index 00000000000000..46801942191f96 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/safe-string.js @@ -0,0 +1,10 @@ +// Build out our basic SafeString type +function SafeString(string) { + this.string = string; +} + +SafeString.prototype.toString = SafeString.prototype.toHTML = function() { + return '' + this.string; +}; + +export default SafeString; diff --git a/tools/eslint/node_modules/handlebars/lib/handlebars/utils.js b/tools/eslint/node_modules/handlebars/lib/handlebars/utils.js new file mode 100644 index 00000000000000..2584601ef62031 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/handlebars/utils.js @@ -0,0 +1,108 @@ +const escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' +}; + +const badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + +function escapeChar(chr) { + return escape[chr]; +} + +export function extend(obj/* , ...source */) { + for (let i = 1; i < arguments.length; i++) { + for (let key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; +} + +export let toString = Object.prototype.toString; + +// Sourced from lodash +// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt +/* eslint-disable func-style */ +let isFunction = function(value) { + return typeof value === 'function'; +}; +// fallback for older versions of Chrome and Safari +/* istanbul ignore next */ +if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; +} +export {isFunction}; +/* eslint-enable func-style */ + +/* istanbul ignore next */ +export const isArray = Array.isArray || function(value) { + return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; +}; + +// Older IE versions do not directly support indexOf so we must implement our own, sadly. +export function indexOf(array, value) { + for (let i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; +} + + +export function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { return string; } + return string.replace(badChars, escapeChar); +} + +export function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } +} + +export function createFrame(object) { + let frame = extend({}, object); + frame._parent = object; + return frame; +} + +export function blockParams(params, ids) { + params.path = ids; + return params; +} + +export function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; +} diff --git a/tools/eslint/node_modules/handlebars/lib/index.js b/tools/eslint/node_modules/handlebars/lib/index.js new file mode 100644 index 00000000000000..0383c02f77262d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/index.js @@ -0,0 +1,25 @@ +// USAGE: +// var handlebars = require('handlebars'); +/* eslint-disable no-var */ + +// var local = handlebars.create(); + +var handlebars = require('../dist/cjs/handlebars')['default']; + +var printer = require('../dist/cjs/handlebars/compiler/printer'); +handlebars.PrintVisitor = printer.PrintVisitor; +handlebars.print = printer.print; + +module.exports = handlebars; + +// Publish a Node.js require() handler for .handlebars and .hbs files +function extension(module, filename) { + var fs = require('fs'); + var templateString = fs.readFileSync(filename, 'utf8'); + module.exports = handlebars.compile(templateString); +} +/* istanbul ignore else */ +if (typeof require !== 'undefined' && require.extensions) { + require.extensions['.handlebars'] = extension; + require.extensions['.hbs'] = extension; +} diff --git a/tools/eslint/node_modules/handlebars/lib/precompiler.js b/tools/eslint/node_modules/handlebars/lib/precompiler.js new file mode 100644 index 00000000000000..a20d1419d8f0c8 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/lib/precompiler.js @@ -0,0 +1,276 @@ +/* eslint-disable no-console */ +import Async from 'async'; +import fs from 'fs'; +import * as Handlebars from './handlebars'; +import {basename} from 'path'; +import {SourceMapConsumer, SourceNode} from 'source-map'; +import uglify from 'uglify-js'; + +module.exports.loadTemplates = function(opts, callback) { + loadStrings(opts, function(err, strings) { + if (err) { + callback(err); + } else { + loadFiles(opts, function(err, files) { + if (err) { + callback(err); + } else { + opts.templates = strings.concat(files); + callback(undefined, opts); + } + }); + } + }); +}; + +function loadStrings(opts, callback) { + let strings = arrayCast(opts.string), + names = arrayCast(opts.name); + + if (names.length !== strings.length + && strings.length > 1) { + return callback(new Handlebars.Exception('Number of names did not match the number of string inputs')); + } + + Async.map(strings, function(string, callback) { + if (string !== '-') { + callback(undefined, string); + } else { + // Load from stdin + let buffer = ''; + process.stdin.setEncoding('utf8'); + + process.stdin.on('data', function(chunk) { + buffer += chunk; + }); + process.stdin.on('end', function() { + callback(undefined, buffer); + }); + } + }, + function(err, strings) { + strings = strings.map((string, index) => ({ + name: names[index], + path: names[index], + source: string + })); + callback(err, strings); + }); +} + +function loadFiles(opts, callback) { + // Build file extension pattern + let extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-\[\]]/g, function(arg) { return '\\' + arg; }); + extension = new RegExp('\\.' + extension + '$'); + + let ret = [], + queue = (opts.files || []).map((template) => ({template, root: opts.root})); + Async.whilst(() => queue.length, function(callback) { + let {template: path, root} = queue.shift(); + + fs.stat(path, function(err, stat) { + if (err) { + return callback(new Handlebars.Exception(`Unable to open template file "${path}"`)); + } + + if (stat.isDirectory()) { + opts.hasDirectory = true; + + fs.readdir(path, function(err, children) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + children.forEach(function(file) { + let childPath = path + '/' + file; + + if (extension.test(childPath) || fs.statSync(childPath).isDirectory()) { + queue.push({template: childPath, root: root || path}); + } + }); + + callback(); + }); + } else { + fs.readFile(path, 'utf8', function(err, data) { + /* istanbul ignore next : Race condition that being too lazy to test */ + if (err) { + return callback(err); + } + + if (opts.bom && data.indexOf('\uFEFF') === 0) { + data = data.substring(1); + } + + // Clean the template name + let name = path; + if (!root) { + name = basename(name); + } else if (name.indexOf(root) === 0) { + name = name.substring(root.length + 1); + } + name = name.replace(extension, ''); + + ret.push({ + path: path, + name: name, + source: data + }); + + callback(); + }); + } + }); + }, + function(err) { + if (err) { + callback(err); + } else { + callback(undefined, ret); + } + }); +} + +module.exports.cli = function(opts) { + if (opts.version) { + console.log(Handlebars.VERSION); + return; + } + + if (!opts.templates.length && !opts.hasDirectory) { + throw new Handlebars.Exception('Must define at least one template or directory.'); + } + + if (opts.simple && opts.min) { + throw new Handlebars.Exception('Unable to minimize simple output'); + } + + const multiple = opts.templates.length !== 1 || opts.hasDirectory; + if (opts.simple && multiple) { + throw new Handlebars.Exception('Unable to output multiple templates in simple mode'); + } + + // Force simple mode if we have only one template and it's unnamed. + if (!opts.amd && !opts.commonjs && opts.templates.length === 1 + && !opts.templates[0].name) { + opts.simple = true; + } + + // Convert the known list into a hash + let known = {}; + if (opts.known && !Array.isArray(opts.known)) { + opts.known = [opts.known]; + } + if (opts.known) { + for (let i = 0, len = opts.known.length; i < len; i++) { + known[opts.known[i]] = true; + } + } + + const objectName = opts.partial ? 'Handlebars.partials' : 'templates'; + + let output = new SourceNode(); + if (!opts.simple) { + if (opts.amd) { + output.add('define([\'' + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); + } else if (opts.commonjs) { + output.add('var Handlebars = require("' + opts.commonjs + '");'); + } else { + output.add('(function() {\n'); + } + output.add(' var template = Handlebars.template, templates = '); + if (opts.namespace) { + output.add(opts.namespace); + output.add(' = '); + output.add(opts.namespace); + output.add(' || '); + } + output.add('{};\n'); + } + + opts.templates.forEach(function(template) { + let options = { + knownHelpers: known, + knownHelpersOnly: opts.o + }; + + if (opts.map) { + options.srcName = template.path; + } + if (opts.data) { + options.data = true; + } + + let precompiled = Handlebars.precompile(template.source, options); + + // If we are generating a source map, we have to reconstruct the SourceNode object + if (opts.map) { + let consumer = new SourceMapConsumer(precompiled.map); + precompiled = SourceNode.fromStringWithSourceMap(precompiled.code, consumer); + } + + if (opts.simple) { + output.add([precompiled, '\n']); + } else { + if (!template.name) { + throw new Handlebars.Exception('Name missing for template'); + } + + if (opts.amd && !multiple) { + output.add('return '); + } + output.add([objectName, '[\'', template.name, '\'] = template(', precompiled, ');\n']); + } + }); + + // Output the content + if (!opts.simple) { + if (opts.amd) { + if (multiple) { + output.add(['return ', objectName, ';\n']); + } + output.add('});'); + } else if (!opts.commonjs) { + output.add('})();'); + } + } + + + if (opts.map) { + output.add('\n//# sourceMappingURL=' + opts.map + '\n'); + } + + output = output.toStringWithSourceMap(); + output.map = output.map + ''; + + if (opts.min) { + output = uglify.minify(output.code, { + fromString: true, + + outSourceMap: opts.map, + inSourceMap: JSON.parse(output.map) + }); + if (opts.map) { + output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; + } + } + + if (opts.map) { + fs.writeFileSync(opts.map, output.map, 'utf8'); + } + output = output.code; + + if (opts.output) { + fs.writeFileSync(opts.output, output, 'utf8'); + } else { + console.log(output); + } +}; + +function arrayCast(value) { + value = value != null ? value : []; + if (!Array.isArray(value)) { + value = [value]; + } + return value; +} diff --git a/tools/eslint/node_modules/handlebars/package.json b/tools/eslint/node_modules/handlebars/package.json new file mode 100644 index 00000000000000..c2e604dcdee295 --- /dev/null +++ b/tools/eslint/node_modules/handlebars/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + "handlebars@^4.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "handlebars@>=4.0.0 <5.0.0", + "_id": "handlebars@4.0.5", + "_inCache": true, + "_installable": true, + "_location": "/eslint/handlebars", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "kpdecker@gmail.com", + "name": "kpdecker" + }, + "_npmVersion": "3.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "handlebars", + "raw": "handlebars@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz", + "_shasum": "92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7", + "_shrinkwrap": null, + "_spec": "handlebars@^4.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "name": "Yehuda Katz" + }, + "barename": "handlebars", + "bin": { + "handlebars": "bin/handlebars" + }, + "bugs": { + "url": "https://github.com/wycats/handlebars.js/issues" + }, + "dependencies": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", + "devDependencies": { + "aws-sdk": "^2.1.49", + "babel-loader": "^5.0.0", + "babel-runtime": "^5.1.10", + "benchmark": "~1.0", + "dustjs-linkedin": "^2.0.2", + "eco": "~1.1.0-rc-3", + "grunt": "~0.4.1", + "grunt-babel": "^5.0.0", + "grunt-cli": "~0.1.10", + "grunt-contrib-clean": "0.x", + "grunt-contrib-concat": "0.x", + "grunt-contrib-connect": "0.x", + "grunt-contrib-copy": "0.x", + "grunt-contrib-requirejs": "0.x", + "grunt-contrib-uglify": "0.x", + "grunt-contrib-watch": "0.x", + "grunt-eslint": "^17.1.0", + "grunt-saucelabs": "8.x", + "grunt-webpack": "^1.0.8", + "istanbul": "^0.3.0", + "jison": "~0.3.0", + "mocha": "~1.20.0", + "mock-stdin": "^0.3.0", + "mustache": "^2.1.3", + "semver": "^5.0.1", + "underscore": "^1.5.1", + "webpack": "^1.12.6", + "webpack-dev-server": "^1.12.1" + }, + "directories": {}, + "dist": { + "shasum": "92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7", + "tarball": "http://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz" + }, + "engines": { + "node": ">=0.4.7" + }, + "gitHead": "205c61cfb1acdb599bbdfcf2d356641254e09e5c", + "homepage": "http://www.handlebarsjs.com/", + "jspm": { + "buildConfig": { + "minify": true + }, + "directories": { + "lib": "dist/amd" + }, + "main": "handlebars" + }, + "keywords": [ + "handlebars", + "html", + "mustache", + "template" + ], + "license": "MIT", + "main": "lib/index.js", + "maintainers": [ + { + "name": "kpdecker", + "email": "kpdecker@gmail.com" + } + ], + "name": "handlebars", + "optionalDependencies": { + "uglify-js": "^2.6" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/wycats/handlebars.js.git" + }, + "scripts": { + "test": "grunt" + }, + "version": "4.0.5" +} diff --git a/tools/eslint/node_modules/handlebars/print-script b/tools/eslint/node_modules/handlebars/print-script new file mode 100755 index 00000000000000..046b99c17dfa8c --- /dev/null +++ b/tools/eslint/node_modules/handlebars/print-script @@ -0,0 +1,95 @@ +#! /usr/bin/env node +/* eslint-disable no-console, no-var */ +// Util script for debugging source code generation issues + +var script = process.argv[2].replace(/\\n/g, '\n'), + verbose = process.argv[3] === '-v'; + +var Handlebars = require('./lib'), + SourceMap = require('source-map'), + SourceMapConsumer = SourceMap.SourceMapConsumer; + +var template = Handlebars.precompile(script, { + srcName: 'input.hbs', + destName: 'output.js', + + assumeObjects: true, + compat: false, + strict: true, + trackIds: true, + knownHelpersOnly: false + }); + +if (!verbose) { + console.log(template); +} else { + var consumer = new SourceMapConsumer(template.map), + lines = template.code.split('\n'), + srcLines = script.split('\n'); + + console.log(); + console.log('Source:'); + srcLines.forEach(function(source, index) { + console.log(index + 1, source); + }); + console.log(); + console.log('Generated:'); + console.log(template.code); + lines.forEach(function(source, index) { + console.log(index + 1, source); + }); + console.log(); + console.log('Map:'); + console.log(template.map); + console.log(); + + function collectSource(lines, lineName, colName, order) { + var ret = {}, + ordered = [], + last; + + function collect(current) { + if (last) { + var mapLines = lines.slice(last[lineName] - 1, current && current[lineName]); + if (mapLines.length) { + if (current) { + mapLines[mapLines.length - 1] = mapLines[mapLines.length - 1].slice(0, current[colName]); + } + mapLines[0] = mapLines[0].slice(last[colName]); + } + ret[last[lineName] + ':' + last[colName]] = mapLines.join('\n'); + ordered.push({ + startLine: last[lineName], + startCol: last[colName], + endLine: current && current[lineName] + }); + } + last = current; + } + + consumer.eachMapping(collect, undefined, order); + collect(); + + return ret; + } + + srcLines = collectSource(srcLines, 'originalLine', 'originalColumn', SourceMapConsumer.ORIGINAL_ORDER); + lines = collectSource(lines, 'generatedLine', 'generatedColumn'); + + consumer.eachMapping(function(mapping) { + var originalSrc = srcLines[mapping.originalLine + ':' + mapping.originalColumn], + generatedSrc = lines[mapping.generatedLine + ':' + mapping.generatedColumn]; + + if (!mapping.originalLine) { + console.log('generated', mapping.generatedLine + ':' + mapping.generatedColumn, generatedSrc); + } else { + console.log('map', + mapping.source, + mapping.originalLine + ':' + mapping.originalColumn, + originalSrc, + '->', + mapping.generatedLine + ':' + mapping.generatedColumn, + generatedSrc); + } + }); +} diff --git a/tools/eslint/node_modules/handlebars/release-notes.md b/tools/eslint/node_modules/handlebars/release-notes.md new file mode 100644 index 00000000000000..3ee77e1d21ca0d --- /dev/null +++ b/tools/eslint/node_modules/handlebars/release-notes.md @@ -0,0 +1,462 @@ +# Release Notes + +## Development + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.5...master) + +## v4.0.5 - November 19th, 2015 +- [#1132](https://github.com/wycats/handlebars.js/pull/1132) - Update uglify-js to avoid vulnerability ([@plynchnlm](https://api.github.com/users/plynchnlm)) +- [#1129](https://github.com/wycats/handlebars.js/issues/1129) - Minified lib returns an empty string ([@bricss](https://api.github.com/users/bricss)) +- Return current handlebars instance from noConflict - 685cf92 +- Add webpack to dev dependency to support npm 3 - 7a6c228 +- Further relax uglify dependency - 0a3b3c2 +- Include tests for minimized artifacts - c21118d +- Fix lint errors under latest eslint - 9f59de9 +- Add print-script helper script - 98a6717 + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.4...v4.0.5) + +## v4.0.4 - October 29th, 2015 +- [#1121](https://github.com/wycats/handlebars.js/pull/1121) - Include partial name in 'undefined partial' exception message ([@shinypb](https://api.github.com/users/shinypb)) +- [#1125](https://github.com/wycats/handlebars.js/pull/1125) - Add promised-handlebars to "in-the-wild"-list ([@nknapp](https://api.github.com/users/nknapp)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.3...v4.0.4) + +## v4.0.3 - September 23rd, 2015 +- [#1099](https://github.com/wycats/handlebars.js/issues/1099) - @partial-block is overridden ([@btmorex](https://api.github.com/users/btmorex)) +- [#1093](https://github.com/wycats/handlebars.js/issues/1093) - #each skips iteration on undefined values ([@florianpilz](https://api.github.com/users/florianpilz)) +- [#1092](https://github.com/wycats/handlebars.js/issues/1092) - Square braces in key name ([@distantnative](https://api.github.com/users/distantnative)) +- [#1091](https://github.com/wycats/handlebars.js/pull/1091) - fix typo in release notes ([@nikolas](https://api.github.com/users/nikolas)) +- [#1090](https://github.com/wycats/handlebars.js/pull/1090) - grammar fixes in 4.0.0 release notes ([@nikolas](https://api.github.com/users/nikolas)) + +Compatibility notes: +- `each` iteration with `undefined` values has been restored to the 3.0 behaviors. Helper calls with undefined context values will now execute against an arbitrary empty object to avoid executing against global object in non-strict mode. +- `]` can now be included in `[]` wrapped identifiers by escaping with `\`. Any `[]` identifiers that include `\` will now have to properly escape these values. + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.2...v4.0.3) + +## v4.0.2 - September 4th, 2015 +- [#1089](https://github.com/wycats/handlebars.js/issues/1089) - "Failover content" not working in multiple levels of inline partials ([@michaellopez](https://api.github.com/users/michaellopez)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.1...v4.0.2) + +## v4.0.1 - September 2nd, 2015 +- Fix failure when using decorators in partials - 05b82a2 + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.0...v4.0.1) + +## v4.0.0 - September 1st, 2015 +- [#1082](https://github.com/wycats/handlebars.js/pull/1082) - Decorators and Inline Partials ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#1076](https://github.com/wycats/handlebars.js/pull/1076) - Implement partial blocks ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#1087](https://github.com/wycats/handlebars.js/pull/1087) - Fix #each when last object entry has empty key ([@denniskuczynski](https://api.github.com/users/denniskuczynski)) +- [#1084](https://github.com/wycats/handlebars.js/pull/1084) - Bump uglify version to fix vulnerability ([@John-Steidley](https://api.github.com/users/John-Steidley)) +- [#1068](https://github.com/wycats/handlebars.js/pull/1068) - Fix typo ([@0xack13](https://api.github.com/users/0xack13)) +- [#1060](https://github.com/wycats/handlebars.js/pull/1060) - #1056 Fixed grammar for nested raw blocks ([@ericbn](https://api.github.com/users/ericbn)) +- [#1052](https://github.com/wycats/handlebars.js/pull/1052) - Updated year in License ([@maqnouch](https://api.github.com/users/maqnouch)) +- [#1037](https://github.com/wycats/handlebars.js/pull/1037) - Fix minor typos in README ([@tomxtobin](https://api.github.com/users/tomxtobin)) +- [#1032](https://github.com/wycats/handlebars.js/issues/1032) - Is it possible to render a partial without the parent scope? ([@aputinski](https://api.github.com/users/aputinski)) +- [#1019](https://github.com/wycats/handlebars.js/pull/1019) - Fixes typo in tests ([@aymerick](https://api.github.com/users/aymerick)) +- [#1016](https://github.com/wycats/handlebars.js/issues/1016) - Version mis-match ([@mayankdedhia](https://api.github.com/users/mayankdedhia)) +- [#1023](https://github.com/wycats/handlebars.js/issues/1023) - is it possible for nested custom helpers to communicate between each other? +- [#893](https://github.com/wycats/handlebars.js/issues/893) - [Proposal] Section blocks. +- [#792](https://github.com/wycats/handlebars.js/issues/792) - feature request: inline partial definitions +- [#583](https://github.com/wycats/handlebars.js/issues/583) - Parent path continues to drill down depth with multiple conditionals +- [#404](https://github.com/wycats/handlebars.js/issues/404) - Add named child helpers that can be referenced by block helpers +- Escape = in HTML content - [83b8e84](https://github.com/wycats/handlebars.js/commit/83b8e84) +- Drop AST constructors in favor of JSON - [95d84ba](https://github.com/wycats/handlebars.js/commit/95d84ba) +- Pass container rather than exec as context - [9a2d1d6](https://github.com/wycats/handlebars.js/commit/9a2d1d6) +- Add ignoreStandalone compiler option - [ea3a5a1](https://github.com/wycats/handlebars.js/commit/ea3a5a1) +- Ignore empty when iterating on sparse arrays - [06d515a](https://github.com/wycats/handlebars.js/commit/06d515a) +- Add support for string and stdin precompilation - [0de8dac](https://github.com/wycats/handlebars.js/commit/0de8dac) +- Simplify object assignment generation logic - [77e6bfc](https://github.com/wycats/handlebars.js/commit/77e6bfc) +- Bulletproof AST.helpers.helperExpression - [93b0760](https://github.com/wycats/handlebars.js/commit/93b0760) +- Always return string responses - [8e868ab](https://github.com/wycats/handlebars.js/commit/8e868ab) +- Pass undefined fields to helpers in strict mode - [5d4b8da](https://github.com/wycats/handlebars.js/commit/5d4b8da) +- Avoid depth creation when context remains the same - [279e038](https://github.com/wycats/handlebars.js/commit/279e038) +- Improve logging API - [9a49d35](https://github.com/wycats/handlebars.js/commit/9a49d35) +- Fix with operator in no @data mode - [231a8d7](https://github.com/wycats/handlebars.js/commit/231a8d7) +- Allow empty key name in each iteration - [1bb640b](https://github.com/wycats/handlebars.js/commit/1bb640b) +- Add with block parameter support - [2a85106](https://github.com/wycats/handlebars.js/commit/2a85106) +- Fix escaping of non-javascript identifiers - [410141c](https://github.com/wycats/handlebars.js/commit/410141c) +- Fix location information for programs - [93faffa](https://github.com/wycats/handlebars.js/commit/93faffa) + +Compatibility notes: +- Depthed paths are now conditionally pushed on to the stack. If the helper uses the same context, then a new stack is not created. This leads to behavior that better matches expectations for helpers like `if` that do not seem to alter the context. Any instances of `../` in templates will need to be checked for the correct behavior under 4.0.0. In general templates will either reduce the number of `../` instances or leave them as is. See [#1028](https://github.com/wycats/handlebars.js/issues/1028). +- The `=` character is now HTML escaped. This closes a potential exploit case when using unquoted attributes, i.e. `
`. In general it's recommended that attributes always be quoted when their values are generated from a mustache to avoid any potential exploit surfaces. +- AST constructors have been dropped in favor of plain old javascript objects +- The runtime version has been increased. Precompiled templates will need to use runtime of at least 4.0.0. + +[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.3...v4.0.0) + +## v3.0.3 - April 28th, 2015 +- [#1004](https://github.com/wycats/handlebars.js/issues/1004) - Latest version breaks with RequireJS (global is undefined) ([@boskee](https://api.github.com/users/boskee)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.2...v3.0.3) + +## v3.0.2 - April 20th, 2015 +- [#998](https://github.com/wycats/handlebars.js/pull/998) - Add full support for es6 ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#994](https://github.com/wycats/handlebars.js/issues/994) - Access Handlebars.Visitor in browser ([@tamlyn](https://api.github.com/users/tamlyn)) +- [#990](https://github.com/wycats/handlebars.js/issues/990) - Allow passing null/undefined literals subexpressions ([@blimmer](https://api.github.com/users/blimmer)) +- [#989](https://github.com/wycats/handlebars.js/issues/989) - Source-map error with requirejs ([@SteppeEagle](https://api.github.com/users/SteppeEagle)) +- [#967](https://github.com/wycats/handlebars.js/issues/967) - can't access "this" property ([@75lb](https://api.github.com/users/75lb)) +- Use captureStackTrace for error handler - a009a97 +- Ignore branches tested without coverage monitoring - 37a664b + +[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.1...v3.0.2) + +## v3.0.1 - March 24th, 2015 +- [#984](https://github.com/wycats/handlebars.js/pull/984) - Adding documentation for passing arguments into partials ([@johneke](https://api.github.com/users/johneke)) +- [#973](https://github.com/wycats/handlebars.js/issues/973) - version 3 is slower than version 2 ([@elover](https://api.github.com/users/elover)) +- [#966](https://github.com/wycats/handlebars.js/issues/966) - "handlebars --version" does not work with v3.0.0 ([@abloomston](https://api.github.com/users/abloomston)) +- [#964](https://github.com/wycats/handlebars.js/pull/964) - default is a reserved word ([@grassick](https://api.github.com/users/grassick)) +- [#962](https://github.com/wycats/handlebars.js/pull/962) - Add dashbars' link on README. ([@pismute](https://api.github.com/users/pismute)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.0...v3.0.1) + +## v3.0.0 - February 10th, 2015 +- [#941](https://github.com/wycats/handlebars.js/pull/941) - Add support for dynamic partial names ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#940](https://github.com/wycats/handlebars.js/pull/940) - Add missing reserved words so compiler knows to use array syntax: ([@mattflaschen](https://api.github.com/users/mattflaschen)) +- [#938](https://github.com/wycats/handlebars.js/pull/938) - Fix example using #with helper ([@diwo](https://api.github.com/users/diwo)) +- [#930](https://github.com/wycats/handlebars.js/pull/930) - Add parent tracking and mutation to AST visitors ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#926](https://github.com/wycats/handlebars.js/issues/926) - Depthed lookups fail when program duplicator runs ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#918](https://github.com/wycats/handlebars.js/pull/918) - Add instructions for 'spec/mustache' to CONTRIBUTING.md, fix a few typos ([@oneeman](https://api.github.com/users/oneeman)) +- [#915](https://github.com/wycats/handlebars.js/pull/915) - Ast update ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#910](https://github.com/wycats/handlebars.js/issues/910) - Different behavior of {{@last}} when {{#each}} in {{#each}} ([@zordius](https://api.github.com/users/zordius)) +- [#907](https://github.com/wycats/handlebars.js/issues/907) - Implement named helper variable references ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#906](https://github.com/wycats/handlebars.js/pull/906) - Add parser support for block params ([@mmun](https://api.github.com/users/mmun)) +- [#903](https://github.com/wycats/handlebars.js/issues/903) - Only provide aliases for multiple use calls ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#902](https://github.com/wycats/handlebars.js/pull/902) - Generate Source Maps ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#901](https://github.com/wycats/handlebars.js/issues/901) - Still escapes with noEscape enabled on isolated Handlebars environment ([@zedknight](https://api.github.com/users/zedknight)) +- [#896](https://github.com/wycats/handlebars.js/pull/896) - Simplify BlockNode by removing intermediate MustacheNode ([@mmun](https://api.github.com/users/mmun)) +- [#892](https://github.com/wycats/handlebars.js/pull/892) - Implement parser for else chaining of helpers ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#889](https://github.com/wycats/handlebars.js/issues/889) - Consider extensible parser API ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#887](https://github.com/wycats/handlebars.js/issues/887) - Handlebars.noConflict() option? ([@bradvogel](https://api.github.com/users/bradvogel)) +- [#886](https://github.com/wycats/handlebars.js/issues/886) - Add SafeString to context (or use duck-typing) ([@dominicbarnes](https://api.github.com/users/dominicbarnes)) +- [#870](https://github.com/wycats/handlebars.js/pull/870) - Registering undefined partial throws exception. ([@max-b](https://api.github.com/users/max-b)) +- [#866](https://github.com/wycats/handlebars.js/issues/866) - comments don't respect whitespace control ([@75lb](https://api.github.com/users/75lb)) +- [#863](https://github.com/wycats/handlebars.js/pull/863) - + jsDelivr CDN info ([@tomByrer](https://api.github.com/users/tomByrer)) +- [#858](https://github.com/wycats/handlebars.js/issues/858) - Disable new default auto-indent at included partials ([@majodev](https://api.github.com/users/majodev)) +- [#856](https://github.com/wycats/handlebars.js/pull/856) - jspm compatibility ([@MajorBreakfast](https://api.github.com/users/MajorBreakfast)) +- [#805](https://github.com/wycats/handlebars.js/issues/805) - Request: "strict" lookups ([@nzakas](https://api.github.com/users/nzakas)) + +- Export the default object for handlebars/runtime - 5594416 +- Lookup partials when undefined - 617dd57 + +Compatibility notes: +- Runtime breaking changes. Must match 3.x runtime and precompiler. +- The AST has been upgraded to a public API. + - There are a number of changes to this, but the format is now documented in docs/compiler-api.md + - The Visitor API has been expanded to support mutation and provide a base implementation +- The `JavaScriptCompiler` APIs have been formalized and documented. As part of the sourcemap handling these should be updated to return arrays for concatenation. +- `JavaScriptCompiler.namespace` has been removed as it was unused. +- `SafeString` is now duck typed on `toHTML` + +New Features: +- noConflict +- Source Maps +- Block Params +- Strict Mode +- @last and other each changes +- Chained else blocks +- @data methods can now have helper parameters passed to them +- Dynamic partials + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0...v3.0.0) + +## v2.0.0 - September 1st, 2014 +- Update jsfiddle to 2.0.0-beta.1 - 0670f65 +- Add contrib note regarding handlebarsjs.com docs - 4d17e3c +- Play nice with gemspec version numbers - 64d5481 + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-beta.1...v2.0.0) + +## v2.0.0-beta.1 - August 26th, 2014 +- [#787](https://github.com/wycats/handlebars.js/pull/787) - Remove whitespace surrounding standalone statements ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#827](https://github.com/wycats/handlebars.js/issues/827) - Render false literal as “false” ([@scoot557](https://api.github.com/users/scoot557)) +- [#767](https://github.com/wycats/handlebars.js/issues/767) - Subexpressions bug with hash and context ([@evensoul](https://api.github.com/users/evensoul)) +- Changes to 0/undefined handling + - [#731](https://github.com/wycats/handlebars.js/pull/731) - Strange behavior for {{#foo}} {{bar}} {{/foo}} when foo is 0 ([@kpdecker](https://api.github.com/users/kpdecker)) + - [#820](https://github.com/wycats/handlebars.js/issues/820) - strange behavior for {{foo.bar}} when foo is 0 or null or false ([@zordius](https://api.github.com/users/zordius)) + - [#837](https://github.com/wycats/handlebars.js/issues/837) - Strange input for custom helper ( foo.bar == false when foo is undefined ) ([@zordius](https://api.github.com/users/zordius)) +- [#819](https://github.com/wycats/handlebars.js/pull/819) - Implement recursive field lookup ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#764](https://github.com/wycats/handlebars.js/issues/764) - This reference not working for helpers ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#773](https://github.com/wycats/handlebars.js/issues/773) - Implicit parameters in {{#each}} introduces a peculiarity in helpers calling convention ([@Bertrand](https://api.github.com/users/Bertrand)) +- [#783](https://github.com/wycats/handlebars.js/issues/783) - helperMissing and consistency for different expression types ([@ErisDS](https://api.github.com/users/ErisDS)) +- [#795](https://github.com/wycats/handlebars.js/pull/795) - Turn the precompile script into a wrapper around a module. ([@jwietelmann](https://api.github.com/users/jwietelmann)) +- [#823](https://github.com/wycats/handlebars.js/pull/823) - Support inverse sections on the with helper ([@dan-manges](https://api.github.com/users/dan-manges)) +- [#834](https://github.com/wycats/handlebars.js/pull/834) - Refactor blocks, programs and inverses ([@mmun](https://api.github.com/users/mmun)) +- [#852](https://github.com/wycats/handlebars.js/issues/852) - {{foo~}} space control behavior is different from older version ([@zordius](https://api.github.com/users/zordius)) +- [#835](https://github.com/wycats/handlebars.js/issues/835) - Templates overwritten if file is loaded twice + +- Expose escapeExpression on the root object - 980c38c +- Remove nested function eval in blockHelperMissing - 6f22ec1 +- Fix compiler program de-duping - 9e3f824 + +Compatibility notes: +- The default build now outputs a generic UMD wrapper. This should be transparent change but may cause issues in some environments. +- Runtime compatibility breaks in both directions. Ensure that both compiler and client are upgraded to 2.0.0-beta.1 or higher at the same time. + - `programWithDepth` has been removed an instead an array of context values is passed to fields needing depth lookups. +- `false` values are now printed to output rather than silently dropped +- Lines containing only block statements and whitespace are now removed. This matches the Mustache spec but may cause issues with code that expects whitespace to exist but would not otherwise. +- Partials that are standalone will now indent their rendered content +- `AST.ProgramNode`'s signature has changed. +- Numerious methods/features removed from psuedo-API classes + - `JavaScriptCompiler.register` + - `JavaScriptCompiler.replaceStack` no longer supports non-inline replace + - `Compiler.disassemble` + - `DECLARE` opcode + - `strip` opcode + - `lookup` opcode + - Content nodes may have their `string` values mutated over time. `original` field provides the unmodified value. +- Removed unused `Handlebars.registerHelper` `inverse` parameter +- `each` helper requires iterator parameter + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.4...v2.0.0-beta.1) + +## v2.0.0-alpha.4 - May 19th, 2014 +- Expose setup wrappers for compiled templates - 3638874 + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) + +## v2.0.0-alpha.3 - May 19th, 2014 +- [#797](https://github.com/wycats/handlebars.js/pull/797) - Pass full helper ID to helperMissing when options are provided ([@tomdale](https://api.github.com/users/tomdale)) +- [#793](https://github.com/wycats/handlebars.js/pull/793) - Ensure isHelper is coerced to a boolean ([@mmun](https://api.github.com/users/mmun)) +- Refactor template init logic - 085e5e1 + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) + +## v2.0.0-alpha.2 - March 6th, 2014 +- [#756](https://github.com/wycats/handlebars.js/pull/756) - fix bug in IE<=8 (no Array::map), closes #751 ([@jenseng](https://api.github.com/users/jenseng)) +- [#749](https://github.com/wycats/handlebars.js/pull/749) - properly handle multiple subexpressions in the same hash, fixes #748 ([@jenseng](https://api.github.com/users/jenseng)) +- [#743](https://github.com/wycats/handlebars.js/issues/743) - subexpression confusion/problem? ([@waynedpj](https://api.github.com/users/waynedpj)) +- [#746](https://github.com/wycats/handlebars.js/issues/746) - [CLI] support `handlebars --version` ([@apfelbox](https://api.github.com/users/apfelbox)) +- [#747](https://github.com/wycats/handlebars.js/pull/747) - updated grunt-saucelabs, failing tests revealed ([@Jonahss](https://api.github.com/users/Jonahss)) +- Make JSON a requirement for the compiler. - 058c0fb +- Temporarily kill the AWS publish CI step - 8347ee2 + +Compatibility notes: +- A JSON polyfill is required to run the compiler under IE8 and below. It's recommended that the precompiler be used in lieu of running the compiler on these legacy environments. + +[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) + +## v2.0.0-alpha.1 - February 10th, 2014 +- [#182](https://github.com/wycats/handlebars.js/pull/182) - Allow passing hash parameters to partials ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#392](https://github.com/wycats/handlebars.js/pull/392) - Access to root context in partials and helpers ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#472](https://github.com/wycats/handlebars.js/issues/472) - Helpers cannot have decimal parameters ([@kayleg](https://api.github.com/users/kayleg)) +- [#569](https://github.com/wycats/handlebars.js/pull/569) - Unable to lookup array values using @index ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#491](https://github.com/wycats/handlebars.js/pull/491) - For nested helpers: get the @ variables of the outer helper from the inner one ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#669](https://github.com/wycats/handlebars.js/issues/669) - Ability to unregister a helper ([@dbachrach](https://api.github.com/users/dbachrach)) +- [#730](https://github.com/wycats/handlebars.js/pull/730) - Raw block helpers ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#634](https://github.com/wycats/handlebars.js/pull/634) - It would be great to have the helper name passed to `blockHelperMissing` ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#729](https://github.com/wycats/handlebars.js/pull/729) - Convert template spec to object literal ([@kpdecker](https://api.github.com/users/kpdecker)) + +- [#658](https://github.com/wycats/handlebars.js/issues/658) - Depthed helpers do not work after an upgrade from 1.0.0 ([@xibxor](https://api.github.com/users/xibxor)) +- [#671](https://github.com/wycats/handlebars.js/issues/671) - Crashes on no-parameter {{#each}} ([@stepancheg](https://api.github.com/users/stepancheg)) +- [#689](https://github.com/wycats/handlebars.js/issues/689) - broken template precompilation ([@AAS](https://api.github.com/users/AAS)) +- [#698](https://github.com/wycats/handlebars.js/pull/698) - Fix parser generation under windows ([@osiris43](https://api.github.com/users/osiris43)) +- [#699](https://github.com/wycats/handlebars.js/issues/699) - @DATA not compiles to invalid JS in stringParams mode ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#705](https://github.com/wycats/handlebars.js/issues/705) - 1.3.0 can not be wrapped in an IIFE ([@craigteegarden](https://api.github.com/users/craigteegarden)) +- [#706](https://github.com/wycats/handlebars.js/pull/706) - README: Use with helper instead of relying on blockHelperMissing ([@scottgonzalez](https://api.github.com/users/scottgonzalez)) + +- [#700](https://github.com/wycats/handlebars.js/pull/700) - Remove redundant conditions ([@blakeembrey](https://api.github.com/users/blakeembrey)) +- [#704](https://github.com/wycats/handlebars.js/pull/704) - JavaScript Compiler Cleanup ([@blakeembrey](https://api.github.com/users/blakeembrey)) + +Compatibility notes: +- `helperMissing` helper no longer has the indexed name argument. Helper name is now available via `options.name`. +- Precompiler output has changed, which breaks compatibility with prior versions of the runtime and precompiled output. +- `JavaScriptCompiler.compilerInfo` now returns generic objects rather than javascript source. +- AST changes + - INTEGER -> NUMBER + - Additional PartialNode hash parameter + - New RawBlockNode type +- Data frames now have a `_parent` field. This is internal but is enumerable for performance/compatibility reasons. + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.3.0...v2.0.0-alpha.1) + +## v1.3.0 - January 1st, 2014 +- [#690](https://github.com/wycats/handlebars.js/pull/690) - Added support for subexpressions ([@machty](https://api.github.com/users/machty)) +- [#696](https://github.com/wycats/handlebars.js/pull/696) - Fix for reserved keyword "default" ([@nateirwin](https://api.github.com/users/nateirwin)) +- [#692](https://github.com/wycats/handlebars.js/pull/692) - add line numbers to nodes when parsing ([@fivetanley](https://api.github.com/users/fivetanley)) +- [#695](https://github.com/wycats/handlebars.js/pull/695) - Pull options out from param setup to allow easier extension ([@blakeembrey](https://api.github.com/users/blakeembrey)) +- [#694](https://github.com/wycats/handlebars.js/pull/694) - Make the environment reusable ([@blakeembrey](https://api.github.com/users/blakeembrey)) +- [#636](https://github.com/wycats/handlebars.js/issues/636) - Print line and column of errors ([@sgronblo](https://api.github.com/users/sgronblo)) +- Use literal for data lookup - c1a93d3 +- Add stack handling sanity checks - cd885bf +- Fix stack id "leak" on replaceStack - ddfe457 +- Fix incorrect stack pop when replacing literals - f4d337d + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.2.1...v1.3.0) + +## v1.2.1 - December 26th, 2013 +- [#684](https://github.com/wycats/handlebars.js/pull/684) - Allow any number of trailing characters for valid JavaScript variable ([@blakeembrey](https://api.github.com/users/blakeembrey)) +- [#686](https://github.com/wycats/handlebars.js/pull/686) - Falsy AMD module names in version 1.2.0 ([@kpdecker](https://api.github.com/users/kpdecker)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.2.0...v1.2.1) + +## v1.2.0 - December 23rd, 2013 +- [#675](https://github.com/wycats/handlebars.js/issues/675) - Cannot compile empty template for partial ([@erwinw](https://api.github.com/users/erwinw)) +- [#677](https://github.com/wycats/handlebars.js/issues/677) - Triple brace statements fail under IE ([@hamzaCM](https://api.github.com/users/hamzaCM)) +- [#655](https://github.com/wycats/handlebars.js/issues/655) - Loading Handlebars using bower ([@niki4810](https://api.github.com/users/niki4810)) +- [#657](https://github.com/wycats/handlebars.js/pull/657) - Fixes issue where cli compiles non handlebars templates ([@chrishoage](https://api.github.com/users/chrishoage)) +- [#681](https://github.com/wycats/handlebars.js/pull/681) - Adds in-browser testing and Saucelabs CI ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#661](https://github.com/wycats/handlebars.js/pull/661) - Add @first and @index to #each object iteration ([@cgp](https://api.github.com/users/cgp)) +- [#650](https://github.com/wycats/handlebars.js/pull/650) - Handlebars is MIT-licensed ([@thomasboyt](https://api.github.com/users/thomasboyt)) +- [#641](https://github.com/wycats/handlebars.js/pull/641) - Document ember testing process ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#662](https://github.com/wycats/handlebars.js/issues/662) - handlebars-source 1.1.2 is missing from RubyGems. +- [#656](https://github.com/wycats/handlebars.js/issues/656) - Expose COMPILER_REVISION checks as a hook ([@machty](https://api.github.com/users/machty)) +- [#668](https://github.com/wycats/handlebars.js/issues/668) - Consider publishing handlebars-runtime as a separate module on npm ([@dlmanning](https://api.github.com/users/dlmanning)) +- [#679](https://github.com/wycats/handlebars.js/issues/679) - Unable to override invokePartial ([@mattbrailsford](https://api.github.com/users/mattbrailsford)) +- [#646](https://github.com/wycats/handlebars.js/pull/646) - Fix "\\{{" immediately following "\{{" ([@dmarcotte](https://api.github.com/users/dmarcotte)) +- Allow extend to work with non-prototyped objects - eb53f2e +- Add JavascriptCompiler public API tests - 1a751b2 +- Add AST test coverage for more complex paths - ddea5be +- Fix handling of boolean escape in MustacheNode - b4968bb + +Compatibility notes: +- `@index` and `@first` are now supported for `each` iteration on objects +- `Handlebars.VM.checkRevision` and `Handlebars.JavaScriptCompiler.prototype.compilerInfo` now available to modify the version checking behavior. +- Browserify users may link to the runtime library via `require('handlebars/runtime')` + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.2...v1.2.0) + +## v1.1.2 - November 5th, 2013 + +- [#645](https://github.com/wycats/handlebars.js/issues/645) - 1.1.1 fails under IE8 ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#644](https://github.com/wycats/handlebars.js/issues/644) - Using precompiled templates (AMD mode) with handlebars.runtime 1.1.1 ([@fddima](https://api.github.com/users/fddima)) + +- Add simple binary utility tests - 96a45a4 +- Fix empty string compilation - eea708a + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.1...v1.1.2) + +## v1.1.1 - November 4th, 2013 + +- [#642](https://github.com/wycats/handlebars.js/issues/642) - handlebars 1.1.0 are broken with nodejs + +- Fix release notes link - 17ba258 + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.0...v1.1.1) + +## v1.1.0 - November 3rd, 2013 + +- [#628](https://github.com/wycats/handlebars.js/pull/628) - Convert code to ES6 modules ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#336](https://github.com/wycats/handlebars.js/pull/336) - Add whitespace control syntax ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#535](https://github.com/wycats/handlebars.js/pull/535) - Fix for probable JIT error under Safari ([@sorentwo](https://api.github.com/users/sorentwo)) +- [#483](https://github.com/wycats/handlebars.js/issues/483) - Add first and last @ vars to each helper ([@denniskuczynski](https://api.github.com/users/denniskuczynski)) +- [#557](https://github.com/wycats/handlebars.js/pull/557) - `\\{{foo}}` escaping only works in some situations ([@dmarcotte](https://api.github.com/users/dmarcotte)) +- [#552](https://github.com/wycats/handlebars.js/pull/552) - Added BOM removal flag. ([@blessenm](https://api.github.com/users/blessenm)) +- [#543](https://github.com/wycats/handlebars.js/pull/543) - publish passing master builds to s3 ([@fivetanley](https://api.github.com/users/fivetanley)) + +- [#608](https://github.com/wycats/handlebars.js/issues/608) - Add `includeZero` flag to `if` conditional +- [#498](https://github.com/wycats/handlebars.js/issues/498) - `Handlebars.compile` fails on empty string although a single blank works fine +- [#599](https://github.com/wycats/handlebars.js/issues/599) - lambda helpers only receive options if used with arguments +- [#592](https://github.com/wycats/handlebars.js/issues/592) - Optimize array and subprogram performance +- [#571](https://github.com/wycats/handlebars.js/issues/571) - uglify upgrade breaks compatibility with older versions of node +- [#587](https://github.com/wycats/handlebars.js/issues/587) - Partial inside partial breaks? + + +Compatibility notes: +- The project now includes separate artifacts for AMD, CommonJS, and global objects. + - AMD: Users may load the bundled `handlebars.amd.js` or `handlebars.runtime.amd.js` files or load individual modules directly. AMD users should also note that the handlebars object is exposed via the `default` field on the imported object. This [gist](https://gist.github.com/wycats/7417be0dc361a69d5916) provides some discussion of possible compatibility shims. + - CommonJS/Node: Node loading occurs as normal via `require` + - Globals: The `handlebars.js` and `handlebars.runtime.js` files should behave in the same manner as the v1.0.12 / 1.0.0 release. +- Build artifacts have been removed from the repository. [npm][npm], [components/handlebars.js][components], [cdnjs][cdnjs], or the [builds page][builds-page] should now be used as the source of built artifacts. +- Context-stored helpers are now always passed the `options` hash. Previously no-argument helpers did not have this argument. + + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.12...v1.1.0) + +## v1.0.12 / 1.0.0 - May 31 2013 + +- [#515](https://github.com/wycats/handlebars.js/issues/515) - Add node require extensions support ([@jjclark1982](https://github.com/jjclark1982)) +- [#517](https://github.com/wycats/handlebars.js/issues/517) - Fix amd precompiler output with directories ([@blessenm](https://github.com/blessenm)) +- [#433](https://github.com/wycats/handlebars.js/issues/433) - Add support for unicode ids +- [#469](https://github.com/wycats/handlebars.js/issues/469) - Add support for `?` in ids +- [#534](https://github.com/wycats/handlebars.js/issues/534) - Protect from object prototype modifications +- [#519](https://github.com/wycats/handlebars.js/issues/519) - Fix partials with . name ([@jamesgorrie](https://github.com/jamesgorrie)) +- [#519](https://github.com/wycats/handlebars.js/issues/519) - Allow ID or strings in partial names +- [#437](https://github.com/wycats/handlebars.js/issues/437) - Require matching brace counts in escaped expressions +- Merge passed partials and helpers with global namespace values +- Add support for complex ids in @data references +- Docs updates + +Compatibility notes: +- The parser is now stricter on `{{{`, requiring that the end token be `}}}`. Templates that do not + follow this convention should add the additional brace value. +- Code that relies on global the namespace being muted when custom helpers or partials are passed will need to explicitly pass an `undefined` value for any helpers that should not be available. +- The compiler version has changed. Precompiled templates with 1.0.12 or higher must use the 1.0.0 or higher runtime. + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.11...v1.0.12) + +## v1.0.11 / 1.0.0-rc4 - May 13 2013 + +- [#458](https://github.com/wycats/handlebars.js/issues/458) - Fix `./foo` syntax ([@jpfiset](https://github.com/jpfiset)) +- [#460](https://github.com/wycats/handlebars.js/issues/460) - Allow `:` in unescaped identifers ([@jpfiset](https://github.com/jpfiset)) +- [#471](https://github.com/wycats/handlebars.js/issues/471) - Create release notes (These!) +- [#456](https://github.com/wycats/handlebars.js/issues/456) - Allow escaping of `\\` +- [#211](https://github.com/wycats/handlebars.js/issues/211) - Fix exception in `escapeExpression` +- [#375](https://github.com/wycats/handlebars.js/issues/375) - Escape unicode newlines +- [#461](https://github.com/wycats/handlebars.js/issues/461) - Do not fail when compiling `""` +- [#302](https://github.com/wycats/handlebars.js/issues/302) - Fix sanity check in knownHelpersOnly mode +- [#369](https://github.com/wycats/handlebars.js/issues/369) - Allow registration of multiple helpers and partial by passing definition object +- Add bower package declaration ([@DevinClark](https://github.com/DevinClark)) +- Add NuSpec package declaration ([@MikeMayer](https://github.com/MikeMayer)) +- Handle empty context in `with` ([@thejohnfreeman](https://github.com/thejohnfreeman)) +- Support custom template extensions in CLI ([@matteoagosti](https://github.com/matteoagosti)) +- Fix Rhino support ([@broady](https://github.com/broady)) +- Include contexts in string mode ([@leshill](https://github.com/leshill)) +- Return precompiled scripts when compiling to AMD ([@JamesMaroney](https://github.com/JamesMaroney)) +- Docs updates ([@iangreenleaf](https://github.com/iangreenleaf), [@gilesbowkett](https://github.com/gilesbowkett), [@utkarsh2012](https://github.com/utkarsh2012)) +- Fix `toString` handling under IE and browserify ([@tommydudebreaux](https://github.com/tommydudebreaux)) +- Add program metadata + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.10...v1.0.11) + +## v1.0.10 - Node - Feb 27 2013 + +- [#428](https://github.com/wycats/handlebars.js/issues/428) - Fix incorrect rendering of nested programs +- Fix exception message ([@tricknotes](https://github.com/tricknotes)) +- Added negative number literal support +- Concert library to single IIFE +- Add handlebars-source gemspec ([@machty](https://github.com/machty)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.9...v1.0.10) + +## v1.0.9 - Node - Feb 15 2013 + +- Added `Handlebars.create` API in node module for sandboxed instances ([@tommydudebreaux](https://github.com/tommydudebreaux)) + +[Commits](https://github.com/wycats/handlebars.js/compare/1.0.0-rc.3...v1.0.9) + +## 1.0.0-rc3 - Browser - Feb 14 2013 + +- Prevent use of `this` or `..` in illogical place ([@leshill](https://github.com/leshill)) +- Allow AST passing for `parse`/`compile`/`precompile` ([@machty](https://github.com/machty)) +- Optimize generated output by inlining statements where possible +- Check compiler version when evaluating templates +- Package browser dist in npm package + +[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.8...1.0.0-rc.3) + +## Prior Versions + +When upgrading from the Handlebars 0.9 series, be aware that the +signature for passing custom helpers or partials to templates has +changed. + +Instead of: + +```js +template(context, helpers, partials, [data]) +``` + +Use: + +```js +template(context, {helpers: helpers, partials: partials, data: data}) +``` + +[builds-page]: http://builds.handlebarsjs.com.s3.amazonaws.com/index.html +[cdnjs]: http://cdnjs.com/libraries/handlebars.js/ +[components]: https://github.com/components/handlebars.js +[npm]: https://npmjs.org/package/handlebars diff --git a/tools/eslint/node_modules/handlebars/runtime.js b/tools/eslint/node_modules/handlebars/runtime.js new file mode 100644 index 00000000000000..306207cd2af7dc --- /dev/null +++ b/tools/eslint/node_modules/handlebars/runtime.js @@ -0,0 +1,3 @@ +// Create a simple path alias to allow browserify to resolve +// the runtime on a supported path. +module.exports = require('./dist/cjs/handlebars.runtime')['default']; diff --git a/tools/eslint/node_modules/chalk/node_modules/has-ansi/index.js b/tools/eslint/node_modules/has-ansi/index.js similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/has-ansi/index.js rename to tools/eslint/node_modules/has-ansi/index.js diff --git a/tools/eslint/node_modules/has-ansi/license b/tools/eslint/node_modules/has-ansi/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/has-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/eslint/node_modules/has-ansi/package.json b/tools/eslint/node_modules/has-ansi/package.json new file mode 100644 index 00000000000000..c5af8e34ca1520 --- /dev/null +++ b/tools/eslint/node_modules/has-ansi/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "has-ansi@^2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk" + ] + ], + "_from": "has-ansi@>=2.0.0 <3.0.0", + "_id": "has-ansi@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/has-ansi", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "has-ansi", + "raw": "has-ansi@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/chalk" + ], + "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", + "_shrinkwrap": null, + "_spec": "has-ansi@^2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/has-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "description": "Check if a string has ANSI escape codes", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", + "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0722275e1bef139fcd09137da6e5550c3cd368b9", + "homepage": "https://github.com/sindresorhus/has-ansi", + "keywords": [ + "ansi", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "find", + "has", + "match", + "pattern", + "re", + "regex", + "regexp", + "shell", + "string", + "styles", + "terminal", + "test", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "has-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-ansi.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "2.0.0" +} diff --git a/tools/eslint/node_modules/has-ansi/readme.md b/tools/eslint/node_modules/has-ansi/readme.md new file mode 100644 index 00000000000000..02bc7c2300a679 --- /dev/null +++ b/tools/eslint/node_modules/has-ansi/readme.md @@ -0,0 +1,36 @@ +# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi) + +> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save has-ansi +``` + + +## Usage + +```js +var hasAnsi = require('has-ansi'); + +hasAnsi('\u001b[4mcake\u001b[0m'); +//=> true + +hasAnsi('cake'); +//=> false +``` + + +## Related + +- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module +- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/inflight/LICENSE b/tools/eslint/node_modules/inflight/LICENSE new file mode 100644 index 00000000000000..05eeeb88c2ef4c --- /dev/null +++ b/tools/eslint/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +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/tools/eslint/node_modules/inflight/README.md b/tools/eslint/node_modules/inflight/README.md new file mode 100644 index 00000000000000..6dc8929171a8c5 --- /dev/null +++ b/tools/eslint/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/tools/eslint/node_modules/inflight/inflight.js b/tools/eslint/node_modules/inflight/inflight.js new file mode 100644 index 00000000000000..8bc96cbd3730b5 --- /dev/null +++ b/tools/eslint/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/tools/eslint/node_modules/inflight/package.json b/tools/eslint/node_modules/inflight/package.json new file mode 100644 index 00000000000000..61ab0be9b47925 --- /dev/null +++ b/tools/eslint/node_modules/inflight/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "inflight@^1.0.4", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby/node_modules/glob" + ] + ], + "_from": "inflight@>=1.0.4 <2.0.0", + "_id": "inflight@1.0.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/inflight", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + "_npmVersion": "2.1.3", + "_phantomChildren": {}, + "_requested": { + "name": "inflight", + "raw": "inflight@^1.0.4", + "rawSpec": "^1.0.4", + "scope": null, + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/glob", + "/eslint/globby/glob", + "/eslint/rimraf/glob" + ], + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_shrinkwrap": null, + "_spec": "inflight@^1.0.4", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/globby/node_modules/glob", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "description": "Add callbacks to requests in flight to avoid async duplication", + "devDependencies": { + "tap": "^0.4.10" + }, + "directories": {}, + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "inflight", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.4" +} diff --git a/tools/eslint/node_modules/inherits/LICENSE b/tools/eslint/node_modules/inherits/LICENSE new file mode 100644 index 00000000000000..052085c436514a --- /dev/null +++ b/tools/eslint/node_modules/inherits/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +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/tools/eslint/node_modules/concat-stream/node_modules/inherits/README.md b/tools/eslint/node_modules/inherits/README.md similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/inherits/README.md rename to tools/eslint/node_modules/inherits/README.md diff --git a/tools/eslint/node_modules/concat-stream/node_modules/inherits/inherits.js b/tools/eslint/node_modules/inherits/inherits.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/inherits/inherits.js rename to tools/eslint/node_modules/inherits/inherits.js diff --git a/tools/eslint/node_modules/concat-stream/node_modules/inherits/inherits_browser.js b/tools/eslint/node_modules/inherits/inherits_browser.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/inherits/inherits_browser.js rename to tools/eslint/node_modules/inherits/inherits_browser.js diff --git a/tools/eslint/node_modules/inherits/package.json b/tools/eslint/node_modules/inherits/package.json new file mode 100644 index 00000000000000..198be8ddb4aa7f --- /dev/null +++ b/tools/eslint/node_modules/inherits/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "inherits@~2.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/concat-stream" + ] + ], + "_from": "inherits@>=2.0.1 <2.1.0", + "_id": "inherits@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/inherits", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "1.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "inherits", + "raw": "inherits@~2.0.1", + "rawSpec": "~2.0.1", + "scope": null, + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/concat-stream", + "/eslint/glob", + "/eslint/globby/glob", + "/eslint/readable-stream", + "/eslint/rimraf/glob" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_shrinkwrap": null, + "_spec": "inherits@~2.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/concat-stream", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "browser", + "browserify", + "class", + "inheritance", + "inherits", + "klass", + "object-oriented", + "oop" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.1" +} diff --git a/tools/eslint/node_modules/inquirer/README.md b/tools/eslint/node_modules/inquirer/README.md index 3043568ed6327f..a5aac0ad24a6db 100644 --- a/tools/eslint/node_modules/inquirer/README.md +++ b/tools/eslint/node_modules/inquirer/README.md @@ -6,15 +6,20 @@ Inquirer.js A collection of common interactive command line user interfaces. -## Goal and philosophy +## Goal and Philosophy Inquirer Logo -We strive at providing easily embeddable and beautiful command line interface for Node.js; some hope in becoming the CLI Xanadu. +**`Inquirer.js`** strives to be an easily embeddable and beautiful command line interface for [Node.js](https://nodejs.org/) (and perhaps the "CLI [Xanadu](https://en.wikipedia.org/wiki/Xanadu_(Citizen_Kane))"). -_**Inquirer**_ should ease the process of asking end user **questions**, **parsing**, **validating** answers, managing **hierarchical prompts** and providing **error feedback**. +**`Inquirer.js`** should ease the process of +- providing *error feedback* +- *asking questions* +- *parsing* input +- *validating* answers +- managing *hierarchical prompts* -_**Inquirer**_ provide the user interface, and the inquiry session flow. If you're searching for a full blown command line program utility, then check out [Commander.js](https://github.com/visionmedia/commander.js) (inspired by). +> **Note:** **`Inquirer.js`** provides the user interface, and the inquiry session flow. If you're searching for a full blown command line program utility, then check out [Commander.js](https://github.com/visionmedia/commander.js) or [Vorpal.js](https://github.com/dthree/vorpal). ## Documentation @@ -60,16 +65,16 @@ A question object is a `hash` containing question related values: - **type**: (String) Type of the prompt. Defaults: `input` - Possible values: `input`, `confirm`, `list`, `rawlist`, `password` -- **name**: (String) The name to use when storing the answer in the anwers hash. +- **name**: (String) The name to use when storing the answer in the answers hash. - **message**: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers. - **default**: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers. -- **choices**: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers. -Array values can be simple `strings`, or `objects` containing a `name` (to display) and a `value` properties (to save in the answers hash). Values can also be [a `Separator`](#separator). +- **choices**: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers. +Array values can be simple `strings`, or `objects` containing a `name` (to display in list), a `value` (to save in the answers hash) and a `short` (to display after selection) properties. The choices array can also contain [a `Separator`](#separator). - **validate**: (Function) Receive the user input and should return `true` if the value is valid, and an error message (`String`) otherwise. If `false` is returned, a default error message is provided. - **filter**: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the _Answers_ hash. - **when**: (Function, Boolean) Receive the current user answers hash and should return `true` or `false` depending on whether or not this question should be asked. The value can also be a simple boolean. -`default`(if defined as a function), `validate`, `filter` and `when` functions can be called asynchronously using `this.async()`. You just have to pass the value you'd normally return to the callback option. +`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronously using `this.async()`. You just have to pass the value you'd normally return to the callback option. ``` javascript { @@ -114,7 +119,7 @@ choices: [ "Choice A", new inquirer.Separator(), "choice B" ] Make a reservation -------- Ask opening hours - Talk to the receptionnist + Talk to the receptionist ``` The constructor takes a facultative `String` value that'll be use as the separator. If omitted, the separator will be `--------`. @@ -164,7 +169,7 @@ Take `type`, `name`, `message`, `choices`[, `filter`, `validate`, `default`] pro Choices marked as `{ checked: true }` will be checked by default. -Choices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputed next to the disabled choice, otherwise it'll default to `"Disabled"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string. +Choices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to `"Disabled"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string. ![Checkbox prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/checkbox-prompt.png) @@ -260,8 +265,9 @@ look at issues found on other command line - feel free to report any! - cmd.exe - Powershell - Cygwin -- **Ubuntu**: - - Terminal +- **Linux (Ubuntu, openSUSE, Arch Linux, etc)**: + - gnome-terminal (Terminal GNOME) + - konsole ## News on the march (Release notes) @@ -271,17 +277,17 @@ Please refer to the [Github releases section for the changelog](https://github.c ## Contributing -**Style Guide** -Please brief yourself on [Idiomatic.js](https://github.com/rwldrn/idiomatic.js) style guide with two space indent +**Style Guide** +Please brief yourself on [Idiomatic.js](https://github.com/rwldrn/idiomatic.js) style guide with two space indent -**Unit test** -Unit test are written in [Mocha](http://visionmedia.github.io/mocha/). Please add a unit test for every new feature or bug fix. `npm test` to run the test suite. +**Unit test** +Unit test are written in [Mocha](https://mochajs.org/). Please add a unit test for every new feature or bug fix. `npm test` to run the test suite. -**Documentation** +**Documentation** Add documentation for every API change. Feel free to send corrections -or better docs! +or better docs! -**Pull Requests** +**Pull Requests** Send _fixes_ PR on the `master` branch. Any new features should be send on the `wip`branch. We're looking to offer good support for multiple prompts and environments. If you want to @@ -291,5 +297,5 @@ to @vaxilart) or just add your name to [the wiki](https://github.com/SBoudrias/I ## License -Copyright (c) 2012 Simon Boudrias (twitter: @vaxilart) -Licensed under the MIT license. \ No newline at end of file +Copyright (c) 2015 Simon Boudrias (twitter: @vaxilart) +Licensed under the MIT license. diff --git a/tools/eslint/node_modules/inquirer/lib/inquirer.js b/tools/eslint/node_modules/inquirer/lib/inquirer.js index 41e24561365252..1b14c1da2bf81e 100644 --- a/tools/eslint/node_modules/inquirer/lib/inquirer.js +++ b/tools/eslint/node_modules/inquirer/lib/inquirer.js @@ -12,20 +12,20 @@ var inquirer = module.exports; inquirer.prompts = {}; -inquirer.Separator = require("./objects/separator"); +inquirer.Separator = require('./objects/separator'); inquirer.ui = { - BottomBar: require("./ui/bottom-bar"), - Prompt: require("./ui/prompt") + BottomBar: require('./ui/bottom-bar'), + Prompt: require('./ui/prompt') }; /** * Create a new self-contained prompt module. */ -inquirer.createPromptModule = function () { - var promptModule = function( questions, allDone ) { - var ui = new inquirer.ui.Prompt( promptModule.prompts ); - ui.run( questions, allDone ); +inquirer.createPromptModule = function (opt) { + var promptModule = function (questions, allDone) { + var ui = new inquirer.ui.Prompt(promptModule.prompts, opt); + ui.run(questions, allDone); return ui; }; promptModule.prompts = {}; @@ -37,8 +37,8 @@ inquirer.createPromptModule = function () { * @return {inquirer} */ - promptModule.registerPrompt = function( name, prompt ) { - promptModule.prompts[ name ] = prompt; + promptModule.registerPrompt = function (name, prompt) { + promptModule.prompts[name] = prompt; return this; }; @@ -47,13 +47,13 @@ inquirer.createPromptModule = function () { */ promptModule.restoreDefaultPrompts = function () { - this.registerPrompt( "list", require("./prompts/list")); - this.registerPrompt( "input", require("./prompts/input")); - this.registerPrompt( "confirm", require("./prompts/confirm")); - this.registerPrompt( "rawlist", require("./prompts/rawlist")); - this.registerPrompt( "expand", require("./prompts/expand")); - this.registerPrompt( "checkbox", require("./prompts/checkbox")); - this.registerPrompt( "password", require("./prompts/password")); + this.registerPrompt('list', require('./prompts/list')); + this.registerPrompt('input', require('./prompts/input')); + this.registerPrompt('confirm', require('./prompts/confirm')); + this.registerPrompt('rawlist', require('./prompts/rawlist')); + this.registerPrompt('expand', require('./prompts/expand')); + this.registerPrompt('checkbox', require('./prompts/checkbox')); + this.registerPrompt('password', require('./prompts/password')); }; promptModule.restoreDefaultPrompts(); @@ -71,9 +71,9 @@ inquirer.createPromptModule = function () { inquirer.prompt = inquirer.createPromptModule(); // Expose helper functions on the top level for easiest usage by common users -inquirer.registerPrompt = function( name, prompt ) { - inquirer.prompt.registerPrompt( name, prompt ); +inquirer.registerPrompt = function (name, prompt) { + inquirer.prompt.registerPrompt(name, prompt); }; -inquirer.restoreDefaultPrompts = function() { +inquirer.restoreDefaultPrompts = function () { inquirer.prompt.restoreDefaultPrompts(); }; diff --git a/tools/eslint/node_modules/inquirer/lib/objects/choice.js b/tools/eslint/node_modules/inquirer/lib/objects/choice.js index 8461151f8754bb..b0b8889642cbe7 100644 --- a/tools/eslint/node_modules/inquirer/lib/objects/choice.js +++ b/tools/eslint/node_modules/inquirer/lib/objects/choice.js @@ -1,44 +1,36 @@ -/** - * Choice object - * Normalize input as choice object - */ - -var _ = require("lodash"); - -/** - * Module exports - */ - -module.exports = Choice; +'use strict'; +var _ = require('lodash'); /** * Choice object + * Normalize input as choice object * @constructor * @param {String|Object} val Choice value. If an object is passed, it should contains * at least one of `value` or `name` property */ -function Choice( val, answers ) { - +var Choice = module.exports = function (val, answers) { // Don't process Choice and Separator object - if ( val instanceof Choice || val.type === "separator" ) { + if (val instanceof Choice || val.type === 'separator') { return val; } - if ( _.isString(val) ) { + if (_.isString(val)) { this.name = val; this.value = val; + this.short = val; } else { - _.extend( this, val, { + _.extend(this, val, { name: val.name || val.value, - value: val.hasOwnProperty("value") ? val.value : val.name + value: val.hasOwnProperty('value') ? val.value : val.name, + short: val.short || val.name || val.value }); } - if ( _.isFunction(val.disabled) ) { - this.disabled = val.disabled( answers ); + if (_.isFunction(val.disabled)) { + this.disabled = val.disabled(answers); } else { this.disabled = val.disabled; } -} +}; diff --git a/tools/eslint/node_modules/inquirer/lib/objects/choices.js b/tools/eslint/node_modules/inquirer/lib/objects/choices.js index 20c651ab2a772b..cdf3490f70eb27 100644 --- a/tools/eslint/node_modules/inquirer/lib/objects/choices.js +++ b/tools/eslint/node_modules/inquirer/lib/objects/choices.js @@ -1,66 +1,52 @@ -/** - * Choices object - * Collection of multiple `choice` object - */ - -var _ = require("lodash"); -var chalk = require("chalk"); -var Separator = require("./separator"); -var Choice = require("./choice"); - - -/** - * Module exports - */ - -module.exports = Choices; +'use strict'; +var assert = require('assert'); +var _ = require('lodash'); +var Separator = require('./separator'); +var Choice = require('./choice'); /** * Choices collection + * Collection of multiple `choice` object * @constructor * @param {Array} choices All `choice` to keep in the collection */ -function Choices( choices, answers ) { - this.choices = _.map( choices, function( val ) { - if ( val.type === "separator" ) { - if(!(val instanceof Separator)){ +var Choices = module.exports = function (choices, answers) { + this.choices = choices.map(function (val) { + if (val.type === 'separator') { + if (!(val instanceof Separator)) { val = new Separator(val.line); } return val; } - return new Choice( val, answers ); + return new Choice(val, answers); }); this.realChoices = this.choices .filter(Separator.exclude) - .filter(function( item ) { + .filter(function (item) { return !item.disabled; }); - Object.defineProperty( this, "length", { - get: function() { + Object.defineProperty(this, 'length', { + get: function () { return this.choices.length; }, - set: function( val ) { + set: function (val) { this.choices.length = val; } }); - Object.defineProperty( this, "realLength", { - get: function() { + Object.defineProperty(this, 'realLength', { + get: function () { return this.realChoices.length; }, - set: function() { - throw new Error("Cannot set `realLength` of a Choices collection"); + set: function () { + throw new Error('Cannot set `realLength` of a Choices collection'); } }); - - // Set pagination state - this.pointer = 0; - this.lastIndex = 0; -} +}; /** @@ -69,11 +55,9 @@ function Choices( choices, answers ) { * @return {Choice|Undefined} Return the matched choice or undefined */ -Choices.prototype.getChoice = function( selector ) { - if ( _.isNumber(selector) ) { - return this.realChoices[ selector ]; - } - return undefined; +Choices.prototype.getChoice = function (selector) { + assert(_.isNumber(selector)); + return this.realChoices[selector]; }; @@ -83,11 +67,9 @@ Choices.prototype.getChoice = function( selector ) { * @return {Choice|Undefined} Return the matched choice or undefined */ -Choices.prototype.get = function( selector ) { - if ( _.isNumber(selector) ) { - return this.choices[ selector ]; - } - return undefined; +Choices.prototype.get = function (selector) { + assert(_.isNumber(selector)); + return this.choices[selector]; }; @@ -97,8 +79,8 @@ Choices.prototype.get = function( selector ) { * @return {Array} Matching choices or empty array */ -Choices.prototype.where = function( whereClause ) { - return _.where( this.realChoices, whereClause ); +Choices.prototype.where = function (whereClause) { + return _.where(this.realChoices, whereClause); }; @@ -108,73 +90,24 @@ Choices.prototype.where = function( whereClause ) { * @return {Array} Selected properties */ -Choices.prototype.pluck = function( propertyName ) { - return _.pluck( this.realChoices, propertyName ); +Choices.prototype.pluck = function (propertyName) { + return _.pluck(this.realChoices, propertyName); }; -// Propagate usual Array methods -Choices.prototype.forEach = function() { - return this.choices.forEach.apply( this.choices, arguments ); +// Expose usual Array methods +Choices.prototype.indexOf = function () { + return this.choices.indexOf.apply(this.choices, arguments); +}; +Choices.prototype.forEach = function () { + return this.choices.forEach.apply(this.choices, arguments); }; -Choices.prototype.filter = function() { - return this.choices.filter.apply( this.choices, arguments ); +Choices.prototype.filter = function () { + return this.choices.filter.apply(this.choices, arguments); }; -Choices.prototype.push = function() { - var objs = _.map( arguments, function( val ) { return new Choice( val ); }); - this.choices.push.apply( this.choices, objs ); +Choices.prototype.push = function () { + var objs = _.map(arguments, function (val) { return new Choice(val); }); + this.choices.push.apply(this.choices, objs); this.realChoices = this.choices.filter(Separator.exclude); return this.choices; }; - - -/** - * Render the choices as formatted string - * @return {String} formatted content - */ - -Choices.prototype.render = function() { - return this.renderingMethod.apply( this, arguments ); -}; - - -/** - * Set the rendering method - * @param {Function} render Function to be use when rendering - */ - -Choices.prototype.setRender = function( render ) { - this.renderingMethod = (this.choices.length > 9) ? this.paginateOutput(render) : render; -}; - - -/** - * Paginate the output of a render function - * @param {Function} render Render function whose content must be paginated - * @return {Function} Wrapped render function - */ - -Choices.prototype.paginateOutput = function( render ) { - var pageSize = 7; - - return function( active ) { - var output = render.apply( this, arguments ); - var lines = output.split("\n"); - - // Make sure there's enough line to paginate - if ( lines.length <= pageSize ) return output; - - // Move the pointer only when the user go down and limit it to 3 - if ( this.pointer < 3 && this.lastIndex < active && active - this.lastIndex < 9 ) { - this.pointer = Math.min( 3, this.pointer + active - this.lastIndex); - } - this.lastIndex = active; - - // Duplicate the lines so it give an infinite list look - var infinite = _.flatten([ lines, lines, lines ]); - var topIndex = Math.max( 0, active + lines.length - this.pointer ); - - var section = infinite.splice( topIndex, pageSize ).join("\n"); - return section + "\n" + chalk.dim("(Move up and down to reveal more choices)"); - }.bind(this); -}; diff --git a/tools/eslint/node_modules/inquirer/lib/objects/separator.js b/tools/eslint/node_modules/inquirer/lib/objects/separator.js index eb4009bf05bbb7..44c44a283b865f 100644 --- a/tools/eslint/node_modules/inquirer/lib/objects/separator.js +++ b/tools/eslint/node_modules/inquirer/lib/objects/separator.js @@ -1,30 +1,19 @@ -/** - * Separator object - * Used to space/separate choices group - */ - -var chalk = require("chalk"); -var figures = require("figures"); - - -/** - * Module exports - */ - -module.exports = Separator; +'use strict'; +var chalk = require('chalk'); +var figures = require('figures'); /** * Separator object + * Used to space/separate choices group * @constructor * @param {String} line Separation line content (facultative) */ -function Separator( line ) { - this.type = "separator"; +var Separator = module.exports = function (line) { + this.type = 'separator'; this.line = chalk.dim(line || new Array(15).join(figures.line)); -} - +}; /** * Helper function returning false if object is a separator @@ -32,16 +21,15 @@ function Separator( line ) { * @return {Boolean} `false` if object is a separator */ -Separator.exclude = function( obj ) { - return obj.type !== "separator"; +Separator.exclude = function (obj) { + return obj.type !== 'separator'; }; - /** * Stringify separator * @return {String} the separator display string */ -Separator.prototype.toString = function() { +Separator.prototype.toString = function () { return this.line; }; diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/base.js b/tools/eslint/node_modules/inquirer/lib/prompts/base.js index 34ffed83082a2a..60afeb54c8bd59 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/base.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/base.js @@ -3,61 +3,46 @@ * Should be extended by prompt types. */ -var rx = require("rx"); -var _ = require("lodash"); -var chalk = require("chalk"); -var ansiRegex = require("ansi-regex"); -var readline = require("readline"); -var cliWidth = require("cli-width"); -var utils = require("../utils/utils"); -var Choices = require("../objects/choices"); -var tty = require("../utils/tty"); +var rx = require('rx-lite'); +var _ = require('lodash'); +var chalk = require('chalk'); +var ansiRegex = require('ansi-regex'); +var runAsync = require('run-async'); +var Choices = require('../objects/choices'); +var ScreenManager = require('../utils/screen-manager'); -/** - * Module exports - */ - -module.exports = Prompt; - - -/** - * Prompt constructor - */ -function Prompt( question, rl, answers ) { +var Prompt = module.exports = function (question, rl, answers) { // Setup instance defaults property - _.assign( this, { - height : 0, - status : "pending" + _.assign(this, { + answers: answers, + status : 'pending' }); // Set defaults prompt options - this.opt = _.defaults( _.clone(question), { - validate: function() { return true; }, - filter: function( val ) { return val; }, - when: function() { return true; } + this.opt = _.defaults(_.clone(question), { + validate: function () { return true; }, + filter: function (val) { return val; }, + when: function () { return true; } }); // Check to make sure prompt requirements are there if (!this.opt.message) { - this.throwParamError("message"); + this.throwParamError('message'); } if (!this.opt.name) { - this.throwParamError("name"); + this.throwParamError('name'); } // Normalize choices - if ( _.isArray(this.opt.choices) ) { - this.opt.choices = new Choices( this.opt.choices, answers ); + if (Array.isArray(this.opt.choices)) { + this.opt.choices = new Choices(this.opt.choices, answers); } this.rl = rl; - - return this; -} - -_.extend( Prompt.prototype, tty ); + this.screen = new ScreenManager(this.rl); +}; /** @@ -67,15 +52,13 @@ _.extend( Prompt.prototype, tty ); */ Prompt.prototype.run = function( cb ) { - var self = this; - this._run(function( value ) { - self.filter( value, cb ); - }); - return this; + this._run(function (value) { + this.filter(value, cb); + }.bind(this)); }; // default noop (this one should be overwritten in prompts) -Prompt.prototype._run = function( cb ) { cb(); }; +Prompt.prototype._run = function (cb) { cb(); }; /** @@ -84,48 +67,10 @@ Prompt.prototype._run = function( cb ) { cb(); }; * @return {Throw Error} */ -Prompt.prototype.throwParamError = function( name ) { - throw new Error("You must provide a `" + name + "` parameter"); +Prompt.prototype.throwParamError = function (name) { + throw new Error('You must provide a `' + name + '` parameter'); }; - -/** - * Write error message - * @param {String} Error Error message - * @return {Prompt} Self - */ - -Prompt.prototype.error = function( error ) { - readline.moveCursor( this.rl.output, -cliWidth(), 0 ); - readline.clearLine( this.rl.output, 0 ); - - var errMsg = chalk.red(">> ") + - (error || "Please enter a valid value"); - this.write( errMsg ); - - return this.up(); -}; - - -/** - * Write hint message - * @param {String} Hint Hint message - * @return {Prompt} Self - */ - -Prompt.prototype.hint = function( hint ) { - readline.moveCursor( this.rl.output, -cliWidth(), 0 ); - readline.clearLine( this.rl.output, 0 ); - - if ( hint.length ) { - var hintMsg = chalk.cyan(">> ") + hint; - this.write( hintMsg ); - } - - return this.up(); -}; - - /** * Validate a given input * @param {String} value Input string @@ -134,8 +79,8 @@ Prompt.prototype.hint = function( hint ) { * @return {null} */ -Prompt.prototype.validate = function( input, cb ) { - utils.runAsync( this.opt.validate, cb, input ); +Prompt.prototype.validate = function (input, cb) { + runAsync(this.opt.validate, cb, input); }; /** @@ -143,24 +88,23 @@ Prompt.prototype.validate = function( input, cb ) { * @param {Rx.Observable} submit - submit event flow * @return {Object} Object containing two observables: `success` and `error` */ -Prompt.prototype.handleSubmitEvents = function( submit ) { +Prompt.prototype.handleSubmitEvents = function (submit) { var self = this; - var opt = this.opt; - var validation = submit.flatMap(function( value ) { - return rx.Observable.create(function( observer ) { - utils.runAsync( opt.validate, function( isValid ) { + var validation = submit.flatMap(function (value) { + return rx.Observable.create(function (observer) { + runAsync(self.opt.validate, function (isValid) { observer.onNext({ isValid: isValid, value: self.getCurrentValue(value) }); observer.onCompleted(); - }, self.getCurrentValue(value) ); + }, self.getCurrentValue(value), self.answers); }); }).share(); var success = validation - .filter(function( state ) { return state.isValid === true; }) + .filter(function (state) { return state.isValid === true; }) .take(1); var error = validation - .filter(function( state ) { return state.isValid !== true; }) + .filter(function (state) { return state.isValid !== true; }) .takeUntil(success); return { @@ -180,51 +124,51 @@ Prompt.prototype.getCurrentValue = function (value) { * @return {null} */ -Prompt.prototype.filter = function( input, cb ) { - utils.runAsync( this.opt.filter, cb, input ); +Prompt.prototype.filter = function (input, cb) { + runAsync(this.opt.filter, cb, input); }; - /** * Return the prompt line prefix * @param {String} [optionnal] String to concatenate to the prefix * @return {String} prompt prefix */ -Prompt.prototype.prefix = function( str ) { - str || (str = ""); - return chalk.green("?") + " " + str; +Prompt.prototype.prefix = function (str) { + str || (str = ''); + return chalk.green('?') + ' ' + str; }; - /** * Return the prompt line suffix * @param {String} [optionnal] String to concatenate to the suffix * @return {String} prompt suffix */ -var reStrEnd = new RegExp("(?:" + ansiRegex().source + ")$|$"); +var reStrEnd = new RegExp('(?:' + ansiRegex().source + ')$|$'); -Prompt.prototype.suffix = function( str ) { - str || (str = ""); - return (str.length < 1 || /[a-z1-9]$/i.test(chalk.stripColor(str)) ? - // make sure we get the `:` inside the styles - str.replace(reStrEnd, ":$&") : str).trim() + " "; -}; +Prompt.prototype.suffix = function (str) { + str || (str = ''); + // make sure we get the `:` inside the styles + if (str.length < 1 || /[a-z1-9]$/i.test(chalk.stripColor(str))) { + str = str.replace(reStrEnd, ':$&'); + } + + return str.trim() + ' '; +}; /** * Generate the prompt question string * @return {String} prompt question string */ -Prompt.prototype.getQuestion = function() { - - var message = _.compose(this.prefix, this.suffix)(chalk.bold(this.opt.message)); +Prompt.prototype.getQuestion = function () { + var message = chalk.green('?') + ' ' + chalk.bold(this.opt.message) + ' '; // Append the default if available, and if question isn't answered - if ( this.opt.default != null && this.status !== "answered" ) { - message += chalk.dim("("+ this.opt.default + ") "); + if ( this.opt.default != null && this.status !== 'answered' ) { + message += chalk.dim('('+ this.opt.default + ') '); } return message; diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/checkbox.js b/tools/eslint/node_modules/inquirer/lib/prompts/checkbox.js index e2737ab6f025ee..eb6bbdf5ba80dd 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/checkbox.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/checkbox.js @@ -5,9 +5,11 @@ var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); +var cliCursor = require("cli-cursor"); +var figures = require("figures"); var Base = require("./base"); -var utils = require("../utils/utils"); var observe = require("../utils/events"); +var Paginator = require("../utils/paginator"); /** @@ -39,12 +41,10 @@ function Prompt() { this.firstRender = true; this.pointer = 0; - this.opt.choices.setRender( renderChoices ); - // Make sure no default is set (so it won't be printed) this.opt.default = null; - return this; + this.paginator = new Paginator(); } util.inherits( Prompt, Base ); @@ -70,11 +70,8 @@ Prompt.prototype._run = function( cb ) { events.spaceKey.takeUntil( validation.success ).forEach( this.onSpaceKey.bind(this) ); // Init the prompt + cliCursor.hide(); this.render(); - this.hideCursor(); - - // Prevent user from writing - this.rl.output.mute(); return this; }; @@ -85,10 +82,10 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { +Prompt.prototype.render = function (error) { // Render question - var message = this.getQuestion(); - var choicesStr = "\n" + this.opt.choices.render( this.pointer ); + var message = this.getQuestion(); + var bottomContent = ''; if ( this.firstRender ) { message += "(Press to select)"; @@ -96,16 +93,20 @@ Prompt.prototype.render = function() { // Render choices or answer depending on the state if ( this.status === "answered" ) { - message += chalk.cyan( this.selection.join(", ") ) + "\n"; + message += chalk.cyan( this.selection.join(", ") ); } else { - message += choicesStr; + var choicesStr = renderChoices(this.opt.choices, this.pointer); + var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.pointer)); + message += "\n" + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize); } - this.firstRender = false; + if (error) { + bottomContent = chalk.red('>> ') + error; + } - utils.writeMessage( this, message ); + this.firstRender = false; - return this; + this.screen.render(message, bottomContent); }; @@ -114,24 +115,19 @@ Prompt.prototype.render = function() { */ Prompt.prototype.onEnd = function( state ) { - this.rl.output.unmute(); - this.showCursor(); this.status = "answered"; // Rerender prompt (and clean subline error) - this.down().clean(1).render(); + this.render(); + this.screen.done(); + cliCursor.show(); this.done( state.value ); }; Prompt.prototype.onError = function ( state ) { - this.rl.output.unmute(); - this.showCursor(); - - this.down().error( state.isValid ).clean().render(); - this.hideCursor(); - this.rl.output.mute(); + this.render(state.isValid); }; Prompt.prototype.getCurrentValue = function () { @@ -139,83 +135,33 @@ Prompt.prototype.getCurrentValue = function () { return !!choice.checked && !choice.disabled; }); - this.selection = _.pluck(choices, "name"); + this.selection = _.pluck(choices, "short"); return _.pluck(choices, "value"); }; -/** - * When user press a key - */ - -Prompt.prototype.onKeypress = function( s, key ) { - // Only process up, down, space, j, k and 1-9 keys - var keyWhitelist = [ "up", "down", "space", "j", "k" ]; - if ( key && !_.contains(keyWhitelist, key.name) ) return; - if ( key && (key.name === "space" || key.name === "j" || key.name === "k") ) s = undefined; - if ( s && "123456789".indexOf(s) < 0 ) return; - - var len = this.opt.choices.realLength; - this.rl.output.unmute(); - - var shortcut = Number(s); - if ( shortcut <= len && shortcut > 0 ) { - this.pointer = shortcut - 1; - key = { name: "space" }; - } - - if ( key && key.name === "space" ) { - var checked = this.opt.choices.getChoice(this.pointer).checked; - this.opt.choices.getChoice(this.pointer).checked = !checked; - } else if ( key && (key.name === "up" || key.name === "k") ) { - (this.pointer > 0) ? this.pointer-- : (this.pointer = len - 1); - } else if ( key && (key.name === "down" || key.name === "j") ) { - (this.pointer < len - 1) ? this.pointer++ : (this.pointer = 0); - } - - // Rerender - this.clean().render(); - - this.rl.output.mute(); -}; - -Prompt.prototype.handleKeypress = function(action) { - this.rl.output.unmute(); - - action(); - - // Rerender - this.clean().render(); - - this.rl.output.mute(); -}; - Prompt.prototype.onUpKey = function() { - this.handleKeypress(function() { - var len = this.opt.choices.realLength; - this.pointer = (this.pointer > 0) ? this.pointer - 1 : len - 1; - }.bind(this)); + var len = this.opt.choices.realLength; + this.pointer = (this.pointer > 0) ? this.pointer - 1 : len - 1; + this.render(); }; Prompt.prototype.onDownKey = function() { - this.handleKeypress(function() { - var len = this.opt.choices.realLength; - this.pointer = (this.pointer < len - 1) ? this.pointer + 1 : 0; - }.bind(this)); + var len = this.opt.choices.realLength; + this.pointer = (this.pointer < len - 1) ? this.pointer + 1 : 0; + this.render(); }; Prompt.prototype.onNumberKey = function( input ) { - this.handleKeypress(function() { - if ( input <= this.opt.choices.realLength ) { - this.pointer = input - 1; - this.toggleChoice( this.pointer ); - } - }.bind(this)); + if ( input <= this.opt.choices.realLength ) { + this.pointer = input - 1; + this.toggleChoice( this.pointer ); + } + this.render(); }; Prompt.prototype.onSpaceKey = function( input ) { - this.handleKeypress(function() { - this.toggleChoice(this.pointer); - }.bind(this)); + this.toggleChoice(this.pointer); + this.render(); }; Prompt.prototype.toggleChoice = function( index ) { @@ -223,36 +169,45 @@ Prompt.prototype.toggleChoice = function( index ) { this.opt.choices.getChoice(index).checked = !checked; }; - /** * Function for rendering checkbox choices * @param {Number} pointer Position of the pointer * @return {String} Rendered content */ -function renderChoices( pointer ) { - var output = ""; +function renderChoices(choices, pointer) { + var output = ''; var separatorOffset = 0; - this.choices.forEach(function( choice, i ) { - if ( choice.type === "separator" ) { + choices.forEach(function (choice, i) { + if (choice.type === 'separator') { separatorOffset++; - output += " " + choice + "\n"; + output += ' ' + choice + '\n'; return; } - if ( choice.disabled ) { + if (choice.disabled) { separatorOffset++; - output += " - " + choice.name; - output += " (" + (_.isString(choice.disabled) ? choice.disabled : "Disabled") + ")"; + output += ' - ' + choice.name; + output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')'; } else { var isSelected = (i - separatorOffset === pointer); - output += isSelected ? chalk.cyan(utils.getPointer()) : " "; - output += utils.getCheckbox( choice.checked, choice.name ); + output += isSelected ? chalk.cyan(figures.pointer) : ' '; + output += getCheckbox(choice.checked) + ' ' + choice.name; } - output += "\n"; - }.bind(this)); + output += '\n'; + }); + + return output.replace(/\n$/, ''); +} + +/** + * Get the checkbox + * @param {Boolean} checked - add a X or not to the checkbox + * @return {String} Composited checkbox string + */ - return output.replace(/\n$/, ""); +function getCheckbox(checked) { + return checked ? chalk.green(figures.radioOn) : figures.radioOff; } diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/confirm.js b/tools/eslint/node_modules/inquirer/lib/prompts/confirm.js index 65a6dbd8667a37..ca2d9e1b329e47 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/confirm.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/confirm.js @@ -6,7 +6,6 @@ var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); var Base = require("./base"); -var utils = require("../utils/utils"); var observe = require("../utils/events"); @@ -74,9 +73,16 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { +Prompt.prototype.render = function (answer) { var message = this.getQuestion(); - utils.writeMessage( this, message ); + + if (typeof answer === "boolean") { + message += chalk.cyan(answer ? "Yes" : "No"); + } else { + message += this.rl.line; + } + + this.screen.render(message); return this; }; @@ -89,10 +95,9 @@ Prompt.prototype.onEnd = function( input ) { this.status = "answered"; var output = this.opt.filter( input ); + this.render( output ); - this.clean(1).render(); - this.write( chalk.cyan(output ? "Yes" : "No") + "\n" ); - + this.screen.done(); this.done( input ); // send "input" because the master class will refilter }; @@ -101,5 +106,5 @@ Prompt.prototype.onEnd = function( input ) { */ Prompt.prototype.onKeypress = function() { - this.clean().render().write( this.rl.line ); + this.render(); }; diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/expand.js b/tools/eslint/node_modules/inquirer/lib/prompts/expand.js index 6f969154ff4863..a95bd7f328eace 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/expand.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/expand.js @@ -6,9 +6,9 @@ var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); var Base = require("./base"); -var utils = require("../utils/utils"); var Separator = require("../objects/separator"); var observe = require("../utils/events"); +var Paginator = require("../utils/paginator"); /** @@ -38,12 +38,10 @@ function Prompt() { value : "help" }); - this.opt.choices.setRender( renderChoice ); - // Setup the default string (capitalize the default key) this.opt.default = this.generateChoicesString( this.opt.choices, this.opt.default ); - return this; + this.paginator = new Paginator(); } util.inherits( Prompt, Base ); @@ -74,21 +72,29 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { - - // Render question +Prompt.prototype.render = function (error, hint) { var message = this.getQuestion(); + var bottomContent = ''; if ( this.status === "answered" ) { - message += chalk.cyan( this.selected.name ) + "\n"; + message += chalk.cyan( this.selected.name ); } else if ( this.status === "expanded" ) { - message += this.opt.choices.render( this.selectedKey ); + var choicesStr = renderChoices(this.opt.choices, this.selectedKey); + message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize); message += "\n Answer: "; } - utils.writeMessage( this, message ); + message += this.rl.line; - return this; + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + if (hint) { + bottomContent = chalk.cyan('>> ') + hint; + } + + this.screen.render(message, bottomContent); }; @@ -133,7 +139,7 @@ Prompt.prototype.onSubmit = function( input ) { if ( selected != null && selected.key === "h" ) { this.selectedKey = ""; this.status = "expanded"; - this.down().clean(2).render(); + this.render(); return; } @@ -142,19 +148,17 @@ Prompt.prototype.onSubmit = function( input ) { this.selected = selected; // Re-render prompt - this.down().clean(2).render(); + this.render(); this.lineObs.dispose(); this.keypressObs.dispose(); + this.screen.done(); this.done( this.selected.value ); return; } // Input is invalid - this - .error("Please enter a valid command") - .clean() - .render(); + this.render("Please enter a valid command"); }; @@ -165,18 +169,11 @@ Prompt.prototype.onSubmit = function( input ) { Prompt.prototype.onKeypress = function( s, key ) { this.selectedKey = this.rl.line.toLowerCase(); var selected = this.opt.choices.where({ key : this.selectedKey })[0]; - this.cacheCursorPos(); if ( this.status === "expanded" ) { - this.clean().render(); + this.render(); } else { - this - .down() - .hint( selected ? selected.name : "" ) - .clean() - .render(); + this.render(null, selected ? selected.name : null); } - - this.write( this.rl.line ).restoreCursorPos(); }; @@ -236,23 +233,23 @@ Prompt.prototype.generateChoicesString = function( choices, defaultIndex ) { * @return {String} Rendered content */ -function renderChoice( pointer ) { - var output = ""; +function renderChoices (choices, pointer) { + var output = ''; - this.choices.forEach(function( choice, i ) { - output += "\n "; + choices.forEach(function (choice, i) { + output += '\n '; - if ( choice.type === "separator" ) { - output += " " + choice; + if (choice.type === 'separator') { + output += ' ' + choice; return; } - var choiceStr = choice.key + ") " + choice.name; - if ( pointer === choice.key ) { - choiceStr = chalk.cyan( choiceStr ); + var choiceStr = choice.key + ') ' + choice.name; + if (pointer === choice.key) { + choiceStr = chalk.cyan(choiceStr); } output += choiceStr; - }.bind(this)); + }); return output; } diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/input.js b/tools/eslint/node_modules/inquirer/lib/prompts/input.js index 78e04ab60bc17e..4b3e21c35243f0 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/input.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/input.js @@ -2,11 +2,9 @@ * `input` type prompt */ -var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); var Base = require("./base"); -var utils = require("../utils/utils"); var observe = require("../utils/events"); @@ -58,11 +56,21 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { +Prompt.prototype.render = function (error) { + var bottomContent = ''; var message = this.getQuestion(); - utils.writeMessage( this, message ); - return this; + if (this.status === 'answered') { + message += chalk.cyan(this.answer); + } else { + message += this.rl.line; + } + + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); }; @@ -79,20 +87,19 @@ Prompt.prototype.filterInput = function( input ) { Prompt.prototype.onEnd = function( state ) { this.filter( state.value, function( filteredValue ) { + this.answer = filteredValue; this.status = "answered"; // Re-render prompt - this.clean(1).render(); - - // Render answer - this.write( chalk.cyan(filteredValue) + "\n" ); + this.render(); + this.screen.done(); this.done( state.value ); }.bind(this)); }; Prompt.prototype.onError = function( state ) { - this.error( state.isValid ).clean().render(); + this.render(state.isValid); }; /** @@ -100,7 +107,5 @@ Prompt.prototype.onError = function( state ) { */ Prompt.prototype.onKeypress = function() { - this.cacheCursorPos(); - this.clean().render().write( this.rl.line ); - this.restoreCursorPos(); + this.render(); }; diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/list.js b/tools/eslint/node_modules/inquirer/lib/prompts/list.js index e5e7c177e47084..1b13d86b3739d9 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/list.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/list.js @@ -5,9 +5,11 @@ var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); +var figures = require("figures"); +var cliCursor = require("cli-cursor"); var Base = require("./base"); -var utils = require("../utils/utils"); var observe = require("../utils/events"); +var Paginator = require("../utils/paginator"); /** @@ -43,12 +45,10 @@ function Prompt() { this.selected = this.opt.choices.pluck("value").indexOf( def ); } - this.opt.choices.setRender( listRender ); - // Make sure no default is set (so it won't be printed) this.opt.default = null; - return this; + this.paginator = new Paginator(); } util.inherits( Prompt, Base ); @@ -69,11 +69,8 @@ Prompt.prototype._run = function( cb ) { events.line.take(1).forEach( this.onSubmit.bind(this) ); // Init the prompt + cliCursor.hide(); this.render(); - this.hideCursor(); - - // Prevent user from writing - this.rl.output.mute(); return this; }; @@ -85,10 +82,8 @@ Prompt.prototype._run = function( cb ) { */ Prompt.prototype.render = function() { - // Render question - var message = this.getQuestion(); - var choicesStr = "\n" + this.opt.choices.render( this.selected ); + var message = this.getQuestion(); if ( this.firstRender ) { message += chalk.dim( "(Use arrow keys)" ); @@ -96,16 +91,16 @@ Prompt.prototype.render = function() { // Render choices or answer depending on the state if ( this.status === "answered" ) { - message += chalk.cyan( this.opt.choices.getChoice(this.selected).name ) + "\n"; + message += chalk.cyan( this.opt.choices.getChoice(this.selected).short ); } else { - message += choicesStr; + var choicesStr = listRender(this.opt.choices, this.selected ); + var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.selected)); + message += "\n" + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize); } this.firstRender = false; - utils.writeMessage( this, message ); - - return this; + this.screen.render(message); }; @@ -118,11 +113,10 @@ Prompt.prototype.onSubmit = function() { this.status = "answered"; // Rerender prompt - this.rl.output.unmute(); - this.clean().render(); - - this.showCursor(); + this.render(); + this.screen.done(); + cliCursor.show(); this.done( choice.value ); }; @@ -130,38 +124,23 @@ Prompt.prototype.onSubmit = function() { /** * When user press a key */ - -Prompt.prototype.handleKeypress = function(action) { - this.rl.output.unmute(); - - action(); - - // Rerender - this.clean().render(); - - this.rl.output.mute(); -}; - Prompt.prototype.onUpKey = function() { - this.handleKeypress(function() { - var len = this.opt.choices.realLength; - this.selected = (this.selected > 0) ? this.selected - 1 : len - 1; - }.bind(this)); + var len = this.opt.choices.realLength; + this.selected = (this.selected > 0) ? this.selected - 1 : len - 1; + this.render(); }; Prompt.prototype.onDownKey = function() { - this.handleKeypress(function() { - var len = this.opt.choices.realLength; - this.selected = (this.selected < len - 1) ? this.selected + 1 : 0; - }.bind(this)); + var len = this.opt.choices.realLength; + this.selected = (this.selected < len - 1) ? this.selected + 1 : 0; + this.render(); }; Prompt.prototype.onNumberKey = function( input ) { - this.handleKeypress(function() { - if ( input <= this.opt.choices.realLength ) { - this.selected = input - 1; - } - }.bind(this)); + if ( input <= this.opt.choices.realLength ) { + this.selected = input - 1; + } + this.render(); }; @@ -170,25 +149,24 @@ Prompt.prototype.onNumberKey = function( input ) { * @param {Number} pointer Position of the pointer * @return {String} Rendered content */ + function listRender(choices, pointer) { + var output = ''; + var separatorOffset = 0; + + choices.forEach(function (choice, i) { + if (choice.type === 'separator') { + separatorOffset++; + output += ' ' + choice + '\n'; + return; + } + + var isSelected = (i - separatorOffset === pointer); + var line = (isSelected ? figures.pointer + ' ' : ' ') + choice.name; + if (isSelected) { + line = chalk.cyan(line); + } + output += line + ' \n'; + }); -function listRender( pointer ) { - var output = ""; - var separatorOffset = 0; - - this.choices.forEach(function( choice, i ) { - if ( choice.type === "separator" ) { - separatorOffset++; - output += " " + choice + "\n"; - return; - } - - var isSelected = (i - separatorOffset === pointer); - var line = (isSelected ? utils.getPointer() + " " : " ") + choice.name; - if ( isSelected ) { - line = chalk.cyan( line ); - } - output += line + " \n"; - }.bind(this)); - - return output.replace(/\n$/, ""); + return output.replace(/\n$/, ''); } diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/password.js b/tools/eslint/node_modules/inquirer/lib/prompts/password.js index 6994dcc22410fc..e1bc00ba9d8ed1 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/password.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/password.js @@ -2,13 +2,20 @@ * `password` type prompt */ -var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); var Base = require("./base"); -var utils = require("../utils/utils"); var observe = require("../utils/events"); +function mask(input) { + input = String(input); + if (input.length === 0) { + return ''; + } + + return new Array(input.length + 1).join('*'); +} + /** * Module exports */ @@ -48,7 +55,6 @@ Prompt.prototype._run = function( cb ) { // Init this.render(); - this.rl.output.mute(); return this; }; @@ -59,48 +65,21 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { +Prompt.prototype.render = function (error) { var message = this.getQuestion(); - utils.writeMessage( this, message ); - - return this; -}; + var bottomContent = ''; - -/** - * When user press `enter` key - */ - -Prompt.prototype.onSubmit = function( input ) { - var value = input; - if ( !value ) { - var value = this.opt.default != null ? this.opt.default : ""; + if (this.status === 'answered') { + message += chalk.cyan(mask(this.answer)); + } else { + message += mask(this.rl.line || ''); } - this.rl.output.unmute(); - this.write("\n"); // manually output the line return as the readline was muted - - this.validate( value, function( isValid ) { - if ( isValid === true ) { - this.status = "answered"; - - // Re-render prompt - this.clean(1).render(); - - // Mask answer - var mask = new Array( value.toString().length + 1 ).join("*"); - - // Render answer - this.write( chalk.cyan(mask) + "\n" ); + if (error) { + bottomContent = '\n' + chalk.red('>> ') + error; + } - this.lineObs.dispose(); - this.keypressObs.dispose(); - this.done( value ); - } else { - this.error( isValid ).clean().render(); - this.rl.output.mute(); - } - }.bind(this)); + this.screen.render(message, bottomContent); }; /** @@ -115,29 +94,19 @@ Prompt.prototype.filterInput = function( input ) { }; Prompt.prototype.onEnd = function( state ) { - this.rl.output.unmute(); - this.write("\n"); // manually output the line return as the readline was muted - this.status = "answered"; + this.answer = state.value; // Re-render prompt - this.clean(1).render(); - - // Mask answer - var mask = new Array( state.value.toString().length + 1 ).join("*"); - - // Render answer - this.write( chalk.cyan(mask) + "\n" ); + this.render(); + this.screen.done(); this.done( state.value ); }; Prompt.prototype.onError = function( state ) { + this.render(state.isValid); this.rl.output.unmute(); - this.write("\n"); // manually output the line return as the readline was muted - - this.error( state.isValid ).clean().render(); - this.rl.output.mute(); }; /** @@ -145,9 +114,5 @@ Prompt.prototype.onError = function( state ) { */ Prompt.prototype.onKeypress = function() { - this.rl.output.unmute(); - this.cacheCursorPos().clean().render(); - var mask = new Array( this.rl.line.length + 1 ).join("*"); - this.write(mask).restoreCursorPos(); - this.rl.output.mute(); + this.render(); }; diff --git a/tools/eslint/node_modules/inquirer/lib/prompts/rawlist.js b/tools/eslint/node_modules/inquirer/lib/prompts/rawlist.js index 18247cfb9f595e..85c69de660e407 100644 --- a/tools/eslint/node_modules/inquirer/lib/prompts/rawlist.js +++ b/tools/eslint/node_modules/inquirer/lib/prompts/rawlist.js @@ -6,9 +6,9 @@ var _ = require("lodash"); var util = require("util"); var chalk = require("chalk"); var Base = require("./base"); -var utils = require("../utils/utils"); var Separator = require("../objects/separator"); var observe = require("../utils/events"); +var Paginator = require("../utils/paginator"); /** @@ -34,8 +34,6 @@ function Prompt() { this.selected = 0; this.rawDefault = 0; - this.opt.choices.setRender( renderChoices ); - _.extend(this.opt, { validate: function( index ) { return this.opt.choices.getChoice( index ) != null; @@ -50,7 +48,7 @@ function Prompt() { // Make sure no default is set (so it won't be printed) this.opt.default = null; - return this; + this.paginator = new Paginator(); } util.inherits( Prompt, Base ); @@ -86,21 +84,26 @@ Prompt.prototype._run = function( cb ) { * @return {Prompt} self */ -Prompt.prototype.render = function() { +Prompt.prototype.render = function (error) { // Render question - var message = this.getQuestion(); - var choicesStr = this.opt.choices.render( this.selected ); + var message = this.getQuestion(); + var bottomContent = ''; if ( this.status === "answered" ) { - message += chalk.cyan(this.opt.choices.getChoice(this.selected).name) + "\n"; + message += chalk.cyan(this.opt.choices.getChoice(this.selected).name); } else { - message += choicesStr; + var choicesStr = renderChoices(this.opt.choices, this.selected); + message += this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize); message += "\n Answer: "; } - utils.writeMessage( this, message ); + message += this.rl.line; - return this; + if (error) { + bottomContent = '\n' + chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); }; /** @@ -122,17 +125,14 @@ Prompt.prototype.onEnd = function( state ) { var selectedChoice = this.opt.choices.getChoice( this.selected ); // Re-render prompt - this.down().clean(2).render(); + this.render(); + this.screen.done(); this.done( selectedChoice.value ); }; Prompt.prototype.onError = function() { - this.hasError = true; - this - .error("Please enter a valid index") - .clean() - .render(); + this.render("Please enter a valid index"); }; /** @@ -148,15 +148,7 @@ Prompt.prototype.onKeypress = function() { this.selected = undefined; } - this.cacheCursorPos(); - - if ( this.hasError ) { - this.down().clean(1); - } else { - this.clean(); - } - - this.render().write( this.rl.line ).restoreCursorPos(); + this.render(); }; @@ -166,26 +158,26 @@ Prompt.prototype.onKeypress = function() { * @return {String} Rendered content */ -function renderChoices( pointer ) { - var output = ""; +function renderChoices(choices, pointer) { + var output = ''; var separatorOffset = 0; - this.choices.forEach(function( choice, i ) { - output += "\n "; + choices.forEach(function (choice, i) { + output += '\n '; - if ( choice.type === "separator" ) { + if (choice.type === 'separator') { separatorOffset++; - output += " " + choice; + output += ' ' + choice; return; } var index = i - separatorOffset; - var display = (index + 1) + ") " + choice.name; - if ( index === pointer ) { + var display = (index + 1) + ') ' + choice.name; + if (index === pointer) { display = chalk.cyan( display ); } output += display; - }.bind(this)); + }); return output; } diff --git a/tools/eslint/node_modules/inquirer/lib/ui/baseUI.js b/tools/eslint/node_modules/inquirer/lib/ui/baseUI.js index d1a2452c094dfb..ebf44da6fa745f 100644 --- a/tools/eslint/node_modules/inquirer/lib/ui/baseUI.js +++ b/tools/eslint/node_modules/inquirer/lib/ui/baseUI.js @@ -1,39 +1,28 @@ -/** - * Base interface class other can inherits from - */ - -var _ = require("lodash"); -var tty = require("../utils/tty"); -var readlineFacade = require("readline2"); - +'use strict'; +var _ = require('lodash'); +var readlineFacade = require('readline2'); -/** - * Module exports - */ - -module.exports = UI; /** - * Constructor + * Base interface class other can inherits from */ -function UI( opt ) { +var UI = module.exports = function (opt) { // Instantiate the Readline interface // @Note: Don't reassign if already present (allow test to override the Stream) - this.rl || (this.rl = readlineFacade.createInterface()); + if (!this.rl) { + this.rl = readlineFacade.createInterface(_.extend({ + terminal: true + }, opt)); + } this.rl.resume(); this.onForceClose = this.onForceClose.bind(this); - this.onKeypress = this.onKeypress.bind(this); // Make sure new prompt start on a newline when closing - this.rl.on( "SIGINT", this.onForceClose ); - process.on( "exit", this.onForceClose ); - - // Propagate keypress events directly on the readline - process.stdin.addListener( "keypress", this.onKeypress ); -} -_.extend( UI.prototype, tty ); + this.rl.on('SIGINT', this.onForceClose); + process.on('exit', this.onForceClose); +}; /** @@ -41,9 +30,9 @@ _.extend( UI.prototype, tty ); * @return {null} */ -UI.prototype.onForceClose = function() { +UI.prototype.onForceClose = function () { this.close(); - console.log("\n"); // Line return + console.log('\n'); // Line return }; @@ -51,15 +40,13 @@ UI.prototype.onForceClose = function() { * Close the interface and cleanup listeners */ -UI.prototype.close = function() { +UI.prototype.close = function () { // Remove events listeners - this.rl.removeListener( "SIGINT", this.onForceClose ); - process.stdin.removeListener( "keypress", this.onKeypress ); - process.removeListener( "exit", this.onForceClose ); + this.rl.removeListener('SIGINT', this.onForceClose); + process.removeListener('exit', this.onForceClose); // Restore prompt functionnalities this.rl.output.unmute(); - process.stdout.write("\x1B[?25h"); // show cursor // Close the readline this.rl.output.end(); @@ -67,17 +54,3 @@ UI.prototype.close = function() { this.rl.close(); this.rl = null; }; - - -/** - * Handle and propagate keypress events - */ - -UI.prototype.onKeypress = function( s, key ) { - // Ignore `enter` key (readline `line` event is the only one we care for) - if ( key && (key.name === "enter" || key.name === "return") ) return; - - if ( this.rl ) { - this.rl.emit( "keypress", s, key ); - } -}; diff --git a/tools/eslint/node_modules/inquirer/lib/ui/bottom-bar.js b/tools/eslint/node_modules/inquirer/lib/ui/bottom-bar.js index 838741dcaeda62..0cbd09a9a8a5e2 100644 --- a/tools/eslint/node_modules/inquirer/lib/ui/bottom-bar.js +++ b/tools/eslint/node_modules/inquirer/lib/ui/bottom-bar.js @@ -5,7 +5,8 @@ var util = require("util"); var through = require("through"); var Base = require("./baseUI"); -var utils = require("../utils/utils"); +var rlUtils = require("../utils/readline"); +var _ = require("lodash"); /** @@ -36,8 +37,7 @@ util.inherits( Prompt, Base ); */ Prompt.prototype.render = function() { - utils.writeMessage ( this, this.bottomBar ); - + this.write(this.bottomBar); return this; }; @@ -50,7 +50,8 @@ Prompt.prototype.render = function() { Prompt.prototype.updateBottomBar = function( bottomBar ) { this.bottomBar = bottomBar; - return this.clean().render(); + rlUtils.clearLine(this.rl, 1); + return this.render(); }; @@ -60,8 +61,8 @@ Prompt.prototype.updateBottomBar = function( bottomBar ) { */ Prompt.prototype.writeLog = function( data ) { - this.clean(); - this.write.call( this, this.enforceLF(data.toString()) ); + rlUtils.clearLine(this.rl, 1); + this.rl.output.write(this.enforceLF(data.toString())); return this.render(); }; @@ -75,3 +76,23 @@ Prompt.prototype.writeLog = function( data ) { Prompt.prototype.enforceLF = function( str ) { return str.match(/[\r\n]$/) ? str : str + "\n"; }; + +/** + * Helper for writing message in Prompt + * @param {Prompt} prompt - The Prompt object that extends tty + * @param {String} message - The message to be output + */ +Prompt.prototype.write = function (message) { + var msgLines = message.split(/\n/); + this.height = msgLines.length; + + // Write message to screen and setPrompt to control backspace + this.rl.setPrompt( _.last(msgLines) ); + + if ( this.rl.output.rows === 0 && this.rl.output.columns === 0 ) { + /* When it's a tty through serial port there's no terminal info and the render will malfunction, + so we need enforce the cursor to locate to the leftmost position for rendering. */ + rlUtils.left( this.rl, message.length + this.rl.line.length ); + } + this.rl.output.write( message ); +}; diff --git a/tools/eslint/node_modules/inquirer/lib/ui/prompt.js b/tools/eslint/node_modules/inquirer/lib/ui/prompt.js index 7139169ef3d703..896ca420e19067 100644 --- a/tools/eslint/node_modules/inquirer/lib/ui/prompt.js +++ b/tools/eslint/node_modules/inquirer/lib/ui/prompt.js @@ -1,60 +1,48 @@ -/** - * Base interface class other can inherits from - */ - -var _ = require("lodash"); -var rx = require("rx"); -var util = require("util"); -var utils = require("../utils/utils"); -var Base = require("./baseUI"); - -var inquirer = require("../inquirer"); +'use strict'; +var _ = require('lodash'); +var rx = require('rx-lite'); +var util = require('util'); +var runAsync = require('run-async'); +var utils = require('../utils/utils'); +var Base = require('./baseUI'); /** - * Module exports - */ - -module.exports = PromptUI; - - -/** - * Constructor + * Base interface class other can inherits from */ -function PromptUI( prompts ) { - Base.call(this); +var PromptUI = module.exports = function (prompts, opt) { + Base.call(this, opt); this.prompts = prompts; -} -util.inherits( PromptUI, Base ); +}; +util.inherits(PromptUI, Base); -PromptUI.prototype.run = function( questions, allDone ) { +PromptUI.prototype.run = function (questions, allDone) { // Keep global reference to the answers this.answers = {}; this.completed = allDone; // Make sure questions is an array. - if ( _.isPlainObject(questions) ) { + if (_.isPlainObject(questions)) { questions = [questions]; } // Create an observable, unless we received one as parameter. // Note: As this is a public interface, we cannot do an instanceof check as we won't // be using the exact same object in memory. - var obs = _.isArray( questions ) ? rx.Observable.fromArray( questions ) : questions; + var obs = _.isArray(questions) ? rx.Observable.from(questions) : questions; - // Start running the questions - this.process = obs.concatMap( this.processQuestion.bind(this) ); + this.process = obs + .concatMap(this.processQuestion.bind(this)) + .publish(); // `publish` creates a hot Observable. It prevents duplicating prompts. - this.process.forEach( - function() {}, - function( err ) { - throw err; - }, + this.process.subscribe( + _.noop, + function (err) { throw err; }, this.onCompletion.bind(this) ); - return this.process; + return this.process.connect(); }; @@ -62,75 +50,77 @@ PromptUI.prototype.run = function( questions, allDone ) { * Once all prompt are over */ -PromptUI.prototype.onCompletion = function() { +PromptUI.prototype.onCompletion = function () { this.close(); - if ( _.isFunction(this.completed) ) { - this.completed( this.answers ); + if (_.isFunction(this.completed)) { + this.completed(this.answers); } }; -PromptUI.prototype.processQuestion = function( question ) { - return rx.Observable.defer(function() { - var obs = rx.Observable.create(function(obs) { - obs.onNext( question ); +PromptUI.prototype.processQuestion = function (question) { + return rx.Observable.defer(function () { + var obs = rx.Observable.create(function (obs) { + obs.onNext(question); obs.onCompleted(); }); return obs - .concatMap( this.setDefaultType.bind(this) ) - .concatMap( this.filterIfRunnable.bind(this) ) - .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "message", this.answers ) ) - .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "default", this.answers ) ) - .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "choices", this.answers ) ) - .concatMap( this.fetchAnswer.bind(this) ); + .concatMap(this.setDefaultType.bind(this)) + .concatMap(this.filterIfRunnable.bind(this)) + .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'message', this.answers)) + .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'default', this.answers)) + .concatMap(utils.fetchAsyncQuestionProperty.bind(null, question, 'choices', this.answers)) + .concatMap(this.fetchAnswer.bind(this)); }.bind(this)); }; -PromptUI.prototype.fetchAnswer = function( question ) { +PromptUI.prototype.fetchAnswer = function (question) { var Prompt = this.prompts[question.type]; - var prompt = new Prompt( question, this.rl, this.answers ); + var prompt = new Prompt(question, this.rl, this.answers); var answers = this.answers; - return utils.createObservableFromAsync(function() { + return utils.createObservableFromAsync(function () { var done = this.async(); - prompt.run(function( answer ) { + prompt.run(function (answer) { answers[question.name] = answer; done({ name: question.name, answer: answer }); }); }); }; -PromptUI.prototype.setDefaultType = function( question ) { +PromptUI.prototype.setDefaultType = function (question) { // Default type to input - if ( !this.prompts[question.type] ) { - question.type = "input"; + if (!this.prompts[question.type]) { + question.type = 'input'; } - return rx.Observable.defer(function() { - return rx.Observable.return( question ); + return rx.Observable.defer(function () { + return rx.Observable.return(question); }); }; -PromptUI.prototype.filterIfRunnable = function( question ) { - if ( question.when == null ) return rx.Observable.return(question); +PromptUI.prototype.filterIfRunnable = function (question) { + if (question.when == null) { + return rx.Observable.return(question); + } - var handleResult = function( obs, shouldRun ) { - if ( shouldRun ) { - obs.onNext( question ); + var handleResult = function (obs, shouldRun) { + if (shouldRun) { + obs.onNext(question); } obs.onCompleted(); }; var answers = this.answers; - return rx.Observable.defer(function() { - return rx.Observable.create(function( obs ) { - if ( _.isBoolean(question.when) ) { - handleResult( obs, question.when ); + return rx.Observable.defer(function () { + return rx.Observable.create(function (obs) { + if (_.isBoolean(question.when)) { + handleResult(obs, question.when); return; } - utils.runAsync( question.when, function( shouldRun ) { - handleResult( obs, shouldRun ); - }, answers ); + runAsync(question.when, function (shouldRun) { + handleResult(obs, shouldRun); + }, answers); }); }); }; diff --git a/tools/eslint/node_modules/inquirer/lib/utils/events.js b/tools/eslint/node_modules/inquirer/lib/utils/events.js index 0778d51c783f21..c394adf56f03fb 100644 --- a/tools/eslint/node_modules/inquirer/lib/utils/events.js +++ b/tools/eslint/node_modules/inquirer/lib/utils/events.js @@ -1,32 +1,37 @@ -var rx = require("rx"); +'use strict'; +var rx = require('rx-lite'); -function normalizeKeypressEvents(args) { - return { value: args[0], key: args[1] }; +function normalizeKeypressEvents(value, key) { + return { value: value, key: key || {} }; } -module.exports = function(rl) { - return { - line: rx.Observable.fromEvent(rl, "line"), +module.exports = function (rl) { + var keypress = rx.Observable.fromEvent(rl.input, 'keypress', normalizeKeypressEvents) + .filter(function (e) { + // Ignore `enter` key. On the readline, we only care about the `line` event. + return e.key.name !== 'enter' && e.key.name !== 'return'; + }); - keypress: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents), + return { + line: rx.Observable.fromEvent(rl, 'line'), + keypress: keypress, - normalizedUpKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) { - return e.key && (e.key.name === "up" || e.key.name === "k"); + normalizedUpKey: keypress.filter(function (e) { + return e.key.name === 'up' || e.key.name === 'k'; }).share(), - normalizedDownKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) { - return e.key && (e.key.name === "down" || e.key.name === "j"); + normalizedDownKey: keypress.filter(function (e) { + return e.key.name === 'down' || e.key.name === 'j'; }).share(), - numberKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) { - return e.value && "123456789".indexOf(e.value) >= 0; - }).map(function(e) { + numberKey: keypress.filter(function (e) { + return e.value && '123456789'.indexOf(e.value) >= 0; + }).map(function (e) { return Number(e.value); }).share(), - spaceKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) { - return e.key && e.key.name === "space"; - }).share(), - + spaceKey: keypress.filter(function (e) { + return e.key && e.key.name === 'space'; + }).share() }; }; diff --git a/tools/eslint/node_modules/inquirer/lib/utils/paginator.js b/tools/eslint/node_modules/inquirer/lib/utils/paginator.js new file mode 100644 index 00000000000000..f6875f597bd80d --- /dev/null +++ b/tools/eslint/node_modules/inquirer/lib/utils/paginator.js @@ -0,0 +1,38 @@ +'use strict'; + +var _ = require('lodash'); +var chalk = require('chalk'); + + +/** + * The paginator keep trakcs of a pointer index in a list and return + * a subset of the choices if the list is too long. + */ + +var Paginator = module.exports = function () { + this.pointer = 0; + this.lastIndex = 0; +}; + +Paginator.prototype.paginate = function (output, active, pageSize) { + var pageSize = pageSize || 7; + var lines = output.split('\n'); + + // Make sure there's enough lines to paginate + if (lines.length <= pageSize + 2) { + return output; + } + + // Move the pointer only when the user go down and limit it to 3 + if (this.pointer < 3 && this.lastIndex < active && active - this.lastIndex < 9) { + this.pointer = Math.min(3, this.pointer + active - this.lastIndex); + } + this.lastIndex = active; + + // Duplicate the lines so it give an infinite list look + var infinite = _.flatten([lines, lines, lines]); + var topIndex = Math.max(0, active + lines.length - this.pointer); + + var section = infinite.splice(topIndex, pageSize).join('\n'); + return section + '\n' + chalk.dim('(Move up and down to reveal more choices)'); +}; diff --git a/tools/eslint/node_modules/inquirer/lib/utils/readline.js b/tools/eslint/node_modules/inquirer/lib/utils/readline.js new file mode 100644 index 00000000000000..978b0b62f165ea --- /dev/null +++ b/tools/eslint/node_modules/inquirer/lib/utils/readline.js @@ -0,0 +1,51 @@ +'use strict'; +var ansiEscapes = require('ansi-escapes'); + +/** + * Move cursor left by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go left (default to 1) + */ + +exports.left = function(rl, x) { + rl.output.write(ansiEscapes.cursorBackward(x)); +}; + +/** + * Move cursor right by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go left (default to 1) + */ + +exports.right = function(rl, x) { + rl.output.write(ansiEscapes.cursorForward(x)); +}; + +/** + * Move cursor up by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go up (default to 1) + */ + +exports.up = function (rl, x) { + rl.output.write(ansiEscapes.cursorUp(x)); +}; + +/** + * Move cursor down by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go down (default to 1) + */ + +exports.down = function (rl, x) { + rl.output.write(ansiEscapes.cursorDown(x)); +}; + +/** + * Clear current line + * @param {Readline} rl - Readline instance + * @param {Number} len - number of line to delete + */ +exports.clearLine = function (rl, len) { + rl.output.write(ansiEscapes.eraseLines(len)); +}; diff --git a/tools/eslint/node_modules/inquirer/lib/utils/screen-manager.js b/tools/eslint/node_modules/inquirer/lib/utils/screen-manager.js new file mode 100644 index 00000000000000..39cc87a2d83ded --- /dev/null +++ b/tools/eslint/node_modules/inquirer/lib/utils/screen-manager.js @@ -0,0 +1,134 @@ +'use strict'; +var _ = require('lodash'); +var util = require('./readline'); +var cliWidth = require('cli-width'); +var stripAnsi = require('strip-ansi'); + +// Prevent crashes on environments where the width can't be properly detected +cliWidth.defaultWidth = 80; + +function height(content) { + return content.split('\n').length; +} + +function width(content) { + return stripAnsi(content).length; +} + +function lastLine(content) { + return _.last(content.split('\n')); +} + +function normalizedCliWidth() { + if (process.platform === 'win32') { + return cliWidth() - 1; + } + return cliWidth(); +} + +var ScreenManager = module.exports = function (rl) { + // These variables are keeping information to allow correct prompt re-rendering + this.height = 0; + this.extraLinesUnderPrompt = 0; + + this.rl = rl; +}; + +ScreenManager.prototype.render = function (content, bottomContent) { + var cursorPos = this.rl._getCursorPos(); + + this.rl.output.unmute(); + this.clean(this.extraLinesUnderPrompt); + + /** + * Write message to screen and setPrompt to control backspace + */ + + var promptLine = lastLine(content); + var rawPromptLine = stripAnsi(promptLine); + + // Remove the rl.line from our prompt. We can't rely on the content of + // rl.line (mainly because of the password prompt), so just rely on it's + // length. + var prompt = promptLine; + if (this.rl.line.length) { + prompt = prompt.slice(0, -this.rl.line.length); + } + this.rl.setPrompt(prompt); + + content = forceLineReturn(content); + if (bottomContent) { + bottomContent = forceLineReturn(bottomContent); + } + // Manually insert an extra line if we're at the end of the line. + // This prevent the cursor from appearing at the beginning of the + // current line. + if (rawPromptLine.length % normalizedCliWidth() === 0) { + content = content + '\n'; + } + var fullContent = content + (bottomContent ? '\n' + bottomContent : ''); + this.rl.output.write(fullContent); + + /** + * Re-adjust the cursor at the correct position. + */ + + // We need to consider parts of the prompt under the cursor as part of the bottom + // content in order to correctly cleanup and re-render. + var promptLineUpDiff = Math.floor(rawPromptLine.length / normalizedCliWidth()) - cursorPos.rows; + var bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0); + if (bottomContentHeight > 0) { + util.up(this.rl, bottomContentHeight); + } + + // Reset cursor at the beginning of the line + util.left(this.rl, width(lastLine(fullContent))); + + // Adjust cursor on the right + var rightPos = cursorPos.cols; + if (cursorPos.rows === 0) { + rightPos = Math.max(rightPos, width(lastLine(content))); + } + util.right(this.rl, rightPos); + + /** + * Set up state for next re-rendering + */ + this.extraLinesUnderPrompt = bottomContentHeight; + this.height = height(fullContent); + + this.rl.output.mute(); +}; + +ScreenManager.prototype.clean = function (extraLines) { + if (extraLines > 0) { + util.down(this.rl, extraLines); + } + util.clearLine(this.rl, this.height); +}; + +ScreenManager.prototype.done = function () { + this.rl.setPrompt(''); + this.rl.output.unmute(); + this.rl.output.write('\n'); +}; + +function breakLines(lines) { + // Break lines who're longuer than the cli width so we can normalize the natural line + // returns behavior accross terminals. + var width = normalizedCliWidth(); + var regex = new RegExp( + '(?:(?:\\033\[[0-9;]*m)*.?){1,' + width + '}', + 'g' + ); + return lines.map(function (line) { + var chunk = line.match(regex); + // last match is always empty + chunk.pop(); + return chunk || ''; + }); +} + +function forceLineReturn(content) { + return _.flatten(breakLines(content.split('\n'))).join('\n'); +} diff --git a/tools/eslint/node_modules/inquirer/lib/utils/tty.js b/tools/eslint/node_modules/inquirer/lib/utils/tty.js deleted file mode 100644 index a1c0c5c6385ca2..00000000000000 --- a/tools/eslint/node_modules/inquirer/lib/utils/tty.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * TTY mixin helpers - */ - -var _ = require("lodash"); -var readline = require("readline"); -var cliWidth = require("cli-width"); - -var tty = module.exports; - - -/** - * Remove the prompt from screen - * @param {Number} Extra lines to remove (probably to compensate the "enter" key line - * return) - * @return {Prompt} self - */ - -tty.clean = function( extra ) { - _.isNumber(extra) || (extra = 0); - var len = this.height + extra; - - while ( len-- ) { - readline.moveCursor(this.rl.output, -cliWidth(), 0); - readline.clearLine(this.rl.output, 0); - if ( len ) readline.moveCursor(this.rl.output, 0, -1); - } - return this; -}; - - -/** - * Move cursor down by `x` - * @param {Number} x How far to go down (default to 1) - * @return {Prompt} self - */ - -tty.down = function( x ) { - _.isNumber(x) || (x = 1); - - // @bug: Write new lines instead of moving cursor as unix system don't allocate a new - // line when the cursor is moved over there. - while ( x-- ) { - this.write("\n"); - } - - return this; -}; - - -/** - * Move cursor up by `x` - * @param {Number} x How far to go up (default to 1) - * @return {Prompt} self - */ - -tty.up = function( x ) { - _.isNumber(x) || (x = 1); - readline.moveCursor( this.rl.output, 0, -x ); - return this; -}; - -/** - * Move cursor left by `x` - * @param {Number} x How far to go left (default to 1) - * @return {Prompt} self - */ - -tty.left = function( x ) { - _.isNumber(x) || (x = 1); - readline.moveCursor (this.rl.output, -x, 0); - return this; -}; - - -/** - * Write a string to the stdout - * @return {Self} - */ - -tty.write = function( str ) { - this.rl.output.write( str ); - return this; -}; - - -/** - * Hide cursor - * @return {Prompt} self - */ - -tty.hideCursor = function() { - return this.write("\x1B[?25l"); -}; - - -/** - * Show cursor - * @return {Prompt} self - */ - -tty.showCursor = function() { - return this.write("\x1B[?25h"); -}; - - -/** - * Remember the cursor position - * @return {Prompt} Self - */ - -tty.cacheCursorPos = function() { - this.cursorPos = this.rl._getCursorPos(); - return this; -}; - - -/** - * Restore the cursor position to where it has been previously stored. - * @return {Prompt} Self - */ - -tty.restoreCursorPos = function() { - if ( !this.cursorPos ) return; - var line = this.rl._prompt + this.rl.line; - readline.moveCursor(this.rl.output, -line.length, 0); - readline.moveCursor(this.rl.output, this.cursorPos.cols, 0); - this.cursorPos = null; - return this; -}; diff --git a/tools/eslint/node_modules/inquirer/lib/utils/utils.js b/tools/eslint/node_modules/inquirer/lib/utils/utils.js index a91e108667a53a..f90bfdd47fa28f 100644 --- a/tools/eslint/node_modules/inquirer/lib/utils/utils.js +++ b/tools/eslint/node_modules/inquirer/lib/utils/utils.js @@ -1,42 +1,7 @@ -/** - * Utility functions - */ - -"use strict"; -var _ = require("lodash"); -var chalk = require("chalk"); -var rx = require("rx"); -var figures = require("figures"); - - -/** - * Module exports - */ - -var utils = module.exports; - - -/** - * Run a function asynchronously or synchronously - * @param {Function} func Function to run - * @param {Function} cb Callback function passed the `func` returned value - * @...rest {Mixed} rest Arguments to pass to `func` - * @return {Null} - */ - -utils.runAsync = function( func, cb ) { - var async = false; - var isValid = func.apply({ - async: function() { - async = true; - return _.once(cb); - } - }, Array.prototype.slice.call(arguments, 2) ); - - if ( !async ) { - cb(isValid); - } -}; +'use strict'; +var _ = require('lodash'); +var rx = require('rx-lite'); +var runAsync = require('run-async'); /** @@ -45,11 +10,11 @@ utils.runAsync = function( func, cb ) { * @return {rx.Observable} Observable emitting when value is known */ -utils.createObservableFromAsync = function( func ) { - return rx.Observable.defer(function() { - return rx.Observable.create(function( obs ) { - utils.runAsync( func, function( value ) { - obs.onNext( value ); +exports.createObservableFromAsync = function (func) { + return rx.Observable.defer(function () { + return rx.Observable.create(function (obs) { + runAsync(func, function (value) { + obs.onNext(value); obs.onCompleted(); }); }); @@ -67,57 +32,16 @@ utils.createObservableFromAsync = function( func ) { * @return {rx.Obsersable} - Observable emitting once value is known */ -utils.fetchAsyncQuestionProperty = function( question, prop, answers ) { - if ( !_.isFunction(question[prop]) ) return rx.Observable.return(question); +exports.fetchAsyncQuestionProperty = function (question, prop, answers) { + if (!_.isFunction(question[prop])) { + return rx.Observable.return(question); + } - return utils.createObservableFromAsync(function() { + return exports.createObservableFromAsync(function () { var done = this.async(); - utils.runAsync( question[prop], function( value ) { + runAsync(question[prop], function (value) { question[prop] = value; - done( question ); - }, answers ); + done(question); + }, answers); }); }; - - -/** - * Get the pointer char - * @return {String} the pointer char - */ - -utils.getPointer = function() { - return figures.pointer; -}; - - -/** - * Get the checkbox - * @param {Boolean} checked - add a X or not to the checkbox - * @param {String} after - Text to append after the check char - * @return {String} - Composited checkbox string - */ - -utils.getCheckbox = function( checked, after ) { - var checked = checked ? chalk.green( figures.radioOn ) : figures.radioOff; - return checked + " " + ( after || "" ); -}; - -/** - * Helper for writing message in Prompt - * @param {Prompt} prompt - The Prompt object that extends tty - * @param {String} message - The message to be output - */ -utils.writeMessage = function ( prompt, message ) { - var msgLines = message.split(/\n/); - prompt.height = msgLines.length; - - // Write message to screen and setPrompt to control backspace - prompt.rl.setPrompt( _.last(msgLines) ); - - if ( process.stdout.rows === 0 && process.stdout.columns === 0 ) { - /* When it's a tty through serial port there's no terminal info and the render will malfunction, - so we need enforce the cursor to locate to the leftmost position for rendering. */ - prompt.left( message.length + prompt.rl.line.length ); - } - prompt.write( message ); -}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js b/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js deleted file mode 100644 index 2fcdd1e472f961..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; -}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json b/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json deleted file mode 100644 index 3ce9ccdb878b9c..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "ansi-regex", - "version": "1.1.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/ansi-regex.git" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha test/test.js", - "view-supported": "node test/viewCodes.js" - }, - "files": [ - "index.js" - ], - "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" - ], - "devDependencies": { - "mocha": "*" - }, - "gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-regex/issues" - }, - "homepage": "https://github.com/sindresorhus/ansi-regex", - "_id": "ansi-regex@1.1.1", - "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "_from": "ansi-regex@>=1.1.1 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md b/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md deleted file mode 100644 index ae876e7292feb7..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) - -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -```sh -$ npm install --save ansi-regex -``` - - -## Usage - -```js -var 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'] -``` - -*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/inquirer/node_modules/cli-width/.npmignore b/tools/eslint/node_modules/inquirer/node_modules/cli-width/.npmignore deleted file mode 100644 index 73ecdc8a12afda..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/cli-width/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -*.swp diff --git a/tools/eslint/node_modules/inquirer/node_modules/cli-width/README.md b/tools/eslint/node_modules/inquirer/node_modules/cli-width/README.md deleted file mode 100644 index 050280efd0181a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/cli-width/README.md +++ /dev/null @@ -1,28 +0,0 @@ -cli-width -========= - -Get stdout window width, with two fallbacks, `tty` and then a default. - -## Usage - -``` -npm install --save cli-width -``` - -```js -'use stict'; - -var cliWidth = require('cli-width'); - -cliWidth(); // maybe 204 :) -``` - -If none of the methods are supported, the default is `0` and -can be changed via `cliWidth.defaultWidth = 200;`. - -## Tests - -```bash -npm install -npm test -``` diff --git a/tools/eslint/node_modules/inquirer/node_modules/cli-width/index.js b/tools/eslint/node_modules/inquirer/node_modules/cli-width/index.js deleted file mode 100644 index 1299c3190533e0..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/cli-width/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -exports = module.exports = cliWidth; -exports.defaultWidth = 0; - -function cliWidth() { - if (process.stdout.getWindowSize) { - return process.stdout.getWindowSize()[0]; - } - else { - var tty = require('tty'); - - if (tty.getWindowSize) { - return tty.getWindowSize()[1]; - } - else { - return exports.defaultWidth; - } - } -}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/cli-width/package.json b/tools/eslint/node_modules/inquirer/node_modules/cli-width/package.json deleted file mode 100644 index 0006924e14732a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/cli-width/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "cli-width", - "version": "1.0.1", - "description": "Get stdout window width, with two fallbacks, tty and then a default.", - "main": "index.js", - "scripts": { - "test": "node test | tap-spec" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/knownasilya/cli-width.git" - }, - "author": { - "name": "Ilya Radchenko", - "email": "ilya@burstcreations.com" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/knownasilya/cli-width/issues" - }, - "homepage": "https://github.com/knownasilya/cli-width", - "devDependencies": { - "tap-spec": "^2.2.0", - "tape": "^3.4.0" - }, - "gitHead": "4448d9599eee5a85da34e24baad39cfddfc1d807", - "_id": "cli-width@1.0.1", - "_shasum": "14d4f6870234d91e97f7dd81e76be8271410a1ef", - "_from": "cli-width@>=1.0.1 <2.0.0", - "_npmVersion": "2.1.2", - "_nodeVersion": "0.10.26", - "_npmUser": { - "name": "knownasilya", - "email": "ilya@burstcreations.com" - }, - "maintainers": [ - { - "name": "knownasilya", - "email": "ilya@burstcreations.com" - } - ], - "dist": { - "shasum": "14d4f6870234d91e97f7dd81e76be8271410a1ef", - "tarball": "http://registry.npmjs.org/cli-width/-/cli-width-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/cli-width/test/index.js b/tools/eslint/node_modules/inquirer/node_modules/cli-width/test/index.js deleted file mode 100644 index acccd3861773d3..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/cli-width/test/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var tty = require('tty'); -var test = require('tape'); -var lib = require('../'); - - -test('uses process.stdout.getWindowSize', function (t) { - // mock stdout.getWindowSize - process.stdout.getWindowSize = function () { - return [100]; - }; - - t.equal(lib(), 100, 'equal to mocked, 100'); - t.end(); -}); - -test('uses tty.getWindowSize', function (t) { - process.stdout.getWindowSize = undefined; - tty.getWindowSize = function () { - return [3, 5]; - }; - - t.equal(lib(), 5, 'equal to mocked, 5'); - t.end(); -}); - -test('uses default', function (t) { - tty.getWindowSize = undefined; - - t.equal(lib(), 0, 'default unset value, 0'); - t.end(); -}); - -test('uses overridden default', function (t) { - lib.defaultWidth = 10; - - t.equal(lib(), 10, 'user-set default value, 10'); - t.end(); -}); diff --git a/tools/eslint/node_modules/inquirer/node_modules/figures/index.js b/tools/eslint/node_modules/inquirer/node_modules/figures/index.js deleted file mode 100644 index 3083de17c6eb7d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/figures/index.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; -var platform = process.platform; - -var main = { - tick: '✔', - cross: '✖', - star: '★', - square: '▇', - squareSmall: '◻', - squareSmallFilled: '◼', - circle: '◯', - circleFilled: '◉', - circleDotted: '◌', - circleDouble: '◎', - circleCircle: 'ⓞ', - circleCross: 'ⓧ', - circlePipe: 'Ⓘ', - circleQuestionMark: '?⃝', - bullet: '●', - dot: '․', - line: '─', - ellipsis: '…', - pointer: '❯', - info: 'ℹ', - warning: '⚠', - hamburger: '☰', - smiley: '㋡', - mustache: '෴', - heart: '♥', - arrowUp: '↑', - arrowDown: '↓', - arrowLeft: '←', - arrowRight: '→', - radioOn: '◉', - radioOff: '◯', - checkboxOn: '☒', - checkboxOff: '☐', - checkboxCircleOn: 'ⓧ', - checkboxCircleOff: 'Ⓘ', - questionMarkPrefix: '?⃝', -}; - -var win = { - tick: '√', - cross: '×', - star: '*', - square: '█', - squareSmall: '[ ]', - squareSmallFilled: '[█]', - circle: '( )', - circleFilled: '(*)', - circleDotted: '( )', - circleDouble: '( )', - circleCircle: '(○)', - circleCross: '(×)', - circlePipe: '(│)', - circleQuestionMark: '(?)', - bullet: '*', - dot: '.', - line: '─', - ellipsis: '...', - pointer: '>', - info: 'i', - warning: '‼', - hamburger: '≡', - smiley: '☺', - mustache: '┌─┐', - heart: main.heart, - arrowUp: main.arrowUp, - arrowDown: main.arrowDown, - arrowLeft: main.arrowLeft, - arrowRight: main.arrowRight, - radioOn: '(*)', - radioOff: '( )', - checkboxOn: '[×]', - checkboxOff: '[ ]', - checkboxCircleOn: '(×)', - checkboxCircleOff: '( )', - questionMarkPrefix: '?' -}; - -if (platform === 'linux') { - // the main one doesn't look that good on Ubuntu - main.questionMarkPrefix = '?'; -} - -module.exports = platform === 'win32' ? win : main; diff --git a/tools/eslint/node_modules/inquirer/node_modules/figures/package.json b/tools/eslint/node_modules/inquirer/node_modules/figures/package.json deleted file mode 100644 index bf9d5d0c297e21..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/figures/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "figures", - "version": "1.3.5", - "description": "Unicode symbols with Windows CMD fallbacks", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/figures.git" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "unicode", - "cli", - "cmd", - "command-line", - "characters", - "char", - "symbol", - "symbols", - "figure", - "figures", - "fallback" - ], - "devDependencies": { - "ava": "0.0.4" - }, - "gitHead": "5dd6a2d3320c904b69e5d59ee9c5099fa1cd6f1e", - "bugs": { - "url": "https://github.com/sindresorhus/figures/issues" - }, - "homepage": "https://github.com/sindresorhus/figures", - "_id": "figures@1.3.5", - "_shasum": "d1a31f4e1d2c2938ecde5c06aa16134cf29f4771", - "_from": "figures@>=1.3.5 <2.0.0", - "_npmVersion": "2.1.5", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "d1a31f4e1d2c2938ecde5c06aa16134cf29f4771", - "tarball": "http://registry.npmjs.org/figures/-/figures-1.3.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/figures/-/figures-1.3.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/figures/readme.md b/tools/eslint/node_modules/inquirer/node_modules/figures/readme.md deleted file mode 100644 index 839a309ee0cae6..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/figures/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# figures [![Build Status](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) - -> Unicode symbols with Windows CMD fallbacks - -[![](screenshot.png)](index.js) - -[*and more...*](index.js) - -Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437). - - -## Install - -```sh -$ npm install --save figures -``` - - -## Usage - -See the [source](index.js) for supported symbols. - -```js -var figures = require('figures'); - -console.log(figures.tick); -// On real OSes: ✔︎ -// On Windows: √ -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/README.md b/tools/eslint/node_modules/inquirer/node_modules/lodash/README.md deleted file mode 100644 index cd0fe0cebb7027..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# lodash v3.9.3 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. - -Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): -```bash -$ lodash modularize modern exports=node -o ./ -$ lodash modern -d -o ./index.js -``` - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash -``` - -In Node.js/io.js: - -```js -// load the modern build -var _ = require('lodash'); -// or a method category -var array = require('lodash/array'); -// or a method (great for smaller builds with browserify/webpack) -var chunk = require('lodash/array/chunk'); -``` - -See the [package source](https://github.com/lodash/lodash/tree/3.9.3-npm) for more details. - -**Note:**
-Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
-Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. - -## Module formats - -lodash is also available in a variety of other builds & module formats. - - * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds - * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.3-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.3-amd) builds - * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.3-es) build - -## Further Reading - - * [API Documentation](https://lodash.com/docs) - * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) - * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) - * [Release Notes](https://github.com/lodash/lodash/releases) - * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) - * [More Resources](https://github.com/lodash/lodash/wiki/Resources) - -## Features - - * ~100% [code coverage](https://coveralls.io/r/lodash) - * Follows [semantic versioning](http://semver.org/) for releases - * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining - * [_(…)](https://lodash.com/docs#_) supports intuitive chaining - * [_.add](https://lodash.com/docs#add) for mathematical composition - * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order - * [_.at](https://lodash.com/docs#at) for cherry-picking collection values - * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch - * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) - * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods - * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size - * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects - * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects - * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions - * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control - * [_.fill](https://lodash.com/docs#fill) to fill arrays with values - * [_.findKey](https://lodash.com/docs#findKey) for finding keys - * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) - * [_.forEach](https://lodash.com/docs#forEach) supports exiting early - * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties - * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties - * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting - * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods - * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range - * [_.isNative](https://lodash.com/docs#isNative) to check for native functions - * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects - * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays - * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object - * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons - * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) - * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods - * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) - * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior - * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays - * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers - * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions - * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking - * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values - * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders - * [_.sum](https://lodash.com/docs#sum) to get the sum of values - * [_.support](https://lodash.com/docs#support) for flagging environment features - * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) - * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects - * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined - * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) - * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties - * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & - [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders - * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & - [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods - * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & - [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks - * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & - [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) - * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & - [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods - * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & - [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings - * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences - * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence - -## Support - -Tested in Chrome 41-42, Firefox 37-38, IE 6-11, MS Edge, Opera 28-29, Safari 5-8, ChakraNode 0.12.2, io.js 2.1.0, Node.js 0.8.28, 0.10.38, & 0.12.4, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6 -Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/chunk.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/chunk.js deleted file mode 100644 index 4de9b3961843b0..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/chunk.js +++ /dev/null @@ -1,47 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** Native method references. */ -var ceil = Math.ceil; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array of elements split into groups the length of `size`. - * If `collection` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new array containing chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ -function chunk(array, size, guard) { - if (guard ? isIterateeCall(array, size, guard) : size == null) { - size = 1; - } else { - size = nativeMax(+size || 1, 1); - } - var index = 0, - length = array ? array.length : 0, - resIndex = -1, - result = Array(ceil(length / size)); - - while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); - } - return result; -} - -module.exports = chunk; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/difference.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/difference.js deleted file mode 100644 index 5049337e5f3a9d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/difference.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - baseFlatten = require('../internal/baseFlatten'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The arrays of values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([1, 2, 3], [4, 2]); - * // => [1, 3] - */ -var difference = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, baseFlatten(values, false, true)) - : []; -}); - -module.exports = difference; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/flatten.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/flatten.js deleted file mode 100644 index 65bbeefb775ad8..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/flatten.js +++ /dev/null @@ -1,32 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; -} - -module.exports = flatten; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/indexOf.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/indexOf.js deleted file mode 100644 index f8f6c9fc2cdb4f..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/indexOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - binaryIndex = require('../internal/binaryIndex'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=0] The index to search from or `true` - * to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - * - * // performing a binary search - * _.indexOf([1, 1, 2, 2], 2, true); - * // => 2 - */ -function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else if (fromIndex) { - var index = binaryIndex(array, value), - other = array[index]; - - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - return baseIndexOf(array, value, fromIndex || 0); -} - -module.exports = indexOf; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/intersection.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/intersection.js deleted file mode 100644 index ec5b7f9b6ce4db..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/intersection.js +++ /dev/null @@ -1,58 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - cacheIndexOf = require('../internal/cacheIndexOf'), - createCache = require('../internal/createCache'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique values that are included in all of the provided - * arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. - * @example - * _.intersection([1, 2], [4, 2], [2, 1]); - * // => [2] - */ -var intersection = restParam(function(arrays) { - var othLength = arrays.length, - othIndex = othLength, - caches = Array(length), - indexOf = baseIndexOf, - isCommon = true, - result = []; - - while (othIndex--) { - var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; - caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; - } - var array = arrays[0], - index = -1, - length = array ? array.length : 0, - seen = caches[0]; - - outer: - while (++index < length) { - value = array[index]; - if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { - var othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { - continue outer; - } - } - if (seen) { - seen.push(value); - } - result.push(value); - } - } - return result; -}); - -module.exports = intersection; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/pull.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/pull.js deleted file mode 100644 index 746f196f830fe0..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/pull.js +++ /dev/null @@ -1,52 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'); - -/** Used for native method references. */ -var arrayProto = Array.prototype; - -/** Native method references. */ -var splice = arrayProto.splice; - -/** - * Removes all provided values from `array` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ -function pull() { - var args = arguments, - array = args[0]; - - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = baseIndexOf, - length = args.length; - - while (++index < length) { - var fromIndex = 0, - value = args[index]; - - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = pull; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedIndex.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedIndex.js deleted file mode 100644 index 51d150e3b3ac9d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedIndex.js +++ /dev/null @@ -1,53 +0,0 @@ -var createSortedIndex = require('../internal/createSortedIndex'); - -/** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. If an iteratee - * function is provided it is invoked for `value` and each element of `array` - * to compute their sort ranking. The iteratee is bound to `thisArg` and - * invoked with one argument; (value). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 4, 5, 5], 5); - * // => 2 - * - * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; - * - * // using an iteratee function - * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { - * return this.data[word]; - * }, dict); - * // => 1 - * - * // using the `_.property` callback shorthand - * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 1 - */ -var sortedIndex = createSortedIndex(); - -module.exports = sortedIndex; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/union.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/union.js deleted file mode 100644 index 05101ca1c2d046..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/union.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - baseUniq = require('../internal/baseUniq'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique values, in order, from all of the provided arrays - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([1, 2], [4, 2], [2, 1]); - * // => [1, 2, 4] - */ -var union = restParam(function(arrays) { - return baseUniq(baseFlatten(arrays, false, true)); -}); - -module.exports = union; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/uniq.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/uniq.js deleted file mode 100644 index 91ae46e244d99f..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/uniq.js +++ /dev/null @@ -1,71 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseUniq = require('../internal/baseUniq'), - isIterateeCall = require('../internal/isIterateeCall'), - sortedUniq = require('../internal/sortedUniq'); - -/** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it is invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ -function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); - return (isSorted) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); -} - -module.exports = uniq; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/without.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/without.js deleted file mode 100644 index 19b78491af674f..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/without.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array excluding all provided values using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to filter. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.without([1, 2, 1, 3], 1, 2); - * // => [3] - */ -var without = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, values) - : []; -}); - -module.exports = without; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/xor.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/array/xor.js deleted file mode 100644 index 3bdf9df1218365..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/xor.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - baseUniq = require('../internal/baseUniq'), - isArrayLike = require('../internal/isArrayLike'); - -/** - * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the provided arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xor([1, 2], [4, 2]); - * // => [1, 4] - */ -function xor() { - var index = -1, - length = arguments.length; - - while (++index < length) { - var array = arguments[index]; - if (isArrayLike(array)) { - var result = result - ? baseDifference(result, array).concat(baseDifference(array, result)) - : array; - } - } - return result ? baseUniq(result) : []; -} - -module.exports = xor; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/chain.js deleted file mode 100644 index 7992b733e23602..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - 'chain': require('./chain/chain'), - 'commit': require('./chain/commit'), - 'lodash': require('./chain/lodash'), - 'plant': require('./chain/plant'), - 'reverse': require('./chain/reverse'), - 'run': require('./chain/run'), - 'tap': require('./chain/tap'), - 'thru': require('./chain/thru'), - 'toJSON': require('./chain/toJSON'), - 'toString': require('./chain/toString'), - 'value': require('./chain/value'), - 'valueOf': require('./chain/valueOf'), - 'wrapperChain': require('./chain/wrapperChain') -}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/lodash.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/lodash.js deleted file mode 100644 index 3241ed89f22cf3..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/lodash.js +++ /dev/null @@ -1,123 +0,0 @@ -var LazyWrapper = require('../internal/LazyWrapper'), - LodashWrapper = require('../internal/LodashWrapper'), - baseLodash = require('../internal/baseLodash'), - isArray = require('../lang/isArray'), - isObjectLike = require('../internal/isObjectLike'), - wrapperClone = require('../internal/wrapperClone'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a `lodash` object which wraps `value` to enable implicit chaining. - * Methods that operate on and return arrays, collections, and functions can - * be chained together. Methods that return a boolean or single value will - * automatically end the chain returning the unwrapped value. Explicit chaining - * may be enabled using `_.chain`. The execution of chained methods is lazy, - * that is, execution is deferred until `_#value` is implicitly or explicitly - * called. - * - * Lazy evaluation allows several methods to support shortcut fusion. Shortcut - * fusion is an optimization that merges iteratees to avoid creating intermediate - * arrays and reduce the number of iteratee executions. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, - * `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, - * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, - * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, - * and `where` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, - * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, - * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, - * `difference`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `fill`, - * `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`, - * `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`, - * `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, - * `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `method`, `methodOf`, `mixin`, `negate`, `omit`, `once`, - * `pairs`, `partial`, `partialRight`, `partition`, `pick`, `plant`, `pluck`, - * `property`, `propertyOf`, `pull`, `pullAt`, `push`, `range`, `rearg`, - * `reject`, `remove`, `rest`, `restParam`, `reverse`, `set`, `shuffle`, - * `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`, `spread`, - * `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, - * `thru`, `times`, `toArray`, `toPlainObject`, `transform`, `union`, `uniq`, - * `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `where`, `without`, - * `wrap`, `xor`, `zip`, `zipObject`, `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`, - * `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, - * `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `get`, - * `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, - * `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, - * `isFinite` `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, - * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, - * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lt`, `lte`, - * `max`, `min`, `noConflict`, `noop`, `now`, `pad`, `padLeft`, `padRight`, - * `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, - * `runInContext`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedLastIndex`, `startCase`, `startsWith`, `sum`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words` - * - * The wrapper method `sample` will return a wrapped value when `n` is provided, - * otherwise an unwrapped value is returned. - * - * @name _ - * @constructor - * @category Chain - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var wrapped = _([1, 2, 3]); - * - * // returns an unwrapped value - * wrapped.reduce(function(total, n) { - * return total + n; - * }); - * // => 6 - * - * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ -function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); -} - -// Ensure wrappers are instances of `baseLodash`. -lodash.prototype = baseLodash.prototype; - -module.exports = lodash; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperCommit.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperCommit.js deleted file mode 100644 index c46a787e97d0e7..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperCommit.js +++ /dev/null @@ -1,32 +0,0 @@ -var LodashWrapper = require('../internal/LodashWrapper'); - -/** - * Executes the chained sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapper = wrapper.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapper.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ -function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); -} - -module.exports = wrapperCommit; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperPlant.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperPlant.js deleted file mode 100644 index a3de146b13d740..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperPlant.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseLodash = require('../internal/baseLodash'), - wrapperClone = require('../internal/wrapperClone'); - -/** - * Creates a clone of the chained sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).map(function(value) { - * return Math.pow(value, 2); - * }); - * - * var other = [3, 4]; - * var otherWrapper = wrapper.plant(other); - * - * otherWrapper.value(); - * // => [9, 16] - * - * wrapper.value(); - * // => [1, 4] - */ -function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; -} - -module.exports = wrapperPlant; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperReverse.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperReverse.js deleted file mode 100644 index 4518b3ed286c56..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperReverse.js +++ /dev/null @@ -1,38 +0,0 @@ -var LazyWrapper = require('../internal/LazyWrapper'), - LodashWrapper = require('../internal/LodashWrapper'), - thru = require('./thru'); - -/** - * Reverses the wrapped array so the first element becomes the last, the - * second element becomes the second to last, and so on. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new reversed `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ -function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - if (this.__actions__.length) { - value = new LazyWrapper(this); - } - return new LodashWrapper(value.reverse(), this.__chain__); - } - return this.thru(function(value) { - return value.reverse(); - }); -} - -module.exports = wrapperReverse; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/every.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/every.js deleted file mode 100644 index a04d3db637783d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/every.js +++ /dev/null @@ -1,66 +0,0 @@ -var arrayEvery = require('../internal/arrayEvery'), - baseCallback = require('../internal/baseCallback'), - baseEvery = require('../internal/baseEvery'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * The predicate is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = every; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/includes.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/includes.js deleted file mode 100644 index 80c90e1e3fd115..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/includes.js +++ /dev/null @@ -1,60 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - getLength = require('../internal/getLength'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'), - isString = require('../lang/isString'), - values = require('../object/values'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ -function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (baseIndexOf(collection, target, fromIndex) > -1); -} - -module.exports = includes; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/invoke.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/invoke.js deleted file mode 100644 index 0a0a84cdbe275d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/invoke.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseEach = require('../internal/baseEach'), - invokePath = require('../internal/invokePath'), - isArrayLike = require('../internal/isArrayLike'), - isKey = require('../internal/isKey'), - restParam = require('../function/restParam'); - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it is - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invoke = restParam(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - isProp = isKey(path), - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : null); - result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); - }); - return result; -}); - -module.exports = invoke; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduce.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduce.js deleted file mode 100644 index da97655c198e47..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduce.js +++ /dev/null @@ -1,43 +0,0 @@ -var arrayReduce = require('../internal/arrayReduce'), - baseEach = require('../internal/baseEach'), - createReduce = require('../internal/createReduce'); - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not provided the first element of `collection` is used as the initial - * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `includes`, `merge`, `sortByAll`, and `sortByOrder` - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.reduce([1, 2], function(total, n) { - * return total + n; - * }); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) - */ -var reduce = createReduce(arrayReduce, baseEach); - -module.exports = reduce; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/some.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/some.js deleted file mode 100644 index 2b866b464b6552..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/some.js +++ /dev/null @@ -1,67 +0,0 @@ -var arraySome = require('../internal/arraySome'), - baseCallback = require('../internal/baseCallback'), - baseSome = require('../internal/baseSome'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = some; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortBy.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortBy.js deleted file mode 100644 index 28d75f56dacce9..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortBy.js +++ /dev/null @@ -1,71 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - baseSortBy = require('../internal/baseSortBy'), - compareAscending = require('../internal/compareAscending'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; - } - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - var index = -1; - iteratee = baseCallback(iteratee, thisArg, 3); - - var result = baseMap(collection, function(value, key, collection) { - return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; - }); - return baseSortBy(result, compareAscending); -} - -module.exports = sortBy; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByOrder.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByOrder.js deleted file mode 100644 index c704eeb61f201b..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByOrder.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseSortByOrder = require('../internal/baseSortByOrder'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * This method is like `_.sortByAll` except that it allows specifying the - * sort orders of the iteratees to sort by. A truthy value in `orders` will - * sort the corresponding property name in ascending order while a falsey - * value will sort it in descending order. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ -function sortByOrder(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (guard && isIterateeCall(iteratees, orders, guard)) { - orders = null; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseSortByOrder(collection, iteratees, orders); -} - -module.exports = sortByOrder; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function.js deleted file mode 100644 index 2cacde1ee59e36..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = { - 'after': require('./function/after'), - 'ary': require('./function/ary'), - 'backflow': require('./function/backflow'), - 'before': require('./function/before'), - 'bind': require('./function/bind'), - 'bindAll': require('./function/bindAll'), - 'bindKey': require('./function/bindKey'), - 'compose': require('./function/compose'), - 'curry': require('./function/curry'), - 'curryRight': require('./function/curryRight'), - 'debounce': require('./function/debounce'), - 'defer': require('./function/defer'), - 'delay': require('./function/delay'), - 'flow': require('./function/flow'), - 'flowRight': require('./function/flowRight'), - 'memoize': require('./function/memoize'), - 'negate': require('./function/negate'), - 'once': require('./function/once'), - 'partial': require('./function/partial'), - 'partialRight': require('./function/partialRight'), - 'rearg': require('./function/rearg'), - 'restParam': require('./function/restParam'), - 'spread': require('./function/spread'), - 'throttle': require('./function/throttle'), - 'wrap': require('./function/wrap') -}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/after.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/after.js deleted file mode 100644 index e6a5de407a75df..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/after.js +++ /dev/null @@ -1,48 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = global.isFinite; - -/** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it is called `n` or more times. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => logs 'done saving!' after the two async saves have completed - */ -function after(n, func) { - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - n = nativeIsFinite(n = +n) ? n : 0; - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} - -module.exports = after; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/ary.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/ary.js deleted file mode 100644 index 1bcb6a720d3904..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/ary.js +++ /dev/null @@ -1,34 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** Used to compose bitmasks for wrapper metadata. */ -var ARY_FLAG = 128; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that accepts up to `n` arguments ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ -function ary(func, n, guard) { - if (guard && isIterateeCall(func, n, guard)) { - n = null; - } - n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); - return createWrapper(func, ARY_FLAG, null, null, null, null, n); -} - -module.exports = ary; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/before.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/before.js deleted file mode 100644 index 4afd1e60af1298..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/before.js +++ /dev/null @@ -1,42 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery('#add').on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = null; - } - return result; - }; -} - -module.exports = before; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/debounce.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/debounce.js deleted file mode 100644 index 5df81e71a6059f..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/debounce.js +++ /dev/null @@ -1,187 +0,0 @@ -var isObject = require('../lang/isObject'), - now = require('../date/now'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the debounced function return the result of the last - * `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=false] Specify invoking on the leading - * edge of the timeout. - * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it is invoked. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // avoid costly calculations while the window size is in flux - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // invoke `sendMail` when the click event is fired, debouncing subsequent calls - * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // ensure `batchLog` is invoked once after 1 second of debounced calls - * var source = new EventSource('/stream'); - * jQuery(source).on('message', _.debounce(batchLog, 250, { - * 'maxWait': 1000 - * })); - * - * // cancel a debounced call - * var todoChanges = _.debounce(batchLog, 1000); - * Object.observe(models.todo, todoChanges); - * - * Object.observe(models, function(changes) { - * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { - * todoChanges.cancel(); - * } - * }, ['delete']); - * - * // ...at some point `models.todo` is changed - * models.todo.completed = true; - * - * // ...before 1 second has passed `models.todo` is deleted - * // which cancels the debounced `todoChanges` call - * delete models.todo; - */ -function debounce(func, wait, options) { - var args, - maxTimeoutId, - result, - stamp, - thisArg, - timeoutId, - trailingCall, - lastCalled = 0, - maxWait = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = wait < 0 ? 0 : (+wait || 0); - if (options === true) { - var leading = true; - trailing = false; - } else if (isObject(options)) { - leading = options.leading; - maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? options.trailing : trailing; - } - - function cancel() { - if (timeoutId) { - clearTimeout(timeoutId); - } - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - } - - function delayed() { - var remaining = wait - (now() - stamp); - if (remaining <= 0 || remaining > wait) { - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - var isCalled = trailingCall; - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } else { - timeoutId = setTimeout(delayed, remaining); - } - } - - function maxDelayed() { - if (timeoutId) { - clearTimeout(timeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (trailing || (maxWait !== wait)) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } - - function debounced() { - args = arguments; - stamp = now(); - thisArg = this; - trailingCall = trailing && (timeoutId || !leading); - - if (maxWait === false) { - var leadingCall = leading && !timeoutId; - } else { - if (!maxTimeoutId && !leading) { - lastCalled = stamp; - } - var remaining = maxWait - (stamp - lastCalled), - isCalled = remaining <= 0 || remaining > maxWait; - - if (isCalled) { - if (maxTimeoutId) { - maxTimeoutId = clearTimeout(maxTimeoutId); - } - lastCalled = stamp; - result = func.apply(thisArg, args); - } - else if (!maxTimeoutId) { - maxTimeoutId = setTimeout(maxDelayed, remaining); - } - } - if (isCalled && timeoutId) { - timeoutId = clearTimeout(timeoutId); - } - else if (!timeoutId && wait !== maxWait) { - timeoutId = setTimeout(delayed, wait); - } - if (leadingCall) { - isCalled = true; - result = func.apply(thisArg, args); - } - if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - return result; - } - debounced.cancel = cancel; - return debounced; -} - -module.exports = debounce; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/defer.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/defer.js deleted file mode 100644 index 369790ce64fcc6..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/defer.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseDelay = require('../internal/baseDelay'), - restParam = require('./restParam'); - -/** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // logs 'deferred' after one or more milliseconds - */ -var defer = restParam(function(func, args) { - return baseDelay(func, 1, args); -}); - -module.exports = defer; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/delay.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/delay.js deleted file mode 100644 index 955b059e7fa2cf..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/delay.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseDelay = require('../internal/baseDelay'), - restParam = require('./restParam'); - -/** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => logs 'later' after one second - */ -var delay = restParam(function(func, wait, args) { - return baseDelay(func, wait, args); -}); - -module.exports = delay; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/memoize.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/memoize.js deleted file mode 100644 index 1088e4be656113..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/memoize.js +++ /dev/null @@ -1,80 +0,0 @@ -var MapCache = require('../internal/MapCache'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; -} - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -module.exports = memoize; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/rearg.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/rearg.js deleted file mode 100644 index 0a4bf8fa6d65ed..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/rearg.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - createWrapper = require('../internal/createWrapper'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var REARG_FLAG = 256; - -/** - * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes, - * specified as individual indexes or arrays of indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, 2, 0, 1); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - * - * var map = _.rearg(_.map, [1, 0]); - * map(function(n) { - * return n * 3; - * }, [1, 2, 3]); - * // => [3, 6, 9] - */ -var rearg = restParam(function(func, indexes) { - return createWrapper(func, REARG_FLAG, null, null, null, baseFlatten(indexes)); -}); - -module.exports = rearg; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/restParam.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/restParam.js deleted file mode 100644 index 3a1c15707c748a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/restParam.js +++ /dev/null @@ -1,58 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/spread.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/spread.js deleted file mode 100644 index aad4b7147f2350..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/spread.js +++ /dev/null @@ -1,44 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func` with the `this` binding of the created - * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). - * - * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to spread arguments over. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * // with a Promise - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ -function spread(func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function(array) { - return func.apply(this, array); - }; -} - -module.exports = spread; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/throttle.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/throttle.js deleted file mode 100644 index 5e8f0ef5611145..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/throttle.js +++ /dev/null @@ -1,72 +0,0 @@ -var debounce = require('./debounce'), - isObject = require('../lang/isObject'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as an internal `_.debounce` options object by `_.throttle`. */ -var debounceOptions = { - 'leading': false, - 'maxWait': 0, - 'trailing': false -}; - -/** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed invocations. Provide an options object to indicate - * that `func` should be invoked on the leading and/or trailing edge of the - * `wait` timeout. Subsequent calls to the throttled function return the - * result of the last `func` call. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=true] Specify invoking on the leading - * edge of the timeout. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // avoid excessively updating the position while scrolling - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes - * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { - * 'trailing': false - * })); - * - * // cancel a trailing throttled call - * jQuery(window).on('popstate', throttled.cancel); - */ -function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (options === false) { - leading = false; - } else if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - debounceOptions.leading = leading; - debounceOptions.maxWait = +wait; - debounceOptions.trailing = trailing; - return debounce(func, wait, debounceOptions); -} - -module.exports = throttle; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/wrap.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/function/wrap.js deleted file mode 100644 index 68b09af23862a4..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/wrap.js +++ /dev/null @@ -1,33 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - identity = require('../utility/identity'); - -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_FLAG = 32; - -/** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {*} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

' + func(text) + '

'; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

fred, barney, & pebbles

' - */ -function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return createWrapper(wrapper, PARTIAL_FLAG, null, [value], []); -} - -module.exports = wrap; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/index.js b/tools/eslint/node_modules/inquirer/node_modules/lodash/index.js deleted file mode 100644 index deb66539d440b9..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/lodash/index.js +++ /dev/null @@ -1,12235 +0,0 @@ -/** - * @license - * lodash 3.9.3 (Custom Build) - * Build: `lodash modern -d -o ./index.js` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '3.9.3'; - - /** Used to compose bitmasks for wrapper metadata. */ - var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 128, - REARG_FLAG = 256; - - /** Used as default options for `_.trunc`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; - - /** Used to detect when a function becomes hot. */ - var HOT_COUNT = 150, - HOT_SPAN = 16; - - /** Used to indicate the type of lazy iteratees. */ - var LAZY_DROP_WHILE_FLAG = 0, - LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2; - - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - - var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, - reUnescapedHtml = /[&<>"'`]/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; - - /** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ - var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); - - /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ - var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; - - /** Used to detect hexadecimal string values. */ - var reHasHexPrefix = /^0[xX]/; - - /** Used to detect host constructors (Safari > 5). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Used to detect unsigned integer values. */ - var reIsUint = /^\d+$/; - - /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ - var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; - - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; - - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - - /** Used to match words to create compound words. */ - var reWords = (function() { - var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', - lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; - - return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); - }()); - - /** Used to detect and test for whitespace. */ - var whitespace = ( - // Basic whitespace characters. - ' \t\x0b\f\xa0\ufeff' + - - // Line terminators. - '\n\r\u2028\u2029' + - - // Unicode category "Zs" space separators. - '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' - ); - - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', - 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'document', - 'isFinite', 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 'window' - ]; - - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; - - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dateTag] = typedArrayTags[errorTag] = - typedArrayTags[funcTag] = typedArrayTags[mapTag] = - typedArrayTags[numberTag] = typedArrayTags[objectTag] = - typedArrayTags[regexpTag] = typedArrayTags[setTag] = - typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = - cloneableTags[dateTag] = cloneableTags[float32Tag] = - cloneableTags[float64Tag] = cloneableTags[int8Tag] = - cloneableTags[int16Tag] = cloneableTags[int32Tag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[stringTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[mapTag] = cloneableTags[setTag] = - cloneableTags[weakMapTag] = false; - - /** Used as an internal `_.debounce` options object by `_.throttle`. */ - var debounceOptions = { - 'leading': false, - 'maxWait': 0, - 'trailing': false - }; - - /** Used to map latin-1 supplementary letters to basic latin letters. */ - var deburredLetters = { - '\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' - }; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'", - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /** Detect free variable `exports`. */ - var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; - - /** Detect free variable `self`. */ - var freeSelf = objectTypes[typeof self] && self && self.Object && self; - - /** Detect free variable `window`. */ - var freeWindow = objectTypes[typeof window] && window && window.Object && window; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; - - /*--------------------------------------------------------------------------*/ - - /** - * The base implementation of `compareAscending` which compares values and - * sorts them in ascending order without guaranteeing a stable sort. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function baseCompareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; - - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; - - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to search. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @private - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.isFunction` without support for environments - * with incorrect `typeof` results. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - */ - function baseIsFunction(value) { - // Avoid a Chakra JIT bug in compatibility modes of IE 11. - // See https://github.com/jashkenas/underscore/issues/1621 for more details. - return typeof value == 'function' || false; - } - - /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); - } - - /** - * Used by `_.trim` and `_.trimLeft` to get the index of the first character - * of `string` that is not found in `chars`. - * - * @private - * @param {string} string The string to inspect. - * @param {string} chars The characters to find. - * @returns {number} Returns the index of the first character not found in `chars`. - */ - function charsLeftIndex(string, chars) { - var index = -1, - length = string.length; - - while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimRight` to get the index of the last character - * of `string` that is not found in `chars`. - * - * @private - * @param {string} string The string to inspect. - * @param {string} chars The characters to find. - * @returns {number} Returns the index of the last character not found in `chars`. - */ - function charsRightIndex(string, chars) { - var index = string.length; - - while (index-- && chars.indexOf(string.charAt(index)) > -1) {} - return index; - } - - /** - * Used by `_.sortBy` to compare transformed elements of a collection and stable - * sort them in ascending order. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareAscending(object, other) { - return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); - } - - /** - * Used by `_.sortByOrder` to compare multiple properties of each element - * in a collection and stable sort them in the following order: - * - * If `orders` is unspecified, sort in ascending order for all properties. - * Otherwise, for each property, sort in ascending order if its corresponding value in - * orders is true, and descending order if false. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @param {boolean[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = baseCompareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - return result * (orders[index] ? 1 : -1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://code.google.com/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; - } - - /** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - function deburrLetter(letter) { - return deburredLetters[letter]; - } - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } - - /** - * Used by `_.template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } - - /** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ - function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; - } - - /** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; - } - - /** - * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a - * character code is whitespace. - * - * @private - * @param {number} charCode The character code to inspect. - * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. - */ - function isSpace(charCode) { - return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || - (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); - } - - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - if (array[index] === placeholder) { - array[index] = PLACEHOLDER; - result[++resIndex] = index; - } - } - return result; - } - - /** - * An implementation of `_.uniq` optimized for sorted arrays without support - * for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ - function sortedUniq(array, iteratee) { - var seen, - index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (!index || seen !== computed) { - seen = computed; - result[++resIndex] = value; - } - } - return result; - } - - /** - * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the first non-whitespace character. - */ - function trimmedLeftIndex(string) { - var index = -1, - length = string.length; - - while (++index < length && isSpace(string.charCodeAt(index))) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ - function trimmedRightIndex(string) { - var index = string.length; - - while (index-- && isSpace(string.charCodeAt(index))) {} - return index; - } - - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Create a new pristine `lodash` function using the given `context` object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // using `context` to mock `Date#getTime` use in `_.now` - * var mock = _.runInContext({ - * 'Date': function() { - * return { 'getTime': getTimeMock }; - * } - * }); - * - * // or creating a suped-up `defer` in Node.js - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - function runInContext(context) { - // Avoid issues with some ES3 environments that attempt to use values, named - // after built-in constructors like `Object`, for the creation of literals. - // ES5 clears this up by stating that literals must use built-in constructors. - // See https://es5.github.io/#x11.1.5 for more details. - context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; - - /** Native constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Number = context.Number, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; - - /** Used for native method references. */ - var arrayProto = Array.prototype, - objectProto = Object.prototype, - stringProto = String.prototype; - - /** Used to detect DOM support. */ - var document = (document = context.window) ? document.document : null; - - /** Used to resolve the decompiled source of functions. */ - var fnToString = Function.prototype.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = context._; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - escapeRegExp(fnToString.call(hasOwnProperty)) - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); - - /** Native method references. */ - var ArrayBuffer = getNative(context, 'ArrayBuffer'), - bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'), - ceil = Math.ceil, - clearTimeout = context.clearTimeout, - floor = Math.floor, - getPrototypeOf = getNative(Object, 'getPrototypeOf'), - parseFloat = context.parseFloat, - push = arrayProto.push, - Set = getNative(context, 'Set'), - setTimeout = context.setTimeout, - splice = arrayProto.splice, - Uint8Array = getNative(context, 'Uint8Array'), - WeakMap = getNative(context, 'WeakMap'); - - /** Used to clone array buffers. */ - var Float64Array = (function() { - // Safari 5 errors when using an array buffer to initialize a typed array - // where the array buffer's `byteLength` is not a multiple of the typed - // array's `BYTES_PER_ELEMENT`. - try { - var func = getNative(context, 'Float64Array'), - result = new func(new ArrayBuffer(10), 0, 1) && func; - } catch(e) {} - return result || null; - }()); - - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeCreate = getNative(Object, 'create'), - nativeIsArray = getNative(Array, 'isArray'), - nativeIsFinite = context.isFinite, - nativeKeys = getNative(Object, 'keys'), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = getNative(Date, 'now'), - nativeNumIsFinite = getNative(Number, 'isFinite'), - nativeParseInt = context.parseInt, - nativeRandom = Math.random; - - /** Used as references for `-Infinity` and `Infinity`. */ - var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, - POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - - /** Used as the size, in bytes, of each `Float64Array` element. */ - var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0; - - /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ - var MAX_SAFE_INTEGER = 9007199254740991; - - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; - - /** Used to lookup unminified function names. */ - var realNames = {}; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit chaining. - * Methods that operate on and return arrays, collections, and functions can - * be chained together. Methods that return a boolean or single value will - * automatically end the chain returning the unwrapped value. Explicit chaining - * may be enabled using `_.chain`. The execution of chained methods is lazy, - * that is, execution is deferred until `_#value` is implicitly or explicitly - * called. - * - * Lazy evaluation allows several methods to support shortcut fusion. Shortcut - * fusion is an optimization that merges iteratees to avoid creating intermediate - * arrays and reduce the number of iteratee executions. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, - * `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, - * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, - * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, - * and `where` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, - * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, - * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, - * `difference`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `fill`, - * `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`, - * `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`, - * `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, - * `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `method`, `methodOf`, `mixin`, `negate`, `omit`, `once`, - * `pairs`, `partial`, `partialRight`, `partition`, `pick`, `plant`, `pluck`, - * `property`, `propertyOf`, `pull`, `pullAt`, `push`, `range`, `rearg`, - * `reject`, `remove`, `rest`, `restParam`, `reverse`, `set`, `shuffle`, - * `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`, `spread`, - * `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, - * `thru`, `times`, `toArray`, `toPlainObject`, `transform`, `union`, `uniq`, - * `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `where`, `without`, - * `wrap`, `xor`, `zip`, `zipObject`, `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`, - * `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, - * `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `get`, - * `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, - * `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, - * `isFinite` `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, - * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, - * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lt`, `lte`, - * `max`, `min`, `noConflict`, `noop`, `now`, `pad`, `padLeft`, `padRight`, - * `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, - * `runInContext`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedLastIndex`, `startCase`, `startsWith`, `sum`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words` - * - * The wrapper method `sample` will return a wrapped value when `n` is provided, - * otherwise an unwrapped value is returned. - * - * @name _ - * @constructor - * @category Chain - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var wrapped = _([1, 2, 3]); - * - * // returns an unwrapped value - * wrapped.reduce(function(total, n) { - * return total + n; - * }); - * // => 6 - * - * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); - } - - /** - * The function whose prototype all chaining wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. - } - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable chaining for all wrapper methods. - * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. - */ - function LodashWrapper(value, chainAll, actions) { - this.__wrapped__ = value; - this.__actions__ = actions || []; - this.__chain__ = !!chainAll; - } - - /** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ - var support = lodash.support = {}; - - (function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if the DOM is supported. - * - * @memberOf _.support - * @type boolean - */ - try { - support.dom = document.createDocumentFragment().nodeType === 11; - } catch(e) { - support.dom = false; - } - }(1, 0)); - - /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB). Change the following template settings to use - * alternative delimiters. - * - * @static - * @memberOf _ - * @type Object - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': reEscape, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': reEvaluate, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': lodash - } - }; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @param {*} value The value to wrap. - */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = null; - this.__dir__ = 1; - this.__dropCount__ = 0; - this.__filtered__ = false; - this.__iteratees__ = null; - this.__takeCount__ = POSITIVE_INFINITY; - this.__views__ = null; - } - - /** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ - function lazyClone() { - var actions = this.__actions__, - iteratees = this.__iteratees__, - views = this.__views__, - result = new LazyWrapper(this.__wrapped__); - - result.__actions__ = actions ? arrayCopy(actions) : null; - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = iteratees ? arrayCopy(iteratees) : null; - result.__takeCount__ = this.__takeCount__; - result.__views__ = views ? arrayCopy(views) : null; - return result; - } - - /** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; - } - - /** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ - function lazyValue() { - var array = this.__wrapped__.value(); - if (!isArray(array)) { - return baseWrapperValue(array, this.__actions__); - } - var dir = this.__dir__, - isRight = dir < 0, - view = getView(0, array.length, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - takeCount = nativeMin(length, this.__takeCount__), - iteratees = this.__iteratees__, - iterLength = iteratees ? iteratees.length : 0, - resIndex = 0, - result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type; - - if (type == LAZY_DROP_WHILE_FLAG) { - if (data.done && (isRight ? (index > data.index) : (index < data.index))) { - data.count = 0; - data.done = false; - } - data.index = index; - if (!data.done) { - var limit = data.limit; - if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) { - continue outer; - } - } - } else { - var computed = iteratee(value); - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - } - result[resIndex++] = value; - } - return result; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a cache object to store key/value pairs. - * - * @private - * @static - * @name Cache - * @memberOf _.memoize - */ - function MapCache() { - this.__data__ = {}; - } - - /** - * Removes `key` and its value from the cache. - * - * @private - * @name delete - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. - */ - function mapDelete(key) { - return this.has(key) && delete this.__data__[key]; - } - - /** - * Gets the cached value for `key`. - * - * @private - * @name get - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to get. - * @returns {*} Returns the cached value. - */ - function mapGet(key) { - return key == '__proto__' ? undefined : this.__data__[key]; - } - - /** - * Checks if a cached value for `key` exists. - * - * @private - * @name has - * @memberOf _.memoize.Cache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapHas(key) { - return key != '__proto__' && hasOwnProperty.call(this.__data__, key); - } - - /** - * Sets `value` to `key` of the cache. - * - * @private - * @name set - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to cache. - * @param {*} value The value to cache. - * @returns {Object} Returns the cache object. - */ - function mapSet(key, value) { - if (key != '__proto__') { - this.__data__[key] = value; - } - return this; - } - - /*------------------------------------------------------------------------*/ - - /** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var length = values ? values.length : 0; - - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); - } - } - - /** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ - function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; - - return result ? 0 : -1; - } - - /** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ - function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; - } - } - - /*------------------------------------------------------------------------*/ - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function arrayCopy(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; - } - - /** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.forEachRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.every` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; - } - - /** - * A specialized version of `baseExtremum` for arrays which invokes `iteratee` - * with one argument: (value). - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {*} Returns the extremum value. - */ - function arrayExtremum(array, iteratee, comparator, exValue) { - var index = -1, - length = array.length, - computed = exValue, - result = computed; - - while (++index < length) { - var value = array[index], - current = +iteratee(value); - - if (comparator(current, computed)) { - computed = current; - result = value; - } - } - return result; - } - - /** - * A specialized version of `_.filter` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * A specialized version of `_.map` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - - /** - * A specialized version of `_.reduce` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the first element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initFromArray) { - var index = -1, - length = array.length; - - if (initFromArray && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - - /** - * A specialized version of `_.reduceRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the last element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initFromArray) { - var length = array.length; - if (initFromArray && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } - - /** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; - } - - /** - * A specialized version of `_.sum` for arrays without support for iteratees. - * - * @private - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - */ - function arraySum(array) { - var length = array.length, - result = 0; - - while (length--) { - result += +array[length] || 0; - } - return result; - } - - /** - * Used by `_.defaults` to customize its `_.assign` use. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @returns {*} Returns the value to assign to the destination object. - */ - function assignDefaults(objectValue, sourceValue) { - return objectValue === undefined ? sourceValue : objectValue; - } - - /** - * Used by `_.template` to customize its `_.assign` use. - * - * **Note:** This function is like `assignDefaults` except that it ignores - * inherited property values when checking if a property is `undefined`. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @param {string} key The key associated with the object and source values. - * @param {Object} object The destination object. - * @returns {*} Returns the value to assign to the destination object. - */ - function assignOwnDefaults(objectValue, sourceValue, key, object) { - return (objectValue === undefined || !hasOwnProperty.call(object, key)) - ? sourceValue - : objectValue; - } - - /** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - */ - function assignWith(object, source, customizer) { - var index = -1, - props = keys(source), - length = props.length; - - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); - - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; - } - } - return object; - } - - /** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); - } - - /** - * The base implementation of `_.at` without support for string collections - * and individual key arguments. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {number[]|string[]} props The property names or indexes of elements to pick. - * @returns {Array} Returns the new array of picked elements. - */ - function baseAt(collection, props) { - var index = -1, - isNil = collection == null, - isArr = !isNil && isArrayLike(collection), - length = isArr ? collection.length : 0, - propsLength = props.length, - result = Array(propsLength); - - while(++index < propsLength) { - var key = props[index]; - if (isArr) { - result[index] = isIndex(key, length) ? collection[key] : undefined; - } else { - result[index] = isNil ? undefined : collection[key]; - } - } - return result; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ - function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; - } - - /** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); - } - - /** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); - } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; - - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseAssign(result, value); - } - } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); - } - } - // Check for circular references and return corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(prototype) { - if (isObject(prototype)) { - object.prototype = prototype; - var result = new object; - object.prototype = null; - } - return result || {}; - }; - }()); - - /** - * The base implementation of `_.delay` and `_.defer` which accepts an index - * of where to slice the arguments to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments provide to `func`. - * @returns {number} Returns the timer id. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of `_.difference` which accepts a single array - * of values to exclude. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @returns {Array} Returns the new array of filtered values. - */ - function baseDifference(array, values) { - var length = array ? array.length : 0, - result = []; - - if (!length) { - return result; - } - var index = -1, - indexOf = getIndexOf(), - isCommon = indexOf == baseIndexOf, - cache = (isCommon && values.length >= 200) ? createCache(values) : null, - valuesLength = values.length; - - if (cache) { - indexOf = cacheIndexOf; - isCommon = false; - values = cache; - } - outer: - while (++index < length) { - var value = array[index]; - - if (isCommon && value === value) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === value) { - continue outer; - } - } - result.push(value); - } - else if (indexOf(values, value, 0) < 0) { - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.forEachRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); - - /** - * The base implementation of `_.every` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * Gets the extremum value of `collection` invoking `iteratee` for each value - * in `collection` to generate the criterion by which the value is ranked. - * The `iteratee` is invoked with three arguments: (value, index|key, collection). - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(collection, iteratee, comparator, exValue) { - var computed = exValue, - result = computed; - - baseEach(collection, function(value, index, collection) { - var current = +iteratee(value, index, collection); - if (comparator(current, computed) || (current === exValue && current === result)) { - computed = current; - result = value; - } - }); - return result; - } - - /** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ - function baseFill(array, value, start, end) { - var length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : (end >>> 0); - start >>>= 0; - - while (start < length) { - array[start++] = value; - } - return array; - } - - /** - * The base implementation of `_.filter` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, - * without support for callback shorthands and `this` binding, which iterates - * over `collection` using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, isDeep, isStrict) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (isObjectLike(value) && isArrayLike(value) && - (isStrict || isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - value = baseFlatten(value, isDeep, isStrict); - } - var valIndex = -1, - valLength = value.length; - - while (++valIndex < valLength) { - result[++resIndex] = value[valIndex]; - } - } else if (!isStrict) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); - - /** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); - } - - /** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.forOwnRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwnRight(object, iteratee) { - return baseForRight(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from those provided. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. - */ - function baseFunctions(object, props) { - var index = -1, - length = props.length, - resIndex = -1, - result = []; - - while (++index < length) { - var key = props[index]; - if (isFunction(object[key])) { - result[++resIndex] = key; - } - } - return result; - } - - /** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; - } - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[path[index++]]; - } - return (index && index == length) ? object : undefined; - } - - /** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; - } - - /** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = toObject(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { - return false; - } - } - } - return true; - } - - /** - * The base implementation of `_.map` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && (value !== undefined || (key in toObject(object))); - }; - } - return function(object) { - return baseIsMatch(object, matchData); - }; - } - - /** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ - function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); - - path = toPath(path); - return function(object) { - if (object == null) { - return false; - } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); - } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; - } - - /** - * The base implementation of `_.merge` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns `object`. - */ - function baseMerge(object, source, customizer, stackA, stackB) { - if (!isObject(object)) { - return object; - } - var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), - props = isSrcArr ? null : keys(source); - - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObjectLike(srcValue)) { - stackA || (stackA = []); - stackB || (stackB = []); - baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); - } - else { - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - } - if ((result !== undefined || (isSrcArr && !(key in object))) && - (isCommon || (result === result ? (result !== value) : (value === value)))) { - object[key] = result; - } - } - }); - return object; - } - - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { - var length = stackA.length, - srcValue = source[key]; - - while (length--) { - if (stackA[length] == srcValue) { - object[key] = stackB[length]; - return; - } - } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { - result = isArray(value) - ? value - : (isArrayLike(value) ? arrayCopy(value) : []); - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - result = isArguments(value) - ? toPlainObject(value) - : (isPlainObject(value) ? value : {}); - } - else { - isCommon = false; - } - } - // Add the source value to the stack of traversed objects and associate - // it with its merged value. - stackA.push(srcValue); - stackB.push(result); - - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? (result !== value) : (value === value)) { - object[key] = result; - } - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - */ - function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; - } - - /** - * The base implementation of `_.pullAt` without support for individual - * index arguments and capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0; - while (length--) { - var index = indexes[length]; - if (index != previous && isIndex(index)) { - var previous = index; - splice.call(array, index, 1); - } - } - return array; - } - - /** - * The base implementation of `_.random` without support for argument juggling - * and returning floating-point numbers. - * - * @private - * @param {number} min The minimum possible value. - * @param {number} max The maximum possible value. - * @returns {number} Returns the random number. - */ - function baseRandom(min, max) { - return min + floor(nativeRandom() * (max - min + 1)); - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight` without support - * for callback shorthands and `this` binding, which iterates over `collection` - * using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initFromCollection Specify using the first or last element - * of `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initFromCollection - ? (initFromCollection = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `setData` without support for hot loop detection. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * The base implementation of `_.some` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } - - /** - * The base implementation of `_.sortByOrder` without param guards. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ - function baseSortByOrder(collection, iteratees, orders) { - var callback = getCallback(), - index = -1; - - iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); - - var result = baseMap(collection, function(value) { - var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } - - /** - * The base implementation of `_.sum` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(collection, iteratee) { - var result = 0; - baseEach(collection, function(value, index, collection) { - result += +iteratee(value, index, collection) || 0; - }); - return result; - } - - /** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ - function baseUniq(array, iteratee) { - var index = -1, - indexOf = getIndexOf(), - length = array.length, - isCommon = indexOf == baseIndexOf, - isLarge = isCommon && length >= 200, - seen = isLarge ? createCache() : null, - result = []; - - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; - } - - /** - * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, - * and `_.takeWhile` without support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to peform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - var index = -1, - length = actions.length; - - while (++index < length) { - var args = [result], - action = actions[index]; - - push.apply(args, action.args); - result = action.func.apply(action.thisArg, args); - } - return result; - } - - /** - * Performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function binaryIndex(array, value, retHighest) { - var low = 0, - high = array ? array.length : low; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return binaryIndexBy(array, value, identity, retHighest); - } - - /** - * This function is like `binaryIndex` except that it invokes `iteratee` for - * `value` and each element of `array` to compute their sort ranking. The - * iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The function invoked per iteration. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function binaryIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - - var low = 0, - high = array ? array.length : 0, - valIsNaN = value !== value, - valIsNull = value === null, - valIsUndef = value === undefined; - - while (low < high) { - var mid = floor((low + high) / 2), - computed = iteratee(array[mid]), - isDef = computed !== undefined, - isReflexive = computed === computed; - - if (valIsNaN) { - var setLow = isReflexive || retHighest; - } else if (valIsNull) { - setLow = isReflexive && isDef && (retHighest || computed != null); - } else if (valIsUndef) { - setLow = isReflexive && (retHighest || isDef); - } else if (computed == null) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } - - /** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; - } - - /** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ - function bufferClone(buffer) { - return bufferSlice.call(buffer, 0); - } - if (!bufferSlice) { - // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`. - bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) { - var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, - offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, - result = new ArrayBuffer(byteLength); - - if (floatLength) { - var view = new Float64Array(result, 0, floatLength); - view.set(new Float64Array(buffer, 0, floatLength)); - } - if (byteLength != offset) { - view = new Uint8Array(result, offset); - view.set(new Uint8Array(buffer, offset)); - } - return result; - }; - } - - /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgs(args, partials, holders) { - var holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - leftIndex = -1, - leftLength = partials.length, - result = Array(argsLength + leftLength); - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - while (argsLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; - } - - /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgsRight(args, partials, holders) { - var holdersIndex = -1, - holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - rightIndex = -1, - rightLength = partials.length, - result = Array(argsLength + rightLength); - - while (++argsIndex < argsLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - return result; - } - - /** - * Creates a function that aggregates a collection, creating an accumulator - * object composed from the results of running each element in the collection - * through an iteratee. - * - * **Note:** This function is used to create `_.countBy`, `_.groupBy`, `_.indexBy`, - * and `_.partition`. - * - * @private - * @param {Function} setter The function to set keys and values of the accumulator object. - * @param {Function} [initializer] The function to initialize the accumulator object. - * @returns {Function} Returns the new aggregator function. - */ - function createAggregator(setter, initializer) { - return function(collection, iteratee, thisArg) { - var result = initializer ? initializer() : {}; - iteratee = getCallback(iteratee, thisArg, 3); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - setter(result, value, iteratee(value, index, collection), collection); - } - } else { - baseEach(collection, function(value, key, collection) { - setter(result, value, iteratee(value, key, collection), collection); - }); - } - return result; - }; - } - - /** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; - - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that wraps `func` and invokes it with the `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new bound function. - */ - function createBindWrapper(func, thisArg) { - var Ctor = createCtorWrapper(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(thisArg, arguments); - } - return wrapper; - } - - /** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ - var createCache = !(nativeCreate && Set) ? constant(null) : function(values) { - return new SetCache(values); - }; - - /** - * Creates a function that produces compound words out of the words in a - * given string. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ - function createCompounder(callback) { - return function(string) { - var index = -1, - array = words(deburr(string)), - length = array.length, - result = ''; - - while (++index < length) { - result = callback(result, array[index], index); - } - return result; - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtorWrapper(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. - // See https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a `_.curry` or `_.curryRight` function. - * - * @private - * @param {boolean} flag The curry bit flag. - * @returns {Function} Returns the new curry function. - */ - function createCurry(flag) { - function curryFunc(func, arity, guard) { - if (guard && isIterateeCall(func, arity, guard)) { - arity = null; - } - var result = createWrapper(func, flag, null, null, null, null, null, arity); - result.placeholder = curryFunc.placeholder; - return result; - } - return curryFunc; - } - - /** - * Creates a `_.max` or `_.min` function. - * - * @private - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {Function} Returns the new extremum function. - */ - function createExtremum(comparator, exValue) { - return function(collection, iteratee, thisArg) { - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - iteratee = getCallback(iteratee, thisArg, 3); - if (iteratee.length == 1) { - collection = toIterable(collection); - var result = arrayExtremum(collection, iteratee, comparator, exValue); - if (!(collection.length && result === exValue)) { - return result; - } - } - return baseExtremum(collection, iteratee, comparator, exValue); - }; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ - function createFind(eachFunc, fromRight) { - return function(collection, predicate, thisArg) { - predicate = getCallback(predicate, thisArg, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, fromRight); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, eachFunc); - }; - } - - /** - * Creates a `_.findIndex` or `_.findLastIndex` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ - function createFindIndex(fromRight) { - return function(array, predicate, thisArg) { - if (!(array && array.length)) { - return -1; - } - predicate = getCallback(predicate, thisArg, 3); - return baseFindIndex(array, predicate, fromRight); - }; - } - - /** - * Creates a `_.findKey` or `_.findLastKey` function. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new find function. - */ - function createFindKey(objectFunc) { - return function(object, predicate, thisArg) { - predicate = getCallback(predicate, thisArg, 3); - return baseFind(object, predicate, objectFunc, true); - }; - } - - /** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ - function createFlow(fromRight) { - return function() { - var wrapper, - length = arguments.length, - index = fromRight ? length : -1, - leftIndex = 0, - funcs = Array(length); - - while ((fromRight ? index-- : ++index < length)) { - var func = funcs[leftIndex++] = arguments[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { - wrapper = new LodashWrapper([]); - } - } - index = wrapper ? -1 : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : null; - - if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); - } - } - return function() { - var args = arguments; - if (wrapper && args.length == 1 && isArray(args[0])) { - return wrapper.plant(args[0]).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : args[0]; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }; - } - - /** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ - function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; - } - - /** - * Creates a function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new each function. - */ - function createForIn(objectFunc) { - return function(object, iteratee, thisArg) { - if (typeof iteratee != 'function' || thisArg !== undefined) { - iteratee = bindCallback(iteratee, thisArg, 3); - } - return objectFunc(object, iteratee, keysIn); - }; - } - - /** - * Creates a function for `_.forOwn` or `_.forOwnRight`. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new each function. - */ - function createForOwn(objectFunc) { - return function(object, iteratee, thisArg) { - if (typeof iteratee != 'function' || thisArg !== undefined) { - iteratee = bindCallback(iteratee, thisArg, 3); - } - return objectFunc(object, iteratee); - }; - } - - /** - * Creates a function for `_.mapKeys` or `_.mapValues`. - * - * @private - * @param {boolean} [isMapKeys] Specify mapping keys instead of values. - * @returns {Function} Returns the new map function. - */ - function createObjectMapper(isMapKeys) { - return function(object, iteratee, thisArg) { - var result = {}; - iteratee = getCallback(iteratee, thisArg, 3); - - baseForOwn(object, function(value, key, object) { - var mapped = iteratee(value, key, object); - key = isMapKeys ? mapped : key; - value = isMapKeys ? value : mapped; - result[key] = value; - }); - return result; - }; - } - - /** - * Creates a function for `_.padLeft` or `_.padRight`. - * - * @private - * @param {boolean} [fromRight] Specify padding from the right. - * @returns {Function} Returns the new pad function. - */ - function createPadDir(fromRight) { - return function(string, length, chars) { - string = baseToString(string); - return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); - }; - } - - /** - * Creates a `_.partial` or `_.partialRight` function. - * - * @private - * @param {boolean} flag The partial bit flag. - * @returns {Function} Returns the new partial function. - */ - function createPartial(flag) { - var partialFunc = restParam(function(func, partials) { - var holders = replaceHolders(partials, partialFunc.placeholder); - return createWrapper(func, flag, null, partials, holders); - }); - return partialFunc; - } - - /** - * Creates a function for `_.reduce` or `_.reduceRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ - function createReduce(arrayFunc, eachFunc) { - return function(collection, iteratee, accumulator, thisArg) { - var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); - }; - } - - /** - * Creates a function that wraps `func` and invokes it with optional `this` - * binding of, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurry = bitmask & CURRY_FLAG, - isCurryBound = bitmask & CURRY_BOUND_FLAG, - isCurryRight = bitmask & CURRY_RIGHT_FLAG, - Ctor = isBindKey ? null : createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it to other functions. - var length = arguments.length, - index = length, - args = Array(length); - - while (index--) { - args[index] = arguments[index]; - } - if (partials) { - args = composeArgs(args, partials, holders); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight); - } - if (isCurry || isCurryRight) { - var placeholder = wrapper.placeholder, - argsHolders = replaceHolders(args, placeholder); - - length -= argsHolders.length; - if (length < arity) { - var newArgPos = argPos ? arrayCopy(argPos) : null, - newArity = nativeMax(arity - length, 0), - newsHolders = isCurry ? argsHolders : null, - newHoldersRight = isCurry ? null : argsHolders, - newPartials = isCurry ? args : null, - newPartialsRight = isCurry ? null : args; - - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); - - if (!isCurryBound) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); - } - var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], - result = createHybridWrapper.apply(undefined, newData); - - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return result; - } - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - if (argPos) { - args = reorder(args, argPos); - } - if (isAry && ary < args.length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(func); - } - return fn.apply(thisBinding, args); - } - return wrapper; - } - - /** - * Creates the padding required for `string` based on the given `length`. - * The `chars` string is truncated if the number of characters exceeds `length`. - * - * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the pad for `string`. - */ - function createPadding(string, length, chars) { - var strLength = string.length; - length = +length; - - if (strLength >= length || !nativeIsFinite(length)) { - return ''; - } - var padLength = length - strLength; - chars = chars == null ? ' ' : (chars + ''); - return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength); - } - - /** - * Creates a function that wraps `func` and invokes it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. - * - * @private - * @param {Function} func The function to partially apply arguments to. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to the new function. - * @returns {Function} Returns the new bound function. - */ - function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it `func`. - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(argsLength + leftLength); - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. - * - * @private - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {Function} Returns the new index function. - */ - function createSortedIndex(retHighest) { - return function(array, value, iteratee, thisArg) { - var callback = getCallback(iteratee); - return (iteratee == null && callback === baseCallback) - ? binaryIndex(array, value, retHighest) - : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); - }; - } - - /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); - partials = holders = null; - } - length -= (holders ? holders.length : 0); - if (bitmask & PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = null; - } - var data = isBindKey ? null : getData(func), - newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; - - if (data) { - mergeData(newData, data); - bitmask = newData[1]; - arity = newData[9]; - } - newData[9] = arity == null - ? (isBindKey ? 0 : func.length) - : (nativeMax(arity - length, 0) || 0); - - if (bitmask == BIND_FLAG) { - var result = createBindWrapper(newData[0], newData[2]); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { - result = createPartialWrapper.apply(undefined, newData); - } else { - result = createHybridWrapper.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setter(result, newData); - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; - - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} value The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag) { - switch (tag) { - case boolTag: - case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. - return +object == +other; - - case errorTag: - return object.name == other.name && object.message == other.message; - - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; - - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - return false; - } - } - return true; - } - - /** - * Gets the appropriate "callback" function. If the `_.callback` method is - * customized this function returns the custom method, otherwise it returns - * the `baseCallback` function. If arguments are provided the chosen function - * is invoked with them and its result is returned. - * - * @private - * @returns {Function} Returns the chosen function or its result. - */ - function getCallback(func, thisArg, argCount) { - var result = lodash.callback || callback; - result = result === callback ? baseCallback : result; - return argCount ? result(func, thisArg, argCount) : result; - } - - /** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; - - /** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ - function getFuncName(func) { - var result = func.name, - array = realNames[result], - length = array ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; - } - - /** - * Gets the appropriate "indexOf" function. If the `_.indexOf` method is - * customized this function returns the custom method, otherwise it returns - * the `baseIndexOf` function. If arguments are provided the chosen function - * is invoked with them and its result is returned. - * - * @private - * @returns {Function|number} Returns the chosen function or its result. - */ - function getIndexOf(collection, target, fromIndex) { - var result = lodash.indexOf || indexOf; - result = result === indexOf ? baseIndexOf : result; - return collection ? result(collection, target, fromIndex) : result; - } - - /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ - var getLength = baseProperty('length'); - - /** - * Gets the propery names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ - function getMatchData(object) { - var result = pairs(object), - length = result.length; - - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); - } - return result; - } - - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; - } - - /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} [transforms] The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ - function getView(start, end, transforms) { - var index = -1, - length = transforms ? transforms.length : 0; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; - } - - /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add array properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; - } - - /** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; - } - - /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; - } - - /** - * Invokes the method at `path` on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ - function invokePath(object, path, args) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - path = last(path); - } - var func = object == null ? object : object[path]; - return func == null ? undefined : func.apply(object, args); - } - - /** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ - function isArrayLike(value) { - return value != null && isLength(getLength(value)); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; - } - - /** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; - } - - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); - } - - /** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. - */ - function isLaziable(func) { - var funcName = getFuncName(func); - if (!(funcName in LazyWrapper.prototype)) { - return false; - } - var other = lodash[funcName]; - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ - function isStrictComparable(value) { - return value === value && !isObject(value); - } - - /** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers required to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` - * augment function arguments, making the order in which they are executed important, - * preventing the merging of metadata. However, we make an exception for a safe - * common case where curried functions have `_.ary` and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < ARY_FLAG; - - var isCombo = - (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || - (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || - (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = arrayCopy(value); - } - // Use source `ary` if it's smaller. - if (srcBitmask & ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; - } - - /** - * A specialized version of `_.pick` which picks `object` properties specified - * by `props`. - * - * @private - * @param {Object} object The source object. - * @param {string[]} props The property names to pick. - * @returns {Object} Returns the new object. - */ - function pickByArray(object, props) { - object = toObject(object); - - var index = -1, - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - return result; - } - - /** - * A specialized version of `_.pick` which picks `object` properties `predicate` - * returns truthy for. - * - * @private - * @param {Object} object The source object. - * @param {Function} predicate The function invoked per iteration. - * @returns {Object} Returns the new object. - */ - function pickByCallback(object, predicate) { - var result = {}; - baseForIn(object, function(value, key, object) { - if (predicate(value, key, object)) { - result[key] = value; - } - }); - return result; - } - - /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = arrayCopy(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - - /** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity function - * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; - }()); - - /** - * A fallback implementation of `_.isPlainObject` which checks if `value` - * is an object created by the `Object` constructor or has a `[[Prototype]]` - * of `null`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - */ - function shimIsPlainObject(value) { - var Ctor, - support = lodash.support; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag) || - (!hasOwnProperty.call(value, 'constructor') && - (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); - } - - /** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to an array-like object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array|Object} Returns the array-like object. - */ - function toIterable(value) { - if (value == null) { - return []; - } - if (!isArrayLike(value)) { - return values(value); - } - return isObject(value) ? value : Object(value); - } - - /** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ - function toObject(value) { - return isObject(value) ? value : Object(value); - } - - /** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ - function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - } - - /** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ - function wrapperClone(wrapper) { - return wrapper instanceof LazyWrapper - ? wrapper.clone() - : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements split into groups the length of `size`. - * If `collection` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new array containing chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ - function chunk(array, size, guard) { - if (guard ? isIterateeCall(array, size, guard) : size == null) { - size = 1; - } else { - size = nativeMax(+size || 1, 1); - } - var index = 0, - length = array ? array.length : 0, - resIndex = -1, - result = Array(ceil(length / size)); - - while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); - } - return result; - } - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The arrays of values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([1, 2, 3], [4, 2]); - * // => [1, 3] - */ - var difference = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, baseFlatten(values, false, true)) - : []; - }); - - /** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function drop(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function dropRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that match the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [1] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); - * // => ['barney'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function dropRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) - : []; - } - - /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [3] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropWhile(users, 'active', false), 'user'); - * // => ['pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function dropWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), true) - : []; - } - - /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8], '*', 1, 2); - * // => [4, '*', 8] - */ - function fill(array, value, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(chr) { - * return chr.user == 'barney'; - * }); - * // => 0 - * - * // using the `_.matches` callback shorthand - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // using the `_.matchesProperty` callback shorthand - * _.findIndex(users, 'active', false); - * // => 0 - * - * // using the `_.property` callback shorthand - * _.findIndex(users, 'active'); - * // => 2 - */ - var findIndex = createFindIndex(); - - /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(chr) { - * return chr.user == 'pebbles'; - * }); - * // => 2 - * - * // using the `_.matches` callback shorthand - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // using the `_.matchesProperty` callback shorthand - * _.findLastIndex(users, 'active', false); - * // => 2 - * - * // using the `_.property` callback shorthand - * _.findLastIndex(users, 'active'); - * // => 0 - */ - var findLastIndex = createFindIndex(true); - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @alias head - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.first([1, 2, 3]); - * // => 1 - * - * _.first([]); - * // => undefined - */ - function first(array) { - return array ? array[0] : undefined; - } - - /** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ - function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; - } - - /** - * Recursively flattens a nested array. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to recursively flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, 3, [4]]]); - * // => [1, 2, 3, 4] - */ - function flattenDeep(array) { - var length = array ? array.length : 0; - return length ? baseFlatten(array, true) : []; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=0] The index to search from or `true` - * to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - * - * // performing a binary search - * _.indexOf([1, 1, 2, 2], 2, true); - * // => 2 - */ - function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else if (fromIndex) { - var index = binaryIndex(array, value), - other = array[index]; - - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - return baseIndexOf(array, value, fromIndex || 0); - } - - /** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ - function initial(array) { - return dropRight(array, 1); - } - - /** - * Creates an array of unique values that are included in all of the provided - * arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. - * @example - * _.intersection([1, 2], [4, 2], [2, 1]); - * // => [2] - */ - var intersection = restParam(function(arrays) { - var othLength = arrays.length, - othIndex = othLength, - caches = Array(length), - indexOf = getIndexOf(), - isCommon = indexOf == baseIndexOf, - result = []; - - while (othIndex--) { - var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; - caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; - } - var array = arrays[0], - index = -1, - length = array ? array.length : 0, - seen = caches[0]; - - outer: - while (++index < length) { - value = array[index]; - if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { - var othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { - continue outer; - } - } - if (seen) { - seen.push(value); - } - result.push(value); - } - } - return result; - }); - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; - } - - /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=array.length-1] The index to search from - * or `true` to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // using `fromIndex` - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - * - * // performing a binary search - * _.lastIndexOf([1, 1, 2, 2], 2, true); - * // => 3 - */ - function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - var index = length; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; - } else if (fromIndex) { - index = binaryIndex(array, value, true) - 1; - var other = array[index]; - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Removes all provided values from `array` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ - function pull() { - var args = arguments, - array = args[0]; - - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = getIndexOf(), - length = args.length; - - while (++index < length) { - var fromIndex = 0, - value = args[index]; - - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; - } - - /** - * Removes elements from `array` corresponding to the given indexes and returns - * an array of the removed elements. Indexes may be specified as an array of - * indexes or as individual arguments. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove, - * specified as individual indexes or arrays of indexes. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); - * - * console.log(array); - * // => [5, 15] - * - * console.log(evens); - * // => [10, 20] - */ - var pullAt = restParam(function(array, indexes) { - indexes = baseFlatten(indexes); - - var result = baseAt(array, indexes); - basePullAt(array, indexes.sort(baseCompareAscending)); - return result; - }); - - /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * **Note:** Unlike `_.filter`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ - function remove(array, predicate, thisArg) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = getCallback(predicate, thisArg, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; - } - - /** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @alias tail - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.rest([1, 2, 3]); - * // => [2, 3] - */ - function rest(array) { - return drop(array, 1); - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of `Array#slice` to support node - * lists in IE < 9 and to ensure dense arrays are returned. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - return baseSlice(array, start, end); - } - - /** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. If an iteratee - * function is provided it is invoked for `value` and each element of `array` - * to compute their sort ranking. The iteratee is bound to `thisArg` and - * invoked with one argument; (value). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 4, 5, 5], 5); - * // => 2 - * - * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; - * - * // using an iteratee function - * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { - * return this.data[word]; - * }, dict); - * // => 1 - * - * // using the `_.property` callback shorthand - * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 1 - */ - var sortedIndex = createSortedIndex(); - - /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 4, 5, 5], 5); - * // => 4 - */ - var sortedLastIndex = createSortedIndex(true); - - /** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ - function take(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ - function takeRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is bound to `thisArg` - * and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [2, 3] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active'), 'user'); - * // => [] - */ - function takeRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) - : []; - } - - /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [1, 2] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false}, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeWhile(users, 'active', false), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeWhile(users, 'active'), 'user'); - * // => [] - */ - function takeWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3)) - : []; - } - - /** - * Creates an array of unique values, in order, from all of the provided arrays - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([1, 2], [4, 2], [2, 1]); - * // => [1, 2, 4] - */ - var union = restParam(function(arrays) { - return baseUniq(baseFlatten(arrays, false, true)); - }); - - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it is invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - var callback = getCallback(); - if (!(iteratee == null && callback === baseCallback)) { - iteratee = callback(iteratee, thisArg, 3); - } - return (isSorted && getIndexOf() == baseIndexOf) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); - } - - /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - * - * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] - */ - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var index = -1, - length = 0; - - array = arrayFilter(array, function(group) { - if (isArrayLike(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - var result = Array(length); - while (++index < length) { - result[index] = arrayMap(array, baseProperty(index)); - } - return result; - } - - /** - * This method is like `_.unzip` except that it accepts an iteratee to specify - * how regrouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee] The function to combine regrouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] - * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] - */ - function unzipWith(array, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - var result = unzip(array); - if (iteratee == null) { - return result; - } - iteratee = bindCallback(iteratee, thisArg, 4); - return arrayMap(result, function(group) { - return arrayReduce(group, iteratee, undefined, true); - }); - } - - /** - * Creates an array excluding all provided values using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to filter. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.without([1, 2, 1, 3], 1, 2); - * // => [3] - */ - var without = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, values) - : []; - }); - - /** - * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the provided arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xor([1, 2], [4, 2]); - * // => [1, 4] - */ - function xor() { - var index = -1, - length = arguments.length; - - while (++index < length) { - var array = arguments[index]; - if (isArrayLike(array)) { - var result = result - ? baseDifference(result, array).concat(baseDifference(array, result)) - : array; - } - } - return result ? baseUniq(result) : []; - } - - /** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements - * of the given arrays, and so on. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - */ - var zip = restParam(unzip); - - /** - * The inverse of `_.pairs`; this method returns an object composed from arrays - * of property names and values. Provide either a single two dimensional array, - * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names - * and one of corresponding values. - * - * @static - * @memberOf _ - * @alias object - * @category Array - * @param {Array} props The property names. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } - * - * _.zipObject(['fred', 'barney'], [30, 40]); - * // => { 'fred': 30, 'barney': 40 } - */ - function zipObject(props, values) { - var index = -1, - length = props ? props.length : 0, - result = {}; - - if (length && !values && !isArray(props[0])) { - values = []; - } - while (++index < length) { - var key = props[index]; - if (values) { - result[key] = values[index]; - } else if (key) { - result[key[0]] = key[1]; - } - } - return result; - } - - /** - * This method is like `_.zip` except that it accepts an iteratee to specify - * how grouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee] The function to combine grouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], _.add); - * // => [111, 222] - */ - var zipWith = restParam(function(arrays) { - var length = arrays.length, - iteratee = length > 2 ? arrays[length - 2] : undefined, - thisArg = length > 1 ? arrays[length - 1] : undefined; - - if (length > 2 && typeof iteratee == 'function') { - length -= 2; - } else { - iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; - thisArg = undefined; - } - arrays.length = length; - return unzipWith(arrays, iteratee, thisArg); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object that wraps `value` with explicit method - * chaining enabled. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _.chain(users) - * .sortBy('age') - * .map(function(chr) { - * return chr.user + ' is ' + chr.age; - * }) - * .first() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor is - * bound to `thisArg` and invoked with one argument; (value). The purpose of - * this method is to "tap into" a method chain in order to perform operations - * on intermediate results within the chain. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor, thisArg) { - interceptor.call(thisArg, value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor, thisArg) { - return interceptor.call(thisArg, value); - } - - /** - * Enables explicit method chaining on the wrapper object. - * - * @name chain - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // without explicit chaining - * _(users).first(); - * // => { 'user': 'barney', 'age': 36 } - * - * // with explicit chaining - * _(users).chain() - * .first() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chained sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapper = wrapper.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapper.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } - - /** - * Creates a clone of the chained sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).map(function(value) { - * return Math.pow(value, 2); - * }); - * - * var other = [3, 4]; - * var otherWrapper = wrapper.plant(other); - * - * otherWrapper.value(); - * // => [9, 16] - * - * wrapper.value(); - * // => [1, 4] - */ - function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; - } - - /** - * Reverses the wrapped array so the first element becomes the last, the - * second element becomes the second to last, and so on. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new reversed `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - if (this.__actions__.length) { - value = new LazyWrapper(this); - } - return new LodashWrapper(value.reverse(), this.__chain__); - } - return this.thru(function(value) { - return value.reverse(); - }); - } - - /** - * Produces the result of coercing the unwrapped value to a string. - * - * @name toString - * @memberOf _ - * @category Chain - * @returns {string} Returns the coerced string value. - * @example - * - * _([1, 2, 3]).toString(); - * // => '1,2,3' - */ - function wrapperToString() { - return (this.value() + ''); - } - - /** - * Executes the chained sequence to extract the unwrapped value. - * - * @name value - * @memberOf _ - * @alias run, toJSON, valueOf - * @category Chain - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements corresponding to the given keys, or indexes, - * of `collection`. Keys may be specified as individual arguments or as arrays - * of keys. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(number|number[]|string|string[])} [props] The property names - * or indexes of elements to pick, specified individually or in arrays. - * @returns {Array} Returns the new array of picked elements. - * @example - * - * _.at(['a', 'b', 'c'], [0, 2]); - * // => ['a', 'c'] - * - * _.at(['barney', 'fred', 'pebbles'], 0, 2); - * // => ['barney', 'pebbles'] - */ - var at = restParam(function(collection, props) { - return baseAt(collection, baseFlatten(props)); - }); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the number of times the key was returned by `iteratee`. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); - }); - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * The predicate is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = getCallback(predicate, thisArg, 3); - } - return func(collection, predicate); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias select - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.filter([4, 5, 6], function(n) { - * return n % 2 == 0; - * }); - * // => [4, 6] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.filter(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.filter(users, 'active'), 'user'); - * // => ['barney'] - */ - function filter(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getCallback(predicate, thisArg, 3); - return func(collection, predicate); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.result(_.find(users, function(chr) { - * return chr.age < 40; - * }), 'user'); - * // => 'barney' - * - * // using the `_.matches` callback shorthand - * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.result(_.find(users, 'active', false), 'user'); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.result(_.find(users, 'active'), 'user'); - * // => 'barney' - */ - var find = createFind(baseEach); - - /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ - var findLast = createFind(baseEachRight, true); - - /** - * Performs a deep comparison between each element in `collection` and the - * source object, returning the first element that has equivalent property - * values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); - * // => 'barney' - * - * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); - * // => 'fred' - */ - function findWhere(collection, source) { - return find(collection, baseMatches(source)); - } - - /** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ - var forEach = createForEach(arrayEach, baseEach); - - /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias eachRight - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEachRight(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from right to left and returns the array - */ - var forEachRight = createForEach(arrayEachRight, baseEachRight); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is an array of the elements responsible for generating the key. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using the `_.property` callback shorthand - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - result[key] = [value]; - } - }); - - /** - * Checks if `value` is in `collection` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ - function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (getIndexOf(collection, target, fromIndex) > -1); - } - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the last element responsible for generating the key. The - * iteratee function is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var keyData = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.indexBy(keyData, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return String.fromCharCode(object.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return this.fromCharCode(object.code); - * }, String); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - */ - var indexBy = createAggregator(function(result, value, key) { - result[key] = value; - }); - - /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it is - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - var invoke = restParam(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - isProp = isKey(path), - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : null); - result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); - }); - return result; - }); - - /** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, - * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, - * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, - * `sum`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = getCallback(iteratee, thisArg, 3); - return func(collection, iteratee); - } - - /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, while the second of which - * contains elements `predicate` returns falsey for. The predicate is bound - * to `thisArg` and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * _.partition([1, 2, 3], function(n) { - * return n % 2; - * }); - * // => [[1, 3], [2]] - * - * _.partition([1.2, 2.3, 3.4], function(n) { - * return this.floor(n) % 2; - * }, Math); - * // => [[1.2, 3.4], [2.3]] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * var mapper = function(array) { - * return _.pluck(array, 'user'); - * }; - * - * // using the `_.matches` callback shorthand - * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); - * // => [['pebbles'], ['barney', 'fred']] - * - * // using the `_.matchesProperty` callback shorthand - * _.map(_.partition(users, 'active', false), mapper); - * // => [['barney', 'pebbles'], ['fred']] - * - * // using the `_.property` callback shorthand - * _.map(_.partition(users, 'active'), mapper); - * // => [['fred'], ['barney', 'pebbles']] - */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); - - /** - * Gets the property value of `path` from all elements in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|string} path The path of the property to pluck. - * @returns {Array} Returns the property values. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * _.pluck(users, 'user'); - * // => ['barney', 'fred'] - * - * var userIndex = _.indexBy(users, 'user'); - * _.pluck(userIndex, 'age'); - * // => [36, 40] (iteration order is not guaranteed) - */ - function pluck(collection, path) { - return map(collection, property(path)); - } - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not provided the first element of `collection` is used as the initial - * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `includes`, `merge`, `sortByAll`, and `sortByOrder` - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.reduce([1, 2], function(total, n) { - * return total + n; - * }); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) - */ - var reduce = createReduce(arrayReduce, baseEach); - - /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - var reduceRight = createReduce(arrayReduceRight, baseEachRight); - - /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.reject([1, 2, 3, 4], function(n) { - * return n % 2 == 0; - * }); - * // => [1, 3] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.reject(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.reject(users, 'active'), 'user'); - * // => ['barney'] - */ - function reject(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getCallback(predicate, thisArg, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); - } - - /** - * Gets a random element or `n` random elements from a collection. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to sample. - * @param {number} [n] The number of elements to sample. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {*} Returns the random sample(s). - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - * - * _.sample([1, 2, 3, 4], 2); - * // => [3, 1] - */ - function sample(collection, n, guard) { - if (guard ? isIterateeCall(collection, n, guard) : n == null) { - collection = toIterable(collection); - var length = collection.length; - return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; - } - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - - n = nativeMin(n < 0 ? 0 : (+n || 0), length); - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; - } - result.length = n; - return result; - } - - /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ - function shuffle(collection) { - return sample(collection, POSITIVE_INFINITY); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the size of `collection`. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - var length = collection ? getLength(collection) : 0; - return isLength(length) ? length : keys(collection).length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = getCallback(predicate, thisArg, 3); - } - return func(collection, predicate); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; - } - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - var index = -1; - iteratee = getCallback(iteratee, thisArg, 3); - - var result = baseMap(collection, function(value, key, collection) { - return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; - }); - return baseSortBy(result, compareAscending); - } - - /** - * This method is like `_.sortBy` except that it can sort by multiple iteratees - * or property names. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees - * The iteratees to sort by, specified as individual values or arrays of values. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.map(_.sortByAll(users, ['user', 'age']), _.values); - * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] - * - * _.map(_.sortByAll(users, 'user', function(chr) { - * return Math.floor(chr.age / 10); - * }), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - var sortByAll = restParam(function(collection, iteratees) { - if (collection == null) { - return []; - } - var guard = iteratees[2]; - if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { - iteratees.length = 1; - } - return baseSortByOrder(collection, baseFlatten(iteratees), []); - }); - - /** - * This method is like `_.sortByAll` except that it allows specifying the - * sort orders of the iteratees to sort by. A truthy value in `orders` will - * sort the corresponding property name in ascending order while a falsey - * value will sort it in descending order. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - function sortByOrder(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (guard && isIterateeCall(iteratees, orders, guard)) { - orders = null; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseSortByOrder(collection, iteratees, orders); - } - - /** - * Performs a deep comparison between each element in `collection` and the - * source object, returning an array of all elements that have equivalent - * property values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {Array} Returns the new filtered array. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, - * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } - * ]; - * - * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); - * // => ['barney'] - * - * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); - * // => ['fred'] - */ - function where(collection, source) { - return filter(collection, baseMatches(source)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Gets the number of milliseconds that have elapsed since the Unix epoch - * (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @category Date - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => logs the number of milliseconds it took for the deferred function to be invoked - */ - var now = nativeNow || function() { - return new Date().getTime(); - }; - - /*------------------------------------------------------------------------*/ - - /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it is called `n` or more times. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => logs 'done saving!' after the two async saves have completed - */ - function after(n, func) { - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - n = nativeIsFinite(n = +n) ? n : 0; - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that accepts up to `n` arguments ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ - function ary(func, n, guard) { - if (guard && isIterateeCall(func, n, guard)) { - n = null; - } - n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); - return createWrapper(func, ARY_FLAG, null, null, null, null, n); - } - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery('#add').on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = null; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind` this method does not set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var greet = function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * }; - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // using placeholders - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = restParam(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(func, bitmask, thisArg, partials, holders); - }); - - /** - * Binds methods of an object to the object itself, overwriting the existing - * method. Method names may be specified as individual arguments or as arrays - * of method names. If no method names are provided all enumerable function - * properties, own and inherited, of `object` are bound. - * - * **Note:** This method does not set the "length" property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} [methodNames] The object method names to bind, - * specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'onClick': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view); - * jQuery('#docs').on('click', view.onClick); - * // => logs 'clicked docs' when the element is clicked - */ - var bindAll = restParam(function(object, methodNames) { - methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); - - var index = -1, - length = methodNames.length; - - while (++index < length) { - var key = methodNames[index]; - object[key] = createWrapper(object[key], BIND_FLAG, object); - } - return object; - }); - - /** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. - * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object the method belongs to. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // using placeholders - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ - var bindKey = restParam(function(object, key, partials) { - var bitmask = BIND_FLAG | BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bindKey.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(key, bitmask, object, partials, holders); - }); - - /** - * Creates a function that accepts one or more arguments of `func` that when - * called either invokes `func` returning its result, if all `func` arguments - * have been provided, or returns a function that accepts one or more of the - * remaining `func` arguments, and so on. The arity of `func` may be specified - * if `func.length` is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ - var curry = createCurry(CURRY_FLAG); - - /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ - var curryRight = createCurry(CURRY_RIGHT_FLAG); - - /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the debounced function return the result of the last - * `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=false] Specify invoking on the leading - * edge of the timeout. - * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it is invoked. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // avoid costly calculations while the window size is in flux - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // invoke `sendMail` when the click event is fired, debouncing subsequent calls - * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // ensure `batchLog` is invoked once after 1 second of debounced calls - * var source = new EventSource('/stream'); - * jQuery(source).on('message', _.debounce(batchLog, 250, { - * 'maxWait': 1000 - * })); - * - * // cancel a debounced call - * var todoChanges = _.debounce(batchLog, 1000); - * Object.observe(models.todo, todoChanges); - * - * Object.observe(models, function(changes) { - * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { - * todoChanges.cancel(); - * } - * }, ['delete']); - * - * // ...at some point `models.todo` is changed - * models.todo.completed = true; - * - * // ...before 1 second has passed `models.todo` is deleted - * // which cancels the debounced `todoChanges` call - * delete models.todo; - */ - function debounce(func, wait, options) { - var args, - maxTimeoutId, - result, - stamp, - thisArg, - timeoutId, - trailingCall, - lastCalled = 0, - maxWait = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = wait < 0 ? 0 : (+wait || 0); - if (options === true) { - var leading = true; - trailing = false; - } else if (isObject(options)) { - leading = options.leading; - maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? options.trailing : trailing; - } - - function cancel() { - if (timeoutId) { - clearTimeout(timeoutId); - } - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - } - - function delayed() { - var remaining = wait - (now() - stamp); - if (remaining <= 0 || remaining > wait) { - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - var isCalled = trailingCall; - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } else { - timeoutId = setTimeout(delayed, remaining); - } - } - - function maxDelayed() { - if (timeoutId) { - clearTimeout(timeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (trailing || (maxWait !== wait)) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } - - function debounced() { - args = arguments; - stamp = now(); - thisArg = this; - trailingCall = trailing && (timeoutId || !leading); - - if (maxWait === false) { - var leadingCall = leading && !timeoutId; - } else { - if (!maxTimeoutId && !leading) { - lastCalled = stamp; - } - var remaining = maxWait - (stamp - lastCalled), - isCalled = remaining <= 0 || remaining > maxWait; - - if (isCalled) { - if (maxTimeoutId) { - maxTimeoutId = clearTimeout(maxTimeoutId); - } - lastCalled = stamp; - result = func.apply(thisArg, args); - } - else if (!maxTimeoutId) { - maxTimeoutId = setTimeout(maxDelayed, remaining); - } - } - if (isCalled && timeoutId) { - timeoutId = clearTimeout(timeoutId); - } - else if (!timeoutId && wait !== maxWait) { - timeoutId = setTimeout(delayed, wait); - } - if (leadingCall) { - isCalled = true; - result = func.apply(thisArg, args); - } - if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - return result; - } - debounced.cancel = cancel; - return debounced; - } - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // logs 'deferred' after one or more milliseconds - */ - var defer = restParam(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => logs 'later' after one second - */ - var delay = restParam(function(func, wait, args) { - return baseDelay(func, wait, args); - }); - - /** - * Creates a function that returns the result of invoking the provided - * functions with the `this` binding of the created function, where each - * successive invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow(_.add, square); - * addSquare(1, 2); - * // => 9 - */ - var flow = createFlow(); - - /** - * This method is like `_.flow` except that it creates a function that - * invokes the provided functions from right to left. - * - * @static - * @memberOf _ - * @alias backflow, compose - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight(square, _.add); - * addSquare(1, 2); - * // => 9 - */ - var flowRight = createFlow(true); - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; - } - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - return !predicate.apply(this, arguments); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first call. The `func` is invoked - * with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` invokes `createApplication` once - */ - function once(func) { - return before(2, func); - } - - /** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // using placeholders - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ - var partial = createPartial(PARTIAL_FLAG); - - /** - * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // using placeholders - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ - var partialRight = createPartial(PARTIAL_RIGHT_FLAG); - - /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes, - * specified as individual indexes or arrays of indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, 2, 0, 1); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - * - * var map = _.rearg(_.map, [1, 0]); - * map(function(n) { - * return n * 3; - * }, [1, 2, 3]); - * // => [3, 6, 9] - */ - var rearg = restParam(function(func, indexes) { - return createWrapper(func, REARG_FLAG, null, null, null, baseFlatten(indexes)); - }); - - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of the created - * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). - * - * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to spread arguments over. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * // with a Promise - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ - function spread(func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function(array) { - return func.apply(this, array); - }; - } - - /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed invocations. Provide an options object to indicate - * that `func` should be invoked on the leading and/or trailing edge of the - * `wait` timeout. Subsequent calls to the throttled function return the - * result of the last `func` call. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=true] Specify invoking on the leading - * edge of the timeout. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // avoid excessively updating the position while scrolling - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes - * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { - * 'trailing': false - * })); - * - * // cancel a trailing throttled call - * jQuery(window).on('popstate', throttled.cancel); - */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (options === false) { - leading = false; - } else if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - debounceOptions.leading = leading; - debounceOptions.maxWait = +wait; - debounceOptions.trailing = trailing; - return debounce(func, wait, debounceOptions); - } - - /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {*} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

' + func(text) + '

'; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

fred, barney, & pebbles

' - */ - function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return createWrapper(wrapper, PARTIAL_FLAG, null, [value], []); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, - * otherwise they are assigned by reference. If `customizer` is provided it is - * invoked to produce the cloned values. If `customizer` returns `undefined` - * cloning is handled by the method instead. The `customizer` is bound to - * `thisArg` and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var shallow = _.clone(users); - * shallow[0] === users[0]; - * // => true - * - * var deep = _.clone(users, true); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.clone(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 0 - */ - function clone(value, isDeep, customizer, thisArg) { - if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { - isDeep = false; - } - else if (typeof isDeep == 'function') { - thisArg = customizer; - customizer = isDeep; - isDeep = false; - } - return typeof customizer == 'function' - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) - : baseClone(value, isDeep); - } - - /** - * Creates a deep clone of `value`. If `customizer` is provided it is invoked - * to produce the cloned values. If `customizer` returns `undefined` cloning - * is handled by the method instead. The `customizer` is bound to `thisArg` - * and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the deep cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var deep = _.cloneDeep(users); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.cloneDeep(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 20 - */ - function cloneDeep(value, customizer, thisArg) { - return typeof customizer == 'function' - ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) - : baseClone(value, true); - } - - /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - function gt(value, other) { - return value > other; - } - - /** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ - function gte(value, other) { - return value >= other; - } - - /** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag; - } - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ - var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; - }; - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); - } - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - function isDate(value) { - return isObjectLike(value) && objToString.call(value) == dateTag; - } - - /** - * Checks if `value` is a DOM element. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ - function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && - (objToString.call(value).indexOf('Element') > -1); - } - // Fallback for environments without DOM support. - if (!support.dom) { - isElement = function(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); - }; - } - - /** - * Checks if `value` is empty. A value is considered empty unless it is an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !value.length; - } - return !keys(value).length; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. If `customizer` is provided it is invoked to compare values. - * If `customizer` returns `undefined` comparisons are handled by the method - * instead. The `customizer` is bound to `thisArg` and invoked with three - * arguments: (value, other [, index|key]). - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. Functions and DOM nodes - * are **not** supported. Provide a customizer function to extend support - * for comparing other values. - * - * @static - * @memberOf _ - * @alias eq - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize value comparisons. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * object == other; - * // => false - * - * _.isEqual(object, other); - * // => true - * - * // using a customizer callback - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqual(array, other, function(value, other) { - * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { - * return true; - * } - * }); - * // => true - */ - function isEqual(value, other, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; - } - - /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ - function isError(value) { - return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on [`Number.isFinite`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(10); - * // => true - * - * _.isFinite('10'); - * // => false - * - * _.isFinite(true); - * // => false - * - * _.isFinite(Object(10)); - * // => false - * - * _.isFinite(Infinity); - * // => false - */ - var isFinite = nativeNumIsFinite || function(value) { - return typeof value == 'number' && nativeIsFinite(value); - }; - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return objToString.call(value) == funcTag; - }; - - /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); - } - - /** - * Performs a deep comparison between `object` and `source` to determine if - * `object` contains equivalent property values. If `customizer` is provided - * it is invoked to compare values. If `customizer` returns `undefined` - * comparisons are handled by the method instead. The `customizer` is bound - * to `thisArg` and invoked with three arguments: (value, other, index|key). - * - * **Note:** This method supports comparing properties of arrays, booleans, - * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions - * and DOM nodes are **not** supported. Provide a customizer function to extend - * support for comparing other values. - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize value comparisons. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.isMatch(object, { 'age': 40 }); - * // => true - * - * _.isMatch(object, { 'age': 36 }); - * // => false - * - * // using a customizer callback - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatch(object, source, function(value, other) { - * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; - * }); - * // => true - */ - function isMatch(object, source, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; - return baseIsMatch(object, getMatchData(source), customizer); - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) - * which returns `true` for `undefined` and other non-numeric values. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some host objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ - function isNative(value) { - if (value == null) { - return false; - } - if (objToString.call(value) == funcTag) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(8.4); - * // => true - * - * _.isNumber(NaN); - * // => true - * - * _.isNumber('8.4'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); - } - - /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ - var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && objToString.call(value) == objectTag)) { - return false; - } - var valueOf = getNative(value, 'valueOf'), - objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? (value == objProto || getPrototypeOf(value) == objProto) - : shimIsPlainObject(value); - }; - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - function isRegExp(value) { - return isObjectLike(value) && objToString.call(value) == regexpTag; - } - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); - } - - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ - function lt(value, other) { - return value < other; - } - - /** - * Checks if `value` is less than or equal to `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. - * @example - * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false - */ - function lte(value, other) { - return value <= other; - } - - /** - * Converts `value` to an array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * (function() { - * return _.toArray(arguments).slice(1); - * }(1, 2, 3)); - * // => [2, 3] - */ - function toArray(value) { - var length = value ? getLength(value) : 0; - if (!isLength(length)) { - return values(value); - } - if (!length) { - return []; - } - return arrayCopy(value); - } - - /** - * Converts `value` to a plain object flattening inherited enumerable - * properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ - function toPlainObject(value) { - return baseCopy(value, keysIn(value)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it is invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * **Note:** This method mutates `object` and is based on - * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return _.isUndefined(value) ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ - var assign = createAssigner(function(object, source, customizer) { - return customizer - ? assignWith(object, source, customizer) - : baseAssign(object, source); - }); - - /** - * Creates an object that inherits from the given `prototype` object. If a - * `properties` object is provided its own enumerable properties are assigned - * to the created object. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties, guard) { - var result = baseCreate(prototype); - if (guard && isIterateeCall(prototype, properties, guard)) { - properties = null; - } - return properties ? baseAssign(result, properties) : result; - } - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ - var defaults = restParam(function(args) { - var object = args[0]; - if (object == null) { - return object; - } - args.push(assignDefaults); - return assign.apply(undefined, args); - }); - - /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(chr) { - * return chr.age < 40; - * }); - * // => 'barney' (iteration order is not guaranteed) - * - * // using the `_.matches` callback shorthand - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.findKey(users, 'active', false); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.findKey(users, 'active'); - * // => 'barney' - */ - var findKey = createFindKey(baseForOwn); - - /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(chr) { - * return chr.age < 40; - * }); - * // => returns `pebbles` assuming `_.findKey` returns `barney` - * - * // using the `_.matches` callback shorthand - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // using the `_.matchesProperty` callback shorthand - * _.findLastKey(users, 'active', false); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ - var findLastKey = createFindKey(baseForOwnRight); - - /** - * Iterates over own and inherited enumerable properties of an object invoking - * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) - */ - var forIn = createForIn(baseFor); - - /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' - */ - var forInRight = createForIn(baseForRight); - - /** - * Iterates over own enumerable properties of an object invoking `iteratee` - * for each property. The `iteratee` is bound to `thisArg` and invoked with - * three arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'a' and 'b' (iteration order is not guaranteed) - */ - var forOwn = createForOwn(baseForOwn); - - /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' - */ - var forOwnRight = createForOwn(baseForOwnRight); - - /** - * Creates an array of function property names from all enumerable properties, - * own and inherited, of `object`. - * - * @static - * @memberOf _ - * @alias methods - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * _.functions(_); - * // => ['after', 'ary', 'assign', ...] - */ - function functions(object) { - return baseFunctions(object, keysIn(object)); - } - - /** - * Gets the property value at `path` of `object`. If the resolved value is - * `undefined` the `defaultValue` is used in its place. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); - return result === undefined ? defaultValue : result; - } - - /** - * Checks if `path` is a direct property. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - */ - function has(object, path) { - if (object == null) { - return false; - } - var result = hasOwnProperty.call(object, path); - if (!result && !isKey(path)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - path = last(path); - result = hasOwnProperty.call(object, path); - } - return result || (isLength(object.length) && isIndex(path, object.length) && - (isArray(object) || isArguments(object))); - } - - /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite property - * assignments of previous values unless `multiValue` is `true`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to invert. - * @param {boolean} [multiValue] Allow multiple values per key. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - * - * // with `multiValue` - * _.invert(object, true); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ - function invert(object, multiValue, guard) { - if (guard && isIterateeCall(object, multiValue, guard)) { - multiValue = null; - } - var index = -1, - props = keys(object), - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index], - value = object[key]; - - if (multiValue) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - else { - result[value] = key; - } - } - return result; - } - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? null : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; - }; - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } - - /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * property of `object` through `iteratee`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the new mapped object. - * @example - * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } - */ - var mapKeys = createObjectMapper(true); - - /** - * Creates an object with the same keys as `object` and values generated by - * running each own enumerable property of `object` through `iteratee`. The - * iteratee function is bound to `thisArg` and invoked with three arguments: - * (value, key, object). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the new mapped object. - * @example - * - * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { - * return n * 3; - * }); - * // => { 'a': 3, 'b': 6 } - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * // using the `_.property` callback shorthand - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ - var mapValues = createObjectMapper(); - - /** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined` into the destination object. Subsequent sources - * overwrite property assignments of previous sources. If `customizer` is - * provided it is invoked to produce the merged values of the destination and - * source properties. If `customizer` returns `undefined` merging is handled - * by the method instead. The `customizer` is bound to `thisArg` and invoked - * with five arguments: (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] - * }; - * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] - * }; - * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } - * - * // using a customizer callback - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, function(a, b) { - * if (_.isArray(a)) { - * return a.concat(b); - * } - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ - var merge = createAssigner(baseMerge); - - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that are not omitted. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to omit, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.omit(object, 'age'); - * // => { 'user': 'fred' } - * - * _.omit(object, _.isNumber); - * // => { 'user': 'fred' } - */ - var omit = restParam(function(object, props) { - if (object == null) { - return {}; - } - if (typeof props[0] != 'function') { - var props = arrayMap(baseFlatten(props), String); - return pickByArray(object, baseDifference(keysIn(object), props)); - } - var predicate = bindCallback(props[0], props[1], 3); - return pickByCallback(object, function(value, key, object) { - return !predicate(value, key, object); - }); - }); - - /** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example - * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) - */ - function pairs(object) { - object = toObject(object); - - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; - } - - /** - * Creates an object composed of the picked `object` properties. Property - * names may be specified as individual arguments or as arrays of property - * names. If `predicate` is provided it is invoked for each property of `object` - * picking the properties `predicate` returns truthy for. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to pick, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.pick(object, 'user'); - * // => { 'user': 'fred' } - * - * _.pick(object, _.isString); - * // => { 'user': 'fred' } - */ - var pick = restParam(function(object, props) { - if (object == null) { - return {}; - } - return typeof props[0] == 'function' - ? pickByCallback(object, bindCallback(props[0], props[1], 3)) - : pickByArray(object, baseFlatten(props)); - }); - - /** - * This method is like `_.get` except that if the resolved value is a function - * it is invoked with the `this` binding of its parent object and its result - * is returned. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a.b.c', 'default'); - * // => 'default' - * - * _.result(object, 'a.b.c', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - var result = object == null ? undefined : object[path]; - if (result === undefined) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - result = object == null ? undefined : object[last(path)]; - } - result = result === undefined ? defaultValue : result; - } - return isFunction(result) ? result.call(object) : result; - } - - /** - * Sets the property value of `path` on `object`. If a portion of `path` - * does not exist it is created. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to augment. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, 'x[0].y.z', 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - if (object == null) { - return object; - } - var pathKey = (path + ''); - path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = path[index]; - if (isObject(nested)) { - if (index == lastIndex) { - nested[key] = value; - } else if (nested[key] == null) { - nested[key] = isIndex(path[index + 1]) ? [] : {}; - } - } - nested = nested[key]; - } - return object; - } - - /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own enumerable - * properties through `iteratee`, with each invocation potentially mutating - * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Array|Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * }); - * // => { 'a': 3, 'b': 6 } - */ - function transform(object, iteratee, accumulator, thisArg) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = getCallback(iteratee, thisArg, 4); - - if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : null); - } - } else { - accumulator = {}; - } - } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; - } - - /** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return baseValues(object, keys(object)); - } - - /** - * Creates an array of the own and inherited enumerable property values - * of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) - */ - function valuesIn(object) { - return baseValues(object, keysIn(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Checks if `n` is between `start` and up to but not including, `end`. If - * `end` is not specified it is set to `start` with `start` then set to `0`. - * - * @static - * @memberOf _ - * @category Number - * @param {number} n The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `n` is in the range, else `false`. - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - */ - function inRange(value, start, end) { - start = +start || 0; - if (typeof end === 'undefined') { - end = start; - start = 0; - } else { - end = +end || 0; - } - return value >= nativeMin(start, end) && value < nativeMax(start, end); - } - - /** - * Produces a random number between `min` and `max` (inclusive). If only one - * argument is provided a number between `0` and the given number is returned. - * If `floating` is `true`, or either `min` or `max` are floats, a floating-point - * number is returned instead of an integer. - * - * @static - * @memberOf _ - * @category Number - * @param {number} [min=0] The minimum possible value. - * @param {number} [max=1] The maximum possible value. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. - * @example - * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 - * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 - */ - function random(min, max, floating) { - if (floating && isIterateeCall(min, max, floating)) { - max = floating = null; - } - var noMin = min == null, - noMax = max == null; - - if (floating == null) { - if (noMax && typeof min == 'boolean') { - floating = min; - min = 1; - } - else if (typeof max == 'boolean') { - floating = max; - noMax = true; - } - } - if (noMin && noMax) { - max = 1; - noMax = false; - } - min = +min || 0; - if (noMax) { - max = min; - min = 0; - } else { - max = +max || 0; - } - if (floating || min % 1 || max % 1) { - var rand = nativeRandom(); - return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); - } - return baseRandom(min, max); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar'); - * // => 'fooBar' - * - * _.camelCase('__foo_bar__'); - * // => 'fooBar' - */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); - }); - - /** - * Capitalizes the first character of `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('fred'); - * // => 'Fred' - */ - function capitalize(string) { - string = baseToString(string); - return string && (string.charAt(0).toUpperCase() + string.slice(1)); - } - - /** - * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ - function deburr(string) { - string = baseToString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); - } - - /** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to search. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. - * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ - function endsWith(string, target, position) { - string = baseToString(string); - target = (target + ''); - - var length = string.length; - position = position === undefined - ? length - : nativeMin(position < 0 ? 0 : (+position || 0), length); - - position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; - } - - /** - * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to - * their corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional characters - * use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. - * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in Internet Explorer < 9, they can break out - * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. - * - * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) - * to reduce XSS vectors. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - // Reset `lastIndex` because in IE < 9 `String#replace` does not. - string = baseToString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' - */ - function escapeRegExp(string) { - string = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; - } - - /** - * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__foo_bar__'); - * // => 'foo-bar' - */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); - - /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.pad('abc', 8); - * // => ' abc ' - * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' - * - * _.pad('abc', 3); - * // => 'abc' - */ - function pad(string, length, chars) { - string = baseToString(string); - length = +length; - - var strLength = string.length; - if (strLength >= length || !nativeIsFinite(length)) { - return string; - } - var mid = (length - strLength) / 2, - leftLength = floor(mid), - rightLength = ceil(mid); - - chars = createPadding('', rightLength, chars); - return chars.slice(0, leftLength) + string + chars; - } - - /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padLeft('abc', 6); - * // => ' abc' - * - * _.padLeft('abc', 6, '_-'); - * // => '_-_abc' - * - * _.padLeft('abc', 3); - * // => 'abc' - */ - var padLeft = createPadDir(); - - /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padRight('abc', 6); - * // => 'abc ' - * - * _.padRight('abc', 6, '_-'); - * // => 'abc_-_' - * - * _.padRight('abc', 3); - * // => 'abc' - */ - var padRight = createPadDir(true); - - /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, - * in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) - * of `parseInt`. - * - * @static - * @memberOf _ - * @category String - * @param {string} string The string to convert. - * @param {number} [radix] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {number} Returns the converted integer. - * @example - * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] - */ - function parseInt(string, radix, guard) { - if (guard && isIterateeCall(string, radix, guard)) { - radix = 0; - } - return nativeParseInt(string, radix); - } - // Fallback for environments with pre-ES5 implementations. - if (nativeParseInt(whitespace + '08') != 8) { - parseInt = function(string, radix, guard) { - // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. - // Chrome fails to trim leading whitespace characters. - // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. - if (guard ? isIterateeCall(string, radix, guard) : radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - string = trim(string); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); - }; - } - - /** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ - function repeat(string, n) { - var result = ''; - string = baseToString(string); - n = +n; - if (n < 1 || !string || !nativeIsFinite(n)) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = floor(n / 2); - string += string; - } while (n); - - return result; - } - - /** - * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. - * @example - * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--foo-bar'); - * // => 'foo_bar' - */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); - }); - - /** - * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' - * - * _.startCase('__foo_bar__'); - * // => 'Foo Bar' - */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); - }); - - /** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to search. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ - function startsWith(string, target, position) { - string = baseToString(string); - position = position == null - ? 0 - : nativeMin(position < 0 ? 0 : (+position || 0), string.length); - - return string.lastIndexOf(target, position) == position; - } - - /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is provided it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as free variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. - * @param {string} [options.variable] The data object variable name. - * @param- {Object} [otherOptions] Enables the legacy `options` param signature. - * @returns {Function} Returns the compiled template function. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // using the HTML "escape" delimiter to escape data property values - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' - -``` -Next, we'll get the user input from an input, listening to the keyup event by using the `Rx.Observable.fromEvent` method. This will either use the event binding from [jQuery](http://jquery.com), [Zepto](http://zeptojs.com/), [AngularJS](https://angularjs.org/), [Backbone.js](http://backbonejs.org/) and [Ember.js](http://emberjs.com/) if available, and if not, falls back to the native event binding. This gives you consistent ways of thinking of events depending on your framework, so there are no surprises. - -```js -var $input = $('#input'), - $results = $('#results'); - -/* Only get the value from each key up */ -var keyups = Rx.Observable.fromEvent($input, 'keyup') - .map(function (e) { - return e.target.value; - }) - .filter(function (text) { - return text.length > 2; - }); - -/* Now debounce the input for 500ms */ -var debounced = keyups - .debounce(500 /* ms */); - -/* Now get only distinct values, so we eliminate the arrows and other control characters */ -var distinct = debounced - .distinctUntilChanged(); -``` - -Now, let's query Wikipedia! In RxJS, we can instantly bind to any [Promises A+](https://github.com/promises-aplus/promises-spec) implementation through the `Rx.Observable.fromPromise` method or by just directly returning it, and we wrap it for you. - -```js -function searchWikipedia (term) { - return $.ajax({ - url: 'http://en.wikipedia.org/w/api.php', - dataType: 'jsonp', - data: { - action: 'opensearch', - format: 'json', - search: term - } - }).promise(); -} -``` - -Once that is created, now we can tie together the distinct throttled input and then query the service. In this case, we'll call `flatMapLatest` to get the value and ensure that we're not introducing any out of order sequence calls. - -```js -var suggestions = distinct - .flatMapLatest(searchWikipedia); -``` - -Finally, we call the `forEach` method on our observable sequence to start pulling data. - -```js -suggestions.forEach( - function (data) { - $results - .empty() - .append ($.map(data[1], function (value) { - return $('
  • ').text(value); - })); - }, - function (error) { - $results - .empty() - .append($('
  • ')) - .text('Error:' + error); - }); -``` - -And there you have it! - -## Dive In! ## - -Please check out: - - - [The full documentation](https://github.com/Reactive-Extensions/RxJS/tree/master/doc) - - [Our many great examples](https://github.com/Reactive-Extensions/RxJS/tree/master/examples) - - [Our design guidelines](https://github.com/Reactive-Extensions/RxJS/tree/master/doc/designguidelines) - - [Our contribution guidelines](https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing) - - [Our complete Unit Tests](https://github.com/Reactive-Extensions/RxJS/tree/master/tests) - - [Our recipes](https://github.com/Reactive-Extensions/RxJS/wiki/Recipes) - -## Resources - -- Contact us - - [Tech Blog](http://blogs.msdn.com/b/rxteam) - - [Twitter @ReactiveX](https://twitter.com/ReactiveX) - - [Twitter @OpenAtMicrosoft](http://twitter.com/OpenAtMicrosoft) - - [StackOverflow rxjs](http://stackoverflow.com/questions/tagged/rxjs) - - [Slack](http://reactivex.slack.com) - -- Tutorials - - [The introduction to Reactive Programming you've been missing](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754) - - [2 minute introduction to Rx](https://medium.com/@andrestaltz/2-minute-introduction-to-rx-24c8ca793877) - - [Learn RxJS](https://github.com/jhusain/learnrx) - - [RxJS Koans](https://github.com/Reactive-Extensions/RxJSKoans) - - [RxJS Workshop](https://github.com/Reactive-Extensions/BuildStuffWorkshop) - - [Rx Workshop](http://rxworkshop.codeplex.com/) - - [Reactive Programming and MVC](http://aaronstacy.com/writings/reactive-programming-and-mvc/) - -- Reference Material - - [Rx Marbles](http://rxmarbles.com/) - - [RxJS GitBook](http://xgrommx.github.io/rx-book/) - - [Intro to Rx](http://introtorx.com/) - - [101 Rx Samples Wiki](http://rxwiki.wikidot.com/101samples) - - [Rx Design Guidelines](https://github.com/Reactive-Extensions/RxJS/tree/master/doc/designguidelines) - - [Beginners Guide to Rx](http://msdn.microsoft.com/en-us/data/gg577611) - - [Visualizing Reactive Streams](http://jaredly.github.io/2015/03/06/visualizing-reactive-streams-hot-and-cold/) - -- Community Examples - - [React](http://facebook.github.io/react/) - - [Rx-React](https://github.com/fdecampredon/rx-react) - - [RxReact](https://github.com/AlexMost/RxReact) - - [cycle-react](https://github.com/pH200/cycle-react) - - [React RxJS Autocomplete](https://github.com/eliseumds/react-autocomplete) - - [React RxJS TODO MVC](https://github.com/fdecampredon/react-rxjs-todomvc) - - [Rx TODO MVC](https://github.com/footballradar/rx-todomvc) - - [React RxJS Router](https://github.com/kmcclosk/reactjs-rxjs-example) - - [React + RxJS + Angular 2.0 di.js TODO MVC](https://github.com/joelhooks/react-rxjs-angular-di-todomvc) - - [React + RxJS Reactive Cube](https://github.com/hugobessaa/cubactive) - - [Real-Time with React + RxJS + Meteor](https://medium.com/@bobiblazeski/functional-reactive-interfaces-e8de034de6bd) - - [React + RxJS Flow](https://github.com/justinwoo/react-rxjs-flow) - - [Reactive Widgets](https://github.com/zxbodya/reactive-widgets) - - [React RxJS Infinite Scroll](https://github.com/justinwoo/react-rxjs-scroll) - - [Flux](http://facebook.github.io/flux/) - - [Rx-Flux](https://github.com/fdecampredon/rx-flux) - - [ReactiveFlux](https://github.com/codesuki/reactive-flux) - - [Thundercats.js](https://github.com/r3dm/thundercats) - - [Flurx](https://github.com/cell303/flurx) - - [RR](https://github.com/winsonwq/RR) - - [Ember](http://emberjs.com/) - - [RxEmber](https://github.com/blesh/RxEmber) - - [AngularJS](http://angularjs.org) - - [Ninya.io - Angular + RxJS + rx.angular.js](https://github.com/ninya-io/ninya.io) - [Site](http://stackwho.herokuapp.com/) - - [The Car Game](https://github.com/mikkark/TheCarGame) - [Site](https://thecargame.herokuapp.com/) - [Blog Post](https://allthingsarchitectural.wordpress.com/2014/11/24/game-programming-with-angular-rxjs-and-node-js/) - - [Cycle](https://github.com/staltz/cycle) - - [Cycle TODO MVC](https://github.com/staltz/todomvc-cycle) - - [WebRx](https://github.com/oliverw/webrx) - - Everything else - - [RxVision](http://jaredly.github.io/rxvision/) - - [Mario Elm Example](http://fudini.github.io/rx/mario.html) - - [Firebase + RxJS](http://blog.cryptoguru.com/2014/11/frp-using-rxjs-and-firebase.html) - - [Reactive Trader](https://github.com/AdaptiveConsulting/ReactiveTrader) - [Site](https://reactivetrader.azurewebsites.net/) - - [NPM Dependencies](https://www.npmjs.com/browse/depended/rx) - -- Presentations - - Don't Cross the Streams - Cascadia.js 2012 [slides/demos](http://www.slideshare.net/mattpodwysocki/cascadiajs-dont-cross-the-streams) | [video](http://www.youtube.com/watch?v=FqBq4uoiG0M) - - Curing Your Asynchronous Blues - Strange Loop 2013 [slides/demos](https://github.com/Reactive-Extensions/StrangeLoop2013) | [video](http://www.infoq.com/presentations/rx-event-processing) - - Streaming and event-based programming using FRP and RxJS - FutureJS 2014 [slides/demos](https://github.com/Reactive-Extensions/FutureJS) | [video](https://www.youtube.com/watch?v=zlERo_JMGCw) - - [Tyrannosaurus Rx](http://yobriefca.se/presentations/tyrannosaurus-rx.pdf) - [James Hughes](http://twitter.com/kouphax) - - Taming Asynchronous Workflows with Functional Reactive Programming - EuroClojure - [Leonardo Borges](https://twitter.com/leonardo_borges) [slides](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) | [video](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) -- Reactive All the Things - ng-conf 2015 - [Martin Gontovnikas](https://twitter.com/mgonto/) & [Ben Lesh](https://twitter.com/BenLesh) - - [Slides](http://mgonto.github.io/reactive-all-the-things-talk/#1) - - [Video](https://www.youtube.com/watch?v=zbBVG8bOoXk&feature=youtu.be&app=desktop) - -- Videos - - [Practical Rx with Matthew Podwysocki, Bart de Smet and Jafar Husain](http://channel9.msdn.com/posts/Bart-De-Smet-Jafar-Hussain-Matthew-Podwysocki-Pragmatic-Rx) - - [Netflix and RxJS](http://channel9.msdn.com/posts/Rx-and-Netflix) - - [Hello RxJS - Channel 9](http://channel9.msdn.com/Blogs/Charles/Introducing-RxJS-Reactive-Extensions-for-JavaScript) - - [MIX 2011](http://channel9.msdn.com/events/MIX/MIX11/HTM07) - - [RxJS Today and Tomorrow - Channel 9](http://channel9.msdn.com/Blogs/Charles/Matthew-Podwysocki-and-Bart-J-F-De-Smet-RxJS-Today-and-Tomorrow) - - [Reactive Extensions Videos on Channel 9](http://channel9.msdn.com/Tags/reactive+extensions) - - [Asynchronous JavaScript at Netflix - Netflix JavaScript Talks - Jafar Husain](https://www.youtube.com/watch?v=XRYN2xt11Ek) - - [Asynchronous JavaScript at Netflix - MountainWest JavaScript 2014 - Jafar Husain](https://www.youtube.com/watch?v=XE692Clb5LU) - - [Asynchronous JavaScript at Netflix - HTML5DevConf - Jafar Husain](https://www.youtube.com/watch?v=5uxSu-F5Kj0) - - [Adding Even More Fun to Functional Programming With RXJS - Ryan Anklam](https://www.youtube.com/watch?v=8EExNfm0gt4) - - [Reactive Angular - Devoxx France 2014 - Martin Gontovnikas](http://parleys.com/play/53677646e4b0593229b85841/chapter0/about) - - [Reactive Game Programming for the Discerning Hipster - JSConf 2014 - Bodil Stokke](https://www.youtube.com/watch?v=x8mmAu7ZR9Y) - -- Podcasts - - [.NET Rocks #907](http://dotnetrocks.com/default.aspx?showNum=907) - - [JavaScript Jabber #83](http://javascriptjabber.com/083-jsj-frp-and-rxjs-with-matthew-podwysocki/) - -- Articles - - [Your Mouse is a Database](http://queue.acm.org/detail.cfm?id=2169076) - -- Books - - [RxJS](http://xgrommx.github.io/rx-book) - - [Intro to Rx](http://www.amazon.com/Introduction-to-Rx-ebook/dp/B008GM3YPM/) - - [Programming Reactive Extensions and LINQ](http://www.amazon.com/Programming-Reactive-Extensions-Jesse-Liberty/dp/1430237473/) - -## Getting Started - -There are a number of ways to get started with RxJS. The files are available on [cdnjs](http://cdnjs.com/libraries/rxjs/) and [jsDelivr](http://www.jsdelivr.com/#!rxjs). - -### Custom Builds - -You can use the [`rx-cli`](https://www.npmjs.org/package/rx-cli) to perform custom builds to create the RxJS you want: - -```bash -$ rx --lite --compat --methods select,selectmany,takeuntil,fromevent -``` - -### Download the Source - -```bash -git clone https://github.com/Reactive-Extensions/rxjs.git -cd ./rxjs -``` - -### Installing with [NPM](https://npmjs.org/) - -```bash` -$ npm install rx -$ npm install -g rx -``` - -### Using with Node.js and Ringo.js - -```js -var Rx = require('rx'); -``` - -### Installing with [Bower](http://bower.io/) - -```bash -$ bower install rxjs -``` - -### Installing with [Jam](http://jamjs.org/) -```bash -$ jam install rx -``` -### Installing All of RxJS via [NuGet](http://nuget.org/) -```bash -$ Install-Package RxJS-All -``` -### Install individual packages via [NuGet](http://nuget.org/): - - Install-Package RxJS-All - Install-Package RxJS-Lite - Install-Package RxJS-Main - Install-Package RxJS-Aggregates - Install-Package RxJS-Async - Install-Package RxJS-BackPressure - Install-Package RxJS-Binding - Install-Package RxJS-Coincidence - Install-Package RxJS-Experimental - Install-Package RxJS-JoinPatterns - Install-Package RxJS-Testing - Install-Package RxJS-Time - -### In a Browser: - -```html - - - - - - - - -``` - -### Along with a number of our extras for RxJS: - -```html - - - - - - - - - - -``` - -### Using RxJS with an AMD loader such as Require.js - -```js -require({ - 'paths': { - 'rx': 'path/to/rx-lite.js' - } -}, -['rx'], function(Rx) { - var obs = Rx.Observable.of(42); - obs.forEach(function (x) { console.log(x); }); -}); -``` - -## What about my libraries? ## - -The Reactive Extensions for JavaScript have no external dependencies any library, so they'll work well with just about any library. We provide bridges and support for various libraries including: -- [Node.js](https://www.npmjs.com/package/rx-node) -- [React](http://facebook.github.io/react/) - - [Rx-React](https://github.com/fdecampredon/rx-react) - - [RxReact](https://github.com/AlexMost/RxReact) - - [cycle-react](https://github.com/pH200/cycle-react) -- [Flux](http://facebook.github.io/flux/) - - [Rx-Flux](https://github.com/fdecampredon/rx-flux) - - [ReactiveFlux](https://github.com/codesuki/reactive-flux) - - [Thundercats.js](https://github.com/r3dm/thundercats) - - [Flurx](https://github.com/cell303/flurx) - - [RR](https://github.com/winsonwq/RR) -- [Ember](http://emberjs.com/) - - [RxEmber](https://github.com/blesh/RxEmber) -- [AngularJS](https://github.com/Reactive-Extensions/rx.angular.js) -- [HTML DOM](https://github.com/Reactive-Extensions/RxJS-DOM) -- [jQuery (1.4+)](https://github.com/Reactive-Extensions/RxJS-jQuery) -- [MooTools](https://github.com/Reactive-Extensions/RxJS-MooTools) -- [Dojo 1.7+](https://github.com/Reactive-Extensions/RxJS-Dojo) -- [ExtJS](https://github.com/Reactive-Extensions/RxJS-ExtJS) - -## Compatibility ## - -RxJS has been thoroughly tested against all major browsers and supports IE6+, Chrome 4+, FireFox 1+, and Node.js v0.4+. - -## Contributing ## - -There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)). - -You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. - -## License ## - -Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -Microsoft Open Technologies would like to thank its contributors, a list -of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. - -Licensed under the Apache License, Version 2.0 (the "License"); you -may not use this file except in compliance with the License. You may -obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing permissions -and limitations under the License. diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx-lite.d.ts deleted file mode 100644 index ce7c0895bd5390..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx-lite.d.ts +++ /dev/null @@ -1,695 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.d.ts and rx.lite.d.ts -// Do not include the file separately. - -declare module Rx { - export module internals { - function isEqual(left: any, right: any): boolean; - function addRef(xs: Observable, r: { getDisposable(): IDisposable; }): Observable; - - // Priority Queue for Scheduling - export class PriorityQueue { - constructor(capacity: number); - - length: number; - - isHigherPriority(left: number, right: number): boolean; - percolate(index: number): void; - heapify(index: number): void; - peek(): ScheduledItem; - removeAt(index: number): void; - dequeue(): ScheduledItem; - enqueue(item: ScheduledItem): void; - remove(item: ScheduledItem): boolean; - - static count: number; - } - - export class ScheduledItem { - constructor(scheduler: IScheduler, state: any, action: (scheduler: IScheduler, state: any) => IDisposable, dueTime: TTime, comparer?: (x: TTime, y: TTime) => number); - - scheduler: IScheduler; - state: TTime; - action: (scheduler: IScheduler, state: any) => IDisposable; - dueTime: TTime; - comparer: (x: TTime, y: TTime) => number; - disposable: SingleAssignmentDisposable; - - invoke(): void; - compareTo(other: ScheduledItem): number; - isCancelled(): boolean; - invokeCore(): IDisposable; - } - } - - export module config { - export var Promise: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise; }; - } - - export module helpers { - function noop(): void; - function notDefined(value: any): boolean; - function identity(value: T): T; - function defaultNow(): number; - function defaultComparer(left: any, right: any): boolean; - function defaultSubComparer(left: any, right: any): number; - function defaultKeySerializer(key: any): string; - function defaultError(err: any): void; - function isPromise(p: any): boolean; - function asArray(...args: T[]): T[]; - function not(value: any): boolean; - function isFunction(value: any): boolean; - } - - export interface IDisposable { - dispose(): void; - } - - export class CompositeDisposable implements IDisposable { - constructor (...disposables: IDisposable[]); - constructor (disposables: IDisposable[]); - - isDisposed: boolean; - length: number; - - dispose(): void; - add(item: IDisposable): void; - remove(item: IDisposable): boolean; - toArray(): IDisposable[]; - } - - export class Disposable implements IDisposable { - constructor(action: () => void); - - static create(action: () => void): IDisposable; - static empty: IDisposable; - - dispose(): void; - } - - // Single assignment - export class SingleAssignmentDisposable implements IDisposable { - constructor(); - - isDisposed: boolean; - current: IDisposable; - - dispose(): void ; - getDisposable(): IDisposable; - setDisposable(value: IDisposable): void ; - } - - // SerialDisposable it's an alias of SingleAssignmentDisposable - export class SerialDisposable extends SingleAssignmentDisposable { - constructor(); - } - - export class RefCountDisposable implements IDisposable { - constructor(disposable: IDisposable); - - dispose(): void; - - isDisposed: boolean; - getDisposable(): IDisposable; - } - - export interface IScheduler { - now(): number; - isScheduler(value: any): boolean; - - schedule(action: () => void): IDisposable; - scheduleWithState(state: TState, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable; - scheduleWithAbsolute(dueTime: number, action: () => void): IDisposable; - scheduleWithAbsoluteAndState(state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) =>IDisposable): IDisposable; - scheduleWithRelative(dueTime: number, action: () => void): IDisposable; - scheduleWithRelativeAndState(state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) =>IDisposable): IDisposable; - - scheduleRecursive(action: (action: () =>void ) =>void ): IDisposable; - scheduleRecursiveWithState(state: TState, action: (state: TState, action: (state: TState) =>void ) =>void ): IDisposable; - scheduleRecursiveWithAbsolute(dueTime: number, action: (action: (dueTime: number) => void) => void): IDisposable; - scheduleRecursiveWithAbsoluteAndState(state: TState, dueTime: number, action: (state: TState, action: (state: TState, dueTime: number) => void) => void): IDisposable; - scheduleRecursiveWithRelative(dueTime: number, action: (action: (dueTime: number) =>void ) =>void ): IDisposable; - scheduleRecursiveWithRelativeAndState(state: TState, dueTime: number, action: (state: TState, action: (state: TState, dueTime: number) =>void ) =>void ): IDisposable; - - schedulePeriodic(period: number, action: () => void): IDisposable; - schedulePeriodicWithState(state: TState, period: number, action: (state: TState) => TState): IDisposable; - } - - export interface Scheduler extends IScheduler { - } - - export interface SchedulerStatic { - new ( - now: () => number, - schedule: (state: any, action: (scheduler: IScheduler, state: any) => IDisposable) => IDisposable, - scheduleRelative: (state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable) => IDisposable, - scheduleAbsolute: (state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable) => IDisposable): Scheduler; - - normalize(timeSpan: number): number; - - immediate: IScheduler; - currentThread: ICurrentThreadScheduler; - timeout: IScheduler; - } - - export var Scheduler: SchedulerStatic; - - // Current Thread IScheduler - interface ICurrentThreadScheduler extends IScheduler { - scheduleRequired(): boolean; - } - - // Notifications - export class Notification { - accept(observer: IObserver): void; - accept(onNext: (value: T) => TResult, onError?: (exception: any) => TResult, onCompleted?: () => TResult): TResult; - toObservable(scheduler?: IScheduler): Observable; - hasValue: boolean; - equals(other: Notification): boolean; - kind: string; - value: T; - exception: any; - - static createOnNext(value: T): Notification; - static createOnError(exception: any): Notification; - static createOnCompleted(): Notification; - } - - /** - * Promise A+ - */ - export interface IPromise { - then(onFulfilled: (value: T) => IPromise, onRejected: (reason: any) => IPromise): IPromise; - then(onFulfilled: (value: T) => IPromise, onRejected?: (reason: any) => R): IPromise; - then(onFulfilled: (value: T) => R, onRejected: (reason: any) => IPromise): IPromise; - then(onFulfilled?: (value: T) => R, onRejected?: (reason: any) => R): IPromise; - } - - // Observer - export interface IObserver { - onNext(value: T): void; - onError(exception: any): void; - onCompleted(): void; - } - - export interface Observer extends IObserver { - toNotifier(): (notification: Notification) => void; - asObserver(): Observer; - } - - interface ObserverStatic { - create(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observer; - fromNotifier(handler: (notification: Notification, thisArg?: any) => void): Observer; - } - - export var Observer: ObserverStatic; - - export interface IObservable { - subscribe(observer: Observer): IDisposable; - subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable; - - subscribeOnNext(onNext: (value: T) => void, thisArg?: any): IDisposable; - subscribeOnError(onError: (exception: any) => void, thisArg?: any): IDisposable; - subscribeOnCompleted(onCompleted: () => void, thisArg?: any): IDisposable; - } - - export interface Observable extends IObservable { - forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable; // alias for subscribe - toArray(): Observable; - - catch(handler: (exception: any) => Observable): Observable; - catchException(handler: (exception: any) => Observable): Observable; // alias for catch - catch(handler: (exception: any) => IPromise): Observable; - catchException(handler: (exception: any) => IPromise): Observable; // alias for catch - catch(second: Observable): Observable; - catchException(second: Observable): Observable; // alias for catch - combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable; - combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable; - combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable; - withLatestFrom(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable; - withLatestFrom(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable; - withLatestFrom(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable; - concat(...sources: Observable[]): Observable; - concat(...sources: IPromise[]): Observable; - concat(sources: Observable[]): Observable; - concat(sources: IPromise[]): Observable; - concatAll(): T; - concatObservable(): T; // alias for concatAll - concatMap(selector: (value: T, index: number) => Observable, resultSelector: (value1: T, value2: T2, index: number) => R): Observable; // alias for selectConcat - concatMap(selector: (value: T, index: number) => IPromise, resultSelector: (value1: T, value2: T2, index: number) => R): Observable; // alias for selectConcat - concatMap(selector: (value: T, index: number) => Observable): Observable; // alias for selectConcat - concatMap(selector: (value: T, index: number) => IPromise): Observable; // alias for selectConcat - concatMap(sequence: Observable): Observable; // alias for selectConcat - merge(maxConcurrent: number): T; - merge(other: Observable): Observable; - merge(other: IPromise): Observable; - mergeAll(): T; - mergeObservable(): T; // alias for mergeAll - skipUntil(other: Observable): Observable; - skipUntil(other: IPromise): Observable; - switch(): T; - switchLatest(): T; // alias for switch - takeUntil(other: Observable): Observable; - takeUntil(other: IPromise): Observable; - zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable; - zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable; - zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable; - - asObservable(): Observable; - dematerialize(): Observable; - distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable; - distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable; - do(observer: Observer): Observable; - doAction(observer: Observer): Observable; // alias for do - tap(observer: Observer): Observable; // alias for do - do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable; - doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable; // alias for do - tap(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable; // alias for do - - doOnNext(onNext: (value: T) => void, thisArg?: any): Observable; - doOnError(onError: (exception: any) => void, thisArg?: any): Observable; - doOnCompleted(onCompleted: () => void, thisArg?: any): Observable; - tapOnNext(onNext: (value: T) => void, thisArg?: any): Observable; - tapOnError(onError: (exception: any) => void, thisArg?: any): Observable; - tapOnCompleted(onCompleted: () => void, thisArg?: any): Observable; - - finally(action: () => void): Observable; - finallyAction(action: () => void): Observable; // alias for finally - ignoreElements(): Observable; - materialize(): Observable>; - repeat(repeatCount?: number): Observable; - retry(retryCount?: number): Observable; - scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable; - scan(accumulator: (acc: T, value: T) => T): Observable; - skipLast(count: number): Observable; - startWith(...values: T[]): Observable; - startWith(scheduler: IScheduler, ...values: T[]): Observable; - takeLast(count: number): Observable; - takeLastBuffer(count: number): Observable; - - select(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; - map(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for select - pluck(prop: string): Observable; - selectMany(selector: (value: T) => Observable, resultSelector: (item: T, other: TOther) => TResult): Observable; - selectMany(selector: (value: T) => IPromise, resultSelector: (item: T, other: TOther) => TResult): Observable; - selectMany(selector: (value: T) => Observable): Observable; - selectMany(selector: (value: T) => IPromise): Observable; - selectMany(other: Observable): Observable; - selectMany(other: IPromise): Observable; - flatMap(selector: (value: T) => Observable, resultSelector: (item: T, other: TOther) => TResult): Observable; // alias for selectMany - flatMap(selector: (value: T) => IPromise, resultSelector: (item: T, other: TOther) => TResult): Observable; // alias for selectMany - flatMap(selector: (value: T) => Observable): Observable; // alias for selectMany - flatMap(selector: (value: T) => IPromise): Observable; // alias for selectMany - flatMap(other: Observable): Observable; // alias for selectMany - flatMap(other: IPromise): Observable; // alias for selectMany - - selectConcat(selector: (value: T, index: number) => Observable, resultSelector: (value1: T, value2: T2, index: number) => R): Observable; - selectConcat(selector: (value: T, index: number) => IPromise, resultSelector: (value1: T, value2: T2, index: number) => R): Observable; - selectConcat(selector: (value: T, index: number) => Observable): Observable; - selectConcat(selector: (value: T, index: number) => IPromise): Observable; - selectConcat(sequence: Observable): Observable; - - /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then - * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - * @param [thisArg] Object to use as this when executing callback. - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences - * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - selectSwitch(selector: (value: T, index: number, source: Observable) => Observable, thisArg?: any): Observable; - /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then - * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - * @param [thisArg] Object to use as this when executing callback. - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences - * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - flatMapLatest(selector: (value: T, index: number, source: Observable) => Observable, thisArg?: any): Observable; // alias for selectSwitch - /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then - * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - * @param [thisArg] Object to use as this when executing callback. - * @since 2.2.28 - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences - * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - switchMap(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for selectSwitch - - skip(count: number): Observable; - skipWhile(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - take(count: number, scheduler?: IScheduler): Observable; - takeWhile(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - where(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - filter(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; // alias for where - - /** - * Converts an existing observable sequence to an ES6 Compatible Promise - * @example - * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); - * @param promiseCtor The constructor of the promise. - * @returns An ES6 compatible promise with the last value from the observable sequence. - */ - toPromise>(promiseCtor: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): TPromise; }): TPromise; - /** - * Converts an existing observable sequence to an ES6 Compatible Promise - * @example - * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); - * - * // With config - * Rx.config.Promise = RSVP.Promise; - * var promise = Rx.Observable.return(42).toPromise(); - * @param [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise. - * @returns An ES6 compatible promise with the last value from the observable sequence. - */ - toPromise(promiseCtor?: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise; }): IPromise; - - // Experimental Flattening - - /** - * Performs a exclusive waiting for the first to finish before subscribing to another observable. - * Observables that come in between subscriptions will be dropped on the floor. - * Can be applied on `Observable>` or `Observable>`. - * @since 2.2.28 - * @returns A exclusive observable with only the results that happen when subscribed. - */ - exclusive(): Observable; - - /** - * Performs a exclusive map waiting for the first to finish before subscribing to another observable. - * Observables that come in between subscriptions will be dropped on the floor. - * Can be applied on `Observable>` or `Observable>`. - * @since 2.2.28 - * @param selector Selector to invoke for every item in the current subscription. - * @param [thisArg] An optional context to invoke with the selector parameter. - * @returns {An exclusive observable with only the results that happen when subscribed. - */ - exclusiveMap(selector: (value: I, index: number, source: Observable) => R, thisArg?: any): Observable; - } - - interface ObservableStatic { - create(subscribe: (observer: Observer) => IDisposable): Observable; - create(subscribe: (observer: Observer) => () => void): Observable; - create(subscribe: (observer: Observer) => void): Observable; - createWithDisposable(subscribe: (observer: Observer) => IDisposable): Observable; - defer(observableFactory: () => Observable): Observable; - defer(observableFactory: () => IPromise): Observable; - empty(scheduler?: IScheduler): Observable; - - /** - * This method creates a new Observable sequence from an array object. - * @param array An array-like or iterable object to convert to an Observable sequence. - * @param mapFn Map function to call on every element of the array. - * @param [thisArg] The context to use calling the mapFn if provided. - * @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - from(array: T[], mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler): Observable; - /** - * This method creates a new Observable sequence from an array object. - * @param array An array-like or iterable object to convert to an Observable sequence. - * @param [mapFn] Map function to call on every element of the array. - * @param [thisArg] The context to use calling the mapFn if provided. - * @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - from(array: T[], mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler): Observable; - - /** - * This method creates a new Observable sequence from an array-like object. - * @param array An array-like or iterable object to convert to an Observable sequence. - * @param mapFn Map function to call on every element of the array. - * @param [thisArg] The context to use calling the mapFn if provided. - * @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - from(array: { length: number;[index: number]: T; }, mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler): Observable; - /** - * This method creates a new Observable sequence from an array-like object. - * @param array An array-like or iterable object to convert to an Observable sequence. - * @param [mapFn] Map function to call on every element of the array. - * @param [thisArg] The context to use calling the mapFn if provided. - * @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - from(array: { length: number;[index: number]: T; }, mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler): Observable; - - /** - * This method creates a new Observable sequence from an array-like or iterable object. - * @param array An array-like or iterable object to convert to an Observable sequence. - * @param [mapFn] Map function to call on every element of the array. - * @param [thisArg] The context to use calling the mapFn if provided. - * @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - from(iterable: any, mapFn?: (value: any, index: number) => T, thisArg?: any, scheduler?: IScheduler): Observable; - - fromArray(array: T[], scheduler?: IScheduler): Observable; - fromArray(array: { length: number;[index: number]: T; }, scheduler?: IScheduler): Observable; - - /** - * Converts an iterable into an Observable sequence - * - * @example - * var res = Rx.Observable.fromIterable(new Map()); - * var res = Rx.Observable.fromIterable(function* () { yield 42; }); - * var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout); - * @param generator Generator to convert from. - * @param [scheduler] Scheduler to run the enumeration of the input sequence on. - * @returns The observable sequence whose elements are pulled from the given generator sequence. - */ - fromItreable(generator: () => { next(): { done: boolean; value?: T; }; }, scheduler?: IScheduler): Observable; - - /** - * Converts an iterable into an Observable sequence - * - * @example - * var res = Rx.Observable.fromIterable(new Map()); - * var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout); - * @param iterable Iterable to convert from. - * @param [scheduler] Scheduler to run the enumeration of the input sequence on. - * @returns The observable sequence whose elements are pulled from the given generator sequence. - */ - fromItreable(iterable: {}, scheduler?: IScheduler): Observable; // todo: can't describe ES6 Iterable via TypeScript type system - generate(initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler): Observable; - never(): Observable; - - /** - * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. - * - * @example - * var res = Rx.Observable.of(1, 2, 3); - * @since 2.2.28 - * @returns The observable sequence whose elements are pulled from the given arguments. - */ - of(...values: T[]): Observable; - - /** - * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. - * @example - * var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3); - * @since 2.2.28 - * @param [scheduler] A scheduler to use for scheduling the arguments. - * @returns The observable sequence whose elements are pulled from the given arguments. - */ - ofWithScheduler(scheduler?: IScheduler, ...values: T[]): Observable; - range(start: number, count: number, scheduler?: IScheduler): Observable; - repeat(value: T, repeatCount?: number, scheduler?: IScheduler): Observable; - return(value: T, scheduler?: IScheduler): Observable; - /** - * @since 2.2.28 - */ - just(value: T, scheduler?: IScheduler): Observable; // alias for return - returnValue(value: T, scheduler?: IScheduler): Observable; // alias for return - throw(exception: Error, scheduler?: IScheduler): Observable; - throw(exception: any, scheduler?: IScheduler): Observable; - throwException(exception: Error, scheduler?: IScheduler): Observable; // alias for throw - throwException(exception: any, scheduler?: IScheduler): Observable; // alias for throw - throwError(error: Error, scheduler?: IScheduler): Observable; // alias for throw - throwError(error: any, scheduler?: IScheduler): Observable; // alias for throw - - catch(sources: Observable[]): Observable; - catch(sources: IPromise[]): Observable; - catchException(sources: Observable[]): Observable; // alias for catch - catchException(sources: IPromise[]): Observable; // alias for catch - catchError(sources: Observable[]): Observable; // alias for catch - catchError(sources: IPromise[]): Observable; // alias for catch - catch(...sources: Observable[]): Observable; - catch(...sources: IPromise[]): Observable; - catchException(...sources: Observable[]): Observable; // alias for catch - catchException(...sources: IPromise[]): Observable; // alias for catch - catchError(...sources: Observable[]): Observable; // alias for catch - catchError(...sources: IPromise[]): Observable; // alias for catch - - combineLatest(first: Observable, second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: IPromise, second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - combineLatest(first: Observable, second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable; - combineLatest(souces: Observable[], resultSelector: (...otherValues: TOther[]) => TResult): Observable; - combineLatest(souces: IPromise[], resultSelector: (...otherValues: TOther[]) => TResult): Observable; - - withLatestFrom(first: Observable, second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: IPromise, second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable; - withLatestFrom(first: Observable, second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable; - withLatestFrom(souces: Observable[], resultSelector: (...otherValues: TOther[]) => TResult): Observable; - withLatestFrom(souces: IPromise[], resultSelector: (...otherValues: TOther[]) => TResult): Observable; - - concat(...sources: Observable[]): Observable; - concat(...sources: IPromise[]): Observable; - concat(sources: Observable[]): Observable; - concat(sources: IPromise[]): Observable; - merge(...sources: Observable[]): Observable; - merge(...sources: IPromise[]): Observable; - merge(sources: Observable[]): Observable; - merge(sources: IPromise[]): Observable; - merge(scheduler: IScheduler, ...sources: Observable[]): Observable; - merge(scheduler: IScheduler, ...sources: IPromise[]): Observable; - merge(scheduler: IScheduler, sources: Observable[]): Observable; - merge(scheduler: IScheduler, sources: IPromise[]): Observable; - - zip(first: Observable, sources: Observable[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable; - zip(first: Observable, sources: IPromise[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable; - zip(source1: Observable, source2: Observable, resultSelector: (item1: T1, item2: T2) => TResult): Observable; - zip(source1: Observable, source2: IPromise, resultSelector: (item1: T1, item2: T2) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: Observable, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: Observable, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: Observable, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: IPromise, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: IPromise, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: Observable, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: Observable, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: IPromise, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: IPromise, source3: IPromise, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable; - zip(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TResult): Observable; - zipArray(...sources: Observable[]): Observable; - zipArray(sources: Observable[]): Observable; - - /** - * Converts a Promise to an Observable sequence - * @param promise An ES6 Compliant promise. - * @returns An Observable sequence which wraps the existing promise success and failure. - */ - fromPromise(promise: IPromise): Observable; - - prototype: any; - } - - export var Observable: ObservableStatic; - - interface ISubject extends Observable, Observer, IDisposable { - hasObservers(): boolean; - } - - export interface Subject extends ISubject { - } - - interface SubjectStatic { - new (): Subject; - create(observer?: Observer, observable?: Observable): ISubject; - } - - export var Subject: SubjectStatic; - - export interface AsyncSubject extends Subject { - } - - interface AsyncSubjectStatic { - new (): AsyncSubject; - } - - export var AsyncSubject: AsyncSubjectStatic; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.aggregates.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.aggregates.d.ts deleted file mode 100644 index a3a8e15e19125e..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.aggregates.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Type definitions for RxJS-Aggregates v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module Rx { - export interface Observable { - finalValue(): Observable; - aggregate(accumulator: (acc: T, value: T) => T): Observable; - aggregate(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable; - - reduce(accumulator: (acc: T, value: T) => T): Observable; - reduce(accumulator: (acc: TAcc, value: T) => TAcc, seed: TAcc): Observable; // TS0.9.5: won't work https://typescript.codeplex.com/discussions/471751 - - any(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - some(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; // alias for any - - isEmpty(): Observable; - all(predicate?: (value: T) => boolean, thisArg?: any): Observable; - every(predicate?: (value: T) => boolean, thisArg?: any): Observable; // alias for all - contains(value: T): Observable; - contains(value: TOther, comparer: (value1: T, value2: TOther) => boolean): Observable; - count(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - sum(keySelector?: (value: T, index: number, source: Observable) => number, thisArg?: any): Observable; - minBy(keySelector: (item: T) => TKey, comparer: (value1: TKey, value2: TKey) => number): Observable; - minBy(keySelector: (item: T) => number): Observable; - min(comparer?: (value1: T, value2: T) => number): Observable; - maxBy(keySelector: (item: T) => TKey, comparer: (value1: TKey, value2: TKey) => number): Observable; - maxBy(keySelector: (item: T) => number): Observable; - max(comparer?: (value1: T, value2: T) => number): Observable; - average(keySelector?: (value: T, index: number, source: Observable) => number, thisArg?: any): Observable; - - sequenceEqual(second: Observable, comparer: (value1: T, value2: TOther) => number): Observable; - sequenceEqual(second: IPromise, comparer: (value1: T, value2: TOther) => number): Observable; - sequenceEqual(second: Observable): Observable; - sequenceEqual(second: IPromise): Observable; - sequenceEqual(second: TOther[], comparer: (value1: T, value2: TOther) => number): Observable; - sequenceEqual(second: T[]): Observable; - - elementAt(index: number): Observable; - elementAtOrDefault(index: number, defaultValue?: T): Observable; - - single(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - singleOrDefault(predicate?: (value: T, index: number, source: Observable) => boolean, defaultValue?: T, thisArg?: any): Observable; - - first(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - firstOrDefault(predicate?: (value: T, index: number, source: Observable) => boolean, defaultValue?: T, thisArg?: any): Observable; - - last(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - lastOrDefault(predicate?: (value: T, index: number, source: Observable) => boolean, defaultValue?: T, thisArg?: any): Observable; - - find(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - findIndex(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; - } -} - -declare module "rx.aggregates" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.all.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.all.d.ts deleted file mode 100644 index c546477b80e2c6..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.all.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Type definitions for RxJS-All v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// - -declare module "rx.all" { - export = Rx; -} \ No newline at end of file diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-lite.d.ts deleted file mode 100644 index f86dc326f34472..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-lite.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.async.d.ts and rx.lite.d.ts -// Do not include the file separately. - -/// - -declare module Rx { - export module config { - /** - * Configuration option to determine whether to use native events only - */ - export var useNativeEvents: boolean; - } - - interface ObservableStatic { - /** - * Invokes the asynchronous function, surfacing the result through an observable sequence. - * @param functionAsync Asynchronous function which returns a Promise to run. - * @returns An observable sequence exposing the function's result value, or an exception. - */ - startAsync(functionAsync: () => IPromise): Observable; - - fromCallback: { - // with single result callback without selector - (func: (callback: (result: TResult) => any) => any, context?: any): () => Observable; - (func: (arg1: T1, callback: (result: TResult) => any) => any, context?: any): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: (result: TResult) => any) => any, context?: any): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: (result: TResult) => any) => any, context?: any): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any callback with selector - (func: (callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult): () => Observable; - (func: (arg1: T1, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any callback without selector - (func: (callback: Function) => any, context?: any): () => Observable; - (func: (arg1: T1, callback: Function) => any, context?: any): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any function with selector - (func: Function, context: any, selector: (args: TCallbackResult[]) => TResult): (...args: any[]) => Observable; - // with any function without selector - (func: Function, context?: any): (...args: any[]) => Observable; - }; - - fromNodeCallback: { - // with single result callback without selector - (func: (callback: (err: any, result: T) => any) => any, context?: any): () => Observable; - (func: (arg1: T1, callback: (err: any, result: T) => any) => any, context?: any): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: (err: any, result: T) => any) => any, context?: any): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: T) => any) => any, context?: any): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any callback with selector - (func: (callback: Function) => any, context: any, selector: (results: TC[]) => TR): () => Observable; - (func: (arg1: T1, callback: Function) => any, context: any, selector: (results: TC[]) => TR): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (results: TC[]) => TR): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (results: TC[]) => TR): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any callback without selector - (func: (callback: Function) => any, context?: any): () => Observable; - (func: (arg1: T1, callback: Function) => any, context?: any): (arg1: T1) => Observable; - (func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any): (arg1: T1, arg2: T2) => Observable; - (func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any): (arg1: T1, arg2: T2, arg3: T3) => Observable; - // with any function with selector - (func: Function, context: any, selector: (results: TC[]) => T): (...args: any[]) => Observable; - // with any function without selector - (func: Function, context?: any): (...args: any[]) => Observable; - }; - - fromEvent(element: NodeList, eventName: string, selector?: (arguments: any[]) => T): Observable; - fromEvent(element: Node, eventName: string, selector?: (arguments: any[]) => T): Observable; - fromEventPattern(addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (arguments: any[])=>T): Observable; - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-tests.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-tests.ts deleted file mode 100644 index 6fe10526c7603a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async-tests.ts +++ /dev/null @@ -1,84 +0,0 @@ -// Tests for RxJS-Async TypeScript definitions -// Tests by Igor Oleinikov - -/// - -module Rx.Tests.Async { - - var obsNum: Rx.Observable; - var obsStr: Rx.Observable; - var sch: Rx.IScheduler; - - function start() { - obsNum = Rx.Observable.start(()=> 10, obsStr, sch); - obsNum = Rx.Observable.start(() => 10, obsStr); - obsNum = Rx.Observable.start(()=> 10); - } - - function toAsync() { - obsNum = Rx.Observable.toAsync(()=> 1, sch)(); - obsNum = Rx.Observable.toAsync((a1: number)=> a1)(1); - obsStr = Rx.Observable.toAsync((a1: string, a2: number)=> a1 + a2.toFixed(0))("", 1); - obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date)=> a1 + a2.toFixed(0) + a3.toDateString())("", 1, new Date()); - obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date, a4: boolean)=> a1 + a2.toFixed(0) + a3.toDateString() + (a4 ? 1 : 0))("", 1, new Date(), false); - } - - function fromCallback() { - // 0 arguments - var func0: (cb: (result: number)=> void)=> void; - obsNum = Rx.Observable.fromCallback(func0)(); - obsNum = Rx.Observable.fromCallback(func0, obsStr)(); - obsNum = Rx.Observable.fromCallback(func0, obsStr, (results: number[]) => results[0])(); - - // 1 argument - var func1: (a: string, cb: (result: number)=> void)=> number; - obsNum = Rx.Observable.fromCallback(func1)(""); - obsNum = Rx.Observable.fromCallback(func1, {})(""); - obsNum = Rx.Observable.fromCallback(func1, {}, (results: number[]) => results[0])(""); - - // 2 arguments - var func2: (a: number, b: string, cb: (result: string) => number) => Date; - obsStr = Rx.Observable.fromCallback(func2)(1, ""); - obsStr = Rx.Observable.fromCallback(func2, {})(1, ""); - obsStr = Rx.Observable.fromCallback(func2, {}, (results: string[]) => results[0])(1, ""); - - // 3 arguments - var func3: (a: number, b: string, c: boolean, cb: (result: string) => number) => Date; - obsStr = Rx.Observable.fromCallback(func3)(1, "", true); - obsStr = Rx.Observable.fromCallback(func3, {})(1, "", true); - obsStr = Rx.Observable.fromCallback(func3, {}, (results: string[]) => results[0])(1, "", true); - - // multiple results - var func0m: (cb: (result1: number, result2: number, result3: number) => void) => void; - obsNum = Rx.Observable.fromCallback(func0m, obsStr, (results: number[]) => results[0])(); - var func1m: (a: string, cb: (result1: number, result2: number, result3: number) => void) => void; - obsNum = Rx.Observable.fromCallback(func1m, obsStr, (results: number[]) => results[0])(""); - var func2m: (a: string, b: number, cb: (result1: string, result2: string, result3: string) => void) => void; - obsStr = Rx.Observable.fromCallback(func2m, obsStr, (results: string[]) => results[0])("", 10); - } - - function toPromise() { - var promiseImpl: { - new(resolver: (resolvePromise: (value: T)=> void, rejectPromise: (reason: any)=> void)=> void): Rx.IPromise; - }; - - Rx.config.Promise = promiseImpl; - - var p: IPromise = obsNum.toPromise(promiseImpl); - - p = obsNum.toPromise(); - - p = p.then(x=> x); - p = p.then(x=> p); - p = p.then(undefined, reason=> 10); - p = p.then(undefined, reason=> p); - - var ps: IPromise = p.then(undefined, reason=> "error"); - ps = p.then(x=> ""); - ps = p.then(x=> ps); - } - - function startAsync() { - var o: Rx.Observable = Rx.Observable.startAsync(() => >null); - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async.d.ts deleted file mode 100644 index f1af9a600023ff..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.async.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Type definitions for RxJS-Async v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: zoetrope , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module Rx { - interface ObservableStatic { - start(func: () => T, context?: any, scheduler?: IScheduler): Observable; - - toAsync(func: () => TResult, context?: any, scheduler?: IScheduler): () => Observable; - toAsync(func: (arg1: T1) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1) => Observable; - toAsync(func: (arg1?: T1) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1) => Observable; - toAsync(func: (...args: T1[]) => TResult, context?: any, scheduler?: IScheduler): (...args: T1[]) => Observable; - toAsync(func: (arg1: T1, arg2: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2) => Observable; - toAsync(func: (arg1: T1, arg2?: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2) => Observable; - toAsync(func: (arg1?: T1, arg2?: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2) => Observable; - toAsync(func: (arg1: T1, ...args: T2[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, ...args: T2[]) => Observable; - toAsync(func: (arg1?: T1, ...args: T2[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, ...args: T2[]) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3) => Observable; - toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3) => Observable; - toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3) => Observable; - toAsync(func: (arg1: T1, arg2: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, ...args: T3[]) => Observable; - toAsync(func: (arg1: T1, arg2?: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, ...args: T3[]) => Observable; - toAsync(func: (arg1?: T1, arg2?: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, ...args: T3[]) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, arg4?: T4) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3, arg4?: T4) => Observable; - toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3, arg4?: T4) => Observable; - toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3, arg4?: T4) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, ...args: T4[]) => Observable; - toAsync(func: (arg1: T1, arg2: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3, ...args: T4[]) => Observable; - toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => Observable; - toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => Observable; - } -} - -declare module "rx.async" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-lite.d.ts deleted file mode 100644 index 9d4027be69046c..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-lite.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.backpressure.d.ts and rx.lite.d.ts -// Do not include the file separately. - -/// - -declare module Rx { - export interface Observable { - /** - * Pauses the underlying observable sequence based upon the observable sequence which yields true/false. - * @example - * var pauser = new Rx.Subject(); - * var source = Rx.Observable.interval(100).pausable(pauser); - * @param pauser The observable sequence used to pause the underlying sequence. - * @returns The observable sequence which is paused based upon the pauser. - */ - pausable(pauser?: Observable): PausableObservable; - - /** - * Pauses the underlying observable sequence based upon the observable sequence which yields true/false, - * and yields the values that were buffered while paused. - * @example - * var pauser = new Rx.Subject(); - * var source = Rx.Observable.interval(100).pausableBuffered(pauser); - * @param pauser The observable sequence used to pause the underlying sequence. - * @returns The observable sequence which is paused based upon the pauser. - */ - pausableBuffered(pauser?: Observable): PausableObservable; - - /** - * Attaches a controller to the observable sequence with the ability to queue. - * @example - * var source = Rx.Observable.interval(100).controlled(); - * source.request(3); // Reads 3 values - */ - controlled(enableQueue?: boolean): ControlledObservable; - } - - export interface ControlledObservable extends Observable { - request(numberOfItems?: number): IDisposable; - } - - export interface PausableObservable extends Observable { - pause(): void; - resume(): void; - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-tests.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-tests.ts deleted file mode 100644 index f036a1dc378d0c..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure-tests.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Tests for RxJS-BackPressure TypeScript definitions -// Tests by Igor Oleinikov - -/// -/// - -function testPausable() { - var o: Rx.Observable; - - var pauser = new Rx.Subject(); - - var p = o.pausable(pauser); - p = o.pausableBuffered(pauser); -} - -function testControlled() { - var o: Rx.Observable; - var c = o.controlled(); - - var d: Rx.IDisposable = c.request(); - d = c.request(5); -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure.d.ts deleted file mode 100644 index 549cd870a2bc60..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.backpressure.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Type definitions for RxJS-BackPressure v2.3.12 -// Project: http://rx.codeplex.com/ -// Definitions by: Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "rx.backpressure" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding-lite.d.ts deleted file mode 100644 index 86db8922cb7775..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding-lite.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.binding.d.ts and rx.lite.d.ts -// Do not include the file separately. - -/// - -declare module Rx { - export interface BehaviorSubject extends Subject { - getValue(): T; - } - - interface BehaviorSubjectStatic { - new (initialValue: T): BehaviorSubject; - } - - export var BehaviorSubject: BehaviorSubjectStatic; - - export interface ReplaySubject extends Subject { - } - - interface ReplaySubjectStatic { - new (bufferSize?: number, window?: number, scheduler?: IScheduler): ReplaySubject; - } - - export var ReplaySubject: ReplaySubjectStatic; - - interface ConnectableObservable extends Observable { - connect(): IDisposable; - refCount(): Observable; - } - - interface ConnectableObservableStatic { - new (): ConnectableObservable; - } - - export var ConnectableObservable: ConnectableObservableStatic; - - export interface Observable { - multicast(subject: Observable): ConnectableObservable; - multicast(subjectSelector: () => ISubject, selector: (source: ConnectableObservable) => Observable): Observable; - publish(): ConnectableObservable; - publish(selector: (source: ConnectableObservable) => Observable): Observable; - /** - * Returns an observable sequence that shares a single subscription to the underlying sequence. - * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - * - * @example - * var res = source.share(); - * - * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - share(): Observable; - publishLast(): ConnectableObservable; - publishLast(selector: (source: ConnectableObservable) => Observable): Observable; - publishValue(initialValue: T): ConnectableObservable; - publishValue(selector: (source: ConnectableObservable) => Observable, initialValue: T): Observable; - /** - * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. - * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - * - * @example - * var res = source.shareValue(42); - * - * @param initialValue Initial value received by observers upon subscription. - * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - shareValue(initialValue: T): Observable; - replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable; // hack to catch first omitted parameter - replay(selector: (source: ConnectableObservable) => Observable, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; - shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding.d.ts deleted file mode 100644 index 2bd4c5b01f53b5..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.binding.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Type definitions for RxJS-Binding v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "rx.binding" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence-lite.d.ts deleted file mode 100644 index ca1cc734738d86..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence-lite.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.time.d.ts and rx.lite.d.ts -// Do not include the file separately. - -/// - -declare module Rx { - - interface Observable { - /** - * Returns a new observable that triggers on the second and subsequent triggerings of the input observable. - * The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. - * The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs. - * @returns An observable that triggers on successive pairs of observations from the input observable as an array. - */ - pairwise(): Observable; - - /** - * Returns two observables which partition the observations of the source by the given function. - * The first will trigger observations for those values for which the predicate returns true. - * The second will trigger observations for those values where the predicate returns false. - * The predicate is executed once for each subscribed observer. - * Both also propagate all error observations arising from the source and each completes - * when the source completes. - * @param predicate - * The function to determine which output Observable will trigger a particular observation. - * @returns - * An array of observables. The first triggers when the predicate returns true, - * and the second triggers when the predicate returns false. - */ - partition(predicate: (value: T, index: number, source: Observable) => boolean, thisArg: any): Observable[]; - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence.d.ts deleted file mode 100644 index d06166224afa9a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.coincidence.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Type definitions for RxJS-Coincidence v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module Rx { - - interface Observable { - join( - right: Observable, - leftDurationSelector: (leftItem: T) => Observable, - rightDurationSelector: (rightItem: TRight) => Observable, - resultSelector: (leftItem: T, rightItem: TRight) => TResult): Observable; - - groupJoin( - right: Observable, - leftDurationSelector: (leftItem: T) => Observable, - rightDurationSelector: (rightItem: TRight) => Observable, - resultSelector: (leftItem: T, rightItem: Observable) => TResult): Observable; - - window(windowOpenings: Observable): Observable>; - window(windowClosingSelector: () => Observable): Observable>; - window(windowOpenings: Observable, windowClosingSelector: () => Observable): Observable>; - - buffer(bufferOpenings: Observable): Observable; - buffer(bufferClosingSelector: () => Observable): Observable; - buffer(bufferOpenings: Observable, bufferClosingSelector: () => Observable): Observable; - } -} - -declare module "rx.coincidence" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.d.ts deleted file mode 100644 index a6e46e36d4c99d..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Type definitions for RxJS v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: gsino , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module Rx { - export interface IScheduler { - catch(handler: (exception: any) => boolean): IScheduler; - catchException(handler: (exception: any) => boolean): IScheduler; - } - - // Observer - export interface Observer { - checked(): Observer; - } - - interface ObserverStatic { - /** - * Schedules the invocation of observer methods on the given scheduler. - * @param scheduler Scheduler to schedule observer messages on. - * @returns Observer whose messages are scheduled on the given scheduler. - */ - notifyOn(scheduler: IScheduler): Observer; - } - - export interface Observable { - observeOn(scheduler: IScheduler): Observable; - subscribeOn(scheduler: IScheduler): Observable; - - amb(rightSource: Observable): Observable; - amb(rightSource: IPromise): Observable; - onErrorResumeNext(second: Observable): Observable; - onErrorResumeNext(second: IPromise): Observable; - bufferWithCount(count: number, skip?: number): Observable; - windowWithCount(count: number, skip?: number): Observable>; - defaultIfEmpty(defaultValue?: T): Observable; - distinct(skipParameter: boolean, valueSerializer: (value: T) => string): Observable; - distinct(keySelector?: (value: T) => TKey, keySerializer?: (key: TKey) => string): Observable; - groupBy(keySelector: (value: T) => TKey, skipElementSelector?: boolean, keySerializer?: (key: TKey) => string): Observable>; - groupBy(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable>; - groupByUntil(keySelector: (value: T) => TKey, skipElementSelector: boolean, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>; - groupByUntil(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>; - } - - interface ObservableStatic { - using(resourceFactory: () => TResource, observableFactory: (resource: TResource) => Observable): Observable; - amb(...sources: Observable[]): Observable; - amb(...sources: IPromise[]): Observable; - amb(sources: Observable[]): Observable; - amb(sources: IPromise[]): Observable; - onErrorResumeNext(...sources: Observable[]): Observable; - onErrorResumeNext(...sources: IPromise[]): Observable; - onErrorResumeNext(sources: Observable[]): Observable; - onErrorResumeNext(sources: IPromise[]): Observable; - } - - interface GroupedObservable extends Observable { - key: TKey; - underlyingObservable: Observable; - } -} - -declare module "rx" { - export = Rx -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.experimental.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.experimental.d.ts deleted file mode 100644 index e80ca03294c735..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.experimental.d.ts +++ /dev/null @@ -1,321 +0,0 @@ -// Type definitions for RxJS-Experimental v2.2.28 -// Project: https://github.com/Reactive-Extensions/RxJS/ -// Definitions by: Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module Rx { - - interface Observable { - /** - * Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. - * This operator allows for a fluent style of writing queries that use the same sequence multiple times. - * - * @param selector Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence. - * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - let(selector: (source: Observable) => Observable): Observable; - - /** - * Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. - * This operator allows for a fluent style of writing queries that use the same sequence multiple times. - * - * @param selector Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence. - * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - letBind(selector: (source: Observable) => Observable): Observable; - - /** - * Repeats source as long as condition holds emulating a do while loop. - * @param condition The condition which determines if the source will be repeated. - * @returns An observable sequence which is repeated as long as the condition holds. - */ - doWhile(condition: () => boolean): Observable; - - /** - * Expands an observable sequence by recursively invoking selector. - * - * @param selector Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again. - * @param [scheduler] Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler. - * @returns An observable sequence containing all the elements produced by the recursive expansion. - */ - expand(selector: (item: T) => Observable, scheduler?: IScheduler): Observable; - - /** - * Runs two observable sequences in parallel and combines their last elemenets. - * - * @param second Second observable sequence or promise. - * @param resultSelector Result selector function to invoke with the last elements of both sequences. - * @returns An observable sequence with the result of calling the selector function with the last elements of both input sequences. - */ - forkJoin(second: Observable, resultSelector: (left: T, right: TSecond) => TResult): Observable; - forkJoin(second: IPromise, resultSelector: (left: T, right: TSecond) => TResult): Observable; - - /** - * Comonadic bind operator. - * @param selector A transform function to apply to each element. - * @param [scheduler] Scheduler used to execute the operation. If not specified, defaults to the ImmediateScheduler. - * @returns An observable sequence which results from the comonadic bind operation. - */ - manySelect(selector: (item: Observable, index: number, source: Observable) => TResult, scheduler?: IScheduler): Observable; - } - - interface ObservableStatic { - /** - * Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers (condition: () => boolean, thenSource: Observable, elseSource: Observable): Observable; - if(condition: () => boolean, thenSource: Observable, elseSource: IPromise): Observable; - if(condition: () => boolean, thenSource: IPromise, elseSource: Observable): Observable; - if(condition: () => boolean, thenSource: IPromise, elseSource: IPromise): Observable; - - /** - * Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers (condition: () => boolean, thenSource: Observable, scheduler?: IScheduler): Observable; - if(condition: () => boolean, thenSource: IPromise, scheduler?: IScheduler): Observable; - - /** - * Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers (condition: () => boolean, thenSource: Observable, elseSource: Observable): Observable; - ifThen(condition: () => boolean, thenSource: Observable, elseSource: IPromise): Observable; - ifThen(condition: () => boolean, thenSource: IPromise, elseSource: Observable): Observable; - ifThen(condition: () => boolean, thenSource: IPromise, elseSource: IPromise): Observable; - - /** - * Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers (condition: () => boolean, thenSource: Observable, scheduler?: IScheduler): Observable; - ifThen(condition: () => boolean, thenSource: IPromise, scheduler?: IScheduler): Observable; - - /** - * Concatenates the observable sequences obtained by running the specified result selector for each element in source. - * There is an alias for this method called 'forIn' for browsers (sources: T[], resultSelector: (item: T) => Observable): Observable; - - /** - * Concatenates the observable sequences obtained by running the specified result selector for each element in source. - * There is an alias for this method called 'forIn' for browsers (sources: T[], resultSelector: (item: T) => Observable): Observable; - - /** - * Repeats source as long as condition holds emulating a while loop. - * There is an alias for this method called 'whileDo' for browsers (condition: () => boolean, source: Observable): Observable; - while(condition: () => boolean, source: IPromise): Observable; - - /** - * Repeats source as long as condition holds emulating a while loop. - * There is an alias for this method called 'whileDo' for browsers (condition: () => boolean, source: Observable): Observable; - whileDo(condition: () => boolean, source: IPromise): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, elseSource: Observable): Observable; - case(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: Observable): Observable; - case(selector: () => string, sources: { [key: string]: Observable; }, elseSource: IPromise): Observable; - case(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: IPromise): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, scheduler?: IScheduler): Observable; - case(selector: () => string, sources: { [key: string]: IPromise; }, scheduler?: IScheduler): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, elseSource: Observable): Observable; - case(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: Observable): Observable; - case(selector: () => number, sources: { [key: number]: Observable; }, elseSource: IPromise): Observable; - case(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: IPromise): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, scheduler?: IScheduler): Observable; - case(selector: () => number, sources: { [key: number]: IPromise; }, scheduler?: IScheduler): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, elseSource: Observable): Observable; - switchCase(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: Observable): Observable; - switchCase(selector: () => string, sources: { [key: string]: Observable; }, elseSource: IPromise): Observable; - switchCase(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: IPromise): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, scheduler?: IScheduler): Observable; - switchCase(selector: () => string, sources: { [key: string]: IPromise; }, scheduler?: IScheduler): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, elseSource: Observable): Observable; - switchCase(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: Observable): Observable; - switchCase(selector: () => number, sources: { [key: number]: Observable; }, elseSource: IPromise): Observable; - switchCase(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: IPromise): Observable; - - /** - * Uses selector to determine which source in sources to use. - * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, scheduler?: IScheduler): Observable; - switchCase(selector: () => number, sources: { [key: number]: IPromise; }, scheduler?: IScheduler): Observable; - - /** - * Runs all observable sequences in parallel and collect their last elements. - * - * @example - * res = Rx.Observable.forkJoin([obs1, obs2]); - * @param sources Array of source sequences or promises. - * @returns An observable sequence with an array collecting the last elements of all the input sequences. - */ - forkJoin(sources: Observable[]): Observable; - forkJoin(sources: IPromise[]): Observable; - - /** - * Runs all observable sequences in parallel and collect their last elements. - * - * @example - * res = Rx.Observable.forkJoin(obs1, obs2, ...); - * @param args Source sequences or promises. - * @returns An observable sequence with an array collecting the last elements of all the input sequences. - */ - forkJoin(...args: Observable[]): Observable; - forkJoin(...args: IPromise[]): Observable; - } -} - -declare module "rx.experimental" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.joinpatterns.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.joinpatterns.d.ts deleted file mode 100644 index fc20f825479632..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.joinpatterns.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Type definitions for RxJS-Join v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module Rx { - - interface Pattern1 { - and(other: Observable): Pattern2; - thenDo(selector: (item1: T1) => TR): Plan; - } - interface Pattern2 { - and(other: Observable): Pattern3; - thenDo(selector: (item1: T1, item2: T2) => TR): Plan; - } - interface Pattern3 { - and(other: Observable): Pattern4; - thenDo(selector: (item1: T1, item2: T2, item3: T3) => TR): Plan; - } - interface Pattern4 { - and(other: Observable): Pattern5; - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4) => TR): Plan; - } - interface Pattern5 { - and(other: Observable): Pattern6; - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TR): Plan; - } - interface Pattern6 { - and(other: Observable): Pattern7; - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6) => TR): Plan; - } - interface Pattern7 { - and(other: Observable): Pattern8; - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7) => TR): Plan; - } - interface Pattern8 { - and(other: Observable): Pattern9; - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8) => TR): Plan; - } - interface Pattern9 { - thenDo(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8, item9: T9) => TR): Plan; - } - - interface Plan { } - - interface Observable { - and(other: Observable): Pattern2; - thenDo(selector: (item1: T) => TR): Plan; - } - - interface ObservableStatic { - when(plan: Plan): Observable; - } -} - -declare module "rx.joinpatterns" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.lite.d.ts deleted file mode 100644 index 66ec678498c7eb..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.lite.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for RxJS-Lite v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: gsino , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// -/// -/// -/// -/// - -declare module "rx.lite" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.testing.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.testing.d.ts deleted file mode 100644 index 58b074f75622f7..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.testing.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Type definitions for RxJS-Testing v2.2.28 -// Project: https://github.com/Reactive-Extensions/RxJS/ -// Definitions by: Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module Rx { - export interface TestScheduler extends VirtualTimeScheduler { - createColdObservable(...records: Recorded[]): Observable; - createHotObservable(...records: Recorded[]): Observable; - createObserver(): MockObserver; - - startWithTiming(create: () => Observable, createdAt: number, subscribedAt: number, disposedAt: number): MockObserver; - startWithDispose(create: () => Observable, disposedAt: number): MockObserver; - startWithCreate(create: () => Observable): MockObserver; - } - - export var TestScheduler: { - new (): TestScheduler; - }; - - export class Recorded { - constructor(time: number, value: any, equalityComparer?: (x: any, y: any) => boolean); - equals(other: Recorded): boolean; - toString(): string; - time: number; - value: any; - } - - export var ReactiveTest: { - created: number; - subscribed: number; - disposed: number; - - onNext(ticks: number, value: any): Recorded; - onNext(ticks: number, predicate: (value: any) => boolean): Recorded; - onError(ticks: number, exception: any): Recorded; - onError(ticks: number, predicate: (exception: any) => boolean): Recorded; - onCompleted(ticks: number): Recorded; - - subscribe(subscribeAt: number, unsubscribeAt?: number): Subscription; - }; - - export class Subscription { - constructor(subscribeAt: number, unsubscribeAt?: number); - equals(other: Subscription): boolean; - } - - export interface MockObserver extends Observer { - messages: Recorded[]; - } - - interface MockObserverStatic extends ObserverStatic { - new (scheduler: IScheduler): MockObserver; - } - - export var MockObserver: MockObserverStatic; -} - -declare module "rx.testing" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time-lite.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time-lite.d.ts deleted file mode 100644 index f7a902685ef9cb..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time-lite.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -// DefinitelyTyped: partial - -// This file contains common part of defintions for rx.time.d.ts and rx.lite.d.ts -// Do not include the file separately. - -/// - -declare module Rx { - export interface TimeInterval { - value: T; - interval: number; - } - - export interface Timestamp { - value: T; - timestamp: number; - } - - export interface Observable { - delay(dueTime: Date, scheduler?: IScheduler): Observable; - delay(dueTime: number, scheduler?: IScheduler): Observable; - - debounce(dueTime: number, scheduler?: IScheduler): Observable; - throttleWithTimeout(dueTime: number, scheduler?: IScheduler): Observable; - /** - * @deprecated use #debounce or #throttleWithTimeout instead. - */ - throttle(dueTime: number, scheduler?: IScheduler): Observable; - - timeInterval(scheduler?: IScheduler): Observable>; - - timestamp(scheduler?: IScheduler): Observable>; - - sample(interval: number, scheduler?: IScheduler): Observable; - sample(sampler: Observable, scheduler?: IScheduler): Observable; - - timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable; - timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable; - } - - interface ObservableStatic { - interval(period: number, scheduler?: IScheduler): Observable; - interval(dutTime: number, period: number, scheduler?: IScheduler): Observable; - timer(dueTime: number, period: number, scheduler?: IScheduler): Observable; - timer(dueTime: number, scheduler?: IScheduler): Observable; - } -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time.d.ts deleted file mode 100644 index 2e3ea0a0907ac5..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.time.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Type definitions for RxJS-Time v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module Rx { - export interface Observable { - delaySubscription(dueTime: number, scheduler?: IScheduler): Observable; - delayWithSelector(delayDurationSelector: (item: T) => number): Observable; - delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable; - - timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Observable, other?: Observable): Observable; - - debounceWithSelector(debounceDurationSelector: (item: T) => Observable): Observable; - /** - * @deprecated use #debounceWithSelector instead. - */ - throttleWithSelector(debounceDurationSelector: (item: T) => Observable): Observable; - - skipLastWithTime(duration: number, scheduler?: IScheduler): Observable; - takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable; - - takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable; - takeWithTime(duration: number, scheduler?: IScheduler): Observable; - skipWithTime(duration: number, scheduler?: IScheduler): Observable; - - skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable; - skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable; - takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable; - takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable; - - windowWithTime(timeSpan: number, timeShift: number, scheduler?: IScheduler): Observable>; - windowWithTime(timeSpan: number, scheduler?: IScheduler): Observable>; - windowWithTimeOrCount(timeSpan: number, count: number, scheduler?: IScheduler): Observable>; - bufferWithTime(timeSpan: number, timeShift: number, scheduler?: IScheduler): Observable; - bufferWithTime(timeSpan: number, scheduler?: IScheduler): Observable; - bufferWithTimeOrCount(timeSpan: number, count: number, scheduler?: IScheduler): Observable; - } - - interface ObservableStatic { - timer(dueTime: Date, period: number, scheduler?: IScheduler): Observable; - timer(dueTime: Date, scheduler?: IScheduler): Observable; - - generateWithRelativeTime( - initialState: TState, - condition: (state: TState) => boolean, - iterate: (state: TState) => TState, - resultSelector: (state: TState) => TResult, - timeSelector: (state: TState) => number, - scheduler?: IScheduler): Observable; - generateWithAbsoluteTime( - initialState: TState, - condition: (state: TState) => boolean, - iterate: (state: TState) => TState, - resultSelector: (state: TState) => TResult, - timeSelector: (state: TState) => Date, - scheduler?: IScheduler): Observable; - } -} - -declare module "rx.time" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.virtualtime.d.ts b/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.virtualtime.d.ts deleted file mode 100644 index bac31a0d373d32..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/ts/rx.virtualtime.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Type definitions for RxJS-VirtualTime v2.2.28 -// Project: http://rx.codeplex.com/ -// Definitions by: gsino , Igor Oleinikov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module Rx { - export interface VirtualTimeScheduler extends Scheduler { - //protected constructor(initialClock: TAbsolute, comparer: (first: TAbsolute, second: TAbsolute) => number); - - advanceBy(time: TRelative): void; - advanceTo(time: TAbsolute): void; - scheduleAbsolute(dueTime: TAbsolute, action: () => void): IDisposable; - scheduleAbsoluteWithState(state: TState, dueTime: TAbsolute, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable; - scheduleRelative(dueTime: TRelative, action: () => void): IDisposable; - scheduleRelativeWithState(state: TState, dueTime: TRelative, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable; - sleep(time: TRelative): void; - start(): IDisposable; - stop(): void; - - isEnabled: boolean; - - /* protected abstract */ add(from: TAbsolute, by: TRelative): TAbsolute; - /* protected abstract */ toDateTimeOffset(duetime: TAbsolute): number; - /* protected abstract */ toRelative(duetime: number): TRelative; - - /* protected */ getNext(): internals.ScheduledItem; - } - - export interface HistoricalScheduler extends VirtualTimeScheduler { - } - - export var HistoricalScheduler: { - new (initialClock: number, comparer: (first: number, second: number) => number): HistoricalScheduler; - }; -} - -declare module "rx.virtualtime" { - export = Rx; -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/.travis.yml b/tools/eslint/node_modules/inquirer/node_modules/through/.travis.yml deleted file mode 100644 index c693a939df9809..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.MIT b/tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd734a6e06..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/eslint/node_modules/inquirer/node_modules/through/index.js b/tools/eslint/node_modules/inquirer/node_modules/through/index.js deleted file mode 100644 index ca5fc5901fd875..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/package.json b/tools/eslint/node_modules/inquirer/node_modules/through/package.json deleted file mode 100644 index ec7f7ac6fe4a58..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "through", - "version": "2.3.7", - "description": "simplified stream construction", - "main": "index.js", - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "devDependencies": { - "stream-spec": "~0.3.5", - "tape": "~2.3.2", - "from": "~0.1.3" - }, - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "homepage": "http://github.com/dominictarr/through", - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "gitHead": "d532966ebcae90fd6a150cc489b55c6a4e0bc4a0", - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "_id": "through@2.3.7", - "_shasum": "5fcc3690fed2fdf98c6fc88b4d207a4624ac3b87", - "_from": "through@>=2.3.6 <3.0.0", - "_npmVersion": "2.4.1", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "dist": { - "shasum": "5fcc3690fed2fdf98c6fc88b4d207a4624ac3b87", - "tarball": "http://registry.npmjs.org/through/-/through-2.3.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/readme.markdown b/tools/eslint/node_modules/inquirer/node_modules/through/readme.markdown deleted file mode 100644 index cb34c8135f53eb..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/test/async.js b/tools/eslint/node_modules/inquirer/node_modules/through/test/async.js deleted file mode 100644 index 46bdbaebcbc09b..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/test/auto-destroy.js b/tools/eslint/node_modules/inquirer/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd0006f5b80..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/test/buffering.js b/tools/eslint/node_modules/inquirer/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bfc6ed5ac..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/test/end.js b/tools/eslint/node_modules/inquirer/node_modules/through/test/end.js deleted file mode 100644 index fa113f58e0360a..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/test/index.js b/tools/eslint/node_modules/inquirer/node_modules/through/test/index.js deleted file mode 100644 index 96da82f97c74cf..00000000000000 --- a/tools/eslint/node_modules/inquirer/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/tools/eslint/node_modules/inquirer/package.json b/tools/eslint/node_modules/inquirer/package.json index f7544323339e48..e80eebb65ad3ea 100644 --- a/tools/eslint/node_modules/inquirer/package.json +++ b/tools/eslint/node_modules/inquirer/package.json @@ -1,75 +1,106 @@ { - "name": "inquirer", - "version": "0.8.5", - "description": "A collection of common interactive command line user interfaces.", - "main": "lib/inquirer.js", - "scripts": { - "test": "grunt --verbose" + "_args": [ + [ + "inquirer@^0.11.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "inquirer@>=0.11.0 <0.12.0", + "_id": "inquirer@0.11.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/inquirer", + "_nodeVersion": "5.2.0", + "_npmUser": { + "email": "admin@simonboudrias.com", + "name": "sboudrias" }, - "repository": { - "type": "git", - "url": "git+https://github.com/sboudrias/Inquirer.js.git" + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "name": "inquirer", + "raw": "inquirer@^0.11.0", + "rawSpec": "^0.11.0", + "scope": null, + "spec": ">=0.11.0 <0.12.0", + "type": "range" }, - "keywords": [ - "command", - "prompt", - "stdin", - "cli", - "tty", - "menu" + "_requiredBy": [ + "/eslint" ], + "_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.2.tgz", + "_shasum": "f280aefd71fa27a9f16b3f63297b529465b3d562", + "_shrinkwrap": null, + "_spec": "inquirer@^0.11.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", "author": { - "name": "Simon Boudrias", - "email": "admin@simonboudrias.com" + "email": "admin@simonboudrias.com", + "name": "Simon Boudrias" + }, + "bugs": { + "url": "https://github.com/sboudrias/Inquirer.js/issues" }, - "license": "MIT", - "files": [ - "lib" - ], "dependencies": { - "ansi-regex": "^1.1.1", + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", "cli-width": "^1.0.1", "figures": "^1.3.5", "lodash": "^3.3.1", - "readline2": "^0.1.1", - "rx": "^2.4.3", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "strip-ansi": "^3.0.0", "through": "^2.3.6" }, + "description": "A collection of common interactive command line user interfaces.", "devDependencies": { - "chai": "^2.1.2", + "chai": "^3.0.0", "cmdify": "^0.0.4", "grunt": "^0.4.1", "grunt-cli": "^0.1.8", "grunt-contrib-jshint": "^0.11.1", - "grunt-mocha-test": "^0.10.2", + "grunt-mocha-test": "^0.12.7", "mocha": "^2.2.1", "mockery": "^1.4.0", "sinon": "^1.12.1" }, - "_id": "inquirer@0.8.5", + "directories": {}, "dist": { - "shasum": "dbd740cf6ca3b731296a63ce6f6d961851f336df", - "tarball": "http://registry.npmjs.org/inquirer/-/inquirer-0.8.5.tgz" - }, - "_from": "inquirer@>=0.8.2 <0.9.0", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "sboudrias", - "email": "admin@simonboudrias.com" + "shasum": "f280aefd71fa27a9f16b3f63297b529465b3d562", + "tarball": "http://registry.npmjs.org/inquirer/-/inquirer-0.11.2.tgz" }, + "files": [ + "lib" + ], + "gitHead": "9ce4983ef6a4dcfb08b8ea3f98c78a009451034f", + "homepage": "https://github.com/sboudrias/Inquirer.js#readme", + "keywords": [ + "cli", + "command", + "menu", + "prompt", + "stdin", + "tty" + ], + "license": "MIT", + "main": "lib/inquirer.js", "maintainers": [ { "name": "sboudrias", "email": "admin@simonboudrias.com" } ], - "directories": {}, - "_shasum": "dbd740cf6ca3b731296a63ce6f6d961851f336df", - "_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.8.5.tgz", - "bugs": { - "url": "https://github.com/sboudrias/Inquirer.js/issues" - }, + "name": "inquirer", + "optionalDependencies": {}, "readme": "ERROR: No README data found!", - "homepage": "https://github.com/sboudrias/Inquirer.js#readme" + "repository": { + "type": "git", + "url": "git+https://github.com/sboudrias/Inquirer.js.git" + }, + "scripts": { + "test": "grunt --verbose" + }, + "version": "0.11.2" } diff --git a/tools/eslint/node_modules/is-buffer/.zuul.yml b/tools/eslint/node_modules/is-buffer/.zuul.yml new file mode 100644 index 00000000000000..7b84b05ede12f7 --- /dev/null +++ b/tools/eslint/node_modules/is-buffer/.zuul.yml @@ -0,0 +1,18 @@ +ui: tape +browsers: + - name: chrome + version: 39..latest + - name: firefox + version: 34..latest + - name: safari + version: 5..latest + - name: ie + version: 8..latest + - name: opera + version: 11..latest + - name: iphone + version: 5.1..latest + - name: ipad + version: 5.1..latest + - name: android + version: 5.0..latest diff --git a/tools/eslint/node_modules/is-buffer/LICENSE b/tools/eslint/node_modules/is-buffer/LICENSE new file mode 100644 index 00000000000000..0c068ceecbd48f --- /dev/null +++ b/tools/eslint/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +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/eslint/node_modules/is-buffer/README.md b/tools/eslint/node_modules/is-buffer/README.md new file mode 100644 index 00000000000000..82f7fcfa1f03c2 --- /dev/null +++ b/tools/eslint/node_modules/is-buffer/README.md @@ -0,0 +1,49 @@ +# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (incl. [browser Buffers](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg?style=flat +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg?style=flat +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg?style=flat +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/tools/eslint/node_modules/is-buffer/index.js b/tools/eslint/node_modules/is-buffer/index.js new file mode 100644 index 00000000000000..ef028240a80ec8 --- /dev/null +++ b/tools/eslint/node_modules/is-buffer/index.js @@ -0,0 +1,17 @@ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} diff --git a/tools/eslint/node_modules/is-buffer/package.json b/tools/eslint/node_modules/is-buffer/package.json new file mode 100644 index 00000000000000..b795e1c4f5f409 --- /dev/null +++ b/tools/eslint/node_modules/is-buffer/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "is-buffer@^1.0.2", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/kind-of" + ] + ], + "_from": "is-buffer@>=1.0.2 <2.0.0", + "_id": "is-buffer@1.1.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-buffer", + "_nodeVersion": "4.2.3", + "_npmUser": { + "email": "feross@feross.org", + "name": "feross" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-buffer", + "raw": "is-buffer@^1.0.2", + "rawSpec": "^1.0.2", + "scope": null, + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/kind-of" + ], + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz", + "_shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "_shrinkwrap": null, + "_spec": "is-buffer@^1.0.2", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/kind-of", + "author": { + "email": "feross@feross.org", + "name": "Feross Aboukhadijeh", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "description": "Determine if an object is Buffer", + "devDependencies": { + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "shasum": "3058de9ca454564e8bbe5b8dd2719a8d7089e7d7", + "tarball": "http://registry.npmjs.org/is-buffer/-/is-buffer-1.1.1.tgz" + }, + "gitHead": "9ccd67d6ca6476d1cb7b38fd9fc7d9d71d212f5c", + "homepage": "http://feross.org", + "keywords": [ + "arraybuffer", + "browser", + "browser buffer", + "browserify", + "buffer", + "buffers", + "core buffer", + "dataview", + "float32array", + "float64array", + "int16array", + "int32array", + "type", + "typed array", + "uint32array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "name": "is-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + }, + "version": "1.1.1" +} diff --git a/tools/eslint/node_modules/is-fullwidth-code-point/index.js b/tools/eslint/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 00000000000000..a7d3e3855f1c24 --- /dev/null +++ b/tools/eslint/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +var numberIsNan = require('number-is-nan'); + +module.exports = function (x) { + if (numberIsNan(x)) { + return false; + } + + // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369 + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if (x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + 0x2329 === x || // LEFT-POINTING ANGLE BRACKET + 0x232a === x || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || + // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || + // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || + // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || + // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || + // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || + // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || + // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || + 0xffe0 <= x && x <= 0xffe6 || + // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || + // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; +} diff --git a/tools/eslint/node_modules/is-fullwidth-code-point/license b/tools/eslint/node_modules/is-fullwidth-code-point/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/eslint/node_modules/is-fullwidth-code-point/package.json b/tools/eslint/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 00000000000000..1f8ebc91a63d04 --- /dev/null +++ b/tools/eslint/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "is-fullwidth-code-point@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readline2" + ] + ], + "_from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "_id": "is-fullwidth-code-point@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-fullwidth-code-point", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "is-fullwidth-code-point", + "raw": "is-fullwidth-code-point@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/readline2" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", + "_shrinkwrap": null, + "_spec": "is-fullwidth-code-point@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readline2", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "0.0.4", + "code-point-at": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", + "tarball": "http://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f2152d357f41f82785436d428e4f8ede143b7548", + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point", + "keywords": [ + "char", + "character", + "check", + "code", + "codepoint", + "detect", + "full", + "full-width", + "fullwidth", + "is", + "point", + "str", + "string", + "unicode", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-fullwidth-code-point", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/is-fullwidth-code-point/readme.md b/tools/eslint/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 00000000000000..4936464b1b4155 --- /dev/null +++ b/tools/eslint/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +var isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/is-my-json-valid/.npmignore b/tools/eslint/node_modules/is-my-json-valid/.npmignore deleted file mode 100644 index dbb0721ce547c1..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -cosmicrealms.com diff --git a/tools/eslint/node_modules/is-my-json-valid/.travis.yml b/tools/eslint/node_modules/is-my-json-valid/.travis.yml deleted file mode 100644 index 6e5919de39a312..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/tools/eslint/node_modules/is-my-json-valid/README.md b/tools/eslint/node_modules/is-my-json-valid/README.md index 47350d84fa795b..cbf2b20d336045 100644 --- a/tools/eslint/node_modules/is-my-json-valid/README.md +++ b/tools/eslint/node_modules/is-my-json-valid/README.md @@ -85,7 +85,7 @@ var schema = { } // pass the external schemas as an option -var validate = validate(schema, {schemas: {ext: ext}}) +var validate = validator(schema, {schemas: {ext: ext}}) validate('hello') // returns true validate(42) // return false diff --git a/tools/eslint/node_modules/is-my-json-valid/index.js b/tools/eslint/node_modules/is-my-json-valid/index.js index 6fef4ed6f0f5c0..f24db9b1c9062b 100644 --- a/tools/eslint/node_modules/is-my-json-valid/index.js +++ b/tools/eslint/node_modules/is-my-json-valid/index.js @@ -190,7 +190,7 @@ var compile = function(schema, cache, root, reporter, opts) { validate('for (var %s = %d; %s < %s.length; %s++) {', i, node.items.length, i, name, i) visit(name+'['+i+']', node.additionalItems, reporter, filter) validate('}') - } + } } if (node.format && fmts[node.format]) { @@ -395,7 +395,7 @@ var compile = function(schema, cache, root, reporter, opts) { node.anyOf.forEach(function(sch, i) { if (i === 0) { validate('var %s = errors', prev) - } else { + } else { validate('if (errors !== %s) {', prev) ('errors = %s', prev) } @@ -446,7 +446,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.maxProperties !== undefined) { if (type !== 'object') validate('if (%s) {', types.object(name)) - + validate('if (Object.keys(%s).length > %d) {', name, node.maxProperties) error('has more properties than allowed') validate('}') @@ -456,7 +456,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.minProperties !== undefined) { if (type !== 'object') validate('if (%s) {', types.object(name)) - + validate('if (Object.keys(%s).length < %d) {', name, node.minProperties) error('has less properties than allowed') validate('}') @@ -466,7 +466,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.maxItems !== undefined) { if (type !== 'array') validate('if (%s) {', types.array(name)) - + validate('if (%s.length > %d) {', name, node.maxItems) error('has more items than allowed') validate('}') @@ -476,7 +476,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.minItems !== undefined) { if (type !== 'array') validate('if (%s) {', types.array(name)) - + validate('if (%s.length < %d) {', name, node.minItems) error('has less items than allowed') validate('}') @@ -518,7 +518,11 @@ var compile = function(schema, cache, root, reporter, opts) { if (properties) { Object.keys(properties).forEach(function(p) { + if (Array.isArray(type) && type.indexOf('null') !== -1) validate('if (%s !== null) {', name) + visit(genobj(name, p), properties[p], reporter, filter) + + if (Array.isArray(type) && type.indexOf('null') !== -1) validate('}') }) } @@ -539,14 +543,16 @@ var compile = function(schema, cache, root, reporter, opts) { validate = validate.toFunction(scope) validate.errors = null - validate.__defineGetter__('error', function() { - if (!validate.errors) return '' - return validate.errors - .map(function(err) { - return err.field+' '+err.message - }) - .join('\n') - }) + if (Object.defineProperty) { + Object.defineProperty(validate, 'error', { + get: function() { + if (!validate.errors) return '' + return validate.errors.map(function(err) { + return err.field + ' ' + err.message; + }).join('\n') + } + }) + } validate.toJSON = function() { return schema diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore deleted file mode 100644 index 3c3629e647f5dd..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml deleted file mode 100644 index 6e5919de39a312..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/package.json b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/package.json deleted file mode 100644 index db1ac2aa364f5d..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "generate-function", - "version": "2.0.0", - "description": "Module that helps you write generated functions in Node", - "main": "index.js", - "scripts": { - "test": "tape test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/generate-function.git" - }, - "keywords": [ - "generate", - "code", - "generation", - "function", - "performance" - ], - "author": { - "name": "Mathias Buus" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/generate-function/issues" - }, - "homepage": "https://github.com/mafintosh/generate-function", - "devDependencies": { - "tape": "^2.13.4" - }, - "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149", - "_id": "generate-function@2.0.0", - "_shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74", - "_from": "generate-function@>=2.0.0 <3.0.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "dist": { - "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74", - "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/test.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/test.js deleted file mode 100644 index 2768893eb15066..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-function/test.js +++ /dev/null @@ -1,33 +0,0 @@ -var tape = require('tape') -var genfun = require('./') - -tape('generate add function', function(t) { - var fn = genfun() - ('function add(n) {') - ('return n + %d', 42) - ('}') - - t.same(fn.toString(), 'function add(n) {\n return n + 42\n}', 'code is indented') - t.same(fn.toFunction()(10), 52, 'function works') - t.end() -}) - -tape('generate function + closed variables', function(t) { - var fn = genfun() - ('function add(n) {') - ('return n + %d + number', 42) - ('}') - - var notGood = fn.toFunction() - var good = fn.toFunction({number:10}) - - try { - notGood(10) - t.ok(false, 'function should not work') - } catch (err) { - t.same(err.message, 'number is not defined', 'throws reference error') - } - - t.same(good(11), 63, 'function with closed var works') - t.end() -}) \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore deleted file mode 100644 index 3c3629e647f5dd..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml deleted file mode 100644 index 6e5919de39a312..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore deleted file mode 100644 index 8ecfa25a868d83..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore +++ /dev/null @@ -1,17 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules/* -*.DS_Store -test/* \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md deleted file mode 100644 index ef1d00b62f8022..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md +++ /dev/null @@ -1,28 +0,0 @@ -is-property -=========== -Tests if a property of a JavaScript object can be accessed using the dot (.) notation or if it must be enclosed in brackets, (ie use x[" ... "]) - -Example -------- - -```javascript -var isProperty = require("is-property") - -console.log(isProperty("foo")) //Prints true -console.log(isProperty("0")) //Prints false -``` - -Install -------- - - npm install is-property - -### `require("is-property")(str)` -Checks if str is a property - -* `str` is a string which we will test if it is a property or not - -**Returns** true or false depending if str is a property - -## Credits -(c) 2013 Mikola Lysenko. MIT License \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json deleted file mode 100644 index 9f23619477398c..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "is-property", - "version": "1.0.2", - "description": "Tests if a JSON property can be accessed using . syntax", - "main": "is-property.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.0.4" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/mikolalysenko/is-property.git" - }, - "keywords": [ - "is", - "property", - "json", - "dot", - "bracket", - ".", - "[]" - ], - "author": { - "name": "Mikola Lysenko" - }, - "license": "MIT", - "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50", - "bugs": { - "url": "https://github.com/mikolalysenko/is-property/issues" - }, - "homepage": "https://github.com/mikolalysenko/is-property", - "_id": "is-property@1.0.2", - "_shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", - "_from": "is-property@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.4", - "_nodeVersion": "0.10.26", - "_npmUser": { - "name": "mikolalysenko", - "email": "mikolalysenko@gmail.com" - }, - "maintainers": [ - { - "name": "mikolalysenko", - "email": "mikolalysenko@gmail.com" - } - ], - "dist": { - "shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", - "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - }, - "_resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json deleted file mode 100644 index 8bc73da759fde0..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "generate-object-property", - "version": "1.2.0", - "description": "Generate safe JS code that can used to reference a object property", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/generate-object-property.git" - }, - "devDependencies": { - "tape": "^2.13.0" - }, - "scripts": { - "test": "tape test.js" - }, - "dependencies": { - "is-property": "^1.0.0" - }, - "bugs": { - "url": "https://github.com/mafintosh/generate-object-property/issues" - }, - "homepage": "https://github.com/mafintosh/generate-object-property", - "main": "index.js", - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" - }, - "license": "MIT", - "gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c", - "_id": "generate-object-property@1.2.0", - "_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0", - "_from": "generate-object-property@>=1.1.0 <2.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "dist": { - "shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0", - "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js deleted file mode 100644 index 6c299c67fd3165..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js +++ /dev/null @@ -1,12 +0,0 @@ -var tape = require('tape') -var gen = require('./') - -tape('valid', function(t) { - t.same(gen('a', 'b'), 'a.b') - t.end() -}) - -tape('invalid', function(t) { - t.same(gen('a', '-b'), 'a["-b"]') - t.end() -}) \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml b/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml deleted file mode 100644 index a057a7c6373342..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: "node_js" -node_js: - - 0.4 - - 0.5 - - 0.6 - - 0.8 diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md b/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md deleted file mode 100644 index bcfdb1a4ec806a..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# JSON Pointer for nodejs - -This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). - -## Usage - - var jsonpointer = require("jsonpointer"); - var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var one = jsonpointer.get(obj, "/foo"); - var two = jsonpointer.get(obj, "/bar/baz"); - var three = jsonpointer.get(obj, "/qux/0"); - var four = jsonpointer.get(obj, "/qux/1"); - var five = jsonpointer.get(obj, "/qux/2"); - - jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; - -## Testing - - $ node test.js - All tests pass. - $ - -[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](undefined) - -## Author - -(c) 2011 Jan Lehnardt - -## License - -MIT License. \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json b/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json deleted file mode 100644 index bde9b77dd91669..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "jsonpointer", - "description": "Simple JSON Addressing.", - "tags": [ - "util", - "simple", - "util", - "utility" - ], - "version": "1.1.0", - "author": { - "name": "Jan Lehnardt", - "email": "jan@apache.org" - }, - "contributors": [ - { - "name": "Joe Hildebrand", - "email": "joe-github@cursive.net" - }, - { - "name": "Filip Noetzel" - } - ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" - }, - "bugs": { - "url": "http://github.com/janl/node-jsonpointer/issues" - }, - "engines": [ - "node >= 0.4.9" - ], - "main": "./jsonpointer", - "scripts": { - "test": "node test.js" - }, - "readme": "# JSON Pointer for nodejs\n\nThis is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).\n\n## Usage\n\n var jsonpointer = require(\"jsonpointer\");\n var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};\n var one = jsonpointer.get(obj, \"/foo\");\n var two = jsonpointer.get(obj, \"/bar/baz\");\n var three = jsonpointer.get(obj, \"/qux/0\");\n var four = jsonpointer.get(obj, \"/qux/1\");\n var five = jsonpointer.get(obj, \"/qux/2\");\n\n jsonpointer.set(obj, \"/foo\", 6); // obj.foo = 6;\n\n## Testing\n\n $ node test.js\n All tests pass.\n $\n\n[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](undefined)\n\n## Author\n\n(c) 2011 Jan Lehnardt \n\n## License\n\nMIT License.", - "readmeFilename": "README.md", - "_id": "jsonpointer@1.1.0", - "dist": { - "shasum": "c3c72efaed3b97154163dc01dd349e1cfe0f80fc", - "tarball": "http://registry.npmjs.org/jsonpointer/-/jsonpointer-1.1.0.tgz" - }, - "_npmVersion": "1.1.69", - "_npmUser": { - "name": "jan", - "email": "jan@apache.org" - }, - "maintainers": [ - { - "name": "jan", - "email": "jan@apache.org" - } - ], - "directories": {}, - "_shasum": "c3c72efaed3b97154163dc01dd349e1cfe0f80fc", - "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-1.1.0.tgz", - "_from": "jsonpointer@>=1.1.0 <2.0.0", - "homepage": "https://github.com/janl/node-jsonpointer" -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js deleted file mode 100644 index cdb8ec506c339e..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +++ /dev/null @@ -1,100 +0,0 @@ -var assert = require("assert"); -var console = require("console"); -var jsonpointer = require("./jsonpointer"); - -var obj = { - a: 1, - b: { - c: 2 - }, - d: { - e: [{a:3}, {b:4}, {c:5}] - } -}; - -assert.equal(jsonpointer.get(obj, "/a"), 1); -assert.equal(jsonpointer.get(obj, "/b/c"), 2); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5); - -// set returns old value -assert.equal(jsonpointer.set(obj, "/a", 2), 1); -assert.equal(jsonpointer.set(obj, "/b/c", 3), 2); -assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3); -assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4); -assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5); - -assert.equal(jsonpointer.get(obj, "/a"), 2); -assert.equal(jsonpointer.get(obj, "/b/c"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6); - -assert.equal(jsonpointer.get(obj, ""), obj); -assert.throws(function() { - assert.equal(jsonpointer.get(obj, "a"), 3); -}); - -var complexKeys = { - "a/b": { - c: 1 - }, - d: { - "e/f": 2 - }, - "~1": 3, - "01": 4 -} - -assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1); -assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2); -assert.equal(jsonpointer.get(complexKeys, "/~01"), 3); -assert.equal(jsonpointer.get(complexKeys, "/01"), 4); -assert.throws(function() { - assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), 1); -}); -assert.throws(function() { - assert.equal(jsonpointer.get(complexKeys, "/~1"), 3); -}); - -// draft-ietf-appsawg-json-pointer-08 has special array rules -var ary = [ "zero", "one", "two" ]; - -assert.throws(function() { - assert.equal(jsonpointer.get(ary, "/01"), "one"); -}); -//assert.equal(jsonpointer.set(ary, "/-", "three"), null); -//assert.equal(ary[3], "three"); - -// Examples from the draft: -var example = { - "foo": ["bar", "baz"], - "": 0, - "a/b": 1, - "c%d": 2, - "e^f": 3, - "g|h": 4, - "i\\j": 5, - "k\"l": 6, - " ": 7, - "m~n": 8 -}; - -assert.equal(jsonpointer.get(example, ""), example); -var ans = jsonpointer.get(example, "/foo"); -assert.equal(ans.length, 2); -assert.equal(ans[0], "bar"); -assert.equal(ans[1], "baz"); -assert.equal(jsonpointer.get(example, "/foo/0"), "bar"); -assert.equal(jsonpointer.get(example, "/"), 0); -assert.equal(jsonpointer.get(example, "/a~1b"), 1); -assert.equal(jsonpointer.get(example, "/c%d"), 2); -assert.equal(jsonpointer.get(example, "/e^f"), 3); -assert.equal(jsonpointer.get(example, "/g|h"), 4); -assert.equal(jsonpointer.get(example, "/i\\j"), 5); -assert.equal(jsonpointer.get(example, "/k\"l"), 6); -assert.equal(jsonpointer.get(example, "/ "), 7); -assert.equal(jsonpointer.get(example, "/m~0n"), 8); - -console.log("All tests pass."); diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f0f2efc..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "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/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.npmignore b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e647f5dd..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/immutable.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/immutable.js deleted file mode 100644 index 5b760152b75041..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/immutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/mutable.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/mutable.js deleted file mode 100644 index a34475ebddf63f..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/mutable.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = extend - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/package.json b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/package.json deleted file mode 100644 index 907a720da7e2f6..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "xtend", - "version": "4.0.0", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "immutable", - "scripts": { - "test": "node test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..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" - ] - }, - "engines": { - "node": ">=0.4" - }, - "gitHead": "94a95d76154103290533b2c55ffa0fe4be16bfef", - "_id": "xtend@4.0.0", - "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", - "_from": "xtend@>=4.0.0 <5.0.0", - "_npmVersion": "1.4.15", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "dist": { - "shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/test.js b/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/test.js deleted file mode 100644 index 3369d79660b184..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/tools/eslint/node_modules/is-my-json-valid/package.json b/tools/eslint/node_modules/is-my-json-valid/package.json index 79099026347b8c..8e6db770abba4c 100644 --- a/tools/eslint/node_modules/is-my-json-valid/package.json +++ b/tools/eslint/node_modules/is-my-json-valid/package.json @@ -1,49 +1,74 @@ { - "name": "is-my-json-valid", - "version": "2.12.0", - "description": "A JSONSchema validator that uses code generation to be extremely fast", - "main": "index.js", + "_args": [ + [ + "is-my-json-valid@^2.10.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "is-my-json-valid@>=2.10.0 <3.0.0", + "_id": "is-my-json-valid@2.12.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-my-json-valid", + "_nodeVersion": "4.1.1", + "_npmUser": { + "email": "mathiasbuus@gmail.com", + "name": "mafintosh" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "is-my-json-valid", + "raw": "is-my-json-valid@^2.10.0", + "rawSpec": "^2.10.0", + "scope": null, + "spec": ">=2.10.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz", + "_shasum": "5a39d1d76b2dbb83140bbd157b1d5ee4bdc85ad6", + "_shrinkwrap": null, + "_spec": "is-my-json-valid@^2.10.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "name": "Mathias Buus" + }, + "bugs": { + "url": "https://github.com/mafintosh/is-my-json-valid/issues" + }, "dependencies": { "generate-function": "^2.0.0", "generate-object-property": "^1.1.0", - "jsonpointer": "^1.1.0", + "jsonpointer": "2.0.0", "xtend": "^4.0.0" }, + "description": "A JSONSchema validator that uses code generation to be extremely fast", "devDependencies": { "tape": "^2.13.4" }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/is-my-json-valid.git" + "directories": {}, + "dist": { + "shasum": "5a39d1d76b2dbb83140bbd157b1d5ee4bdc85ad6", + "tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz" }, + "gitHead": "822c5815f7ae4c50ed0c71451cb4dc3ea177be14", + "homepage": "https://github.com/mafintosh/is-my-json-valid", "keywords": [ "json", - "schema", + "jsonschema", "orderly", - "jsonschema" + "schema" ], - "author": { - "name": "Mathias Buus" - }, "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/is-my-json-valid/issues" - }, - "homepage": "https://github.com/mafintosh/is-my-json-valid", - "gitHead": "fc2d995ecb1bdb0f367ddf114dfd069265043c6c", - "_id": "is-my-json-valid@2.12.0", - "_shasum": "8fa6c408b26be95b45a23e8f8c4b464a53874d2b", - "_from": "is-my-json-valid@>=2.10.0 <3.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, + "main": "index.js", "maintainers": [ + { + "name": "freeall", + "email": "freeall@gmail.com" + }, { "name": "mafintosh", "email": "mathiasbuus@gmail.com" @@ -53,15 +78,19 @@ "email": "w@tson.dk" }, { - "name": "freeall", - "email": "freeall@gmail.com" + "name": "yoshuawuyts", + "email": "i@yoshuawuyts.com" } ], - "dist": { - "shasum": "8fa6c408b26be95b45a23e8f8c4b464a53874d2b", - "tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.0.tgz" + "name": "is-my-json-valid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mafintosh/is-my-json-valid.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.0.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "test": "tape test/*.js" + }, + "version": "2.12.3" } diff --git a/tools/eslint/node_modules/is-my-json-valid/test/fixtures/cosmic.js b/tools/eslint/node_modules/is-my-json-valid/test/fixtures/cosmic.js deleted file mode 100644 index 4e0a34b210c52b..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/fixtures/cosmic.js +++ /dev/null @@ -1,84 +0,0 @@ -exports.valid = { - fullName : "John Doe", - age : 47, - state : "Massachusetts", - city : "Boston", - zip : 16417, - married : false, - dozen : 12, - dozenOrBakersDozen : 13, - favoriteEvenNumber : 14, - topThreeFavoriteColors : [ "red", "blue", "green" ], - favoriteSingleDigitWholeNumbers : [ 7 ], - favoriteFiveLetterWord : "coder", - emailAddresses : - [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@letters-in-local.org", - "01234567890@numbers-in-local.net", - "&'*+-./=?^_{}~@other-valid-characters-in-local.net", - "mixed-1234-in-{+^}-local@sld.net", - "a@single-character-in-local.org", - "\"quoted\"@sld.com", - "\"\\e\\s\\c\\a\\p\\e\\d\"@sld.com", - "\"quoted-at-sign@sld.org\"@sld.com", - "\"escaped\\\"quote\"@sld.com", - "\"back\\slash\"@sld.com", - "one-character-third-level@a.example.com", - "single-character-in-sld@x.org", - "local@dash-in-sld.com", - "letters-in-sld@123.com", - "one-letter-sld@x.org", - "uncommon-tld@sld.museum", - "uncommon-tld@sld.travel", - "uncommon-tld@sld.mobi", - "country-code-tld@sld.uk", - "country-code-tld@sld.rw", - "local@sld.newTLD", - "the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org", - "the-character-limit@for-each-part.of-the-domain.is-sixty-three-characters.this-is-exactly-sixty-three-characters-so-it-is-valid-blah-blah.com", - "local@sub.domains.com" - ], - ipAddresses : [ "127.0.0.1", "24.48.64.2", "192.168.1.1", "209.68.44.3", "2.2.2.2" ] -} - -exports.invalid = { - fullName : null, - age : -1, - state : 47, - city : false, - zip : [null], - married : "yes", - dozen : 50, - dozenOrBakersDozen : "over 9000", - favoriteEvenNumber : 15, - topThreeFavoriteColors : [ "red", 5 ], - favoriteSingleDigitWholeNumbers : [ 78, 2, 999 ], - favoriteFiveLetterWord : "codernaut", - emailAddresses : [], - ipAddresses : [ "999.0.099.1", "294.48.64.2346", false, "2221409.64214128.42414.235233", "124124.12412412" ] -} - -exports.schema = { // from cosmic thingy - name : "test", - type : "object", - additionalProperties : false, - required : ["fullName", "age", "zip", "married", "dozen", "dozenOrBakersDozen", "favoriteEvenNumber", "topThreeFavoriteColors", "favoriteSingleDigitWholeNumbers", "favoriteFiveLetterWord", "emailAddresses", "ipAddresses"], - properties : - { - fullName : { type : "string" }, - age : { type : "integer", minimum : 0 }, - optionalItem : { type : "string" }, - state : { type : "string" }, - city : { type : "string" }, - zip : { type : "integer", minimum : 0, maximum : 99999 }, - married : { type : "boolean" }, - dozen : { type : "integer", minimum : 12, maximum : 12 }, - dozenOrBakersDozen : { type : "integer", minimum : 12, maximum : 13 }, - favoriteEvenNumber : { type : "integer", multipleOf : 2 }, - topThreeFavoriteColors : { type : "array", minItems : 3, maxItems : 3, uniqueItems : true, items : { type : "string" }}, - favoriteSingleDigitWholeNumbers : { type : "array", minItems : 1, maxItems : 10, uniqueItems : true, items : { type : "integer", minimum : 0, maximum : 9 }}, - favoriteFiveLetterWord : { type : "string", minLength : 5, maxLength : 5 }, - emailAddresses : { type : "array", minItems : 1, uniqueItems : true, items : { type : "string", format : "email" }}, - ipAddresses : { type : "array", uniqueItems : true, items : { type : "string", format : "ipv4" }}, - } - } \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json deleted file mode 100644 index 521745c8d6ed50..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "additionalItems as schema", - "schema": { - "items": [{}], - "additionalItems": {"type": "integer"} - }, - "tests": [ - { - "description": "additional items match schema", - "data": [ null, 2, 3, 4 ], - "valid": true - }, - { - "description": "additional items do not match schema", - "data": [ null, 2, 3, "foo" ], - "valid": false - } - ] - }, - { - "description": "items is schema, no additionalItems", - "schema": { - "items": {}, - "additionalItems": false - }, - "tests": [ - { - "description": "all items match schema", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - } - ] - }, - { - "description": "array of items with no additionalItems", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "no additional items present", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "additional items are not permitted", - "data": [ 1, 2, 3, 4 ], - "valid": false - } - ] - }, - { - "description": "additionalItems as false without items", - "schema": {"additionalItems": false}, - "tests": [ - { - "description": - "items defaults to empty schema so everything is valid", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - } - ] - }, - { - "description": "additionalItems are allowed by default", - "schema": {"items": [{"type": "integer"}]}, - "tests": [ - { - "description": "only the first item is validated", - "data": [1, "foo", false], - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json deleted file mode 100644 index 40831f9e9aa135..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json +++ /dev/null @@ -1,88 +0,0 @@ -[ - { - "description": - "additionalProperties being false does not allow other properties", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "patternProperties": { "^v": {} }, - "additionalProperties": false - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, - "valid": false - }, - { - "description": "ignores non-objects", - "data": [1, 2, 3], - "valid": true - }, - { - "description": "patternProperties are not additional properties", - "data": {"foo":1, "vroom": 2}, - "valid": true - } - ] - }, - { - "description": - "additionalProperties allows a schema which should validate", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional valid property is valid", - "data": {"foo" : 1, "bar" : 2, "quux" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : 12}, - "valid": false - } - ] - }, - { - "description": - "additionalProperties can exist by itself", - "schema": { - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "an additional valid property is valid", - "data": {"foo" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1}, - "valid": false - } - ] - }, - { - "description": "additionalProperties are allowed by default", - "schema": {"properties": {"foo": {}, "bar": {}}}, - "tests": [ - { - "description": "additional properties are allowed", - "data": {"foo": 1, "bar": 2, "quux": true}, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json deleted file mode 100644 index bbb5f89e4bc5e1..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "description": "allOf", - "schema": { - "allOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "allOf", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "mismatch second", - "data": {"foo": "baz"}, - "valid": false - }, - { - "description": "mismatch first", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "wrong type", - "data": {"foo": "baz", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "allOf with base schema", - "schema": { - "properties": {"bar": {"type": "integer"}}, - "required": ["bar"], - "allOf" : [ - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - }, - { - "properties": { - "baz": {"type": "null"} - }, - "required": ["baz"] - } - ] - }, - "tests": [ - { - "description": "valid", - "data": {"foo": "quux", "bar": 2, "baz": null}, - "valid": true - }, - { - "description": "mismatch base schema", - "data": {"foo": "quux", "baz": null}, - "valid": false - }, - { - "description": "mismatch first allOf", - "data": {"bar": 2, "baz": null}, - "valid": false - }, - { - "description": "mismatch second allOf", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "mismatch both", - "data": {"bar": 2}, - "valid": false - } - ] - }, - { - "description": "allOf simple types", - "schema": { - "allOf": [ - {"maximum": 30}, - {"minimum": 20} - ] - }, - "tests": [ - { - "description": "valid", - "data": 25, - "valid": true - }, - { - "description": "mismatch one", - "data": 35, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json deleted file mode 100644 index a58714afd89277..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json +++ /dev/null @@ -1,68 +0,0 @@ -[ - { - "description": "anyOf", - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first anyOf valid", - "data": 1, - "valid": true - }, - { - "description": "second anyOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both anyOf valid", - "data": 3, - "valid": true - }, - { - "description": "neither anyOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "anyOf with base schema", - "schema": { - "type": "string", - "anyOf" : [ - { - "maxLength": 2 - }, - { - "minLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one anyOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both anyOf invalid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json deleted file mode 100644 index ccc7c17fe8d504..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a bignum is an integer", - "data": 12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "description": "a bignum is a number", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": true - } - ] - }, - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "description": "a negative bignum is a number", - "data": -98249283749234923498293171823948729348710298301928331, - "valid": true - } - ] - }, - { - "description": "string", - "schema": {"type": "string"}, - "tests": [ - { - "description": "a bignum is not a string", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": false - } - ] - }, - { - "description": "integer comparison", - "schema": {"maximum": 18446744073709551615}, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision", - "schema": { - "maximum": 972783798187987123879878123.18878137, - "exclusiveMaximum": true - }, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 972783798187987123879878123.188781371, - "valid": false - } - ] - }, - { - "description": "integer comparison", - "schema": {"minimum": -18446744073709551615}, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision on negative numbers", - "schema": { - "minimum": -972783798187987123879878123.18878137, - "exclusiveMinimum": true - }, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -972783798187987123879878123.188781371, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/default.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/default.json deleted file mode 100644 index 17629779fbeabe..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/default.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "description": "invalid type for default", - "schema": { - "properties": { - "foo": { - "type": "integer", - "default": [] - } - } - }, - "tests": [ - { - "description": "valid when property is specified", - "data": {"foo": 13}, - "valid": true - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - }, - { - "description": "invalid string value for default", - "schema": { - "properties": { - "bar": { - "type": "string", - "minLength": 4, - "default": "bad" - } - } - }, - "tests": [ - { - "description": "valid when property is specified", - "data": {"bar": "good"}, - "valid": true - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json deleted file mode 100644 index cf935a321532a6..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "description": "valid definition", - "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, - "tests": [ - { - "description": "valid definition schema", - "data": { - "definitions": { - "foo": {"type": "integer"} - } - }, - "valid": true - } - ] - }, - { - "description": "invalid definition", - "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, - "tests": [ - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json deleted file mode 100644 index 7b9b16a7e125ff..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "description": "dependencies", - "schema": { - "dependencies": {"bar": ["foo"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependant", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "with dependency", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "ignores non-objects", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "multiple dependencies", - "schema": { - "dependencies": {"quux": ["foo", "bar"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependants", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "with dependencies", - "data": {"foo": 1, "bar": 2, "quux": 3}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"foo": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing other dependency", - "data": {"bar": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing both dependencies", - "data": {"quux": 1}, - "valid": false - } - ] - }, - { - "description": "multiple dependencies subschema", - "schema": { - "dependencies": { - "bar": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "integer"} - } - } - } - }, - "tests": [ - { - "description": "valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "no dependency", - "data": {"foo": "quux"}, - "valid": true - }, - { - "description": "wrong type", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "wrong type other", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - }, - { - "description": "wrong type both", - "data": {"foo": "quux", "bar": "quux"}, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json deleted file mode 100644 index f124436a7d9040..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "description": "simple enum validation", - "schema": {"enum": [1, 2, 3]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false - } - ] - }, - { - "description": "heterogeneous enum validation", - "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true - }, - { - "description": "something else is invalid", - "data": null, - "valid": false - }, - { - "description": "objects are deep compared", - "data": {"foo": false}, - "valid": false - } - ] - }, - { - "description": "enums in properties", - "schema": { - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"]} - }, - "required": ["bar"] - }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "description": "missing optional property is valid", - "data": {"bar":"bar"}, - "valid": true - }, - { - "description": "missing required property is invalid", - "data": {"foo":"foo"}, - "valid": false - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/format.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/format.json deleted file mode 100644 index 53c5d2519056c6..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/format.json +++ /dev/null @@ -1,143 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "description": "a valid date-time string", - "data": "1963-06-19T08:30:06.283185Z", - "valid": true - }, - { - "description": "an invalid date-time string", - "data": "06/19/1963 08:30:06 PST", - "valid": false - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "2013-350T01:01:01", - "valid": false - } - ] - }, - { - "description": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URI", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "an invalid URI", - "data": "\\\\WINDOWS\\fileshare", - "valid": false - }, - { - "description": "an invalid URI though valid URI reference", - "data": "abc", - "valid": false - } - ] - }, - { - "description": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - }, - { - "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, - "tests": [ - { - "description": "a valid IP address", - "data": "192.168.0.1", - "valid": true - }, - { - "description": "an IP address with too many components", - "data": "127.0.0.0.1", - "valid": false - }, - { - "description": "an IP address with out-of-range values", - "data": "256.256.256.256", - "valid": false - }, - { - "description": "an IP address without 4 components", - "data": "127.0", - "valid": false - }, - { - "description": "an IP address as an integer", - "data": "0x7f000001", - "valid": false - } - ] - }, - { - "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "valid": false - }, - { - "description": "an IPv6 address with too many components", - "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", - "valid": false - }, - { - "description": "an IPv6 address containing illegal characters", - "data": "::laptop", - "valid": false - } - ] - }, - { - "description": "validation of host names", - "schema": {"format": "hostname"}, - "tests": [ - { - "description": "a valid host name", - "data": "www.example.com", - "valid": true - }, - { - "description": "a host name starting with an illegal character", - "data": "-a-host-name-that-starts-with--", - "valid": false - }, - { - "description": "a host name containing illegal characters", - "data": "not_a_valid_host_name", - "valid": false - }, - { - "description": "a host name with a component too long", - "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/items.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/items.json deleted file mode 100644 index f5e18a13848f71..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/items.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "description": "a schema given for items", - "schema": { - "items": {"type": "integer"} - }, - "tests": [ - { - "description": "valid items", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "wrong type of items", - "data": [1, "x"], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - } - ] - }, - { - "description": "an array of schemas for items", - "schema": { - "items": [ - {"type": "integer"}, - {"type": "string"} - ] - }, - "tests": [ - { - "description": "correct types", - "data": [ 1, "foo" ], - "valid": true - }, - { - "description": "wrong types", - "data": [ "foo", 1 ], - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json deleted file mode 100644 index 3b53a6b371a7b6..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "maxItems validation", - "schema": {"maxItems": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": [1], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "too long is invalid", - "data": [1, 2, 3], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "foobar", - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json deleted file mode 100644 index 48eb1296d2e420..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "maxLength validation", - "schema": {"maxLength": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": "f", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too long is invalid", - "data": "foo", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json deleted file mode 100644 index d282446ad6978d..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "maxProperties validation", - "schema": {"maxProperties": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "too long is invalid", - "data": {"foo": 1, "bar": 2, "baz": 3}, - "valid": false - }, - { - "description": "ignores non-objects", - "data": "foobar", - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json deleted file mode 100644 index 86c7b89c9a9047..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "description": "maximum validation", - "schema": {"maximum": 3.0}, - "tests": [ - { - "description": "below the maximum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 3.5, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "exclusiveMaximum validation", - "schema": { - "maximum": 3.0, - "exclusiveMaximum": true - }, - "tests": [ - { - "description": "below the maximum is still valid", - "data": 2.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 3.0, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json deleted file mode 100644 index ed5118815ee933..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "minItems validation", - "schema": {"minItems": 1}, - "tests": [ - { - "description": "longer is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1], - "valid": true - }, - { - "description": "too short is invalid", - "data": [], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "", - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json deleted file mode 100644 index e9c14b1723efd9..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "minLength validation", - "schema": {"minLength": 2}, - "tests": [ - { - "description": "longer is valid", - "data": "foo", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too short is invalid", - "data": "f", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 1, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json deleted file mode 100644 index a72c7d293e6c3e..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "minProperties validation", - "schema": {"minProperties": 1}, - "tests": [ - { - "description": "longer is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "too short is invalid", - "data": {}, - "valid": false - }, - { - "description": "ignores non-objects", - "data": "", - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json deleted file mode 100644 index d5bf000bcc66f8..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "description": "minimum validation", - "schema": {"minimum": 1.1}, - "tests": [ - { - "description": "above the minimum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "below the minimum is invalid", - "data": 0.6, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "exclusiveMinimum validation", - "schema": { - "minimum": 1.1, - "exclusiveMinimum": true - }, - "tests": [ - { - "description": "above the minimum is still valid", - "data": 1.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 1.1, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json deleted file mode 100644 index ca3b7618053f49..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +++ /dev/null @@ -1,60 +0,0 @@ -[ - { - "description": "by int", - "schema": {"multipleOf": 2}, - "tests": [ - { - "description": "int by int", - "data": 10, - "valid": true - }, - { - "description": "int by int fail", - "data": 7, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "by number", - "schema": {"multipleOf": 1.5}, - "tests": [ - { - "description": "zero is multiple of anything", - "data": 0, - "valid": true - }, - { - "description": "4.5 is multiple of 1.5", - "data": 4.5, - "valid": true - }, - { - "description": "35 is not multiple of 1.5", - "data": 35, - "valid": false - } - ] - }, - { - "description": "by small number", - "schema": {"multipleOf": 0.0001}, - "tests": [ - { - "description": "0.0075 is multiple of 0.0001", - "data": 0.0075, - "valid": true - }, - { - "description": "0.00751 is not multiple of 0.0001", - "data": 0.00751, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/not.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/not.json deleted file mode 100644 index cbb7f46bf8bc5b..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/not.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "description": "not", - "schema": { - "not": {"type": "integer"} - }, - "tests": [ - { - "description": "allowed", - "data": "foo", - "valid": true - }, - { - "description": "disallowed", - "data": 1, - "valid": false - } - ] - }, - { - "description": "not multiple types", - "schema": { - "not": {"type": ["integer", "boolean"]} - }, - "tests": [ - { - "description": "valid", - "data": "foo", - "valid": true - }, - { - "description": "mismatch", - "data": 1, - "valid": false - }, - { - "description": "other mismatch", - "data": true, - "valid": false - } - ] - }, - { - "description": "not more complex schema", - "schema": { - "not": { - "type": "object", - "properties": { - "foo": { - "type": "string" - } - } - } - }, - "tests": [ - { - "description": "match", - "data": 1, - "valid": true - }, - { - "description": "other match", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "mismatch", - "data": {"foo": "bar"}, - "valid": false - } - ] - }, - { - "description": "forbidden property", - "schema": { - "properties": { - "foo": { - "not": {} - } - } - }, - "tests": [ - { - "description": "property present", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "property absent", - "data": {"bar": 1, "baz": 2}, - "valid": true - } - ] - } - -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json deleted file mode 100644 index d7fce9f50907a0..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of null and format", - "schema": {"type": ["null", "string"], "format": "date-time"}, - "tests": [ - { - "description": "a valid date-time string", - "data": "1963-06-19T08:30:06.283185Z", - "valid": true - }, - { - "description": "allow null", - "data": null, - "valid": true - } - ] - } -] \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json deleted file mode 100644 index 1eaa4e47949dc3..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json +++ /dev/null @@ -1,68 +0,0 @@ -[ - { - "description": "oneOf", - "schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first oneOf valid", - "data": 1, - "valid": true - }, - { - "description": "second oneOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both oneOf valid", - "data": 3, - "valid": false - }, - { - "description": "neither oneOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "oneOf with base schema", - "schema": { - "type": "string", - "oneOf" : [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one oneOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both oneOf valid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json deleted file mode 100644 index befc4b560f7c33..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "description": "pattern validation", - "schema": {"pattern": "^a*$"}, - "tests": [ - { - "description": "a matching pattern is valid", - "data": "aaa", - "valid": true - }, - { - "description": "a non-matching pattern is invalid", - "data": "abc", - "valid": false - }, - { - "description": "ignores non-strings", - "data": true, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json deleted file mode 100644 index 18586e5daba602..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json +++ /dev/null @@ -1,110 +0,0 @@ -[ - { - "description": - "patternProperties validates properties matching a regex", - "schema": { - "patternProperties": { - "f.*o": {"type": "integer"} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "multiple valid matches is valid", - "data": {"foo": 1, "foooooo" : 2}, - "valid": true - }, - { - "description": "a single invalid match is invalid", - "data": {"foo": "bar", "fooooo": 2}, - "valid": false - }, - { - "description": "multiple invalid matches is invalid", - "data": {"foo": "bar", "foooooo" : "baz"}, - "valid": false - }, - { - "description": "ignores non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "multiple simultaneous patternProperties are validated", - "schema": { - "patternProperties": { - "a*": {"type": "integer"}, - "aaa*": {"maximum": 20} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"a": 21}, - "valid": true - }, - { - "description": "a simultaneous match is valid", - "data": {"aaaa": 18}, - "valid": true - }, - { - "description": "multiple matches is valid", - "data": {"a": 21, "aaaa": 18}, - "valid": true - }, - { - "description": "an invalid due to one is invalid", - "data": {"a": "bar"}, - "valid": false - }, - { - "description": "an invalid due to the other is invalid", - "data": {"aaaa": 31}, - "valid": false - }, - { - "description": "an invalid due to both is invalid", - "data": {"aaa": "foo", "aaaa": 31}, - "valid": false - } - ] - }, - { - "description": "regexes are not anchored by default and are case sensitive", - "schema": { - "patternProperties": { - "[0-9]{2,}": { "type": "boolean" }, - "X_": { "type": "string" } - } - }, - "tests": [ - { - "description": "non recognized members are ignored", - "data": { "answer 1": "42" }, - "valid": true - }, - { - "description": "recognized members are accounted for", - "data": { "a31b": null }, - "valid": false - }, - { - "description": "regexes are case sensitive", - "data": { "a_x_3": 3 }, - "valid": true - }, - { - "description": "regexes are case sensitive, 2", - "data": { "a_X_3": 3 }, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json deleted file mode 100644 index cd1644dcd91fe0..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "description": "object properties validation", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "both properties present and valid is valid", - "data": {"foo": 1, "bar": "baz"}, - "valid": true - }, - { - "description": "one property invalid is invalid", - "data": {"foo": 1, "bar": {}}, - "valid": false - }, - { - "description": "both properties invalid is invalid", - "data": {"foo": [], "bar": {}}, - "valid": false - }, - { - "description": "doesn't invalidate other properties", - "data": {"quux": []}, - "valid": true - }, - { - "description": "ignores non-objects", - "data": [], - "valid": true - } - ] - }, - { - "description": - "properties, patternProperties, additionalProperties interaction", - "schema": { - "properties": { - "foo": {"type": "array", "maxItems": 3}, - "bar": {"type": "array"} - }, - "patternProperties": {"f.o": {"minItems": 2}}, - "additionalProperties": {"type": "integer"} - }, - "tests": [ - { - "description": "property validates property", - "data": {"foo": [1, 2]}, - "valid": true - }, - { - "description": "property invalidates property", - "data": {"foo": [1, 2, 3, 4]}, - "valid": false - }, - { - "description": "patternProperty invalidates property", - "data": {"foo": []}, - "valid": false - }, - { - "description": "patternProperty validates nonproperty", - "data": {"fxo": [1, 2]}, - "valid": true - }, - { - "description": "patternProperty invalidates nonproperty", - "data": {"fxo": []}, - "valid": false - }, - { - "description": "additionalProperty ignores property", - "data": {"bar": []}, - "valid": true - }, - { - "description": "additionalProperty validates others", - "data": {"quux": 3}, - "valid": true - }, - { - "description": "additionalProperty invalidates others", - "data": {"quux": "foo"}, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json deleted file mode 100644 index d8214bc2b30c1f..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json +++ /dev/null @@ -1,128 +0,0 @@ -[ - { - "description": "root pointer ref", - "schema": { - "properties": { - "foo": {"$ref": "#"} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "match", - "data": {"foo": false}, - "valid": true - }, - { - "description": "recursive match", - "data": {"foo": {"foo": false}}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": false}, - "valid": false - }, - { - "description": "recursive mismatch", - "data": {"foo": {"bar": false}}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to object", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"$ref": "#/properties/foo"} - } - }, - "tests": [ - { - "description": "match", - "data": {"bar": 3}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": true}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to array", - "schema": { - "items": [ - {"type": "integer"}, - {"$ref": "#/items/0"} - ] - }, - "tests": [ - { - "description": "match array", - "data": [1, 2], - "valid": true - }, - { - "description": "mismatch array", - "data": [1, "foo"], - "valid": false - } - ] - }, - { - "description": "escaped pointer ref", - "schema": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent", - "data": {"percent": "aoeu"}, - "valid": false - } - ] - }, - { - "description": "nested refs", - "schema": { - "definitions": { - "a": {"type": "integer"}, - "b": {"$ref": "#/definitions/a"}, - "c": {"$ref": "#/definitions/b"} - }, - "$ref": "#/definitions/c" - }, - "tests": [ - { - "description": "nested ref valid", - "data": 5, - "valid": true - }, - { - "description": "nested ref invalid", - "data": "a", - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json deleted file mode 100644 index 4ca804732c9754..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json +++ /dev/null @@ -1,74 +0,0 @@ -[ - { - "description": "remote ref", - "schema": {"$ref": "http://localhost:1234/integer.json"}, - "tests": [ - { - "description": "remote ref valid", - "data": 1, - "valid": true - }, - { - "description": "remote ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "fragment within remote ref", - "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"}, - "tests": [ - { - "description": "remote fragment valid", - "data": 1, - "valid": true - }, - { - "description": "remote fragment invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "ref within remote ref", - "schema": { - "$ref": "http://localhost:1234/subSchemas.json#/refToInteger" - }, - "tests": [ - { - "description": "ref within ref valid", - "data": 1, - "valid": true - }, - { - "description": "ref within ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "change resolution scope", - "schema": { - "id": "http://localhost:1234/", - "items": { - "id": "folder/", - "items": {"$ref": "folderInteger.json"} - } - }, - "tests": [ - { - "description": "changed scope ref valid", - "data": [[1]], - "valid": true - }, - { - "description": "changed scope ref invalid", - "data": [["a"]], - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/required.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/required.json deleted file mode 100644 index 612f73f3472bc0..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/required.json +++ /dev/null @@ -1,39 +0,0 @@ -[ - { - "description": "required validation", - "schema": { - "properties": { - "foo": {}, - "bar": {} - }, - "required": ["foo"] - }, - "tests": [ - { - "description": "present required property is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "non-present required property is invalid", - "data": {"bar": 1}, - "valid": false - } - ] - }, - { - "description": "required default validation", - "schema": { - "properties": { - "foo": {} - } - }, - "tests": [ - { - "description": "not required by default", - "data": {}, - "valid": true - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/type.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/type.json deleted file mode 100644 index 257f05129279fa..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/type.json +++ /dev/null @@ -1,330 +0,0 @@ -[ - { - "description": "integer type matches integers", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "an integer is an integer", - "data": 1, - "valid": true - }, - { - "description": "a float is not an integer", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an integer", - "data": "foo", - "valid": false - }, - { - "description": "an object is not an integer", - "data": {}, - "valid": false - }, - { - "description": "an array is not an integer", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an integer", - "data": true, - "valid": false - }, - { - "description": "null is not an integer", - "data": null, - "valid": false - } - ] - }, - { - "description": "number type matches numbers", - "schema": {"type": "number"}, - "tests": [ - { - "description": "an integer is a number", - "data": 1, - "valid": true - }, - { - "description": "a float is a number", - "data": 1.1, - "valid": true - }, - { - "description": "a string is not a number", - "data": "foo", - "valid": false - }, - { - "description": "an object is not a number", - "data": {}, - "valid": false - }, - { - "description": "an array is not a number", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a number", - "data": true, - "valid": false - }, - { - "description": "null is not a number", - "data": null, - "valid": false - } - ] - }, - { - "description": "string type matches strings", - "schema": {"type": "string"}, - "tests": [ - { - "description": "1 is not a string", - "data": 1, - "valid": false - }, - { - "description": "a float is not a string", - "data": 1.1, - "valid": false - }, - { - "description": "a string is a string", - "data": "foo", - "valid": true - }, - { - "description": "an object is not a string", - "data": {}, - "valid": false - }, - { - "description": "an array is not a string", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a string", - "data": true, - "valid": false - }, - { - "description": "null is not a string", - "data": null, - "valid": false - } - ] - }, - { - "description": "object type matches objects", - "schema": {"type": "object"}, - "tests": [ - { - "description": "an integer is not an object", - "data": 1, - "valid": false - }, - { - "description": "a float is not an object", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an object", - "data": "foo", - "valid": false - }, - { - "description": "an object is an object", - "data": {}, - "valid": true - }, - { - "description": "an array is not an object", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an object", - "data": true, - "valid": false - }, - { - "description": "null is not an object", - "data": null, - "valid": false - } - ] - }, - { - "description": "array type matches arrays", - "schema": {"type": "array"}, - "tests": [ - { - "description": "an integer is not an array", - "data": 1, - "valid": false - }, - { - "description": "a float is not an array", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an array", - "data": "foo", - "valid": false - }, - { - "description": "an object is not an array", - "data": {}, - "valid": false - }, - { - "description": "an array is not an array", - "data": [], - "valid": true - }, - { - "description": "a boolean is not an array", - "data": true, - "valid": false - }, - { - "description": "null is not an array", - "data": null, - "valid": false - } - ] - }, - { - "description": "boolean type matches booleans", - "schema": {"type": "boolean"}, - "tests": [ - { - "description": "an integer is not a boolean", - "data": 1, - "valid": false - }, - { - "description": "a float is not a boolean", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not a boolean", - "data": "foo", - "valid": false - }, - { - "description": "an object is not a boolean", - "data": {}, - "valid": false - }, - { - "description": "an array is not a boolean", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a boolean", - "data": true, - "valid": true - }, - { - "description": "null is not a boolean", - "data": null, - "valid": false - } - ] - }, - { - "description": "null type matches only the null object", - "schema": {"type": "null"}, - "tests": [ - { - "description": "an integer is not null", - "data": 1, - "valid": false - }, - { - "description": "a float is not null", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not null", - "data": "foo", - "valid": false - }, - { - "description": "an object is not null", - "data": {}, - "valid": false - }, - { - "description": "an array is not null", - "data": [], - "valid": false - }, - { - "description": "a boolean is not null", - "data": true, - "valid": false - }, - { - "description": "null is null", - "data": null, - "valid": true - } - ] - }, - { - "description": "multiple types can be specified in an array", - "schema": {"type": ["integer", "string"]}, - "tests": [ - { - "description": "an integer is valid", - "data": 1, - "valid": true - }, - { - "description": "a string is valid", - "data": "foo", - "valid": true - }, - { - "description": "a float is invalid", - "data": 1.1, - "valid": false - }, - { - "description": "an object is invalid", - "data": {}, - "valid": false - }, - { - "description": "an array is invalid", - "data": [], - "valid": false - }, - { - "description": "a boolean is invalid", - "data": true, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json b/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json deleted file mode 100644 index c1f4ab99c9a485..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "description": "uniqueItems validation", - "schema": {"uniqueItems": true}, - "tests": [ - { - "description": "unique array of integers is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "non-unique array of integers is invalid", - "data": [1, 1], - "valid": false - }, - { - "description": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "valid": false - }, - { - "description": "unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "baz"}], - "valid": true - }, - { - "description": "non-unique array of objects is invalid", - "data": [{"foo": "bar"}, {"foo": "bar"}], - "valid": false - }, - { - "description": "unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : false}}} - ], - "valid": true - }, - { - "description": "non-unique array of nested objects is invalid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : true}}} - ], - "valid": false - }, - { - "description": "unique array of arrays is valid", - "data": [["foo"], ["bar"]], - "valid": true - }, - { - "description": "non-unique array of arrays is invalid", - "data": [["foo"], ["foo"]], - "valid": false - }, - { - "description": "1 and true are unique", - "data": [1, true], - "valid": true - }, - { - "description": "0 and false are unique", - "data": [0, false], - "valid": true - }, - { - "description": "unique heterogeneous types are valid", - "data": [{}, [1], true, null, 1], - "valid": true - }, - { - "description": "non-unique heterogeneous types are invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/tools/eslint/node_modules/is-my-json-valid/test/json-schema.js b/tools/eslint/node_modules/is-my-json-valid/test/json-schema.js deleted file mode 100644 index e68a263a279218..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/json-schema.js +++ /dev/null @@ -1,23 +0,0 @@ -var tape = require('tape') -var fs = require('fs') -var validator = require('../') - -var files = fs.readdirSync(__dirname+'/json-schema-draft4') - .map(function(file) { - if (file === 'definitions.json') return null - if (file === 'refRemote.json') return null - return require('./json-schema-draft4/'+file) - }) - .filter(Boolean) - -files.forEach(function(file) { - file.forEach(function(f) { - tape('json-schema-test-suite '+f.description, function(t) { - var validate = validator(f.schema) - f.tests.forEach(function(test) { - t.same(validate(test.data), test.valid, test.description) - }) - t.end() - }) - }) -}) diff --git a/tools/eslint/node_modules/is-my-json-valid/test/misc.js b/tools/eslint/node_modules/is-my-json-valid/test/misc.js deleted file mode 100644 index b5109e576f26b9..00000000000000 --- a/tools/eslint/node_modules/is-my-json-valid/test/misc.js +++ /dev/null @@ -1,429 +0,0 @@ -var tape = require('tape') -var cosmic = require('./fixtures/cosmic') -var validator = require('../') -var validatorRequire = require('../require') - -tape('simple', function(t) { - var schema = { - required: true, - type: 'object', - properties: { - hello: {type:'string', required:true} - } - } - - var validate = validator(schema) - - t.ok(validate({hello: 'world'}), 'should be valid') - t.notOk(validate(), 'should be invalid') - t.notOk(validate({}), 'should be invalid') - t.end() -}) - -tape('advanced', function(t) { - var validate = validator(cosmic.schema) - - t.ok(validate(cosmic.valid), 'should be valid') - t.notOk(validate(cosmic.invalid), 'should be invalid') - t.end() -}) - -tape('greedy/false', function(t) { - var validate = validator({ - type: 'object', - properties: { - x: { - type: 'number' - } - }, - required: ['x', 'y'] - }); - t.notOk(validate({}), 'should be invalid') - t.strictEqual(validate.errors.length, 2); - t.strictEqual(validate.errors[0].field, 'data.x') - t.strictEqual(validate.errors[0].message, 'is required') - t.strictEqual(validate.errors[1].field, 'data.y') - t.strictEqual(validate.errors[1].message, 'is required') - t.notOk(validate({x: 'string'}), 'should be invalid') - t.strictEqual(validate.errors.length, 1); - t.strictEqual(validate.errors[0].field, 'data.y') - t.strictEqual(validate.errors[0].message, 'is required') - t.notOk(validate({x: 'string', y: 'value'}), 'should be invalid') - t.strictEqual(validate.errors.length, 1); - t.strictEqual(validate.errors[0].field, 'data.x') - t.strictEqual(validate.errors[0].message, 'is the wrong type') - t.end(); -}); - -tape('greedy/true', function(t) { - var validate = validator({ - type: 'object', - properties: { - x: { - type: 'number' - } - }, - required: ['x', 'y'] - }, { - greedy: true - }); - t.notOk(validate({}), 'should be invalid') - t.strictEqual(validate.errors.length, 2); - t.strictEqual(validate.errors[0].field, 'data.x') - t.strictEqual(validate.errors[0].message, 'is required') - t.strictEqual(validate.errors[1].field, 'data.y') - t.strictEqual(validate.errors[1].message, 'is required') - t.notOk(validate({x: 'string'}), 'should be invalid') - t.strictEqual(validate.errors.length, 2); - t.strictEqual(validate.errors[0].field, 'data.y') - t.strictEqual(validate.errors[0].message, 'is required') - t.strictEqual(validate.errors[1].field, 'data.x') - t.strictEqual(validate.errors[1].message, 'is the wrong type') - t.notOk(validate({x: 'string', y: 'value'}), 'should be invalid') - t.strictEqual(validate.errors.length, 1); - t.strictEqual(validate.errors[0].field, 'data.x') - t.strictEqual(validate.errors[0].message, 'is the wrong type') - t.ok(validate({x: 1, y: 'value'}), 'should be invalid') - t.end(); -}); - -tape('additional props', function(t) { - var validate = validator({ - type: 'object', - additionalProperties: false - }, { - verbose: true - }) - - t.ok(validate({})) - t.notOk(validate({foo:'bar'})) - t.ok(validate.errors[0].value === 'data.foo', 'should output the property not allowed in verbose mode') - t.end() -}) - -tape('array', function(t) { - var validate = validator({ - type: 'array', - required: true, - items: { - type: 'string' - } - }) - - t.notOk(validate({}), 'wrong type') - t.notOk(validate(), 'is required') - t.ok(validate(['test'])) - t.end() -}) - -tape('nested array', function(t) { - var validate = validator({ - type: 'object', - properties: { - list: { - type: 'array', - required: true, - items: { - type: 'string' - } - } - } - }) - - t.notOk(validate({}), 'is required') - t.ok(validate({list:['test']})) - t.notOk(validate({list:[1]})) - t.end() -}) - -tape('enum', function(t) { - var validate = validator({ - type: 'object', - properties: { - foo: { - type: 'number', - required: true, - enum: [42] - } - } - }) - - t.notOk(validate({}), 'is required') - t.ok(validate({foo:42})) - t.notOk(validate({foo:43})) - t.end() -}) - -tape('minimum/maximum', function(t) { - var validate = validator({ - type: 'object', - properties: { - foo: { - type: 'number', - minimum: 0, - maximum: 0 - } - } - }) - - t.notOk(validate({foo:-42})) - t.ok(validate({foo:0})) - t.notOk(validate({foo:42})) - t.end() -}) - -tape('exclusiveMinimum/exclusiveMaximum', function(t) { - var validate = validator({ - type: 'object', - properties: { - foo: { - type: 'number', - minimum: 10, - maximum: 20, - exclusiveMinimum: true, - exclusiveMaximum: true - } - } - }) - - t.notOk(validate({foo:10})) - t.ok(validate({foo:11})) - t.notOk(validate({foo:20})) - t.ok(validate({foo:19})) - t.end() -}) - -tape('custom format', function(t) { - var validate = validator({ - type: 'object', - properties: { - foo: { - type: 'string', - format: 'as' - } - } - }, {formats: {as:/^a+$/}}) - - t.notOk(validate({foo:''}), 'not as') - t.notOk(validate({foo:'b'}), 'not as') - t.notOk(validate({foo:'aaab'}), 'not as') - t.ok(validate({foo:'a'}), 'as') - t.ok(validate({foo:'aaaaaa'}), 'as') - t.end() -}) - -tape('custom format function', function(t) { - var validate = validator({ - type: 'object', - properties: { - foo: { - type: 'string', - format: 'as' - } - } - }, {formats: {as:function(s) { return /^a+$/.test(s) } }}) - - t.notOk(validate({foo:''}), 'not as') - t.notOk(validate({foo:'b'}), 'not as') - t.notOk(validate({foo:'aaab'}), 'not as') - t.ok(validate({foo:'a'}), 'as') - t.ok(validate({foo:'aaaaaa'}), 'as') - t.end() -}) - -tape('do not mutate schema', function(t) { - var sch = { - items: [ - {} - ], - additionalItems: { - type: 'integer' - } - } - - var copy = JSON.parse(JSON.stringify(sch)) - - validator(sch) - - t.same(sch, copy, 'did not mutate') - t.end() -}) - -tape('#toJSON()', function(t) { - var schema = { - required: true, - type: 'object', - properties: { - hello: {type:'string', required:true} - } - } - - var validate = validator(schema) - - t.deepEqual(validate.toJSON(), schema, 'should return original schema') - t.end() -}) - -tape('external schemas', function(t) { - var ext = {type: 'string'} - var schema = { - required: true, - $ref: '#ext' - } - - var validate = validator(schema, {schemas: {ext:ext}}) - - t.ok(validate('hello string'), 'is a string') - t.notOk(validate(42), 'not a string') - t.end() -}) - -tape('top-level external schema', function(t) { - var defs = { - "string": { - type: "string" - }, - "sex": { - type: "string", - enum: ["male", "female", "other"] - } - } - var schema = { - type: "object", - properties: { - "name": { $ref: "definitions.json#/string" }, - "sex": { $ref: "definitions.json#/sex" } - }, - required: ["name", "sex"] - } - - var validate = validator(schema, { - schemas: { - "definitions.json": defs - } - }) - t.ok(validate({name:"alice", sex:"female"}), 'is an object') - t.notOk(validate({name:"alice", sex: "bob"}), 'recognizes external schema') - t.notOk(validate({name:2, sex: "female"}), 'recognizes external schema') - t.end() -}) - -tape('nested required array decl', function(t) { - var schema = { - properties: { - x: { - type: 'object', - properties: { - y: { - type: 'object', - properties: { - z: { - type: 'string' - } - }, - required: ['z'] - } - } - } - }, - required: ['x'] - } - - var validate = validator(schema) - - t.ok(validate({x: {}}), 'should be valid') - t.notOk(validate({}), 'should not be valid') - t.strictEqual(validate.errors[0].field, 'data.x', 'should output the missing field') - t.end() -}) - -tape('verbose mode', function(t) { - var schema = { - required: true, - type: 'object', - properties: { - hello: { - required: true, - type: 'string' - } - } - }; - - var validate = validator(schema, {verbose: true}) - - t.ok(validate({hello: 'string'}), 'should be valid') - t.notOk(validate({hello: 100}), 'should not be valid') - t.strictEqual(validate.errors[0].value, 100, 'error object should contain the invalid value') - t.end() -}) - -tape('additional props in verbose mode', function(t) { - var schema = { - type: 'object', - required: true, - additionalProperties: false, - properties: { - foo: { - type: 'string' - }, - 'hello world': { - type: 'object', - required: true, - additionalProperties: false, - properties: { - foo: { - type: 'string' - } - } - } - } - }; - - var validate = validator(schema, {verbose: true}) - - validate({'hello world': {bar: 'string'}}); - - t.strictEqual(validate.errors[0].value, 'data["hello world"].bar', 'should output the path to the additional prop in the error') - t.end() -}) - -tape('Date.now() is an integer', function(t) { - var schema = {type: 'integer'} - var validate = validator(schema) - - t.ok(validate(Date.now()), 'is integer') - t.end() -}) - -tape('field shows item index in arrays', function(t) { - var schema = { - type: 'array', - items: { - type: 'array', - items: { - properties: { - foo: { - type: 'string', - required: true - } - } - } - } - } - - var validate = validator(schema) - - validate([ - [ - { foo: 'test' }, - { foo: 'test' } - ], - [ - { foo: 'test' }, - { baz: 'test' } - ] - ]) - - t.strictEqual(validate.errors[0].field, 'data.1.1.foo', 'should output the field with specific index of failing item in the error') - t.end() -}) diff --git a/tools/eslint/node_modules/is-path-cwd/index.js b/tools/eslint/node_modules/is-path-cwd/index.js new file mode 100644 index 00000000000000..24b6fdea37ee36 --- /dev/null +++ b/tools/eslint/node_modules/is-path-cwd/index.js @@ -0,0 +1,6 @@ +'use strict'; +var path = require('path'); + +module.exports = function (str) { + return path.resolve(str) === path.resolve(process.cwd()); +}; diff --git a/tools/eslint/node_modules/is-path-cwd/package.json b/tools/eslint/node_modules/is-path-cwd/package.json new file mode 100644 index 00000000000000..ae9fb1dcc3c2ae --- /dev/null +++ b/tools/eslint/node_modules/is-path-cwd/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "is-path-cwd@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del" + ] + ], + "_from": "is-path-cwd@>=1.0.0 <2.0.0", + "_id": "is-path-cwd@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-path-cwd", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "is-path-cwd", + "raw": "is-path-cwd@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/del" + ], + "_resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "_shasum": "d225ec23132e89edd38fda767472e62e65f1106d", + "_shrinkwrap": null, + "_spec": "is-path-cwd@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-cwd/issues" + }, + "dependencies": {}, + "description": "Check if a path is CWD", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "d225ec23132e89edd38fda767472e62e65f1106d", + "tarball": "http://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f71d4ecaa43bfe23c9cb35af6bf31e6b5b3f04eb", + "homepage": "https://github.com/sindresorhus/is-path-cwd", + "keywords": [ + "check", + "cwd", + "file", + "filepath", + "folder", + "path", + "pwd" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-path-cwd", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-cwd.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/is-path-cwd/readme.md b/tools/eslint/node_modules/is-path-cwd/readme.md new file mode 100644 index 00000000000000..2d9d65f989c106 --- /dev/null +++ b/tools/eslint/node_modules/is-path-cwd/readme.md @@ -0,0 +1,28 @@ +# is-path-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-cwd) + +> Check if a path is [CWD](http://en.wikipedia.org/wiki/Working_directory) + + +## Install + +```sh +$ npm install --save is-path-cwd +``` + + +## Usage + +```js +var isPathCwd = require('is-path-cwd'); + +isPathCwd(process.cwd()); +//=> true + +isPathCwd('unicorn'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/is-path-in-cwd/index.js b/tools/eslint/node_modules/is-path-in-cwd/index.js new file mode 100644 index 00000000000000..75611656ae7e3d --- /dev/null +++ b/tools/eslint/node_modules/is-path-in-cwd/index.js @@ -0,0 +1,6 @@ +'use strict'; +var isPathInside = require('is-path-inside'); + +module.exports = function (str) { + return isPathInside(str, process.cwd()); +}; diff --git a/tools/eslint/node_modules/is-path-in-cwd/package.json b/tools/eslint/node_modules/is-path-in-cwd/package.json new file mode 100644 index 00000000000000..38e366886ec4a4 --- /dev/null +++ b/tools/eslint/node_modules/is-path-in-cwd/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "is-path-in-cwd@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del" + ] + ], + "_from": "is-path-in-cwd@>=1.0.0 <2.0.0", + "_id": "is-path-in-cwd@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-path-in-cwd", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "is-path-in-cwd", + "raw": "is-path-in-cwd@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/del" + ], + "_resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "_shasum": "6477582b8214d602346094567003be8a9eac04dc", + "_shrinkwrap": null, + "_spec": "is-path-in-cwd@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/del", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-in-cwd/issues" + }, + "dependencies": { + "is-path-inside": "^1.0.0" + }, + "description": "Check if a path is in the current working directory", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "6477582b8214d602346094567003be8a9eac04dc", + "tarball": "http://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "a5a2a7c967eae3f6faee9ab5e40abca6127d55de", + "homepage": "https://github.com/sindresorhus/is-path-in-cwd", + "keywords": [ + "check", + "cwd", + "file", + "filepath", + "folder", + "in", + "inside", + "path", + "pwd" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-path-in-cwd", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-in-cwd.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/is-path-in-cwd/readme.md b/tools/eslint/node_modules/is-path-in-cwd/readme.md new file mode 100644 index 00000000000000..4e4f3a8838d490 --- /dev/null +++ b/tools/eslint/node_modules/is-path-in-cwd/readme.md @@ -0,0 +1,28 @@ +# is-path-in-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-in-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-in-cwd) + +> Check if a path is in the [current working directory](http://en.wikipedia.org/wiki/Working_directory) + + +## Install + +```sh +$ npm install --save is-path-in-cwd +``` + + +## Usage + +```js +var isPathInCwd = require('is-path-in-cwd'); + +isPathInCwd('unicorn'); +//=> true + +isPathInCwd('../rainbow'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/is-path-inside/index.js b/tools/eslint/node_modules/is-path-inside/index.js new file mode 100644 index 00000000000000..0a4d2fd1e58074 --- /dev/null +++ b/tools/eslint/node_modules/is-path-inside/index.js @@ -0,0 +1,14 @@ +'use strict'; +var path = require('path'); +var pathIsInside = require('path-is-inside'); + +module.exports = function (a, b) { + a = path.resolve(a); + b = path.resolve(b); + + if (a === b) { + return false; + } + + return pathIsInside(a, b); +}; diff --git a/tools/eslint/node_modules/is-path-inside/package.json b/tools/eslint/node_modules/is-path-inside/package.json new file mode 100644 index 00000000000000..eee057084a0102 --- /dev/null +++ b/tools/eslint/node_modules/is-path-inside/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "is-path-inside@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-path-in-cwd" + ] + ], + "_from": "is-path-inside@>=1.0.0 <2.0.0", + "_id": "is-path-inside@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-path-inside", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "is-path-inside", + "raw": "is-path-inside@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/is-path-in-cwd" + ], + "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "_shasum": "fc06e5a1683fbda13de667aff717bbc10a48f37f", + "_shrinkwrap": null, + "_spec": "is-path-inside@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-path-in-cwd", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-inside/issues" + }, + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "description": "Check if a path is inside another path", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "fc06e5a1683fbda13de667aff717bbc10a48f37f", + "tarball": "http://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "b507035b66a539b7c12ba8b6b486377aa02aef9f", + "homepage": "https://github.com/sindresorhus/is-path-inside", + "keywords": [ + "dir", + "directory", + "file", + "folder", + "inside", + "path", + "resolve" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-path-inside", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-inside.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/is-path-inside/readme.md b/tools/eslint/node_modules/is-path-inside/readme.md new file mode 100644 index 00000000000000..0e4eb74f754bc3 --- /dev/null +++ b/tools/eslint/node_modules/is-path-inside/readme.md @@ -0,0 +1,31 @@ +# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside) + +> Check if a path is inside another path + + +## Install + +```sh +$ npm install --save is-path-inside +``` + + +## Usage + +```js +var isPathInside = require('is-path-inside'); + +isPathInside('a/b', 'a/b/c'); +//=> true + +isPathInside('x/y', 'a/b/c'); +//=> false + +isPathInside('a/b/c', 'a/b/c'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE b/tools/eslint/node_modules/is-property/LICENSE similarity index 100% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE rename to tools/eslint/node_modules/is-property/LICENSE diff --git a/tools/eslint/node_modules/is-property/README.md b/tools/eslint/node_modules/is-property/README.md new file mode 100644 index 00000000000000..9846a8bb9fc51b --- /dev/null +++ b/tools/eslint/node_modules/is-property/README.md @@ -0,0 +1,28 @@ +is-property +=========== +Tests if a property of a JavaScript object can be accessed using the dot (.) notation or if it must be enclosed in brackets, (ie use x[" ... "]) + +Example +------- + +```javascript +var isProperty = require("is-property") + +console.log(isProperty("foo")) //Prints true +console.log(isProperty("0")) //Prints false +``` + +Install +------- + + npm install is-property + +### `require("is-property")(str)` +Checks if str is a property + +* `str` is a string which we will test if it is a property or not + +**Returns** true or false depending if str is a property + +## Credits +(c) 2013 Mikola Lysenko. MIT License \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js b/tools/eslint/node_modules/is-property/is-property.js similarity index 100% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js rename to tools/eslint/node_modules/is-property/is-property.js diff --git a/tools/eslint/node_modules/is-property/package.json b/tools/eslint/node_modules/is-property/package.json new file mode 100644 index 00000000000000..41c04f74da0fb0 --- /dev/null +++ b/tools/eslint/node_modules/is-property/package.json @@ -0,0 +1,84 @@ +{ + "_args": [ + [ + "is-property@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/generate-object-property" + ] + ], + "_from": "is-property@>=1.0.0 <2.0.0", + "_id": "is-property@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-property", + "_nodeVersion": "0.10.26", + "_npmUser": { + "email": "mikolalysenko@gmail.com", + "name": "mikolalysenko" + }, + "_npmVersion": "2.1.4", + "_phantomChildren": {}, + "_requested": { + "name": "is-property", + "raw": "is-property@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/generate-object-property" + ], + "_resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "_shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", + "_shrinkwrap": null, + "_spec": "is-property@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/generate-object-property", + "author": { + "name": "Mikola Lysenko" + }, + "bugs": { + "url": "https://github.com/mikolalysenko/is-property/issues" + }, + "dependencies": {}, + "description": "Tests if a JSON property can be accessed using . syntax", + "devDependencies": { + "tape": "~1.0.4" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", + "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + }, + "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50", + "homepage": "https://github.com/mikolalysenko/is-property", + "keywords": [ + ".", + "[]", + "bracket", + "dot", + "is", + "json", + "property" + ], + "license": "MIT", + "main": "is-property.js", + "maintainers": [ + { + "name": "mikolalysenko", + "email": "mikolalysenko@gmail.com" + } + ], + "name": "is-property", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/mikolalysenko/is-property.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/is-resolvable/LICENSE b/tools/eslint/node_modules/is-resolvable/LICENSE new file mode 100644 index 00000000000000..d9ef73fd74815b --- /dev/null +++ b/tools/eslint/node_modules/is-resolvable/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 - 2015 Shinnosuke Watanabe + +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/eslint/node_modules/is-resolvable/README.md b/tools/eslint/node_modules/is-resolvable/README.md new file mode 100755 index 00000000000000..941c65e5cf7b5e --- /dev/null +++ b/tools/eslint/node_modules/is-resolvable/README.md @@ -0,0 +1,68 @@ +# is-resolvable + +[![NPM version](https://img.shields.io/npm/v/is-resolvable.svg)](https://www.npmjs.com/package/is-resolvable) +[![Build Status](https://travis-ci.org/shinnn/is-resolvable.svg?branch=master)](https://travis-ci.org/shinnn/is-resolvable) +[![Build status](https://ci.appveyor.com/api/projects/status/ww1cdpignehlasbs?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-resolvable) +[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-resolvable.svg)](https://coveralls.io/r/shinnn/is-resolvable) +[![Dependency Status](https://img.shields.io/david/shinnn/is-resolvable.svg?label=deps)](https://david-dm.org/shinnn/is-resolvable) +[![devDependency Status](https://img.shields.io/david/dev/shinnn/is-resolvable.svg?label=devDeps)](https://david-dm.org/shinnn/is-resolvable#info=devDependencies) + +A [Node](https://nodejs.org/) module to check if a module ID is resolvable with [`require()`](https://nodejs.org/api/globals.html#globals_require) + +```javascript +const isResolvable = require('is-resolvable'); + +isResolvable('fs'); //=> true +isResolvable('path'); //=> true + +// When `./index.js` exists +isResolvable('./index.js') //=> true +isResolvable('./index') //=> true +isResolvable('.') //=> true +``` + +## Installation + +[Use npm.](https://docs.npmjs.com/cli/install) + +``` +npm install is-resolvable +``` + +## API + +```javascript +const isResolvable = require('is-resolvable'); +``` + +### isResolvable(*moduleId*) + +*moduleId*: `String` (module ID) +Return: `Boolean` + +It returns `true` if `require()` can load a file form a given module ID, otherwise `false`. + +```javascript +const isResolvable = require('is-resolvable'); + +// When `./foo.json` exists +isResolvable('./foo.json'); //=> true +isResolvable('./foo'); //=> true + +isResolvable('./foo.js'); //=> false + + +// When `lodash` module is installed but `underscore` isn't +isResolvable('lodash'); //=> true +isResolvable('underscore'); //=> false + +// When `readable-stream` module is installed +isResolvable('readable-stream/readable'); //=> true +isResolvable('readable-stream/writable'); //=> true +``` + +## License + +Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn) + +Licensed under [the MIT License](./LICENSE). diff --git a/tools/eslint/node_modules/is-resolvable/index.js b/tools/eslint/node_modules/is-resolvable/index.js new file mode 100755 index 00000000000000..807817b9373fd4 --- /dev/null +++ b/tools/eslint/node_modules/is-resolvable/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var tryit = require('tryit'); + +module.exports = function isResolvable(moduleId) { + if (typeof moduleId !== 'string') { + throw new TypeError( + moduleId + + ' is not a string. A module identifier to be checked if resolvable is required.' + ); + } + + var result; + tryit(function() { + require.resolve(moduleId); + }, function(err) { + if (err) { + result = false; + return; + } + + result = true; + }); + + return result; +}; diff --git a/tools/eslint/node_modules/is-resolvable/package.json b/tools/eslint/node_modules/is-resolvable/package.json new file mode 100644 index 00000000000000..46e915ab51c3b7 --- /dev/null +++ b/tools/eslint/node_modules/is-resolvable/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "is-resolvable@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "is-resolvable@>=1.0.0 <2.0.0", + "_id": "is-resolvable@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/is-resolvable", + "_nodeVersion": "2.4.0", + "_npmUser": { + "email": "snnskwtnb@gmail.com", + "name": "shinnn" + }, + "_npmVersion": "2.13.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-resolvable", + "raw": "is-resolvable@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "_shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62", + "_shrinkwrap": null, + "_spec": "is-resolvable@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "bugs": { + "url": "https://github.com/shinnn/is-resolvable/issues" + }, + "dependencies": { + "tryit": "^1.0.1" + }, + "description": "Check if a module ID is resolvable with require()", + "devDependencies": { + "@shinnn/eslintrc-node": "^1.0.2", + "eslint": "^0.24.0", + "istanbul": "^0.3.17", + "tape": "^4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62", + "tarball": "http://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "e68ea1b3affa382cbd31b4bae1e1421040249a73", + "homepage": "https://github.com/shinnn/is-resolvable#readme", + "keywords": [ + "cmap", + "code-point", + "data", + "file", + "font", + "glyph", + "metadata", + "parse", + "read", + "table", + "unicode" + ], + "license": "MIT", + "maintainers": [ + { + "name": "shinnn", + "email": "snnskwtnb@gmail.com" + } + ], + "name": "is-resolvable", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/is-resolvable.git" + }, + "scripts": { + "coverage": "istanbul cover test.js", + "pretest": "eslint --config node_modules/@shinnn/eslintrc-node/rc.json index.js test.js", + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md b/tools/eslint/node_modules/isarray/README.md similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md rename to tools/eslint/node_modules/isarray/README.md diff --git a/tools/eslint/node_modules/isarray/build/build.js b/tools/eslint/node_modules/isarray/build/build.js new file mode 100644 index 00000000000000..e1856ef0943728 --- /dev/null +++ b/tools/eslint/node_modules/isarray/build/build.js @@ -0,0 +1,208 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js b/tools/eslint/node_modules/isarray/index.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js rename to tools/eslint/node_modules/isarray/index.js diff --git a/tools/eslint/node_modules/isarray/package.json b/tools/eslint/node_modules/isarray/package.json new file mode 100644 index 00000000000000..5e1d5343344f08 --- /dev/null +++ b/tools/eslint/node_modules/isarray/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "isarray@0.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream" + ] + ], + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/isarray", + "_npmUser": { + "email": "julian@juliangruber.com", + "name": "juliangruber" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "name": "isarray", + "raw": "isarray@0.0.1", + "rawSpec": "0.0.1", + "scope": null, + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/eslint/doctrine", + "/eslint/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream", + "author": { + "email": "mail@juliangruber.com", + "name": "Julian Gruber", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "array", + "browser", + "isarray" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/tools/eslint/node_modules/js-yaml/CHANGELOG.md b/tools/eslint/node_modules/js-yaml/CHANGELOG.md deleted file mode 100644 index f057ec33fc41f0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/CHANGELOG.md +++ /dev/null @@ -1,299 +0,0 @@ -3.3.1 / 2015-05-13 ------------------- - -- Added `.sortKeys` dumper option, thanks to @rjmunro. -- Fixed astral characters support, #191. - - -3.3.0 / 2015-04-26 ------------------- - -- Significantly improved long strings formatting in dumper, thanks to @isaacs. -- Strip BOM if exists. - - -3.2.7 / 2015-02-19 ------------------- - -- Maintenance release. -- Updated dependencies. -- HISTORY.md -> CHANGELOG.md - - -3.2.6 / 2015-02-07 ------------------- - -- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). -- Fixed demo dates dump (#113, thanks to @Hypercubed). - - -3.2.5 / 2014-12-28 ------------------- - -- Fixed resolving of all built-in types on empty nodes. -- Fixed invalid warning on empty lines within quoted scalars and flow collections. -- Fixed bug: Tag on an empty node didn't resolve in some cases. - - -3.2.4 / 2014-12-19 ------------------- - -- Fixed resolving of !!null tag on an empty node. - - -3.2.3 / 2014-11-08 ------------------- - -- Implemented dumping of objects with circular and cross references. -- Partially fixed aliasing of constructed objects. (see issue #141 for details) - - -3.2.2 / 2014-09-07 ------------------- - -- Fixed infinite loop on unindented block scalars. -- Rewritten base64 encode/decode in binary type, to keep code licence clear. - - -3.2.1 / 2014-08-24 ------------------- - -- Nothig new. Just fix npm publish error. - - -3.2.0 / 2014-08-24 ------------------- - -- Added input piping support to CLI. -- Fixed typo, that could cause hand on initial indent (#139). - - -3.1.0 / 2014-07-07 ------------------- - -- 1.5x-2x speed boost. -- Removed deprecated `require('xxx.yml')` support. -- Significant code cleanup and refactoring. -- Internal API changed. If you used custom types - see updated examples. - Others are not affected. -- Even if the input string has no trailing line break character, - it will be parsed as if it has one. -- Added benchmark scripts. -- Moved bower files to /dist folder -- Bugfixes. - - -3.0.2 / 2014-02-27 ------------------- - -- Fixed bug: "constructor" string parsed as `null`. - - -3.0.1 / 2013-12-22 ------------------- - -- Fixed parsing of literal scalars. (issue #108) -- Prevented adding unnecessary spaces in object dumps. (issue #68) -- Fixed dumping of objects with very long (> 1024 in length) keys. - - -3.0.0 / 2013-12-16 ------------------- - -- Refactored code. Changed API for custom types. -- Removed output colors in CLI, dump json by default. -- Removed big dependencies from browser version (esprima, buffer) - - load `esprima` manually, if !!js/function needed - - !!bin now returns Array in browser -- AMD support. -- Don't quote dumped strings because of `-` & `?` (if not first char). -- __Deprecated__ loading yaml files via `require()`, as not recommended - behaviour for node. - - -2.1.3 / 2013-10-16 ------------------- - -- Fix wrong loading of empty block scalars. - - -2.1.2 / 2013-10-07 ------------------- - -- Fix unwanted line breaks in folded scalars. - - -2.1.1 / 2013-10-02 ------------------- - -- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 -- Fixed reader bug in JSON-like sequences/mappings. - - -2.1.0 / 2013-06-05 ------------------- - -- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), - JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). -- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` - and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. -- Bug fix: export `NIL` constant from the public interface. -- Add `skipInvalid` dumper option. -- Use `safeLoad` for `require` extension. - - -2.0.5 / 2013-04-26 ------------------- - -- Close security issue in !!js/function constructor. - Big thanks to @nealpoole for security audit. - - -2.0.4 / 2013-04-08 ------------------- - -- Updated .npmignore to reduce package size - - -2.0.3 / 2013-02-26 ------------------- - -- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) - - -2.0.2 / 2013-02-15 ------------------- - -- Fixed input validation: tabs are printable characters. - - -2.0.1 / 2013-02-09 ------------------- - -- Fixed error, when options not passed to function cass - - -2.0.0 / 2013-02-09 ------------------- - -- Full rewrite. New architecture. Fast one-stage parsing. -- Changed custom types API. -- Added YAML dumper. - - -1.0.3 / 2012-11-05 ------------------- - -- Fixed utf-8 files loading. - - -1.0.2 / 2012-08-02 ------------------- - -- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. -- Fix timstamps incorectly parsed in local time when no time part specified. - - -1.0.1 / 2012-07-07 ------------------- - -- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. -- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. - - -1.0.0 / 2012-07-01 ------------------- - -- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. - Fixes #42. -- `require(filename)` now returns a single document and throws an Error if - file contains more than one document. -- CLI was merged back from js-yaml.bin - - -0.3.7 / 2012-02-28 ------------------- - -- Fix export of `addConstructor()`. Closes #39. - - -0.3.6 / 2012-02-22 ------------------- - -- Removed AMD parts - too buggy to use. Need help to rewrite from scratch -- Removed YUI compressor warning (renamed `double` variable). Closes #40. - - -0.3.5 / 2012-01-10 ------------------- - -- Workagound for .npmignore fuckup under windows. Thanks to airportyh. - - -0.3.4 / 2011-12-24 ------------------- - -- Fixes str[] for oldIEs support. -- Adds better has change support for browserified demo. -- improves compact output of Error. Closes #33. - - -0.3.3 / 2011-12-20 ------------------- - -- jsyaml executable moved to separate module. -- adds `compact` stringification of Errors. - - -0.3.2 / 2011-12-16 ------------------- - -- Fixes ug with block style scalars. Closes #26. -- All sources are passing JSLint now. -- Fixes bug in Safari. Closes #28. -- Fixes bug in Opers. Closes #29. -- Improves browser support. Closes #20. -- Added jsyaml executable. -- Added !!js/function support. Closes #12. - - -0.3.1 / 2011-11-18 ------------------- - -- Added AMD support for browserified version. -- Wrapped browserified js-yaml into closure. -- Fixed the resolvement of non-specific tags. Closes #17. -- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. -- Added !!js/regexp and !!js/undefined types. Partially solves #12. -- Fixed !!set mapping. -- Fixed month parse in dates. Closes #19. - - -0.3.0 / 2011-11-09 ------------------- - -- Removed JS.Class dependency. Closes #3. -- Added browserified version. Closes #13. -- Added live demo of browserified version. -- Ported some of the PyYAML tests. See #14. -- Fixed timestamp bug when fraction was given. - - -0.2.2 / 2011-11-06 ------------------- - -- Fixed crash on docs without ---. Closes #8. -- Fixed miltiline string parse -- Fixed tests/comments for using array as key - - -0.2.1 / 2011-11-02 ------------------- - -- Fixed short file read (<4k). Closes #9. - - -0.2.0 / 2011-11-02 ------------------- - -- First public release diff --git a/tools/eslint/node_modules/js-yaml/README.md b/tools/eslint/node_modules/js-yaml/README.md index 8ad571f1059090..e0c8fb866843e4 100644 --- a/tools/eslint/node_modules/js-yaml/README.md +++ b/tools/eslint/node_modules/js-yaml/README.md @@ -63,7 +63,7 @@ needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate. Notes: -1. We have no resourses to support browserified version. Don't expect it to be +1. We have no resources to support browserified version. Don't expect it to be well tested. Don't expect fast fixes if something goes wrong there. 2. `!!js/function` in browser bundle will not work by default. If you really need it - load `esprima` parser first (via amd or directly). @@ -122,7 +122,7 @@ exception on those. NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. So, JSON schema is not as strict as defined in the YAML specification. -It allows numbers in any notaion, use `Null` and `NULL` as `null`, etc. +It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. Core schema also has no such restrictions. It allows binary notation for integers. @@ -177,6 +177,7 @@ options: - `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ specifies a schema to use. - `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a function, use the function to sort the keys. +- `lineWidth` _(default: `80`)_ - set max line width. styles: @@ -238,7 +239,7 @@ The list of standard YAML tags and corresponding JavaScipt types. See also Caveats ------- -Note, that you use arrays or objects as key in JS-YAML. JS do not allows objects +Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects or array as keys, and stringifies (by calling .toString method) them at the moment of adding them. @@ -270,10 +271,10 @@ So, the following YAML document cannot be loaded. Breaking changes in 2.x.x -> 3.x.x ---------------------------------- -If your have not used __custom__ tags or loader classes and not loaded yaml +If you have not used __custom__ tags or loader classes and not loaded yaml files via `require()` - no changes needed. Just upgrade library. -In other case, you should: +Otherwise, you should: 1. Replace all occurences of `require('xxxx.yml')` by `fs.readFileSync()` + `yaml.safeLoad()`. diff --git a/tools/eslint/node_modules/js-yaml/bower.json b/tools/eslint/node_modules/js-yaml/bower.json deleted file mode 100644 index 010912f10f9d55..00000000000000 --- a/tools/eslint/node_modules/js-yaml/bower.json +++ /dev/null @@ -1,23 +0,0 @@ - -{ - "name": "js-yaml", - "main": "dist/js-yaml.js", - "homepage": "https://github.com/nodeca/js-yaml", - "authors": [ "Dervus Grim ", - "Vitaly Puzrin ", - "Aleksey V Zapparov ", - "Martin Grenfell " ], - "description": "YAML 1.2 parser and serializer", - "keywords": ["yaml", "parser", "serializer", "pyyaml"], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "benchmark", - "bower_components", - "test", - "Makefile", - "index*", - "package.json" - ] -} diff --git a/tools/eslint/node_modules/js-yaml/dist/js-yaml.js b/tools/eslint/node_modules/js-yaml/dist/js-yaml.js index 21ce73c5ed7506..366e6dfafb8f96 100644 --- a/tools/eslint/node_modules/js-yaml/dist/js-yaml.js +++ b/tools/eslint/node_modules/js-yaml/dist/js-yaml.js @@ -1,4 +1,4 @@ -/* js-yaml 3.3.1 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;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 require=="function"&&require;for(var o=0;o and | if not wrapped in spaces. + // can only use > and | if not wrapped in spaces or is not a key. if (spaceWrap) { simple = false; folded = false; literal = false; } else { - folded = true; - literal = true; + folded = !iskey; + literal = !iskey; } single = true; @@ -361,7 +362,13 @@ function writeScalar(state, object, level) { longestLine = 0; indent = state.indent * level; - max = 80; + max = state.lineWidth; + if (max === -1) { + // Replace -1 with biggest ingeger number according to + // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 + max = 9007199254740991; + } + if (indent < 40) { max -= indent; } else { @@ -727,7 +734,7 @@ function writeBlockMapping(state, level, object, compact) { objectKey = objectKeyList[index]; objectValue = object[objectKey]; - if (!writeNode(state, level + 1, objectKey, true, true)) { + if (!writeNode(state, level + 1, objectKey, true, true, true)) { continue; // Skip this pair because of invalid key. } @@ -806,7 +813,7 @@ function detectType(state, object, explicit) { // Serializes `object` and writes it to global `result`. // Returns true on success, or false on invalid object. // -function writeNode(state, level, object, block, compact) { +function writeNode(state, level, object, block, compact, iskey) { state.tag = null; state.dump = object; @@ -820,10 +827,6 @@ function writeNode(state, level, object, block, compact) { block = (0 > state.flowLevel || state.flowLevel > level); } - if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) { - compact = false; - } - var objectOrArray = '[object Object]' === type || '[object Array]' === type, duplicateIndex, duplicate; @@ -833,6 +836,10 @@ function writeNode(state, level, object, block, compact) { duplicate = duplicateIndex !== -1; } + if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { state.dump = '*ref_' + duplicateIndex; } else { @@ -843,7 +850,7 @@ function writeNode(state, level, object, block, compact) { if (block && (0 !== Object.keys(state.dump).length)) { writeBlockMapping(state, level, state.dump, compact); if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; + state.dump = '&ref_' + duplicateIndex + state.dump; } } else { writeFlowMapping(state, level, state.dump); @@ -855,7 +862,7 @@ function writeNode(state, level, object, block, compact) { if (block && (0 !== state.dump.length)) { writeBlockSequence(state, level, state.dump, compact); if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; + state.dump = '&ref_' + duplicateIndex + state.dump; } } else { writeFlowSequence(state, level, state.dump); @@ -865,7 +872,7 @@ function writeNode(state, level, object, block, compact) { } } else if ('[object String]' === type) { if ('?' !== state.tag) { - writeScalar(state, state.dump, level); + writeScalar(state, state.dump, level, iskey); } } else { if (state.skipInvalid) { @@ -897,8 +904,7 @@ function getDuplicateReferences(object, state) { } function inspectNode(object, objects, duplicatesIndexes) { - var type = _toString.call(object), - objectKeyList, + var objectKeyList, index, length; @@ -947,21 +953,42 @@ module.exports.dump = dump; module.exports.safeDump = safeDump; },{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){ +// YAML error class. http://stackoverflow.com/questions/8458984 +// 'use strict'; +var inherits = require('util').inherits; + + function YAMLException(reason, mark) { - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = this.toString(false); + // Super constructor + Error.call(this); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); } +// Inherit from Error +inherits(YAMLException, Error); + + YAMLException.prototype.toString = function toString(compact) { - var result; + var result = this.name + ': '; - result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); + result += this.reason || '(unknown reason)'; if (!compact && this.mark) { result += ' ' + this.mark.toString(); @@ -973,7 +1000,7 @@ YAMLException.prototype.toString = function toString(compact) { module.exports = YAMLException; -},{}],5:[function(require,module,exports){ +},{"util":34}],5:[function(require,module,exports){ 'use strict'; /*eslint-disable max-len,no-use-before-define*/ @@ -1143,12 +1170,8 @@ function throwError(state, message) { } function throwWarning(state, message) { - var error = generateError(state, message); - if (state.onWarning) { - state.onWarning.call(null, error); - } else { - throw error; + state.onWarning.call(null, generateError(state, message)); } } @@ -1232,6 +1255,8 @@ function captureSegment(state, start, end, checkJson) { throwError(state, 'expected valid JSON character'); } } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); } state.result += _result; @@ -1529,7 +1554,7 @@ function readDoubleQuotedScalar(state, nodeIndent) { captureEnd, hexLength, hexResult, - tmp, tmpEsc, + tmp, ch; ch = state.input.charCodeAt(state.position); @@ -1833,6 +1858,7 @@ function readBlockScalar(state, nodeIndent) { state.result += common.repeat('\n', emptyLines + 1); } else { // In case of the first content line - count only empty lines. + state.result += common.repeat('\n', emptyLines); } detectedIndent = true; @@ -2190,8 +2216,6 @@ function readAnchorProperty(state) { function readAlias(state) { var _position, alias, - len = state.length, - input = state.input, ch; ch = state.input.charCodeAt(state.position); @@ -2233,8 +2257,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact typeQuantity, type, flowIndent, - blockIndent, - _result; + blockIndent; state.tag = null; state.anchor = null; @@ -2365,7 +2388,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } } } else { - throwWarning(state, 'unknown tag !<' + state.tag + '>'); + throwError(state, 'unknown tag !<' + state.tag + '>'); } } @@ -2504,10 +2527,6 @@ function loadDocuments(input, options) { var state = new State(input, options); - if (PATTERN_NON_PRINTABLE.test(state.input)) { - throwError(state, 'the stream contains non-printable characters'); - } - // Use 0 as string terminator. That significantly simplifies bounds check. state.input += '\0'; @@ -2534,7 +2553,7 @@ function loadAll(input, iterator, options) { function load(input, options) { - var documents = loadDocuments(input, options), index, length; + var documents = loadDocuments(input, options); if (0 === documents.length) { /*eslint-disable no-undefined*/ @@ -2953,7 +2972,7 @@ function resolveYamlBinary(data) { return false; } - var code, idx, bitlen = 0, len = 0, max = data.length, map = BASE64_MAP; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; // Convert one by one. for (idx = 0; idx < max; idx++) { @@ -2973,7 +2992,7 @@ function resolveYamlBinary(data) { } function constructYamlBinary(data) { - var code, idx, tailbits, + var idx, tailbits, input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan max = input.length, map = BASE64_MAP, @@ -3126,8 +3145,6 @@ function resolveYamlFloat(data) { return false; } - var value, sign, base, digits; - if (!YAML_FLOAT_PATTERN.test(data)) { return false; } @@ -3170,7 +3187,12 @@ function constructYamlFloat(data) { return sign * parseFloat(value, 10); } + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { switch (style) { case 'lowercase': @@ -3201,7 +3223,13 @@ function representYamlFloat(object, style) { } else if (common.isNegativeZero(object)) { return '-0.0'; } - return object.toString(10); + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; } function isFloat(object) { @@ -3431,9 +3459,7 @@ function resolveJavascriptFunction(data) { try { var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; + ast = esprima.parse(source, { range: true }); if ('Program' !== ast.type || 1 !== ast.body.length || @@ -3524,7 +3550,6 @@ function resolveJavascriptRegExp(data) { } try { - var dummy = new RegExp(regexp, modifiers); return true; } catch (error) { return false; @@ -3867,12 +3892,7 @@ function resolveYamlTimestamp(data) { return false; } - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (null === match) { + if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { return false; } @@ -3947,7 +3967,721 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', { },{"../type":13}],30:[function(require,module,exports){ -},{}],"/":[function(require,module,exports){ +},{}],31:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],32:[function(require,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + currentQueue[queueIndex].run(); + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (!draining) { + setTimeout(drainQueue, 0); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],33:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} +},{}],34:[function(require,module,exports){ +(function (process,global){ +// 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. + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = require('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":33,"_process":32,"inherits":31}],"/":[function(require,module,exports){ 'use strict'; diff --git a/tools/eslint/node_modules/js-yaml/dist/js-yaml.min.js b/tools/eslint/node_modules/js-yaml/dist/js-yaml.min.js new file mode 100644 index 00000000000000..ad3903100c8294 --- /dev/null +++ b/tools/eslint/node_modules/js-yaml/dist/js-yaml.min.js @@ -0,0 +1,3 @@ +/* js-yaml 3.4.5 https://github.com/nodeca/js-yaml */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;sn;n+=1)i=o[n],e[i]=t[i];return e}function a(e,t){var n,r="";for(n=0;t>n;n+=1)r+=e;return r}function u(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=r,t.exports.isObject=i,t.exports.toArray=o,t.exports.repeat=a,t.exports.isNegativeZero=u,t.exports.extend=s},{}],3:[function(e,t,n){"use strict";function r(e,t){var n,r,i,o,s,a,u;if(null===t)return{};for(n={},r=Object.keys(t),i=0,o=r.length;o>i;i+=1)s=r[i],a=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),u=e.compiledTypeMap[s],u&&F.call(u.styleAliases,a)&&(a=u.styleAliases[a]),n[s]=a;return n}function i(e){var t,n,r;if(t=e.toString(16).toUpperCase(),255>=e)n="x",r=2;else if(65535>=e)n="u",r=4;else{if(!(4294967295>=e))throw new S("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+j.repeat("0",r-t.length)+t}function o(e){this.schema=e.schema||O,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=j.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function s(e,t){for(var n,r=j.repeat(" ",t),i=0,o=-1,s="",a=e.length;a>i;)o=e.indexOf("\n",i),-1===o?(n=e.slice(i),i=a):(n=e.slice(i,o+1),i=o+1),n.length&&"\n"!==n&&(s+=r),s+=n;return s}function a(e,t){return"\n"+j.repeat(" ",e.indent*t)}function u(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;r>n;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function c(e){this.source=e,this.result="",this.checkpoint=0}function l(e,t,n,r){var i,o,a,l,f,m,g,y,v,x,b,A,w,k,C,j,S,O,E,I,F;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(i=!0,o=t.length?t.charCodeAt(0):0,a=M===o||M===t.charCodeAt(t.length-1),(P===o||G===o||K===o||Z===o)&&(i=!1),a?(i=!1,l=!1,f=!1):(l=!r,f=!r),m=!0,g=new c(t),y=!1,v=0,x=0,b=e.indent*n,A=e.lineWidth,-1===A&&(A=9007199254740991),40>b?A-=b:A=40,k=0;k0&&(S=t.charCodeAt(k-1),S===M&&(f=!1,l=!1)),l&&(O=k-v,v=k,O>x&&(x=O))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(i&&u(e,t)&&(i=!1),E="",(l||f)&&(I=0,t.charCodeAt(t.length-1)===_&&(I+=1,t.charCodeAt(t.length-2)===_&&(I+=1)),0===I?E="-":2===I&&(E="+")),f&&A>x&&(l=!1),y||(f=!1),i)e.dump=t;else if(m)e.dump="'"+t+"'";else if(l)F=p(t,A),e.dump=">"+E+"\n"+s(F,b);else if(f)E||(t=t.replace(/\n$/,"")),e.dump="|"+E+"\n"+s(t,b);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function p(e,t){var n,r="",i=0,o=e.length,s=/\n+$/.exec(e);for(s&&(o=s.index+1);o>i;)n=e.indexOf("\n",i),n>o||-1===n?(r&&(r+="\n\n"),r+=f(e.slice(i,o),t),i=o):(r&&(r+="\n\n"),r+=f(e.slice(i,n),t),i=n+1);return s&&"\n"!==s[0]&&(r+=s[0]),r}function f(e,t){if(""===e)return e;for(var n,r,i,o=/[^\s] [^\s]/g,s="",a=0,u=0,c=o.exec(e);c;)n=c.index,n-u>t&&(r=a!==u?a:n,s&&(s+="\n"),i=e.slice(u,r),s+=i,u=r+1),a=n+1,c=o.exec(e);return s&&(s+="\n"),s+=u!==a&&e.length-u>t?e.slice(u,a)+"\n"+e.slice(a+1):e.slice(u)}function d(e){return N!==e&&_!==e&&T!==e&&B!==e&&J!==e&&W!==e&&V!==e&&X!==e&&U!==e&&q!==e&&$!==e&&L!==e&&Q!==e&&H!==e&&Y!==e&&D!==e&&z!==e&&R!==e&&!ee[e]&&!h(e)}function h(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var r,i,o="",s=e.tag;for(r=0,i=n.length;i>r;r+=1)b(e,t,n[r],!1,!1)&&(0!==r&&(o+=", "),o+=e.dump);e.tag=s,e.dump="["+o+"]"}function g(e,t,n,r){var i,o,s="",u=e.tag;for(i=0,o=n.length;o>i;i+=1)b(e,t+1,n[i],!0,!0)&&(r&&0===i||(s+=a(e,t)),s+="- "+e.dump);e.tag=u,e.dump=s||"[]"}function y(e,t,n){var r,i,o,s,a,u="",c=e.tag,l=Object.keys(n);for(r=0,i=l.length;i>r;r+=1)a="",0!==r&&(a+=", "),o=l[r],s=n[o],b(e,t,o,!1,!1)&&(e.dump.length>1024&&(a+="? "),a+=e.dump+": ",b(e,t,s,!1,!1)&&(a+=e.dump,u+=a));e.tag=c,e.dump="{"+u+"}"}function v(e,t,n,r){var i,o,s,u,c,l,p="",f=e.tag,d=Object.keys(n);if(e.sortKeys===!0)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new S("sortKeys must be a boolean or a function");for(i=0,o=d.length;o>i;i+=1)l="",r&&0===i||(l+=a(e,t)),s=d[i],u=n[s],b(e,t+1,s,!0,!0,!0)&&(c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,c&&(l+=e.dump&&_===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=a(e,t)),b(e,t+1,u,!0,c)&&(l+=e.dump&&_===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function x(e,t,n){var r,i,o,s,a,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;s>o;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||"object"==typeof t&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(u=e.styleMap[a.tag]||a.defaultStyle,"[object Function]"===I.call(a.represent))r=a.represent(t,u);else{if(!F.call(a.represent,u))throw new S("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');r=a.represent[u](t,u)}e.dump=r}return!0}return!1}function b(e,t,n,r,i,o){e.tag=null,e.dump=n,x(e,n,!1)||x(e,n,!0);var s=I.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t);var a,u,c="[object Object]"===s||"[object Array]"===s;if(c&&(a=e.duplicates.indexOf(n),u=-1!==a),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&u&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===s)r&&0!==Object.keys(e.dump).length?(v(e,t,e.dump,i),u&&(e.dump="&ref_"+a+e.dump)):(y(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===s)r&&0!==e.dump.length?(g(e,t,e.dump,i),u&&(e.dump="&ref_"+a+e.dump)):(m(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==s){if(e.skipInvalid)return!1;throw new S("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&l(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function A(e,t){var n,r,i=[],o=[];for(w(e,i,o),n=0,r=o.length;r>n;n+=1)t.duplicates.push(i[o[n]]);t.usedDuplicates=new Array(r)}function w(e,t,n){var r,i,o;if(null!==e&&"object"==typeof e)if(i=t.indexOf(e),-1!==i)-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;o>i;i+=1)w(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;o>i;i+=1)w(e[r[i]],t,n)}function k(e,t){t=t||{};var n=new o(t);return A(e,n),b(n,0,e,!0,!0)?n.dump+"\n":""}function C(e,t){return k(e,j.extend({schema:E},t))}var j=e("./common"),S=e("./exception"),O=e("./schema/default_full"),E=e("./schema/default_safe"),I=Object.prototype.toString,F=Object.prototype.hasOwnProperty,N=9,_=10,T=13,M=32,L=33,D=34,U=35,z=37,q=38,Y=39,$=42,B=44,P=45,R=58,H=62,G=63,K=64,J=91,W=93,Z=96,V=123,Q=124,X=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];c.prototype.takeUpTo=function(e){var t;if(e checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},c.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1,this},c.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=k,t.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function r(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var i=e("util").inherits;i(r,Error),r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=r},{util:34}],5:[function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function s(e){return 44===e||91===e||93===e||123===e||125===e}function a(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?" ":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||R,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,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 d(e,t){return new $(t,new B(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,n,r){var i,o,s,a;if(n>t){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;o>i;i+=1)s=a.charCodeAt(i),9===s||s>=32&&1114111>=s||h(e,"expected valid JSON character");else X.test(a)&&h(e,"the stream contains non-printable characters");e.result+=a}}function y(e,t,n){var r,i,o,s;for(Y.isObject(n)||h(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),o=0,s=r.length;s>o;o+=1)i=r[o],H.call(t,i)||(t[i]=n[i])}function v(e,t,n,r,i){var o,s;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(o=0,s=i.length;s>o;o+=1)y(e,t,i[o]);else y(e,t,i);else t[r]=i;return t}function x(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function b(e,t,n){for(var o=0,s=e.input.charCodeAt(e.position);0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(t&&35===s)do s=e.input.charCodeAt(++e.position);while(10!==s&&13!==s&&0!==s);if(!r(s))break;for(x(e),s=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent1&&(e.result+=Y.repeat("\n",t-1))}function k(e,t,n){var a,u,c,l,p,f,d,h,m,y=e.kind,v=e.result;if(m=e.input.charCodeAt(e.position),o(m)||s(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&s(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&s(u))break}else if(35===m){if(a=e.input.charCodeAt(e.position-1),o(a))break}else{if(e.position===e.lineStart&&A(e)||n&&s(m))break;if(r(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),e.result?!0:(e.kind=y,e.result=v,!1)}function C(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=o=e.position,e.position++}else r(n)?(g(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&A(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,i,o,s,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(256>l&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=a(l))>=0?s=(s<<4)+c:h(e,"expected hexadecimal character");e.result+=p(s),e.position++}else h(e,"unknown escape sequence");n=i=e.position}else r(l)?(g(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&A(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function S(e,t){var n,r,i,s,a,u,c,l,p,f,d,m=!0,g=e.tag,y=e.anchor;if(d=e.input.charCodeAt(e.position),91===d)s=93,c=!1,r=[];else{if(123!==d)return!1;s=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(b(e,!0,t),d=e.input.charCodeAt(e.position),d===s)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=r,!0;m||h(e,"missed comma between flow collection entries"),p=l=f=null,a=u=!1,63===d&&(i=e.input.charCodeAt(e.position+1),o(i)&&(a=u=!0,e.position++,b(e,!0,t))),n=e.line,T(e,t,G,!1,!0),p=e.tag,l=e.result,b(e,!0,t),d=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==d||(a=!0,d=e.input.charCodeAt(++e.position),b(e,!0,t),T(e,t,G,!1,!0),f=e.result),c?v(e,r,p,l,f):r.push(a?v(e,null,p,l,f):l),b(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}h(e,"unexpected end of the stream within a flow collection")}function O(e,t){var n,o,s,a,u=Z,l=!1,p=t,f=0,d=!1;if(a=e.input.charCodeAt(e.position),124===a)o=!1;else{if(62!==a)return!1;o=!0}for(e.kind="scalar",e.result="";0!==a;)if(a=e.input.charCodeAt(++e.position),43===a||45===a)Z===u?u=43===a?Q:V:h(e,"repeat of a chomping mode identifier");else{if(!((s=c(a))>=0))break;0===s?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?h(e,"repeat of an indentation width identifier"):(p=t+s-1,l=!0)}if(i(a)){do a=e.input.charCodeAt(++e.position);while(i(a));if(35===a)do a=e.input.charCodeAt(++e.position);while(!r(a)&&0!==a)}for(;0!==a;){for(x(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),r(a))f++;else{if(e.lineIndentt)&&0!==i)h(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(T(e,t,W,!0,s)&&(g?d=e.result:m=e.result),g||(v(e,p,f,d,m),f=d=m=null),b(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentu;u+=1)if(l=e.implicitTypes[u],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else H.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||g}function M(e){var t,n,s,a,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(a=e.input.charCodeAt(e.position))&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==a));){for(c=!0,a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!o(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),s=[],n.length<1&&h(e,"directive name must not be less than one character in length");0!==a;){for(;i(a);)a=e.input.charCodeAt(++e.position);if(35===a){do a=e.input.charCodeAt(++e.position);while(0!==a&&!r(a));break}if(r(a))break;for(t=e.position;0!==a&&!o(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(t,e.position))}0!==a&&x(e),H.call(ae,n)?ae[n](e,n,s):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&h(e,"directives end mark is expected"),T(e,e.lineIndent-1,W,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&A(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.positionr;r+=1)t(o[r])}function U(e,t){var n=L(e,t);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new $("expected a single document in the stream, but found more")}function z(e,t,n){D(e,t,Y.extend({schema:P},n))}function q(e,t){return U(e,Y.extend({schema:P},t))}for(var Y=e("./common"),$=e("./exception"),B=e("./mark"),P=e("./schema/default_safe"),R=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,G=1,K=2,J=3,W=4,Z=1,V=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,re=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,ie=new Array(256),oe=new Array(256),se=0;256>se;se++)ie[se]=l(se)?1:0,oe[se]=l(se);var ae={YAML:function(e,t,n){var r,i,o;null!==e.version&&h(e,"duplication of %YAML directive"),1!==n.length&&h(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===r&&h(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&h(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&h(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],ne.test(r)||h(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,r)&&h(e,'there is a previously declared suffix for "'+r+'" tag handle'),re.test(i)||h(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=z,t.exports.safeLoad=q},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function r(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}var i=e("./common");r.prototype.getSnippet=function(e,t){var n,r,o,s,a;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",s=this.position;st/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(r,s),i.repeat(" ",e)+n+a+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=r},{"./common":2}],7:[function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return r}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=r(this,"implicit",[]),this.compiledExplicit=r(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var s=e("./common"),a=e("./exception"),u=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}if(e=s.toArray(e),t=s.toArray(t),!e.every(function(e){return e instanceof o}))throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof u}))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var r=e("../schema");t.exports=r.DEFAULT=new r({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";function r(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===s.indexOf(t))throw new o('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!0},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=r(t.styleAliases||null),-1===a.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var o=e("./exception"),s=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=i},{"./exception":4}],14:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=c;for(n=0;i>n;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,s=0,u=[];for(t=0;i>t;t++)t%4===0&&t&&(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)):18===n?(u.push(s>>10&255),u.push(s>>2&255)):12===n&&u.push(s>>4&255),a?new a(u):u}function o(e){var t,n,r="",i=0,o=e.length,s=c;for(t=0;o>t;t++)t%3===0&&t&&(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}function s(e){return a&&a.isBuffer(e)}var a=e("buffer").Buffer,u=e("../type"),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r, +construct:i,predicate:s,represent:o})},{"../type":13,buffer:30}],15:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var s=e("../type");t.exports=new s("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";function r(e){return null===e?!1:c.test(e)?!0:!1}function i(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;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(a.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function s(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||a.isNegativeZero(e))}var a=e("../common"),u=e("../type"),c=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function r(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function i(e){return e>=48&&55>=e}function o(e){return e>=48&&57>=e}function s(e){if(null===e)return!1;var t,n=e.length,s=0,a=!1;if(!n)return!1;if(t=e[s],("-"===t||"+"===t)&&(t=e[++s]),"0"===t){if(s+1===n)return!0;if(t=e[++s],"b"===t){for(s++;n>s;s++)if(t=e[s],"_"!==t){if("0"!==t&&"1"!==t)return!1;a=!0}return a}if("x"===t){for(s++;n>s;s++)if(t=e[s],"_"!==t){if(!r(e.charCodeAt(s)))return!1;a=!0}return a}for(;n>s;s++)if(t=e[s],"_"!==t){if(!i(e.charCodeAt(s)))return!1;a=!0}return a}for(;n>s;s++)if(t=e[s],"_"!==t){if(":"===t)break;if(!o(e.charCodeAt(s)))return!1;a=!0}return a?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(s)):!1}function a(e){var t,n,r=e,i=1,o=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),t=r[0],("-"===t||"+"===t)&&("-"===t&&(i=-1),r=r.slice(1),t=r[0]),"0"===r?0:"0"===t?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),r=0,n=1,o.forEach(function(e){r+=e*n,n*=60}),i*r):i*parseInt(r,10)}function u(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!c.isNegativeZero(e)}var c=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:u,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;try{var t="("+e+")",n=a.parse(t,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(r){return!1}}function i(e){var t,n="("+e+")",r=a.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function s(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=e("esprima")}catch(u){"undefined"!=typeof window&&(a=window.esprima)}var c=e("../../type");t.exports=new c("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{return!0}catch(i){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function s(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function r(){return!0}function i(){return void 0}function o(){return""}function s(e){return"undefined"==typeof e}var a=e("../../type");t.exports=new a("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},{"../type":13}],23:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function o(e){return null===e}var s=e("../type");t.exports=new s("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;n>t;t+=1){if(r=c[t],o=!1,"[object Object]"!==a.call(r))return!1;for(i in r)if(s.call(r,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(e){return null!==e?e:[]}var o=e("../type"),s=Object.prototype.hasOwnProperty,a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i})},{"../type":13}],25:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;n>t;t+=1){if(r=a[t],"[object Object]"!==s.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;o[t]=[i[0],r[i[0]]]}return!0}function i(e){if(null===e)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;n>t;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var o=e("../type"),s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})},{"../type":13}],26:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n=e;for(t in n)if(s.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var o=e("../type"),s=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})},{"../type":13}],28:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";function r(e){return null===e?!1:null===a.exec(e)?!1:!0}function i(e){var t,n,r,i,o,s,u,c,l,p,f=0,d=null;if(t=a.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(c=+t[10],l=+(t[11]||0),d=6e4*(60*c+l),"-"===t[9]&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,u,f)),d&&p.setTime(p.getTime()-d),p}function o(e){return e.toISOString()}var s=e("../type"),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},{"../type":13}],30:[function(e,t,n){},{}],31:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],32:[function(e,t,n){function r(){l=!1,a.length?c=a.concat(c):p=-1,c.length&&i()}function i(){if(!l){var e=setTimeout(r);l=!0;for(var t=c.length;t;){for(a=c,c=[];++p1)for(var n=1;n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(t)?r.showHidden=t:t&&n._extend(r,t),A(r.showHidden)&&(r.showHidden=!1),A(r.depth)&&(r.depth=2),A(r.colors)&&(r.colors=!1),A(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return x(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),m=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),j(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(S(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(j(t))return l(t)}var y="",v=!1,b=["{","}"];if(h(t)&&(v=!0,b=["[","]"]),S(t)){var A=t.name?": "+t.name:"";y=" [Function"+A+"]"}if(w(t)&&(y=" "+RegExp.prototype.toString.call(t)),C(t)&&(y=" "+Date.prototype.toUTCString.call(t)),j(t)&&(y=" "+l(t)),0===s.length&&(!v||0==t.length))return b[0]+y+b[1];if(0>r)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=v?p(e,t,r,m,s):s.map(function(n){return f(e,t,r,m,n,v)}),e.seen.pop(),d(k,y,b)}function c(e,t){if(A(t))return e.stylize("undefined","undefined");if(x(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],s=0,a=t.length;a>s;++s)o.push(N(t,String(s))?f(e,t,n,r,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))}),o}function f(e,t,n,r,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),N(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(n)?u(e,c.value,null):u(e,c.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),A(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return null==e}function v(e){return"number"==typeof e}function x(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function A(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===E(e)}function k(e){return"object"==typeof e&&null!==e}function C(e){return k(e)&&"[object Date]"===E(e)}function j(e){return k(e)&&("[object Error]"===E(e)||e instanceof Error)}function S(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function E(e){return Object.prototype.toString.call(e)}function I(e){return 10>e?"0"+e.toString(10):e.toString(10)}function F(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var _=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),a=r[n];o>n;a=r[++n])s+=g(a)||!k(a)?" "+a:" "+i(a);return s},n.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(A(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var T,M={};n.debuglog=function(e){if(A(T)&&(T=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(T)){var r=t.pid;M[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else M[e]=function(){};return M[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=m,n.isNull=g,n.isNullOrUndefined=y,n.isNumber=v,n.isString=x,n.isSymbol=b,n.isUndefined=A,n.isRegExp=w,n.isObject=k,n.isDate=C,n.isError=j,n.isFunction=S,n.isPrimitive=O,n.isBuffer=e("./support/isBuffer");var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",F(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!k(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":33,_process:32,inherits:31}],"/":[function(e,t,n){"use strict";var r=e("./lib/js-yaml.js");t.exports=r},{"./lib/js-yaml.js":1}]},{},[])("/")}); diff --git a/tools/eslint/node_modules/js-yaml/examples/custom_types.js b/tools/eslint/node_modules/js-yaml/examples/custom_types.js deleted file mode 100644 index b5c7b9f7de015e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/custom_types.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; - -/*eslint-disable no-console*/ - -var fs = require('fs'); -var path = require('path'); -var util = require('util'); -var yaml = require('../lib/js-yaml'); - - -// Let's define a couple of classes. - -function Point(x, y, z) { - this.klass = 'Point'; - this.x = x; - this.y = y; - this.z = z; -} - - -function Space(height, width, points) { - if (points) { - if (!points.every(function (point) { return point instanceof Point; })) { - throw new Error('A non-Point inside a points array!'); - } - } - - this.klass = 'Space'; - this.height = height; - this.width = width; - this.points = points; -} - - -// Then define YAML types to load and dump our Point/Space objects. - -var PointYamlType = new yaml.Type('!point', { - // Loader must parse sequence nodes only for this type (i.e. arrays in JS terminology). - // Other available kinds are 'scalar' (string) and 'mapping' (object). - // http://www.yaml.org/spec/1.2/spec.html#kind// - kind: 'sequence', - - // Loader must check if the input object is suitable for this type. - resolve: function (data) { - // `data` may be either: - // - Null in case of an "empty node" (http://www.yaml.org/spec/1.2/spec.html#id2786563) - // - Array since we specified `kind` to 'sequence' - return data !== null && data.length === 3; - }, - - // If a node is resolved, use it to create a Point instance. - construct: function (data) { - return new Point(data[0], data[1], data[2]); - }, - - // Dumper must process instances of Point by rules of this YAML type. - instanceOf: Point, - - // Dumper must represent Point objects as three-element sequence in YAML. - represent: function (point) { - return [ point.x, point.y, point.z ]; - } -}); - - -var SpaceYamlType = new yaml.Type('!space', { - kind: 'mapping', - construct: function (data) { - data = data || {}; // in case of empty node - return new Space(data.height || 0, data.width || 0, data.points || []); - }, - instanceOf: Space - // `represent` is omitted here. So, Space objects will be dumped as is. - // That is regular mapping with three key-value pairs but with !space tag. -}); - - -// After our types are defined, it's time to join them into a schema. - -var SPACE_SCHEMA = yaml.Schema.create([ SpaceYamlType, PointYamlType ]); - -// do not execute the following if file is required (http://stackoverflow.com/a/6398335) -if (require.main === module) { - - // And read a document using that schema. - fs.readFile(path.join(__dirname, 'custom_types.yml'), 'utf8', function (error, data) { - var loaded; - - if (!error) { - loaded = yaml.load(data, { schema: SPACE_SCHEMA }); - console.log(util.inspect(loaded, false, 20, true)); - } else { - console.error(error.stack || error.message || String(error)); - } - }); -} - -// There are some exports to play with this example interactively. -module.exports.Point = Point; -module.exports.Space = Space; -module.exports.PointYamlType = PointYamlType; -module.exports.SpaceYamlType = SpaceYamlType; -module.exports.SPACE_SCHEMA = SPACE_SCHEMA; diff --git a/tools/eslint/node_modules/js-yaml/examples/custom_types.yml b/tools/eslint/node_modules/js-yaml/examples/custom_types.yml deleted file mode 100644 index f10d4e25a414da..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/custom_types.yml +++ /dev/null @@ -1,18 +0,0 @@ -subject: Custom types in JS-YAML -spaces: -- !space - height: 1000 - width: 1000 - points: - - !point [ 10, 43, 23 ] - - !point [ 165, 0, 50 ] - - !point [ 100, 100, 100 ] - -- !space - height: 64 - width: 128 - points: - - !point [ 12, 43, 0 ] - - !point [ 1, 4, 90 ] - -- !space # An empty space diff --git a/tools/eslint/node_modules/js-yaml/examples/dumper.js b/tools/eslint/node_modules/js-yaml/examples/dumper.js deleted file mode 100644 index d237949530f6dd..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/dumper.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -/*eslint-disable no-console*/ - -var yaml = require('../lib/js-yaml'); -var object = require('./dumper.json'); - - -console.log(yaml.dump(object, { - flowLevel: 3, - styles: { - '!!int' : 'hexadecimal', - '!!null' : 'camelcase' - } -})); - - -// Output: -//============================================================================== -// name: Wizzard -// level: 0x11 -// sanity: Null -// inventory: -// - name: Hat -// features: [magic, pointed] -// traits: {} -// - name: Staff -// features: [] -// traits: {damage: 0xA} -// - name: Cloak -// features: [old] -// traits: {defence: 0x0, comfort: 0x3} diff --git a/tools/eslint/node_modules/js-yaml/examples/dumper.json b/tools/eslint/node_modules/js-yaml/examples/dumper.json deleted file mode 100644 index 9f54c053e51720..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/dumper.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name" : "Wizzard", - "level" : 17, - "sanity" : null, - "inventory" : [ - { - "name" : "Hat", - "features" : [ "magic", "pointed" ], - "traits" : {} - }, - { - "name" : "Staff", - "features" : [], - "traits" : { "damage" : 10 } - }, - { - "name" : "Cloak", - "features" : [ "old" ], - "traits" : { "defence" : 0, "comfort" : 3 } - } - ] -} diff --git a/tools/eslint/node_modules/js-yaml/examples/sample_document.js b/tools/eslint/node_modules/js-yaml/examples/sample_document.js deleted file mode 100644 index 3204fa50f94243..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/sample_document.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -/*eslint-disable no-console*/ - -var fs = require('fs'); -var path = require('path'); -var util = require('util'); -var yaml = require('../lib/js-yaml'); - - -try { - var filename = path.join(__dirname, 'sample_document.yml'), - contents = fs.readFileSync(filename, 'utf8'), - data = yaml.load(contents); - - console.log(util.inspect(data, false, 10, true)); -} catch (err) { - console.log(err.stack || String(err)); -} diff --git a/tools/eslint/node_modules/js-yaml/examples/sample_document.yml b/tools/eslint/node_modules/js-yaml/examples/sample_document.yml deleted file mode 100644 index 4479ee9c0783cf..00000000000000 --- a/tools/eslint/node_modules/js-yaml/examples/sample_document.yml +++ /dev/null @@ -1,197 +0,0 @@ ---- -# Collection Types ############################################################# -################################################################################ - -# http://yaml.org/type/map.html -----------------------------------------------# - -map: - # Unordered set of key: value pairs. - Block style: !!map - Clark : Evans - Ingy : döt Net - Oren : Ben-Kiki - Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki } - -# http://yaml.org/type/omap.html ----------------------------------------------# - -omap: - # Explicitly typed ordered map (dictionary). - Bestiary: !!omap - - aardvark: African pig-like ant eater. Ugly. - - anteater: South-American ant eater. Two species. - - anaconda: South-American constrictor snake. Scaly. - # Etc. - # Flow style - Numbers: !!omap [ one: 1, two: 2, three : 3 ] - -# http://yaml.org/type/pairs.html ---------------------------------------------# - -pairs: - # Explicitly typed pairs. - Block tasks: !!pairs - - meeting: with team. - - meeting: with boss. - - break: lunch. - - meeting: with client. - Flow tasks: !!pairs [ meeting: with team, meeting: with boss ] - -# http://yaml.org/type/set.html -----------------------------------------------# - -set: - # Explicitly typed set. - baseball players: !!set - ? Mark McGwire - ? Sammy Sosa - ? Ken Griffey - # Flow style - baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees } - -# http://yaml.org/type/seq.html -----------------------------------------------# - -seq: - # Ordered sequence of nodes - Block style: !!seq - - Mercury # Rotates - no light/dark sides. - - Venus # Deadliest. Aptly named. - - Earth # Mostly dirt. - - Mars # Seems empty. - - Jupiter # The king. - - Saturn # Pretty. - - Uranus # Where the sun hardly shines. - - Neptune # Boring. No rings. - - Pluto # You call this a planet? - Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks - Jupiter, Saturn, Uranus, Neptune, # Gas - Pluto ] # Overrated - - -# Scalar Types ################################################################# -################################################################################ - -# http://yaml.org/type/binary.html --------------------------------------------# - -binary: - canonical: !!binary "\ - R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\ - OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\ - +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\ - AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=" - generic: !!binary | - R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5 - OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+ - +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC - AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs= - description: - The binary value above is a tiny arrow encoded as a gif image. - -# http://yaml.org/type/bool.html ----------------------------------------------# - -bool: - - true - - True - - TRUE - - false - - False - - FALSE - -# http://yaml.org/type/float.html ---------------------------------------------# - -float: - canonical: 6.8523015e+5 - exponentioal: 685.230_15e+03 - fixed: 685_230.15 - sexagesimal: 190:20:30.15 - negative infinity: -.inf - not a number: .NaN - -# http://yaml.org/type/int.html -----------------------------------------------# - -int: - canonical: 685230 - decimal: +685_230 - octal: 02472256 - hexadecimal: 0x_0A_74_AE - binary: 0b1010_0111_0100_1010_1110 - sexagesimal: 190:20:30 - -# http://yaml.org/type/merge.html ---------------------------------------------# - -merge: - - &CENTER { x: 1, y: 2 } - - &LEFT { x: 0, y: 2 } - - &BIG { r: 10 } - - &SMALL { r: 1 } - - # All the following maps are equal: - - - # Explicit keys - x: 1 - y: 2 - r: 10 - label: nothing - - - # Merge one map - << : *CENTER - r: 10 - label: center - - - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - - - # Override - << : [ *BIG, *LEFT, *SMALL ] - x: 1 - label: big/left/small - -# http://yaml.org/type/null.html ----------------------------------------------# - -null: - # This mapping has four keys, - # one has a value. - empty: - canonical: ~ - english: null - ~: null key - # This sequence has five - # entries, two have values. - sparse: - - ~ - - 2nd entry - - - - 4th entry - - Null - -# http://yaml.org/type/str.html -----------------------------------------------# - -string: abcd - -# http://yaml.org/type/timestamp.html -----------------------------------------# - -timestamp: - canonical: 2001-12-15T02:59:43.1Z - valid iso8601: 2001-12-14t21:59:43.10-05:00 - space separated: 2001-12-14 21:59:43.10 -5 - no time zone (Z): 2001-12-15 2:59:43.10 - date (00:00:00Z): 2002-12-14 - - -# JavaScript Specific Types #################################################### -################################################################################ - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp - -regexp: - simple: !!js/regexp foobar - modifiers: !!js/regexp /foobar/mi - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/undefined - -undefined: !!js/undefined ~ - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function - -function: !!js/function > - function foobar() { - return 'Wow! JS-YAML Rocks!'; - } diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml.js index 842104eca3be9e..f0e92818e90cee 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml.js @@ -27,7 +27,7 @@ module.exports.dump = dumper.dump; module.exports.safeDump = dumper.safeDump; module.exports.YAMLException = require('./js-yaml/exception'); -// Deprecared schema names from JS-YAML 2.0.x +// Deprecated schema names from JS-YAML 2.0.x module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js index fabc0c3cd04f28..26112f6f7eb066 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js @@ -115,6 +115,7 @@ function State(options) { this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); this.styleMap = compileStyleMap(this.schema, options['styles'] || null); this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; this.implicitTypes = this.schema.compiledImplicit; this.explicitTypes = this.schema.compiledExplicit; @@ -208,7 +209,7 @@ StringBuilder.prototype.finish = function () { } }; -function writeScalar(state, object, level) { +function writeScalar(state, object, level, iskey) { var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, @@ -238,14 +239,14 @@ function writeScalar(state, object, level) { simple = false; } - // can only use > and | if not wrapped in spaces. + // can only use > and | if not wrapped in spaces or is not a key. if (spaceWrap) { simple = false; folded = false; literal = false; } else { - folded = true; - literal = true; + folded = !iskey; + literal = !iskey; } single = true; @@ -256,7 +257,13 @@ function writeScalar(state, object, level) { longestLine = 0; indent = state.indent * level; - max = 80; + max = state.lineWidth; + if (max === -1) { + // Replace -1 with biggest ingeger number according to + // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 + max = 9007199254740991; + } + if (indent < 40) { max -= indent; } else { @@ -622,7 +629,7 @@ function writeBlockMapping(state, level, object, compact) { objectKey = objectKeyList[index]; objectValue = object[objectKey]; - if (!writeNode(state, level + 1, objectKey, true, true)) { + if (!writeNode(state, level + 1, objectKey, true, true, true)) { continue; // Skip this pair because of invalid key. } @@ -701,7 +708,7 @@ function detectType(state, object, explicit) { // Serializes `object` and writes it to global `result`. // Returns true on success, or false on invalid object. // -function writeNode(state, level, object, block, compact) { +function writeNode(state, level, object, block, compact, iskey) { state.tag = null; state.dump = object; @@ -715,10 +722,6 @@ function writeNode(state, level, object, block, compact) { block = (0 > state.flowLevel || state.flowLevel > level); } - if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) { - compact = false; - } - var objectOrArray = '[object Object]' === type || '[object Array]' === type, duplicateIndex, duplicate; @@ -728,6 +731,10 @@ function writeNode(state, level, object, block, compact) { duplicate = duplicateIndex !== -1; } + if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { state.dump = '*ref_' + duplicateIndex; } else { @@ -738,7 +745,7 @@ function writeNode(state, level, object, block, compact) { if (block && (0 !== Object.keys(state.dump).length)) { writeBlockMapping(state, level, state.dump, compact); if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; + state.dump = '&ref_' + duplicateIndex + state.dump; } } else { writeFlowMapping(state, level, state.dump); @@ -750,7 +757,7 @@ function writeNode(state, level, object, block, compact) { if (block && (0 !== state.dump.length)) { writeBlockSequence(state, level, state.dump, compact); if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; + state.dump = '&ref_' + duplicateIndex + state.dump; } } else { writeFlowSequence(state, level, state.dump); @@ -760,7 +767,7 @@ function writeNode(state, level, object, block, compact) { } } else if ('[object String]' === type) { if ('?' !== state.tag) { - writeScalar(state, state.dump, level); + writeScalar(state, state.dump, level, iskey); } } else { if (state.skipInvalid) { @@ -792,8 +799,7 @@ function getDuplicateReferences(object, state) { } function inspectNode(object, objects, duplicatesIndexes) { - var type = _toString.call(object), - objectKeyList, + var objectKeyList, index, length; diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/exception.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/exception.js index 479ba88791de26..d63f309e7b814c 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/exception.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/exception.js @@ -1,18 +1,39 @@ +// YAML error class. http://stackoverflow.com/questions/8458984 +// 'use strict'; +var inherits = require('util').inherits; + + function YAMLException(reason, mark) { - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = this.toString(false); + // Super constructor + Error.call(this); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); } +// Inherit from Error +inherits(YAMLException, Error); + + YAMLException.prototype.toString = function toString(compact) { - var result; + var result = this.name + ': '; - result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); + result += this.reason || '(unknown reason)'; if (!compact && this.mark) { result += ' ' + this.mark.toString(); diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js index 1012ff56a1faf8..960bf4534b1265 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js @@ -167,12 +167,8 @@ function throwError(state, message) { } function throwWarning(state, message) { - var error = generateError(state, message); - if (state.onWarning) { - state.onWarning.call(null, error); - } else { - throw error; + state.onWarning.call(null, generateError(state, message)); } } @@ -256,6 +252,8 @@ function captureSegment(state, start, end, checkJson) { throwError(state, 'expected valid JSON character'); } } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); } state.result += _result; @@ -553,7 +551,7 @@ function readDoubleQuotedScalar(state, nodeIndent) { captureEnd, hexLength, hexResult, - tmp, tmpEsc, + tmp, ch; ch = state.input.charCodeAt(state.position); @@ -857,6 +855,7 @@ function readBlockScalar(state, nodeIndent) { state.result += common.repeat('\n', emptyLines + 1); } else { // In case of the first content line - count only empty lines. + state.result += common.repeat('\n', emptyLines); } detectedIndent = true; @@ -1214,8 +1213,6 @@ function readAnchorProperty(state) { function readAlias(state) { var _position, alias, - len = state.length, - input = state.input, ch; ch = state.input.charCodeAt(state.position); @@ -1257,8 +1254,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact typeQuantity, type, flowIndent, - blockIndent, - _result; + blockIndent; state.tag = null; state.anchor = null; @@ -1389,7 +1385,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } } } else { - throwWarning(state, 'unknown tag !<' + state.tag + '>'); + throwError(state, 'unknown tag !<' + state.tag + '>'); } } @@ -1528,10 +1524,6 @@ function loadDocuments(input, options) { var state = new State(input, options); - if (PATTERN_NON_PRINTABLE.test(state.input)) { - throwError(state, 'the stream contains non-printable characters'); - } - // Use 0 as string terminator. That significantly simplifies bounds check. state.input += '\0'; @@ -1558,7 +1550,7 @@ function loadAll(input, iterator, options) { function load(input, options) { - var documents = loadDocuments(input, options), index, length; + var documents = loadDocuments(input, options); if (0 === documents.length) { /*eslint-disable no-undefined*/ diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js index 122155c75bdab2..b4cdba1eac4286 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js @@ -17,7 +17,7 @@ function resolveYamlBinary(data) { return false; } - var code, idx, bitlen = 0, len = 0, max = data.length, map = BASE64_MAP; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; // Convert one by one. for (idx = 0; idx < max; idx++) { @@ -37,7 +37,7 @@ function resolveYamlBinary(data) { } function constructYamlBinary(data) { - var code, idx, tailbits, + var idx, tailbits, input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan max = input.length, map = BASE64_MAP, diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js index 67c9c21f247a8d..8151a6e6404297 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js @@ -15,8 +15,6 @@ function resolveYamlFloat(data) { return false; } - var value, sign, base, digits; - if (!YAML_FLOAT_PATTERN.test(data)) { return false; } @@ -59,7 +57,12 @@ function constructYamlFloat(data) { return sign * parseFloat(value, 10); } + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { switch (style) { case 'lowercase': @@ -90,7 +93,13 @@ function representYamlFloat(object, style) { } else if (common.isNegativeZero(object)) { return '-0.0'; } - return object.toString(10); + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; } function isFloat(object) { diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js index 4061c43ad11714..0bc07c4f849dbb 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js @@ -25,9 +25,7 @@ function resolveJavascriptFunction(data) { try { var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; + ast = esprima.parse(source, { range: true }); if ('Program' !== ast.type || 1 !== ast.body.length || diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js index 07ef5218ed91f0..d4f3703c1234f5 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js @@ -30,7 +30,6 @@ function resolveJavascriptRegExp(data) { } try { - var dummy = new RegExp(regexp, modifiers); return true; } catch (error) { return false; diff --git a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js index dc8cf15a06f424..8d5e759c16bdb8 100644 --- a/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +++ b/tools/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js @@ -19,12 +19,7 @@ function resolveYamlTimestamp(data) { return false; } - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (null === match) { + if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { return false; } diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/CHANGELOG.md b/tools/eslint/node_modules/js-yaml/node_modules/argparse/CHANGELOG.md deleted file mode 100644 index 661e75d76511b6..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -1.0.2 / 2015-03-22 ------------------- - -* Relaxed lodash version dependency. - - -1.0.1 / 2015-02-20 ------------------- - -* Changed dependencies to be compatible with ancient nodejs. - - -1.0.0 / 2015-02-19 ------------------- - -* Maintenance release. -* Replaced `underscore` with `lodash`. -* Bumped version to 1.0.0 to better reflect semver meaning. -* HISTORY.md -> CHANGELOG.md - - -0.1.16 / 2013-12-01 -------------------- - -* Maintenance release. Updated dependencies and docs. - - -0.1.15 / 2013-05-13 -------------------- - -* Fixed #55, @trebor89 - - -0.1.14 / 2013-05-12 -------------------- - -* Fixed #62, @maxtaco - - -0.1.13 / 2013-04-08 -------------------- - -* Added `.npmignore` to reduce package size - - -0.1.12 / 2013-02-10 -------------------- - -* Fixed conflictHandler (#46), @hpaulj - - -0.1.11 / 2013-02-07 -------------------- - -* Multiple bugfixes, @hpaulj -* Added 70+ tests (ported from python), @hpaulj -* Added conflictHandler, @applepicke -* Added fromfilePrefixChar, @hpaulj - - -0.1.10 / 2012-12-30 -------------------- - -* Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj -* Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -0.1.9 / 2012-12-27 ------------------- - -* Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -* Fixed default value behavior with `*` positionals, thanks to @hpaulj -* Improve `getDefault()` behavior, thanks to @hpaulj -* Imrove negative argument parsing, thanks to @hpaulj - - -0.1.8 / 2012-12-01 ------------------- - -* Fixed parser parents (issue #19), thanks to @hpaulj -* Fixed negative argument parse (issue #20), thanks to @hpaulj - - -0.1.7 / 2012-10-14 ------------------- - -* Fixed 'choices' argument parse (issue #16) -* Fixed stderr output (issue #15) - - -0.1.6 / 2012-09-09 ------------------- - -* Fixed check for conflict of options (thanks to @tomxtobin) - - -0.1.5 / 2012-09-03 ------------------- - -* Fix parser #setDefaults method (thanks to @tomxtobin) - - -0.1.4 / 2012-07-30 ------------------- - -* Fixed pseudo-argument support (thanks to @CGamesPlay) -* Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -0.1.3 / 2012-06-27 ------------------- - -* Fixed formatter api name: Formatter -> HelpFormatter - - -0.1.2 / 2012-05-29 ------------------- - -* Added basic tests -* Removed excess whitespace in help -* Fixed error reporting, when parcer with subcommands - called with empty arguments - - -0.1.1 / 2012-05-23 ------------------- - -* Fixed line wrapping in help formatter -* Added better error reporting on invalid arguments - - -0.1.0 / 2012-05-16 ------------------- - -* First release. diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/README.md b/tools/eslint/node_modules/js-yaml/node_modules/argparse/README.md deleted file mode 100644 index 72e4261688e8d2..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/README.md +++ /dev/null @@ -1,243 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse) -[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) - -CLI arguments parser for node.js. Javascript port of python's -[argparse](http://docs.python.org/dev/library/argparse.html) module -(original version 3.2). That's a full port, except some very rare options, -recorded in issue tracker. - -**NB. Difference with original.** - -- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). -- Use `defaultValue` instead of `default`. - - -Example -======= - -test.js file: - -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse example' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); -var args = parser.parseArgs(); -console.dir(args); -``` - -Display help: - -``` -$ ./test.js -h -usage: example.js [-h] [-v] [-f FOO] [-b BAR] - -Argparse example - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 -{ foo: '3', bar: '4' } -``` - -More [examples](https://github.com/nodeca/argparse/tree/master/examples). - - -ArgumentParser objects -====================== - -``` -new ArgumentParser({paramters hash}); -``` - -Creates a new ArgumentParser object. - -**Supported params:** - -- ```description``` - Text to display before the argument help. -- ```epilog``` - Text to display after the argument help. -- ```addHelp``` - Add a -h/–help option to the parser. (default: true) -- ```argumentDefault``` - Set the global default value for arguments. (default: null) -- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. -- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) -- ```formatterClass``` - A class for customizing the help output. -- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) -- ```usage``` - The string describing the program usage (default: generated) -- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. - -**Not supportied yet** - -- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. - - -Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) - - -addArgument() method -==================== - -``` -ArgumentParser.addArgument([names or flags], {options}) -``` - -Defines how a single command-line argument should be parsed. - -- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo. - -Options: - -- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. -- ```nargs```- The number of command-line arguments that should be consumed. -- ```constant``` - A constant value required by some action and nargs selections. -- ```defaultValue``` - The value produced if the argument is absent from the command line. -- ```type``` - The type to which the command-line argument should be converted. -- ```choices``` - A container of the allowable values for the argument. -- ```required``` - Whether or not the command-line option may be omitted (optionals only). -- ```help``` - A brief description of what the argument does. -- ```metavar``` - A name for the argument in usage messages. -- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). - -Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) - - -Action (some details) -================ - -ArgumentParser objects associate command-line arguments with actions. -These actions can do just about anything with the command-line arguments associated -with them, though most actions simply add an attribute to the object returned by -parseArgs(). The action keyword argument specifies how the command-line arguments -should be handled. The supported actions are: - -- ```store``` - Just stores the argument’s value. This is the default action. -- ```storeConst``` - Stores value, specified by the const keyword argument. - (Note that the const keyword argument defaults to the rather unhelpful None.) - The 'storeConst' action is most commonly used with optional arguments, that - specify some sort of flag. -- ```storeTrue``` and ```storeFalse``` - Stores values True and False - respectively. These are special cases of 'storeConst'. -- ```append``` - Stores a list, and appends each argument value to the list. - This is useful to allow an option to be specified multiple times. -- ```appendConst``` - Stores a list, and appends value, specified by the - const keyword argument to the list. (Note, that the const keyword argument defaults - is None.) The 'appendConst' action is typically used when multiple arguments need - to store constants to the same list. -- ```count``` - Counts the number of times a keyword argument occurs. For example, - used for increasing verbosity levels. -- ```help``` - Prints a complete help message for all the options in the current - parser and then exits. By default a help action is automatically added to the parser. - See ArgumentParser for details of how the output is created. -- ```version``` - Prints version information and exit. Expects a `version=` - keyword argument in the addArgument() call. - -Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) - - -Sub-commands -============ - -ArgumentParser.addSubparsers() - -Many programs split their functionality into a number of sub-commands, for -example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, -and `svn commit`. Splitting up functionality this way can be a particularly good -idea when a program performs several different functions which require different -kinds of command-line arguments. `ArgumentParser` supports creation of such -sub-commands with `addSubparsers()` method. The `addSubparsers()` method is -normally called with no arguments and returns an special action object. -This object has a single method `addParser()`, which takes a command name and -any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object -that can be modified as usual. - -Example: - -sub_commands.js -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse examples: sub-commands', -}); - -var subparsers = parser.addSubparsers({ - title:'subcommands', - dest:"subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp:true}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases:['co'], addHelp:true} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); - -var args = parser.parseArgs(); -console.dir(args); - -``` - -Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) - - -Contributors -============ - -- [Eugene Shkuropat](https://github.com/shkuropat) -- [Paul Jacobson](https://github.com/hpaulj) - -[others](https://github.com/nodeca/argparse/graphs/contributors) - -License -======= - -Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). -Released under the MIT license. See -[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. - - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/arguments.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/arguments.js deleted file mode 100755 index 5b090fa2e1185a..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: arguments' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); - - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-f 1 -b2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('-f=3 --bar=4'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--foo 5 --bar 6'.split(' ')); -console.dir(args); -console.log('-----------'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js deleted file mode 100755 index 2616fa4d75275e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: choice' -}); - -parser.addArgument(['foo'], {choices: 'abc'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['c']); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['X']); -console.dir(args); - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/constants.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/constants.js deleted file mode 100755 index 172a4f3d4f62c0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/constants.js +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: constant' -}); - -parser.addArgument( - [ '-a'], - { - action: 'storeConst', - dest: 'answer', - help: 'store constant', - constant: 42 - } -); -parser.addArgument( - [ '--str' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "str" to types', - constant: 'str' - } -); -parser.addArgument( - [ '--int' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "int" to types', - constant: 'int' - } -); - -parser.addArgument( - [ '--true' ], - { - action: 'storeTrue', - help: 'store true constant' - } -); -parser.addArgument( - [ '--false' ], - { - action: 'storeFalse', - help: 'store false constant' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-a --str --int --true'.split(' ')); -console.dir(args); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/help.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/help.js deleted file mode 100755 index 7eb955534fe29c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/help.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: help', - epilog: 'help epilog', - prog: 'help_example_prog', - usage: 'Usage %(prog)s ' -}); -parser.printHelp(); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/nargs.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/nargs.js deleted file mode 100755 index 74f376beba4a4c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: nargs' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar', - nargs: 1 - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo', - nargs: '*' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('--foo a --bar c d'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--bar b c f --foo a'.split(' ')); -console.dir(args); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/parents.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/parents.js deleted file mode 100755 index dfe896868bd0f6..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/parents.js +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; - -var args; -var parent_parser = new ArgumentParser({ addHelp: false }); -// note addHelp:false to prevent duplication of the -h option -parent_parser.addArgument( - ['--parent'], - { type: 'int', description: 'parent' } -); - -var foo_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child1' -}); -foo_parser.addArgument(['foo']); -args = foo_parser.parseArgs(['--parent', '2', 'XXX']); -console.log(args); - -var bar_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child2' -}); -bar_parser.addArgument(['--bar']); -args = bar_parser.parseArgs(['--bar', 'YYY']); -console.log(args); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js deleted file mode 100755 index 430d5e182346d9..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: prefix_chars', - prefixChars: '-+' -}); -parser.addArgument(['+f', '++foo']); -parser.addArgument(['++bar'], {action: 'storeTrue'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['+f', '1']); -console.dir(args); -args = parser.parseArgs(['++bar']); -console.dir(args); -args = parser.parseArgs(['++foo', '2', '++bar']); -console.dir(args); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js deleted file mode 100755 index df9c494440bee0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: sub-commands' -}); - -var subparsers = parser.addSubparsers({ - title: 'subcommands', - dest: "subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp: true, help: 'c1 help'}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases: ['co'], addHelp: true, help: 'c2 help'} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('c1 -f 2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('c2 -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('co -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['c1', '-h']); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sum.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sum.js deleted file mode 100755 index 4532800a50d31f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/sum.js +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ description: 'Process some integers.' }); - - -function sum(arr) { - return arr.reduce(function (a, b) { - return a + b; - }, 0); -} -function max(arr) { - return Math.max.apply(Math, arr); -} - - -parser.addArgument(['integers'], { - metavar: 'N', - type: 'int', - nargs: '+', - help: 'an integer for the accumulator' -}); -parser.addArgument(['--sum'], { - dest: 'accumulate', - action: 'storeConst', - constant: sum, - defaultValue: max, - help: 'sum the integers (default: find the max)' -}); - -var args = parser.parseArgs('--sum 1 2 -1'.split(' ')); -console.log(args.accumulate(args.integers)); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js deleted file mode 100644 index 1c03cdc8435c81..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +++ /dev/null @@ -1,270 +0,0 @@ -'use strict'; - -var a, group, parser, helptext; - -var assert = require('assert'); - - -var print = function () { - return console.log.apply(console, arguments); - }; -// print = function () {}; - -var argparse = require('argparse'); - -print("TEST argparse.ArgumentDefaultsHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - formatterClass: argparse.ArgumentDefaultsHelpFormatter, - description: 'description' -}); - -parser.addArgument(['--foo'], { - help: 'foo help - oh and by the way, %(defaultValue)s' -}); - -parser.addArgument(['--bar'], { - action: 'storeTrue', - help: 'bar help' -}); - -parser.addArgument(['spam'], { - help: 'spam help' -}); - -parser.addArgument(['badger'], { - nargs: '?', - defaultValue: 'wooden', - help: 'badger help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: 'group description' -}); - -group.addArgument(['--baz'], { - type: 'int', - defaultValue: 42, - help: 'baz help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(/badger help \(default: wooden\)/)); -assert(helptext.match(/foo help - oh and by the way, null/)); -assert(helptext.match(/bar help \(default: false\)/)); -assert(helptext.match(/title:\n {2}group description/)); // test indent -assert(helptext.match(/baz help \(default: 42\)/im)); - -/* -usage: PROG [-h] [--foo FOO] [--bar] [--baz BAZ] spam [badger] - -description - -positional arguments: - spam spam help - badger badger help (default: wooden) - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help - oh and by the way, null - --bar bar help (default: false) - -title: - group description - - --baz BAZ baz help (default: 42) -*/ - -print("TEST argparse.RawDescriptionHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawDescriptionHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should not\n' + - ' retain this odd formatting' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert.equal(helptext.match(a.help), null); -assert(helptext.match(/foo help should not retain this odd formatting/)); - -/* -class TestHelpRawDescription(HelpTestCase): - """Test the RawTextHelpFormatter""" -.... - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should not retain this odd formatting - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST argparse.RawTextHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawTextHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -parser.addArgument(['--baz'], { - help: ' baz help should also\n' + - 'appear as given here' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should also\n' + - 'appear as given here' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert(helptext.match(/( {14})appear as given here/gm)); - -/* -class TestHelpRawText(HelpTestCase): - """Test the RawTextHelpFormatter""" - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should also - appear as given here - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST metavar as a tuple"); - -parser = new argparse.ArgumentParser({ - prog: 'PROG' -}); - -parser.addArgument(['-w'], { - help: 'w', - nargs: '+', - metavar: ['W1', 'W2'] -}); - -parser.addArgument(['-x'], { - help: 'x', - nargs: '*', - metavar: ['X1', 'X2'] -}); - -parser.addArgument(['-y'], { - help: 'y', - nargs: 3, - metavar: ['Y1', 'Y2', 'Y3'] -}); - -parser.addArgument(['-z'], { - help: 'z', - nargs: '?', - metavar: ['Z1'] -}); - -helptext = parser.formatHelp(); -print(helptext); -var ustring = 'PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]'; -ustring = ustring.replace(/\[/g, '\\[').replace(/\]/g, '\\]'); -// print(ustring) -assert(helptext.match(new RegExp(ustring))); - -/* -class TestHelpTupleMetavar(HelpTestCase): - """Test specifying metavar as a tuple""" - -usage: PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]] - -optional arguments: - -h, --help show this help message and exit - -w W1 [W2 ...] w - -x [X1 [X2 ...]] x - -y Y1 Y2 Y3 y - -z [Z1] z -*/ - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js deleted file mode 100644 index 58b271f2fec8d0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +++ /dev/null @@ -1,75 +0,0 @@ -/** internal - * class ArgumentGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments” and “optional arguments” - * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ActionContainer = require('../action_container'); - - -/** - * new ArgumentGroup(container, options) - * - container (object): main container - * - options (object): hash of group options - * - * #### options - * - **prefixChars** group name prefix - * - **argumentDefault** default argument value - * - **title** group title - * - **description** group description - * - **/ -var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { - - options = options || {}; - - // add any missing keyword arguments by checking the container - options.conflictHandler = (options.conflictHandler || container.conflictHandler); - options.prefixChars = (options.prefixChars || container.prefixChars); - options.argumentDefault = (options.argumentDefault || container.argumentDefault); - - ActionContainer.call(this, options); - - // group attributes - this.title = options.title; - this._groupActions = []; - - // share most attributes with the container - this._container = container; - this._registries = container._registries; - this._actions = container._actions; - this._optionStringActions = container._optionStringActions; - this._defaults = container._defaults; - this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; - this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; -}; -util.inherits(ArgumentGroup, ActionContainer); - - -ArgumentGroup.prototype._addAction = function (action) { - // Parent add action - action = ActionContainer.prototype._addAction.call(this, action); - this._groupActions.push(action); - return action; -}; - - -ArgumentGroup.prototype._removeAction = function (action) { - // Parent remove action - ActionContainer.prototype._removeAction.call(this, action); - var actionIndex = this._groupActions.indexOf(action); - if (actionIndex >= 0) { - this._groupActions.splice(actionIndex, 1); - } -}; - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/README.md b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/README.md deleted file mode 100644 index cd0fe0cebb7027..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# lodash v3.9.3 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. - -Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): -```bash -$ lodash modularize modern exports=node -o ./ -$ lodash modern -d -o ./index.js -``` - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash -``` - -In Node.js/io.js: - -```js -// load the modern build -var _ = require('lodash'); -// or a method category -var array = require('lodash/array'); -// or a method (great for smaller builds with browserify/webpack) -var chunk = require('lodash/array/chunk'); -``` - -See the [package source](https://github.com/lodash/lodash/tree/3.9.3-npm) for more details. - -**Note:**
    -Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
    -Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. - -## Module formats - -lodash is also available in a variety of other builds & module formats. - - * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds - * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.3-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.3-amd) builds - * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.3-es) build - -## Further Reading - - * [API Documentation](https://lodash.com/docs) - * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) - * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) - * [Release Notes](https://github.com/lodash/lodash/releases) - * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) - * [More Resources](https://github.com/lodash/lodash/wiki/Resources) - -## Features - - * ~100% [code coverage](https://coveralls.io/r/lodash) - * Follows [semantic versioning](http://semver.org/) for releases - * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining - * [_(…)](https://lodash.com/docs#_) supports intuitive chaining - * [_.add](https://lodash.com/docs#add) for mathematical composition - * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order - * [_.at](https://lodash.com/docs#at) for cherry-picking collection values - * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch - * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) - * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods - * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size - * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects - * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects - * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions - * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control - * [_.fill](https://lodash.com/docs#fill) to fill arrays with values - * [_.findKey](https://lodash.com/docs#findKey) for finding keys - * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) - * [_.forEach](https://lodash.com/docs#forEach) supports exiting early - * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties - * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties - * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting - * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods - * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range - * [_.isNative](https://lodash.com/docs#isNative) to check for native functions - * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects - * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays - * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object - * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons - * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) - * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods - * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) - * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior - * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays - * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers - * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions - * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking - * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values - * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders - * [_.sum](https://lodash.com/docs#sum) to get the sum of values - * [_.support](https://lodash.com/docs#support) for flagging environment features - * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) - * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects - * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined - * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) - * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties - * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & - [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders - * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & - [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods - * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & - [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks - * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & - [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) - * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & - [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods - * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & - [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings - * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences - * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence - -## Support - -Tested in Chrome 41-42, Firefox 37-38, IE 6-11, MS Edge, Opera 28-29, Safari 5-8, ChakraNode 0.12.2, io.js 2.1.0, Node.js 0.8.28, 0.10.38, & 0.12.4, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6 -Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array.js deleted file mode 100644 index e5121fa52ec264..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array.js +++ /dev/null @@ -1,44 +0,0 @@ -module.exports = { - 'chunk': require('./array/chunk'), - 'compact': require('./array/compact'), - 'difference': require('./array/difference'), - 'drop': require('./array/drop'), - 'dropRight': require('./array/dropRight'), - 'dropRightWhile': require('./array/dropRightWhile'), - 'dropWhile': require('./array/dropWhile'), - 'fill': require('./array/fill'), - 'findIndex': require('./array/findIndex'), - 'findLastIndex': require('./array/findLastIndex'), - 'first': require('./array/first'), - 'flatten': require('./array/flatten'), - 'flattenDeep': require('./array/flattenDeep'), - 'head': require('./array/head'), - 'indexOf': require('./array/indexOf'), - 'initial': require('./array/initial'), - 'intersection': require('./array/intersection'), - 'last': require('./array/last'), - 'lastIndexOf': require('./array/lastIndexOf'), - 'object': require('./array/object'), - 'pull': require('./array/pull'), - 'pullAt': require('./array/pullAt'), - 'remove': require('./array/remove'), - 'rest': require('./array/rest'), - 'slice': require('./array/slice'), - 'sortedIndex': require('./array/sortedIndex'), - 'sortedLastIndex': require('./array/sortedLastIndex'), - 'tail': require('./array/tail'), - 'take': require('./array/take'), - 'takeRight': require('./array/takeRight'), - 'takeRightWhile': require('./array/takeRightWhile'), - 'takeWhile': require('./array/takeWhile'), - 'union': require('./array/union'), - 'uniq': require('./array/uniq'), - 'unique': require('./array/unique'), - 'unzip': require('./array/unzip'), - 'unzipWith': require('./array/unzipWith'), - 'without': require('./array/without'), - 'xor': require('./array/xor'), - 'zip': require('./array/zip'), - 'zipObject': require('./array/zipObject'), - 'zipWith': require('./array/zipWith') -}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/chunk.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/chunk.js deleted file mode 100644 index 4de9b3961843b0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/chunk.js +++ /dev/null @@ -1,47 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** Native method references. */ -var ceil = Math.ceil; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array of elements split into groups the length of `size`. - * If `collection` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new array containing chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ -function chunk(array, size, guard) { - if (guard ? isIterateeCall(array, size, guard) : size == null) { - size = 1; - } else { - size = nativeMax(+size || 1, 1); - } - var index = 0, - length = array ? array.length : 0, - resIndex = -1, - result = Array(ceil(length / size)); - - while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); - } - return result; -} - -module.exports = chunk; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/compact.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/compact.js deleted file mode 100644 index 1dc1c55e8f1efb..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/compact.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ -function compact(array) { - var index = -1, - length = array ? array.length : 0, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; - } - } - return result; -} - -module.exports = compact; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/difference.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/difference.js deleted file mode 100644 index 5049337e5f3a9d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/difference.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - baseFlatten = require('../internal/baseFlatten'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The arrays of values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([1, 2, 3], [4, 2]); - * // => [1, 3] - */ -var difference = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, baseFlatten(values, false, true)) - : []; -}); - -module.exports = difference; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/drop.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/drop.js deleted file mode 100644 index 039a0b5fdcdf2b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/drop.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function drop(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, n < 0 ? 0 : n); -} - -module.exports = drop; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRight.js deleted file mode 100644 index 14b5eb6f0a198e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRight.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function dropRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -module.exports = dropRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRightWhile.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRightWhile.js deleted file mode 100644 index be158bd5fa94c0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropRightWhile.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseWhile = require('../internal/baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that match the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [1] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); - * // => ['barney'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function dropRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true) - : []; -} - -module.exports = dropRightWhile; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropWhile.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropWhile.js deleted file mode 100644 index d9eabae9fac8b2..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/dropWhile.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseWhile = require('../internal/baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [3] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropWhile(users, 'active', false), 'user'); - * // => ['pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function dropWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, baseCallback(predicate, thisArg, 3), true) - : []; -} - -module.exports = dropWhile; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/fill.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/fill.js deleted file mode 100644 index 2c8f6da71d0620..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/fill.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseFill = require('../internal/baseFill'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8], '*', 1, 2); - * // => [4, '*', 8] - */ -function fill(array, value, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); -} - -module.exports = fill; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findIndex.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findIndex.js deleted file mode 100644 index 2a6b8e14bace9e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findIndex.js +++ /dev/null @@ -1,53 +0,0 @@ -var createFindIndex = require('../internal/createFindIndex'); - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(chr) { - * return chr.user == 'barney'; - * }); - * // => 0 - * - * // using the `_.matches` callback shorthand - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // using the `_.matchesProperty` callback shorthand - * _.findIndex(users, 'active', false); - * // => 0 - * - * // using the `_.property` callback shorthand - * _.findIndex(users, 'active'); - * // => 2 - */ -var findIndex = createFindIndex(); - -module.exports = findIndex; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findLastIndex.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findLastIndex.js deleted file mode 100644 index d6d8eca6df707b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/findLastIndex.js +++ /dev/null @@ -1,53 +0,0 @@ -var createFindIndex = require('../internal/createFindIndex'); - -/** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(chr) { - * return chr.user == 'pebbles'; - * }); - * // => 2 - * - * // using the `_.matches` callback shorthand - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // using the `_.matchesProperty` callback shorthand - * _.findLastIndex(users, 'active', false); - * // => 2 - * - * // using the `_.property` callback shorthand - * _.findLastIndex(users, 'active'); - * // => 0 - */ -var findLastIndex = createFindIndex(true); - -module.exports = findLastIndex; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/first.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/first.js deleted file mode 100644 index b3b9c79c7bba5d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/first.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @alias head - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.first([1, 2, 3]); - * // => 1 - * - * _.first([]); - * // => undefined - */ -function first(array) { - return array ? array[0] : undefined; -} - -module.exports = first; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flatten.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flatten.js deleted file mode 100644 index 65bbeefb775ad8..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flatten.js +++ /dev/null @@ -1,32 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; -} - -module.exports = flatten; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flattenDeep.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flattenDeep.js deleted file mode 100644 index 9f775febe2aeb3..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/flattenDeep.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'); - -/** - * Recursively flattens a nested array. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to recursively flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, 3, [4]]]); - * // => [1, 2, 3, 4] - */ -function flattenDeep(array) { - var length = array ? array.length : 0; - return length ? baseFlatten(array, true) : []; -} - -module.exports = flattenDeep; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/head.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/head.js deleted file mode 100644 index 1961b08c7eb538..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/head.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./first'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/indexOf.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/indexOf.js deleted file mode 100644 index f8f6c9fc2cdb4f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/indexOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - binaryIndex = require('../internal/binaryIndex'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=0] The index to search from or `true` - * to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - * - * // performing a binary search - * _.indexOf([1, 1, 2, 2], 2, true); - * // => 2 - */ -function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else if (fromIndex) { - var index = binaryIndex(array, value), - other = array[index]; - - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - return baseIndexOf(array, value, fromIndex || 0); -} - -module.exports = indexOf; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/initial.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/initial.js deleted file mode 100644 index 59b7a7d96dfbda..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/initial.js +++ /dev/null @@ -1,20 +0,0 @@ -var dropRight = require('./dropRight'); - -/** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ -function initial(array) { - return dropRight(array, 1); -} - -module.exports = initial; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/intersection.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/intersection.js deleted file mode 100644 index ec5b7f9b6ce4db..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/intersection.js +++ /dev/null @@ -1,58 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - cacheIndexOf = require('../internal/cacheIndexOf'), - createCache = require('../internal/createCache'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique values that are included in all of the provided - * arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. - * @example - * _.intersection([1, 2], [4, 2], [2, 1]); - * // => [2] - */ -var intersection = restParam(function(arrays) { - var othLength = arrays.length, - othIndex = othLength, - caches = Array(length), - indexOf = baseIndexOf, - isCommon = true, - result = []; - - while (othIndex--) { - var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; - caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; - } - var array = arrays[0], - index = -1, - length = array ? array.length : 0, - seen = caches[0]; - - outer: - while (++index < length) { - value = array[index]; - if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { - var othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { - continue outer; - } - } - if (seen) { - seen.push(value); - } - result.push(value); - } - } - return result; -}); - -module.exports = intersection; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/last.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/last.js deleted file mode 100644 index 299af3146ca232..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/last.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -module.exports = last; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/lastIndexOf.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/lastIndexOf.js deleted file mode 100644 index 02b806269bd21c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/lastIndexOf.js +++ /dev/null @@ -1,60 +0,0 @@ -var binaryIndex = require('../internal/binaryIndex'), - indexOfNaN = require('../internal/indexOfNaN'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=array.length-1] The index to search from - * or `true` to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // using `fromIndex` - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - * - * // performing a binary search - * _.lastIndexOf([1, 1, 2, 2], 2, true); - * // => 3 - */ -function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - var index = length; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; - } else if (fromIndex) { - index = binaryIndex(array, value, true) - 1; - var other = array[index]; - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = lastIndexOf; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/object.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/object.js deleted file mode 100644 index f4a34531b139f9..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/object.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./zipObject'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pull.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pull.js deleted file mode 100644 index 746f196f830fe0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pull.js +++ /dev/null @@ -1,52 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'); - -/** Used for native method references. */ -var arrayProto = Array.prototype; - -/** Native method references. */ -var splice = arrayProto.splice; - -/** - * Removes all provided values from `array` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ -function pull() { - var args = arguments, - array = args[0]; - - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = baseIndexOf, - length = args.length; - - while (++index < length) { - var fromIndex = 0, - value = args[index]; - - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = pull; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pullAt.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pullAt.js deleted file mode 100644 index 4ca2476f0e1c78..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/pullAt.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseAt = require('../internal/baseAt'), - baseCompareAscending = require('../internal/baseCompareAscending'), - baseFlatten = require('../internal/baseFlatten'), - basePullAt = require('../internal/basePullAt'), - restParam = require('../function/restParam'); - -/** - * Removes elements from `array` corresponding to the given indexes and returns - * an array of the removed elements. Indexes may be specified as an array of - * indexes or as individual arguments. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove, - * specified as individual indexes or arrays of indexes. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); - * - * console.log(array); - * // => [5, 15] - * - * console.log(evens); - * // => [10, 20] - */ -var pullAt = restParam(function(array, indexes) { - indexes = baseFlatten(indexes); - - var result = baseAt(array, indexes); - basePullAt(array, indexes.sort(baseCompareAscending)); - return result; -}); - -module.exports = pullAt; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/remove.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/remove.js deleted file mode 100644 index 0cf979bda0b241..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/remove.js +++ /dev/null @@ -1,64 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - basePullAt = require('../internal/basePullAt'); - -/** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * **Note:** Unlike `_.filter`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ -function remove(array, predicate, thisArg) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = baseCallback(predicate, thisArg, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; -} - -module.exports = remove; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/rest.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/rest.js deleted file mode 100644 index 9bfb734f1fbe64..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/rest.js +++ /dev/null @@ -1,21 +0,0 @@ -var drop = require('./drop'); - -/** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @alias tail - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.rest([1, 2, 3]); - * // => [2, 3] - */ -function rest(array) { - return drop(array, 1); -} - -module.exports = rest; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/slice.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/slice.js deleted file mode 100644 index 48ef1a1a280f56..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/slice.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of `Array#slice` to support node - * lists in IE < 9 and to ensure dense arrays are returned. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function slice(array, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - return baseSlice(array, start, end); -} - -module.exports = slice; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedIndex.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedIndex.js deleted file mode 100644 index 51d150e3b3ac9d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedIndex.js +++ /dev/null @@ -1,53 +0,0 @@ -var createSortedIndex = require('../internal/createSortedIndex'); - -/** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. If an iteratee - * function is provided it is invoked for `value` and each element of `array` - * to compute their sort ranking. The iteratee is bound to `thisArg` and - * invoked with one argument; (value). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 4, 5, 5], 5); - * // => 2 - * - * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; - * - * // using an iteratee function - * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { - * return this.data[word]; - * }, dict); - * // => 1 - * - * // using the `_.property` callback shorthand - * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 1 - */ -var sortedIndex = createSortedIndex(); - -module.exports = sortedIndex; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedLastIndex.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedLastIndex.js deleted file mode 100644 index 81a4a8689e8c00..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/sortedLastIndex.js +++ /dev/null @@ -1,25 +0,0 @@ -var createSortedIndex = require('../internal/createSortedIndex'); - -/** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 4, 5, 5], 5); - * // => 4 - */ -var sortedLastIndex = createSortedIndex(true); - -module.exports = sortedLastIndex; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/tail.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/tail.js deleted file mode 100644 index c5dfe779d6f762..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/tail.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./rest'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/take.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/take.js deleted file mode 100644 index 875917a746650d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/take.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ -function take(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -module.exports = take; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRight.js deleted file mode 100644 index 6e89c874801804..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRight.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseSlice = require('../internal/baseSlice'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ -function takeRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, n < 0 ? 0 : n); -} - -module.exports = takeRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRightWhile.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRightWhile.js deleted file mode 100644 index 5464d13b7fa2fb..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeRightWhile.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseWhile = require('../internal/baseWhile'); - -/** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is bound to `thisArg` - * and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [2, 3] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active'), 'user'); - * // => [] - */ -function takeRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true) - : []; -} - -module.exports = takeRightWhile; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeWhile.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeWhile.js deleted file mode 100644 index f7e28a1d423a8e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/takeWhile.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseWhile = require('../internal/baseWhile'); - -/** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [1, 2] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false}, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeWhile(users, 'active', false), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeWhile(users, 'active'), 'user'); - * // => [] - */ -function takeWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, baseCallback(predicate, thisArg, 3)) - : []; -} - -module.exports = takeWhile; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/union.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/union.js deleted file mode 100644 index 05101ca1c2d046..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/union.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - baseUniq = require('../internal/baseUniq'), - restParam = require('../function/restParam'); - -/** - * Creates an array of unique values, in order, from all of the provided arrays - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([1, 2], [4, 2], [2, 1]); - * // => [1, 2, 4] - */ -var union = restParam(function(arrays) { - return baseUniq(baseFlatten(arrays, false, true)); -}); - -module.exports = union; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/uniq.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/uniq.js deleted file mode 100644 index 91ae46e244d99f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/uniq.js +++ /dev/null @@ -1,71 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseUniq = require('../internal/baseUniq'), - isIterateeCall = require('../internal/isIterateeCall'), - sortedUniq = require('../internal/sortedUniq'); - -/** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it is invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ -function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); - return (isSorted) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); -} - -module.exports = uniq; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unique.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unique.js deleted file mode 100644 index 396de1b80464f8..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unique.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./uniq'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzip.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzip.js deleted file mode 100644 index 0a539fa631522b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzip.js +++ /dev/null @@ -1,47 +0,0 @@ -var arrayFilter = require('../internal/arrayFilter'), - arrayMap = require('../internal/arrayMap'), - baseProperty = require('../internal/baseProperty'), - isArrayLike = require('../internal/isArrayLike'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - * - * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] - */ -function unzip(array) { - if (!(array && array.length)) { - return []; - } - var index = -1, - length = 0; - - array = arrayFilter(array, function(group) { - if (isArrayLike(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - var result = Array(length); - while (++index < length) { - result[index] = arrayMap(array, baseProperty(index)); - } - return result; -} - -module.exports = unzip; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzipWith.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzipWith.js deleted file mode 100644 index 324a2b1db28578..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/unzipWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayMap = require('../internal/arrayMap'), - arrayReduce = require('../internal/arrayReduce'), - bindCallback = require('../internal/bindCallback'), - unzip = require('./unzip'); - -/** - * This method is like `_.unzip` except that it accepts an iteratee to specify - * how regrouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee] The function to combine regrouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] - * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] - */ -function unzipWith(array, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - var result = unzip(array); - if (iteratee == null) { - return result; - } - iteratee = bindCallback(iteratee, thisArg, 4); - return arrayMap(result, function(group) { - return arrayReduce(group, iteratee, undefined, true); - }); -} - -module.exports = unzipWith; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/without.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/without.js deleted file mode 100644 index 19b78491af674f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/without.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - isArrayLike = require('../internal/isArrayLike'), - restParam = require('../function/restParam'); - -/** - * Creates an array excluding all provided values using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to filter. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.without([1, 2, 1, 3], 1, 2); - * // => [3] - */ -var without = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, values) - : []; -}); - -module.exports = without; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/xor.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/xor.js deleted file mode 100644 index 3bdf9df1218365..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/xor.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseDifference = require('../internal/baseDifference'), - baseUniq = require('../internal/baseUniq'), - isArrayLike = require('../internal/isArrayLike'); - -/** - * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the provided arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xor([1, 2], [4, 2]); - * // => [1, 4] - */ -function xor() { - var index = -1, - length = arguments.length; - - while (++index < length) { - var array = arguments[index]; - if (isArrayLike(array)) { - var result = result - ? baseDifference(result, array).concat(baseDifference(array, result)) - : array; - } - } - return result ? baseUniq(result) : []; -} - -module.exports = xor; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zip.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zip.js deleted file mode 100644 index 53a6f69912158c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zip.js +++ /dev/null @@ -1,21 +0,0 @@ -var restParam = require('../function/restParam'), - unzip = require('./unzip'); - -/** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements - * of the given arrays, and so on. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - */ -var zip = restParam(unzip); - -module.exports = zip; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipObject.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipObject.js deleted file mode 100644 index dec7a211b7427f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipObject.js +++ /dev/null @@ -1,43 +0,0 @@ -var isArray = require('../lang/isArray'); - -/** - * The inverse of `_.pairs`; this method returns an object composed from arrays - * of property names and values. Provide either a single two dimensional array, - * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names - * and one of corresponding values. - * - * @static - * @memberOf _ - * @alias object - * @category Array - * @param {Array} props The property names. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } - * - * _.zipObject(['fred', 'barney'], [30, 40]); - * // => { 'fred': 30, 'barney': 40 } - */ -function zipObject(props, values) { - var index = -1, - length = props ? props.length : 0, - result = {}; - - if (length && !values && !isArray(props[0])) { - values = []; - } - while (++index < length) { - var key = props[index]; - if (values) { - result[key] = values[index]; - } else if (key) { - result[key[0]] = key[1]; - } - } - return result; -} - -module.exports = zipObject; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipWith.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipWith.js deleted file mode 100644 index ad103742cd1104..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/array/zipWith.js +++ /dev/null @@ -1,36 +0,0 @@ -var restParam = require('../function/restParam'), - unzipWith = require('./unzipWith'); - -/** - * This method is like `_.zip` except that it accepts an iteratee to specify - * how grouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee] The function to combine grouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], _.add); - * // => [111, 222] - */ -var zipWith = restParam(function(arrays) { - var length = arrays.length, - iteratee = length > 2 ? arrays[length - 2] : undefined, - thisArg = length > 1 ? arrays[length - 1] : undefined; - - if (length > 2 && typeof iteratee == 'function') { - length -= 2; - } else { - iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; - thisArg = undefined; - } - arrays.length = length; - return unzipWith(arrays, iteratee, thisArg); -}); - -module.exports = zipWith; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain.js deleted file mode 100644 index 7992b733e23602..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - 'chain': require('./chain/chain'), - 'commit': require('./chain/commit'), - 'lodash': require('./chain/lodash'), - 'plant': require('./chain/plant'), - 'reverse': require('./chain/reverse'), - 'run': require('./chain/run'), - 'tap': require('./chain/tap'), - 'thru': require('./chain/thru'), - 'toJSON': require('./chain/toJSON'), - 'toString': require('./chain/toString'), - 'value': require('./chain/value'), - 'valueOf': require('./chain/valueOf'), - 'wrapperChain': require('./chain/wrapperChain') -}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/chain.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/chain.js deleted file mode 100644 index 453ba1eb5e88cc..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/chain.js +++ /dev/null @@ -1,35 +0,0 @@ -var lodash = require('./lodash'); - -/** - * Creates a `lodash` object that wraps `value` with explicit method - * chaining enabled. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _.chain(users) - * .sortBy('age') - * .map(function(chr) { - * return chr.user + ' is ' + chr.age; - * }) - * .first() - * .value(); - * // => 'pebbles is 1' - */ -function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; -} - -module.exports = chain; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/commit.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/commit.js deleted file mode 100644 index c732d1bf9139d0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/commit.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperCommit'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/lodash.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/lodash.js deleted file mode 100644 index 3241ed89f22cf3..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/lodash.js +++ /dev/null @@ -1,123 +0,0 @@ -var LazyWrapper = require('../internal/LazyWrapper'), - LodashWrapper = require('../internal/LodashWrapper'), - baseLodash = require('../internal/baseLodash'), - isArray = require('../lang/isArray'), - isObjectLike = require('../internal/isObjectLike'), - wrapperClone = require('../internal/wrapperClone'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a `lodash` object which wraps `value` to enable implicit chaining. - * Methods that operate on and return arrays, collections, and functions can - * be chained together. Methods that return a boolean or single value will - * automatically end the chain returning the unwrapped value. Explicit chaining - * may be enabled using `_.chain`. The execution of chained methods is lazy, - * that is, execution is deferred until `_#value` is implicitly or explicitly - * called. - * - * Lazy evaluation allows several methods to support shortcut fusion. Shortcut - * fusion is an optimization that merges iteratees to avoid creating intermediate - * arrays and reduce the number of iteratee executions. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, - * `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, - * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, - * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, - * and `where` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, - * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, - * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, - * `difference`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `fill`, - * `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`, - * `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`, - * `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, - * `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `method`, `methodOf`, `mixin`, `negate`, `omit`, `once`, - * `pairs`, `partial`, `partialRight`, `partition`, `pick`, `plant`, `pluck`, - * `property`, `propertyOf`, `pull`, `pullAt`, `push`, `range`, `rearg`, - * `reject`, `remove`, `rest`, `restParam`, `reverse`, `set`, `shuffle`, - * `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`, `spread`, - * `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, - * `thru`, `times`, `toArray`, `toPlainObject`, `transform`, `union`, `uniq`, - * `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `where`, `without`, - * `wrap`, `xor`, `zip`, `zipObject`, `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`, - * `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, - * `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `get`, - * `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, - * `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, - * `isFinite` `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, - * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, - * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lt`, `lte`, - * `max`, `min`, `noConflict`, `noop`, `now`, `pad`, `padLeft`, `padRight`, - * `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, - * `runInContext`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedLastIndex`, `startCase`, `startsWith`, `sum`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words` - * - * The wrapper method `sample` will return a wrapped value when `n` is provided, - * otherwise an unwrapped value is returned. - * - * @name _ - * @constructor - * @category Chain - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var wrapped = _([1, 2, 3]); - * - * // returns an unwrapped value - * wrapped.reduce(function(total, n) { - * return total + n; - * }); - * // => 6 - * - * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ -function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); -} - -// Ensure wrappers are instances of `baseLodash`. -lodash.prototype = baseLodash.prototype; - -module.exports = lodash; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/plant.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/plant.js deleted file mode 100644 index 04099f238659d4..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/plant.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperPlant'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/reverse.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/reverse.js deleted file mode 100644 index f72a64a19b95db..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/reverse.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperReverse'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/run.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/run.js deleted file mode 100644 index 5e751a2c32e8af..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/run.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperValue'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/tap.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/tap.js deleted file mode 100644 index 3d0257ecfde69b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/tap.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This method invokes `interceptor` and returns `value`. The interceptor is - * bound to `thisArg` and invoked with one argument; (value). The purpose of - * this method is to "tap into" a method chain in order to perform operations - * on intermediate results within the chain. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ -function tap(value, interceptor, thisArg) { - interceptor.call(thisArg, value); - return value; -} - -module.exports = tap; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/thru.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/thru.js deleted file mode 100644 index a7157803769d83..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/thru.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ -function thru(value, interceptor, thisArg) { - return interceptor.call(thisArg, value); -} - -module.exports = thru; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toJSON.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toJSON.js deleted file mode 100644 index 5e751a2c32e8af..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toJSON.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperValue'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toString.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toString.js deleted file mode 100644 index c7bcbf9a543e98..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/toString.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperToString'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/value.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/value.js deleted file mode 100644 index 5e751a2c32e8af..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/value.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperValue'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/valueOf.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/valueOf.js deleted file mode 100644 index 5e751a2c32e8af..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/valueOf.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./wrapperValue'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperChain.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperChain.js deleted file mode 100644 index 38234819ba04d5..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperChain.js +++ /dev/null @@ -1,32 +0,0 @@ -var chain = require('./chain'); - -/** - * Enables explicit method chaining on the wrapper object. - * - * @name chain - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // without explicit chaining - * _(users).first(); - * // => { 'user': 'barney', 'age': 36 } - * - * // with explicit chaining - * _(users).chain() - * .first() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ -function wrapperChain() { - return chain(this); -} - -module.exports = wrapperChain; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperCommit.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperCommit.js deleted file mode 100644 index c46a787e97d0e7..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperCommit.js +++ /dev/null @@ -1,32 +0,0 @@ -var LodashWrapper = require('../internal/LodashWrapper'); - -/** - * Executes the chained sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapper = wrapper.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapper.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ -function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); -} - -module.exports = wrapperCommit; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperPlant.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperPlant.js deleted file mode 100644 index a3de146b13d740..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperPlant.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseLodash = require('../internal/baseLodash'), - wrapperClone = require('../internal/wrapperClone'); - -/** - * Creates a clone of the chained sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).map(function(value) { - * return Math.pow(value, 2); - * }); - * - * var other = [3, 4]; - * var otherWrapper = wrapper.plant(other); - * - * otherWrapper.value(); - * // => [9, 16] - * - * wrapper.value(); - * // => [1, 4] - */ -function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; -} - -module.exports = wrapperPlant; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperReverse.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperReverse.js deleted file mode 100644 index 4518b3ed286c56..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperReverse.js +++ /dev/null @@ -1,38 +0,0 @@ -var LazyWrapper = require('../internal/LazyWrapper'), - LodashWrapper = require('../internal/LodashWrapper'), - thru = require('./thru'); - -/** - * Reverses the wrapped array so the first element becomes the last, the - * second element becomes the second to last, and so on. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new reversed `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ -function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - if (this.__actions__.length) { - value = new LazyWrapper(this); - } - return new LodashWrapper(value.reverse(), this.__chain__); - } - return this.thru(function(value) { - return value.reverse(); - }); -} - -module.exports = wrapperReverse; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperToString.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperToString.js deleted file mode 100644 index db975a5a35427f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperToString.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Produces the result of coercing the unwrapped value to a string. - * - * @name toString - * @memberOf _ - * @category Chain - * @returns {string} Returns the coerced string value. - * @example - * - * _([1, 2, 3]).toString(); - * // => '1,2,3' - */ -function wrapperToString() { - return (this.value() + ''); -} - -module.exports = wrapperToString; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperValue.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperValue.js deleted file mode 100644 index 2734e41c4a9290..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/chain/wrapperValue.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseWrapperValue = require('../internal/baseWrapperValue'); - -/** - * Executes the chained sequence to extract the unwrapped value. - * - * @name value - * @memberOf _ - * @alias run, toJSON, valueOf - * @category Chain - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ -function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); -} - -module.exports = wrapperValue; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection.js deleted file mode 100644 index 03388571c3145d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection.js +++ /dev/null @@ -1,44 +0,0 @@ -module.exports = { - 'all': require('./collection/all'), - 'any': require('./collection/any'), - 'at': require('./collection/at'), - 'collect': require('./collection/collect'), - 'contains': require('./collection/contains'), - 'countBy': require('./collection/countBy'), - 'detect': require('./collection/detect'), - 'each': require('./collection/each'), - 'eachRight': require('./collection/eachRight'), - 'every': require('./collection/every'), - 'filter': require('./collection/filter'), - 'find': require('./collection/find'), - 'findLast': require('./collection/findLast'), - 'findWhere': require('./collection/findWhere'), - 'foldl': require('./collection/foldl'), - 'foldr': require('./collection/foldr'), - 'forEach': require('./collection/forEach'), - 'forEachRight': require('./collection/forEachRight'), - 'groupBy': require('./collection/groupBy'), - 'include': require('./collection/include'), - 'includes': require('./collection/includes'), - 'indexBy': require('./collection/indexBy'), - 'inject': require('./collection/inject'), - 'invoke': require('./collection/invoke'), - 'map': require('./collection/map'), - 'max': require('./math/max'), - 'min': require('./math/min'), - 'partition': require('./collection/partition'), - 'pluck': require('./collection/pluck'), - 'reduce': require('./collection/reduce'), - 'reduceRight': require('./collection/reduceRight'), - 'reject': require('./collection/reject'), - 'sample': require('./collection/sample'), - 'select': require('./collection/select'), - 'shuffle': require('./collection/shuffle'), - 'size': require('./collection/size'), - 'some': require('./collection/some'), - 'sortBy': require('./collection/sortBy'), - 'sortByAll': require('./collection/sortByAll'), - 'sortByOrder': require('./collection/sortByOrder'), - 'sum': require('./math/sum'), - 'where': require('./collection/where') -}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/all.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/all.js deleted file mode 100644 index d0839f77ed712b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/all.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./every'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/any.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/any.js deleted file mode 100644 index 900ac25e836b2c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/any.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./some'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/at.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/at.js deleted file mode 100644 index 29236e577dfb85..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/at.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseAt = require('../internal/baseAt'), - baseFlatten = require('../internal/baseFlatten'), - restParam = require('../function/restParam'); - -/** - * Creates an array of elements corresponding to the given keys, or indexes, - * of `collection`. Keys may be specified as individual arguments or as arrays - * of keys. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(number|number[]|string|string[])} [props] The property names - * or indexes of elements to pick, specified individually or in arrays. - * @returns {Array} Returns the new array of picked elements. - * @example - * - * _.at(['a', 'b', 'c'], [0, 2]); - * // => ['a', 'c'] - * - * _.at(['barney', 'fred', 'pebbles'], 0, 2); - * // => ['barney', 'pebbles'] - */ -var at = restParam(function(collection, props) { - return baseAt(collection, baseFlatten(props)); -}); - -module.exports = at; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/collect.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/collect.js deleted file mode 100644 index 0d1e1abfaf9700..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/collect.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./map'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/contains.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/contains.js deleted file mode 100644 index 594722af59a707..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/contains.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./includes'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/countBy.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/countBy.js deleted file mode 100644 index e97dbb749d1c74..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/countBy.js +++ /dev/null @@ -1,54 +0,0 @@ -var createAggregator = require('../internal/createAggregator'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the number of times the key was returned by `iteratee`. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ -var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); -}); - -module.exports = countBy; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/detect.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/detect.js deleted file mode 100644 index 2fb6303efb4984..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/detect.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./find'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/each.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/each.js deleted file mode 100644 index 8800f42046e3ed..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEach'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/eachRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/eachRight.js deleted file mode 100644 index 3252b2aba320f3..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEachRight'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/every.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/every.js deleted file mode 100644 index a04d3db637783d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/every.js +++ /dev/null @@ -1,66 +0,0 @@ -var arrayEvery = require('../internal/arrayEvery'), - baseCallback = require('../internal/baseCallback'), - baseEvery = require('../internal/baseEvery'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * The predicate is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = every; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/filter.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/filter.js deleted file mode 100644 index 7620aa76195125..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/filter.js +++ /dev/null @@ -1,61 +0,0 @@ -var arrayFilter = require('../internal/arrayFilter'), - baseCallback = require('../internal/baseCallback'), - baseFilter = require('../internal/baseFilter'), - isArray = require('../lang/isArray'); - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias select - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.filter([4, 5, 6], function(n) { - * return n % 2 == 0; - * }); - * // => [4, 6] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.filter(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.filter(users, 'active'), 'user'); - * // => ['barney'] - */ -function filter(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = baseCallback(predicate, thisArg, 3); - return func(collection, predicate); -} - -module.exports = filter; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/find.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/find.js deleted file mode 100644 index 7358cfe86cb435..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/find.js +++ /dev/null @@ -1,56 +0,0 @@ -var baseEach = require('../internal/baseEach'), - createFind = require('../internal/createFind'); - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.result(_.find(users, function(chr) { - * return chr.age < 40; - * }), 'user'); - * // => 'barney' - * - * // using the `_.matches` callback shorthand - * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.result(_.find(users, 'active', false), 'user'); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.result(_.find(users, 'active'), 'user'); - * // => 'barney' - */ -var find = createFind(baseEach); - -module.exports = find; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findLast.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findLast.js deleted file mode 100644 index 75dbadca2407d0..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findLast.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseEachRight = require('../internal/baseEachRight'), - createFind = require('../internal/createFind'); - -/** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ -var findLast = createFind(baseEachRight, true); - -module.exports = findLast; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findWhere.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findWhere.js deleted file mode 100644 index 2d620655ed4307..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/findWhere.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseMatches = require('../internal/baseMatches'), - find = require('./find'); - -/** - * Performs a deep comparison between each element in `collection` and the - * source object, returning the first element that has equivalent property - * values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); - * // => 'barney' - * - * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); - * // => 'fred' - */ -function findWhere(collection, source) { - return find(collection, baseMatches(source)); -} - -module.exports = findWhere; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldl.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldl.js deleted file mode 100644 index 26f53cf7b26816..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldl.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./reduce'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldr.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldr.js deleted file mode 100644 index 8fb199eda60041..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/foldr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./reduceRight'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEach.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEach.js deleted file mode 100644 index 05a8e2140ebe1f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEach.js +++ /dev/null @@ -1,37 +0,0 @@ -var arrayEach = require('../internal/arrayEach'), - baseEach = require('../internal/baseEach'), - createForEach = require('../internal/createForEach'); - -/** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ -var forEach = createForEach(arrayEach, baseEach); - -module.exports = forEach; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEachRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEachRight.js deleted file mode 100644 index 34997110024056..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/forEachRight.js +++ /dev/null @@ -1,26 +0,0 @@ -var arrayEachRight = require('../internal/arrayEachRight'), - baseEachRight = require('../internal/baseEachRight'), - createForEach = require('../internal/createForEach'); - -/** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias eachRight - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEachRight(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from right to left and returns the array - */ -var forEachRight = createForEach(arrayEachRight, baseEachRight); - -module.exports = forEachRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/groupBy.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/groupBy.js deleted file mode 100644 index a925c894a0d73b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/groupBy.js +++ /dev/null @@ -1,59 +0,0 @@ -var createAggregator = require('../internal/createAggregator'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is an array of the elements responsible for generating the key. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using the `_.property` callback shorthand - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ -var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - result[key] = [value]; - } -}); - -module.exports = groupBy; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/include.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/include.js deleted file mode 100644 index 594722af59a707..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/include.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./includes'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/includes.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/includes.js deleted file mode 100644 index 80c90e1e3fd115..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/includes.js +++ /dev/null @@ -1,60 +0,0 @@ -var baseIndexOf = require('../internal/baseIndexOf'), - getLength = require('../internal/getLength'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'), - isString = require('../lang/isString'), - values = require('../object/values'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ -function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (baseIndexOf(collection, target, fromIndex) > -1); -} - -module.exports = includes; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/indexBy.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/indexBy.js deleted file mode 100644 index 34a941e7290c72..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/indexBy.js +++ /dev/null @@ -1,53 +0,0 @@ -var createAggregator = require('../internal/createAggregator'); - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the last element responsible for generating the key. The - * iteratee function is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var keyData = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.indexBy(keyData, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return String.fromCharCode(object.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return this.fromCharCode(object.code); - * }, String); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - */ -var indexBy = createAggregator(function(result, value, key) { - result[key] = value; -}); - -module.exports = indexBy; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/inject.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/inject.js deleted file mode 100644 index 26f53cf7b26816..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/inject.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./reduce'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/invoke.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/invoke.js deleted file mode 100644 index 0a0a84cdbe275d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/invoke.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseEach = require('../internal/baseEach'), - invokePath = require('../internal/invokePath'), - isArrayLike = require('../internal/isArrayLike'), - isKey = require('../internal/isKey'), - restParam = require('../function/restParam'); - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it is - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invoke = restParam(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - isProp = isKey(path), - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : null); - result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); - }); - return result; -}); - -module.exports = invoke; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/map.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/map.js deleted file mode 100644 index 5381110df1210c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/map.js +++ /dev/null @@ -1,68 +0,0 @@ -var arrayMap = require('../internal/arrayMap'), - baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - isArray = require('../lang/isArray'); - -/** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, - * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, - * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, - * `sum`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = baseCallback(iteratee, thisArg, 3); - return func(collection, iteratee); -} - -module.exports = map; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/max.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/max.js deleted file mode 100644 index bb1d213c33bd47..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/max.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../math/max'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/min.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/min.js deleted file mode 100644 index eef13d02b8a01e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/min.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../math/min'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/partition.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/partition.js deleted file mode 100644 index ee35f27d9301b4..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/partition.js +++ /dev/null @@ -1,66 +0,0 @@ -var createAggregator = require('../internal/createAggregator'); - -/** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, while the second of which - * contains elements `predicate` returns falsey for. The predicate is bound - * to `thisArg` and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * _.partition([1, 2, 3], function(n) { - * return n % 2; - * }); - * // => [[1, 3], [2]] - * - * _.partition([1.2, 2.3, 3.4], function(n) { - * return this.floor(n) % 2; - * }, Math); - * // => [[1.2, 3.4], [2.3]] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * var mapper = function(array) { - * return _.pluck(array, 'user'); - * }; - * - * // using the `_.matches` callback shorthand - * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); - * // => [['pebbles'], ['barney', 'fred']] - * - * // using the `_.matchesProperty` callback shorthand - * _.map(_.partition(users, 'active', false), mapper); - * // => [['barney', 'pebbles'], ['fred']] - * - * // using the `_.property` callback shorthand - * _.map(_.partition(users, 'active'), mapper); - * // => [['fred'], ['barney', 'pebbles']] - */ -var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); -}, function() { return [[], []]; }); - -module.exports = partition; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/pluck.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/pluck.js deleted file mode 100644 index 5ee1ec84eec53f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/pluck.js +++ /dev/null @@ -1,31 +0,0 @@ -var map = require('./map'), - property = require('../utility/property'); - -/** - * Gets the property value of `path` from all elements in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|string} path The path of the property to pluck. - * @returns {Array} Returns the property values. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * _.pluck(users, 'user'); - * // => ['barney', 'fred'] - * - * var userIndex = _.indexBy(users, 'user'); - * _.pluck(userIndex, 'age'); - * // => [36, 40] (iteration order is not guaranteed) - */ -function pluck(collection, path) { - return map(collection, property(path)); -} - -module.exports = pluck; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduce.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduce.js deleted file mode 100644 index da97655c198e47..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduce.js +++ /dev/null @@ -1,43 +0,0 @@ -var arrayReduce = require('../internal/arrayReduce'), - baseEach = require('../internal/baseEach'), - createReduce = require('../internal/createReduce'); - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not provided the first element of `collection` is used as the initial - * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `includes`, `merge`, `sortByAll`, and `sortByOrder` - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.reduce([1, 2], function(total, n) { - * return total + n; - * }); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) - */ -var reduce = createReduce(arrayReduce, baseEach); - -module.exports = reduce; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js deleted file mode 100644 index 5a5753b9c2185b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js +++ /dev/null @@ -1,29 +0,0 @@ -var arrayReduceRight = require('../internal/arrayReduceRight'), - baseEachRight = require('../internal/baseEachRight'), - createReduce = require('../internal/createReduce'); - -/** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ -var reduceRight = createReduce(arrayReduceRight, baseEachRight); - -module.exports = reduceRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reject.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reject.js deleted file mode 100644 index 55924539b524be..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reject.js +++ /dev/null @@ -1,50 +0,0 @@ -var arrayFilter = require('../internal/arrayFilter'), - baseCallback = require('../internal/baseCallback'), - baseFilter = require('../internal/baseFilter'), - isArray = require('../lang/isArray'); - -/** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.reject([1, 2, 3, 4], function(n) { - * return n % 2 == 0; - * }); - * // => [1, 3] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.reject(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.reject(users, 'active'), 'user'); - * // => ['barney'] - */ -function reject(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = baseCallback(predicate, thisArg, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); -} - -module.exports = reject; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sample.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sample.js deleted file mode 100644 index 8e0153301620e1..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sample.js +++ /dev/null @@ -1,50 +0,0 @@ -var baseRandom = require('../internal/baseRandom'), - isIterateeCall = require('../internal/isIterateeCall'), - toArray = require('../lang/toArray'), - toIterable = require('../internal/toIterable'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Gets a random element or `n` random elements from a collection. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to sample. - * @param {number} [n] The number of elements to sample. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {*} Returns the random sample(s). - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - * - * _.sample([1, 2, 3, 4], 2); - * // => [3, 1] - */ -function sample(collection, n, guard) { - if (guard ? isIterateeCall(collection, n, guard) : n == null) { - collection = toIterable(collection); - var length = collection.length; - return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; - } - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - - n = nativeMin(n < 0 ? 0 : (+n || 0), length); - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; - } - result.length = n; - return result; -} - -module.exports = sample; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/select.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/select.js deleted file mode 100644 index ade80f6fbae9ae..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/select.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./filter'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/shuffle.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/shuffle.js deleted file mode 100644 index 949689c5fc714d..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/shuffle.js +++ /dev/null @@ -1,24 +0,0 @@ -var sample = require('./sample'); - -/** Used as references for `-Infinity` and `Infinity`. */ -var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - -/** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ -function shuffle(collection) { - return sample(collection, POSITIVE_INFINITY); -} - -module.exports = shuffle; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/size.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/size.js deleted file mode 100644 index 78dcf4ce9bea5e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/size.js +++ /dev/null @@ -1,30 +0,0 @@ -var getLength = require('../internal/getLength'), - isLength = require('../internal/isLength'), - keys = require('../object/keys'); - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the size of `collection`. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - var length = collection ? getLength(collection) : 0; - return isLength(length) ? length : keys(collection).length; -} - -module.exports = size; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/some.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/some.js deleted file mode 100644 index 2b866b464b6552..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/some.js +++ /dev/null @@ -1,67 +0,0 @@ -var arraySome = require('../internal/arraySome'), - baseCallback = require('../internal/baseCallback'), - baseSome = require('../internal/baseSome'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = some; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortBy.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortBy.js deleted file mode 100644 index 28d75f56dacce9..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortBy.js +++ /dev/null @@ -1,71 +0,0 @@ -var baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - baseSortBy = require('../internal/baseSortBy'), - compareAscending = require('../internal/compareAscending'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; - } - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - var index = -1; - iteratee = baseCallback(iteratee, thisArg, 3); - - var result = baseMap(collection, function(value, key, collection) { - return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; - }); - return baseSortBy(result, compareAscending); -} - -module.exports = sortBy; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByAll.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByAll.js deleted file mode 100644 index 4766c209855c97..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByAll.js +++ /dev/null @@ -1,52 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - baseSortByOrder = require('../internal/baseSortByOrder'), - isIterateeCall = require('../internal/isIterateeCall'), - restParam = require('../function/restParam'); - -/** - * This method is like `_.sortBy` except that it can sort by multiple iteratees - * or property names. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees - * The iteratees to sort by, specified as individual values or arrays of values. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.map(_.sortByAll(users, ['user', 'age']), _.values); - * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] - * - * _.map(_.sortByAll(users, 'user', function(chr) { - * return Math.floor(chr.age / 10); - * }), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ -var sortByAll = restParam(function(collection, iteratees) { - if (collection == null) { - return []; - } - var guard = iteratees[2]; - if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { - iteratees.length = 1; - } - return baseSortByOrder(collection, baseFlatten(iteratees), []); -}); - -module.exports = sortByAll; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByOrder.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByOrder.js deleted file mode 100644 index c704eeb61f201b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sortByOrder.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseSortByOrder = require('../internal/baseSortByOrder'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * This method is like `_.sortByAll` except that it allows specifying the - * sort orders of the iteratees to sort by. A truthy value in `orders` will - * sort the corresponding property name in ascending order while a falsey - * value will sort it in descending order. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ -function sortByOrder(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (guard && isIterateeCall(iteratees, orders, guard)) { - orders = null; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseSortByOrder(collection, iteratees, orders); -} - -module.exports = sortByOrder; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sum.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sum.js deleted file mode 100644 index a2e93808ae8fee..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/sum.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../math/sum'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/where.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/where.js deleted file mode 100644 index f603bf8ce497a6..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/where.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseMatches = require('../internal/baseMatches'), - filter = require('./filter'); - -/** - * Performs a deep comparison between each element in `collection` and the - * source object, returning an array of all elements that have equivalent - * property values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {Array} Returns the new filtered array. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, - * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } - * ]; - * - * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); - * // => ['barney'] - * - * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); - * // => ['fred'] - */ -function where(collection, source) { - return filter(collection, baseMatches(source)); -} - -module.exports = where; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date.js deleted file mode 100644 index 195366e77762af..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - 'now': require('./date/now') -}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date/now.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date/now.js deleted file mode 100644 index ffe3060e5b9aa3..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/date/now.js +++ /dev/null @@ -1,24 +0,0 @@ -var getNative = require('../internal/getNative'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeNow = getNative(Date, 'now'); - -/** - * Gets the number of milliseconds that have elapsed since the Unix epoch - * (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @category Date - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => logs the number of milliseconds it took for the deferred function to be invoked - */ -var now = nativeNow || function() { - return new Date().getTime(); -}; - -module.exports = now; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function.js deleted file mode 100644 index 2cacde1ee59e36..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = { - 'after': require('./function/after'), - 'ary': require('./function/ary'), - 'backflow': require('./function/backflow'), - 'before': require('./function/before'), - 'bind': require('./function/bind'), - 'bindAll': require('./function/bindAll'), - 'bindKey': require('./function/bindKey'), - 'compose': require('./function/compose'), - 'curry': require('./function/curry'), - 'curryRight': require('./function/curryRight'), - 'debounce': require('./function/debounce'), - 'defer': require('./function/defer'), - 'delay': require('./function/delay'), - 'flow': require('./function/flow'), - 'flowRight': require('./function/flowRight'), - 'memoize': require('./function/memoize'), - 'negate': require('./function/negate'), - 'once': require('./function/once'), - 'partial': require('./function/partial'), - 'partialRight': require('./function/partialRight'), - 'rearg': require('./function/rearg'), - 'restParam': require('./function/restParam'), - 'spread': require('./function/spread'), - 'throttle': require('./function/throttle'), - 'wrap': require('./function/wrap') -}; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/after.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/after.js deleted file mode 100644 index e6a5de407a75df..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/after.js +++ /dev/null @@ -1,48 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = global.isFinite; - -/** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it is called `n` or more times. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => logs 'done saving!' after the two async saves have completed - */ -function after(n, func) { - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - n = nativeIsFinite(n = +n) ? n : 0; - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} - -module.exports = after; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/ary.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/ary.js deleted file mode 100644 index 1bcb6a720d3904..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/ary.js +++ /dev/null @@ -1,34 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** Used to compose bitmasks for wrapper metadata. */ -var ARY_FLAG = 128; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that accepts up to `n` arguments ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ -function ary(func, n, guard) { - if (guard && isIterateeCall(func, n, guard)) { - n = null; - } - n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); - return createWrapper(func, ARY_FLAG, null, null, null, null, n); -} - -module.exports = ary; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/backflow.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/backflow.js deleted file mode 100644 index 1954e942397b7f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/backflow.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flowRight'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/before.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/before.js deleted file mode 100644 index 4afd1e60af1298..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/before.js +++ /dev/null @@ -1,42 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery('#add').on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = null; - } - return result; - }; -} - -module.exports = before; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bind.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bind.js deleted file mode 100644 index 0de126ae359412..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bind.js +++ /dev/null @@ -1,56 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - replaceHolders = require('../internal/replaceHolders'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind` this method does not set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var greet = function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * }; - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // using placeholders - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = restParam(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -module.exports = bind; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindAll.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindAll.js deleted file mode 100644 index a09e948524875c..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindAll.js +++ /dev/null @@ -1,50 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - createWrapper = require('../internal/createWrapper'), - functions = require('../object/functions'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1; - -/** - * Binds methods of an object to the object itself, overwriting the existing - * method. Method names may be specified as individual arguments or as arrays - * of method names. If no method names are provided all enumerable function - * properties, own and inherited, of `object` are bound. - * - * **Note:** This method does not set the "length" property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} [methodNames] The object method names to bind, - * specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'onClick': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view); - * jQuery('#docs').on('click', view.onClick); - * // => logs 'clicked docs' when the element is clicked - */ -var bindAll = restParam(function(object, methodNames) { - methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); - - var index = -1, - length = methodNames.length; - - while (++index < length) { - var key = methodNames[index]; - object[key] = createWrapper(object[key], BIND_FLAG, object); - } - return object; -}); - -module.exports = bindAll; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindKey.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindKey.js deleted file mode 100644 index b787fe702276c6..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/bindKey.js +++ /dev/null @@ -1,66 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - replaceHolders = require('../internal/replaceHolders'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. - * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object the method belongs to. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // using placeholders - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ -var bindKey = restParam(function(object, key, partials) { - var bitmask = BIND_FLAG | BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bindKey.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(key, bitmask, object, partials, holders); -}); - -// Assign default placeholders. -bindKey.placeholder = {}; - -module.exports = bindKey; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/compose.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/compose.js deleted file mode 100644 index 1954e942397b7f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/compose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flowRight'); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curry.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curry.js deleted file mode 100644 index b7db3fdad8ab6e..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curry.js +++ /dev/null @@ -1,51 +0,0 @@ -var createCurry = require('../internal/createCurry'); - -/** Used to compose bitmasks for wrapper metadata. */ -var CURRY_FLAG = 8; - -/** - * Creates a function that accepts one or more arguments of `func` that when - * called either invokes `func` returning its result, if all `func` arguments - * have been provided, or returns a function that accepts one or more of the - * remaining `func` arguments, and so on. The arity of `func` may be specified - * if `func.length` is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ -var curry = createCurry(CURRY_FLAG); - -// Assign default placeholders. -curry.placeholder = {}; - -module.exports = curry; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curryRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curryRight.js deleted file mode 100644 index 11c540393b399f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/curryRight.js +++ /dev/null @@ -1,48 +0,0 @@ -var createCurry = require('../internal/createCurry'); - -/** Used to compose bitmasks for wrapper metadata. */ -var CURRY_RIGHT_FLAG = 16; - -/** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ -var curryRight = createCurry(CURRY_RIGHT_FLAG); - -// Assign default placeholders. -curryRight.placeholder = {}; - -module.exports = curryRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/debounce.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/debounce.js deleted file mode 100644 index 5df81e71a6059f..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/debounce.js +++ /dev/null @@ -1,187 +0,0 @@ -var isObject = require('../lang/isObject'), - now = require('../date/now'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the debounced function return the result of the last - * `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=false] Specify invoking on the leading - * edge of the timeout. - * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it is invoked. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // avoid costly calculations while the window size is in flux - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // invoke `sendMail` when the click event is fired, debouncing subsequent calls - * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // ensure `batchLog` is invoked once after 1 second of debounced calls - * var source = new EventSource('/stream'); - * jQuery(source).on('message', _.debounce(batchLog, 250, { - * 'maxWait': 1000 - * })); - * - * // cancel a debounced call - * var todoChanges = _.debounce(batchLog, 1000); - * Object.observe(models.todo, todoChanges); - * - * Object.observe(models, function(changes) { - * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { - * todoChanges.cancel(); - * } - * }, ['delete']); - * - * // ...at some point `models.todo` is changed - * models.todo.completed = true; - * - * // ...before 1 second has passed `models.todo` is deleted - * // which cancels the debounced `todoChanges` call - * delete models.todo; - */ -function debounce(func, wait, options) { - var args, - maxTimeoutId, - result, - stamp, - thisArg, - timeoutId, - trailingCall, - lastCalled = 0, - maxWait = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = wait < 0 ? 0 : (+wait || 0); - if (options === true) { - var leading = true; - trailing = false; - } else if (isObject(options)) { - leading = options.leading; - maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? options.trailing : trailing; - } - - function cancel() { - if (timeoutId) { - clearTimeout(timeoutId); - } - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - } - - function delayed() { - var remaining = wait - (now() - stamp); - if (remaining <= 0 || remaining > wait) { - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - var isCalled = trailingCall; - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } else { - timeoutId = setTimeout(delayed, remaining); - } - } - - function maxDelayed() { - if (timeoutId) { - clearTimeout(timeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (trailing || (maxWait !== wait)) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } - - function debounced() { - args = arguments; - stamp = now(); - thisArg = this; - trailingCall = trailing && (timeoutId || !leading); - - if (maxWait === false) { - var leadingCall = leading && !timeoutId; - } else { - if (!maxTimeoutId && !leading) { - lastCalled = stamp; - } - var remaining = maxWait - (stamp - lastCalled), - isCalled = remaining <= 0 || remaining > maxWait; - - if (isCalled) { - if (maxTimeoutId) { - maxTimeoutId = clearTimeout(maxTimeoutId); - } - lastCalled = stamp; - result = func.apply(thisArg, args); - } - else if (!maxTimeoutId) { - maxTimeoutId = setTimeout(maxDelayed, remaining); - } - } - if (isCalled && timeoutId) { - timeoutId = clearTimeout(timeoutId); - } - else if (!timeoutId && wait !== maxWait) { - timeoutId = setTimeout(delayed, wait); - } - if (leadingCall) { - isCalled = true; - result = func.apply(thisArg, args); - } - if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - return result; - } - debounced.cancel = cancel; - return debounced; -} - -module.exports = debounce; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/defer.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/defer.js deleted file mode 100644 index 369790ce64fcc6..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/defer.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseDelay = require('../internal/baseDelay'), - restParam = require('./restParam'); - -/** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // logs 'deferred' after one or more milliseconds - */ -var defer = restParam(function(func, args) { - return baseDelay(func, 1, args); -}); - -module.exports = defer; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/delay.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/delay.js deleted file mode 100644 index 955b059e7fa2cf..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/delay.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseDelay = require('../internal/baseDelay'), - restParam = require('./restParam'); - -/** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => logs 'later' after one second - */ -var delay = restParam(function(func, wait, args) { - return baseDelay(func, wait, args); -}); - -module.exports = delay; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flow.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flow.js deleted file mode 100644 index a435a3d878ff48..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flow.js +++ /dev/null @@ -1,25 +0,0 @@ -var createFlow = require('../internal/createFlow'); - -/** - * Creates a function that returns the result of invoking the provided - * functions with the `this` binding of the created function, where each - * successive invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow(_.add, square); - * addSquare(1, 2); - * // => 9 - */ -var flow = createFlow(); - -module.exports = flow; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flowRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flowRight.js deleted file mode 100644 index 23b9d76b58e8f5..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/flowRight.js +++ /dev/null @@ -1,25 +0,0 @@ -var createFlow = require('../internal/createFlow'); - -/** - * This method is like `_.flow` except that it creates a function that - * invokes the provided functions from right to left. - * - * @static - * @memberOf _ - * @alias backflow, compose - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight(square, _.add); - * addSquare(1, 2); - * // => 9 - */ -var flowRight = createFlow(true); - -module.exports = flowRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/memoize.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/memoize.js deleted file mode 100644 index 1088e4be656113..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/memoize.js +++ /dev/null @@ -1,80 +0,0 @@ -var MapCache = require('../internal/MapCache'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; -} - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -module.exports = memoize; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/negate.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/negate.js deleted file mode 100644 index 82479390ad7802..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/negate.js +++ /dev/null @@ -1,32 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ -function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - return !predicate.apply(this, arguments); - }; -} - -module.exports = negate; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/once.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/once.js deleted file mode 100644 index 0b5bd853cb492b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/once.js +++ /dev/null @@ -1,24 +0,0 @@ -var before = require('./before'); - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first call. The `func` is invoked - * with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` invokes `createApplication` once - */ -function once(func) { - return before(2, func); -} - -module.exports = once; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partial.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partial.js deleted file mode 100644 index fb1d04fb6c5928..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partial.js +++ /dev/null @@ -1,43 +0,0 @@ -var createPartial = require('../internal/createPartial'); - -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // using placeholders - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ -var partial = createPartial(PARTIAL_FLAG); - -// Assign default placeholders. -partial.placeholder = {}; - -module.exports = partial; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partialRight.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partialRight.js deleted file mode 100644 index 634e6a4c40cffa..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/partialRight.js +++ /dev/null @@ -1,42 +0,0 @@ -var createPartial = require('../internal/createPartial'); - -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_RIGHT_FLAG = 64; - -/** - * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // using placeholders - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ -var partialRight = createPartial(PARTIAL_RIGHT_FLAG); - -// Assign default placeholders. -partialRight.placeholder = {}; - -module.exports = partialRight; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/rearg.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/rearg.js deleted file mode 100644 index 0a4bf8fa6d65ed..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/rearg.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseFlatten = require('../internal/baseFlatten'), - createWrapper = require('../internal/createWrapper'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var REARG_FLAG = 256; - -/** - * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes, - * specified as individual indexes or arrays of indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, 2, 0, 1); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - * - * var map = _.rearg(_.map, [1, 0]); - * map(function(n) { - * return n * 3; - * }, [1, 2, 3]); - * // => [3, 6, 9] - */ -var rearg = restParam(function(func, indexes) { - return createWrapper(func, REARG_FLAG, null, null, null, baseFlatten(indexes)); -}); - -module.exports = rearg; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/restParam.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/restParam.js deleted file mode 100644 index 3a1c15707c748a..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/restParam.js +++ /dev/null @@ -1,58 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/spread.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/spread.js deleted file mode 100644 index aad4b7147f2350..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/spread.js +++ /dev/null @@ -1,44 +0,0 @@ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func` with the `this` binding of the created - * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). - * - * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to spread arguments over. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * // with a Promise - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ -function spread(func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function(array) { - return func.apply(this, array); - }; -} - -module.exports = spread; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/throttle.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/throttle.js deleted file mode 100644 index 5e8f0ef5611145..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/throttle.js +++ /dev/null @@ -1,72 +0,0 @@ -var debounce = require('./debounce'), - isObject = require('../lang/isObject'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as an internal `_.debounce` options object by `_.throttle`. */ -var debounceOptions = { - 'leading': false, - 'maxWait': 0, - 'trailing': false -}; - -/** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed invocations. Provide an options object to indicate - * that `func` should be invoked on the leading and/or trailing edge of the - * `wait` timeout. Subsequent calls to the throttled function return the - * result of the last `func` call. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=true] Specify invoking on the leading - * edge of the timeout. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // avoid excessively updating the position while scrolling - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes - * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { - * 'trailing': false - * })); - * - * // cancel a trailing throttled call - * jQuery(window).on('popstate', throttled.cancel); - */ -function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (options === false) { - leading = false; - } else if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - debounceOptions.leading = leading; - debounceOptions.maxWait = +wait; - debounceOptions.trailing = trailing; - return debounce(func, wait, debounceOptions); -} - -module.exports = throttle; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/wrap.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/wrap.js deleted file mode 100644 index 68b09af23862a4..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/function/wrap.js +++ /dev/null @@ -1,33 +0,0 @@ -var createWrapper = require('../internal/createWrapper'), - identity = require('../utility/identity'); - -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_FLAG = 32; - -/** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {*} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

    ' + func(text) + '

    '; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

    fred, barney, & pebbles

    ' - */ -function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return createWrapper(wrapper, PARTIAL_FLAG, null, [value], []); -} - -module.exports = wrap; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/index.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/index.js deleted file mode 100644 index deb66539d440b9..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/index.js +++ /dev/null @@ -1,12235 +0,0 @@ -/** - * @license - * lodash 3.9.3 (Custom Build) - * Build: `lodash modern -d -o ./index.js` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '3.9.3'; - - /** Used to compose bitmasks for wrapper metadata. */ - var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 128, - REARG_FLAG = 256; - - /** Used as default options for `_.trunc`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; - - /** Used to detect when a function becomes hot. */ - var HOT_COUNT = 150, - HOT_SPAN = 16; - - /** Used to indicate the type of lazy iteratees. */ - var LAZY_DROP_WHILE_FLAG = 0, - LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2; - - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - - var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, - reUnescapedHtml = /[&<>"'`]/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; - - /** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ - var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); - - /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ - var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; - - /** Used to detect hexadecimal string values. */ - var reHasHexPrefix = /^0[xX]/; - - /** Used to detect host constructors (Safari > 5). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Used to detect unsigned integer values. */ - var reIsUint = /^\d+$/; - - /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ - var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; - - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; - - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - - /** Used to match words to create compound words. */ - var reWords = (function() { - var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', - lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; - - return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); - }()); - - /** Used to detect and test for whitespace. */ - var whitespace = ( - // Basic whitespace characters. - ' \t\x0b\f\xa0\ufeff' + - - // Line terminators. - '\n\r\u2028\u2029' + - - // Unicode category "Zs" space separators. - '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' - ); - - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', - 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'document', - 'isFinite', 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 'window' - ]; - - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; - - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dateTag] = typedArrayTags[errorTag] = - typedArrayTags[funcTag] = typedArrayTags[mapTag] = - typedArrayTags[numberTag] = typedArrayTags[objectTag] = - typedArrayTags[regexpTag] = typedArrayTags[setTag] = - typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = - cloneableTags[dateTag] = cloneableTags[float32Tag] = - cloneableTags[float64Tag] = cloneableTags[int8Tag] = - cloneableTags[int16Tag] = cloneableTags[int32Tag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[stringTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[mapTag] = cloneableTags[setTag] = - cloneableTags[weakMapTag] = false; - - /** Used as an internal `_.debounce` options object by `_.throttle`. */ - var debounceOptions = { - 'leading': false, - 'maxWait': 0, - 'trailing': false - }; - - /** Used to map latin-1 supplementary letters to basic latin letters. */ - var deburredLetters = { - '\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' - }; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'", - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /** Detect free variable `exports`. */ - var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; - - /** Detect free variable `self`. */ - var freeSelf = objectTypes[typeof self] && self && self.Object && self; - - /** Detect free variable `window`. */ - var freeWindow = objectTypes[typeof window] && window && window.Object && window; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; - - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; - - /*--------------------------------------------------------------------------*/ - - /** - * The base implementation of `compareAscending` which compares values and - * sorts them in ascending order without guaranteeing a stable sort. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function baseCompareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; - - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; - - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to search. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @private - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.isFunction` without support for environments - * with incorrect `typeof` results. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - */ - function baseIsFunction(value) { - // Avoid a Chakra JIT bug in compatibility modes of IE 11. - // See https://github.com/jashkenas/underscore/issues/1621 for more details. - return typeof value == 'function' || false; - } - - /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); - } - - /** - * Used by `_.trim` and `_.trimLeft` to get the index of the first character - * of `string` that is not found in `chars`. - * - * @private - * @param {string} string The string to inspect. - * @param {string} chars The characters to find. - * @returns {number} Returns the index of the first character not found in `chars`. - */ - function charsLeftIndex(string, chars) { - var index = -1, - length = string.length; - - while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimRight` to get the index of the last character - * of `string` that is not found in `chars`. - * - * @private - * @param {string} string The string to inspect. - * @param {string} chars The characters to find. - * @returns {number} Returns the index of the last character not found in `chars`. - */ - function charsRightIndex(string, chars) { - var index = string.length; - - while (index-- && chars.indexOf(string.charAt(index)) > -1) {} - return index; - } - - /** - * Used by `_.sortBy` to compare transformed elements of a collection and stable - * sort them in ascending order. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareAscending(object, other) { - return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); - } - - /** - * Used by `_.sortByOrder` to compare multiple properties of each element - * in a collection and stable sort them in the following order: - * - * If `orders` is unspecified, sort in ascending order for all properties. - * Otherwise, for each property, sort in ascending order if its corresponding value in - * orders is true, and descending order if false. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @param {boolean[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = baseCompareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - return result * (orders[index] ? 1 : -1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://code.google.com/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; - } - - /** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - function deburrLetter(letter) { - return deburredLetters[letter]; - } - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } - - /** - * Used by `_.template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } - - /** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ - function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; - } - - /** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; - } - - /** - * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a - * character code is whitespace. - * - * @private - * @param {number} charCode The character code to inspect. - * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. - */ - function isSpace(charCode) { - return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || - (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); - } - - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - if (array[index] === placeholder) { - array[index] = PLACEHOLDER; - result[++resIndex] = index; - } - } - return result; - } - - /** - * An implementation of `_.uniq` optimized for sorted arrays without support - * for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ - function sortedUniq(array, iteratee) { - var seen, - index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (!index || seen !== computed) { - seen = computed; - result[++resIndex] = value; - } - } - return result; - } - - /** - * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the first non-whitespace character. - */ - function trimmedLeftIndex(string) { - var index = -1, - length = string.length; - - while (++index < length && isSpace(string.charCodeAt(index))) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ - function trimmedRightIndex(string) { - var index = string.length; - - while (index-- && isSpace(string.charCodeAt(index))) {} - return index; - } - - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Create a new pristine `lodash` function using the given `context` object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // using `context` to mock `Date#getTime` use in `_.now` - * var mock = _.runInContext({ - * 'Date': function() { - * return { 'getTime': getTimeMock }; - * } - * }); - * - * // or creating a suped-up `defer` in Node.js - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - function runInContext(context) { - // Avoid issues with some ES3 environments that attempt to use values, named - // after built-in constructors like `Object`, for the creation of literals. - // ES5 clears this up by stating that literals must use built-in constructors. - // See https://es5.github.io/#x11.1.5 for more details. - context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; - - /** Native constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Number = context.Number, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; - - /** Used for native method references. */ - var arrayProto = Array.prototype, - objectProto = Object.prototype, - stringProto = String.prototype; - - /** Used to detect DOM support. */ - var document = (document = context.window) ? document.document : null; - - /** Used to resolve the decompiled source of functions. */ - var fnToString = Function.prototype.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ - var objToString = objectProto.toString; - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = context._; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - escapeRegExp(fnToString.call(hasOwnProperty)) - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); - - /** Native method references. */ - var ArrayBuffer = getNative(context, 'ArrayBuffer'), - bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'), - ceil = Math.ceil, - clearTimeout = context.clearTimeout, - floor = Math.floor, - getPrototypeOf = getNative(Object, 'getPrototypeOf'), - parseFloat = context.parseFloat, - push = arrayProto.push, - Set = getNative(context, 'Set'), - setTimeout = context.setTimeout, - splice = arrayProto.splice, - Uint8Array = getNative(context, 'Uint8Array'), - WeakMap = getNative(context, 'WeakMap'); - - /** Used to clone array buffers. */ - var Float64Array = (function() { - // Safari 5 errors when using an array buffer to initialize a typed array - // where the array buffer's `byteLength` is not a multiple of the typed - // array's `BYTES_PER_ELEMENT`. - try { - var func = getNative(context, 'Float64Array'), - result = new func(new ArrayBuffer(10), 0, 1) && func; - } catch(e) {} - return result || null; - }()); - - /* Native method references for those with the same name as other `lodash` methods. */ - var nativeCreate = getNative(Object, 'create'), - nativeIsArray = getNative(Array, 'isArray'), - nativeIsFinite = context.isFinite, - nativeKeys = getNative(Object, 'keys'), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = getNative(Date, 'now'), - nativeNumIsFinite = getNative(Number, 'isFinite'), - nativeParseInt = context.parseInt, - nativeRandom = Math.random; - - /** Used as references for `-Infinity` and `Infinity`. */ - var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, - POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - - /** Used as the size, in bytes, of each `Float64Array` element. */ - var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0; - - /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ - var MAX_SAFE_INTEGER = 9007199254740991; - - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; - - /** Used to lookup unminified function names. */ - var realNames = {}; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit chaining. - * Methods that operate on and return arrays, collections, and functions can - * be chained together. Methods that return a boolean or single value will - * automatically end the chain returning the unwrapped value. Explicit chaining - * may be enabled using `_.chain`. The execution of chained methods is lazy, - * that is, execution is deferred until `_#value` is implicitly or explicitly - * called. - * - * Lazy evaluation allows several methods to support shortcut fusion. Shortcut - * fusion is an optimization that merges iteratees to avoid creating intermediate - * arrays and reduce the number of iteratee executions. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, - * `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, - * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, - * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, - * and `where` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, - * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, - * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`, - * `difference`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `fill`, - * `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`, - * `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`, - * `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`, - * `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `method`, `methodOf`, `mixin`, `negate`, `omit`, `once`, - * `pairs`, `partial`, `partialRight`, `partition`, `pick`, `plant`, `pluck`, - * `property`, `propertyOf`, `pull`, `pullAt`, `push`, `range`, `rearg`, - * `reject`, `remove`, `rest`, `restParam`, `reverse`, `set`, `shuffle`, - * `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`, `spread`, - * `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, - * `thru`, `times`, `toArray`, `toPlainObject`, `transform`, `union`, `uniq`, - * `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `where`, `without`, - * `wrap`, `xor`, `zip`, `zipObject`, `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`, - * `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, - * `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `get`, - * `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, - * `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, - * `isFinite` `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, - * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, - * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lt`, `lte`, - * `max`, `min`, `noConflict`, `noop`, `now`, `pad`, `padLeft`, `padRight`, - * `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, - * `runInContext`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedLastIndex`, `startCase`, `startsWith`, `sum`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words` - * - * The wrapper method `sample` will return a wrapped value when `n` is provided, - * otherwise an unwrapped value is returned. - * - * @name _ - * @constructor - * @category Chain - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var wrapped = _([1, 2, 3]); - * - * // returns an unwrapped value - * wrapped.reduce(function(total, n) { - * return total + n; - * }); - * // => 6 - * - * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); - } - - /** - * The function whose prototype all chaining wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. - } - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable chaining for all wrapper methods. - * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. - */ - function LodashWrapper(value, chainAll, actions) { - this.__wrapped__ = value; - this.__actions__ = actions || []; - this.__chain__ = !!chainAll; - } - - /** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ - var support = lodash.support = {}; - - (function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if the DOM is supported. - * - * @memberOf _.support - * @type boolean - */ - try { - support.dom = document.createDocumentFragment().nodeType === 11; - } catch(e) { - support.dom = false; - } - }(1, 0)); - - /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB). Change the following template settings to use - * alternative delimiters. - * - * @static - * @memberOf _ - * @type Object - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': reEscape, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': reEvaluate, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': lodash - } - }; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @param {*} value The value to wrap. - */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = null; - this.__dir__ = 1; - this.__dropCount__ = 0; - this.__filtered__ = false; - this.__iteratees__ = null; - this.__takeCount__ = POSITIVE_INFINITY; - this.__views__ = null; - } - - /** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ - function lazyClone() { - var actions = this.__actions__, - iteratees = this.__iteratees__, - views = this.__views__, - result = new LazyWrapper(this.__wrapped__); - - result.__actions__ = actions ? arrayCopy(actions) : null; - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = iteratees ? arrayCopy(iteratees) : null; - result.__takeCount__ = this.__takeCount__; - result.__views__ = views ? arrayCopy(views) : null; - return result; - } - - /** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; - } - - /** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ - function lazyValue() { - var array = this.__wrapped__.value(); - if (!isArray(array)) { - return baseWrapperValue(array, this.__actions__); - } - var dir = this.__dir__, - isRight = dir < 0, - view = getView(0, array.length, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - takeCount = nativeMin(length, this.__takeCount__), - iteratees = this.__iteratees__, - iterLength = iteratees ? iteratees.length : 0, - resIndex = 0, - result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type; - - if (type == LAZY_DROP_WHILE_FLAG) { - if (data.done && (isRight ? (index > data.index) : (index < data.index))) { - data.count = 0; - data.done = false; - } - data.index = index; - if (!data.done) { - var limit = data.limit; - if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) { - continue outer; - } - } - } else { - var computed = iteratee(value); - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - } - result[resIndex++] = value; - } - return result; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a cache object to store key/value pairs. - * - * @private - * @static - * @name Cache - * @memberOf _.memoize - */ - function MapCache() { - this.__data__ = {}; - } - - /** - * Removes `key` and its value from the cache. - * - * @private - * @name delete - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. - */ - function mapDelete(key) { - return this.has(key) && delete this.__data__[key]; - } - - /** - * Gets the cached value for `key`. - * - * @private - * @name get - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to get. - * @returns {*} Returns the cached value. - */ - function mapGet(key) { - return key == '__proto__' ? undefined : this.__data__[key]; - } - - /** - * Checks if a cached value for `key` exists. - * - * @private - * @name has - * @memberOf _.memoize.Cache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapHas(key) { - return key != '__proto__' && hasOwnProperty.call(this.__data__, key); - } - - /** - * Sets `value` to `key` of the cache. - * - * @private - * @name set - * @memberOf _.memoize.Cache - * @param {string} key The key of the value to cache. - * @param {*} value The value to cache. - * @returns {Object} Returns the cache object. - */ - function mapSet(key, value) { - if (key != '__proto__') { - this.__data__[key] = value; - } - return this; - } - - /*------------------------------------------------------------------------*/ - - /** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var length = values ? values.length : 0; - - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); - } - } - - /** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ - function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; - - return result ? 0 : -1; - } - - /** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ - function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; - } - } - - /*------------------------------------------------------------------------*/ - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function arrayCopy(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; - } - - /** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.forEachRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.every` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; - } - - /** - * A specialized version of `baseExtremum` for arrays which invokes `iteratee` - * with one argument: (value). - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {*} Returns the extremum value. - */ - function arrayExtremum(array, iteratee, comparator, exValue) { - var index = -1, - length = array.length, - computed = exValue, - result = computed; - - while (++index < length) { - var value = array[index], - current = +iteratee(value); - - if (comparator(current, computed)) { - computed = current; - result = value; - } - } - return result; - } - - /** - * A specialized version of `_.filter` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * A specialized version of `_.map` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - - /** - * A specialized version of `_.reduce` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the first element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initFromArray) { - var index = -1, - length = array.length; - - if (initFromArray && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - - /** - * A specialized version of `_.reduceRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the last element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initFromArray) { - var length = array.length; - if (initFromArray && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } - - /** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; - } - - /** - * A specialized version of `_.sum` for arrays without support for iteratees. - * - * @private - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - */ - function arraySum(array) { - var length = array.length, - result = 0; - - while (length--) { - result += +array[length] || 0; - } - return result; - } - - /** - * Used by `_.defaults` to customize its `_.assign` use. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @returns {*} Returns the value to assign to the destination object. - */ - function assignDefaults(objectValue, sourceValue) { - return objectValue === undefined ? sourceValue : objectValue; - } - - /** - * Used by `_.template` to customize its `_.assign` use. - * - * **Note:** This function is like `assignDefaults` except that it ignores - * inherited property values when checking if a property is `undefined`. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @param {string} key The key associated with the object and source values. - * @param {Object} object The destination object. - * @returns {*} Returns the value to assign to the destination object. - */ - function assignOwnDefaults(objectValue, sourceValue, key, object) { - return (objectValue === undefined || !hasOwnProperty.call(object, key)) - ? sourceValue - : objectValue; - } - - /** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - */ - function assignWith(object, source, customizer) { - var index = -1, - props = keys(source), - length = props.length; - - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); - - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; - } - } - return object; - } - - /** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); - } - - /** - * The base implementation of `_.at` without support for string collections - * and individual key arguments. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {number[]|string[]} props The property names or indexes of elements to pick. - * @returns {Array} Returns the new array of picked elements. - */ - function baseAt(collection, props) { - var index = -1, - isNil = collection == null, - isArr = !isNil && isArrayLike(collection), - length = isArr ? collection.length : 0, - propsLength = props.length, - result = Array(propsLength); - - while(++index < propsLength) { - var key = props[index]; - if (isArr) { - result[index] = isIndex(key, length) ? collection[key] : undefined; - } else { - result[index] = isNil ? undefined : collection[key]; - } - } - return result; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ - function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; - } - - /** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); - } - - /** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); - } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; - - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseAssign(result, value); - } - } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); - } - } - // Check for circular references and return corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(prototype) { - if (isObject(prototype)) { - object.prototype = prototype; - var result = new object; - object.prototype = null; - } - return result || {}; - }; - }()); - - /** - * The base implementation of `_.delay` and `_.defer` which accepts an index - * of where to slice the arguments to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments provide to `func`. - * @returns {number} Returns the timer id. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of `_.difference` which accepts a single array - * of values to exclude. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @returns {Array} Returns the new array of filtered values. - */ - function baseDifference(array, values) { - var length = array ? array.length : 0, - result = []; - - if (!length) { - return result; - } - var index = -1, - indexOf = getIndexOf(), - isCommon = indexOf == baseIndexOf, - cache = (isCommon && values.length >= 200) ? createCache(values) : null, - valuesLength = values.length; - - if (cache) { - indexOf = cacheIndexOf; - isCommon = false; - values = cache; - } - outer: - while (++index < length) { - var value = array[index]; - - if (isCommon && value === value) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === value) { - continue outer; - } - } - result.push(value); - } - else if (indexOf(values, value, 0) < 0) { - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.forEachRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); - - /** - * The base implementation of `_.every` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * Gets the extremum value of `collection` invoking `iteratee` for each value - * in `collection` to generate the criterion by which the value is ranked. - * The `iteratee` is invoked with three arguments: (value, index|key, collection). - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(collection, iteratee, comparator, exValue) { - var computed = exValue, - result = computed; - - baseEach(collection, function(value, index, collection) { - var current = +iteratee(value, index, collection); - if (comparator(current, computed) || (current === exValue && current === result)) { - computed = current; - result = value; - } - }); - return result; - } - - /** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ - function baseFill(array, value, start, end) { - var length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : (end >>> 0); - start >>>= 0; - - while (start < length) { - array[start++] = value; - } - return array; - } - - /** - * The base implementation of `_.filter` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, - * without support for callback shorthands and `this` binding, which iterates - * over `collection` using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, isDeep, isStrict) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (isObjectLike(value) && isArrayLike(value) && - (isStrict || isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - value = baseFlatten(value, isDeep, isStrict); - } - var valIndex = -1, - valLength = value.length; - - while (++valIndex < valLength) { - result[++resIndex] = value[valIndex]; - } - } else if (!isStrict) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); - - /** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); - } - - /** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.forOwnRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwnRight(object, iteratee) { - return baseForRight(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from those provided. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. - */ - function baseFunctions(object, props) { - var index = -1, - length = props.length, - resIndex = -1, - result = []; - - while (++index < length) { - var key = props[index]; - if (isFunction(object[key])) { - result[++resIndex] = key; - } - } - return result; - } - - /** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; - } - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[path[index++]]; - } - return (index && index == length) ? object : undefined; - } - - /** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; - } - - /** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = toObject(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { - return false; - } - } - } - return true; - } - - /** - * The base implementation of `_.map` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && (value !== undefined || (key in toObject(object))); - }; - } - return function(object) { - return baseIsMatch(object, matchData); - }; - } - - /** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ - function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); - - path = toPath(path); - return function(object) { - if (object == null) { - return false; - } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); - } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; - } - - /** - * The base implementation of `_.merge` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns `object`. - */ - function baseMerge(object, source, customizer, stackA, stackB) { - if (!isObject(object)) { - return object; - } - var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), - props = isSrcArr ? null : keys(source); - - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObjectLike(srcValue)) { - stackA || (stackA = []); - stackB || (stackB = []); - baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); - } - else { - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - } - if ((result !== undefined || (isSrcArr && !(key in object))) && - (isCommon || (result === result ? (result !== value) : (value === value)))) { - object[key] = result; - } - } - }); - return object; - } - - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { - var length = stackA.length, - srcValue = source[key]; - - while (length--) { - if (stackA[length] == srcValue) { - object[key] = stackB[length]; - return; - } - } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { - result = isArray(value) - ? value - : (isArrayLike(value) ? arrayCopy(value) : []); - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - result = isArguments(value) - ? toPlainObject(value) - : (isPlainObject(value) ? value : {}); - } - else { - isCommon = false; - } - } - // Add the source value to the stack of traversed objects and associate - // it with its merged value. - stackA.push(srcValue); - stackB.push(result); - - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? (result !== value) : (value === value)) { - object[key] = result; - } - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - */ - function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; - } - - /** - * The base implementation of `_.pullAt` without support for individual - * index arguments and capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0; - while (length--) { - var index = indexes[length]; - if (index != previous && isIndex(index)) { - var previous = index; - splice.call(array, index, 1); - } - } - return array; - } - - /** - * The base implementation of `_.random` without support for argument juggling - * and returning floating-point numbers. - * - * @private - * @param {number} min The minimum possible value. - * @param {number} max The maximum possible value. - * @returns {number} Returns the random number. - */ - function baseRandom(min, max) { - return min + floor(nativeRandom() * (max - min + 1)); - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight` without support - * for callback shorthands and `this` binding, which iterates over `collection` - * using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initFromCollection Specify using the first or last element - * of `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initFromCollection - ? (initFromCollection = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `setData` without support for hot loop detection. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * The base implementation of `_.some` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } - - /** - * The base implementation of `_.sortByOrder` without param guards. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ - function baseSortByOrder(collection, iteratees, orders) { - var callback = getCallback(), - index = -1; - - iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); - - var result = baseMap(collection, function(value) { - var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } - - /** - * The base implementation of `_.sum` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(collection, iteratee) { - var result = 0; - baseEach(collection, function(value, index, collection) { - result += +iteratee(value, index, collection) || 0; - }); - return result; - } - - /** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ - function baseUniq(array, iteratee) { - var index = -1, - indexOf = getIndexOf(), - length = array.length, - isCommon = indexOf == baseIndexOf, - isLarge = isCommon && length >= 200, - seen = isLarge ? createCache() : null, - result = []; - - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; - } - - /** - * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, - * and `_.takeWhile` without support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to peform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - var index = -1, - length = actions.length; - - while (++index < length) { - var args = [result], - action = actions[index]; - - push.apply(args, action.args); - result = action.func.apply(action.thisArg, args); - } - return result; - } - - /** - * Performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function binaryIndex(array, value, retHighest) { - var low = 0, - high = array ? array.length : low; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return binaryIndexBy(array, value, identity, retHighest); - } - - /** - * This function is like `binaryIndex` except that it invokes `iteratee` for - * `value` and each element of `array` to compute their sort ranking. The - * iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The function invoked per iteration. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function binaryIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - - var low = 0, - high = array ? array.length : 0, - valIsNaN = value !== value, - valIsNull = value === null, - valIsUndef = value === undefined; - - while (low < high) { - var mid = floor((low + high) / 2), - computed = iteratee(array[mid]), - isDef = computed !== undefined, - isReflexive = computed === computed; - - if (valIsNaN) { - var setLow = isReflexive || retHighest; - } else if (valIsNull) { - setLow = isReflexive && isDef && (retHighest || computed != null); - } else if (valIsUndef) { - setLow = isReflexive && (retHighest || isDef); - } else if (computed == null) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } - - /** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ - function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; - } - - /** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ - function bufferClone(buffer) { - return bufferSlice.call(buffer, 0); - } - if (!bufferSlice) { - // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`. - bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) { - var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, - offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, - result = new ArrayBuffer(byteLength); - - if (floatLength) { - var view = new Float64Array(result, 0, floatLength); - view.set(new Float64Array(buffer, 0, floatLength)); - } - if (byteLength != offset) { - view = new Uint8Array(result, offset); - view.set(new Uint8Array(buffer, offset)); - } - return result; - }; - } - - /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgs(args, partials, holders) { - var holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - leftIndex = -1, - leftLength = partials.length, - result = Array(argsLength + leftLength); - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - while (argsLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; - } - - /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgsRight(args, partials, holders) { - var holdersIndex = -1, - holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - rightIndex = -1, - rightLength = partials.length, - result = Array(argsLength + rightLength); - - while (++argsIndex < argsLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - return result; - } - - /** - * Creates a function that aggregates a collection, creating an accumulator - * object composed from the results of running each element in the collection - * through an iteratee. - * - * **Note:** This function is used to create `_.countBy`, `_.groupBy`, `_.indexBy`, - * and `_.partition`. - * - * @private - * @param {Function} setter The function to set keys and values of the accumulator object. - * @param {Function} [initializer] The function to initialize the accumulator object. - * @returns {Function} Returns the new aggregator function. - */ - function createAggregator(setter, initializer) { - return function(collection, iteratee, thisArg) { - var result = initializer ? initializer() : {}; - iteratee = getCallback(iteratee, thisArg, 3); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - setter(result, value, iteratee(value, index, collection), collection); - } - } else { - baseEach(collection, function(value, key, collection) { - setter(result, value, iteratee(value, key, collection), collection); - }); - } - return result; - }; - } - - /** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; - - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that wraps `func` and invokes it with the `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new bound function. - */ - function createBindWrapper(func, thisArg) { - var Ctor = createCtorWrapper(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(thisArg, arguments); - } - return wrapper; - } - - /** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ - var createCache = !(nativeCreate && Set) ? constant(null) : function(values) { - return new SetCache(values); - }; - - /** - * Creates a function that produces compound words out of the words in a - * given string. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ - function createCompounder(callback) { - return function(string) { - var index = -1, - array = words(deburr(string)), - length = array.length, - result = ''; - - while (++index < length) { - result = callback(result, array[index], index); - } - return result; - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtorWrapper(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. - // See https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a `_.curry` or `_.curryRight` function. - * - * @private - * @param {boolean} flag The curry bit flag. - * @returns {Function} Returns the new curry function. - */ - function createCurry(flag) { - function curryFunc(func, arity, guard) { - if (guard && isIterateeCall(func, arity, guard)) { - arity = null; - } - var result = createWrapper(func, flag, null, null, null, null, null, arity); - result.placeholder = curryFunc.placeholder; - return result; - } - return curryFunc; - } - - /** - * Creates a `_.max` or `_.min` function. - * - * @private - * @param {Function} comparator The function used to compare values. - * @param {*} exValue The initial extremum value. - * @returns {Function} Returns the new extremum function. - */ - function createExtremum(comparator, exValue) { - return function(collection, iteratee, thisArg) { - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - iteratee = getCallback(iteratee, thisArg, 3); - if (iteratee.length == 1) { - collection = toIterable(collection); - var result = arrayExtremum(collection, iteratee, comparator, exValue); - if (!(collection.length && result === exValue)) { - return result; - } - } - return baseExtremum(collection, iteratee, comparator, exValue); - }; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ - function createFind(eachFunc, fromRight) { - return function(collection, predicate, thisArg) { - predicate = getCallback(predicate, thisArg, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, fromRight); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, eachFunc); - }; - } - - /** - * Creates a `_.findIndex` or `_.findLastIndex` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ - function createFindIndex(fromRight) { - return function(array, predicate, thisArg) { - if (!(array && array.length)) { - return -1; - } - predicate = getCallback(predicate, thisArg, 3); - return baseFindIndex(array, predicate, fromRight); - }; - } - - /** - * Creates a `_.findKey` or `_.findLastKey` function. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new find function. - */ - function createFindKey(objectFunc) { - return function(object, predicate, thisArg) { - predicate = getCallback(predicate, thisArg, 3); - return baseFind(object, predicate, objectFunc, true); - }; - } - - /** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ - function createFlow(fromRight) { - return function() { - var wrapper, - length = arguments.length, - index = fromRight ? length : -1, - leftIndex = 0, - funcs = Array(length); - - while ((fromRight ? index-- : ++index < length)) { - var func = funcs[leftIndex++] = arguments[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { - wrapper = new LodashWrapper([]); - } - } - index = wrapper ? -1 : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : null; - - if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); - } - } - return function() { - var args = arguments; - if (wrapper && args.length == 1 && isArray(args[0])) { - return wrapper.plant(args[0]).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : args[0]; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }; - } - - /** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ - function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; - } - - /** - * Creates a function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new each function. - */ - function createForIn(objectFunc) { - return function(object, iteratee, thisArg) { - if (typeof iteratee != 'function' || thisArg !== undefined) { - iteratee = bindCallback(iteratee, thisArg, 3); - } - return objectFunc(object, iteratee, keysIn); - }; - } - - /** - * Creates a function for `_.forOwn` or `_.forOwnRight`. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new each function. - */ - function createForOwn(objectFunc) { - return function(object, iteratee, thisArg) { - if (typeof iteratee != 'function' || thisArg !== undefined) { - iteratee = bindCallback(iteratee, thisArg, 3); - } - return objectFunc(object, iteratee); - }; - } - - /** - * Creates a function for `_.mapKeys` or `_.mapValues`. - * - * @private - * @param {boolean} [isMapKeys] Specify mapping keys instead of values. - * @returns {Function} Returns the new map function. - */ - function createObjectMapper(isMapKeys) { - return function(object, iteratee, thisArg) { - var result = {}; - iteratee = getCallback(iteratee, thisArg, 3); - - baseForOwn(object, function(value, key, object) { - var mapped = iteratee(value, key, object); - key = isMapKeys ? mapped : key; - value = isMapKeys ? value : mapped; - result[key] = value; - }); - return result; - }; - } - - /** - * Creates a function for `_.padLeft` or `_.padRight`. - * - * @private - * @param {boolean} [fromRight] Specify padding from the right. - * @returns {Function} Returns the new pad function. - */ - function createPadDir(fromRight) { - return function(string, length, chars) { - string = baseToString(string); - return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); - }; - } - - /** - * Creates a `_.partial` or `_.partialRight` function. - * - * @private - * @param {boolean} flag The partial bit flag. - * @returns {Function} Returns the new partial function. - */ - function createPartial(flag) { - var partialFunc = restParam(function(func, partials) { - var holders = replaceHolders(partials, partialFunc.placeholder); - return createWrapper(func, flag, null, partials, holders); - }); - return partialFunc; - } - - /** - * Creates a function for `_.reduce` or `_.reduceRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ - function createReduce(arrayFunc, eachFunc) { - return function(collection, iteratee, accumulator, thisArg) { - var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); - }; - } - - /** - * Creates a function that wraps `func` and invokes it with optional `this` - * binding of, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurry = bitmask & CURRY_FLAG, - isCurryBound = bitmask & CURRY_BOUND_FLAG, - isCurryRight = bitmask & CURRY_RIGHT_FLAG, - Ctor = isBindKey ? null : createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it to other functions. - var length = arguments.length, - index = length, - args = Array(length); - - while (index--) { - args[index] = arguments[index]; - } - if (partials) { - args = composeArgs(args, partials, holders); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight); - } - if (isCurry || isCurryRight) { - var placeholder = wrapper.placeholder, - argsHolders = replaceHolders(args, placeholder); - - length -= argsHolders.length; - if (length < arity) { - var newArgPos = argPos ? arrayCopy(argPos) : null, - newArity = nativeMax(arity - length, 0), - newsHolders = isCurry ? argsHolders : null, - newHoldersRight = isCurry ? null : argsHolders, - newPartials = isCurry ? args : null, - newPartialsRight = isCurry ? null : args; - - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); - - if (!isCurryBound) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); - } - var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], - result = createHybridWrapper.apply(undefined, newData); - - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return result; - } - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - if (argPos) { - args = reorder(args, argPos); - } - if (isAry && ary < args.length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(func); - } - return fn.apply(thisBinding, args); - } - return wrapper; - } - - /** - * Creates the padding required for `string` based on the given `length`. - * The `chars` string is truncated if the number of characters exceeds `length`. - * - * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the pad for `string`. - */ - function createPadding(string, length, chars) { - var strLength = string.length; - length = +length; - - if (strLength >= length || !nativeIsFinite(length)) { - return ''; - } - var padLength = length - strLength; - chars = chars == null ? ' ' : (chars + ''); - return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength); - } - - /** - * Creates a function that wraps `func` and invokes it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. - * - * @private - * @param {Function} func The function to partially apply arguments to. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to the new function. - * @returns {Function} Returns the new bound function. - */ - function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it `func`. - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(argsLength + leftLength); - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. - * - * @private - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {Function} Returns the new index function. - */ - function createSortedIndex(retHighest) { - return function(array, value, iteratee, thisArg) { - var callback = getCallback(iteratee); - return (iteratee == null && callback === baseCallback) - ? binaryIndex(array, value, retHighest) - : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); - }; - } - - /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); - partials = holders = null; - } - length -= (holders ? holders.length : 0); - if (bitmask & PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = null; - } - var data = isBindKey ? null : getData(func), - newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; - - if (data) { - mergeData(newData, data); - bitmask = newData[1]; - arity = newData[9]; - } - newData[9] = arity == null - ? (isBindKey ? 0 : func.length) - : (nativeMax(arity - length, 0) || 0); - - if (bitmask == BIND_FLAG) { - var result = createBindWrapper(newData[0], newData[2]); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { - result = createPartialWrapper.apply(undefined, newData); - } else { - result = createHybridWrapper.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setter(result, newData); - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; - - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} value The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag) { - switch (tag) { - case boolTag: - case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. - return +object == +other; - - case errorTag: - return object.name == other.name && object.message == other.message; - - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; - - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - return false; - } - } - return true; - } - - /** - * Gets the appropriate "callback" function. If the `_.callback` method is - * customized this function returns the custom method, otherwise it returns - * the `baseCallback` function. If arguments are provided the chosen function - * is invoked with them and its result is returned. - * - * @private - * @returns {Function} Returns the chosen function or its result. - */ - function getCallback(func, thisArg, argCount) { - var result = lodash.callback || callback; - result = result === callback ? baseCallback : result; - return argCount ? result(func, thisArg, argCount) : result; - } - - /** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; - - /** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ - function getFuncName(func) { - var result = func.name, - array = realNames[result], - length = array ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; - } - - /** - * Gets the appropriate "indexOf" function. If the `_.indexOf` method is - * customized this function returns the custom method, otherwise it returns - * the `baseIndexOf` function. If arguments are provided the chosen function - * is invoked with them and its result is returned. - * - * @private - * @returns {Function|number} Returns the chosen function or its result. - */ - function getIndexOf(collection, target, fromIndex) { - var result = lodash.indexOf || indexOf; - result = result === indexOf ? baseIndexOf : result; - return collection ? result(collection, target, fromIndex) : result; - } - - /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ - var getLength = baseProperty('length'); - - /** - * Gets the propery names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ - function getMatchData(object) { - var result = pairs(object), - length = result.length; - - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); - } - return result; - } - - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; - } - - /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} [transforms] The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ - function getView(start, end, transforms) { - var index = -1, - length = transforms ? transforms.length : 0; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; - } - - /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add array properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; - } - - /** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; - } - - /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; - } - - /** - * Invokes the method at `path` on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ - function invokePath(object, path, args) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - path = last(path); - } - var func = object == null ? object : object[path]; - return func == null ? undefined : func.apply(object, args); - } - - /** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ - function isArrayLike(value) { - return value != null && isLength(getLength(value)); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; - } - - /** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; - } - - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); - } - - /** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. - */ - function isLaziable(func) { - var funcName = getFuncName(func); - if (!(funcName in LazyWrapper.prototype)) { - return false; - } - var other = lodash[funcName]; - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ - function isStrictComparable(value) { - return value === value && !isObject(value); - } - - /** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers required to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` - * augment function arguments, making the order in which they are executed important, - * preventing the merging of metadata. However, we make an exception for a safe - * common case where curried functions have `_.ary` and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < ARY_FLAG; - - var isCombo = - (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || - (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || - (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = arrayCopy(value); - } - // Use source `ary` if it's smaller. - if (srcBitmask & ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; - } - - /** - * A specialized version of `_.pick` which picks `object` properties specified - * by `props`. - * - * @private - * @param {Object} object The source object. - * @param {string[]} props The property names to pick. - * @returns {Object} Returns the new object. - */ - function pickByArray(object, props) { - object = toObject(object); - - var index = -1, - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - return result; - } - - /** - * A specialized version of `_.pick` which picks `object` properties `predicate` - * returns truthy for. - * - * @private - * @param {Object} object The source object. - * @param {Function} predicate The function invoked per iteration. - * @returns {Object} Returns the new object. - */ - function pickByCallback(object, predicate) { - var result = {}; - baseForIn(object, function(value, key, object) { - if (predicate(value, key, object)) { - result[key] = value; - } - }); - return result; - } - - /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = arrayCopy(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - - /** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity function - * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; - }()); - - /** - * A fallback implementation of `_.isPlainObject` which checks if `value` - * is an object created by the `Object` constructor or has a `[[Prototype]]` - * of `null`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - */ - function shimIsPlainObject(value) { - var Ctor, - support = lodash.support; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag) || - (!hasOwnProperty.call(value, 'constructor') && - (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); - } - - /** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to an array-like object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array|Object} Returns the array-like object. - */ - function toIterable(value) { - if (value == null) { - return []; - } - if (!isArrayLike(value)) { - return values(value); - } - return isObject(value) ? value : Object(value); - } - - /** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ - function toObject(value) { - return isObject(value) ? value : Object(value); - } - - /** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ - function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - } - - /** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ - function wrapperClone(wrapper) { - return wrapper instanceof LazyWrapper - ? wrapper.clone() - : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements split into groups the length of `size`. - * If `collection` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new array containing chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ - function chunk(array, size, guard) { - if (guard ? isIterateeCall(array, size, guard) : size == null) { - size = 1; - } else { - size = nativeMax(+size || 1, 1); - } - var index = 0, - length = array ? array.length : 0, - resIndex = -1, - result = Array(ceil(length / size)); - - while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); - } - return result; - } - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - resIndex = -1, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; - } - } - return result; - } - - /** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The arrays of values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([1, 2, 3], [4, 2]); - * // => [1, 3] - */ - var difference = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, baseFlatten(values, false, true)) - : []; - }); - - /** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function drop(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function dropRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that match the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [1] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); - * // => ['barney'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropRightWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function dropRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) - : []; - } - - /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [3] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.dropWhile(users, 'active', false), 'user'); - * // => ['pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.dropWhile(users, 'active'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function dropWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), true) - : []; - } - - /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8], '*', 1, 2); - * // => [4, '*', 8] - */ - function fill(array, value, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(chr) { - * return chr.user == 'barney'; - * }); - * // => 0 - * - * // using the `_.matches` callback shorthand - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // using the `_.matchesProperty` callback shorthand - * _.findIndex(users, 'active', false); - * // => 0 - * - * // using the `_.property` callback shorthand - * _.findIndex(users, 'active'); - * // => 2 - */ - var findIndex = createFindIndex(); - - /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(chr) { - * return chr.user == 'pebbles'; - * }); - * // => 2 - * - * // using the `_.matches` callback shorthand - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // using the `_.matchesProperty` callback shorthand - * _.findLastIndex(users, 'active', false); - * // => 2 - * - * // using the `_.property` callback shorthand - * _.findLastIndex(users, 'active'); - * // => 0 - */ - var findLastIndex = createFindIndex(true); - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @alias head - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.first([1, 2, 3]); - * // => 1 - * - * _.first([]); - * // => undefined - */ - function first(array) { - return array ? array[0] : undefined; - } - - /** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ - function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; - } - - /** - * Recursively flattens a nested array. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to recursively flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, 3, [4]]]); - * // => [1, 2, 3, 4] - */ - function flattenDeep(array) { - var length = array ? array.length : 0; - return length ? baseFlatten(array, true) : []; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=0] The index to search from or `true` - * to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - * - * // performing a binary search - * _.indexOf([1, 1, 2, 2], 2, true); - * // => 2 - */ - function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else if (fromIndex) { - var index = binaryIndex(array, value), - other = array[index]; - - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - return baseIndexOf(array, value, fromIndex || 0); - } - - /** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ - function initial(array) { - return dropRight(array, 1); - } - - /** - * Creates an array of unique values that are included in all of the provided - * arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. - * @example - * _.intersection([1, 2], [4, 2], [2, 1]); - * // => [2] - */ - var intersection = restParam(function(arrays) { - var othLength = arrays.length, - othIndex = othLength, - caches = Array(length), - indexOf = getIndexOf(), - isCommon = indexOf == baseIndexOf, - result = []; - - while (othIndex--) { - var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; - caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; - } - var array = arrays[0], - index = -1, - length = array ? array.length : 0, - seen = caches[0]; - - outer: - while (++index < length) { - value = array[index]; - if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { - var othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { - continue outer; - } - } - if (seen) { - seen.push(value); - } - result.push(value); - } - } - return result; - }); - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; - } - - /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=array.length-1] The index to search from - * or `true` to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // using `fromIndex` - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - * - * // performing a binary search - * _.lastIndexOf([1, 1, 2, 2], 2, true); - * // => 3 - */ - function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - var index = length; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; - } else if (fromIndex) { - index = binaryIndex(array, value, true) - 1; - var other = array[index]; - if (value === value ? (value === other) : (other !== other)) { - return index; - } - return -1; - } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Removes all provided values from `array` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ - function pull() { - var args = arguments, - array = args[0]; - - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = getIndexOf(), - length = args.length; - - while (++index < length) { - var fromIndex = 0, - value = args[index]; - - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; - } - - /** - * Removes elements from `array` corresponding to the given indexes and returns - * an array of the removed elements. Indexes may be specified as an array of - * indexes or as individual arguments. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove, - * specified as individual indexes or arrays of indexes. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); - * - * console.log(array); - * // => [5, 15] - * - * console.log(evens); - * // => [10, 20] - */ - var pullAt = restParam(function(array, indexes) { - indexes = baseFlatten(indexes); - - var result = baseAt(array, indexes); - basePullAt(array, indexes.sort(baseCompareAscending)); - return result; - }); - - /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * **Note:** Unlike `_.filter`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ - function remove(array, predicate, thisArg) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = getCallback(predicate, thisArg, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; - } - - /** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @alias tail - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.rest([1, 2, 3]); - * // => [2, 3] - */ - function rest(array) { - return drop(array, 1); - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of `Array#slice` to support node - * lists in IE < 9 and to ensure dense arrays are returned. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - return baseSlice(array, start, end); - } - - /** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. If an iteratee - * function is provided it is invoked for `value` and each element of `array` - * to compute their sort ranking. The iteratee is bound to `thisArg` and - * invoked with one argument; (value). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 4, 5, 5], 5); - * // => 2 - * - * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; - * - * // using an iteratee function - * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { - * return this.data[word]; - * }, dict); - * // => 1 - * - * // using the `_.property` callback shorthand - * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 1 - */ - var sortedIndex = createSortedIndex(); - - /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 4, 5, 5], 5); - * // => 4 - */ - var sortedLastIndex = createSortedIndex(true); - - /** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ - function take(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ - function takeRight(array, n, guard) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (guard ? isIterateeCall(array, n, guard) : n == null) { - n = 1; - } - n = length - (+n || 0); - return baseSlice(array, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is bound to `thisArg` - * and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRightWhile([1, 2, 3], function(n) { - * return n > 1; - * }); - * // => [2, 3] - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); - * // => ['pebbles'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); - * // => ['fred', 'pebbles'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeRightWhile(users, 'active'), 'user'); - * // => [] - */ - function takeRightWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) - : []; - } - - /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is bound to - * `thisArg` and invoked with three arguments: (value, index, array). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeWhile([1, 2, 3], function(n) { - * return n < 3; - * }); - * // => [1, 2] - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false}, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.takeWhile(users, 'active', false), 'user'); - * // => ['barney', 'fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.takeWhile(users, 'active'), 'user'); - * // => [] - */ - function takeWhile(array, predicate, thisArg) { - return (array && array.length) - ? baseWhile(array, getCallback(predicate, thisArg, 3)) - : []; - } - - /** - * Creates an array of unique values, in order, from all of the provided arrays - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([1, 2], [4, 2], [2, 1]); - * // => [1, 2, 4] - */ - var union = restParam(function(arrays) { - return baseUniq(baseFlatten(arrays, false, true)); - }); - - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it is invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - var callback = getCallback(); - if (!(iteratee == null && callback === baseCallback)) { - iteratee = callback(iteratee, thisArg, 3); - } - return (isSorted && getIndexOf() == baseIndexOf) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); - } - - /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - * - * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] - */ - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var index = -1, - length = 0; - - array = arrayFilter(array, function(group) { - if (isArrayLike(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - var result = Array(length); - while (++index < length) { - result[index] = arrayMap(array, baseProperty(index)); - } - return result; - } - - /** - * This method is like `_.unzip` except that it accepts an iteratee to specify - * how regrouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee] The function to combine regrouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] - * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] - */ - function unzipWith(array, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - var result = unzip(array); - if (iteratee == null) { - return result; - } - iteratee = bindCallback(iteratee, thisArg, 4); - return arrayMap(result, function(group) { - return arrayReduce(group, iteratee, undefined, true); - }); - } - - /** - * Creates an array excluding all provided values using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to filter. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.without([1, 2, 1, 3], 1, 2); - * // => [3] - */ - var without = restParam(function(array, values) { - return isArrayLike(array) - ? baseDifference(array, values) - : []; - }); - - /** - * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the provided arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xor([1, 2], [4, 2]); - * // => [1, 4] - */ - function xor() { - var index = -1, - length = arguments.length; - - while (++index < length) { - var array = arguments[index]; - if (isArrayLike(array)) { - var result = result - ? baseDifference(result, array).concat(baseDifference(array, result)) - : array; - } - } - return result ? baseUniq(result) : []; - } - - /** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements - * of the given arrays, and so on. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] - */ - var zip = restParam(unzip); - - /** - * The inverse of `_.pairs`; this method returns an object composed from arrays - * of property names and values. Provide either a single two dimensional array, - * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names - * and one of corresponding values. - * - * @static - * @memberOf _ - * @alias object - * @category Array - * @param {Array} props The property names. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } - * - * _.zipObject(['fred', 'barney'], [30, 40]); - * // => { 'fred': 30, 'barney': 40 } - */ - function zipObject(props, values) { - var index = -1, - length = props ? props.length : 0, - result = {}; - - if (length && !values && !isArray(props[0])) { - values = []; - } - while (++index < length) { - var key = props[index]; - if (values) { - result[key] = values[index]; - } else if (key) { - result[key[0]] = key[1]; - } - } - return result; - } - - /** - * This method is like `_.zip` except that it accepts an iteratee to specify - * how grouped values should be combined. The `iteratee` is bound to `thisArg` - * and invoked with four arguments: (accumulator, value, index, group). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee] The function to combine grouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], _.add); - * // => [111, 222] - */ - var zipWith = restParam(function(arrays) { - var length = arrays.length, - iteratee = length > 2 ? arrays[length - 2] : undefined, - thisArg = length > 1 ? arrays[length - 1] : undefined; - - if (length > 2 && typeof iteratee == 'function') { - length -= 2; - } else { - iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; - thisArg = undefined; - } - arrays.length = length; - return unzipWith(arrays, iteratee, thisArg); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object that wraps `value` with explicit method - * chaining enabled. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _.chain(users) - * .sortBy('age') - * .map(function(chr) { - * return chr.user + ' is ' + chr.age; - * }) - * .first() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor is - * bound to `thisArg` and invoked with one argument; (value). The purpose of - * this method is to "tap into" a method chain in order to perform operations - * on intermediate results within the chain. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor, thisArg) { - interceptor.call(thisArg, value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * - * @static - * @memberOf _ - * @category Chain - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @param {*} [thisArg] The `this` binding of `interceptor`. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor, thisArg) { - return interceptor.call(thisArg, value); - } - - /** - * Enables explicit method chaining on the wrapper object. - * - * @name chain - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // without explicit chaining - * _(users).first(); - * // => { 'user': 'barney', 'age': 36 } - * - * // with explicit chaining - * _(users).chain() - * .first() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chained sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapper = wrapper.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapper.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } - - /** - * Creates a clone of the chained sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapper = _(array).map(function(value) { - * return Math.pow(value, 2); - * }); - * - * var other = [3, 4]; - * var otherWrapper = wrapper.plant(other); - * - * otherWrapper.value(); - * // => [9, 16] - * - * wrapper.value(); - * // => [1, 4] - */ - function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; - } - - /** - * Reverses the wrapped array so the first element becomes the last, the - * second element becomes the second to last, and so on. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new reversed `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - if (this.__actions__.length) { - value = new LazyWrapper(this); - } - return new LodashWrapper(value.reverse(), this.__chain__); - } - return this.thru(function(value) { - return value.reverse(); - }); - } - - /** - * Produces the result of coercing the unwrapped value to a string. - * - * @name toString - * @memberOf _ - * @category Chain - * @returns {string} Returns the coerced string value. - * @example - * - * _([1, 2, 3]).toString(); - * // => '1,2,3' - */ - function wrapperToString() { - return (this.value() + ''); - } - - /** - * Executes the chained sequence to extract the unwrapped value. - * - * @name value - * @memberOf _ - * @alias run, toJSON, valueOf - * @category Chain - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements corresponding to the given keys, or indexes, - * of `collection`. Keys may be specified as individual arguments or as arrays - * of keys. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(number|number[]|string|string[])} [props] The property names - * or indexes of elements to pick, specified individually or in arrays. - * @returns {Array} Returns the new array of picked elements. - * @example - * - * _.at(['a', 'b', 'c'], [0, 2]); - * // => ['a', 'c'] - * - * _.at(['barney', 'fred', 'pebbles'], 0, 2); - * // => ['barney', 'pebbles'] - */ - var at = restParam(function(collection, props) { - return baseAt(collection, baseFlatten(props)); - }); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the number of times the key was returned by `iteratee`. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); - }); - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * The predicate is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = getCallback(predicate, thisArg, 3); - } - return func(collection, predicate); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias select - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.filter([4, 5, 6], function(n) { - * return n % 2 == 0; - * }); - * // => [4, 6] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.filter(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.filter(users, 'active'), 'user'); - * // => ['barney'] - */ - function filter(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getCallback(predicate, thisArg, 3); - return func(collection, predicate); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.result(_.find(users, function(chr) { - * return chr.age < 40; - * }), 'user'); - * // => 'barney' - * - * // using the `_.matches` callback shorthand - * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.result(_.find(users, 'active', false), 'user'); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.result(_.find(users, 'active'), 'user'); - * // => 'barney' - */ - var find = createFind(baseEach); - - /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ - var findLast = createFind(baseEachRight, true); - - /** - * Performs a deep comparison between each element in `collection` and the - * source object, returning the first element that has equivalent property - * values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); - * // => 'barney' - * - * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); - * // => 'fred' - */ - function findWhere(collection, source) { - return find(collection, baseMatches(source)); - } - - /** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ - var forEach = createForEach(arrayEach, baseEach); - - /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias eachRight - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEachRight(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from right to left and returns the array - */ - var forEachRight = createForEach(arrayEachRight, baseEachRight); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is an array of the elements responsible for generating the key. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using the `_.property` callback shorthand - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - result[key] = [value]; - } - }); - - /** - * Checks if `value` is in `collection` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ - function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (getIndexOf(collection, target, fromIndex) > -1); - } - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the last element responsible for generating the key. The - * iteratee function is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var keyData = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.indexBy(keyData, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return String.fromCharCode(object.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.indexBy(keyData, function(object) { - * return this.fromCharCode(object.code); - * }, String); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - */ - var indexBy = createAggregator(function(result, value, key) { - result[key] = value; - }); - - /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it is - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - var invoke = restParam(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - isProp = isKey(path), - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : null); - result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); - }); - return result; - }); - - /** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, - * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, - * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, - * `sum`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = getCallback(iteratee, thisArg, 3); - return func(collection, iteratee); - } - - /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, while the second of which - * contains elements `predicate` returns falsey for. The predicate is bound - * to `thisArg` and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * _.partition([1, 2, 3], function(n) { - * return n % 2; - * }); - * // => [[1, 3], [2]] - * - * _.partition([1.2, 2.3, 3.4], function(n) { - * return this.floor(n) % 2; - * }, Math); - * // => [[1.2, 3.4], [2.3]] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * var mapper = function(array) { - * return _.pluck(array, 'user'); - * }; - * - * // using the `_.matches` callback shorthand - * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); - * // => [['pebbles'], ['barney', 'fred']] - * - * // using the `_.matchesProperty` callback shorthand - * _.map(_.partition(users, 'active', false), mapper); - * // => [['barney', 'pebbles'], ['fred']] - * - * // using the `_.property` callback shorthand - * _.map(_.partition(users, 'active'), mapper); - * // => [['fred'], ['barney', 'pebbles']] - */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); - - /** - * Gets the property value of `path` from all elements in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|string} path The path of the property to pluck. - * @returns {Array} Returns the property values. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * _.pluck(users, 'user'); - * // => ['barney', 'fred'] - * - * var userIndex = _.indexBy(users, 'user'); - * _.pluck(userIndex, 'age'); - * // => [36, 40] (iteration order is not guaranteed) - */ - function pluck(collection, path) { - return map(collection, property(path)); - } - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not provided the first element of `collection` is used as the initial - * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `includes`, `merge`, `sortByAll`, and `sortByOrder` - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.reduce([1, 2], function(total, n) { - * return total + n; - * }); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) - */ - var reduce = createReduce(arrayReduce, baseEach); - - /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - var reduceRight = createReduce(arrayReduceRight, baseEachRight); - - /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Array} Returns the new filtered array. - * @example - * - * _.reject([1, 2, 3, 4], function(n) { - * return n % 2 == 0; - * }); - * // => [1, 3] - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * // using the `_.matches` callback shorthand - * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); - * // => ['barney'] - * - * // using the `_.matchesProperty` callback shorthand - * _.pluck(_.reject(users, 'active', false), 'user'); - * // => ['fred'] - * - * // using the `_.property` callback shorthand - * _.pluck(_.reject(users, 'active'), 'user'); - * // => ['barney'] - */ - function reject(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getCallback(predicate, thisArg, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); - } - - /** - * Gets a random element or `n` random elements from a collection. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to sample. - * @param {number} [n] The number of elements to sample. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {*} Returns the random sample(s). - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - * - * _.sample([1, 2, 3, 4], 2); - * // => [3, 1] - */ - function sample(collection, n, guard) { - if (guard ? isIterateeCall(collection, n, guard) : n == null) { - collection = toIterable(collection); - var length = collection.length; - return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; - } - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - - n = nativeMin(n < 0 ? 0 : (+n || 0), length); - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; - } - result.length = n; - return result; - } - - /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ - function shuffle(collection) { - return sample(collection, POSITIVE_INFINITY); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the size of `collection`. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - var length = collection ? getLength(collection) : 0; - return isLength(length) ? length : keys(collection).length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = getCallback(predicate, thisArg, 3); - } - return func(collection, predicate); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ - function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; - } - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - var index = -1; - iteratee = getCallback(iteratee, thisArg, 3); - - var result = baseMap(collection, function(value, key, collection) { - return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; - }); - return baseSortBy(result, compareAscending); - } - - /** - * This method is like `_.sortBy` except that it can sort by multiple iteratees - * or property names. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees - * The iteratees to sort by, specified as individual values or arrays of values. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.map(_.sortByAll(users, ['user', 'age']), _.values); - * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] - * - * _.map(_.sortByAll(users, 'user', function(chr) { - * return Math.floor(chr.age / 10); - * }), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - var sortByAll = restParam(function(collection, iteratees) { - if (collection == null) { - return []; - } - var guard = iteratees[2]; - if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { - iteratees.length = 1; - } - return baseSortByOrder(collection, baseFlatten(iteratees), []); - }); - - /** - * This method is like `_.sortByAll` except that it allows specifying the - * sort orders of the iteratees to sort by. A truthy value in `orders` will - * sort the corresponding property name in ascending order while a falsey - * value will sort it in descending order. - * - * If a property name is provided for an iteratee the created `_.property` - * style callback returns the property value of the given element. - * - * If an object is provided for an iteratee the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {boolean[]} orders The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); - * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - function sortByOrder(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (guard && isIterateeCall(iteratees, orders, guard)) { - orders = null; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseSortByOrder(collection, iteratees, orders); - } - - /** - * Performs a deep comparison between each element in `collection` and the - * source object, returning an array of all elements that have equivalent - * property values. - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. For comparing a single - * own or inherited property value see `_.matchesProperty`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Object} source The object of property values to match. - * @returns {Array} Returns the new filtered array. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, - * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } - * ]; - * - * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); - * // => ['barney'] - * - * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); - * // => ['fred'] - */ - function where(collection, source) { - return filter(collection, baseMatches(source)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Gets the number of milliseconds that have elapsed since the Unix epoch - * (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @category Date - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => logs the number of milliseconds it took for the deferred function to be invoked - */ - var now = nativeNow || function() { - return new Date().getTime(); - }; - - /*------------------------------------------------------------------------*/ - - /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it is called `n` or more times. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => logs 'done saving!' after the two async saves have completed - */ - function after(n, func) { - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - n = nativeIsFinite(n = +n) ? n : 0; - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that accepts up to `n` arguments ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ - function ary(func, n, guard) { - if (guard && isIterateeCall(func, n, guard)) { - n = null; - } - n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); - return createWrapper(func, ARY_FLAG, null, null, null, null, n); - } - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery('#add').on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = null; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind` this method does not set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var greet = function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * }; - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // using placeholders - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = restParam(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(func, bitmask, thisArg, partials, holders); - }); - - /** - * Binds methods of an object to the object itself, overwriting the existing - * method. Method names may be specified as individual arguments or as arrays - * of method names. If no method names are provided all enumerable function - * properties, own and inherited, of `object` are bound. - * - * **Note:** This method does not set the "length" property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} [methodNames] The object method names to bind, - * specified as individual method names or arrays of method names. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'onClick': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view); - * jQuery('#docs').on('click', view.onClick); - * // => logs 'clicked docs' when the element is clicked - */ - var bindAll = restParam(function(object, methodNames) { - methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); - - var index = -1, - length = methodNames.length; - - while (++index < length) { - var key = methodNames[index]; - object[key] = createWrapper(object[key], BIND_FLAG, object); - } - return object; - }); - - /** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. - * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Object} object The object the method belongs to. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // using placeholders - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ - var bindKey = restParam(function(object, key, partials) { - var bitmask = BIND_FLAG | BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bindKey.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(key, bitmask, object, partials, holders); - }); - - /** - * Creates a function that accepts one or more arguments of `func` that when - * called either invokes `func` returning its result, if all `func` arguments - * have been provided, or returns a function that accepts one or more of the - * remaining `func` arguments, and so on. The arity of `func` may be specified - * if `func.length` is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ - var curry = createCurry(CURRY_FLAG); - - /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method does not set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // using placeholders - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ - var curryRight = createCurry(CURRY_RIGHT_FLAG); - - /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the debounced function return the result of the last - * `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=false] Specify invoking on the leading - * edge of the timeout. - * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it is invoked. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // avoid costly calculations while the window size is in flux - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // invoke `sendMail` when the click event is fired, debouncing subsequent calls - * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // ensure `batchLog` is invoked once after 1 second of debounced calls - * var source = new EventSource('/stream'); - * jQuery(source).on('message', _.debounce(batchLog, 250, { - * 'maxWait': 1000 - * })); - * - * // cancel a debounced call - * var todoChanges = _.debounce(batchLog, 1000); - * Object.observe(models.todo, todoChanges); - * - * Object.observe(models, function(changes) { - * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { - * todoChanges.cancel(); - * } - * }, ['delete']); - * - * // ...at some point `models.todo` is changed - * models.todo.completed = true; - * - * // ...before 1 second has passed `models.todo` is deleted - * // which cancels the debounced `todoChanges` call - * delete models.todo; - */ - function debounce(func, wait, options) { - var args, - maxTimeoutId, - result, - stamp, - thisArg, - timeoutId, - trailingCall, - lastCalled = 0, - maxWait = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = wait < 0 ? 0 : (+wait || 0); - if (options === true) { - var leading = true; - trailing = false; - } else if (isObject(options)) { - leading = options.leading; - maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? options.trailing : trailing; - } - - function cancel() { - if (timeoutId) { - clearTimeout(timeoutId); - } - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - } - - function delayed() { - var remaining = wait - (now() - stamp); - if (remaining <= 0 || remaining > wait) { - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - var isCalled = trailingCall; - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } else { - timeoutId = setTimeout(delayed, remaining); - } - } - - function maxDelayed() { - if (timeoutId) { - clearTimeout(timeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (trailing || (maxWait !== wait)) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } - } - - function debounced() { - args = arguments; - stamp = now(); - thisArg = this; - trailingCall = trailing && (timeoutId || !leading); - - if (maxWait === false) { - var leadingCall = leading && !timeoutId; - } else { - if (!maxTimeoutId && !leading) { - lastCalled = stamp; - } - var remaining = maxWait - (stamp - lastCalled), - isCalled = remaining <= 0 || remaining > maxWait; - - if (isCalled) { - if (maxTimeoutId) { - maxTimeoutId = clearTimeout(maxTimeoutId); - } - lastCalled = stamp; - result = func.apply(thisArg, args); - } - else if (!maxTimeoutId) { - maxTimeoutId = setTimeout(maxDelayed, remaining); - } - } - if (isCalled && timeoutId) { - timeoutId = clearTimeout(timeoutId); - } - else if (!timeoutId && wait !== maxWait) { - timeoutId = setTimeout(delayed, wait); - } - if (leadingCall) { - isCalled = true; - result = func.apply(thisArg, args); - } - if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - return result; - } - debounced.cancel = cancel; - return debounced; - } - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // logs 'deferred' after one or more milliseconds - */ - var defer = restParam(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke the function with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => logs 'later' after one second - */ - var delay = restParam(function(func, wait, args) { - return baseDelay(func, wait, args); - }); - - /** - * Creates a function that returns the result of invoking the provided - * functions with the `this` binding of the created function, where each - * successive invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow(_.add, square); - * addSquare(1, 2); - * // => 9 - */ - var flow = createFlow(); - - /** - * This method is like `_.flow` except that it creates a function that - * invokes the provided functions from right to left. - * - * @static - * @memberOf _ - * @alias backflow, compose - * @category Function - * @param {...Function} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight(square, _.add); - * addSquare(1, 2); - * // => 9 - */ - var flowRight = createFlow(true); - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `func` is invoked with the `this` binding of the memoized - * function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * method interface of `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var upperCase = _.memoize(function(string) { - * return string.toUpperCase(); - * }); - * - * upperCase('fred'); - * // => 'FRED' - * - * // modifying the result cache - * upperCase.cache.set('fred', 'BARNEY'); - * upperCase('fred'); - * // => 'BARNEY' - * - * // replacing `_.memoize.Cache` - * var object = { 'user': 'fred' }; - * var other = { 'user': 'barney' }; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'fred' } - * - * _.memoize.Cache = WeakMap; - * var identity = _.memoize(_.identity); - * - * identity(object); - * // => { 'user': 'fred' } - * identity(other); - * // => { 'user': 'barney' } - */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new memoize.Cache; - return memoized; - } - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - return !predicate.apply(this, arguments); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first call. The `func` is invoked - * with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` invokes `createApplication` once - */ - function once(func) { - return before(2, func); - } - - /** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // using placeholders - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ - var partial = createPartial(PARTIAL_FLAG); - - /** - * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method does not set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { - * return greeting + ' ' + name; - * }; - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // using placeholders - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ - var partialRight = createPartial(PARTIAL_RIGHT_FLAG); - - /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes, - * specified as individual indexes or arrays of indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, 2, 0, 1); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - * - * var map = _.rearg(_.map, [1, 0]); - * map(function(n) { - * return n * 3; - * }, [1, 2, 3]); - * // => [3, 6, 9] - */ - var rearg = restParam(function(func, indexes) { - return createWrapper(func, REARG_FLAG, null, null, null, baseFlatten(indexes)); - }); - - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of the created - * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). - * - * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to spread arguments over. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * // with a Promise - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ - function spread(func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function(array) { - return func.apply(this, array); - }; - } - - /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed invocations. Provide an options object to indicate - * that `func` should be invoked on the leading and/or trailing edge of the - * `wait` timeout. Subsequent calls to the throttled function return the - * result of the last `func` call. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=true] Specify invoking on the leading - * edge of the timeout. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // avoid excessively updating the position while scrolling - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes - * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { - * 'trailing': false - * })); - * - * // cancel a trailing throttled call - * jQuery(window).on('popstate', throttled.cancel); - */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (options === false) { - leading = false; - } else if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - debounceOptions.leading = leading; - debounceOptions.maxWait = +wait; - debounceOptions.trailing = trailing; - return debounce(func, wait, debounceOptions); - } - - /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {*} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

    ' + func(text) + '

    '; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

    fred, barney, & pebbles

    ' - */ - function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return createWrapper(wrapper, PARTIAL_FLAG, null, [value], []); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, - * otherwise they are assigned by reference. If `customizer` is provided it is - * invoked to produce the cloned values. If `customizer` returns `undefined` - * cloning is handled by the method instead. The `customizer` is bound to - * `thisArg` and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var shallow = _.clone(users); - * shallow[0] === users[0]; - * // => true - * - * var deep = _.clone(users, true); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.clone(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 0 - */ - function clone(value, isDeep, customizer, thisArg) { - if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { - isDeep = false; - } - else if (typeof isDeep == 'function') { - thisArg = customizer; - customizer = isDeep; - isDeep = false; - } - return typeof customizer == 'function' - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) - : baseClone(value, isDeep); - } - - /** - * Creates a deep clone of `value`. If `customizer` is provided it is invoked - * to produce the cloned values. If `customizer` returns `undefined` cloning - * is handled by the method instead. The `customizer` is bound to `thisArg` - * and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the deep cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var deep = _.cloneDeep(users); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.cloneDeep(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 20 - */ - function cloneDeep(value, customizer, thisArg) { - return typeof customizer == 'function' - ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) - : baseClone(value, true); - } - - /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - function gt(value, other) { - return value > other; - } - - /** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ - function gte(value, other) { - return value >= other; - } - - /** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag; - } - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ - var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; - }; - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); - } - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - function isDate(value) { - return isObjectLike(value) && objToString.call(value) == dateTag; - } - - /** - * Checks if `value` is a DOM element. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ - function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && - (objToString.call(value).indexOf('Element') > -1); - } - // Fallback for environments without DOM support. - if (!support.dom) { - isElement = function(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); - }; - } - - /** - * Checks if `value` is empty. A value is considered empty unless it is an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !value.length; - } - return !keys(value).length; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. If `customizer` is provided it is invoked to compare values. - * If `customizer` returns `undefined` comparisons are handled by the method - * instead. The `customizer` is bound to `thisArg` and invoked with three - * arguments: (value, other [, index|key]). - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. Functions and DOM nodes - * are **not** supported. Provide a customizer function to extend support - * for comparing other values. - * - * @static - * @memberOf _ - * @alias eq - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize value comparisons. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * object == other; - * // => false - * - * _.isEqual(object, other); - * // => true - * - * // using a customizer callback - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqual(array, other, function(value, other) { - * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { - * return true; - * } - * }); - * // => true - */ - function isEqual(value, other, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; - } - - /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ - function isError(value) { - return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on [`Number.isFinite`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(10); - * // => true - * - * _.isFinite('10'); - * // => false - * - * _.isFinite(true); - * // => false - * - * _.isFinite(Object(10)); - * // => false - * - * _.isFinite(Infinity); - * // => false - */ - var isFinite = nativeNumIsFinite || function(value) { - return typeof value == 'number' && nativeIsFinite(value); - }; - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return objToString.call(value) == funcTag; - }; - - /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); - } - - /** - * Performs a deep comparison between `object` and `source` to determine if - * `object` contains equivalent property values. If `customizer` is provided - * it is invoked to compare values. If `customizer` returns `undefined` - * comparisons are handled by the method instead. The `customizer` is bound - * to `thisArg` and invoked with three arguments: (value, other, index|key). - * - * **Note:** This method supports comparing properties of arrays, booleans, - * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions - * and DOM nodes are **not** supported. Provide a customizer function to extend - * support for comparing other values. - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize value comparisons. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.isMatch(object, { 'age': 40 }); - * // => true - * - * _.isMatch(object, { 'age': 36 }); - * // => false - * - * // using a customizer callback - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatch(object, source, function(value, other) { - * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; - * }); - * // => true - */ - function isMatch(object, source, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; - return baseIsMatch(object, getMatchData(source), customizer); - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) - * which returns `true` for `undefined` and other non-numeric values. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some host objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ - function isNative(value) { - if (value == null) { - return false; - } - if (objToString.call(value) == funcTag) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(8.4); - * // => true - * - * _.isNumber(NaN); - * // => true - * - * _.isNumber('8.4'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); - } - - /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ - var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && objToString.call(value) == objectTag)) { - return false; - } - var valueOf = getNative(value, 'valueOf'), - objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? (value == objProto || getPrototypeOf(value) == objProto) - : shimIsPlainObject(value); - }; - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - function isRegExp(value) { - return isObjectLike(value) && objToString.call(value) == regexpTag; - } - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); - } - - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ - function lt(value, other) { - return value < other; - } - - /** - * Checks if `value` is less than or equal to `other`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. - * @example - * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false - */ - function lte(value, other) { - return value <= other; - } - - /** - * Converts `value` to an array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * (function() { - * return _.toArray(arguments).slice(1); - * }(1, 2, 3)); - * // => [2, 3] - */ - function toArray(value) { - var length = value ? getLength(value) : 0; - if (!isLength(length)) { - return values(value); - } - if (!length) { - return []; - } - return arrayCopy(value); - } - - /** - * Converts `value` to a plain object flattening inherited enumerable - * properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ - function toPlainObject(value) { - return baseCopy(value, keysIn(value)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it is invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * **Note:** This method mutates `object` and is based on - * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return _.isUndefined(value) ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ - var assign = createAssigner(function(object, source, customizer) { - return customizer - ? assignWith(object, source, customizer) - : baseAssign(object, source); - }); - - /** - * Creates an object that inherits from the given `prototype` object. If a - * `properties` object is provided its own enumerable properties are assigned - * to the created object. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties, guard) { - var result = baseCreate(prototype); - if (guard && isIterateeCall(prototype, properties, guard)) { - properties = null; - } - return properties ? baseAssign(result, properties) : result; - } - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ - var defaults = restParam(function(args) { - var object = args[0]; - if (object == null) { - return object; - } - args.push(assignDefaults); - return assign.apply(undefined, args); - }); - - /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(chr) { - * return chr.age < 40; - * }); - * // => 'barney' (iteration order is not guaranteed) - * - * // using the `_.matches` callback shorthand - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.findKey(users, 'active', false); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.findKey(users, 'active'); - * // => 'barney' - */ - var findKey = createFindKey(baseForOwn); - - /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(chr) { - * return chr.age < 40; - * }); - * // => returns `pebbles` assuming `_.findKey` returns `barney` - * - * // using the `_.matches` callback shorthand - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // using the `_.matchesProperty` callback shorthand - * _.findLastKey(users, 'active', false); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ - var findLastKey = createFindKey(baseForOwnRight); - - /** - * Iterates over own and inherited enumerable properties of an object invoking - * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) - */ - var forIn = createForIn(baseFor); - - /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' - */ - var forInRight = createForIn(baseForRight); - - /** - * Iterates over own enumerable properties of an object invoking `iteratee` - * for each property. The `iteratee` is bound to `thisArg` and invoked with - * three arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'a' and 'b' (iteration order is not guaranteed) - */ - var forOwn = createForOwn(baseForOwn); - - /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' - */ - var forOwnRight = createForOwn(baseForOwnRight); - - /** - * Creates an array of function property names from all enumerable properties, - * own and inherited, of `object`. - * - * @static - * @memberOf _ - * @alias methods - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * _.functions(_); - * // => ['after', 'ary', 'assign', ...] - */ - function functions(object) { - return baseFunctions(object, keysIn(object)); - } - - /** - * Gets the property value at `path` of `object`. If the resolved value is - * `undefined` the `defaultValue` is used in its place. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); - return result === undefined ? defaultValue : result; - } - - /** - * Checks if `path` is a direct property. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - */ - function has(object, path) { - if (object == null) { - return false; - } - var result = hasOwnProperty.call(object, path); - if (!result && !isKey(path)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - path = last(path); - result = hasOwnProperty.call(object, path); - } - return result || (isLength(object.length) && isIndex(path, object.length) && - (isArray(object) || isArguments(object))); - } - - /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite property - * assignments of previous values unless `multiValue` is `true`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to invert. - * @param {boolean} [multiValue] Allow multiple values per key. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - * - * // with `multiValue` - * _.invert(object, true); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ - function invert(object, multiValue, guard) { - if (guard && isIterateeCall(object, multiValue, guard)) { - multiValue = null; - } - var index = -1, - props = keys(object), - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index], - value = object[key]; - - if (multiValue) { - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - else { - result[value] = key; - } - } - return result; - } - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? null : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; - }; - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } - - /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * property of `object` through `iteratee`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the new mapped object. - * @example - * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } - */ - var mapKeys = createObjectMapper(true); - - /** - * Creates an object with the same keys as `object` and values generated by - * running each own enumerable property of `object` through `iteratee`. The - * iteratee function is bound to `thisArg` and invoked with three arguments: - * (value, key, object). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the new mapped object. - * @example - * - * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { - * return n * 3; - * }); - * // => { 'a': 3, 'b': 6 } - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * // using the `_.property` callback shorthand - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ - var mapValues = createObjectMapper(); - - /** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined` into the destination object. Subsequent sources - * overwrite property assignments of previous sources. If `customizer` is - * provided it is invoked to produce the merged values of the destination and - * source properties. If `customizer` returns `undefined` merging is handled - * by the method instead. The `customizer` is bound to `thisArg` and invoked - * with five arguments: (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] - * }; - * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] - * }; - * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } - * - * // using a customizer callback - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, function(a, b) { - * if (_.isArray(a)) { - * return a.concat(b); - * } - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ - var merge = createAssigner(baseMerge); - - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that are not omitted. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to omit, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.omit(object, 'age'); - * // => { 'user': 'fred' } - * - * _.omit(object, _.isNumber); - * // => { 'user': 'fred' } - */ - var omit = restParam(function(object, props) { - if (object == null) { - return {}; - } - if (typeof props[0] != 'function') { - var props = arrayMap(baseFlatten(props), String); - return pickByArray(object, baseDifference(keysIn(object), props)); - } - var predicate = bindCallback(props[0], props[1], 3); - return pickByCallback(object, function(value, key, object) { - return !predicate(value, key, object); - }); - }); - - /** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example - * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) - */ - function pairs(object) { - object = toObject(object); - - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; - } - - /** - * Creates an object composed of the picked `object` properties. Property - * names may be specified as individual arguments or as arrays of property - * names. If `predicate` is provided it is invoked for each property of `object` - * picking the properties `predicate` returns truthy for. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to pick, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.pick(object, 'user'); - * // => { 'user': 'fred' } - * - * _.pick(object, _.isString); - * // => { 'user': 'fred' } - */ - var pick = restParam(function(object, props) { - if (object == null) { - return {}; - } - return typeof props[0] == 'function' - ? pickByCallback(object, bindCallback(props[0], props[1], 3)) - : pickByArray(object, baseFlatten(props)); - }); - - /** - * This method is like `_.get` except that if the resolved value is a function - * it is invoked with the `this` binding of its parent object and its result - * is returned. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a.b.c', 'default'); - * // => 'default' - * - * _.result(object, 'a.b.c', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - var result = object == null ? undefined : object[path]; - if (result === undefined) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - result = object == null ? undefined : object[last(path)]; - } - result = result === undefined ? defaultValue : result; - } - return isFunction(result) ? result.call(object) : result; - } - - /** - * Sets the property value of `path` on `object`. If a portion of `path` - * does not exist it is created. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to augment. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, 'x[0].y.z', 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - if (object == null) { - return object; - } - var pathKey = (path + ''); - path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = path[index]; - if (isObject(nested)) { - if (index == lastIndex) { - nested[key] = value; - } else if (nested[key] == null) { - nested[key] = isIndex(path[index + 1]) ? [] : {}; - } - } - nested = nested[key]; - } - return object; - } - - /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own enumerable - * properties through `iteratee`, with each invocation potentially mutating - * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Array|Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { - * result[key] = n * 3; - * }); - * // => { 'a': 3, 'b': 6 } - */ - function transform(object, iteratee, accumulator, thisArg) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = getCallback(iteratee, thisArg, 4); - - if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : null); - } - } else { - accumulator = {}; - } - } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; - } - - /** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return baseValues(object, keys(object)); - } - - /** - * Creates an array of the own and inherited enumerable property values - * of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) - */ - function valuesIn(object) { - return baseValues(object, keysIn(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Checks if `n` is between `start` and up to but not including, `end`. If - * `end` is not specified it is set to `start` with `start` then set to `0`. - * - * @static - * @memberOf _ - * @category Number - * @param {number} n The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `n` is in the range, else `false`. - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - */ - function inRange(value, start, end) { - start = +start || 0; - if (typeof end === 'undefined') { - end = start; - start = 0; - } else { - end = +end || 0; - } - return value >= nativeMin(start, end) && value < nativeMax(start, end); - } - - /** - * Produces a random number between `min` and `max` (inclusive). If only one - * argument is provided a number between `0` and the given number is returned. - * If `floating` is `true`, or either `min` or `max` are floats, a floating-point - * number is returned instead of an integer. - * - * @static - * @memberOf _ - * @category Number - * @param {number} [min=0] The minimum possible value. - * @param {number} [max=1] The maximum possible value. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. - * @example - * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 - * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 - */ - function random(min, max, floating) { - if (floating && isIterateeCall(min, max, floating)) { - max = floating = null; - } - var noMin = min == null, - noMax = max == null; - - if (floating == null) { - if (noMax && typeof min == 'boolean') { - floating = min; - min = 1; - } - else if (typeof max == 'boolean') { - floating = max; - noMax = true; - } - } - if (noMin && noMax) { - max = 1; - noMax = false; - } - min = +min || 0; - if (noMax) { - max = min; - min = 0; - } else { - max = +max || 0; - } - if (floating || min % 1 || max % 1) { - var rand = nativeRandom(); - return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); - } - return baseRandom(min, max); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar'); - * // => 'fooBar' - * - * _.camelCase('__foo_bar__'); - * // => 'fooBar' - */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); - }); - - /** - * Capitalizes the first character of `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('fred'); - * // => 'Fred' - */ - function capitalize(string) { - string = baseToString(string); - return string && (string.charAt(0).toUpperCase() + string.slice(1)); - } - - /** - * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ - function deburr(string) { - string = baseToString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); - } - - /** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to search. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. - * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ - function endsWith(string, target, position) { - string = baseToString(string); - target = (target + ''); - - var length = string.length; - position = position === undefined - ? length - : nativeMin(position < 0 ? 0 : (+position || 0), length); - - position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; - } - - /** - * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to - * their corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional characters - * use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. - * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in Internet Explorer < 9, they can break out - * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. - * - * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) - * to reduce XSS vectors. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - // Reset `lastIndex` because in IE < 9 `String#replace` does not. - string = baseToString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' - */ - function escapeRegExp(string) { - string = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; - } - - /** - * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__foo_bar__'); - * // => 'foo-bar' - */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); - - /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.pad('abc', 8); - * // => ' abc ' - * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' - * - * _.pad('abc', 3); - * // => 'abc' - */ - function pad(string, length, chars) { - string = baseToString(string); - length = +length; - - var strLength = string.length; - if (strLength >= length || !nativeIsFinite(length)) { - return string; - } - var mid = (length - strLength) / 2, - leftLength = floor(mid), - rightLength = ceil(mid); - - chars = createPadding('', rightLength, chars); - return chars.slice(0, leftLength) + string + chars; - } - - /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padLeft('abc', 6); - * // => ' abc' - * - * _.padLeft('abc', 6, '_-'); - * // => '_-_abc' - * - * _.padLeft('abc', 3); - * // => 'abc' - */ - var padLeft = createPadDir(); - - /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padRight('abc', 6); - * // => 'abc ' - * - * _.padRight('abc', 6, '_-'); - * // => 'abc_-_' - * - * _.padRight('abc', 3); - * // => 'abc' - */ - var padRight = createPadDir(true); - - /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, - * in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) - * of `parseInt`. - * - * @static - * @memberOf _ - * @category String - * @param {string} string The string to convert. - * @param {number} [radix] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {number} Returns the converted integer. - * @example - * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] - */ - function parseInt(string, radix, guard) { - if (guard && isIterateeCall(string, radix, guard)) { - radix = 0; - } - return nativeParseInt(string, radix); - } - // Fallback for environments with pre-ES5 implementations. - if (nativeParseInt(whitespace + '08') != 8) { - parseInt = function(string, radix, guard) { - // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. - // Chrome fails to trim leading whitespace characters. - // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. - if (guard ? isIterateeCall(string, radix, guard) : radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - string = trim(string); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); - }; - } - - /** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ - function repeat(string, n) { - var result = ''; - string = baseToString(string); - n = +n; - if (n < 1 || !string || !nativeIsFinite(n)) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = floor(n / 2); - string += string; - } while (n); - - return result; - } - - /** - * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. - * @example - * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--foo-bar'); - * // => 'foo_bar' - */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); - }); - - /** - * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' - * - * _.startCase('__foo_bar__'); - * // => 'Foo Bar' - */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); - }); - - /** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to search. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ - function startsWith(string, target, position) { - string = baseToString(string); - position = position == null - ? 0 - : nativeMin(position < 0 ? 0 : (+position || 0), string.length); - - return string.lastIndexOf(target, position) == position; - } - - /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is provided it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as free variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. - * @param {string} [options.variable] The data object variable name. - * @param- {Object} [otherOptions] Enables the legacy `options` param signature. - * @returns {Function} Returns the compiled template function. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // using the HTML "escape" delimiter to escape data property values - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' - - - - -
    {{ "%+010d"|sprintf:-123 }}
    -
    {{ "%+010d"|vsprintf:[-123] }}
    -
    {{ "%+010d"|fmt:-123 }}
    -
    {{ "%+010d"|vfmt:[-123] }}
    -
    {{ "I've got %2$d apples and %1$d oranges."|fmt:4:2 }}
    -
    {{ "I've got %(apples)d apples and %(oranges)d oranges."|fmt:{apples: 2, oranges: 4} }}
    - - - - diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.js deleted file mode 100644 index d5bcd097f0e5a8..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ - -!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[dief]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fiosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); -//# sourceMappingURL=sprintf.min.map \ No newline at end of file diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.map b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.map deleted file mode 100644 index 33fe1636d58e47..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/sprintf.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAaN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WAoJjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GA1KtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,YACNC,OAAQ,WACRC,YAAa,wFACbxB,IAAK,sBACLyB,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV5B,GAAQM,OAAS,SAASuB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYjC,EAASqB,EAAWG,IACd,WAAdS,EACAC,E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AAc7C,EAAGO,aAAakC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWvB,QAAUyB,EAAY,GAUxD/B,EAAM,GAAK6B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIhB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpCyB,EAAOA,EAAKL,UAAUpB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIqC,GAAW,SAASR,EAAK5B,EAAMqC,GAG/B,MAFAA,IAASrC,OAAYjB,MAAM,GAC3BsD,EAAMC,OAAO,EAAG,EAAGV,GACZ1D,EAAQqE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQtE,QAAUA,EAClBsE,QAAQJ,SAAWA,IAGnBnE,EAAOC,QAAUA,EACjBD,EAAOmE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACIvE,QAASA,EACTkE,SAAUA,OAKT,mBAAXnE,QAAyB0E,KAAO1E"} \ No newline at end of file diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/gruntfile.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/gruntfile.js deleted file mode 100644 index 246e1c3b9801fc..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/gruntfile.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON("package.json"), - - uglify: { - options: { - banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n", - sourceMap: true - }, - build: { - files: [ - { - src: "src/sprintf.js", - dest: "dist/sprintf.min.js" - }, - { - src: "src/angular-sprintf.js", - dest: "dist/angular-sprintf.min.js" - } - ] - } - }, - - watch: { - js: { - files: "src/*.js", - tasks: ["uglify"] - } - } - }) - - grunt.loadNpmTasks("grunt-contrib-uglify") - grunt.loadNpmTasks("grunt-contrib-watch") - - grunt.registerTask("default", ["uglify", "watch"]) -} diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/package.json b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/package.json deleted file mode 100644 index 64e267c719a6bf..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "sprintf-js", - "version": "1.0.2", - "description": "JavaScript sprintf implementation", - "author": { - "name": "Alexandru Marasteanu", - "email": "hello@alexei.ro", - "url": "http://alexei.ro/" - }, - "main": "src/sprintf.js", - "scripts": { - "test": "mocha test/test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alexei/sprintf.js.git" - }, - "license": "BSD-3-Clause", - "devDependencies": { - "mocha": "*", - "grunt": "*", - "grunt-contrib-watch": "*", - "grunt-contrib-uglify": "*" - }, - "gitHead": "e8c73065cd1a79a32c697806a4e85f1fe7917592", - "bugs": { - "url": "https://github.com/alexei/sprintf.js/issues" - }, - "homepage": "https://github.com/alexei/sprintf.js", - "_id": "sprintf-js@1.0.2", - "_shasum": "11e4d84ff32144e35b0bf3a66f8587f38d8f9978", - "_from": "sprintf-js@>=1.0.2 <1.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "alexei", - "email": "hello@alexei.ro" - }, - "maintainers": [ - { - "name": "alexei", - "email": "hello@alexei.ro" - } - ], - "dist": { - "shasum": "11e4d84ff32144e35b0bf3a66f8587f38d8f9978", - "tarball": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/test/test.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/test/test.js deleted file mode 100644 index 1717d8fd09684b..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/test/test.js +++ /dev/null @@ -1,72 +0,0 @@ -var assert = require("assert"), - sprintfjs = require("../src/sprintf.js"), - sprintf = sprintfjs.sprintf, - vsprintf = sprintfjs.vsprintf - -describe("sprintfjs", function() { - it("should return formated strings for simple placeholders", function() { - assert.equal("%", sprintf("%%")) - assert.equal("10", sprintf("%b", 2)) - assert.equal("A", sprintf("%c", 65)) - assert.equal("2", sprintf("%d", 2)) - assert.equal("2", sprintf("%i", 2)) - assert.equal("2", sprintf("%d", "2")) - assert.equal("2", sprintf("%i", "2")) - assert.equal("2e+0", sprintf("%e", 2)) - assert.equal("2", sprintf("%u", 2)) - assert.equal("4294967294", sprintf("%u", -2)) - assert.equal("2.2", sprintf("%f", 2.2)) - assert.equal("10", sprintf("%o", 8)) - assert.equal("%s", sprintf("%s", "%s")) - assert.equal("ff", sprintf("%x", 255)) - assert.equal("FF", sprintf("%X", 255)) - assert.equal("Polly wants a cracker", sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants")) - assert.equal("Hello world!", sprintf("Hello %(who)s!", {"who": "world"})) - }) - - it("should return formated strings for complex placeholders", function() { - // sign - assert.equal("2", sprintf("%d", 2)) - assert.equal("-2", sprintf("%d", -2)) - assert.equal("+2", sprintf("%+d", 2)) - assert.equal("-2", sprintf("%+d", -2)) - assert.equal("2", sprintf("%i", 2)) - assert.equal("-2", sprintf("%i", -2)) - assert.equal("+2", sprintf("%+i", 2)) - assert.equal("-2", sprintf("%+i", -2)) - assert.equal("2.2", sprintf("%f", 2.2)) - assert.equal("-2.2", sprintf("%f", -2.2)) - assert.equal("+2.2", sprintf("%+f", 2.2)) - assert.equal("-2.2", sprintf("%+f", -2.2)) - assert.equal("-2.3", sprintf("%+.1f", -2.34)) - assert.equal("-0.0", sprintf("%+.1f", -0.01)) - assert.equal("-000000123", sprintf("%+010d", -123)) - assert.equal("______-123", sprintf("%+'_10d", -123)) - assert.equal("-234.34 123.2", sprintf("%f %f", -234.34, 123.2)) - - // padding - assert.equal("-0002", sprintf("%05d", -2)) - assert.equal("-0002", sprintf("%05i", -2)) - assert.equal(" <", sprintf("%5s", "<")) - assert.equal("0000<", sprintf("%05s", "<")) - assert.equal("____<", sprintf("%'_5s", "<")) - assert.equal("> ", sprintf("%-5s", ">")) - assert.equal(">0000", sprintf("%0-5s", ">")) - assert.equal(">____", sprintf("%'_-5s", ">")) - assert.equal("xxxxxx", sprintf("%5s", "xxxxxx")) - assert.equal("1234", sprintf("%02u", 1234)) - assert.equal(" -10.235", sprintf("%8.3f", -10.23456)) - assert.equal("-12.34 xxx", sprintf("%f %s", -12.34, "xxx")) - - // precision - assert.equal("2.3", sprintf("%.1f", 2.345)) - assert.equal("xxxxx", sprintf("%5.5s", "xxxxxx")) - assert.equal(" x", sprintf("%5.1s", "xxxxxx")) - - }) - - it("should return formated strings for callbacks", function() { - assert.equal("foobar", sprintf("%s", function() { return "foobar" })) - assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass... - }) -}) diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/package.json b/tools/eslint/node_modules/js-yaml/node_modules/argparse/package.json deleted file mode 100644 index 3c1b7fd712bbcc..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "argparse", - "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "version": "1.0.2", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "homepage": "https://github.com/nodeca/argparse", - "contributors": [ - { - "name": "Eugene Shkuropat" - }, - { - "name": "Paul Jacobson" - } - ], - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/nodeca/argparse.git" - }, - "main": "./index.js", - "scripts": { - "test": "make test" - }, - "dependencies": { - "lodash": ">= 3.2.0 < 4.0.0", - "sprintf-js": "~1.0.2" - }, - "devDependencies": { - "mocha": "*" - }, - "gitHead": "990f1b5332e70dd3c1c437d2f4077a2b63ac9674", - "_id": "argparse@1.0.2", - "_shasum": "bcfae39059656d1973d0b9e6a1a74154b5a9a136", - "_from": "argparse@>=1.0.2 <1.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - }, - "maintainers": [ - { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - } - ], - "dist": { - "shasum": "bcfae39059656d1973d0b9e6a1a74154b5a9a136", - "tarball": "http://registry.npmjs.org/argparse/-/argparse-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/ChangeLog b/tools/eslint/node_modules/js-yaml/node_modules/esprima/ChangeLog deleted file mode 100644 index 72d64b5d813cf5..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/ChangeLog +++ /dev/null @@ -1,111 +0,0 @@ -2015-04-17: Version 2.2.0 - - * Support ES6 import and export declarations (issue 1000) - * Fix line terminator before arrow not recognized as error (issue 1009) - * Support ES6 destructuring (issue 1045) - * Support ES6 template literal (issue 1074) - * Fix the handling of invalid/incomplete string escape sequences (issue 1106) - * Fix ES3 static member access restriction (issue 1120) - * Support for `super` in ES6 class (issue 1147) - -2015-03-09: Version 2.1.0 - - * Support ES6 class (issue 1001) - * Support ES6 rest parameter (issue 1011) - * Expand the location of property getter, setter, and methods (issue 1029) - * Enable TryStatement transition to a single handler (issue 1031) - * Support ES6 computed property name (issue 1037) - * Tolerate unclosed block comment (issue 1041) - * Support ES6 lexical declaration (issue 1065) - -2015-02-06: Version 2.0.0 - - * Support ES6 arrow function (issue 517) - * Support ES6 Unicode code point escape (issue 521) - * Improve the speed and accuracy of comment attachment (issue 522) - * Support ES6 default parameter (issue 519) - * Support ES6 regular expression flags (issue 557) - * Fix scanning of implicit octal literals (issue 565) - * Fix the handling of automatic semicolon insertion (issue 574) - * Support ES6 method definition (issue 620) - * Support ES6 octal integer literal (issue 621) - * Support ES6 binary integer literal (issue 622) - * Support ES6 object literal property value shorthand (issue 624) - -2015-03-03: Version 1.2.5 - - * Fix scanning of implicit octal literals (issue 565) - -2015-02-05: Version 1.2.4 - - * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560) - * Fix the handling of automatic semicolon insertion (issue 574) - -2015-01-18: Version 1.2.3 - - * Fix division by this (issue 616) - -2014-05-18: Version 1.2.2 - - * Fix duplicated tokens when collecting comments (issue 537) - -2014-05-04: Version 1.2.1 - - * Ensure that Program node may still have leading comments (issue 536) - -2014-04-29: Version 1.2.0 - - * Fix semicolon handling for expression statement (issue 462, 533) - * Disallow escaped characters in regular expression flags (issue 503) - * Performance improvement for location tracking (issue 520) - * Improve the speed of comment attachment (issue 522) - -2014-03-26: Version 1.1.1 - - * Fix token handling of forward slash after an array literal (issue 512) - -2014-03-23: Version 1.1.0 - - * Optionally attach comments to the owning syntax nodes (issue 197) - * Simplify binary parsing with stack-based shift reduce (issue 352) - * Always include the raw source of literals (issue 376) - * Add optional input source information (issue 386) - * Tokenizer API for pure lexical scanning (issue 398) - * Improve the web site and its online demos (issue 337, 400, 404) - * Performance improvement for location tracking (issue 417, 424) - * Support HTML comment syntax (issue 451) - * Drop support for legacy browsers (issue 474) - -2013-08-27: Version 1.0.4 - - * Minimize the payload for packages (issue 362) - * Fix missing cases on an empty switch statement (issue 436) - * Support escaped ] in regexp literal character classes (issue 442) - * Tolerate invalid left-hand side expression (issue 130) - -2013-05-17: Version 1.0.3 - - * Variable declaration needs at least one declarator (issue 391) - * Fix benchmark's variance unit conversion (issue 397) - * IE < 9: \v should be treated as vertical tab (issue 405) - * Unary expressions should always have prefix: true (issue 418) - * Catch clause should only accept an identifier (issue 423) - * Tolerate setters without parameter (issue 426) - -2012-11-02: Version 1.0.2 - - Improvement: - - * Fix esvalidate JUnit output upon a syntax error (issue 374) - -2012-10-28: Version 1.0.1 - - Improvements: - - * esvalidate understands shebang in a Unix shell script (issue 361) - * esvalidate treats fatal parsing failure as an error (issue 361) - * Reduce Node.js package via .npmignore (issue 362) - -2012-10-22: Version 1.0.0 - - Initial release. diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/LICENSE.BSD b/tools/eslint/node_modules/js-yaml/node_modules/esprima/LICENSE.BSD index 3e580c355a96e5..17557eceb90690 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/LICENSE.BSD +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/LICENSE.BSD @@ -1,3 +1,5 @@ +Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/README.md b/tools/eslint/node_modules/js-yaml/node_modules/esprima/README.md index 9ba7c0f53088a3..749454f44995ed 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/README.md +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/README.md @@ -1,17 +1,21 @@ +[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima) +[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima) +[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima) +[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima) + **Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) parser written in ECMAScript (also popularly known as -[JavaScript](https://en.wikipedia.org/wiki/JavaScript). +[JavaScript](https://en.wikipedia.org/wiki/JavaScript)). Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), with the help of [many contributors](https://github.com/jquery/esprima/contributors). ### Features -- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) -- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/spec.md) as standardized by [EStree project](https://github.com/estree/estree) +- Full support for ECMAScript 6 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) +- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/spec.md) as standardized by [ESTree project](https://github.com/estree/estree) - Optional tracking of syntax node location (index-based and line-column) -- Heavily tested (~1000 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://travis-ci.org/jquery/esprima)) -- [Partial support](https://github.com/jquery/esprima/issues/1099) for ECMAScript 6 +- [Heavily tested](http://esprima.org/test/ci.html) (~1250 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima)) Esprima serves as a **building block** for some JavaScript language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html) diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esparse.js b/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esparse.js index 560366695a1e37..98bdbf48f2629e 100755 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esparse.js @@ -1,7 +1,6 @@ #!/usr/bin/env node /* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2011 Ariya Hidayat + Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js b/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js index dddd8a2ada461a..f522dec290b707 100755 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - Copyright (C) 2012 Ariya Hidayat + Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/esprima.js b/tools/eslint/node_modules/js-yaml/node_modules/esprima/esprima.js index 2d7fc11cc3cfd2..0a21b4638f3d7c 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/esprima.js +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/esprima.js @@ -1,14 +1,5 @@ /* - Copyright (C) 2013 Ariya Hidayat - Copyright (C) 2013 Thaddee Tyl - Copyright (C) 2013 Mathias Bynens - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat + Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -57,7 +48,6 @@ Regex, source, strict, - sourceType, index, lineNumber, lineStart, @@ -138,6 +128,7 @@ ExportSpecifier: 'ExportSpecifier', ExpressionStatement: 'ExpressionStatement', ForStatement: 'ForStatement', + ForOfStatement: 'ForOfStatement', ForInStatement: 'ForInStatement', FunctionDeclaration: 'FunctionDeclaration', FunctionExpression: 'FunctionExpression', @@ -151,6 +142,7 @@ LabeledStatement: 'LabeledStatement', LogicalExpression: 'LogicalExpression', MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', MethodDefinition: 'MethodDefinition', NewExpression: 'NewExpression', ObjectExpression: 'ObjectExpression', @@ -175,7 +167,8 @@ VariableDeclaration: 'VariableDeclaration', VariableDeclarator: 'VariableDeclarator', WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' }; PlaceHolders = { @@ -196,6 +189,7 @@ UnterminatedRegExp: 'Invalid regular expression: missing /', InvalidLHSInAssignment: 'Invalid left-hand side in assignment', InvalidLHSInForIn: 'Invalid left-hand side in for-in', + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', MultipleDefaultsInSwitch: 'More than one default clause in switch statement', NoCatchOrFinally: 'Missing catch or finally after try', UnknownLabel: 'Undefined label \'%0\'', @@ -227,13 +221,17 @@ NoAsAfterImportNamespace: 'Unexpected token', InvalidModuleSpecifier: 'Unexpected token', IllegalImportDeclaration: 'Unexpected token', - IllegalExportDeclaration: 'Unexpected token' + IllegalExportDeclaration: 'Unexpected token', + DuplicateBinding: 'Duplicate binding %0' }; - // See also tools/generate-unicode-regex.py. + // See also tools/generate-unicode-regex.js. Regex = { - NonAsciiIdentifierStart: new RegExp('[\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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]'), - NonAsciiIdentifierPart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\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-\u08B2\u08E4-\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\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\u0B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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\u1380-\u138F\u13A0-\u13F4\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-\u19D9\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]') + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: + 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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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\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]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\uD87E[\uDC00-\uDE1D]/, + + // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: + 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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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-\u13F4\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\u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\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ }; // Ensure the condition is true, otherwise throw an error. @@ -283,27 +281,33 @@ }; } - // 7.2 White Space + // ECMA-262 11.2 White Space function isWhiteSpace(ch) { return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); } - // 7.3 Line Terminators + // ECMA-262 11.3 Line Terminators function isLineTerminator(ch) { return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); } - // 7.6 Identifier Names and Identifiers + // ECMA-262 11.6 Identifier Names and Identifiers + + function fromCodePoint(cp) { + return (cp < 0x10000) ? String.fromCharCode(cp) : + String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + } function isIdentifierStart(ch) { return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) (ch >= 0x41 && ch <= 0x5A) || // A..Z (ch >= 0x61 && ch <= 0x7A) || // a..z (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))); } function isIdentifierPart(ch) { @@ -312,10 +316,10 @@ (ch >= 0x61 && ch <= 0x7A) || // a..z (ch >= 0x30 && ch <= 0x39) || // 0..9 (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))); } - // 7.6.1.2 Future Reserved Words + // ECMA-262 11.6.2.2 Future Reserved Words function isFutureReservedWord(id) { switch (id) { @@ -329,8 +333,6 @@ } } - // 11.6.2.2 Future Reserved Words - function isStrictModeReservedWord(id) { switch (id) { case 'implements': @@ -352,14 +354,9 @@ return id === 'eval' || id === 'arguments'; } - // 7.6.1.1 Keywords + // ECMA-262 11.6.2.1 Keywords function isKeyword(id) { - - // 'const' is specialized as Keyword in V8. - // 'yield' and 'let' are for compatibility with SpiderMonkey and ES.next. - // Some others are from future reserved words. - switch (id.length) { case 2: return (id === 'if') || (id === 'in') || (id === 'do'); @@ -387,7 +384,7 @@ } } - // 7.4 Comments + // ECMA-262 11.4 Comments function addComment(type, value, start, end, loc) { var comment; @@ -411,6 +408,13 @@ extra.leadingComments.push(comment); extra.trailingComments.push(comment); } + if (extra.tokenize) { + comment.type = comment.type + 'Comment'; + if (extra.delegate) { + comment = extra.delegate(comment); + } + extra.tokens.push(comment); + } } function skipSingleLineComment(offset) { @@ -586,7 +590,7 @@ } function scanUnicodeCodePointEscape() { - var ch, code, cu1, cu2; + var ch, code; ch = source[index]; code = 0; @@ -608,52 +612,75 @@ throwUnexpectedToken(); } - // UTF-16 Encoding - if (code <= 0xFFFF) { - return String.fromCharCode(code); + return fromCodePoint(code); + } + + function codePointAt(i) { + var cp, first, second; + + cp = source.charCodeAt(i); + if (cp >= 0xD800 && cp <= 0xDBFF) { + second = source.charCodeAt(i + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + first = cp; + cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } } - cu1 = ((code - 0x10000) >> 10) + 0xD800; - cu2 = ((code - 0x10000) & 1023) + 0xDC00; - return String.fromCharCode(cu1, cu2); + + return cp; } - function getEscapedIdentifier() { - var ch, id; + function getComplexIdentifier() { + var cp, ch, id; - ch = source.charCodeAt(index++); - id = String.fromCharCode(ch); + cp = codePointAt(index); + id = fromCodePoint(cp); + index += id.length; // '\u' (U+005C, U+0075) denotes an escaped character. - if (ch === 0x5C) { + if (cp === 0x5C) { if (source.charCodeAt(index) !== 0x75) { throwUnexpectedToken(); } ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { - throwUnexpectedToken(); + if (source[index] === '{') { + ++index; + ch = scanUnicodeCodePointEscape(); + } else { + ch = scanHexEscape('u'); + cp = ch.charCodeAt(0); + if (!ch || ch === '\\' || !isIdentifierStart(cp)) { + throwUnexpectedToken(); + } } id = ch; } while (index < length) { - ch = source.charCodeAt(index); - if (!isIdentifierPart(ch)) { + cp = codePointAt(index); + if (!isIdentifierPart(cp)) { break; } - ++index; - id += String.fromCharCode(ch); + ch = fromCodePoint(cp); + id += ch; + index += ch.length; // '\u' (U+005C, U+0075) denotes an escaped character. - if (ch === 0x5C) { + if (cp === 0x5C) { id = id.substr(0, id.length - 1); if (source.charCodeAt(index) !== 0x75) { throwUnexpectedToken(); } ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { - throwUnexpectedToken(); + if (source[index] === '{') { + ++index; + ch = scanUnicodeCodePointEscape(); + } else { + ch = scanHexEscape('u'); + cp = ch.charCodeAt(0); + if (!ch || ch === '\\' || !isIdentifierPart(cp)) { + throwUnexpectedToken(); + } } id += ch; } @@ -671,7 +698,11 @@ if (ch === 0x5C) { // Blackslash (U+005C) marks Unicode escape sequence. index = start; - return getEscapedIdentifier(); + return getComplexIdentifier(); + } else if (ch >= 0xD800 && ch < 0xDFFF) { + // Need to handle surrogate pairs. + index = start; + return getComplexIdentifier(); } if (isIdentifierPart(ch)) { ++index; @@ -689,7 +720,7 @@ start = index; // Backslash (U+005C) starts an escaped character. - id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier(); + id = (source.charCodeAt(index) === 0x5C) ? getComplexIdentifier() : getIdentifier(); // There is no keyword or literal with only one character. // Thus, it must be an identifier. @@ -716,7 +747,7 @@ } - // 7.7 Punctuators + // ECMA-262 11.7 Punctuators function scanPunctuator() { var token, str; @@ -736,14 +767,14 @@ case '(': if (extra.tokenize) { - extra.openParenToken = extra.tokens.length; + extra.openParenToken = extra.tokenValues.length; } ++index; break; case '{': if (extra.tokenize) { - extra.openCurlyToken = extra.tokens.length; + extra.openCurlyToken = extra.tokenValues.length; } state.curlyStack.push('{'); ++index; @@ -816,7 +847,7 @@ return token; } - // 7.8.3 Numeric Literals + // ECMA-262 11.8.3 Numeric Literals function scanHexLiteral(start) { var number = ''; @@ -1020,7 +1051,7 @@ }; } - // 7.8.4 String Literals + // ECMA-262 11.8.4 String Literals function scanStringLiteral() { var str = '', quote, start, ch, unescaped, octToDec, octal = false; @@ -1075,7 +1106,9 @@ break; case '8': case '9': - throw throwUnexpectedToken(); + str += ch; + tolerateUnexpectedToken(); + break; default: if (isOctalDigit(ch)) { @@ -1117,6 +1150,8 @@ }; } + // ECMA-262 11.8.6 Template Literal Lexical Components + function scanTemplate() { var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped; @@ -1239,29 +1274,40 @@ }; } + // ECMA-262 11.8.5 Regular Expression Literals + function testRegExp(pattern, flags) { - var tmp = pattern; + // The BMP character to use as a replacement for astral symbols when + // translating an ES6 "u"-flagged pattern to an ES5-compatible + // approximation. + // Note: replacing with '\uFFFF' enables false positives in unlikely + // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid + // pattern that would not be detected by this substitution. + var astralSubstitute = '\uFFFF', + tmp = pattern; if (flags.indexOf('u') >= 0) { - // Replace each astral symbol and every Unicode escape sequence - // that possibly represents an astral symbol or a paired surrogate - // with a single ASCII symbol to avoid throwing on regular - // expressions that are only valid in combination with the `/u` - // flag. - // Note: replacing with the ASCII symbol `x` might cause false - // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a - // perfectly valid pattern that is equivalent to `[a-b]`, but it - // would be replaced by `[x-b]` which throws an error. tmp = tmp - .replace(/\\u\{([0-9a-fA-F]+)\}/g, function ($0, $1) { - if (parseInt($1, 16) <= 0x10FFFF) { - return 'x'; + // Replace every Unicode escape sequence with the equivalent + // BMP character or a constant ASCII code point in the case of + // astral symbols. (See the above note on `astralSubstitute` + // for more information.) + .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { + var codePoint = parseInt($1 || $2, 16); + if (codePoint > 0x10FFFF) { + throwUnexpectedToken(null, Messages.InvalidRegExp); + } + if (codePoint <= 0xFFFF) { + return String.fromCharCode(codePoint); } - throwUnexpectedToken(null, Messages.InvalidRegExp); + return astralSubstitute; }) + // Replace each paired surrogate with a single ASCII symbol to + // avoid throwing on regular expressions that are only valid in + // combination with the "u" flag. .replace( - /\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - 'x' + /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + astralSubstitute ); } @@ -1375,8 +1421,8 @@ } function scanRegExp() { - scanning = true; var start, body, flags, value; + scanning = true; lookahead = null; skipComment(); @@ -1464,71 +1510,50 @@ token.type === Token.NullLiteral; } + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + function advanceSlash() { - var prevToken, - checkToken; - // Using the following algorithm: - // https://github.com/mozilla/sweet.js/wiki/design - prevToken = extra.tokens[extra.tokens.length - 1]; - if (!prevToken) { - // Nothing before that: it cannot be a division. - return collectRegex(); - } - if (prevToken.type === 'Punctuator') { - if (prevToken.value === ']') { - return scanPunctuator(); - } - if (prevToken.value === ')') { - checkToken = extra.tokens[extra.openParenToken - 1]; - if (checkToken && - checkToken.type === 'Keyword' && - (checkToken.value === 'if' || - checkToken.value === 'while' || - checkToken.value === 'for' || - checkToken.value === 'with')) { - return collectRegex(); - } - return scanPunctuator(); - } - if (prevToken.value === '}') { - // Dividing a function by anything makes little sense, - // but we have to check for that. - if (extra.tokens[extra.openCurlyToken - 3] && - extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { - // Anonymous function. - checkToken = extra.tokens[extra.openCurlyToken - 4]; - if (!checkToken) { - return scanPunctuator(); - } - } else if (extra.tokens[extra.openCurlyToken - 4] && - extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { - // Named function. - checkToken = extra.tokens[extra.openCurlyToken - 5]; - if (!checkToken) { - return collectRegex(); - } - } else { - return scanPunctuator(); - } - // checkToken determines whether the function is - // a declaration or an expression. - if (FnExprTokens.indexOf(checkToken.value) >= 0) { - // It is an expression. - return scanPunctuator(); - } - // It is a declaration. - return collectRegex(); - } - return collectRegex(); + var regex, previous, check; + + function testKeyword(value) { + return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z'); } - if (prevToken.type === 'Keyword' && prevToken.value !== 'this') { - return collectRegex(); + + previous = extra.tokenValues[extra.tokens.length - 1]; + regex = (previous !== null); + + switch (previous) { + case 'this': + case ']': + regex = false; + break; + + case ')': + check = extra.tokenValues[extra.openParenToken - 1]; + regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with'); + break; + + case '}': + // Dividing a function by anything makes little sense, + // but we have to check for that. + regex = false; + if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) { + // Anonymous function, e.g. function(){} /42 + check = extra.tokenValues[extra.openCurlyToken - 4]; + regex = check ? (FnExprTokens.indexOf(check) < 0) : false; + } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) { + // Named function, e.g. function f(){} /42/ + check = extra.tokenValues[extra.openCurlyToken - 5]; + regex = check ? (FnExprTokens.indexOf(check) < 0) : true; + } } - return scanPunctuator(); + + return regex ? collectRegex() : scanPunctuator(); } function advance() { - var ch, token; + var cp, token; if (index >= length) { return { @@ -1540,9 +1565,9 @@ }; } - ch = source.charCodeAt(index); + cp = source.charCodeAt(index); - if (isIdentifierStart(ch)) { + if (isIdentifierStart(cp)) { token = scanIdentifier(); if (strict && isStrictModeReservedWord(token.value)) { token.type = Token.Keyword; @@ -1551,39 +1576,47 @@ } // Very common: ( and ) and ; - if (ch === 0x28 || ch === 0x29 || ch === 0x3B) { + if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { return scanPunctuator(); } // String literal starts with single quote (U+0027) or double quote (U+0022). - if (ch === 0x27 || ch === 0x22) { + if (cp === 0x27 || cp === 0x22) { return scanStringLiteral(); } // Dot (.) U+002E can also start a floating-point number, hence the need // to check the next character. - if (ch === 0x2E) { + if (cp === 0x2E) { if (isDecimalDigit(source.charCodeAt(index + 1))) { return scanNumericLiteral(); } return scanPunctuator(); } - if (isDecimalDigit(ch)) { + if (isDecimalDigit(cp)) { return scanNumericLiteral(); } // Slash (/) U+002F can also start a regex. - if (extra.tokenize && ch === 0x2F) { + if (extra.tokenize && cp === 0x2F) { return advanceSlash(); } // Template literals start with ` (U+0060) for template head // or } (U+007D) for template middle or template tail. - if (ch === 0x60 || (ch === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) { + if (cp === 0x60 || (cp === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) { return scanTemplate(); } + // Possible identifier start in a surrogate pair. + if (cp >= 0xD800 && cp < 0xDFFF) { + cp = codePointAt(index); + if (isIdentifierStart(cp)) { + return scanIdentifier(); + } + } + return scanPunctuator(); } @@ -1617,6 +1650,20 @@ flags: token.regex.flags }; } + if (extra.tokenValues) { + extra.tokenValues.push((entry.type === 'Punctuator' || entry.type === 'Keyword') ? entry.value : null); + } + if (extra.tokenize) { + if (!extra.range) { + delete entry.range; + } + if (!extra.loc) { + delete entry.loc; + } + if (extra.delegate) { + entry = extra.delegate(entry); + } + } extra.tokens.push(entry); } @@ -1701,6 +1748,7 @@ processComment: function () { var lastChild, + innerComments, leadingComments, trailingComments, bottomRight = extra.bottomRightStack, @@ -1713,6 +1761,27 @@ return; } } + /** + * patch innnerComments for properties empty block + * `function a() {/** comments **\/}` + */ + + if (this.type === Syntax.BlockStatement && this.body.length === 0) { + innerComments = []; + for (i = extra.leadingComments.length - 1; i >= 0; --i) { + comment = extra.leadingComments[i]; + if (this.range[1] >= comment.range[1]) { + innerComments.unshift(comment); + extra.leadingComments.splice(i, 1); + extra.trailingComments.splice(i, 1); + } + } + if (innerComments.length) { + this.innerComments = innerComments; + //bottomRight.push(this); + return; + } + } if (extra.trailingComments.length > 0) { trailingComments = []; @@ -1732,17 +1801,25 @@ } // Eating the stack. - if (last) { - while (last && last.range[0] >= this.range[0]) { - lastChild = last; - last = bottomRight.pop(); - } + while (last && last.range[0] >= this.range[0]) { + lastChild = bottomRight.pop(); + last = bottomRight[bottomRight.length - 1]; } if (lastChild) { - if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= this.range[0]) { - this.leadingComments = lastChild.leadingComments; - lastChild.leadingComments = undefined; + if (lastChild.leadingComments) { + leadingComments = []; + for (i = lastChild.leadingComments.length - 1; i >= 0; --i) { + comment = lastChild.leadingComments[i]; + if (comment.range[1] <= this.range[0]) { + leadingComments.unshift(comment); + lastChild.leadingComments.splice(i, 1); + } + } + + if (!lastChild.leadingComments.length) { + lastChild.leadingComments = undefined; + } } } else if (extra.leadingComments.length > 0) { leadingComments = []; @@ -1945,6 +2022,15 @@ return this; }, + finishForOfStatement: function (left, right, body) { + this.type = Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + this.finish(); + return this; + }, + finishForInStatement: function (left, right, body) { this.type = Syntax.ForInStatement; this.left = left; @@ -1955,25 +2041,25 @@ return this; }, - finishFunctionDeclaration: function (id, params, defaults, body) { + finishFunctionDeclaration: function (id, params, defaults, body, generator) { this.type = Syntax.FunctionDeclaration; this.id = id; this.params = params; this.defaults = defaults; this.body = body; - this.generator = false; + this.generator = generator; this.expression = false; this.finish(); return this; }, - finishFunctionExpression: function (id, params, defaults, body) { + finishFunctionExpression: function (id, params, defaults, body, generator) { this.type = Syntax.FunctionExpression; this.id = id; this.params = params; this.defaults = defaults; this.body = body; - this.generator = false; + this.generator = generator; this.expression = false; this.finish(); return this; @@ -2023,6 +2109,14 @@ return this; }, + finishMetaProperty: function (meta, property) { + this.type = Syntax.MetaProperty; + this.meta = meta; + this.property = property; + this.finish(); + return this; + }, + finishNewExpression: function (callee, args) { this.type = Syntax.NewExpression; this.callee = callee; @@ -2054,13 +2148,10 @@ return this; }, - finishProgram: function (body) { + finishProgram: function (body, sourceType) { this.type = Syntax.Program; this.body = body; - if (sourceType === 'module') { - // very restrictive for now - this.sourceType = sourceType; - } + this.sourceType = sourceType; this.finish(); return this; }, @@ -2168,7 +2259,7 @@ this.type = Syntax.TryStatement; this.block = block; this.guardedHandlers = []; - this.handlers = handler ? [ handler ] : []; + this.handlers = handler ? [handler] : []; this.handler = handler; this.finalizer = finalizer; this.finish(); @@ -2283,6 +2374,14 @@ this.source = src; this.finish(); return this; + }, + + finishYieldExpression: function (argument, delegate) { + this.type = Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + this.finish(); + return this; } }; @@ -2302,12 +2401,30 @@ extra.errors.push(error); } + function constructError(msg, column) { + var error = new Error(msg); + try { + throw error; + } catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, 'column', { value: column }); + } + } finally { + return error; + } + } + function createError(line, pos, description) { - var error = new Error('Line ' + line + ': ' + description); - error.index = pos; + var msg, column, error; + + msg = 'Line ' + line + ': ' + description; + column = pos - (scanning ? lineStart : lastLineStart) + 1; + error = constructError(msg, column); error.lineNumber = line; - error.column = pos - (scanning ? lineStart : lastLineStart) + 1; error.description = description; + error.index = pos; return error; } @@ -2566,7 +2683,9 @@ return result; } - function parseArrayPattern() { + // ECMA-262 13.3.3 Destructuring Binding Patterns + + function parseArrayPattern(params, kind) { var node = new Node(), elements = [], rest, restNode; expect('['); @@ -2578,11 +2697,12 @@ if (match('...')) { restNode = new Node(); lex(); - rest = parseVariableIdentifier(); + params.push(lookahead); + rest = parseVariableIdentifier(kind); elements.push(restNode.finishRestElement(rest)); break; } else { - elements.push(parsePatternWithDefault()); + elements.push(parsePatternWithDefault(params, kind)); } if (!match(']')) { expect(','); @@ -2596,34 +2716,38 @@ return node.finishArrayPattern(elements); } - function parsePropertyPattern() { - var node = new Node(), key, computed = match('['), init; + function parsePropertyPattern(params, kind) { + var node = new Node(), key, keyToken, computed = match('['), init; if (lookahead.type === Token.Identifier) { + keyToken = lookahead; key = parseVariableIdentifier(); if (match('=')) { + params.push(keyToken); lex(); init = parseAssignmentExpression(); + return node.finishProperty( 'init', key, false, - new WrappingNode(key).finishAssignmentPattern(key, init), false, false); + new WrappingNode(keyToken).finishAssignmentPattern(key, init), false, false); } else if (!match(':')) { + params.push(keyToken); return node.finishProperty('init', key, false, key, false, true); } } else { key = parseObjectPropertyKey(); } expect(':'); - init = parsePatternWithDefault(); + init = parsePatternWithDefault(params, kind); return node.finishProperty('init', key, computed, init, false, false); } - function parseObjectPattern() { + function parseObjectPattern(params, kind) { var node = new Node(), properties = []; expect('{'); while (!match('}')) { - properties.push(parsePropertyPattern()); + properties.push(parsePropertyPattern(params, kind)); if (!match('}')) { expect(','); } @@ -2634,31 +2758,38 @@ return node.finishObjectPattern(properties); } - function parsePattern() { - if (lookahead.type === Token.Identifier) { - return parseVariableIdentifier(); - } else if (match('[')) { - return parseArrayPattern(); + function parsePattern(params, kind) { + if (match('[')) { + return parseArrayPattern(params, kind); } else if (match('{')) { - return parseObjectPattern(); + return parseObjectPattern(params, kind); + } else if (matchKeyword('let')) { + if (kind === 'const' || kind === 'let') { + tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken); + } } - throwUnexpectedToken(lookahead); + + params.push(lookahead); + return parseVariableIdentifier(kind); } - function parsePatternWithDefault() { - var startToken = lookahead, pattern, right; - pattern = parsePattern(); + function parsePatternWithDefault(params, kind) { + var startToken = lookahead, pattern, previousAllowYield, right; + pattern = parsePattern(params, kind); if (match('=')) { lex(); + previousAllowYield = state.allowYield; + state.allowYield = true; right = isolateCoverGrammar(parseAssignmentExpression); + state.allowYield = previousAllowYield; pattern = new WrappingNode(startToken).finishAssignmentPattern(pattern, right); } return pattern; } - // 11.1.4 Array Initialiser + // ECMA-262 12.2.5 Array Initializer - function parseArrayInitialiser() { + function parseArrayInitializer() { var elements = [], node = new Node(), restSpread; expect('['); @@ -2691,9 +2822,9 @@ return node.finishArrayExpression(elements); } - // 11.1.5 Object Initialiser + // ECMA-262 12.2.6 Object Initializer - function parsePropertyFunction(node, paramInfo) { + function parsePropertyFunction(node, paramInfo, isGenerator) { var previousStrict, body; isAssignmentTarget = isBindingElement = false; @@ -2709,14 +2840,20 @@ } strict = previousStrict; - return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body); + return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body, isGenerator); } function parsePropertyMethodFunction() { - var params, method, node = new Node(); + var params, method, node = new Node(), + previousAllowYield = state.allowYield; + state.allowYield = false; params = parseParams(); - method = parsePropertyFunction(node, params); + state.allowYield = previousAllowYield; + + state.allowYield = false; + method = parsePropertyFunction(node, params, false); + state.allowYield = previousAllowYield; return method; } @@ -2774,7 +2911,8 @@ // In order to avoid back tracking, it returns `null` if the position is not a MethodDefinition and the caller // is responsible to visit other options. function tryParseMethodDefinition(token, key, computed, node) { - var value, options, methodNode; + var value, options, methodNode, params, + previousAllowYield = state.allowYield; if (token.type === Token.Identifier) { // check for `get` and `set`; @@ -2785,13 +2923,17 @@ methodNode = new Node(); expect('('); expect(')'); + + state.allowYield = false; value = parsePropertyFunction(methodNode, { params: [], defaults: [], stricted: null, firstRestricted: null, message: null - }); + }, false); + state.allowYield = previousAllowYield; + return node.finishProperty('get', key, computed, value, false, false); } else if (token.value === 'set' && lookaheadPropertyName()) { computed = match('['); @@ -2809,19 +2951,38 @@ if (match(')')) { tolerateUnexpectedToken(lookahead); } else { + state.allowYield = false; parseParam(options); + state.allowYield = previousAllowYield; if (options.defaultCount === 0) { options.defaults = []; } } expect(')'); - value = parsePropertyFunction(methodNode, options); + state.allowYield = false; + value = parsePropertyFunction(methodNode, options, false); + state.allowYield = previousAllowYield; + return node.finishProperty('set', key, computed, value, false, false); } + } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyName()) { + computed = match('['); + key = parseObjectPropertyKey(); + methodNode = new Node(); + + state.allowYield = true; + params = parseParams(); + state.allowYield = previousAllowYield; + + state.allowYield = false; + value = parsePropertyFunction(methodNode, params, true); + state.allowYield = previousAllowYield; + + return node.finishProperty('init', key, computed, value, true, false); } - if (match('(')) { + if (key && match('(')) { value = parsePropertyMethodFunction(); return node.finishProperty('init', key, computed, value, true, false); } @@ -2830,32 +2991,33 @@ return null; } - function checkProto(key, computed, hasProto) { - if (computed === false && (key.type === Syntax.Identifier && key.name === '__proto__' || - key.type === Syntax.Literal && key.value === '__proto__')) { - if (hasProto.value) { - tolerateError(Messages.DuplicateProtoProperty); - } else { - hasProto.value = true; - } - } - } - function parseObjectProperty(hasProto) { - var token = lookahead, node = new Node(), computed, key, maybeMethod, value; + var token = lookahead, node = new Node(), computed, key, maybeMethod, proto, value; computed = match('['); - key = parseObjectPropertyKey(); + if (match('*')) { + lex(); + } else { + key = parseObjectPropertyKey(); + } maybeMethod = tryParseMethodDefinition(token, key, computed, node); - if (maybeMethod) { - checkProto(maybeMethod.key, maybeMethod.computed, hasProto); - // finished return maybeMethod; } - // init property or short hand property. - checkProto(key, computed, hasProto); + if (!key) { + throwUnexpectedToken(lookahead); + } + + // Check for duplicated __proto__ + if (!computed) { + proto = (key.type === Syntax.Identifier && key.name === '__proto__') || + (key.type === Syntax.Literal && key.value === '__proto__'); + if (hasProto.value && proto) { + tolerateError(Messages.DuplicateProtoProperty); + } + hasProto.value |= proto; + } if (match(':')) { lex(); @@ -2877,7 +3039,7 @@ throwUnexpectedToken(lookahead); } - function parseObjectInitialiser() { + function parseObjectInitializer() { var properties = [], hasProto = {value: false}, node = new Node(); expect('{'); @@ -2931,6 +3093,8 @@ } } + // ECMA-262 12.2.9 Template Literals + function parseTemplateElement(option) { var node, token; @@ -2948,7 +3112,7 @@ var quasi, quasis, expressions, node = new Node(); quasi = parseTemplateElement({ head: true }); - quasis = [ quasi ]; + quasis = [quasi]; expressions = []; while (!quasi.tail) { @@ -2960,10 +3124,10 @@ return node.finishTemplateLiteral(quasis, expressions); } - // 11.1.6 The Grouping Operator + // ECMA-262 12.2.10 The Grouping Operator function parseGroupExpression() { - var expr, expressions, startToken, i; + var expr, expressions, startToken, i, params = []; expect('('); @@ -2974,13 +3138,14 @@ } return { type: PlaceHolders.ArrowParameterPlaceHolder, - params: [] + params: [], + rawParams: [] }; } startToken = lookahead; if (match('...')) { - expr = parseRestElement(); + expr = parseRestElement(params); expect(')'); if (!match('=>')) { expect('=>'); @@ -3008,7 +3173,7 @@ if (!isBindingElement) { throwUnexpectedToken(lookahead); } - expressions.push(parseRestElement()); + expressions.push(parseRestElement(params)); expect(')'); if (!match('=>')) { expect('=>'); @@ -3033,6 +3198,13 @@ expect(')'); if (match('=>')) { + if (expr.type === Syntax.Identifier && expr.name === 'yield') { + return { + type: PlaceHolders.ArrowParameterPlaceHolder, + params: [expr] + }; + } + if (!isBindingElement) { throwUnexpectedToken(lookahead); } @@ -3055,7 +3227,7 @@ } - // 11.1 Primary Expressions + // ECMA-262 12.2 Primary Expressions function parsePrimaryExpression() { var type, token, expr, node; @@ -3066,17 +3238,20 @@ } if (match('[')) { - return inheritCoverGrammar(parseArrayInitialiser); + return inheritCoverGrammar(parseArrayInitializer); } if (match('{')) { - return inheritCoverGrammar(parseObjectInitialiser); + return inheritCoverGrammar(parseObjectInitializer); } type = lookahead.type; node = new Node(); if (type === Token.Identifier) { + if (state.sourceType === 'module' && lookahead.value === 'await') { + tolerateUnexpectedToken(lookahead); + } expr = node.finishIdentifier(lex().value); } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { isAssignmentTarget = isBindingElement = false; @@ -3085,6 +3260,12 @@ } expr = node.finishLiteral(lex()); } else if (type === Token.Keyword) { + if (!strict && state.allowYield && matchKeyword('yield')) { + return parseNonComputedProperty(); + } + if (!strict && matchKeyword('let')) { + return node.finishIdentifier(lex().value); + } isAssignmentTarget = isBindingElement = false; if (matchKeyword('function')) { return parseFunctionExpression(); @@ -3127,16 +3308,23 @@ return expr; } - // 11.2 Left-Hand-Side Expressions + // ECMA-262 12.3 Left-Hand-Side Expressions function parseArguments() { - var args = []; + var args = [], expr; expect('('); if (!match(')')) { while (startIndex < length) { - args.push(isolateCoverGrammar(parseAssignmentExpression)); + if (match('...')) { + expr = new Node(); + lex(); + expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression)); + } else { + expr = isolateCoverGrammar(parseAssignmentExpression); + } + args.push(expr); if (match(')')) { break; } @@ -3179,10 +3367,24 @@ return expr; } + // ECMA-262 12.3.3 The new Operator + function parseNewExpression() { var callee, args, node = new Node(); expectKeyword('new'); + + if (match('.')) { + lex(); + if (lookahead.type === Token.Identifier && lookahead.value === 'target') { + if (state.inFunctionBody) { + lex(); + return node.finishMetaProperty('new', 'target'); + } + } + throwUnexpectedToken(lookahead); + } + callee = isolateCoverGrammar(parseLeftHandSideExpression); args = match('(') ? parseArguments() : []; @@ -3191,6 +3393,8 @@ return node.finishNewExpression(callee, args); } + // ECMA-262 12.3.4 Function Calls + function parseLeftHandSideExpressionAllowCall() { var quasi, expr, args, property, startToken, previousAllowIn = state.allowIn; @@ -3236,6 +3440,8 @@ return expr; } + // ECMA-262 12.3 Left-Hand-Side Expressions + function parseLeftHandSideExpression() { var quasi, expr, property, startToken; assert(state.allowIn, 'callee of new expression always allow in keyword.'); @@ -3274,7 +3480,7 @@ return expr; } - // 11.3 Postfix Expressions + // ECMA-262 12.4 Postfix Expressions function parsePostfixExpression() { var expr, token, startToken = lookahead; @@ -3283,7 +3489,7 @@ if (!hasLineTerminator && lookahead.type === Token.Punctuator) { if (match('++') || match('--')) { - // 11.3.1, 11.3.2 + // ECMA-262 11.3.1, 11.3.2 if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { tolerateError(Messages.StrictLHSPostfix); } @@ -3302,7 +3508,7 @@ return expr; } - // 11.4 Unary Operators + // ECMA-262 12.5 Unary Operators function parseUnaryExpression() { var token, expr, startToken; @@ -3313,7 +3519,7 @@ startToken = lookahead; token = lex(); expr = inheritCoverGrammar(parseUnaryExpression); - // 11.4.4, 11.4.5 + // ECMA-262 11.4.4, 11.4.5 if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { tolerateError(Messages.StrictLHSPrefix); } @@ -3416,13 +3622,13 @@ return prec; } - // 11.5 Multiplicative Operators - // 11.6 Additive Operators - // 11.7 Bitwise Shift Operators - // 11.8 Relational Operators - // 11.9 Equality Operators - // 11.10 Binary Bitwise Operators - // 11.11 Binary Logical Operators + // ECMA-262 12.6 Multiplicative Operators + // ECMA-262 12.7 Additive Operators + // ECMA-262 12.8 Bitwise Shift Operators + // ECMA-262 12.9 Relational Operators + // ECMA-262 12.10 Equality Operators + // ECMA-262 12.11 Binary Bitwise Operators + // ECMA-262 12.12 Binary Logical Operators function parseBinaryExpression() { var marker, markers, expr, token, prec, stack, right, operator, left, i; @@ -3478,7 +3684,7 @@ } - // 11.12 Conditional Operator + // ECMA-262 12.13 Conditional Operator function parseConditionalExpression() { var expr, previousAllowIn, consequent, alternate, startToken; @@ -3502,7 +3708,7 @@ return expr; } - // [ES6] 14.2 Arrow Function + // ECMA-262 14.2 Arrow Function Definitions function parseConciseBody() { if (match('{')) { @@ -3530,6 +3736,8 @@ } } break; + case Syntax.YieldExpression: + break; default: assert(param.type === Syntax.ObjectPattern, 'Invalid type'); for (i = 0; i < param.properties.length; i++) { @@ -3564,6 +3772,15 @@ switch (param.type) { case Syntax.AssignmentPattern: params[i] = param.left; + if (param.right.type === Syntax.YieldExpression) { + if (param.right.argument) { + throwUnexpectedToken(lookahead); + } + param.right.type = Syntax.Identifier; + param.right.name = 'yield'; + delete param.right.argument; + delete param.right.delegate; + } defaults.push(param.right); ++defaultCount; checkPatternParam(options, param.left); @@ -3576,6 +3793,15 @@ } } + if (strict || !state.allowYield) { + for (i = 0, len = params.length; i < len; i += 1) { + param = params[i]; + if (param.type === Syntax.YieldExpression) { + throwUnexpectedToken(lookahead); + } + } + } + if (options.message === Messages.StrictParamDupe) { token = strict ? options.stricted : options.firstRestricted; throwUnexpectedToken(token, options.message); @@ -3595,13 +3821,16 @@ } function parseArrowFunctionExpression(options, node) { - var previousStrict, body; + var previousStrict, previousAllowYield, body; if (hasLineTerminator) { tolerateUnexpectedToken(lookahead); } expect('=>'); + previousStrict = strict; + previousAllowYield = state.allowYield; + state.allowYield = true; body = parseConciseBody(); @@ -3613,11 +3842,41 @@ } strict = previousStrict; + state.allowYield = previousAllowYield; return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement); } - // 11.13 Assignment Operators + // ECMA-262 14.4 Yield expression + + function parseYieldExpression() { + var argument, expr, delegate, previousAllowYield; + + argument = null; + expr = new Node(); + delegate = false; + + expectKeyword('yield'); + + if (!hasLineTerminator) { + previousAllowYield = state.allowYield; + state.allowYield = false; + delegate = match('*'); + if (delegate) { + lex(); + argument = parseAssignmentExpression(); + } else { + if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) { + argument = parseAssignmentExpression(); + } + } + state.allowYield = previousAllowYield; + } + + return expr.finishYieldExpression(argument, delegate); + } + + // ECMA-262 12.14 Assignment Operators function parseAssignmentExpression() { var token, expr, right, list, startToken; @@ -3625,6 +3884,10 @@ startToken = lookahead; token = lookahead; + if (!state.allowYield && matchKeyword('yield')) { + return parseYieldExpression(); + } + expr = parseConditionalExpression(); if (expr.type === PlaceHolders.ArrowParameterPlaceHolder || match('=>')) { @@ -3644,9 +3907,14 @@ tolerateError(Messages.InvalidLHSInAssignment); } - // 11.13.1 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); + // ECMA-262 12.1.1 + if (strict && expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); + } + if (isStrictModeReservedWord(expr.name)) { + tolerateUnexpectedToken(token, Messages.StrictReservedWord); + } } if (!match('=')) { @@ -3664,7 +3932,7 @@ return expr; } - // 11.14 Comma Operator + // ECMA-262 12.15 Comma Operator function parseExpression() { var expr, startToken = lookahead, expressions; @@ -3688,23 +3956,22 @@ return expr; } - // 12.1 Block + // ECMA-262 13.2 Block function parseStatementListItem() { if (lookahead.type === Token.Keyword) { switch (lookahead.value) { case 'export': - if (sourceType !== 'module') { + if (state.sourceType !== 'module') { tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration); } return parseExportDeclaration(); case 'import': - if (sourceType !== 'module') { + if (state.sourceType !== 'module') { tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration); } return parseImportDeclaration(); case 'const': - case 'let': return parseLexicalDeclaration({inFor: false}); case 'function': return parseFunctionDeclaration(new Node()); @@ -3713,6 +3980,10 @@ } } + if (matchKeyword('let') && isLexicalDeclaration()) { + return parseLexicalDeclaration({inFor: false}); + } + return parseStatement(); } @@ -3740,30 +4011,40 @@ return node.finishBlockStatement(block); } - // 12.2 Variable Statement + // ECMA-262 13.3.2 Variable Statement - function parseVariableIdentifier() { + function parseVariableIdentifier(kind) { var token, node = new Node(); token = lex(); - if (token.type !== Token.Identifier) { + if (token.type === Token.Keyword && token.value === 'yield') { + if (strict) { + tolerateUnexpectedToken(token, Messages.StrictReservedWord); + } if (!state.allowYield) { + throwUnexpectedToken(token); + } + } else if (token.type !== Token.Identifier) { if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) { tolerateUnexpectedToken(token, Messages.StrictReservedWord); } else { - throwUnexpectedToken(token); + if (strict || token.value !== 'let' || kind !== 'var') { + throwUnexpectedToken(token); + } } + } else if (state.sourceType === 'module' && token.type === Token.Identifier && token.value === 'await') { + tolerateUnexpectedToken(token); } return node.finishIdentifier(token.value); } - function parseVariableDeclaration() { - var init = null, id, node = new Node(); + function parseVariableDeclaration(options) { + var init = null, id, node = new Node(), params = []; - id = parsePattern(); + id = parsePattern(params, 'var'); - // 12.2.1 + // ECMA-262 12.2.1 if (strict && isRestrictedWord(id.name)) { tolerateError(Messages.StrictVarName); } @@ -3771,23 +4052,23 @@ if (match('=')) { lex(); init = isolateCoverGrammar(parseAssignmentExpression); - } else if (id.type !== Syntax.Identifier) { + } else if (id.type !== Syntax.Identifier && !options.inFor) { expect('='); } return node.finishVariableDeclarator(id, init); } - function parseVariableDeclarationList() { - var list = []; + function parseVariableDeclarationList(options) { + var opt, list; - do { - list.push(parseVariableDeclaration()); - if (!match(',')) { - break; - } + opt = { inFor: options.inFor }; + list = [parseVariableDeclaration(opt)]; + + while (match(',')) { lex(); - } while (startIndex < length); + list.push(parseVariableDeclaration(opt)); + } return list; } @@ -3797,25 +4078,27 @@ expectKeyword('var'); - declarations = parseVariableDeclarationList(); + declarations = parseVariableDeclarationList({ inFor: false }); consumeSemicolon(); return node.finishVariableDeclaration(declarations); } + // ECMA-262 13.3.1 Let and Const Declarations + function parseLexicalBinding(kind, options) { - var init = null, id, node = new Node(); + var init = null, id, node = new Node(), params = []; - id = parsePattern(); + id = parsePattern(params, kind); - // 12.2.1 + // ECMA-262 12.2.1 if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) { tolerateError(Messages.StrictVarName); } if (kind === 'const') { - if (!matchKeyword('in')) { + if (!matchKeyword('in') && !matchContextualKeyword('of')) { expect('='); init = isolateCoverGrammar(parseAssignmentExpression); } @@ -3828,19 +4111,65 @@ } function parseBindingList(kind, options) { - var list = []; + var list = [parseLexicalBinding(kind, options)]; - do { - list.push(parseLexicalBinding(kind, options)); - if (!match(',')) { - break; - } + while (match(',')) { lex(); - } while (startIndex < length); + list.push(parseLexicalBinding(kind, options)); + } return list; } + + function tokenizerState() { + return { + index: index, + lineNumber: lineNumber, + lineStart: lineStart, + hasLineTerminator: hasLineTerminator, + lastIndex: lastIndex, + lastLineNumber: lastLineNumber, + lastLineStart: lastLineStart, + startIndex: startIndex, + startLineNumber: startLineNumber, + startLineStart: startLineStart, + lookahead: lookahead, + tokenCount: extra.tokens ? extra.tokens.length : 0 + }; + } + + function resetTokenizerState(ts) { + index = ts.index; + lineNumber = ts.lineNumber; + lineStart = ts.lineStart; + hasLineTerminator = ts.hasLineTerminator; + lastIndex = ts.lastIndex; + lastLineNumber = ts.lastLineNumber; + lastLineStart = ts.lastLineStart; + startIndex = ts.startIndex; + startLineNumber = ts.startLineNumber; + startLineStart = ts.startLineStart; + lookahead = ts.lookahead; + if (extra.tokens) { + extra.tokens.splice(ts.tokenCount, extra.tokens.length); + } + } + + function isLexicalDeclaration() { + var lexical, ts; + + ts = tokenizerState(); + + lex(); + lexical = (lookahead.type === Token.Identifier) || match('[') || match('{') || + matchKeyword('let') || matchKeyword('yield'); + + resetTokenizerState(ts); + + return lexical; + } + function parseLexicalDeclaration(options) { var kind, declarations, node = new Node(); @@ -3854,7 +4183,7 @@ return node.finishLexicalDeclaration(declarations, kind); } - function parseRestElement() { + function parseRestElement(params) { var param, node = new Node(); lex(); @@ -3863,6 +4192,8 @@ throwError(Messages.ObjectPatternAsRestParameter); } + params.push(lookahead); + param = parseVariableIdentifier(); if (match('=')) { @@ -3876,14 +4207,14 @@ return node.finishRestElement(param); } - // 12.3 Empty Statement + // ECMA-262 13.4 Empty Statement function parseEmptyStatement(node) { expect(';'); return node.finishEmptyStatement(); } - // 12.4 Expression Statement + // ECMA-262 12.4 Expression Statement function parseExpressionStatement(node) { var expr = parseExpression(); @@ -3891,7 +4222,7 @@ return node.finishExpressionStatement(expr); } - // 12.5 If statement + // ECMA-262 13.6 If statement function parseIfStatement(node) { var test, consequent, alternate; @@ -3916,7 +4247,7 @@ return node.finishIfStatement(test, consequent, alternate); } - // 12.6 Iteration Statements + // ECMA-262 13.7 Iteration Statements function parseDoWhileStatement(node) { var body, test, oldInIteration; @@ -3967,10 +4298,11 @@ } function parseForStatement(node) { - var init, initSeq, initStartToken, test, update, left, right, kind, declarations, + var init, forIn, initSeq, initStartToken, test, update, left, right, kind, declarations, body, oldInIteration, previousAllowIn = state.allowIn; init = test = update = null; + forIn = true; expectKeyword('for'); @@ -3984,34 +4316,58 @@ lex(); state.allowIn = false; - init = init.finishVariableDeclaration(parseVariableDeclarationList()); + declarations = parseVariableDeclarationList({ inFor: true }); state.allowIn = previousAllowIn; - if (init.declarations.length === 1 && matchKeyword('in')) { + if (declarations.length === 1 && matchKeyword('in')) { + init = init.finishVariableDeclaration(declarations); lex(); left = init; right = parseExpression(); init = null; + } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { + init = init.finishVariableDeclaration(declarations); + lex(); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; } else { + init = init.finishVariableDeclaration(declarations); expect(';'); } } else if (matchKeyword('const') || matchKeyword('let')) { init = new Node(); kind = lex().value; - state.allowIn = false; - declarations = parseBindingList(kind, {inFor: true}); - state.allowIn = previousAllowIn; - - if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) { - init = init.finishLexicalDeclaration(declarations, kind); + if (!strict && lookahead.value === 'in') { + init = init.finishIdentifier(kind); lex(); left = init; right = parseExpression(); init = null; } else { - consumeSemicolon(); - init = init.finishLexicalDeclaration(declarations, kind); + state.allowIn = false; + declarations = parseBindingList(kind, {inFor: true}); + state.allowIn = previousAllowIn; + + if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) { + init = init.finishLexicalDeclaration(declarations, kind); + lex(); + left = init; + right = parseExpression(); + init = null; + } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { + init = init.finishLexicalDeclaration(declarations, kind); + lex(); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; + } else { + consumeSemicolon(); + init = init.finishLexicalDeclaration(declarations, kind); + } } } else { initStartToken = lookahead; @@ -4029,6 +4385,17 @@ left = init; right = parseExpression(); init = null; + } else if (matchContextualKeyword('of')) { + if (!isAssignmentTarget) { + tolerateError(Messages.InvalidLHSInForLoop); + } + + lex(); + reinterpretExpressionAsPattern(init); + left = init; + right = parseAssignmentExpression(); + init = null; + forIn = false; } else { if (match(',')) { initSeq = [init]; @@ -4066,10 +4433,11 @@ return (typeof left === 'undefined') ? node.finishForStatement(init, test, update, body) : - node.finishForInStatement(left, right, body); + forIn ? node.finishForInStatement(left, right, body) : + node.finishForOfStatement(left, right, body); } - // 12.7 The continue statement + // ECMA-262 13.8 The continue statement function parseContinueStatement(node) { var label = null, key; @@ -4113,7 +4481,7 @@ return node.finishContinueStatement(label); } - // 12.8 The break statement + // ECMA-262 13.9 The break statement function parseBreakStatement(node) { var label = null, key; @@ -4135,11 +4503,7 @@ if (!(state.inIteration || state.inSwitch)) { throwError(Messages.IllegalBreak); } - - return node.finishBreakStatement(null); - } - - if (lookahead.type === Token.Identifier) { + } else if (lookahead.type === Token.Identifier) { label = parseVariableIdentifier(); key = '$' + label.name; @@ -4157,7 +4521,7 @@ return node.finishBreakStatement(label); } - // 12.9 The return statement + // ECMA-262 13.10 The return statement function parseReturnStatement(node) { var argument = null; @@ -4193,7 +4557,7 @@ return node.finishReturnStatement(argument); } - // 12.10 The with statement + // ECMA-262 13.11 The with statement function parseWithStatement(node) { var object, body; @@ -4215,7 +4579,7 @@ return node.finishWithStatement(object, body); } - // 12.10 The swith statement + // ECMA-262 13.12 The switch statement function parseSwitchCase() { var test, consequent = [], statement, node = new Node(); @@ -4285,7 +4649,7 @@ return node.finishSwitchStatement(discriminant, cases); } - // 12.13 The throw statement + // ECMA-262 13.14 The throw statement function parseThrowStatement(node) { var argument; @@ -4303,10 +4667,10 @@ return node.finishThrowStatement(argument); } - // 12.14 The try statement + // ECMA-262 13.15 The try statement function parseCatchClause() { - var param, body, node = new Node(); + var param, params = [], paramMap = {}, key, i, body, node = new Node(); expectKeyword('catch'); @@ -4315,9 +4679,16 @@ throwUnexpectedToken(lookahead); } - param = parsePattern(); + param = parsePattern(params); + for (i = 0; i < params.length; i++) { + key = '$' + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) { + tolerateError(Messages.DuplicateBinding, params[i].value); + } + paramMap[key] = true; + } - // 12.14.1 + // ECMA-262 12.14.1 if (strict && isRestrictedWord(param.name)) { tolerateError(Messages.StrictCatchVariable); } @@ -4350,7 +4721,7 @@ return node.finishTryStatement(block, handler, finalizer); } - // 12.15 The debugger statement + // ECMA-262 13.16 The debugger statement function parseDebuggerStatement(node) { expectKeyword('debugger'); @@ -4360,7 +4731,7 @@ return node.finishDebuggerStatement(); } - // 12 Statements + // 13 Statements function parseStatement() { var type = lookahead.type, @@ -4425,7 +4796,7 @@ expr = parseExpression(); - // 12.12 Labelled Statements + // ECMA-262 12.12 Labelled Statements if ((expr.type === Syntax.Identifier) && match(':')) { lex(); @@ -4445,7 +4816,7 @@ return node.finishExpressionStatement(expr); } - // 13 Function Definition + // ECMA-262 14.1 Function Definition function parseFunctionSourceElements() { var statement, body = [], token, directive, firstRestricted, @@ -4528,7 +4899,7 @@ options.firstRestricted = param; options.message = Messages.StrictReservedWord; } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.firstRestricted = param; + options.stricted = param; options.message = Messages.StrictParamDupe; } } @@ -4536,19 +4907,21 @@ } function parseParam(options) { - var token, param, def; + var token, param, params = [], i, def; token = lookahead; if (token.value === '...') { - param = parseRestElement(); + param = parseRestElement(params); validateParam(options, param.argument, param.argument.name); options.params.push(param); options.defaults.push(null); return false; } - param = parsePatternWithDefault(); - validateParam(options, token, token.value); + param = parsePatternWithDefault(params); + for (i = 0; i < params.length; i++) { + validateParam(options, params[i], params[i].value); + } if (param.type === Syntax.AssignmentPattern) { def = param.right; @@ -4600,9 +4973,18 @@ } function parseFunctionDeclaration(node, identifierIsOptional) { - var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict; + var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, + isGenerator, previousAllowYield; + + previousAllowYield = state.allowYield; expectKeyword('function'); + + isGenerator = match('*'); + if (isGenerator) { + lex(); + } + if (!identifierIsOptional || !match('(')) { token = lookahead; id = parseVariableIdentifier(); @@ -4621,6 +5003,7 @@ } } + state.allowYield = !isGenerator; tmp = parseParams(firstRestricted); params = tmp.params; defaults = tmp.defaults; @@ -4630,6 +5013,7 @@ message = tmp.message; } + previousStrict = strict; body = parseFunctionSourceElements(); if (strict && firstRestricted) { @@ -4638,20 +5022,31 @@ if (strict && stricted) { tolerateUnexpectedToken(stricted, message); } + strict = previousStrict; + state.allowYield = previousAllowYield; - return node.finishFunctionDeclaration(id, params, defaults, body); + return node.finishFunctionDeclaration(id, params, defaults, body, isGenerator); } function parseFunctionExpression() { var token, id = null, stricted, firstRestricted, message, tmp, - params = [], defaults = [], body, previousStrict, node = new Node(); + params = [], defaults = [], body, previousStrict, node = new Node(), + isGenerator, previousAllowYield; + + previousAllowYield = state.allowYield; expectKeyword('function'); + isGenerator = match('*'); + if (isGenerator) { + lex(); + } + + state.allowYield = !isGenerator; if (!match('(')) { token = lookahead; - id = parseVariableIdentifier(); + id = (!strict && !isGenerator && matchKeyword('yield')) ? parseNonComputedProperty() : parseVariableIdentifier(); if (strict) { if (isRestrictedWord(token.value)) { tolerateUnexpectedToken(token, Messages.StrictFunctionName); @@ -4685,10 +5080,12 @@ tolerateUnexpectedToken(stricted, message); } strict = previousStrict; + state.allowYield = previousAllowYield; - return node.finishFunctionExpression(id, params, defaults, body); + return node.finishFunctionExpression(id, params, defaults, body, isGenerator); } + // ECMA-262 14.5 Class Definitions function parseClassBody() { var classBody, token, isStatic, hasConstructor = false, body, method, computed, key; @@ -4705,16 +5102,24 @@ token = lookahead; isStatic = false; computed = match('['); - key = parseObjectPropertyKey(); - if (key.name === 'static' && lookaheadPropertyName()) { - token = lookahead; - isStatic = true; - computed = match('['); + if (match('*')) { + lex(); + } else { key = parseObjectPropertyKey(); + if (key.name === 'static' && (lookaheadPropertyName() || match('*'))) { + token = lookahead; + isStatic = true; + computed = match('['); + if (match('*')) { + lex(); + } else { + key = parseObjectPropertyKey(); + } + } } method = tryParseMethodDefinition(token, key, computed, method); if (method) { - method['static'] = isStatic; + method['static'] = isStatic; // jscs:ignore requireDotNotation if (method.kind === 'init') { method.kind = 'method'; } @@ -4788,8 +5193,7 @@ return classNode.finishClassExpression(id, superClass, classBody); } - // Modules grammar from: - // people.mozilla.org/~jorendorff/es6-draft.html + // ECMA-262 15.2 Modules function parseModuleSpecifier() { var node = new Node(); @@ -4800,6 +5204,8 @@ return node.finishLiteral(lex()); } + // ECMA-262 15.2.3 Exports + function parseExportSpecifier() { var exported, local, node = new Node(), def; if (matchKeyword('default')) { @@ -4829,6 +5235,8 @@ switch (lookahead.value) { case 'let': case 'const': + declaration = parseLexicalDeclaration({inFor: false}); + return node.finishExportNamedDeclaration(declaration, specifiers, null); case 'var': case 'class': case 'function': @@ -4838,11 +5246,15 @@ } expect('{'); - if (!match('}')) { - do { - isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); - specifiers.push(parseExportSpecifier()); - } while (match(',') && lex()); + while (!match('}')) { + isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); + specifiers.push(parseExportSpecifier()); + if (!match('}')) { + expect(','); + if (match('}')) { + break; + } + } } expect('}'); @@ -4895,9 +5307,9 @@ // export default []; // export default (1 + 2); if (match('{')) { - expression = parseObjectInitialiser(); + expression = parseObjectInitializer(); } else if (match('[')) { - expression = parseArrayInitialiser(); + expression = parseArrayInitializer(); } else { expression = parseAssignmentExpression(); } @@ -4939,6 +5351,8 @@ return parseExportNamedDeclaration(node); } + // ECMA-262 15.2.2 Imports + function parseImportSpecifier() { // import {} ...; var local, imported, node = new Node(); @@ -4956,10 +5370,14 @@ var specifiers = []; // {foo, bar as bas} expect('{'); - if (!match('}')) { - do { - specifiers.push(parseImportSpecifier()); - } while (match(',') && lex()); + while (!match('}')) { + specifiers.push(parseImportSpecifier()); + if (!match('}')) { + expect(','); + if (match('}')) { + break; + } + } } expect('}'); return specifiers; @@ -4989,56 +5407,57 @@ } function parseImportDeclaration() { - var specifiers, src, node = new Node(); + var specifiers = [], src, node = new Node(); if (state.inFunctionBody) { throwError(Messages.IllegalImportDeclaration); } expectKeyword('import'); - specifiers = []; if (lookahead.type === Token.StringLiteral) { - // covers: // import 'foo'; src = parseModuleSpecifier(); - consumeSemicolon(); - return node.finishImportDeclaration(specifiers, src); - } + } else { - if (!matchKeyword('default') && isIdentifierName(lookahead)) { - // covers: - // import foo - // import foo, ... - specifiers.push(parseImportDefaultSpecifier()); - if (match(',')) { - lex(); + if (match('{')) { + // import {bar} + specifiers = specifiers.concat(parseNamedImports()); + } else if (match('*')) { + // import * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (isIdentifierName(lookahead) && !matchKeyword('default')) { + // import foo + specifiers.push(parseImportDefaultSpecifier()); + if (match(',')) { + lex(); + if (match('*')) { + // import foo, * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (match('{')) { + // import foo, {bar} + specifiers = specifiers.concat(parseNamedImports()); + } else { + throwUnexpectedToken(lookahead); + } + } + } else { + throwUnexpectedToken(lex()); } - } - if (match('*')) { - // covers: - // import foo, * as foo - // import * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (match('{')) { - // covers: - // import foo, {bar} - // import {bar} - specifiers = specifiers.concat(parseNamedImports()); - } - if (!matchContextualKeyword('from')) { - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + if (!matchContextualKeyword('from')) { + throwError(lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); } - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); + consumeSemicolon(); return node.finishImportDeclaration(specifiers, src); } - // 14 Program + // ECMA-262 15.1 Scripts function parseScriptBody() { var statement, body = [], token, directive, firstRestricted; @@ -5086,7 +5505,7 @@ node = new Node(); body = parseScriptBody(); - return node.finishProgram(body); + return node.finishProgram(body, state.sourceType); } function filterTokenLocation() { @@ -5116,7 +5535,7 @@ extra.tokens = tokens; } - function tokenize(code, options) { + function tokenize(code, options, delegate) { var toString, tokens; @@ -5136,6 +5555,7 @@ lookahead = null; state = { allowIn: true, + allowYield: true, labelSet: {}, inFunctionBody: false, inIteration: false, @@ -5152,7 +5572,10 @@ // Of course we collect tokens here. options.tokens = true; extra.tokens = []; + extra.tokenValues = []; extra.tokenize = true; + extra.delegate = delegate; + // The following two fields are necessary to compute the Regex tokens. extra.openParenToken = -1; extra.openCurlyToken = -1; @@ -5189,11 +5612,7 @@ } } - filterTokenLocation(); tokens = extra.tokens; - if (typeof extra.comments !== 'undefined') { - tokens.comments = extra.comments; - } if (typeof extra.errors !== 'undefined') { tokens.errors = extra.errors; } @@ -5224,14 +5643,15 @@ lookahead = null; state = { allowIn: true, + allowYield: true, labelSet: {}, inFunctionBody: false, inIteration: false, inSwitch: false, lastCommentStart: -1, - curlyStack: [] + curlyStack: [], + sourceType: 'script' }; - sourceType = 'script'; strict = false; extra = {}; @@ -5262,7 +5682,7 @@ } if (options.sourceType === 'module') { // very restrictive condition for now - sourceType = options.sourceType; + state.sourceType = options.sourceType; strict = true; } } @@ -5289,7 +5709,7 @@ } // Sync with *.json manifests. - exports.version = '2.2.0'; + exports.version = '2.7.1'; exports.tokenize = tokenize; diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/package.json b/tools/eslint/node_modules/js-yaml/node_modules/esprima/package.json index 965f6cb6afe6a4..4589c804712e0a 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/package.json +++ b/tools/eslint/node_modules/js-yaml/node_modules/esprima/package.json @@ -1,57 +1,90 @@ { - "name": "esprima", - "description": "ECMAScript parsing infrastructure for multipurpose analysis", - "homepage": "http://esprima.org", - "main": "esprima.js", - "bin": { - "esparse": "./bin/esparse.js", - "esvalidate": "./bin/esvalidate.js" - }, - "version": "2.2.0", - "files": [ - "bin", - "test/run.js", - "test/runner.js", - "test/test.js", - "esprima.js" + "_args": [ + [ + "esprima@^2.6.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/js-yaml" + ] ], - "engines": { - "node": ">=0.4.0" + "_from": "esprima@>=2.6.0 <3.0.0", + "_id": "esprima@2.7.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/js-yaml/esprima", + "_nodeVersion": "4.2.2", + "_npmUser": { + "email": "ariya.hidayat@gmail.com", + "name": "ariya" }, - "author": { - "name": "Ariya Hidayat", - "email": "ariya.hidayat@gmail.com" + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "esprima", + "raw": "esprima@^2.6.0", + "rawSpec": "^2.6.0", + "scope": null, + "spec": ">=2.6.0 <3.0.0", + "type": "range" }, - "maintainers": [ - { - "name": "ariya", - "email": "ariya.hidayat@gmail.com" - } + "_requiredBy": [ + "/eslint/js-yaml" ], - "repository": { - "type": "git", - "url": "git+https://github.com/jquery/esprima.git" + "_resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.1.tgz", + "_shasum": "2ab7d1549edd06d14d69a6c1a1754aca02e9657e", + "_shrinkwrap": null, + "_spec": "esprima@^2.6.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/js-yaml", + "author": { + "email": "ariya.hidayat@gmail.com", + "name": "Ariya Hidayat" + }, + "bin": { + "esparse": "./bin/esparse.js", + "esvalidate": "./bin/esvalidate.js" }, "bugs": { - "url": "http://issues.esprima.org" + "url": "https://github.com/jquery/esprima/issues" }, - "licenses": [ - { - "type": "BSD", - "url": "https://github.com/jquery/esprima/raw/master/LICENSE.BSD" - } - ], + "dependencies": {}, + "description": "ECMAScript parsing infrastructure for multipurpose analysis", "devDependencies": { - "eslint": "~0.19.0", - "jscs": "~1.12.0", - "istanbul": "~0.3.7", + "codecov.io": "~0.1.6", "escomplex-js": "1.2.0", - "complexity-report": "~1.4.0", - "regenerate": "~0.6.2", - "unicode-7.0.0": "~0.1.5", + "eslint": "~1.7.2", + "everything.js": "~1.0.3", + "glob": "^5.0.15", + "istanbul": "~0.4.0", + "jscs": "~2.3.5", "json-diff": "~0.3.1", - "optimist": "~0.6.0" + "karma": "^0.13.11", + "karma-chrome-launcher": "^0.2.1", + "karma-detect-browsers": "^2.0.2", + "karma-firefox-launcher": "^0.1.6", + "karma-ie-launcher": "^0.2.0", + "karma-mocha": "^0.2.0", + "karma-safari-launcher": "^0.1.1", + "karma-sauce-launcher": "^0.2.14", + "lodash": "^3.10.0", + "mocha": "^2.3.3", + "node-tick-processor": "~0.0.2", + "regenerate": "~1.2.1", + "temp": "~0.8.3", + "unicode-7.0.0": "~0.1.5" }, + "directories": {}, + "dist": { + "shasum": "2ab7d1549edd06d14d69a6c1a1754aca02e9657e", + "tarball": "http://registry.npmjs.org/esprima/-/esprima-2.7.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "bin", + "esprima.js", + "unit-tests.js" + ], + "gitHead": "8bf04c923b7eb7dbe1ba2dc119f9ded31b45dcd2", + "homepage": "http://esprima.org", "keywords": [ "ast", "ecmascript", @@ -59,35 +92,50 @@ "parser", "syntax" ], + "license": "BSD-2-Clause", + "main": "esprima.js", + "maintainers": [ + { + "name": "ariya", + "email": "ariya.hidayat@gmail.com" + } + ], + "name": "esprima", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jquery/esprima.git" + }, "scripts": { - "generate-regex": "node tools/generate-identifier-regex.js", - "test": "node test/run.js && npm run lint && npm run coverage", - "lint": "npm run check-version && npm run eslint && npm run jscs && npm run complexity", - "check-version": "node tools/check-version.js", - "jscs": "jscs esprima.js", - "eslint": "node node_modules/eslint/bin/eslint.js esprima.js", - "complexity": "node tools/list-complexity.js && cr -s -l -w --maxcyc 17 esprima.js", - "coverage": "npm run analyze-coverage && npm run check-coverage", - "analyze-coverage": "istanbul cover test/runner.js", - "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", + "all-tests": "npm run generate-fixtures && npm run unit-tests && npm run grammar-tests && npm run regression-tests", + "analyze-coverage": "istanbul cover test/unit-tests.js", + "appveyor": "npm run all-tests && npm run browser-tests && npm run dynamic-analysis", "benchmark": "node test/benchmarks.js", - "benchmark-quick": "node test/benchmarks.js quick" - }, - "gitHead": "deef03ca006b03912d9f74b041f9239a9045181f", - "_id": "esprima@2.2.0", - "_shasum": "4292c1d68e4173d815fa2290dc7afc96d81fcd83", - "_from": "esprima@>=2.2.0 <2.3.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "ariya", - "email": "ariya.hidayat@gmail.com" - }, - "dist": { - "shasum": "4292c1d68e4173d815fa2290dc7afc96d81fcd83", - "tarball": "http://registry.npmjs.org/esprima/-/esprima-2.2.0.tgz" + "benchmark-quick": "node test/benchmarks.js quick", + "browser-tests": "npm run generate-fixtures && cd test && karma start --single-run", + "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", + "check-version": "node test/check-version.js", + "circleci": "npm test && npm run codecov && npm run downstream", + "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", + "complexity": "node test/check-complexity.js", + "downstream": "node test/downstream.js", + "droneio": "npm test && npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", + "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", + "eslint": "node node_modules/eslint/bin/eslint.js -c .lintrc esprima.js", + "generate-fixtures": "node tools/generate-fixtures.js", + "generate-regex": "node tools/generate-identifier-regex.js", + "grammar-tests": "node test/grammar-tests.js", + "jscs": "jscs -p crockford esprima.js && jscs -p crockford test/*.js", + "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", + "regression-tests": "node test/regression-tests.js", + "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", + "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", + "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", + "static-analysis": "npm run check-version && npm run jscs && npm run eslint && npm run complexity", + "test": "npm run all-tests && npm run static-analysis && npm run dynamic-analysis", + "travis": "npm test", + "unit-tests": "node test/unit-tests.js" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/esprima/-/esprima-2.2.0.tgz", - "readme": "ERROR: No README data found!" + "version": "2.7.1" } diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/run.js b/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/run.js deleted file mode 100644 index a5b919bfdf0003..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/run.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - 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 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. -*/ - -/*jslint node:true */ - -(function () { - 'use strict'; - - var child = require('child_process'), - nodejs = '"' + process.execPath + '"', - ret = 0, - suites, - index; - - suites = [ - 'runner', - 'parselibs' - ]; - - function nextTest() { - var suite = suites[index]; - - if (index < suites.length) { - child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { - if (stdout) { - process.stdout.write(suite + ': ' + stdout); - } - if (stderr) { - process.stderr.write(suite + ': ' + stderr); - } - if (err) { - ret = err.code; - } - index += 1; - nextTest(); - }); - } else { - process.exit(ret); - } - } - - index = 0; - nextTest(); -}()); diff --git a/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/runner.js b/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/runner.js deleted file mode 100644 index 7f4a1738bb9e85..00000000000000 --- a/tools/eslint/node_modules/js-yaml/node_modules/esprima/test/runner.js +++ /dev/null @@ -1,475 +0,0 @@ -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - Copyright (C) 2011 Yusuke Suzuki - Copyright (C) 2011 Arpad Borsos - - 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 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. -*/ - -/*jslint browser:true node:true */ -/*global esprima:true, testFixture:true */ - -var runTests; - -function NotMatchingError(expected, actual) { - 'use strict'; - Error.call(this, 'Expected '); - this.expected = expected; - this.actual = actual; -} -NotMatchingError.prototype = new Error(); - -function errorToObject(e) { - 'use strict'; - var msg = e.toString(); - - // Opera 9.64 produces an non-standard string in toString(). - if (msg.substr(0, 6) !== 'Error:') { - if (typeof e.message === 'string') { - msg = 'Error: ' + e.message; - } - } - - return { - index: e.index, - lineNumber: e.lineNumber, - column: e.column, - message: msg - }; -} - -function sortedObject(o) { - if (o === null) { - return o; - } - if (Array.isArray(o)) { - return o.map(sortedObject); - } - if (typeof o !== 'object') { - return o; - } - if (o instanceof RegExp) { - return o; - } - var keys = Object.keys(o); - var result = { - range: undefined, - loc: undefined - }; - keys.forEach(function (key) { - if (o.hasOwnProperty(key)){ - result[key] = sortedObject(o[key]); - } - }); - return result; -} - -function hasAttachedComment(syntax) { - var key; - for (key in syntax) { - if (key === 'leadingComments' || key === 'trailingComments') { - return true; - } - if (typeof syntax[key] === 'object' && syntax[key] !== null) { - if (hasAttachedComment(syntax[key])) { - return true; - } - } - } - return false; -} - -function testParse(esprima, code, syntax) { - 'use strict'; - var expected, tree, actual, options, StringObject, i, len; - - // alias, so that JSLint does not complain. - StringObject = String; - - options = { - comment: (typeof syntax.comments !== 'undefined'), - range: true, - loc: true, - tokens: (typeof syntax.tokens !== 'undefined'), - raw: true, - tolerant: (typeof syntax.errors !== 'undefined'), - source: null, - sourceType: syntax.sourceType - }; - - if (options.comment) { - options.attachComment = hasAttachedComment(syntax); - } - - if (typeof syntax.tokens !== 'undefined') { - if (syntax.tokens.length > 0) { - options.range = (typeof syntax.tokens[0].range !== 'undefined'); - options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); - } - } - - if (typeof syntax.comments !== 'undefined') { - if (syntax.comments.length > 0) { - options.range = (typeof syntax.comments[0].range !== 'undefined'); - options.loc = (typeof syntax.comments[0].loc !== 'undefined'); - } - } - - if (options.loc) { - options.source = syntax.loc.source; - } - - syntax = sortedObject(syntax); - expected = JSON.stringify(syntax, null, 4); - try { - // Some variations of the options. - tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType }); - tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType, range: true }); - tree = esprima.parse(code, { tolerant: options.tolerant, sourceType: options.sourceType, loc: true }); - - tree = esprima.parse(code, options); - - if (options.tolerant) { - for (i = 0, len = tree.errors.length; i < len; i += 1) { - tree.errors[i] = errorToObject(tree.errors[i]); - } - } - tree = sortedObject(tree); - actual = JSON.stringify(tree, null, 4); - - // Only to ensure that there is no error when using string object. - esprima.parse(new StringObject(code), options); - - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } - - function filter(key, value) { - return (key === 'loc' || key === 'range') ? undefined : value; - } - - if (options.tolerant) { - return; - } - - - // Check again without any location info. - options.range = false; - options.loc = false; - syntax = sortedObject(syntax); - expected = JSON.stringify(syntax, filter, 4); - try { - tree = esprima.parse(code, options); - - if (options.tolerant) { - for (i = 0, len = tree.errors.length; i < len; i += 1) { - tree.errors[i] = errorToObject(tree.errors[i]); - } - } - tree = sortedObject(tree); - actual = JSON.stringify(tree, filter, 4); - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } -} - -function testTokenize(esprima, code, tokens) { - 'use strict'; - var options, expected, actual, tree; - - options = { - comment: true, - tolerant: true, - loc: true, - range: true - }; - - expected = JSON.stringify(tokens, null, 4); - - try { - tree = esprima.tokenize(code, options); - actual = JSON.stringify(tree, null, 4); - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } -} - - -function testModule(esprima, code, exception) { - 'use strict'; - var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize; - - // Different parsing options should give the same error. - options = [ - { sourceType: 'module' }, - { sourceType: 'module', comment: true }, - { sourceType: 'module', raw: true }, - { sourceType: 'module', raw: true, comment: true } - ]; - - if (!exception.message) { - exception.message = 'Error: Line 1: ' + exception.description; - } - exception.description = exception.message.replace(/Error: Line [0-9]+: /, ''); - - expected = JSON.stringify(exception); - - for (i = 0; i < options.length; i += 1) { - - try { - esprima.parse(code, options[i]); - } catch (e) { - err = errorToObject(e); - err.description = e.description; - actual = JSON.stringify(err); - } - - if (expected !== actual) { - - // Compensate for old V8 which does not handle invalid flag. - if (exception.message.indexOf('Invalid regular expression') > 0) { - if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { - return; - } - } - - throw new NotMatchingError(expected, actual); - } - - } -} - -function testError(esprima, code, exception) { - 'use strict'; - var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize; - - // Different parsing options should give the same error. - options = [ - {}, - { comment: true }, - { raw: true }, - { raw: true, comment: true } - ]; - - // If handleInvalidRegexFlag is true, an invalid flag in a regular expression - // will throw an exception. In some old version of V8, this is not the case - // and hence handleInvalidRegexFlag is false. - handleInvalidRegexFlag = false; - try { - 'test'.match(new RegExp('[a-z]', 'x')); - } catch (e) { - handleInvalidRegexFlag = true; - } - - exception.description = exception.message.replace(/Error: Line [0-9]+: /, ''); - - if (exception.tokenize) { - tokenize = true; - exception.tokenize = undefined; - } - expected = JSON.stringify(exception); - - for (i = 0; i < options.length; i += 1) { - - try { - if (tokenize) { - esprima.tokenize(code, options[i]); - } else { - esprima.parse(code, options[i]); - } - } catch (e) { - err = errorToObject(e); - err.description = e.description; - actual = JSON.stringify(err); - } - - if (expected !== actual) { - - // Compensate for old V8 which does not handle invalid flag. - if (exception.message.indexOf('Invalid regular expression') > 0) { - if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { - return; - } - } - - throw new NotMatchingError(expected, actual); - } - - } -} - -function testAPI(esprima, code, expected) { - var result; - // API test. - expected = JSON.stringify(expected, null, 4); - try { - result = eval(code); - result = JSON.stringify(result, null, 4); - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== result) { - throw new NotMatchingError(expected, result); - } -} - -function generateTestCase(esprima, testCase) { - var tree, fileName = testCase.key + ".tree.json"; - try { - tree = esprima.parse(testCase.case, {loc: true, range: true}); - tree = JSON.stringify(tree, null, 4); - } catch (e) { - if (typeof e.index === 'undefined') { - console.error("Failed to generate test result."); - throw e; - } - tree = errorToObject(e); - tree.description = e.description; - tree = JSON.stringify(tree); - fileName = testCase.key + ".failure.json"; - } - require('fs').writeFileSync(fileName, tree); - console.error("Done."); -} - -if (typeof window === 'undefined') { - (function () { - 'use strict'; - - var esprima = require('../esprima'), - vm = require('vm'), - fs = require('fs'), - diff = require('json-diff').diffString, - total = 0, - result, - failures = [], - cases = {}, - context = {source: '', result: null}, - tick = new Date(), - expected, - testCase, - header; - - function enumerateFixtures(root) { - var dirs = fs.readdirSync(root), key, kind, - kinds = ['case', 'source', 'module', 'run', 'tree', 'tokens', 'failure', 'result'], - suffices = ['js', 'js', 'json', 'js', 'json', 'json', 'json', 'json']; - - dirs.forEach(function (item) { - var i; - if (fs.statSync(root + '/' + item).isDirectory()) { - enumerateFixtures(root + '/' + item); - } else { - kind = 'case'; - key = item.slice(0, -3); - for (i = 1; i < kinds.length; i++) { - var suffix = '.' + kinds[i] + '.' + suffices[i]; - if (item.slice(-suffix.length) === suffix) { - key = item.slice(0, -suffix.length); - kind = kinds[i]; - } - } - key = root + '/' + key; - if (!cases[key]) { - total++; - cases[key] = { key: key }; - } - cases[key][kind] = fs.readFileSync(root + '/' + item, 'utf-8'); - } - }); - } - - enumerateFixtures(__dirname + '/fixtures'); - - for (var key in cases) { - if (cases.hasOwnProperty(key)) { - testCase = cases[key]; - - if (testCase.hasOwnProperty('source')) { - testCase.case = eval(testCase.source + ';source'); - } - - try { - if (testCase.hasOwnProperty('module')) { - testModule(esprima, testCase.case, JSON.parse(testCase.module)); - } else if (testCase.hasOwnProperty('tree')) { - testParse(esprima, testCase.case, JSON.parse(testCase.tree)); - } else if (testCase.hasOwnProperty('tokens')) { - testTokenize(esprima, testCase.case, JSON.parse(testCase.tokens)); - } else if (testCase.hasOwnProperty('failure')) { - testError(esprima, testCase.case, JSON.parse(testCase.failure)); - } else if (testCase.hasOwnProperty('result')) { - testAPI(esprima, testCase.run, JSON.parse(testCase.result)); - } else { - console.error('Incomplete test case:' + testCase.key + '. Generating test result...'); - generateTestCase(esprima, testCase); - } - } catch (e) { - if (!e.expected) { - throw e; - } - e.source = testCase.case || testCase.key; - failures.push(e); - } - } - } - - tick = (new Date()) - tick; - - header = total + ' tests. ' + failures.length + ' failures. ' + - tick + ' ms'; - if (failures.length) { - console.error(header); - failures.forEach(function (failure) { - try { - var expectedObject = JSON.parse(failure.expected); - var actualObject = JSON.parse(failure.actual); - - console.error(failure.source + ': Expected\n ' + - failure.expected.split('\n').join('\n ') + - '\nto match\n ' + failure.actual + '\nDiff:\n' + - diff(expectedObject, actualObject)); - } catch (ex) { - console.error(failure.source + ': Expected\n ' + - failure.expected.split('\n').join('\n ') + - '\nto match\n ' + failure.actual); - } - }); - } else { - console.log(header); - } - process.exit(failures.length === 0 ? 0 : 1); - - }()); -} diff --git a/tools/eslint/node_modules/js-yaml/package.json b/tools/eslint/node_modules/js-yaml/package.json index 724ed14a24dc40..ccae6962da08bc 100644 --- a/tools/eslint/node_modules/js-yaml/package.json +++ b/tools/eslint/node_modules/js-yaml/package.json @@ -1,17 +1,50 @@ { - "name": "js-yaml", - "version": "3.3.1", - "description": "YAML 1.2 parser and serializer", - "keywords": [ - "yaml", - "parser", - "serializer", - "pyyaml" + "_args": [ + [ + "js-yaml@3.4.5", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] ], - "homepage": "https://github.com/nodeca/js-yaml", + "_from": "js-yaml@3.4.5", + "_id": "js-yaml@3.4.5", + "_inCache": true, + "_installable": true, + "_location": "/eslint/js-yaml", + "_nodeVersion": "4.2.2", + "_npmUser": { + "email": "vitaly@rcdesign.ru", + "name": "vitaly" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "js-yaml", + "raw": "js-yaml@3.4.5", + "rawSpec": "3.4.5", + "scope": null, + "spec": "3.4.5", + "type": "version" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz", + "_shasum": "c3403797df12b91866574f2de23646fe8cafb44d", + "_shrinkwrap": null, + "_spec": "js-yaml@3.4.5", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", "author": { - "name": "Dervus Grim", - "email": "dervus.grim@gmail.com" + "email": "dervus.grim@gmail.com", + "name": "Vladimir Zapparov" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + }, + "browser": { + "buffer": false + }, + "bugs": { + "url": "https://github.com/nodeca/js-yaml/issues" }, "contributors": [ { @@ -30,55 +63,54 @@ "url": "http://got-ravings.blogspot.com" } ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/nodeca/js-yaml.git" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - }, "dependencies": { - "argparse": "~1.0.2", - "esprima": "~2.2.0" + "argparse": "^1.0.2", + "esprima": "^2.6.0" }, + "description": "YAML 1.2 parser and serializer", "devDependencies": { "ansi": "*", "benchmark": "*", - "eslint": "0.18.0", + "eslint": "0.24.1", "eslint-plugin-nodeca": "^1.0.3", "istanbul": "*", "mocha": "*" }, - "browser": { - "buffer": false - }, - "scripts": { - "test": "make test" - }, - "gitHead": "c50f9936bd1e99d64a54d30400e377f4fda401c5", - "bugs": { - "url": "https://github.com/nodeca/js-yaml/issues" - }, - "_id": "js-yaml@3.3.1", - "_shasum": "ca1acd3423ec275d12140a7bab51db015ba0b3c0", - "_from": "js-yaml@>=3.2.5 <4.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" + "directories": {}, + "dist": { + "shasum": "c3403797df12b91866574f2de23646fe8cafb44d", + "tarball": "http://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz" }, + "files": [ + "bin/", + "dist/", + "index.js", + "lib/" + ], + "gitHead": "66035322ee0906f0bcb24700bd7332ce66726c32", + "homepage": "https://github.com/nodeca/js-yaml", + "keywords": [ + "parser", + "pyyaml", + "serializer", + "yaml" + ], + "license": "MIT", "maintainers": [ { "name": "vitaly", "email": "vitaly@rcdesign.ru" } ], - "dist": { - "shasum": "ca1acd3423ec275d12140a7bab51db015ba0b3c0", - "tarball": "http://registry.npmjs.org/js-yaml/-/js-yaml-3.3.1.tgz" + "name": "js-yaml", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/js-yaml.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.3.1.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "test": "make test" + }, + "version": "3.4.5" } diff --git a/tools/eslint/node_modules/mkdirp/node_modules/minimist/LICENSE b/tools/eslint/node_modules/json-stable-stringify/LICENSE similarity index 100% rename from tools/eslint/node_modules/mkdirp/node_modules/minimist/LICENSE rename to tools/eslint/node_modules/json-stable-stringify/LICENSE diff --git a/tools/eslint/node_modules/json-stable-stringify/index.js b/tools/eslint/node_modules/json-stable-stringify/index.js new file mode 100644 index 00000000000000..87b1555bf2f5c2 --- /dev/null +++ b/tools/eslint/node_modules/json-stable-stringify/index.js @@ -0,0 +1,83 @@ +var json = typeof JSON !== 'undefined' ? JSON : require('jsonify'); + +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return json.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || json.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return json.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = json.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; diff --git a/tools/eslint/node_modules/json-stable-stringify/package.json b/tools/eslint/node_modules/json-stable-stringify/package.json new file mode 100644 index 00000000000000..865370d7ef701f --- /dev/null +++ b/tools/eslint/node_modules/json-stable-stringify/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "json-stable-stringify@^1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "json-stable-stringify@>=1.0.0 <2.0.0", + "_id": "json-stable-stringify@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/json-stable-stringify", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "name": "json-stable-stringify", + "raw": "json-stable-stringify@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.0.tgz", + "_shasum": "5e26859cf49968cfa499533413443578ee04d251", + "_shrinkwrap": null, + "_spec": "json-stable-stringify@^1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/json-stable-stringify/issues" + }, + "dependencies": { + "jsonify": "~0.0.0" + }, + "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results", + "devDependencies": { + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "5e26859cf49968cfa499533413443578ee04d251", + "tarball": "http://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.0.tgz" + }, + "homepage": "https://github.com/substack/json-stable-stringify", + "keywords": [ + "deterministic", + "hash", + "json", + "sort", + "stable", + "stringify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "json-stable-stringify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/json-stable-stringify.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "browsers": [ + "chrome/15", + "chrome/latest", + "ff/5", + "ff/latest", + "ie/8..latest", + "opera/latest", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/json-stable-stringify/readme.markdown b/tools/eslint/node_modules/json-stable-stringify/readme.markdown new file mode 100644 index 00000000000000..406c3c72614ba7 --- /dev/null +++ b/tools/eslint/node_modules/json-stable-stringify/readme.markdown @@ -0,0 +1,130 @@ +# json-stable-stringify + +deterministic version of `JSON.stringify()` so you can get a consistent hash +from stringified results + +You can also pass in a custom comparison function. + +[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) + +[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) + +# example + +``` js +var stringify = require('json-stable-stringify'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); +``` + +output: + +``` +{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + +# methods + +``` js +var stringify = require('json-stable-stringify') +``` + +## var str = stringify(obj, opts) + +Return a deterministic stringified string `str` from the object `obj`. + +## options + +### cmp + +If `opts` is given, you can supply an `opts.cmp` to have a custom comparison +function for object keys. Your function `opts.cmp` is called with these +parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +var stringify = require('json-stable-stringify'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); +``` + +which results in the output string: + +``` +{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +``` +var stringify = require('json-stable-stringify'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); +``` + +which outputs: + +``` +{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +### space + +If you specify `opts.space`, it will indent the output for pretty-printing. +Valid values are strings (e.g. `{space: \t}`) or a number of spaces +(`{space: 3}`). + +For example: + +```js +var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } }; +var s = stringify(obj, { space: ' ' }); +console.log(s); +``` + +which outputs: + +``` +{ + "a": { + "and": [ + 1, + 2, + 3 + ], + "foo": "bar" + }, + "b": 1 +} +``` + +### replacer + +The replacer parameter is a function `opts.replacer(key, value)` that behaves +the same as the replacer +[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install json-stable-stringify +``` + +# license + +MIT diff --git a/tools/eslint/node_modules/jsonify/README.markdown b/tools/eslint/node_modules/jsonify/README.markdown new file mode 100644 index 00000000000000..71d9a93b5974ee --- /dev/null +++ b/tools/eslint/node_modules/jsonify/README.markdown @@ -0,0 +1,34 @@ +jsonify +======= + +This module provides Douglas Crockford's JSON implementation without modifying +any globals. + +`stringify` and `parse` are merely exported without respect to whether or not a +global `JSON` object exists. + +methods +======= + +var json = require('jsonify'); + +json.parse(source, reviver) +--------------------------- + +Return a new javascript object from a parse of the `source` string. + +If a `reviver` function is specified, walk the structure passing each name/value +pair to `reviver.call(parent, key, value)` to transform the `value` before +parsing it. + +json.stringify(value, replacer, space) +-------------------------------------- + +Return a string representation for `value`. + +If `replacer` is specified, walk the structure passing each name/value pair to +`replacer.call(parent, key, value)` to transform the `value` before stringifying +it. + +If `space` is a number, indent the result by that many spaces. +If `space` is a string, use `space` as the indentation. diff --git a/tools/eslint/node_modules/jsonify/index.js b/tools/eslint/node_modules/jsonify/index.js new file mode 100644 index 00000000000000..f728a1605a824d --- /dev/null +++ b/tools/eslint/node_modules/jsonify/index.js @@ -0,0 +1,2 @@ +exports.parse = require('./lib/parse'); +exports.stringify = require('./lib/stringify'); diff --git a/tools/eslint/node_modules/jsonify/lib/parse.js b/tools/eslint/node_modules/jsonify/lib/parse.js new file mode 100644 index 00000000000000..2b88cfff0b11da --- /dev/null +++ b/tools/eslint/node_modules/jsonify/lib/parse.js @@ -0,0 +1,273 @@ +var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + }, + text, + + error = function (m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; + }, + + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + + number = function () { + // Parse a number value. + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error("Bad number"); + } else { + return number; + } + }, + + string = function () { + // Parse a string value. + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + if (ch === '"') { + while (next()) { + if (ch === '"') { + next(); + return string; + } else if (ch === '\\') { + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + } else { + string += ch; + } + } + } + error("Bad string"); + }, + + white = function () { + +// Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + + word = function () { + +// true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + + value, // Place holder for the value function. + + array = function () { + +// Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error("Bad array"); + }, + + object = function () { + +// Parse an object value. + + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if (Object.hasOwnProperty.call(object, key)) { + error('Duplicate key "' + key + '"'); + } + object[key] = value(); + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error("Bad object"); + }; + +value = function () { + +// Parse a JSON value. It could be an object, an array, a string, a number, +// or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } +}; + +// Return the json_parse function. It will have access to all of the above +// functions and variables. + +module.exports = function (source, reviver) { + var result; + + text = source; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error("Syntax error"); + } + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' ? (function walk(holder, key) { + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + }({'': result}, '')) : result; +}; diff --git a/tools/eslint/node_modules/jsonify/lib/stringify.js b/tools/eslint/node_modules/jsonify/lib/stringify.js new file mode 100644 index 00000000000000..e88fb834065b81 --- /dev/null +++ b/tools/eslint/node_modules/jsonify/lib/stringify.js @@ -0,0 +1,154 @@ +var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + +function quote(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; +} + +function str(key, holder) { + // Produce a string from holder[key]. + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + + // If the value has a toJSON method, call it to obtain a replacement value. + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + + // What happens next depends on the value's type. + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + // JSON numbers must be finite. Encode non-finite numbers as null. + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + return String(value); + + case 'object': + if (!value) return 'null'; + gap += indent; + partial = []; + + // Array.isArray + if (Object.prototype.toString.apply(value) === '[object Array]') { + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + + // Join all of the elements together, separated with commas, and + // wrap them in brackets. + v = partial.length === 0 ? '[]' : gap ? + '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + + // If the replacer is an array, use it to select the members to be + // stringified. + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + else { + // Otherwise, iterate through all of the keys in the object. + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + + // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + v = partial.length === 0 ? '{}' : gap ? + '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : + '{' + partial.join(',') + '}'; + gap = mind; + return v; + } +} + +module.exports = function (value, replacer, space) { + var i; + gap = ''; + indent = ''; + + // If the space parameter is a number, make an indent string containing that + // many spaces. + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + } + // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent = space; + } + + // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + rep = replacer; + if (replacer && typeof replacer !== 'function' + && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + + // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + return str('', {'': value}); +}; diff --git a/tools/eslint/node_modules/jsonify/package.json b/tools/eslint/node_modules/jsonify/package.json new file mode 100644 index 00000000000000..53f4d3a75f8763 --- /dev/null +++ b/tools/eslint/node_modules/jsonify/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "jsonify@~0.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/json-stable-stringify" + ] + ], + "_defaultsLoaded": true, + "_engineSupported": true, + "_from": "jsonify@>=0.0.0 <0.1.0", + "_id": "jsonify@0.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/jsonify", + "_nodeVersion": "v0.5.0-pre", + "_npmVersion": "1.0.10", + "_phantomChildren": {}, + "_requested": { + "name": "jsonify", + "raw": "jsonify@~0.0.0", + "rawSpec": "~0.0.0", + "scope": null, + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/json-stable-stringify" + ], + "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", + "_shrinkwrap": null, + "_spec": "jsonify@~0.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/json-stable-stringify", + "author": { + "name": "Douglas Crockford", + "url": "http://crockford.com/" + }, + "bugs": { + "url": "https://github.com/substack/jsonify/issues" + }, + "dependencies": {}, + "description": "JSON without touching any globals", + "devDependencies": { + "garbage": "0.0.x", + "tap": "0.0.x" + }, + "directories": { + "lib": ".", + "test": "test" + }, + "dist": { + "shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", + "tarball": "http://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/substack/jsonify#readme", + "keywords": [ + "browser", + "json" + ], + "license": "Public Domain", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "jsonify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/jsonify.git" + }, + "scripts": { + "test": "tap test" + }, + "version": "0.0.0" +} diff --git a/tools/eslint/node_modules/jsonpointer/README.md b/tools/eslint/node_modules/jsonpointer/README.md new file mode 100644 index 00000000000000..e096dfa5d62a77 --- /dev/null +++ b/tools/eslint/node_modules/jsonpointer/README.md @@ -0,0 +1,32 @@ +# JSON Pointer for nodejs + +This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). + +## Usage + + var jsonpointer = require("jsonpointer"); + var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; + var one = jsonpointer.get(obj, "/foo"); + var two = jsonpointer.get(obj, "/bar/baz"); + var three = jsonpointer.get(obj, "/qux/0"); + var four = jsonpointer.get(obj, "/qux/1"); + var five = jsonpointer.get(obj, "/qux/2"); + var notfound = jsonpointer.get(obj, "/quo"); // returns null + + jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; + +## Testing + + $ node test.js + All tests pass. + $ + +[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](https://travis-ci.org/janl/node-jsonpointer) + +## Author + +(c) 2011 Jan Lehnardt + +## License + +MIT License. diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js b/tools/eslint/node_modules/jsonpointer/jsonpointer.js similarity index 79% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js rename to tools/eslint/node_modules/jsonpointer/jsonpointer.js index 3f53026efd1eec..006f85ef3a5489 100644 --- a/tools/eslint/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +++ b/tools/eslint/node_modules/jsonpointer/jsonpointer.js @@ -1,5 +1,3 @@ -var console = require("console"); - var untilde = function(str) { return str.replace(/~./g, function(m) { switch (m) { @@ -8,16 +6,15 @@ var untilde = function(str) { case "~1": return "/"; } - throw("Invalid tilde escape: " + m); + throw new Error("Invalid tilde escape: " + m); }); } var traverse = function(obj, pointer, value) { // assert(isArray(pointer)) var part = untilde(pointer.shift()); - if(typeof obj[part] === "undefined") { - throw("Value for pointer '" + pointer + "' not found."); - return; + if(!obj.hasOwnProperty(part)) { + return null; } if(pointer.length !== 0) { // keep traversin! return traverse(obj[part], pointer, value); @@ -39,7 +36,7 @@ var traverse = function(obj, pointer, value) { var validate_input = function(obj, pointer) { if(typeof obj !== "object") { - throw("Invalid input object."); + throw new Error("Invalid input object."); } if(pointer === "") { @@ -47,13 +44,13 @@ var validate_input = function(obj, pointer) { } if(!pointer) { - throw("Invalid JSON pointer."); + throw new Error("Invalid JSON pointer."); } pointer = pointer.split("/"); var first = pointer.shift(); if (first !== "") { - throw("Invalid JSON pointer."); + throw new Error("Invalid JSON pointer."); } return pointer; @@ -70,7 +67,7 @@ var get = function(obj, pointer) { var set = function(obj, pointer, value) { pointer = validate_input(obj, pointer); if (pointer.length === 0) { - throw("Invalid JSON pointer for set.") + throw new Error("Invalid JSON pointer for set.") } return traverse(obj, pointer, value); } diff --git a/tools/eslint/node_modules/jsonpointer/package.json b/tools/eslint/node_modules/jsonpointer/package.json new file mode 100644 index 00000000000000..6f4e9d6719a5f8 --- /dev/null +++ b/tools/eslint/node_modules/jsonpointer/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "jsonpointer@2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid" + ] + ], + "_from": "jsonpointer@2.0.0", + "_id": "jsonpointer@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/jsonpointer", + "_nodeVersion": "0.10.36", + "_npmUser": { + "email": "marc.brookman@gmail.com", + "name": "marcbachmann" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "jsonpointer", + "raw": "jsonpointer@2.0.0", + "rawSpec": "2.0.0", + "scope": null, + "spec": "2.0.0", + "type": "version" + }, + "_requiredBy": [ + "/eslint/is-my-json-valid" + ], + "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", + "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", + "_shrinkwrap": null, + "_spec": "jsonpointer@2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid", + "author": { + "email": "jan@apache.org", + "name": "Jan Lehnardt" + }, + "bugs": { + "url": "http://github.com/janl/node-jsonpointer/issues" + }, + "contributors": [ + { + "name": "Joe Hildebrand", + "email": "joe-github@cursive.net" + } + ], + "dependencies": {}, + "description": "Simple JSON Addressing.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", + "tarball": "http://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" + }, + "engines": { + "node": ">=0.6.0" + }, + "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", + "homepage": "https://github.com/janl/node-jsonpointer#readme", + "license": "MIT", + "main": "./jsonpointer", + "maintainers": [ + { + "name": "jan", + "email": "jan@apache.org" + }, + { + "name": "marcbachmann", + "email": "marc.brookman@gmail.com" + } + ], + "name": "jsonpointer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" + }, + "scripts": { + "test": "node test.js" + }, + "tags": [ + "simple", + "util", + "util", + "utility" + ], + "version": "2.0.0" +} diff --git a/tools/eslint/node_modules/kind-of/LICENSE b/tools/eslint/node_modules/kind-of/LICENSE new file mode 100644 index 00000000000000..cdaf57d6db067b --- /dev/null +++ b/tools/eslint/node_modules/kind-of/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014-2015, Jon Schlinkert. + +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/eslint/node_modules/kind-of/README.md b/tools/eslint/node_modules/kind-of/README.md new file mode 100644 index 00000000000000..a0af7426b7c625 --- /dev/null +++ b/tools/eslint/node_modules/kind-of/README.md @@ -0,0 +1,212 @@ +# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) [![Build Status](https://travis-ci.org/jonschlinkert/kind-of.svg)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +[](#optimizations)**What makes this so fast?** + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i kind-of --save +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/[\s\S]+/); +//=> 'regexp' + +kindOf(new RegExp('^' + 'foo$')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' +``` + +## Related projects + +* [is-number](https://github.com/jonschlinkert/is-number): Returns true if the value is a number. comprehensive tests. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-primitive](https://github.com/jonschlinkert/is-primitive): Returns `true` if the value is a primitive. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-match](https://github.com/jonschlinkert/is-match): Create a matching function from a glob pattern, regex, string, array or function. + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/kind-of/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 31, 2015._ diff --git a/tools/eslint/node_modules/kind-of/index.js b/tools/eslint/node_modules/kind-of/index.js new file mode 100644 index 00000000000000..6093403d5c683a --- /dev/null +++ b/tools/eslint/node_modules/kind-of/index.js @@ -0,0 +1,84 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + + // buffer + if (typeof Buffer !== 'undefined' && isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // must be a plain object + return 'object'; +}; diff --git a/tools/eslint/node_modules/kind-of/package.json b/tools/eslint/node_modules/kind-of/package.json new file mode 100644 index 00000000000000..2772939f3f2427 --- /dev/null +++ b/tools/eslint/node_modules/kind-of/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "kind-of@^2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/align-text" + ] + ], + "_from": "kind-of@>=2.0.0 <3.0.0", + "_id": "kind-of@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/kind-of", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "kind-of", + "raw": "kind-of@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/align-text" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "_shasum": "018ec7a4ce7e3a86cb9141be519d24c8faa981b5", + "_shrinkwrap": null, + "_spec": "kind-of@^2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/align-text", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "dependencies": { + "is-buffer": "^1.0.2" + }, + "description": "Get the native type of a value.", + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "glob": "^4.3.5", + "mocha": "^2.2.5", + "should": "^4.6.1", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "018ec7a4ce7e3a86cb9141be519d24c8faa981b5", + "tarball": "http://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "09fcb8b8384932bc5a0009e0b3811998b0387629", + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "kind-of", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/tools/eslint/node_modules/lazy-cache/LICENSE b/tools/eslint/node_modules/lazy-cache/LICENSE new file mode 100644 index 00000000000000..65f90aca8c2fff --- /dev/null +++ b/tools/eslint/node_modules/lazy-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/eslint/node_modules/lazy-cache/README.md b/tools/eslint/node_modules/lazy-cache/README.md new file mode 100644 index 00000000000000..7134690130e43f --- /dev/null +++ b/tools/eslint/node_modules/lazy-cache/README.md @@ -0,0 +1,128 @@ +# lazy-cache [![NPM version](https://img.shields.io/npm/v/lazy-cache.svg)](https://www.npmjs.com/package/lazy-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/lazy-cache.svg)](https://travis-ci.org/jonschlinkert/lazy-cache) + +> Cache requires to be lazy-loaded when needed. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i lazy-cache --save +``` + +## Usage + +```js +var lazy = require('lazy-cache')(require); +``` + +**Use as a property on `lazy`** + +The module is also added as a property to the `lazy` function +so it can be called without having to call a function first. + +```js +var lazy = require('lazy-cache')(require); + +// `npm install glob` +lazy('glob'); + +// glob sync +console.log(lazy.glob.sync('*.js')); + +// glob async +lazy.glob('*.js', function (err, files) { + console.log(files); +}); +``` + +**Use as a function** + +```js +var lazy = require('lazy-cache')(require); +var glob = lazy('glob'); + +// `glob` is a now a function that may be called when needed +glob().sync('foo/*.js'); +``` + +## Aliases + +An alias may be passed as the second argument if you don't want to use the automatically camel-cased variable name. + +**Example** + +```js +var utils = require('lazy-cache')(require); + +utils('ansi-yellow', 'yellow'); +console.log(utils.yellow('foo')); +``` + +## Browserify usage + +**Example** + +```js +var utils = require('lazy-cache')(require); +// temporarily re-assign `require` to trick browserify +var fn = require; +require = utils; +// list module dependencies (here, `require` is actually `lazy-cache`) +require('glob'); +require = fn; // restore the native `require` function + +/** + * Now you can use glob with the `utils.glob` variable + */ + +// sync +console.log(utils.glob.sync('*.js')); + +// async +utils.glob('*.js', function (err, files) { + console.log(files.join('\n')); +}); +``` + +## Kill switch + +In certain rare edge cases, it may be necessary to unlazy all lazy-cached dependencies (two reported cases out of > 9 million downloads). + +To force lazy-cache to immediately invoke all dependencies, do: + +```js +process.env.UNLAZY = true; +``` + +## Related + +[lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lazy-cache/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 09, 2015._ \ No newline at end of file diff --git a/tools/eslint/node_modules/lazy-cache/index.js b/tools/eslint/node_modules/lazy-cache/index.js new file mode 100644 index 00000000000000..ea7ceb25a62715 --- /dev/null +++ b/tools/eslint/node_modules/lazy-cache/index.js @@ -0,0 +1,67 @@ +'use strict'; + +/** + * Cache results of the first function call to ensure only calling once. + * + * ```js + * var utils = require('lazy-cache')(require); + * // cache the call to `require('ansi-yellow')` + * utils('ansi-yellow', 'yellow'); + * // use `ansi-yellow` + * console.log(utils.yellow('this is yellow')); + * ``` + * + * @param {Function} `fn` Function that will be called only once. + * @return {Function} Function that can be called to get the cached function + * @api public + */ + +function lazyCache(fn) { + var cache = {}; + var proxy = function(mod, name) { + name = name || camelcase(mod); + + // check both boolean and string in case `process.env` cases to string + if (process.env.UNLAZY === 'true' || process.env.UNLAZY === true) { + cache[name] = fn(mod); + } + + Object.defineProperty(proxy, name, { + enumerable: true, + configurable: true, + get: getter + }); + + function getter() { + if (cache.hasOwnProperty(name)) { + return cache[name]; + } + return (cache[name] = fn(mod)); + } + return getter; + }; + return proxy; +} + +/** + * Used to camelcase the name to be stored on the `lazy` object. + * + * @param {String} `str` String containing `_`, `.`, `-` or whitespace that will be camelcased. + * @return {String} camelcased string. + */ + +function camelcase(str) { + if (str.length === 1) { + return str.toLowerCase(); + } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + return str.replace(/[\W_]+(\w|$)/g, function(_, ch) { + return ch.toUpperCase(); + }); +} + +/** + * Expose `lazyCache` + */ + +module.exports = lazyCache; diff --git a/tools/eslint/node_modules/lazy-cache/package.json b/tools/eslint/node_modules/lazy-cache/package.json new file mode 100644 index 00000000000000..890452e6d9fe82 --- /dev/null +++ b/tools/eslint/node_modules/lazy-cache/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "lazy-cache@^0.2.4", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/center-align" + ] + ], + "_from": "lazy-cache@>=0.2.4 <0.3.0", + "_id": "lazy-cache@0.2.7", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lazy-cache", + "_nodeVersion": "5.1.1", + "_npmUser": { + "email": "brian.woodward@gmail.com", + "name": "doowb" + }, + "_npmVersion": "3.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "lazy-cache", + "raw": "lazy-cache@^0.2.4", + "rawSpec": "^0.2.4", + "scope": null, + "spec": ">=0.2.4 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/center-align" + ], + "_resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "_shasum": "7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65", + "_shrinkwrap": null, + "_spec": "lazy-cache@^0.2.4", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/center-align", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/lazy-cache/issues" + }, + "dependencies": {}, + "description": "Cache requires to be lazy-loaded when needed.", + "devDependencies": { + "ansi-yellow": "^0.1.1", + "glob": "^5.0.14", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65", + "tarball": "http://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "1a7a6ce95ec946b19b4a23db706cfdd2de3468dd", + "homepage": "https://github.com/jonschlinkert/lazy-cache", + "keywords": [ + "cache", + "caching", + "dependencies", + "dependency", + "lazy", + "require", + "requires" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "lazy-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/lazy-cache.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "lint-deps" + ] + } + }, + "version": "0.2.7" +} diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/LICENSE b/tools/eslint/node_modules/levn/LICENSE similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/LICENSE rename to tools/eslint/node_modules/levn/LICENSE diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/README.md b/tools/eslint/node_modules/levn/README.md similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/README.md rename to tools/eslint/node_modules/levn/README.md diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/lib/cast.js b/tools/eslint/node_modules/levn/lib/cast.js similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/lib/cast.js rename to tools/eslint/node_modules/levn/lib/cast.js diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/lib/coerce.js b/tools/eslint/node_modules/levn/lib/coerce.js similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/lib/coerce.js rename to tools/eslint/node_modules/levn/lib/coerce.js diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/lib/index.js b/tools/eslint/node_modules/levn/lib/index.js similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/lib/index.js rename to tools/eslint/node_modules/levn/lib/index.js diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/lib/parse-string.js b/tools/eslint/node_modules/levn/lib/parse-string.js similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/lib/parse-string.js rename to tools/eslint/node_modules/levn/lib/parse-string.js diff --git a/tools/eslint/node_modules/optionator/node_modules/levn/lib/parse.js b/tools/eslint/node_modules/levn/lib/parse.js similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/levn/lib/parse.js rename to tools/eslint/node_modules/levn/lib/parse.js diff --git a/tools/eslint/node_modules/levn/package.json b/tools/eslint/node_modules/levn/package.json new file mode 100644 index 00000000000000..137a84dc02d6d4 --- /dev/null +++ b/tools/eslint/node_modules/levn/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + "levn@~0.2.5", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator" + ] + ], + "_from": "levn@>=0.2.5 <0.3.0", + "_id": "levn@0.2.5", + "_inCache": true, + "_installable": true, + "_location": "/eslint/levn", + "_npmUser": { + "email": "z@georgezahariev.com", + "name": "gkz" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "name": "levn", + "raw": "levn@~0.2.5", + "rawSpec": "~0.2.5", + "scope": null, + "spec": ">=0.2.5 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/optionator" + ], + "_resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", + "_shasum": "ba8d339d0ca4a610e3a3f145b9caf48807155054", + "_shrinkwrap": null, + "_spec": "levn@~0.2.5", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator", + "author": { + "email": "z@georgezahariev.com", + "name": "George Zahariev" + }, + "bugs": { + "url": "https://github.com/gkz/levn/issues" + }, + "dependencies": { + "prelude-ls": "~1.1.0", + "type-check": "~0.3.1" + }, + "description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible", + "devDependencies": { + "LiveScript": "~1.2.0", + "istanbul": "~0.1.43", + "mocha": "~1.8.2" + }, + "directories": {}, + "dist": { + "shasum": "ba8d339d0ca4a610e3a3f145b9caf48807155054", + "tarball": "http://registry.npmjs.org/levn/-/levn-0.2.5.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "LICENSE", + "README.md", + "lib" + ], + "homepage": "https://github.com/gkz/levn", + "keywords": [ + "concise", + "ecmascript", + "flexible", + "human", + "json", + "levn", + "light", + "notation", + "typed", + "typed", + "value" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://raw.github.com/gkz/levn/master/LICENSE" + } + ], + "main": "./lib/", + "maintainers": [ + { + "name": "gkz", + "email": "z@georgezahariev.com" + } + ], + "name": "levn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/gkz/levn.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.2.5" +} diff --git a/tools/eslint/node_modules/lodash._arraycopy/LICENSE.txt b/tools/eslint/node_modules/lodash._arraycopy/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraycopy/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._arraycopy/README.md b/tools/eslint/node_modules/lodash._arraycopy/README.md new file mode 100644 index 00000000000000..16ee6fd242807c --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraycopy/README.md @@ -0,0 +1,20 @@ +# lodash._arraycopy v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `arrayCopy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._arraycopy +``` + +In Node.js/io.js: + +```js +var arrayCopy = require('lodash._arraycopy'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._arraycopy) for more details. diff --git a/tools/eslint/node_modules/lodash._arraycopy/index.js b/tools/eslint/node_modules/lodash._arraycopy/index.js new file mode 100644 index 00000000000000..b9abb2253a1f57 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraycopy/index.js @@ -0,0 +1,29 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = arrayCopy; diff --git a/tools/eslint/node_modules/lodash._arraycopy/package.json b/tools/eslint/node_modules/lodash._arraycopy/package.json new file mode 100644 index 00000000000000..5bdbf5a645bcd5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraycopy/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "lodash._arraycopy@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash._arraycopy@>=3.0.0 <4.0.0", + "_id": "lodash._arraycopy@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._arraycopy", + "_nodeVersion": "0.10.35", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._arraycopy", + "raw": "lodash._arraycopy@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseclone", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz", + "_shasum": "76e7b7c1f1fb92547374878a562ed06a3e50f6e1", + "_shrinkwrap": null, + "_spec": "lodash._arraycopy@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `arrayCopy` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "76e7b7c1f1fb92547374878a562ed06a3e50f6e1", + "tarball": "http://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._arraycopy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/lodash._arrayeach/LICENSE.txt b/tools/eslint/node_modules/lodash._arrayeach/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arrayeach/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._arrayeach/README.md b/tools/eslint/node_modules/lodash._arrayeach/README.md new file mode 100644 index 00000000000000..1f3236ba0338f9 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arrayeach/README.md @@ -0,0 +1,20 @@ +# lodash._arrayeach v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `arrayEach` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._arrayeach +``` + +In Node.js/io.js: + +```js +var arrayEach = require('lodash._arrayeach'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._arrayeach) for more details. diff --git a/tools/eslint/node_modules/lodash._arrayeach/index.js b/tools/eslint/node_modules/lodash._arrayeach/index.js new file mode 100644 index 00000000000000..7b31bcdb2534ef --- /dev/null +++ b/tools/eslint/node_modules/lodash._arrayeach/index.js @@ -0,0 +1,31 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands or `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/tools/eslint/node_modules/lodash._arrayeach/package.json b/tools/eslint/node_modules/lodash._arrayeach/package.json new file mode 100644 index 00000000000000..a3fc348775db5b --- /dev/null +++ b/tools/eslint/node_modules/lodash._arrayeach/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "lodash._arrayeach@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash._arrayeach@>=3.0.0 <4.0.0", + "_id": "lodash._arrayeach@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._arrayeach", + "_nodeVersion": "0.10.35", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._arrayeach", + "raw": "lodash._arrayeach@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseclone", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", + "_shasum": "bab156b2a90d3f1bbd5c653403349e5e5933ef9e", + "_shrinkwrap": null, + "_spec": "lodash._arrayeach@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `arrayEach` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "bab156b2a90d3f1bbd5c653403349e5e5933ef9e", + "tarball": "http://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._arrayeach", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/lodash._arraymap/LICENSE.txt b/tools/eslint/node_modules/lodash._arraymap/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraymap/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._arraymap/README.md b/tools/eslint/node_modules/lodash._arraymap/README.md new file mode 100644 index 00000000000000..1c866863dafcf4 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraymap/README.md @@ -0,0 +1,20 @@ +# lodash._arraymap v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `arrayMap` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._arraymap +``` + +In Node.js/io.js: + +```js +var arrayMap = require('lodash._arraymap'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._arraymap) for more details. diff --git a/tools/eslint/node_modules/lodash._arraymap/index.js b/tools/eslint/node_modules/lodash._arraymap/index.js new file mode 100644 index 00000000000000..4e0c30bbc17222 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraymap/index.js @@ -0,0 +1,30 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A specialized version of `_.map` for arrays without support for callback + * shorthands or `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/tools/eslint/node_modules/lodash._arraymap/package.json b/tools/eslint/node_modules/lodash._arraymap/package.json new file mode 100644 index 00000000000000..8880bd9b7705c2 --- /dev/null +++ b/tools/eslint/node_modules/lodash._arraymap/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "lodash._arraymap@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit" + ] + ], + "_from": "lodash._arraymap@>=3.0.0 <4.0.0", + "_id": "lodash._arraymap@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._arraymap", + "_nodeVersion": "0.10.35", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._arraymap", + "raw": "lodash._arraymap@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz", + "_shasum": "1a8fd0f4c0df4b61dea076d717cdc97f0a3c3e66", + "_shrinkwrap": null, + "_spec": "lodash._arraymap@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `arrayMap` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1a8fd0f4c0df4b61dea076d717cdc97f0a3c3e66", + "tarball": "http://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._arraymap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/LICENSE.txt b/tools/eslint/node_modules/lodash._baseassign/LICENSE.txt similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/LICENSE.txt rename to tools/eslint/node_modules/lodash._baseassign/LICENSE.txt diff --git a/tools/eslint/node_modules/lodash._baseassign/README.md b/tools/eslint/node_modules/lodash._baseassign/README.md new file mode 100644 index 00000000000000..0aa23093730de6 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseassign/README.md @@ -0,0 +1,20 @@ +# lodash._baseassign v3.2.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAssign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseassign +``` + +In Node.js/io.js: + +```js +var baseAssign = require('lodash._baseassign'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._baseassign) for more details. diff --git a/tools/eslint/node_modules/lodash._baseassign/index.js b/tools/eslint/node_modules/lodash._baseassign/index.js new file mode 100644 index 00000000000000..f5612c85081563 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseassign/index.js @@ -0,0 +1,27 @@ +/** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCopy = require('lodash._basecopy'), + keys = require('lodash.keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/tools/eslint/node_modules/lodash._baseassign/package.json b/tools/eslint/node_modules/lodash._baseassign/package.json new file mode 100644 index 00000000000000..bf70042552e936 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseassign/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "lodash._baseassign@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash._baseassign@>=3.0.0 <4.0.0", + "_id": "lodash._baseassign@3.2.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._baseassign", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseassign", + "raw": "lodash._baseassign@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseclone" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "_shasum": "8c38a099500f215ad09e59f1722fd0c52bfe0a4e", + "_shrinkwrap": null, + "_spec": "lodash._baseassign@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `baseAssign` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "8c38a099500f215ad09e59f1722fd0c52bfe0a4e", + "tarball": "http://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._baseassign", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.2.0" +} diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/LICENSE.txt b/tools/eslint/node_modules/lodash._baseclone/LICENSE similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/LICENSE.txt rename to tools/eslint/node_modules/lodash._baseclone/LICENSE diff --git a/tools/eslint/node_modules/lodash._baseclone/README.md b/tools/eslint/node_modules/lodash._baseclone/README.md new file mode 100644 index 00000000000000..883a43c3a48435 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseclone/README.md @@ -0,0 +1,20 @@ +# lodash._baseclone v3.3.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseClone` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseclone +``` + +In Node.js/io.js: + +```js +var baseClone = require('lodash._baseclone'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash._baseclone) for more details. diff --git a/tools/eslint/node_modules/lodash._baseclone/index.js b/tools/eslint/node_modules/lodash._baseclone/index.js new file mode 100644 index 00000000000000..4024d58ad339cb --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseclone/index.js @@ -0,0 +1,271 @@ +/** + * lodash 3.3.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrayCopy = require('lodash._arraycopy'), + arrayEach = require('lodash._arrayeach'), + baseAssign = require('lodash._baseassign'), + baseFor = require('lodash._basefor'), + isArray = require('lodash.isarray'), + keys = require('lodash.keys'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = +cloneableTags[dateTag] = cloneableTags[float32Tag] = +cloneableTags[float64Tag] = cloneableTags[int8Tag] = +cloneableTags[int16Tag] = cloneableTags[int32Tag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[stringTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[mapTag] = cloneableTags[setTag] = +cloneableTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Native method references. */ +var ArrayBuffer = global.ArrayBuffer, + Uint8Array = global.Uint8Array; + +/** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + return result; +} + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +/** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = baseClone; diff --git a/tools/eslint/node_modules/lodash._baseclone/package.json b/tools/eslint/node_modules/lodash._baseclone/package.json new file mode 100644 index 00000000000000..25378f46135afd --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseclone/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + "lodash._baseclone@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.clonedeep" + ] + ], + "_from": "lodash._baseclone@>=3.0.0 <4.0.0", + "_id": "lodash._baseclone@3.3.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._baseclone", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseclone", + "raw": "lodash._baseclone@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.clonedeep" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz", + "_shasum": "303519bf6393fe7e42f34d8b630ef7794e3542b7", + "_shrinkwrap": null, + "_spec": "lodash._baseclone@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.clonedeep", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._arraycopy": "^3.0.0", + "lodash._arrayeach": "^3.0.0", + "lodash._baseassign": "^3.0.0", + "lodash._basefor": "^3.0.0", + "lodash.isarray": "^3.0.0", + "lodash.keys": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `baseClone` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "303519bf6393fe7e42f34d8b630ef7794e3542b7", + "tarball": "http://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._baseclone", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.3.0" +} diff --git a/tools/eslint/node_modules/lodash._basecopy/LICENSE.txt b/tools/eslint/node_modules/lodash._basecopy/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basecopy/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._basecopy/README.md b/tools/eslint/node_modules/lodash._basecopy/README.md new file mode 100644 index 00000000000000..acdfa29d3d210a --- /dev/null +++ b/tools/eslint/node_modules/lodash._basecopy/README.md @@ -0,0 +1,20 @@ +# lodash._basecopy v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCopy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basecopy +``` + +In Node.js/io.js: + +```js +var baseCopy = require('lodash._basecopy'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecopy) for more details. diff --git a/tools/eslint/node_modules/lodash._basecopy/index.js b/tools/eslint/node_modules/lodash._basecopy/index.js new file mode 100644 index 00000000000000..b586d31d9d4345 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basecopy/index.js @@ -0,0 +1,32 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; diff --git a/tools/eslint/node_modules/lodash._basecopy/package.json b/tools/eslint/node_modules/lodash._basecopy/package.json new file mode 100644 index 00000000000000..320b86a9709ef0 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basecopy/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + "lodash._basecopy@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseassign" + ] + ], + "_from": "lodash._basecopy@>=3.0.0 <4.0.0", + "_id": "lodash._basecopy@3.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._basecopy", + "_nodeVersion": "0.12.2", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basecopy", + "raw": "lodash._basecopy@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseassign", + "/eslint/lodash.toplainobject" + ], + "_resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "_shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", + "_shrinkwrap": null, + "_spec": "lodash._basecopy@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseassign", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseCopy` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", + "tarball": "http://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._basecopy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.1" +} diff --git a/tools/eslint/node_modules/lodash._basedifference/LICENSE b/tools/eslint/node_modules/lodash._basedifference/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basedifference/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._basedifference/README.md b/tools/eslint/node_modules/lodash._basedifference/README.md new file mode 100644 index 00000000000000..d9b809cfd2a277 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basedifference/README.md @@ -0,0 +1,20 @@ +# lodash._basedifference v3.0.3 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDifference` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basedifference +``` + +In Node.js/io.js: + +```js +var baseDifference = require('lodash._basedifference'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basedifference) for more details. diff --git a/tools/eslint/node_modules/lodash._basedifference/index.js b/tools/eslint/node_modules/lodash._basedifference/index.js new file mode 100644 index 00000000000000..43c6460fd1e17f --- /dev/null +++ b/tools/eslint/node_modules/lodash._basedifference/index.js @@ -0,0 +1,63 @@ +/** + * lodash 3.0.3 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseIndexOf = require('lodash._baseindexof'), + cacheIndexOf = require('lodash._cacheindexof'), + createCache = require('lodash._createcache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = baseIndexOf, + isCommon = true, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/tools/eslint/node_modules/lodash._basedifference/package.json b/tools/eslint/node_modules/lodash._basedifference/package.json new file mode 100644 index 00000000000000..f823b5e2e2e6a7 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basedifference/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + "lodash._basedifference@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit" + ] + ], + "_from": "lodash._basedifference@>=3.0.0 <4.0.0", + "_id": "lodash._basedifference@3.0.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._basedifference", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basedifference", + "raw": "lodash._basedifference@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz", + "_shasum": "f2c204296c2a78e02b389081b6edcac933cf629c", + "_shrinkwrap": null, + "_spec": "lodash._basedifference@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._baseindexof": "^3.0.0", + "lodash._cacheindexof": "^3.0.0", + "lodash._createcache": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `baseDifference` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "f2c204296c2a78e02b389081b6edcac933cf629c", + "tarball": "http://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._basedifference", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.3" +} diff --git a/tools/eslint/node_modules/lodash._baseflatten/LICENSE b/tools/eslint/node_modules/lodash._baseflatten/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseflatten/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._baseflatten/README.md b/tools/eslint/node_modules/lodash._baseflatten/README.md new file mode 100644 index 00000000000000..f3e227779c4f89 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseflatten/README.md @@ -0,0 +1,20 @@ +# lodash._baseflatten v3.1.4 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseflatten +``` + +In Node.js/io.js: + +```js +var baseFlatten = require('lodash._baseflatten'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash._baseflatten) for more details. diff --git a/tools/eslint/node_modules/lodash._baseflatten/index.js b/tools/eslint/node_modules/lodash._baseflatten/index.js new file mode 100644 index 00000000000000..c43acfa729179c --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseflatten/index.js @@ -0,0 +1,131 @@ +/** + * lodash 3.1.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArguments = require('lodash.isarguments'), + isArray = require('lodash.isarray'); + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = baseFlatten; diff --git a/tools/eslint/node_modules/lodash._baseflatten/package.json b/tools/eslint/node_modules/lodash._baseflatten/package.json new file mode 100644 index 00000000000000..78749e11eb2053 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseflatten/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "lodash._baseflatten@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit" + ] + ], + "_from": "lodash._baseflatten@>=3.0.0 <4.0.0", + "_id": "lodash._baseflatten@3.1.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._baseflatten", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseflatten", + "raw": "lodash._baseflatten@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz", + "_shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7", + "_shrinkwrap": null, + "_spec": "lodash._baseflatten@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `baseFlatten` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0770ff80131af6e34f3b511796a7ba5214e65ff7", + "tarball": "http://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._baseflatten", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.4" +} diff --git a/tools/eslint/node_modules/lodash._basefor/LICENSE.txt b/tools/eslint/node_modules/lodash._basefor/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basefor/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._basefor/README.md b/tools/eslint/node_modules/lodash._basefor/README.md new file mode 100644 index 00000000000000..d9e33731b2fc90 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basefor/README.md @@ -0,0 +1,20 @@ +# lodash._basefor v3.0.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFor` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basefor +``` + +In Node.js/io.js: + +```js +var baseFor = require('lodash._basefor'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basefor) for more details. diff --git a/tools/eslint/node_modules/lodash._basefor/index.js b/tools/eslint/node_modules/lodash._basefor/index.js new file mode 100644 index 00000000000000..a3d7dcd1014da0 --- /dev/null +++ b/tools/eslint/node_modules/lodash._basefor/index.js @@ -0,0 +1,86 @@ +/** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = baseFor; diff --git a/tools/eslint/node_modules/lodash._basefor/package.json b/tools/eslint/node_modules/lodash._basefor/package.json new file mode 100644 index 00000000000000..41fe39f02c5b1d --- /dev/null +++ b/tools/eslint/node_modules/lodash._basefor/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "lodash._basefor@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash._basefor@>=3.0.0 <4.0.0", + "_id": "lodash._basefor@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._basefor", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basefor", + "raw": "lodash._basefor@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseclone", + "/eslint/lodash._pickbycallback", + "/eslint/lodash.isplainobject" + ], + "_resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.2.tgz", + "_shasum": "3a4cece5b7031eae78a441c5416b90878eeee5a1", + "_shrinkwrap": null, + "_spec": "lodash._basefor@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseFor` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3a4cece5b7031eae78a441c5416b90878eeee5a1", + "tarball": "http://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._basefor", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.2" +} diff --git a/tools/eslint/node_modules/lodash._baseindexof/LICENSE.txt b/tools/eslint/node_modules/lodash._baseindexof/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseindexof/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._baseindexof/README.md b/tools/eslint/node_modules/lodash._baseindexof/README.md new file mode 100644 index 00000000000000..ddcc79d5d66aee --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseindexof/README.md @@ -0,0 +1,20 @@ +# lodash._baseindexof v3.1.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIndexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseindexof +``` + +In Node.js/io.js: + +```js +var baseIndexOf = require('lodash._baseindexof'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseindexof) for more details. diff --git a/tools/eslint/node_modules/lodash._baseindexof/index.js b/tools/eslint/node_modules/lodash._baseindexof/index.js new file mode 100644 index 00000000000000..e5da79147894ae --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseindexof/index.js @@ -0,0 +1,57 @@ +/** + * lodash 3.1.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.2 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * If `fromRight` is provided elements of `array` are iterated from right to left. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ +function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOf; diff --git a/tools/eslint/node_modules/lodash._baseindexof/package.json b/tools/eslint/node_modules/lodash._baseindexof/package.json new file mode 100644 index 00000000000000..ed18b0b16b3280 --- /dev/null +++ b/tools/eslint/node_modules/lodash._baseindexof/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "lodash._baseindexof@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference" + ] + ], + "_from": "lodash._baseindexof@>=3.0.0 <4.0.0", + "_id": "lodash._baseindexof@3.1.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._baseindexof", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.6.1", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseindexof", + "raw": "lodash._baseindexof@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._basedifference" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz", + "_shasum": "fe52b53a1c6761e42618d654e4a25789ed61822c", + "_shrinkwrap": null, + "_spec": "lodash._baseindexof@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseIndexOf` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "fe52b53a1c6761e42618d654e4a25789ed61822c", + "tarball": "http://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._baseindexof", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.0" +} diff --git a/tools/eslint/node_modules/lodash._bindcallback/LICENSE.txt b/tools/eslint/node_modules/lodash._bindcallback/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._bindcallback/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._bindcallback/README.md b/tools/eslint/node_modules/lodash._bindcallback/README.md new file mode 100644 index 00000000000000..d287f26d81bc3c --- /dev/null +++ b/tools/eslint/node_modules/lodash._bindcallback/README.md @@ -0,0 +1,20 @@ +# lodash._bindcallback v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `bindCallback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._bindcallback +``` + +In Node.js/io.js: + +```js +var bindCallback = require('lodash._bindcallback'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._bindcallback) for more details. diff --git a/tools/eslint/node_modules/lodash._bindcallback/index.js b/tools/eslint/node_modules/lodash._bindcallback/index.js new file mode 100644 index 00000000000000..ef6811d1a5ebf3 --- /dev/null +++ b/tools/eslint/node_modules/lodash._bindcallback/index.js @@ -0,0 +1,65 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = bindCallback; diff --git a/tools/eslint/node_modules/lodash._bindcallback/package.json b/tools/eslint/node_modules/lodash._bindcallback/package.json new file mode 100644 index 00000000000000..cd813104519558 --- /dev/null +++ b/tools/eslint/node_modules/lodash._bindcallback/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "lodash._bindcallback@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.clonedeep" + ] + ], + "_from": "lodash._bindcallback@>=3.0.0 <4.0.0", + "_id": "lodash._bindcallback@3.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._bindcallback", + "_nodeVersion": "0.12.2", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._bindcallback", + "raw": "lodash._bindcallback@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._createassigner", + "/eslint/lodash.clonedeep", + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "_shasum": "e531c27644cf8b57a99e17ed95b35c748789392e", + "_shrinkwrap": null, + "_spec": "lodash._bindcallback@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.clonedeep", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `bindCallback` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "e531c27644cf8b57a99e17ed95b35c748789392e", + "tarball": "http://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._bindcallback", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.1" +} diff --git a/tools/eslint/node_modules/lodash._cacheindexof/LICENSE.txt b/tools/eslint/node_modules/lodash._cacheindexof/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._cacheindexof/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._cacheindexof/README.md b/tools/eslint/node_modules/lodash._cacheindexof/README.md new file mode 100644 index 00000000000000..69d2b62bf5dbed --- /dev/null +++ b/tools/eslint/node_modules/lodash._cacheindexof/README.md @@ -0,0 +1,20 @@ +# lodash._cacheindexof v3.0.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `cacheIndexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._cacheindexof +``` + +In Node.js/io.js: + +```js +var cacheIndexOf = require('lodash._cacheindexof'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._cacheindexof) for more details. diff --git a/tools/eslint/node_modules/lodash._cacheindexof/index.js b/tools/eslint/node_modules/lodash._cacheindexof/index.js new file mode 100644 index 00000000000000..bc1d5afcfd5778 --- /dev/null +++ b/tools/eslint/node_modules/lodash._cacheindexof/index.js @@ -0,0 +1,53 @@ +/** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ +function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = cacheIndexOf; diff --git a/tools/eslint/node_modules/lodash._cacheindexof/package.json b/tools/eslint/node_modules/lodash._cacheindexof/package.json new file mode 100644 index 00000000000000..a9cda9a5c4d165 --- /dev/null +++ b/tools/eslint/node_modules/lodash._cacheindexof/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "lodash._cacheindexof@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference" + ] + ], + "_from": "lodash._cacheindexof@>=3.0.0 <4.0.0", + "_id": "lodash._cacheindexof@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._cacheindexof", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._cacheindexof", + "raw": "lodash._cacheindexof@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._basedifference" + ], + "_resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz", + "_shasum": "3dc69ac82498d2ee5e3ce56091bafd2adc7bde92", + "_shrinkwrap": null, + "_spec": "lodash._cacheindexof@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `cacheIndexOf` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3dc69ac82498d2ee5e3ce56091bafd2adc7bde92", + "tarball": "http://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._cacheindexof", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.2" +} diff --git a/tools/eslint/node_modules/lodash._createassigner/LICENSE.txt b/tools/eslint/node_modules/lodash._createassigner/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._createassigner/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._createassigner/README.md b/tools/eslint/node_modules/lodash._createassigner/README.md new file mode 100644 index 00000000000000..daeebcef92a54b --- /dev/null +++ b/tools/eslint/node_modules/lodash._createassigner/README.md @@ -0,0 +1,20 @@ +# lodash._createassigner v3.1.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createAssigner` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._createassigner +``` + +In Node.js/io.js: + +```js +var createAssigner = require('lodash._createassigner'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createassigner) for more details. diff --git a/tools/eslint/node_modules/lodash._createassigner/index.js b/tools/eslint/node_modules/lodash._createassigner/index.js new file mode 100644 index 00000000000000..2fdfba78f2ee15 --- /dev/null +++ b/tools/eslint/node_modules/lodash._createassigner/index.js @@ -0,0 +1,52 @@ +/** + * lodash 3.1.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var bindCallback = require('lodash._bindcallback'), + isIterateeCall = require('lodash._isiterateecall'), + restParam = require('lodash.restparam'); + +/** + * Creates a function that assigns properties of source object(s) to a given + * destination object. + * + * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/tools/eslint/node_modules/lodash._createassigner/package.json b/tools/eslint/node_modules/lodash._createassigner/package.json new file mode 100644 index 00000000000000..f670f8485c72c1 --- /dev/null +++ b/tools/eslint/node_modules/lodash._createassigner/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + "lodash._createassigner@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge" + ] + ], + "_from": "lodash._createassigner@>=3.0.0 <4.0.0", + "_id": "lodash._createassigner@3.1.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._createassigner", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._createassigner", + "raw": "lodash._createassigner@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "_shasum": "838a5bae2fdaca63ac22dee8e19fa4e6d6970b11", + "_shrinkwrap": null, + "_spec": "lodash._createassigner@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._bindcallback": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash.restparam": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `createAssigner` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "838a5bae2fdaca63ac22dee8e19fa4e6d6970b11", + "tarball": "http://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._createassigner", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.1" +} diff --git a/tools/eslint/node_modules/lodash._createcache/LICENSE b/tools/eslint/node_modules/lodash._createcache/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._createcache/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._createcache/README.md b/tools/eslint/node_modules/lodash._createcache/README.md new file mode 100644 index 00000000000000..0ee4834d086a5b --- /dev/null +++ b/tools/eslint/node_modules/lodash._createcache/README.md @@ -0,0 +1,20 @@ +# lodash._createcache v3.1.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createCache` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._createcache +``` + +In Node.js/io.js: + +```js +var createCache = require('lodash._createcache'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash._createcache) for more details. diff --git a/tools/eslint/node_modules/lodash._createcache/index.js b/tools/eslint/node_modules/lodash._createcache/index.js new file mode 100644 index 00000000000000..6cf391c1497a4c --- /dev/null +++ b/tools/eslint/node_modules/lodash._createcache/index.js @@ -0,0 +1,91 @@ +/** + * lodash 3.1.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var getNative = require('lodash._getnative'); + +/** Native method references. */ +var Set = getNative(global, 'Set'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCreate = getNative(Object, 'create'); + +/** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } +} + +/** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ +function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } +} + +/** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ +function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +// Add functions to the `Set` cache. +SetCache.prototype.push = cachePush; + +module.exports = createCache; diff --git a/tools/eslint/node_modules/lodash._createcache/package.json b/tools/eslint/node_modules/lodash._createcache/package.json new file mode 100644 index 00000000000000..ca7c08c43ddf3b --- /dev/null +++ b/tools/eslint/node_modules/lodash._createcache/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "lodash._createcache@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference" + ] + ], + "_from": "lodash._createcache@>=3.0.0 <4.0.0", + "_id": "lodash._createcache@3.1.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._createcache", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._createcache", + "raw": "lodash._createcache@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._basedifference" + ], + "_resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz", + "_shasum": "56d6a064017625e79ebca6b8018e17440bdcf093", + "_shrinkwrap": null, + "_spec": "lodash._createcache@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._basedifference", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._getnative": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `createCache` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "56d6a064017625e79ebca6b8018e17440bdcf093", + "tarball": "http://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash._createcache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.2" +} diff --git a/tools/eslint/node_modules/lodash._getnative/LICENSE b/tools/eslint/node_modules/lodash._getnative/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._getnative/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._getnative/README.md b/tools/eslint/node_modules/lodash._getnative/README.md new file mode 100644 index 00000000000000..7835cec0ab1c02 --- /dev/null +++ b/tools/eslint/node_modules/lodash._getnative/README.md @@ -0,0 +1,20 @@ +# lodash._getnative v3.9.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `getNative` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._getnative +``` + +In Node.js/io.js: + +```js +var getNative = require('lodash._getnative'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.9.1-npm-packages/lodash._getnative) for more details. diff --git a/tools/eslint/node_modules/lodash._getnative/index.js b/tools/eslint/node_modules/lodash._getnative/index.js new file mode 100644 index 00000000000000..a32063d27b9e74 --- /dev/null +++ b/tools/eslint/node_modules/lodash._getnative/index.js @@ -0,0 +1,137 @@ +/** + * lodash 3.9.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = getNative; diff --git a/tools/eslint/node_modules/lodash._getnative/package.json b/tools/eslint/node_modules/lodash._getnative/package.json new file mode 100644 index 00000000000000..3d8087358b6b4c --- /dev/null +++ b/tools/eslint/node_modules/lodash._getnative/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + "lodash._getnative@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.keys" + ] + ], + "_from": "lodash._getnative@>=3.0.0 <4.0.0", + "_id": "lodash._getnative@3.9.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._getnative", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._getnative", + "raw": "lodash._getnative@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._createcache", + "/eslint/lodash.keys", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "_shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", + "_shrinkwrap": null, + "_spec": "lodash._getnative@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.keys", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `getNative` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", + "tarball": "http://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._getnative", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.9.1" +} diff --git a/tools/eslint/node_modules/lodash._isiterateecall/LICENSE.txt b/tools/eslint/node_modules/lodash._isiterateecall/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._isiterateecall/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._isiterateecall/README.md b/tools/eslint/node_modules/lodash._isiterateecall/README.md new file mode 100644 index 00000000000000..0c5c701db23f43 --- /dev/null +++ b/tools/eslint/node_modules/lodash._isiterateecall/README.md @@ -0,0 +1,20 @@ +# lodash._isiterateecall v3.0.9 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._isiterateecall +``` + +In Node.js/io.js: + +```js +var isIterateeCall = require('lodash._isiterateecall'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details. diff --git a/tools/eslint/node_modules/lodash._isiterateecall/index.js b/tools/eslint/node_modules/lodash._isiterateecall/index.js new file mode 100644 index 00000000000000..ea3761b6c41ca2 --- /dev/null +++ b/tools/eslint/node_modules/lodash._isiterateecall/index.js @@ -0,0 +1,132 @@ +/** + * lodash 3.0.9 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isIterateeCall; diff --git a/tools/eslint/node_modules/lodash._isiterateecall/package.json b/tools/eslint/node_modules/lodash._isiterateecall/package.json new file mode 100644 index 00000000000000..8999c03f8be570 --- /dev/null +++ b/tools/eslint/node_modules/lodash._isiterateecall/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "lodash._isiterateecall@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._createassigner" + ] + ], + "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "_id": "lodash._isiterateecall@3.0.9", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._isiterateecall", + "_nodeVersion": "2.0.2", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._isiterateecall", + "raw": "lodash._isiterateecall@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._createassigner" + ], + "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", + "_shrinkwrap": null, + "_spec": "lodash._isiterateecall@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._createassigner", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", + "tarball": "http://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._isiterateecall", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.9" +} diff --git a/tools/eslint/node_modules/lodash._pickbyarray/LICENSE.txt b/tools/eslint/node_modules/lodash._pickbyarray/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbyarray/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._pickbyarray/README.md b/tools/eslint/node_modules/lodash._pickbyarray/README.md new file mode 100644 index 00000000000000..c824e12ad7318c --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbyarray/README.md @@ -0,0 +1,20 @@ +# lodash._pickbyarray v3.0.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `pickByArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._pickbyarray +``` + +In Node.js/io.js: + +```js +var pickByArray = require('lodash._pickbyarray'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._pickbyarray) for more details. diff --git a/tools/eslint/node_modules/lodash._pickbyarray/index.js b/tools/eslint/node_modules/lodash._pickbyarray/index.js new file mode 100644 index 00000000000000..ffbd391f4cbdee --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbyarray/index.js @@ -0,0 +1,73 @@ +/** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ +function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; +} + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = pickByArray; diff --git a/tools/eslint/node_modules/lodash._pickbyarray/package.json b/tools/eslint/node_modules/lodash._pickbyarray/package.json new file mode 100644 index 00000000000000..ab39ae2bd1a5d0 --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbyarray/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "lodash._pickbyarray@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit" + ] + ], + "_from": "lodash._pickbyarray@>=3.0.0 <4.0.0", + "_id": "lodash._pickbyarray@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._pickbyarray", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._pickbyarray", + "raw": "lodash._pickbyarray@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz", + "_shasum": "1f898d9607eb560b0e167384b77c7c6d108aa4c5", + "_shrinkwrap": null, + "_spec": "lodash._pickbyarray@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `pickByArray` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1f898d9607eb560b0e167384b77c7c6d108aa4c5", + "tarball": "http://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._pickbyarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.2" +} diff --git a/tools/eslint/node_modules/lodash._pickbycallback/LICENSE.txt b/tools/eslint/node_modules/lodash._pickbycallback/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbycallback/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash._pickbycallback/README.md b/tools/eslint/node_modules/lodash._pickbycallback/README.md new file mode 100644 index 00000000000000..a40c83665e677b --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbycallback/README.md @@ -0,0 +1,20 @@ +# lodash._pickbycallback v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `pickByCallback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._pickbycallback +``` + +In Node.js/io.js: + +```js +var pickByCallback = require('lodash._pickbycallback'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._pickbycallback) for more details. diff --git a/tools/eslint/node_modules/lodash._pickbycallback/index.js b/tools/eslint/node_modules/lodash._pickbycallback/index.js new file mode 100644 index 00000000000000..fdb648469ba9f4 --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbycallback/index.js @@ -0,0 +1,44 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFor = require('lodash._basefor'), + keysIn = require('lodash.keysin'); + +/** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); +} + +/** + * A specialized version of `_.pick` that picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ +function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; +} + +module.exports = pickByCallback; diff --git a/tools/eslint/node_modules/lodash._pickbycallback/package.json b/tools/eslint/node_modules/lodash._pickbycallback/package.json new file mode 100644 index 00000000000000..5281c45254876d --- /dev/null +++ b/tools/eslint/node_modules/lodash._pickbycallback/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "lodash._pickbycallback@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit" + ] + ], + "_from": "lodash._pickbycallback@>=3.0.0 <4.0.0", + "_id": "lodash._pickbycallback@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash._pickbycallback", + "_nodeVersion": "0.10.35", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._pickbycallback", + "raw": "lodash._pickbycallback@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz", + "_shasum": "ff61b9a017a7b3af7d30e6c53de28afa19b8750a", + "_shrinkwrap": null, + "_spec": "lodash._pickbycallback@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.omit", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._basefor": "^3.0.0", + "lodash.keysin": "^3.0.0" + }, + "description": "The modern build of lodash’s internal `pickByCallback` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "ff61b9a017a7b3af7d30e6c53de28afa19b8750a", + "tarball": "http://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._pickbycallback", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/lodash.clonedeep/LICENSE b/tools/eslint/node_modules/lodash.clonedeep/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.clonedeep/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.clonedeep/README.md b/tools/eslint/node_modules/lodash.clonedeep/README.md new file mode 100644 index 00000000000000..7be9a82e463cb2 --- /dev/null +++ b/tools/eslint/node_modules/lodash.clonedeep/README.md @@ -0,0 +1,20 @@ +# lodash.clonedeep v3.0.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.cloneDeep` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.clonedeep +``` + +In Node.js/io.js: + +```js +var cloneDeep = require('lodash.clonedeep'); +``` + +See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.clonedeep) for more details. diff --git a/tools/eslint/node_modules/lodash.clonedeep/index.js b/tools/eslint/node_modules/lodash.clonedeep/index.js new file mode 100644 index 00000000000000..f486c2246be0dd --- /dev/null +++ b/tools/eslint/node_modules/lodash.clonedeep/index.js @@ -0,0 +1,63 @@ +/** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseClone = require('lodash._baseclone'), + bindCallback = require('lodash._bindcallback'); + +/** + * Creates a deep clone of `value`. If `customizer` is provided it's invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with up to three argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ +function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) + : baseClone(value, true); +} + +module.exports = cloneDeep; diff --git a/tools/eslint/node_modules/lodash.clonedeep/package.json b/tools/eslint/node_modules/lodash.clonedeep/package.json new file mode 100644 index 00000000000000..358aa0f3e595b1 --- /dev/null +++ b/tools/eslint/node_modules/lodash.clonedeep/package.json @@ -0,0 +1,124 @@ +{ + "_args": [ + [ + "lodash.clonedeep@^3.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "lodash.clonedeep@>=3.0.1 <4.0.0", + "_id": "lodash.clonedeep@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.clonedeep", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.13.1", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.clonedeep", + "raw": "lodash.clonedeep@^3.0.1", + "rawSpec": "^3.0.1", + "scope": null, + "spec": ">=3.0.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz", + "_shasum": "a0a1e40d82a5ea89ff5b147b8444ed63d92827db", + "_shrinkwrap": null, + "_spec": "lodash.clonedeep@^3.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._baseclone": "^3.0.0", + "lodash._bindcallback": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.cloneDeep` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "a0a1e40d82a5ea89ff5b147b8444ed63d92827db", + "tarball": "http://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.clonedeep", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.2" +} diff --git a/tools/eslint/node_modules/lodash.isarguments/LICENSE b/tools/eslint/node_modules/lodash.isarguments/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarguments/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.isarguments/README.md b/tools/eslint/node_modules/lodash.isarguments/README.md new file mode 100644 index 00000000000000..2e94f790f6e4e4 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarguments/README.md @@ -0,0 +1,20 @@ +# lodash.isarguments v3.0.4 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArguments` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isarguments +``` + +In Node.js/io.js: + +```js +var isArguments = require('lodash.isarguments'); +``` + +See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarguments) for more details. diff --git a/tools/eslint/node_modules/lodash.isarguments/index.js b/tools/eslint/node_modules/lodash.isarguments/index.js new file mode 100644 index 00000000000000..b947b47dffdca8 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarguments/index.js @@ -0,0 +1,106 @@ +/** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; diff --git a/tools/eslint/node_modules/lodash.isarguments/package.json b/tools/eslint/node_modules/lodash.isarguments/package.json new file mode 100644 index 00000000000000..f030efd6007ee0 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarguments/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + "lodash.isarguments@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.keys" + ] + ], + "_from": "lodash.isarguments@>=3.0.0 <4.0.0", + "_id": "lodash.isarguments@3.0.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.isarguments", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.isarguments", + "raw": "lodash.isarguments@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseflatten", + "/eslint/lodash.isplainobject", + "/eslint/lodash.keys", + "/eslint/lodash.keysin", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz", + "_shasum": "ebbb884c48d27366a44ea6fee57ed7b5a32a81e0", + "_shrinkwrap": null, + "_spec": "lodash.isarguments@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.keys", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.isArguments` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "ebbb884c48d27366a44ea6fee57ed7b5a32a81e0", + "tarball": "http://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.4.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.isarguments", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.4" +} diff --git a/tools/eslint/node_modules/lodash.isarray/LICENSE b/tools/eslint/node_modules/lodash.isarray/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarray/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.isarray/README.md b/tools/eslint/node_modules/lodash.isarray/README.md new file mode 100644 index 00000000000000..ea274aae1be395 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarray/README.md @@ -0,0 +1,20 @@ +# lodash.isarray v3.0.4 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isarray +``` + +In Node.js/io.js: + +```js +var isArray = require('lodash.isarray'); +``` + +See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details. diff --git a/tools/eslint/node_modules/lodash.isarray/index.js b/tools/eslint/node_modules/lodash.isarray/index.js new file mode 100644 index 00000000000000..dd246584489df6 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarray/index.js @@ -0,0 +1,180 @@ +/** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]', + funcTag = '[object Function]'; + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isArray; diff --git a/tools/eslint/node_modules/lodash.isarray/package.json b/tools/eslint/node_modules/lodash.isarray/package.json new file mode 100644 index 00000000000000..7420ada8c339ed --- /dev/null +++ b/tools/eslint/node_modules/lodash.isarray/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + "lodash.isarray@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash.isarray@>=3.0.0 <4.0.0", + "_id": "lodash.isarray@3.0.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.isarray", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.isarray", + "raw": "lodash.isarray@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseclone", + "/eslint/lodash._baseflatten", + "/eslint/lodash.keys", + "/eslint/lodash.keysin", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "_shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", + "_shrinkwrap": null, + "_spec": "lodash.isarray@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.isArray` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", + "tarball": "http://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.4" +} diff --git a/tools/eslint/node_modules/lodash.isplainobject/LICENSE b/tools/eslint/node_modules/lodash.isplainobject/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isplainobject/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.isplainobject/README.md b/tools/eslint/node_modules/lodash.isplainobject/README.md new file mode 100644 index 00000000000000..49adee1af0ee0b --- /dev/null +++ b/tools/eslint/node_modules/lodash.isplainobject/README.md @@ -0,0 +1,20 @@ +# lodash.isplainobject v3.2.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isPlainObject` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isplainobject +``` + +In Node.js/io.js: + +```js +var isPlainObject = require('lodash.isplainobject'); +``` + +See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.isplainobject) for more details. diff --git a/tools/eslint/node_modules/lodash.isplainobject/index.js b/tools/eslint/node_modules/lodash.isplainobject/index.js new file mode 100644 index 00000000000000..beadd60ab28e98 --- /dev/null +++ b/tools/eslint/node_modules/lodash.isplainobject/index.js @@ -0,0 +1,103 @@ +/** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseFor = require('lodash._basefor'), + isArguments = require('lodash.isarguments'), + keysIn = require('lodash.keysin'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); +} + +module.exports = isPlainObject; diff --git a/tools/eslint/node_modules/lodash.isplainobject/package.json b/tools/eslint/node_modules/lodash.isplainobject/package.json new file mode 100644 index 00000000000000..96448fccc3b80f --- /dev/null +++ b/tools/eslint/node_modules/lodash.isplainobject/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + "lodash.isplainobject@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge" + ] + ], + "_from": "lodash.isplainobject@>=3.0.0 <4.0.0", + "_id": "lodash.isplainobject@3.2.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.isplainobject", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.isplainobject", + "raw": "lodash.isplainobject@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz", + "_shasum": "9a8238ae16b200432960cd7346512d0123fbf4c5", + "_shrinkwrap": null, + "_spec": "lodash.isplainobject@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._basefor": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.keysin": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.isPlainObject` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9a8238ae16b200432960cd7346512d0123fbf4c5", + "tarball": "http://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.isplainobject", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.2.0" +} diff --git a/tools/eslint/node_modules/lodash.istypedarray/LICENSE.txt b/tools/eslint/node_modules/lodash.istypedarray/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.istypedarray/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.istypedarray/README.md b/tools/eslint/node_modules/lodash.istypedarray/README.md new file mode 100644 index 00000000000000..b1779ccf7fcd17 --- /dev/null +++ b/tools/eslint/node_modules/lodash.istypedarray/README.md @@ -0,0 +1,20 @@ +# lodash.istypedarray v3.0.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isTypedArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.istypedarray +``` + +In Node.js/io.js: + +```js +var isTypedArray = require('lodash.istypedarray'); +``` + +See the [documentation](https://lodash.com/docs#isTypedArray) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.istypedarray) for more details. diff --git a/tools/eslint/node_modules/lodash.istypedarray/index.js b/tools/eslint/node_modules/lodash.istypedarray/index.js new file mode 100644 index 00000000000000..829a2d77a78ec7 --- /dev/null +++ b/tools/eslint/node_modules/lodash.istypedarray/index.js @@ -0,0 +1,110 @@ +/** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; diff --git a/tools/eslint/node_modules/lodash.istypedarray/package.json b/tools/eslint/node_modules/lodash.istypedarray/package.json new file mode 100644 index 00000000000000..8dcf4f5bbc6cd5 --- /dev/null +++ b/tools/eslint/node_modules/lodash.istypedarray/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + "lodash.istypedarray@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge" + ] + ], + "_from": "lodash.istypedarray@>=3.0.0 <4.0.0", + "_id": "lodash.istypedarray@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.istypedarray", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.istypedarray", + "raw": "lodash.istypedarray@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.2.tgz", + "_shasum": "9397b113c15f424f320af06caa59cc495e2093ce", + "_shrinkwrap": null, + "_spec": "lodash.istypedarray@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.isTypedArray` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9397b113c15f424f320af06caa59cc495e2093ce", + "tarball": "http://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.istypedarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.2" +} diff --git a/tools/eslint/node_modules/lodash.keys/LICENSE b/tools/eslint/node_modules/lodash.keys/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.keys/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.keys/README.md b/tools/eslint/node_modules/lodash.keys/README.md new file mode 100644 index 00000000000000..5f69a1826f90e2 --- /dev/null +++ b/tools/eslint/node_modules/lodash.keys/README.md @@ -0,0 +1,20 @@ +# lodash.keys v3.1.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.keys +``` + +In Node.js/io.js: + +```js +var keys = require('lodash.keys'); +``` + +See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details. diff --git a/tools/eslint/node_modules/lodash.keys/index.js b/tools/eslint/node_modules/lodash.keys/index.js new file mode 100644 index 00000000000000..f4c17749a17ae7 --- /dev/null +++ b/tools/eslint/node_modules/lodash.keys/index.js @@ -0,0 +1,236 @@ +/** + * lodash 3.1.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var getNative = require('lodash._getnative'), + isArguments = require('lodash.isarguments'), + isArray = require('lodash.isarray'); + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keys; diff --git a/tools/eslint/node_modules/lodash.keys/package.json b/tools/eslint/node_modules/lodash.keys/package.json new file mode 100644 index 00000000000000..8a2c5034a8e8ec --- /dev/null +++ b/tools/eslint/node_modules/lodash.keys/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + "lodash.keys@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone" + ] + ], + "_from": "lodash.keys@>=3.0.0 <4.0.0", + "_id": "lodash.keys@3.1.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.keys", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.keys", + "raw": "lodash.keys@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._baseassign", + "/eslint/lodash._baseclone", + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "_shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", + "_shrinkwrap": null, + "_spec": "lodash.keys@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._baseclone", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.keys` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", + "tarball": "http://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.keys", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.2" +} diff --git a/tools/eslint/node_modules/lodash.keysin/LICENSE.txt b/tools/eslint/node_modules/lodash.keysin/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.keysin/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.keysin/README.md b/tools/eslint/node_modules/lodash.keysin/README.md new file mode 100644 index 00000000000000..1ff19c8fa76abe --- /dev/null +++ b/tools/eslint/node_modules/lodash.keysin/README.md @@ -0,0 +1,20 @@ +# lodash.keysin v3.0.8 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keysIn` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.keysin +``` + +In Node.js/io.js: + +```js +var keysIn = require('lodash.keysin'); +``` + +See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.keysin) for more details. diff --git a/tools/eslint/node_modules/lodash.keysin/index.js b/tools/eslint/node_modules/lodash.keysin/index.js new file mode 100644 index 00000000000000..b109299c40680d --- /dev/null +++ b/tools/eslint/node_modules/lodash.keysin/index.js @@ -0,0 +1,132 @@ +/** + * lodash 3.0.8 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var isArguments = require('lodash.isarguments'), + isArray = require('lodash.isarray'); + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; diff --git a/tools/eslint/node_modules/lodash.keysin/package.json b/tools/eslint/node_modules/lodash.keysin/package.json new file mode 100644 index 00000000000000..bb173e995b2d71 --- /dev/null +++ b/tools/eslint/node_modules/lodash.keysin/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "lodash.keysin@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge" + ] + ], + "_from": "lodash.keysin@>=3.0.0 <4.0.0", + "_id": "lodash.keysin@3.0.8", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.keysin", + "_nodeVersion": "2.0.2", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.keysin", + "raw": "lodash.keysin@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._pickbycallback", + "/eslint/lodash.isplainobject", + "/eslint/lodash.merge", + "/eslint/lodash.omit", + "/eslint/lodash.toplainobject" + ], + "_resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz", + "_shasum": "22c4493ebbedb1427962a54b445b2c8a767fb47f", + "_shrinkwrap": null, + "_spec": "lodash.keysin@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.keysIn` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "22c4493ebbedb1427962a54b445b2c8a767fb47f", + "tarball": "http://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.keysin", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.8" +} diff --git a/tools/eslint/node_modules/lodash.merge/LICENSE b/tools/eslint/node_modules/lodash.merge/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.merge/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.merge/README.md b/tools/eslint/node_modules/lodash.merge/README.md new file mode 100644 index 00000000000000..e8acecff109e78 --- /dev/null +++ b/tools/eslint/node_modules/lodash.merge/README.md @@ -0,0 +1,20 @@ +# lodash.merge v3.3.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.merge` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.merge +``` + +In Node.js/io.js: + +```js +var merge = require('lodash.merge'); +``` + +See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.3.2-npm-packages/lodash.merge) for more details. diff --git a/tools/eslint/node_modules/lodash.merge/index.js b/tools/eslint/node_modules/lodash.merge/index.js new file mode 100644 index 00000000000000..42a7bc172f533b --- /dev/null +++ b/tools/eslint/node_modules/lodash.merge/index.js @@ -0,0 +1,266 @@ +/** + * lodash 3.3.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrayCopy = require('lodash._arraycopy'), + arrayEach = require('lodash._arrayeach'), + createAssigner = require('lodash._createassigner'), + isArguments = require('lodash.isarguments'), + isArray = require('lodash.isarray'), + isPlainObject = require('lodash.isplainobject'), + isTypedArray = require('lodash.istypedarray'), + keys = require('lodash.keys'), + toPlainObject = require('lodash.toplainobject'); + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ +function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } +} + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ +var merge = createAssigner(baseMerge); + +module.exports = merge; diff --git a/tools/eslint/node_modules/lodash.merge/package.json b/tools/eslint/node_modules/lodash.merge/package.json new file mode 100644 index 00000000000000..c57b57725a6c70 --- /dev/null +++ b/tools/eslint/node_modules/lodash.merge/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + "lodash.merge@^3.3.2", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "lodash.merge@>=3.3.2 <4.0.0", + "_id": "lodash.merge@3.3.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.merge", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.merge", + "raw": "lodash.merge@^3.3.2", + "rawSpec": "^3.3.2", + "scope": null, + "spec": ">=3.3.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz", + "_shasum": "0d90d93ed637b1878437bb3e21601260d7afe994", + "_shrinkwrap": null, + "_spec": "lodash.merge@^3.3.2", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._arraycopy": "^3.0.0", + "lodash._arrayeach": "^3.0.0", + "lodash._createassigner": "^3.0.0", + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0", + "lodash.isplainobject": "^3.0.0", + "lodash.istypedarray": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.keysin": "^3.0.0", + "lodash.toplainobject": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.merge` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0d90d93ed637b1878437bb3e21601260d7afe994", + "tarball": "http://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.merge", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.3.2" +} diff --git a/tools/eslint/node_modules/lodash.omit/LICENSE.txt b/tools/eslint/node_modules/lodash.omit/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.omit/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.omit/README.md b/tools/eslint/node_modules/lodash.omit/README.md new file mode 100644 index 00000000000000..49990faf993474 --- /dev/null +++ b/tools/eslint/node_modules/lodash.omit/README.md @@ -0,0 +1,20 @@ +# lodash.omit v3.1.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.omit` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.omit +``` + +In Node.js/io.js: + +```js +var omit = require('lodash.omit'); +``` + +See the [documentation](https://lodash.com/docs#omit) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.omit) for more details. diff --git a/tools/eslint/node_modules/lodash.omit/index.js b/tools/eslint/node_modules/lodash.omit/index.js new file mode 100644 index 00000000000000..bcf4d2232d8892 --- /dev/null +++ b/tools/eslint/node_modules/lodash.omit/index.js @@ -0,0 +1,60 @@ +/** + * lodash 3.1.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.2 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var arrayMap = require('lodash._arraymap'), + baseDifference = require('lodash._basedifference'), + baseFlatten = require('lodash._baseflatten'), + bindCallback = require('lodash._bindcallback'), + pickByArray = require('lodash._pickbyarray'), + pickByCallback = require('lodash._pickbycallback'), + keysIn = require('lodash.keysin'), + restParam = require('lodash.restparam'); + +/** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * Property names may be specified as individual arguments or as arrays of + * property names. If `predicate` is provided it is invoked for each property + * of `object` omitting the properties `predicate` returns truthy for. The + * predicate is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ +var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); +}); + +module.exports = omit; diff --git a/tools/eslint/node_modules/lodash.omit/package.json b/tools/eslint/node_modules/lodash.omit/package.json new file mode 100644 index 00000000000000..388cbc28711e8b --- /dev/null +++ b/tools/eslint/node_modules/lodash.omit/package.json @@ -0,0 +1,130 @@ +{ + "_args": [ + [ + "lodash.omit@^3.1.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "lodash.omit@>=3.1.0 <4.0.0", + "_id": "lodash.omit@3.1.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.omit", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.7.3", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.omit", + "raw": "lodash.omit@^3.1.0", + "rawSpec": "^3.1.0", + "scope": null, + "spec": ">=3.1.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz", + "_shasum": "897fe382e6413d9ac97c61f78ed1e057a00af9f3", + "_shrinkwrap": null, + "_spec": "lodash.omit@^3.1.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._arraymap": "^3.0.0", + "lodash._basedifference": "^3.0.0", + "lodash._baseflatten": "^3.0.0", + "lodash._bindcallback": "^3.0.0", + "lodash._pickbyarray": "^3.0.0", + "lodash._pickbycallback": "^3.0.0", + "lodash.keysin": "^3.0.0", + "lodash.restparam": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.omit` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "897fe382e6413d9ac97c61f78ed1e057a00af9f3", + "tarball": "http://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.omit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.0" +} diff --git a/tools/eslint/node_modules/lodash.restparam/LICENSE.txt b/tools/eslint/node_modules/lodash.restparam/LICENSE.txt new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash.restparam/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.restparam/README.md b/tools/eslint/node_modules/lodash.restparam/README.md new file mode 100644 index 00000000000000..80e47a4f9b2093 --- /dev/null +++ b/tools/eslint/node_modules/lodash.restparam/README.md @@ -0,0 +1,20 @@ +# lodash.restparam v3.6.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.restParam` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.restparam +``` + +In Node.js/io.js: + +```js +var restParam = require('lodash.restparam'); +``` + +See the [documentation](https://lodash.com/docs#restParam) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.restparam) for more details. diff --git a/tools/eslint/node_modules/lodash.restparam/index.js b/tools/eslint/node_modules/lodash.restparam/index.js new file mode 100644 index 00000000000000..932f47ac743461 --- /dev/null +++ b/tools/eslint/node_modules/lodash.restparam/index.js @@ -0,0 +1,67 @@ +/** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/tools/eslint/node_modules/lodash.restparam/package.json b/tools/eslint/node_modules/lodash.restparam/package.json new file mode 100644 index 00000000000000..e11b67f6348076 --- /dev/null +++ b/tools/eslint/node_modules/lodash.restparam/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + "lodash.restparam@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._createassigner" + ] + ], + "_from": "lodash.restparam@>=3.0.0 <4.0.0", + "_id": "lodash.restparam@3.6.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.restparam", + "_nodeVersion": "0.12.2", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.restparam", + "raw": "lodash.restparam@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash._createassigner", + "/eslint/lodash.omit" + ], + "_resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "_shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", + "_shrinkwrap": null, + "_spec": "lodash.restparam@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash._createassigner", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.restParam` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", + "tarball": "http://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.restparam", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.6.1" +} diff --git a/tools/eslint/node_modules/lodash.toplainobject/LICENSE.txt b/tools/eslint/node_modules/lodash.toplainobject/LICENSE.txt new file mode 100644 index 00000000000000..17764328c826b5 --- /dev/null +++ b/tools/eslint/node_modules/lodash.toplainobject/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash.toplainobject/README.md b/tools/eslint/node_modules/lodash.toplainobject/README.md new file mode 100644 index 00000000000000..72b3423cb31150 --- /dev/null +++ b/tools/eslint/node_modules/lodash.toplainobject/README.md @@ -0,0 +1,20 @@ +# lodash.toplainobject v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.toPlainObject` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.toplainobject +``` + +In Node.js/io.js: + +```js +var toPlainObject = require('lodash.toplainobject'); +``` + +See the [documentation](https://lodash.com/docs#toPlainObject) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.toplainobject) for more details. diff --git a/tools/eslint/node_modules/lodash.toplainobject/index.js b/tools/eslint/node_modules/lodash.toplainobject/index.js new file mode 100644 index 00000000000000..b54640c93fc073 --- /dev/null +++ b/tools/eslint/node_modules/lodash.toplainobject/index.js @@ -0,0 +1,39 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCopy = require('lodash._basecopy'), + keysIn = require('lodash.keysin'); + +/** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return baseCopy(value, keysIn(value)); +} + +module.exports = toPlainObject; diff --git a/tools/eslint/node_modules/lodash.toplainobject/package.json b/tools/eslint/node_modules/lodash.toplainobject/package.json new file mode 100644 index 00000000000000..eba3501e37a31e --- /dev/null +++ b/tools/eslint/node_modules/lodash.toplainobject/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "lodash.toplainobject@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge" + ] + ], + "_from": "lodash.toplainobject@>=3.0.0 <4.0.0", + "_id": "lodash.toplainobject@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/lodash.toplainobject", + "_nodeVersion": "0.10.35", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "lodash.toplainobject", + "raw": "lodash.toplainobject@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/lodash.merge" + ], + "_resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz", + "_shasum": "28790ad942d293d78aa663a07ecf7f52ca04198d", + "_shrinkwrap": null, + "_spec": "lodash.toplainobject@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/lodash.merge", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._basecopy": "^3.0.0", + "lodash.keysin": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.toPlainObject` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "28790ad942d293d78aa663a07ecf7f52ca04198d", + "tarball": "http://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash.toplainobject", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/lodash/LICENSE b/tools/eslint/node_modules/lodash/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/tools/eslint/node_modules/lodash/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/eslint/node_modules/lodash/README.md b/tools/eslint/node_modules/lodash/README.md new file mode 100644 index 00000000000000..fd98e5c989542c --- /dev/null +++ b/tools/eslint/node_modules/lodash/README.md @@ -0,0 +1,121 @@ +# lodash v3.10.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. + +Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): +```bash +$ lodash modularize modern exports=node -o ./ +$ lodash modern -d -o ./index.js +``` + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash +``` + +In Node.js/io.js: + +```js +// load the modern build +var _ = require('lodash'); +// or a method category +var array = require('lodash/array'); +// or a method (great for smaller builds with browserify/webpack) +var chunk = require('lodash/array/chunk'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details. + +**Note:**
    +Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
    +Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. + +## Module formats + +lodash is also available in a variety of other builds & module formats. + + * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds + * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds + * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build + +## Further Reading + + * [API Documentation](https://lodash.com/docs) + * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) + * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) + * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) + * [More Resources](https://github.com/lodash/lodash/wiki/Resources) + +## Features + + * ~100% [code coverage](https://coveralls.io/r/lodash) + * Follows [semantic versioning](http://semver.org/) for releases + * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining + * [_(…)](https://lodash.com/docs#_) supports implicit chaining + * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order + * [_.at](https://lodash.com/docs#at) for cherry-picking collection values + * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch + * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) + * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size + * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions + * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control + * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties + * [_.fill](https://lodash.com/docs#fill) to fill arrays with values + * [_.findKey](https://lodash.com/docs#findKey) for finding keys + * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) + * [_.forEach](https://lodash.com/docs#forEach) supports exiting early + * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties + * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties + * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting + * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods + * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range + * [_.isNative](https://lodash.com/docs#isNative) to check for native functions + * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects + * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays + * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object + * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons + * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) + * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) + * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods + * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition + * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior + * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays + * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers + * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions + * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking + * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values + * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders + * [_.support](https://lodash.com/docs#support) for flagging environment features + * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) + * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects + * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined + * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties + * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) + * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), & + [more](https://lodash.com/docs "_.ceil & _.floor") math methods + * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & + [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders + * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & + [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods + * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & + [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks + * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & + [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) + * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & + [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods + * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & + [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings + * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences + * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence + +## Support + +Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6. +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array.js b/tools/eslint/node_modules/lodash/array.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array.js rename to tools/eslint/node_modules/lodash/array.js diff --git a/tools/eslint/node_modules/lodash/array/chunk.js b/tools/eslint/node_modules/lodash/array/chunk.js new file mode 100644 index 00000000000000..c8be1fb02da3de --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/chunk.js @@ -0,0 +1,46 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/compact.js b/tools/eslint/node_modules/lodash/array/compact.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/compact.js rename to tools/eslint/node_modules/lodash/array/compact.js diff --git a/tools/eslint/node_modules/lodash/array/difference.js b/tools/eslint/node_modules/lodash/array/difference.js new file mode 100644 index 00000000000000..128932a146d2a6 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/difference.js @@ -0,0 +1,29 @@ +var baseDifference = require('../internal/baseDifference'), + baseFlatten = require('../internal/baseFlatten'), + isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ +var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; +}); + +module.exports = difference; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/drop.js b/tools/eslint/node_modules/lodash/array/drop.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/drop.js rename to tools/eslint/node_modules/lodash/array/drop.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropRight.js b/tools/eslint/node_modules/lodash/array/dropRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropRight.js rename to tools/eslint/node_modules/lodash/array/dropRight.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropRightWhile.js b/tools/eslint/node_modules/lodash/array/dropRightWhile.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropRightWhile.js rename to tools/eslint/node_modules/lodash/array/dropRightWhile.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropWhile.js b/tools/eslint/node_modules/lodash/array/dropWhile.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/dropWhile.js rename to tools/eslint/node_modules/lodash/array/dropWhile.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/fill.js b/tools/eslint/node_modules/lodash/array/fill.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/fill.js rename to tools/eslint/node_modules/lodash/array/fill.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/findIndex.js b/tools/eslint/node_modules/lodash/array/findIndex.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/findIndex.js rename to tools/eslint/node_modules/lodash/array/findIndex.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/findLastIndex.js b/tools/eslint/node_modules/lodash/array/findLastIndex.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/findLastIndex.js rename to tools/eslint/node_modules/lodash/array/findLastIndex.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/first.js b/tools/eslint/node_modules/lodash/array/first.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/first.js rename to tools/eslint/node_modules/lodash/array/first.js diff --git a/tools/eslint/node_modules/lodash/array/flatten.js b/tools/eslint/node_modules/lodash/array/flatten.js new file mode 100644 index 00000000000000..dc2eff86867daf --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/flatten.js @@ -0,0 +1,32 @@ +var baseFlatten = require('../internal/baseFlatten'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it's only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ +function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; +} + +module.exports = flatten; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/flattenDeep.js b/tools/eslint/node_modules/lodash/array/flattenDeep.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/flattenDeep.js rename to tools/eslint/node_modules/lodash/array/flattenDeep.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/head.js b/tools/eslint/node_modules/lodash/array/head.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/head.js rename to tools/eslint/node_modules/lodash/array/head.js diff --git a/tools/eslint/node_modules/lodash/array/indexOf.js b/tools/eslint/node_modules/lodash/array/indexOf.js new file mode 100644 index 00000000000000..4cfc68231991aa --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/indexOf.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + binaryIndex = require('../internal/binaryIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); +} + +module.exports = indexOf; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/initial.js b/tools/eslint/node_modules/lodash/array/initial.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/initial.js rename to tools/eslint/node_modules/lodash/array/initial.js diff --git a/tools/eslint/node_modules/lodash/array/intersection.js b/tools/eslint/node_modules/lodash/array/intersection.js new file mode 100644 index 00000000000000..f218432cfb4de4 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/intersection.js @@ -0,0 +1,58 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + cacheIndexOf = require('../internal/cacheIndexOf'), + createCache = require('../internal/createCache'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ +var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = baseIndexOf, + isCommon = true, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; +}); + +module.exports = intersection; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/last.js b/tools/eslint/node_modules/lodash/array/last.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/last.js rename to tools/eslint/node_modules/lodash/array/last.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/lastIndexOf.js b/tools/eslint/node_modules/lodash/array/lastIndexOf.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/lastIndexOf.js rename to tools/eslint/node_modules/lodash/array/lastIndexOf.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/object.js b/tools/eslint/node_modules/lodash/array/object.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/object.js rename to tools/eslint/node_modules/lodash/array/object.js diff --git a/tools/eslint/node_modules/lodash/array/pull.js b/tools/eslint/node_modules/lodash/array/pull.js new file mode 100644 index 00000000000000..7bcbb4a63cbb90 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/pull.js @@ -0,0 +1,52 @@ +var baseIndexOf = require('../internal/baseIndexOf'); + +/** Used for native method references. */ +var arrayProto = Array.prototype; + +/** Native method references. */ +var splice = arrayProto.splice; + +/** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ +function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = baseIndexOf, + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = pull; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/pullAt.js b/tools/eslint/node_modules/lodash/array/pullAt.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/pullAt.js rename to tools/eslint/node_modules/lodash/array/pullAt.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/remove.js b/tools/eslint/node_modules/lodash/array/remove.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/remove.js rename to tools/eslint/node_modules/lodash/array/remove.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/rest.js b/tools/eslint/node_modules/lodash/array/rest.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/rest.js rename to tools/eslint/node_modules/lodash/array/rest.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/slice.js b/tools/eslint/node_modules/lodash/array/slice.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/slice.js rename to tools/eslint/node_modules/lodash/array/slice.js diff --git a/tools/eslint/node_modules/lodash/array/sortedIndex.js b/tools/eslint/node_modules/lodash/array/sortedIndex.js new file mode 100644 index 00000000000000..6903bca4370c26 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/sortedIndex.js @@ -0,0 +1,53 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it's invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ +var sortedIndex = createSortedIndex(); + +module.exports = sortedIndex; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedLastIndex.js b/tools/eslint/node_modules/lodash/array/sortedLastIndex.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/sortedLastIndex.js rename to tools/eslint/node_modules/lodash/array/sortedLastIndex.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/tail.js b/tools/eslint/node_modules/lodash/array/tail.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/tail.js rename to tools/eslint/node_modules/lodash/array/tail.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/take.js b/tools/eslint/node_modules/lodash/array/take.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/take.js rename to tools/eslint/node_modules/lodash/array/take.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeRight.js b/tools/eslint/node_modules/lodash/array/takeRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeRight.js rename to tools/eslint/node_modules/lodash/array/takeRight.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeRightWhile.js b/tools/eslint/node_modules/lodash/array/takeRightWhile.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeRightWhile.js rename to tools/eslint/node_modules/lodash/array/takeRightWhile.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeWhile.js b/tools/eslint/node_modules/lodash/array/takeWhile.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/takeWhile.js rename to tools/eslint/node_modules/lodash/array/takeWhile.js diff --git a/tools/eslint/node_modules/lodash/array/union.js b/tools/eslint/node_modules/lodash/array/union.js new file mode 100644 index 00000000000000..53cefe432d455b --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/union.js @@ -0,0 +1,24 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseUniq = require('../internal/baseUniq'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ +var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); +}); + +module.exports = union; diff --git a/tools/eslint/node_modules/lodash/array/uniq.js b/tools/eslint/node_modules/lodash/array/uniq.js new file mode 100644 index 00000000000000..ae937efdf53cd3 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/uniq.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseUniq = require('../internal/baseUniq'), + isIterateeCall = require('../internal/isIterateeCall'), + sortedUniq = require('../internal/sortedUniq'); + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it's invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); + return (isSorted) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); +} + +module.exports = uniq; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/unique.js b/tools/eslint/node_modules/lodash/array/unique.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/unique.js rename to tools/eslint/node_modules/lodash/array/unique.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/unzip.js b/tools/eslint/node_modules/lodash/array/unzip.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/unzip.js rename to tools/eslint/node_modules/lodash/array/unzip.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/unzipWith.js b/tools/eslint/node_modules/lodash/array/unzipWith.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/unzipWith.js rename to tools/eslint/node_modules/lodash/array/unzipWith.js diff --git a/tools/eslint/node_modules/lodash/array/without.js b/tools/eslint/node_modules/lodash/array/without.js new file mode 100644 index 00000000000000..2ac3d1176eec90 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/without.js @@ -0,0 +1,27 @@ +var baseDifference = require('../internal/baseDifference'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ +var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; diff --git a/tools/eslint/node_modules/lodash/array/xor.js b/tools/eslint/node_modules/lodash/array/xor.js new file mode 100644 index 00000000000000..04ef32aefd9af2 --- /dev/null +++ b/tools/eslint/node_modules/lodash/array/xor.js @@ -0,0 +1,35 @@ +var arrayPush = require('../internal/arrayPush'), + baseDifference = require('../internal/baseDifference'), + baseUniq = require('../internal/baseUniq'), + isArrayLike = require('../internal/isArrayLike'); + +/** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; +} + +module.exports = xor; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/zip.js b/tools/eslint/node_modules/lodash/array/zip.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/zip.js rename to tools/eslint/node_modules/lodash/array/zip.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/zipObject.js b/tools/eslint/node_modules/lodash/array/zipObject.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/zipObject.js rename to tools/eslint/node_modules/lodash/array/zipObject.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/array/zipWith.js b/tools/eslint/node_modules/lodash/array/zipWith.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/array/zipWith.js rename to tools/eslint/node_modules/lodash/array/zipWith.js diff --git a/tools/eslint/node_modules/lodash/chain.js b/tools/eslint/node_modules/lodash/chain.js new file mode 100644 index 00000000000000..6439627f3d9d0a --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain.js @@ -0,0 +1,16 @@ +module.exports = { + 'chain': require('./chain/chain'), + 'commit': require('./chain/commit'), + 'concat': require('./chain/concat'), + 'lodash': require('./chain/lodash'), + 'plant': require('./chain/plant'), + 'reverse': require('./chain/reverse'), + 'run': require('./chain/run'), + 'tap': require('./chain/tap'), + 'thru': require('./chain/thru'), + 'toJSON': require('./chain/toJSON'), + 'toString': require('./chain/toString'), + 'value': require('./chain/value'), + 'valueOf': require('./chain/valueOf'), + 'wrapperChain': require('./chain/wrapperChain') +}; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/chain.js b/tools/eslint/node_modules/lodash/chain/chain.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/chain.js rename to tools/eslint/node_modules/lodash/chain/chain.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/commit.js b/tools/eslint/node_modules/lodash/chain/commit.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/commit.js rename to tools/eslint/node_modules/lodash/chain/commit.js diff --git a/tools/eslint/node_modules/lodash/chain/concat.js b/tools/eslint/node_modules/lodash/chain/concat.js new file mode 100644 index 00000000000000..90607d1ee102ae --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/concat.js @@ -0,0 +1 @@ +module.exports = require('./wrapperConcat'); diff --git a/tools/eslint/node_modules/lodash/chain/lodash.js b/tools/eslint/node_modules/lodash/chain/lodash.js new file mode 100644 index 00000000000000..1c3467efeec9e9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/lodash.js @@ -0,0 +1,125 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + baseLodash = require('../internal/baseLodash'), + isArray = require('../lang/isArray'), + isObjectLike = require('../internal/isObjectLike'), + wrapperClone = require('../internal/wrapperClone'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; + +module.exports = lodash; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/plant.js b/tools/eslint/node_modules/lodash/chain/plant.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/plant.js rename to tools/eslint/node_modules/lodash/chain/plant.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/reverse.js b/tools/eslint/node_modules/lodash/chain/reverse.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/reverse.js rename to tools/eslint/node_modules/lodash/chain/reverse.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/run.js b/tools/eslint/node_modules/lodash/chain/run.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/run.js rename to tools/eslint/node_modules/lodash/chain/run.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/tap.js b/tools/eslint/node_modules/lodash/chain/tap.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/tap.js rename to tools/eslint/node_modules/lodash/chain/tap.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/thru.js b/tools/eslint/node_modules/lodash/chain/thru.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/thru.js rename to tools/eslint/node_modules/lodash/chain/thru.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/toJSON.js b/tools/eslint/node_modules/lodash/chain/toJSON.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/toJSON.js rename to tools/eslint/node_modules/lodash/chain/toJSON.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/toString.js b/tools/eslint/node_modules/lodash/chain/toString.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/toString.js rename to tools/eslint/node_modules/lodash/chain/toString.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/value.js b/tools/eslint/node_modules/lodash/chain/value.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/value.js rename to tools/eslint/node_modules/lodash/chain/value.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/valueOf.js b/tools/eslint/node_modules/lodash/chain/valueOf.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/valueOf.js rename to tools/eslint/node_modules/lodash/chain/valueOf.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperChain.js b/tools/eslint/node_modules/lodash/chain/wrapperChain.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperChain.js rename to tools/eslint/node_modules/lodash/chain/wrapperChain.js diff --git a/tools/eslint/node_modules/lodash/chain/wrapperCommit.js b/tools/eslint/node_modules/lodash/chain/wrapperCommit.js new file mode 100644 index 00000000000000..c3d289804bde22 --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/wrapperCommit.js @@ -0,0 +1,32 @@ +var LodashWrapper = require('../internal/LodashWrapper'); + +/** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/tools/eslint/node_modules/lodash/chain/wrapperConcat.js b/tools/eslint/node_modules/lodash/chain/wrapperConcat.js new file mode 100644 index 00000000000000..799156cd836b63 --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/wrapperConcat.js @@ -0,0 +1,34 @@ +var arrayConcat = require('../internal/arrayConcat'), + baseFlatten = require('../internal/baseFlatten'), + isArray = require('../lang/isArray'), + restParam = require('../function/restParam'), + toObject = require('../internal/toObject'); + +/** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); +}); + +module.exports = wrapperConcat; diff --git a/tools/eslint/node_modules/lodash/chain/wrapperPlant.js b/tools/eslint/node_modules/lodash/chain/wrapperPlant.js new file mode 100644 index 00000000000000..234fe41fec45c7 --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/wrapperPlant.js @@ -0,0 +1,45 @@ +var baseLodash = require('../internal/baseLodash'), + wrapperClone = require('../internal/wrapperClone'); + +/** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ +function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; +} + +module.exports = wrapperPlant; diff --git a/tools/eslint/node_modules/lodash/chain/wrapperReverse.js b/tools/eslint/node_modules/lodash/chain/wrapperReverse.js new file mode 100644 index 00000000000000..6ba546de4ee4fe --- /dev/null +++ b/tools/eslint/node_modules/lodash/chain/wrapperReverse.js @@ -0,0 +1,43 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + thru = require('./thru'); + +/** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); +} + +module.exports = wrapperReverse; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperToString.js b/tools/eslint/node_modules/lodash/chain/wrapperToString.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperToString.js rename to tools/eslint/node_modules/lodash/chain/wrapperToString.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperValue.js b/tools/eslint/node_modules/lodash/chain/wrapperValue.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/chain/wrapperValue.js rename to tools/eslint/node_modules/lodash/chain/wrapperValue.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection.js b/tools/eslint/node_modules/lodash/collection.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection.js rename to tools/eslint/node_modules/lodash/collection.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/all.js b/tools/eslint/node_modules/lodash/collection/all.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/all.js rename to tools/eslint/node_modules/lodash/collection/all.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/any.js b/tools/eslint/node_modules/lodash/collection/any.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/any.js rename to tools/eslint/node_modules/lodash/collection/any.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/at.js b/tools/eslint/node_modules/lodash/collection/at.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/at.js rename to tools/eslint/node_modules/lodash/collection/at.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/collect.js b/tools/eslint/node_modules/lodash/collection/collect.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/collect.js rename to tools/eslint/node_modules/lodash/collection/collect.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/contains.js b/tools/eslint/node_modules/lodash/collection/contains.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/contains.js rename to tools/eslint/node_modules/lodash/collection/contains.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/countBy.js b/tools/eslint/node_modules/lodash/collection/countBy.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/countBy.js rename to tools/eslint/node_modules/lodash/collection/countBy.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/detect.js b/tools/eslint/node_modules/lodash/collection/detect.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/detect.js rename to tools/eslint/node_modules/lodash/collection/detect.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/each.js b/tools/eslint/node_modules/lodash/collection/each.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/each.js rename to tools/eslint/node_modules/lodash/collection/each.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/eachRight.js b/tools/eslint/node_modules/lodash/collection/eachRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/eachRight.js rename to tools/eslint/node_modules/lodash/collection/eachRight.js diff --git a/tools/eslint/node_modules/lodash/collection/every.js b/tools/eslint/node_modules/lodash/collection/every.js new file mode 100644 index 00000000000000..5a2d0f5dd448b0 --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/every.js @@ -0,0 +1,66 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/filter.js b/tools/eslint/node_modules/lodash/collection/filter.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/filter.js rename to tools/eslint/node_modules/lodash/collection/filter.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/find.js b/tools/eslint/node_modules/lodash/collection/find.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/find.js rename to tools/eslint/node_modules/lodash/collection/find.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/findLast.js b/tools/eslint/node_modules/lodash/collection/findLast.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/findLast.js rename to tools/eslint/node_modules/lodash/collection/findLast.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/findWhere.js b/tools/eslint/node_modules/lodash/collection/findWhere.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/findWhere.js rename to tools/eslint/node_modules/lodash/collection/findWhere.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/foldl.js b/tools/eslint/node_modules/lodash/collection/foldl.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/foldl.js rename to tools/eslint/node_modules/lodash/collection/foldl.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/foldr.js b/tools/eslint/node_modules/lodash/collection/foldr.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/foldr.js rename to tools/eslint/node_modules/lodash/collection/foldr.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/forEach.js b/tools/eslint/node_modules/lodash/collection/forEach.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/forEach.js rename to tools/eslint/node_modules/lodash/collection/forEach.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/forEachRight.js b/tools/eslint/node_modules/lodash/collection/forEachRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/forEachRight.js rename to tools/eslint/node_modules/lodash/collection/forEachRight.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/groupBy.js b/tools/eslint/node_modules/lodash/collection/groupBy.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/groupBy.js rename to tools/eslint/node_modules/lodash/collection/groupBy.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/include.js b/tools/eslint/node_modules/lodash/collection/include.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/include.js rename to tools/eslint/node_modules/lodash/collection/include.js diff --git a/tools/eslint/node_modules/lodash/collection/includes.js b/tools/eslint/node_modules/lodash/collection/includes.js new file mode 100644 index 00000000000000..329486a530f90c --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/includes.js @@ -0,0 +1,57 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + getLength = require('../internal/getLength'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + isLength = require('../internal/isLength'), + isString = require('../lang/isString'), + values = require('../object/values'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `target` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ +function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && baseIndexOf(collection, target, fromIndex) > -1); +} + +module.exports = includes; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/indexBy.js b/tools/eslint/node_modules/lodash/collection/indexBy.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/indexBy.js rename to tools/eslint/node_modules/lodash/collection/indexBy.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/inject.js b/tools/eslint/node_modules/lodash/collection/inject.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/inject.js rename to tools/eslint/node_modules/lodash/collection/inject.js diff --git a/tools/eslint/node_modules/lodash/collection/invoke.js b/tools/eslint/node_modules/lodash/collection/invoke.js new file mode 100644 index 00000000000000..6e71721957344a --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/invoke.js @@ -0,0 +1,42 @@ +var baseEach = require('../internal/baseEach'), + invokePath = require('../internal/invokePath'), + isArrayLike = require('../internal/isArrayLike'), + isKey = require('../internal/isKey'), + restParam = require('../function/restParam'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it's + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; +}); + +module.exports = invoke; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/map.js b/tools/eslint/node_modules/lodash/collection/map.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/map.js rename to tools/eslint/node_modules/lodash/collection/map.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/max.js b/tools/eslint/node_modules/lodash/collection/max.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/max.js rename to tools/eslint/node_modules/lodash/collection/max.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/min.js b/tools/eslint/node_modules/lodash/collection/min.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/min.js rename to tools/eslint/node_modules/lodash/collection/min.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/partition.js b/tools/eslint/node_modules/lodash/collection/partition.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/partition.js rename to tools/eslint/node_modules/lodash/collection/partition.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/pluck.js b/tools/eslint/node_modules/lodash/collection/pluck.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/pluck.js rename to tools/eslint/node_modules/lodash/collection/pluck.js diff --git a/tools/eslint/node_modules/lodash/collection/reduce.js b/tools/eslint/node_modules/lodash/collection/reduce.js new file mode 100644 index 00000000000000..5d5e8c91691948 --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/reduce.js @@ -0,0 +1,44 @@ +var arrayReduce = require('../internal/arrayReduce'), + baseEach = require('../internal/baseEach'), + createReduce = require('../internal/createReduce'); + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ +var reduce = createReduce(arrayReduce, baseEach); + +module.exports = reduce; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js b/tools/eslint/node_modules/lodash/collection/reduceRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js rename to tools/eslint/node_modules/lodash/collection/reduceRight.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reject.js b/tools/eslint/node_modules/lodash/collection/reject.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/reject.js rename to tools/eslint/node_modules/lodash/collection/reject.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sample.js b/tools/eslint/node_modules/lodash/collection/sample.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sample.js rename to tools/eslint/node_modules/lodash/collection/sample.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/select.js b/tools/eslint/node_modules/lodash/collection/select.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/select.js rename to tools/eslint/node_modules/lodash/collection/select.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/shuffle.js b/tools/eslint/node_modules/lodash/collection/shuffle.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/shuffle.js rename to tools/eslint/node_modules/lodash/collection/shuffle.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/size.js b/tools/eslint/node_modules/lodash/collection/size.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/size.js rename to tools/eslint/node_modules/lodash/collection/size.js diff --git a/tools/eslint/node_modules/lodash/collection/some.js b/tools/eslint/node_modules/lodash/collection/some.js new file mode 100644 index 00000000000000..d0b09a47469856 --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/some.js @@ -0,0 +1,67 @@ +var arraySome = require('../internal/arraySome'), + baseCallback = require('../internal/baseCallback'), + baseSome = require('../internal/baseSome'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ +function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = some; diff --git a/tools/eslint/node_modules/lodash/collection/sortBy.js b/tools/eslint/node_modules/lodash/collection/sortBy.js new file mode 100644 index 00000000000000..4401c777f402d8 --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/sortBy.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + baseSortBy = require('../internal/baseSortBy'), + compareAscending = require('../internal/compareAscending'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = baseCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); +} + +module.exports = sortBy; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByAll.js b/tools/eslint/node_modules/lodash/collection/sortByAll.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sortByAll.js rename to tools/eslint/node_modules/lodash/collection/sortByAll.js diff --git a/tools/eslint/node_modules/lodash/collection/sortByOrder.js b/tools/eslint/node_modules/lodash/collection/sortByOrder.js new file mode 100644 index 00000000000000..8b4fc196877325 --- /dev/null +++ b/tools/eslint/node_modules/lodash/collection/sortByOrder.js @@ -0,0 +1,55 @@ +var baseSortByOrder = require('../internal/baseSortByOrder'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); +} + +module.exports = sortByOrder; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sum.js b/tools/eslint/node_modules/lodash/collection/sum.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/sum.js rename to tools/eslint/node_modules/lodash/collection/sum.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/collection/where.js b/tools/eslint/node_modules/lodash/collection/where.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/collection/where.js rename to tools/eslint/node_modules/lodash/collection/where.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/date.js b/tools/eslint/node_modules/lodash/date.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/date.js rename to tools/eslint/node_modules/lodash/date.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/date/now.js b/tools/eslint/node_modules/lodash/date/now.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/date/now.js rename to tools/eslint/node_modules/lodash/date/now.js diff --git a/tools/eslint/node_modules/lodash/function.js b/tools/eslint/node_modules/lodash/function.js new file mode 100644 index 00000000000000..71f8ebeb27dde2 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function.js @@ -0,0 +1,28 @@ +module.exports = { + 'after': require('./function/after'), + 'ary': require('./function/ary'), + 'backflow': require('./function/backflow'), + 'before': require('./function/before'), + 'bind': require('./function/bind'), + 'bindAll': require('./function/bindAll'), + 'bindKey': require('./function/bindKey'), + 'compose': require('./function/compose'), + 'curry': require('./function/curry'), + 'curryRight': require('./function/curryRight'), + 'debounce': require('./function/debounce'), + 'defer': require('./function/defer'), + 'delay': require('./function/delay'), + 'flow': require('./function/flow'), + 'flowRight': require('./function/flowRight'), + 'memoize': require('./function/memoize'), + 'modArgs': require('./function/modArgs'), + 'negate': require('./function/negate'), + 'once': require('./function/once'), + 'partial': require('./function/partial'), + 'partialRight': require('./function/partialRight'), + 'rearg': require('./function/rearg'), + 'restParam': require('./function/restParam'), + 'spread': require('./function/spread'), + 'throttle': require('./function/throttle'), + 'wrap': require('./function/wrap') +}; diff --git a/tools/eslint/node_modules/lodash/function/after.js b/tools/eslint/node_modules/lodash/function/after.js new file mode 100644 index 00000000000000..96a51fdbcf73f8 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/after.js @@ -0,0 +1,48 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = global.isFinite; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ +function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/tools/eslint/node_modules/lodash/function/ary.js b/tools/eslint/node_modules/lodash/function/ary.js new file mode 100644 index 00000000000000..53a6913e3f183f --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/ary.js @@ -0,0 +1,34 @@ +var createWrapper = require('../internal/createWrapper'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** Used to compose bitmasks for wrapper metadata. */ +var ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/backflow.js b/tools/eslint/node_modules/lodash/function/backflow.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/backflow.js rename to tools/eslint/node_modules/lodash/function/backflow.js diff --git a/tools/eslint/node_modules/lodash/function/before.js b/tools/eslint/node_modules/lodash/function/before.js new file mode 100644 index 00000000000000..3d94216825592b --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/before.js @@ -0,0 +1,42 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/bind.js b/tools/eslint/node_modules/lodash/function/bind.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/bind.js rename to tools/eslint/node_modules/lodash/function/bind.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/bindAll.js b/tools/eslint/node_modules/lodash/function/bindAll.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/bindAll.js rename to tools/eslint/node_modules/lodash/function/bindAll.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/bindKey.js b/tools/eslint/node_modules/lodash/function/bindKey.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/bindKey.js rename to tools/eslint/node_modules/lodash/function/bindKey.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/compose.js b/tools/eslint/node_modules/lodash/function/compose.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/compose.js rename to tools/eslint/node_modules/lodash/function/compose.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/curry.js b/tools/eslint/node_modules/lodash/function/curry.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/curry.js rename to tools/eslint/node_modules/lodash/function/curry.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/curryRight.js b/tools/eslint/node_modules/lodash/function/curryRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/curryRight.js rename to tools/eslint/node_modules/lodash/function/curryRight.js diff --git a/tools/eslint/node_modules/lodash/function/debounce.js b/tools/eslint/node_modules/lodash/function/debounce.js new file mode 100644 index 00000000000000..163af90f38a1c0 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/debounce.js @@ -0,0 +1,181 @@ +var isObject = require('../lang/isObject'), + now = require('../date/now'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it's invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; +} + +module.exports = debounce; diff --git a/tools/eslint/node_modules/lodash/function/defer.js b/tools/eslint/node_modules/lodash/function/defer.js new file mode 100644 index 00000000000000..3accbf9b109a80 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/defer.js @@ -0,0 +1,25 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ +var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/tools/eslint/node_modules/lodash/function/delay.js b/tools/eslint/node_modules/lodash/function/delay.js new file mode 100644 index 00000000000000..d5eef27a9f3b79 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/delay.js @@ -0,0 +1,26 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ +var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); +}); + +module.exports = delay; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/flow.js b/tools/eslint/node_modules/lodash/function/flow.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/flow.js rename to tools/eslint/node_modules/lodash/function/flow.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/flowRight.js b/tools/eslint/node_modules/lodash/function/flowRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/flowRight.js rename to tools/eslint/node_modules/lodash/function/flowRight.js diff --git a/tools/eslint/node_modules/lodash/function/memoize.js b/tools/eslint/node_modules/lodash/function/memoize.js new file mode 100644 index 00000000000000..f3b8d699209aca --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/memoize.js @@ -0,0 +1,80 @@ +var MapCache = require('../internal/MapCache'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +module.exports = memoize; diff --git a/tools/eslint/node_modules/lodash/function/modArgs.js b/tools/eslint/node_modules/lodash/function/modArgs.js new file mode 100644 index 00000000000000..49b9b5e6828073 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/modArgs.js @@ -0,0 +1,58 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseFlatten = require('../internal/baseFlatten'), + baseIsFunction = require('../internal/baseIsFunction'), + restParam = require('./restParam'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ +var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); +}); + +module.exports = modArgs; diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/negate.js b/tools/eslint/node_modules/lodash/function/negate.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/negate.js rename to tools/eslint/node_modules/lodash/function/negate.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/once.js b/tools/eslint/node_modules/lodash/function/once.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/once.js rename to tools/eslint/node_modules/lodash/function/once.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/partial.js b/tools/eslint/node_modules/lodash/function/partial.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/partial.js rename to tools/eslint/node_modules/lodash/function/partial.js diff --git a/tools/eslint/node_modules/inquirer/node_modules/lodash/function/partialRight.js b/tools/eslint/node_modules/lodash/function/partialRight.js similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/lodash/function/partialRight.js rename to tools/eslint/node_modules/lodash/function/partialRight.js diff --git a/tools/eslint/node_modules/lodash/function/rearg.js b/tools/eslint/node_modules/lodash/function/rearg.js new file mode 100644 index 00000000000000..f2bd9c41ec2cc2 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/rearg.js @@ -0,0 +1,40 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var REARG_FLAG = 256; + +/** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ +var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); +}); + +module.exports = rearg; diff --git a/tools/eslint/node_modules/lodash/function/restParam.js b/tools/eslint/node_modules/lodash/function/restParam.js new file mode 100644 index 00000000000000..8852286dd5bc99 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/restParam.js @@ -0,0 +1,58 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/tools/eslint/node_modules/lodash/function/spread.js b/tools/eslint/node_modules/lodash/function/spread.js new file mode 100644 index 00000000000000..780f5042ad599b --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/spread.js @@ -0,0 +1,44 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ +function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; +} + +module.exports = spread; diff --git a/tools/eslint/node_modules/lodash/function/throttle.js b/tools/eslint/node_modules/lodash/function/throttle.js new file mode 100644 index 00000000000000..1dd00eab75816c --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/throttle.js @@ -0,0 +1,62 @@ +var debounce = require('./debounce'), + isObject = require('../lang/isObject'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); +} + +module.exports = throttle; diff --git a/tools/eslint/node_modules/lodash/function/wrap.js b/tools/eslint/node_modules/lodash/function/wrap.js new file mode 100644 index 00000000000000..6a33c5ec6f1e20 --- /dev/null +++ b/tools/eslint/node_modules/lodash/function/wrap.js @@ -0,0 +1,33 @@ +var createWrapper = require('../internal/createWrapper'), + identity = require('../utility/identity'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ +function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); +} + +module.exports = wrap; diff --git a/tools/eslint/node_modules/lodash/index.js b/tools/eslint/node_modules/lodash/index.js new file mode 100644 index 00000000000000..5f17319b9bbf2e --- /dev/null +++ b/tools/eslint/node_modules/lodash/index.js @@ -0,0 +1,12351 @@ +/** + * @license + * lodash 3.10.1 (Custom Build) + * Build: `lodash modern -d -o ./index.js` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '3.10.1'; + + /** Used to compose bitmasks for wrapper metadata. */ + var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256; + + /** Used as default options for `_.trunc`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect when a function becomes hot. */ + var HOT_COUNT = 150, + HOT_SPAN = 16; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, + reUnescapedHtml = /[&<>"'`]/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + + /** + * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns) + * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern). + */ + var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + reHasRegExpChars = RegExp(reRegExpChars.source); + + /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ + var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect hexadecimal string values. */ + var reHasHexPrefix = /^0[xX]/; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ + var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to match words to create compound words. */ + var reWords = (function() { + var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', + lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; + + return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); + }()); + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', + 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite', + 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = + cloneableTags[dateTag] = cloneableTags[float32Tag] = + cloneableTags[float64Tag] = cloneableTags[int8Tag] = + cloneableTags[int16Tag] = cloneableTags[int32Tag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[stringTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[mapTag] = cloneableTags[setTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map latin-1 supplementary letters to basic latin letters. */ + var deburredLetters = { + '\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' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + '`': '`' + }; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used to escape characters for inclusion in compiled regexes. */ + var regexpEscapes = { + '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34', + '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39', + 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46', + 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66', + 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78' + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Detect free variable `exports`. */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; + + /** Detect free variable `self`. */ + var freeSelf = objectTypes[typeof self] && self && self.Object && self; + + /** Detect free variable `window`. */ + var freeWindow = objectTypes[typeof window] && window && window.Object && window; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `compareAscending` which compares values and + * sorts them in ascending order without guaranteeing a stable sort. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function baseCompareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isFunction` without support for environments + * with incorrect `typeof` results. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + */ + function baseIsFunction(value) { + // Avoid a Chakra JIT bug in compatibility modes of IE 11. + // See https://github.com/jashkenas/underscore/issues/1621 for more details. + return typeof value == 'function' || false; + } + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + return value == null ? '' : (value + ''); + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the first character not found in `chars`. + */ + function charsLeftIndex(string, chars) { + var index = -1, + length = string.length; + + while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the last character not found in `chars`. + */ + function charsRightIndex(string, chars) { + var index = string.length; + + while (index-- && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.sortBy` to compare transformed elements of a collection and stable + * sort them in ascending order. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareAscending(object, other) { + return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); + } + + /** + * Used by `_.sortByOrder` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, + * a value is sorted in ascending order if its corresponding order is "asc", and + * descending if "desc". + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = baseCompareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * ((order === 'asc' || order === true) ? 1 : -1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + function deburrLetter(letter) { + return deburredLetters[letter]; + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeHtmlChar(chr) { + return htmlEscapes[chr]; + } + + /** + * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes. + * + * @private + * @param {string} chr The matched character to escape. + * @param {string} leadingChar The capture group for a leading character. + * @param {string} whitespaceChar The capture group for a whitespace character. + * @returns {string} Returns the escaped character. + */ + function escapeRegExpChar(chr, leadingChar, whitespaceChar) { + if (leadingChar) { + chr = regexpEscapes[chr]; + } else if (whitespaceChar) { + chr = stringEscapes[chr]; + } + return '\\' + chr; + } + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ + function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; + } + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a + * character code is whitespace. + * + * @private + * @param {number} charCode The character code to inspect. + * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. + */ + function isSpace(charCode) { + return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || + (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + if (array[index] === placeholder) { + array[index] = PLACEHOLDER; + result[++resIndex] = index; + } + } + return result; + } + + /** + * An implementation of `_.uniq` optimized for sorted arrays without support + * for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function sortedUniq(array, iteratee) { + var seen, + index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (!index || seen !== computed) { + seen = computed; + result[++resIndex] = value; + } + } + return result; + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the first non-whitespace character. + */ + function trimmedLeftIndex(string) { + var index = -1, + length = string.length; + + while (++index < length && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedRightIndex(string) { + var index = string.length; + + while (index-- && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(chr) { + return htmlUnescapes[chr]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the given `context` object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // using `context` to mock `Date#getTime` use in `_.now` + * var mock = _.runInContext({ + * 'Date': function() { + * return { 'getTime': getTimeMock }; + * } + * }); + * + * // or creating a suped-up `defer` in Node.js + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See https://es5.github.io/#x11.1.5 for more details. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for native method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Native method references. */ + var ArrayBuffer = context.ArrayBuffer, + clearTimeout = context.clearTimeout, + parseFloat = context.parseFloat, + pow = Math.pow, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + Set = getNative(context, 'Set'), + setTimeout = context.setTimeout, + splice = arrayProto.splice, + Uint8Array = context.Uint8Array, + WeakMap = getNative(context, 'WeakMap'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeCreate = getNative(Object, 'create'), + nativeFloor = Math.floor, + nativeIsArray = getNative(Array, 'isArray'), + nativeIsFinite = context.isFinite, + nativeKeys = getNative(Object, 'keys'), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = getNative(Date, 'now'), + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used as references for `-Infinity` and `Infinity`. */ + var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, + POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The function whose prototype all chaining wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable chaining for all wrapper methods. + * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. + */ + function LodashWrapper(value, chainAll, actions) { + this.__wrapped__ = value; + this.__actions__ = actions || []; + this.__chain__ = !!chainAll; + } + + /** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB). Change the following template settings to use + * alternative delimiters. + * + * @static + * @memberOf _ + * @type Object + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type string + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type Object + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type Function + */ + '_': lodash + } + }; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = POSITIVE_INFINITY; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = arrayCopy(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = arrayCopy(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = arrayCopy(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) { + return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a cache object to store key/value pairs. + * + * @private + * @static + * @name Cache + * @memberOf _.memoize + */ + function MapCache() { + this.__data__ = {}; + } + + /** + * Removes `key` and its value from the cache. + * + * @private + * @name delete + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. + */ + function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + + /** + * Gets the cached value for `key`. + * + * @private + * @name get + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to get. + * @returns {*} Returns the cached value. + */ + function mapGet(key) { + return key == '__proto__' ? undefined : this.__data__[key]; + } + + /** + * Checks if a cached value for `key` exists. + * + * @private + * @name has + * @memberOf _.memoize.Cache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + return key != '__proto__' && hasOwnProperty.call(this.__data__, key); + } + + /** + * Sets `value` to `key` of the cache. + * + * @private + * @name set + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to cache. + * @param {*} value The value to cache. + * @returns {Object} Returns the cache object. + */ + function mapSet(key, value) { + if (key != '__proto__') { + this.__data__[key] = value; + } + return this; + } + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } + } + + /** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; + } + + /** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ + function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a new array joining `array` with `other`. + * + * @private + * @param {Array} array The array to join. + * @param {Array} other The other array to join. + * @returns {Array} Returns the new concatenated array. + */ + function arrayConcat(array, other) { + var index = -1, + length = array.length, + othIndex = -1, + othLength = other.length, + result = Array(length + othLength); + + while (++index < length) { + result[index] = array[index]; + } + while (++othIndex < othLength) { + result[index++] = other[othIndex]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseExtremum` for arrays which invokes `iteratee` + * with one argument: (value). + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function arrayExtremum(array, iteratee, comparator, exValue) { + var index = -1, + length = array.length, + computed = exValue, + result = computed; + + while (++index < length) { + var value = array[index], + current = +iteratee(value); + + if (comparator(current, computed)) { + computed = current; + result = value; + } + } + return result; + } + + /** + * A specialized version of `_.filter` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * A specialized version of `_.map` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the first element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initFromArray) { + var index = -1, + length = array.length; + + if (initFromArray && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the last element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initFromArray) { + var length = array.length; + if (initFromArray && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.sum` for arrays without support for callback + * shorthands and `this` binding.. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function arraySum(array, iteratee) { + var length = array.length, + result = 0; + + while (length--) { + result += +iteratee(array[length]) || 0; + } + return result; + } + + /** + * Used by `_.defaults` to customize its `_.assign` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : objectValue; + } + + /** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; + } + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + /** + * The base implementation of `_.at` without support for string collections + * and individual key arguments. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {number[]|string[]} props The property names or indexes of elements to pick. + * @returns {Array} Returns the new array of picked elements. + */ + function baseAt(collection, props) { + var index = -1, + isNil = collection == null, + isArr = !isNil && isArrayLike(collection), + length = isArr ? collection.length : 0, + propsLength = props.length, + result = Array(propsLength); + + while(++index < propsLength) { + var key = props[index]; + if (isArr) { + result[index] = isIndex(key, length) ? collection[key] : undefined; + } else { + result[index] = isNil ? undefined : collection[key]; + } + } + return result; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + /** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); + } + + /** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; + }()); + + /** + * The base implementation of `_.delay` and `_.defer` which accepts an index + * of where to slice the arguments to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Object} args The arguments provide to `func`. + * @returns {number} Returns the timer id. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * Gets the extremum value of `collection` invoking `iteratee` for each value + * in `collection` to generate the criterion by which the value is ranked. + * The `iteratee` is invoked with three arguments: (value, index|key, collection). + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(collection, iteratee, comparator, exValue) { + var computed = exValue, + result = computed; + + baseEach(collection, function(value, index, collection) { + var current = +iteratee(value, index, collection); + if (comparator(current, computed) || (current === exValue && current === result)) { + computed = current; + result = value; + } + }); + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end >>> 0); + start >>>= 0; + + while (start < length) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, + * without support for callback shorthands and `this` binding, which iterates + * over `collection` using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element + * instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from those provided. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the new array of filtered property names. + */ + function baseFunctions(object, props) { + var index = -1, + length = props.length, + resIndex = -1, + result = []; + + while (++index < length) { + var key = props[index]; + if (isFunction(object[key])) { + result[++resIndex] = key; + } + } + return result; + } + + /** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; + } + + /** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; + } + + /** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ + function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * index arguments and capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0; + while (length--) { + var index = indexes[length]; + if (index != previous && isIndex(index)) { + var previous = index; + splice.call(array, index, 1); + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for argument juggling + * and returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns the random number. + */ + function baseRandom(min, max) { + return min + nativeFloor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight` without support + * for callback shorthands and `this` binding, which iterates over `collection` + * using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initFromCollection Specify using the first or last element + * of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initFromCollection + ? (initFromCollection = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `setData` without support for hot loop detection. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sortByOrder` without param guards. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseSortByOrder(collection, iteratees, orders) { + var callback = getCallback(), + index = -1; + + iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); + + var result = baseMap(collection, function(value) { + var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.sum` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(collection, iteratee) { + var result = 0; + baseEach(collection, function(value, index, collection) { + result += +iteratee(value, index, collection) || 0; + }); + return result; + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function baseUniq(array, iteratee) { + var index = -1, + indexOf = getIndexOf(), + length = array.length, + isCommon = indexOf == baseIndexOf, + isLarge = isCommon && length >= LARGE_ARRAY_SIZE, + seen = isLarge ? createCache() : null, + result = []; + + if (seen) { + indexOf = cacheIndexOf; + isCommon = false; + } else { + isLarge = false; + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (isCommon && value === value) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (indexOf(seen, computed, 0) < 0) { + if (iteratee || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; + } + + /** + * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, + * and `_.takeWhile` without support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to peform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + var index = -1, + length = actions.length; + + while (++index < length) { + var action = actions[index]; + result = action.func.apply(action.thisArg, arrayPush([result], action.args)); + } + return result; + } + + /** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); + } + + /** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; + } + + /** + * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function. + * + * @private + * @param {Function} setter The function to set keys and values of the accumulator object. + * @param {Function} [initializer] The function to initialize the accumulator object. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee, thisArg) { + var result = initializer ? initializer() : {}; + iteratee = getCallback(iteratee, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, iteratee(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, iteratee(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ + function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; + } + + /** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ + function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; + } + + /** + * Creates a function that produces compound words out of the words in a + * given string. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + var index = -1, + array = words(deburr(string)), + length = array.length, + result = ''; + + while (++index < length) { + result = callback(result, array[index], index); + } + return result; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.curry` or `_.curryRight` function. + * + * @private + * @param {boolean} flag The curry bit flag. + * @returns {Function} Returns the new curry function. + */ + function createCurry(flag) { + function curryFunc(func, arity, guard) { + if (guard && isIterateeCall(func, arity, guard)) { + arity = undefined; + } + var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryFunc.placeholder; + return result; + } + return curryFunc; + } + + /** + * Creates a `_.defaults` or `_.defaultsDeep` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @param {Function} customizer The function to customize assigned values. + * @returns {Function} Returns the new defaults function. + */ + function createDefaults(assigner, customizer) { + return restParam(function(args) { + var object = args[0]; + if (object == null) { + return object; + } + args.push(customizer); + return assigner.apply(undefined, args); + }); + } + + /** + * Creates a `_.max` or `_.min` function. + * + * @private + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {Function} Returns the new extremum function. + */ + function createExtremum(comparator, exValue) { + return function(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = getCallback(iteratee, thisArg, 3); + if (iteratee.length == 1) { + collection = isArray(collection) ? collection : toIterable(collection); + var result = arrayExtremum(collection, iteratee, comparator, exValue); + if (!(collection.length && result === exValue)) { + return result; + } + } + return baseExtremum(collection, iteratee, comparator, exValue); + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; + } + + /** + * Creates a `_.findIndex` or `_.findLastIndex` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFindIndex(fromRight) { + return function(array, predicate, thisArg) { + if (!(array && array.length)) { + return -1; + } + predicate = getCallback(predicate, thisArg, 3); + return baseFindIndex(array, predicate, fromRight); + }; + } + + /** + * Creates a `_.findKey` or `_.findLastKey` function. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new find function. + */ + function createFindKey(objectFunc) { + return function(object, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + return baseFind(object, predicate, objectFunc, true); + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return function() { + var wrapper, + length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { + wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? -1 : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; + } + + /** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; + } + + /** + * Creates a function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForIn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee, keysIn); + }; + } + + /** + * Creates a function for `_.forOwn` or `_.forOwnRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForOwn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee); + }; + } + + /** + * Creates a function for `_.mapKeys` or `_.mapValues`. + * + * @private + * @param {boolean} [isMapKeys] Specify mapping keys instead of values. + * @returns {Function} Returns the new map function. + */ + function createObjectMapper(isMapKeys) { + return function(object, iteratee, thisArg) { + var result = {}; + iteratee = getCallback(iteratee, thisArg, 3); + + baseForOwn(object, function(value, key, object) { + var mapped = iteratee(value, key, object); + key = isMapKeys ? mapped : key; + value = isMapKeys ? value : mapped; + result[key] = value; + }); + return result; + }; + } + + /** + * Creates a function for `_.padLeft` or `_.padRight`. + * + * @private + * @param {boolean} [fromRight] Specify padding from the right. + * @returns {Function} Returns the new pad function. + */ + function createPadDir(fromRight) { + return function(string, length, chars) { + string = baseToString(string); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); + }; + } + + /** + * Creates a `_.partial` or `_.partialRight` function. + * + * @private + * @param {boolean} flag The partial bit flag. + * @returns {Function} Returns the new partial function. + */ + function createPartial(flag) { + var partialFunc = restParam(function(func, partials) { + var holders = replaceHolders(partials, partialFunc.placeholder); + return createWrapper(func, flag, undefined, partials, holders); + }); + return partialFunc; + } + + /** + * Creates a function for `_.reduce` or `_.reduceRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createReduce(arrayFunc, eachFunc) { + return function(collection, iteratee, accumulator, thisArg) { + var initFromArray = arguments.length < 3; + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee, accumulator, initFromArray) + : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); + }; + } + + /** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ + function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); + } + + /** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ + function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.ceil`, `_.floor`, or `_.round` function. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + precision = precision === undefined ? 0 : (+precision || 0); + if (precision) { + precision = pow(10, precision); + return func(number * precision) / precision; + } + return func(number); + }; + } + + /** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ + function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + var callback = getCallback(iteratee); + return (iteratee == null && callback === baseCallback) + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; + } + + /** + * Gets the appropriate "callback" function. If the `_.callback` method is + * customized this function returns the custom method, otherwise it returns + * the `baseCallback` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function} Returns the chosen function or its result. + */ + function getCallback(func, thisArg, argCount) { + var result = lodash.callback || callback; + result = result === callback ? baseCallback : result; + return argCount ? result(func, thisArg, argCount) : result; + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name, + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized this function returns the custom method, otherwise it returns + * the `baseIndexOf` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function|number} Returns the chosen function or its result. + */ + function getIndexOf(collection, target, fromIndex) { + var result = lodash.indexOf || indexOf; + result = result === indexOf ? baseIndexOf : result; + return collection ? result(collection, target, fromIndex) : result; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; + } + + /** + * Invokes the method at `path` on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function invokePath(object, path, args) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + path = last(path); + } + var func = object == null ? object : object[path]; + return func == null ? undefined : func.apply(object, args); + } + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func); + if (!(funcName in LazyWrapper.prototype)) { + return false; + } + var other = lodash[funcName]; + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers required to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` + * augment function arguments, making the order in which they are executed important, + * preventing the merging of metadata. However, we make an exception for a safe + * common case where curried functions have `_.ary` and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < ARY_FLAG; + + var isCombo = + (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || + (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = arrayCopy(value); + } + // Use source `ary` if it's smaller. + if (srcBitmask & ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function mergeDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults); + } + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + /** + * A specialized version of `_.pick` which picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = arrayCopy(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity function + * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = (function() { + var count = 0, + lastCalled = 0; + + return function(key, value) { + var stamp = now(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return key; + } + } else { + count = 0; + } + return baseSetData(key, value); + }; + }()); + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to an array-like object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array|Object} Returns the array-like object. + */ + function toIterable(value) { + if (value == null) { + return []; + } + if (!isArrayLike(value)) { + return values(value); + } + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + return wrapper instanceof LazyWrapper + ? wrapper.clone() + : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ + var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ + function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ + var findIndex = createFindIndex(); + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ + var findLastIndex = createFindIndex(true); + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ + function first(array) { + return array ? array[0] : undefined; + } + + /** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it is only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ + function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; + } + + /** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ + function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + return dropRight(array, 1); + } + + /** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ + var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; + }); + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = getIndexOf(), + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ + var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ + function rest(array) { + return drop(array, 1); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it is invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ + var sortedIndex = createSortedIndex(); + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ + var sortedLastIndex = createSortedIndex(true); + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ + function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ + function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ + var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it is invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + var callback = getCallback(); + if (!(iteratee == null && callback === baseCallback)) { + iteratee = callback(iteratee, thisArg, 3); + } + return (isSorted && getIndexOf() == baseIndexOf) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; + } + + /** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); + } + + /** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ + var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + var zip = restParam(unzip); + + /** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ + var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); + } + + /** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); + }); + + /** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); + } + + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ + function wrapperToString() { + return (this.value() + ''); + } + + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ + var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ + function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ + var find = createFind(baseEach); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(baseEachRight, true); + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ + function findWhere(collection, source) { + return find(collection, baseMatches(source)); + } + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ + var forEach = createForEach(arrayEach, baseEach); + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ + var forEachRight = createForEach(arrayEachRight, baseEachRight); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + + /** + * Checks if `value` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ + function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && getIndexOf(collection, target, fromIndex) > -1); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it is + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; + }); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = getCallback(iteratee, thisArg, 3); + return func(collection, iteratee); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ + function pluck(collection, path) { + return map(collection, property(path)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ + var reduce = createReduce(arrayReduce, baseEach); + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + var reduceRight = createReduce(arrayReduceRight, baseEachRight); + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ + function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); + } + + /** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = getCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); + } + + /** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); + }); + + /** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); + } + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ + function where(collection, source) { + return filter(collection, baseMatches(source)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ + var now = nativeNow || function() { + return new Date().getTime(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it is called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ + function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it is called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ + var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; + }); + + /** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + var curry = createCurry(CURRY_FLAG); + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + var curryRight = createCurry(CURRY_RIGHT_FLAG); + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it is invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ + var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); + }); + + /** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; + } + + /** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ + var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = createPartial(PARTIAL_FLAG); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ + var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, + * otherwise they are assigned by reference. If `customizer` is provided it is + * invoked to produce the cloned values. If `customizer` returns `undefined` + * cloning is handled by the method instead. The `customizer` is bound to + * `thisArg` and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var shallow = _.clone(users); + * shallow[0] === users[0]; + * // => true + * + * var deep = _.clone(users, true); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.clone(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, customizer, thisArg) { + if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { + isDeep = false; + } + else if (typeof isDeep == 'function') { + thisArg = customizer; + customizer = isDeep; + isDeep = false; + } + return typeof customizer == 'function' + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + : baseClone(value, isDeep); + } + + /** + * Creates a deep clone of `value`. If `customizer` is provided it is invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ + function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) + : baseClone(value, true); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + function gt(value, other) { + return value > other; + } + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + function gte(value, other) { + return value >= other; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + function isDate(value) { + return isObjectLike(value) && objToString.call(value) == dateTag; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + } + + /** + * Checks if `value` is empty. A value is considered empty unless it is an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. If `customizer` is provided it is invoked to compare values. + * If `customizer` returns `undefined` comparisons are handled by the method + * instead. The `customizer` is bound to `thisArg` and invoked with three + * arguments: (value, other [, index|key]). + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. Functions and DOM nodes + * are **not** supported. Provide a customizer function to extend support + * for comparing other values. + * + * @static + * @memberOf _ + * @alias eq + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * object == other; + * // => false + * + * _.isEqual(object, other); + * // => true + * + * // using a customizer callback + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqual(array, other, function(value, other) { + * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { + * return true; + * } + * }); + * // => true + */ + function isEqual(value, other, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(10); + * // => true + * + * _.isFinite('10'); + * // => false + * + * _.isFinite(true); + * // => false + * + * _.isFinite(Object(10)); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. If `customizer` is provided + * it is invoked to compare values. If `customizer` returns `undefined` + * comparisons are handled by the method instead. The `customizer` is bound + * to `thisArg` and invoked with three arguments: (value, other, index|key). + * + * **Note:** This method supports comparing properties of arrays, booleans, + * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions + * and DOM nodes are **not** supported. Provide a customizer function to extend + * support for comparing other values. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + * + * // using a customizer callback + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatch(object, source, function(value, other) { + * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; + * }); + * // => true + */ + function isMatch(object, source, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + return baseIsMatch(object, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) + * which returns `true` for `undefined` and other non-numeric values. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some host objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified + * as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isNumber(8.4); + * // => true + * + * _.isNumber(NaN); + * // => true + * + * _.isNumber('8.4'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + function isRegExp(value) { + return isObject(value) && objToString.call(value) == regexpTag; + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + function lt(value, other) { + return value < other; + } + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + function lte(value, other) { + return value <= other; + } + + /** + * Converts `value` to an array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * (function() { + * return _.toArray(arguments).slice(1); + * }(1, 2, 3)); + * // => [2, 3] + */ + function toArray(value) { + var length = value ? getLength(value) : 0; + if (!isLength(length)) { + return values(value); + } + if (!length) { + return []; + } + return arrayCopy(value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return baseCopy(value, keysIn(value)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + var merge = createAssigner(baseMerge); + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var defaults = createDefaults(assign, assignDefaults); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ + var defaultsDeep = createDefaults(merge, mergeDefaults); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (iteration order is not guaranteed) + * + * // using the `_.matches` callback shorthand + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.findKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findKey(users, 'active'); + * // => 'barney' + */ + var findKey = createFindKey(baseForOwn); + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles` assuming `_.findKey` returns `barney` + * + * // using the `_.matches` callback shorthand + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + var findLastKey = createFindKey(baseForOwnRight); + + /** + * Iterates over own and inherited enumerable properties of an object invoking + * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) + */ + var forIn = createForIn(baseFor); + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' + */ + var forInRight = createForIn(baseForRight); + + /** + * Iterates over own enumerable properties of an object invoking `iteratee` + * for each property. The `iteratee` is bound to `thisArg` and invoked with + * three arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' and 'b' (iteration order is not guaranteed) + */ + var forOwn = createForOwn(baseForOwn); + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' + */ + var forOwnRight = createForOwn(baseForOwnRight); + + /** + * Creates an array of function property names from all enumerable properties, + * own and inherited, of `object`. + * + * @static + * @memberOf _ + * @alias methods + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * _.functions(_); + * // => ['after', 'ary', 'assign', ...] + */ + function functions(object) { + return baseFunctions(object, keysIn(object)); + } + + /** + * Gets the property value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + */ + function has(object, path) { + if (object == null) { + return false; + } + var result = hasOwnProperty.call(object, path); + if (!result && !isKey(path)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + path = last(path); + result = hasOwnProperty.call(object, path); + } + return result || (isLength(object.length) && isIndex(path, object.length) && + (isArray(object) || isArguments(object))); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite property + * assignments of previous values unless `multiValue` is `true`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {boolean} [multiValue] Allow multiple values per key. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + * + * // with `multiValue` + * _.invert(object, true); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function invert(object, multiValue, guard) { + if (guard && isIterateeCall(object, multiValue, guard)) { + multiValue = undefined; + } + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (multiValue) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + else { + result[value] = key; + } + } + return result; + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * property of `object` through `iteratee`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + var mapKeys = createObjectMapper(true); + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through `iteratee`. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { + * return n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * // using the `_.property` callback shorthand + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + var mapValues = createObjectMapper(); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ + var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); + }); + + /** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ + function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + /** + * This method is like `_.get` except that if the resolved value is a function + * it is invoked with the `this` binding of its parent object and its result + * is returned. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a.b.c', 'default'); + * // => 'default' + * + * _.result(object, 'a.b.c', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var result = object == null ? undefined : object[path]; + if (result === undefined) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + result = object == null ? undefined : object[last(path)]; + } + result = result === undefined ? defaultValue : result; + } + return isFunction(result) ? result.call(object) : result; + } + + /** + * Sets the property value of `path` on `object`. If a portion of `path` + * does not exist it is created. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to augment. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, 'x[0].y.z', 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + if (object == null) { + return object; + } + var pathKey = (path + ''); + path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = path[index]; + if (isObject(nested)) { + if (index == lastIndex) { + nested[key] = value; + } else if (nested[key] == null) { + nested[key] = isIndex(path[index + 1]) ? [] : {}; + } + } + nested = nested[key]; + } + return object; + } + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own enumerable + * properties through `iteratee`, with each invocation potentially mutating + * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Array|Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + */ + function transform(object, iteratee, accumulator, thisArg) { + var isArr = isArray(object) || isTypedArray(object); + iteratee = getCallback(iteratee, thisArg, 4); + + if (accumulator == null) { + if (isArr || isObject(object)) { + var Ctor = object.constructor; + if (isArr) { + accumulator = isArray(object) ? new Ctor : []; + } else { + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + } + } else { + accumulator = {}; + } + } + (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable property values + * of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `n` is between `start` and up to but not including, `end`. If + * `end` is not specified it is set to `start` with `start` then set to `0`. + * + * @static + * @memberOf _ + * @category Number + * @param {number} n The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `n` is in the range, else `false`. + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + */ + function inRange(value, start, end) { + start = +start || 0; + if (end === undefined) { + end = start; + start = 0; + } else { + end = +end || 0; + } + return value >= nativeMin(start, end) && value < nativeMax(start, end); + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number is returned. + * If `floating` is `true`, or either `min` or `max` are floats, a floating-point + * number is returned instead of an integer. + * + * @static + * @memberOf _ + * @category Number + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + if (floating && isIterateeCall(min, max, floating)) { + max = floating = undefined; + } + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (noMax && typeof min == 'boolean') { + floating = min; + min = 1; + } + else if (typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + noMax = false; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); + } + return baseRandom(min, max); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar'); + * // => 'fooBar' + * + * _.camelCase('__foo_bar__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); + }); + + /** + * Capitalizes the first character of `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('fred'); + * // => 'Fred' + */ + function capitalize(string) { + string = baseToString(string); + return string && (string.charAt(0).toUpperCase() + string.slice(1)); + } + + /** + * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = baseToString(string); + return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search from. + * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = baseToString(string); + target = (target + ''); + + var length = string.length; + position = position === undefined + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; + return position >= 0 && string.indexOf(target, position) == position; + } + + /** + * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional characters + * use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in Internet Explorer < 9, they can break out + * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + // Reset `lastIndex` because in IE < 9 `String#replace` does not. + string = baseToString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", + * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' + */ + function escapeRegExp(string) { + string = baseToString(string); + return (string && reHasRegExpChars.test(string)) + ? string.replace(reRegExpChars, escapeRegExpChar) + : (string || '(?:)'); + } + + /** + * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__foo_bar__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = baseToString(string); + length = +length; + + var strLength = string.length; + if (strLength >= length || !nativeIsFinite(length)) { + return string; + } + var mid = (length - strLength) / 2, + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); + + chars = createPadding('', rightLength, chars); + return chars.slice(0, leftLength) + string + chars; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padLeft('abc', 6); + * // => ' abc' + * + * _.padLeft('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padLeft('abc', 3); + * // => 'abc' + */ + var padLeft = createPadDir(); + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padRight('abc', 6); + * // => 'abc ' + * + * _.padRight('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padRight('abc', 3); + * // => 'abc' + */ + var padRight = createPadDir(true); + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, + * in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * of `parseInt`. + * + * @static + * @memberOf _ + * @category String + * @param {string} string The string to convert. + * @param {number} [radix] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. + // Chrome fails to trim leading whitespace characters. + // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + if (guard ? isIterateeCall(string, radix, guard) : radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + string = trim(string); + return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + /** + * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--foo-bar'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__foo_bar__'); + * // => 'Foo Bar' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = baseToString(string); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + + return string.lastIndexOf(target, position) == position; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' +``` + +## Included Observable Operators ## + +### `Observable Methods` +- [`catch | catchException`](../../doc/api/core/operators/catch.md) +- [`concat`](../../doc/api/core/operators/concat.md) +- [`create | createWithDisposable`](../../doc/api/core/operators/create.md) +- [`defer`](../../doc/api/core/operators/defer.md) +- [`empty`](../../doc/api/core/operators/empty.md) +- [`from`](../../doc/api/core/operators/from.md) +- [`fromArray`](../../doc/api/core/operators/fromarray.md) +- [`fromCallback`](../../doc/api/core/operators/fromcallback.md) +- [`fromEvent`](../../doc/api/core/operators/fromevent.md) +- [`fromEventPattern`](../../doc/api/core/operators/fromeventpattern.md) +- [`fromNodeCallback`](../../doc/api/core/operators/fromnodecallback.md) +- [`fromPromise`](../../doc/api/core/operators/frompromise.md) +- [`interval`](../../doc/api/core/operators/interval.md) +- [`just`](../../doc/api/core/operators/return.md) +- [`merge`](../../doc/api/core/operators/merge.md) +- [`mergeDelayError`](../../doc/api/core/operators/mergedelayerror.md) +- [`never`](../../doc/api/core/operators/never.md) +- [`of`](../../doc/api/core/operators/of.md) +- [`ofWithScheduler`](../../doc/api/core/operators/ofwithscheduler.md) +- [`range`](../../doc/api/core/operators/range.md) +- [`repeat`](../../doc/api/core/operators/repeat.md) +- [`return | returnValue`](../../doc/api/core/operators/return.md) +- [`throw | throwError | throwException`](../../doc/api/core/operators/throw.md) +- [`timer`](../../doc/api/core/operators/timer.md) +- [`zip`](../../doc/api/core/operators/zip.md) +- [`zipArray`](../../doc/api/core/operators/ziparray.md) + +### `Observable Instance Methods` +- [`asObservable`](../../doc/api/core/operators/asobservable.md) +- [`catch | catchException`](../../doc/api/core/operators/catchproto.md) +- [`combineLatest`](../../doc/api/core/operators/combinelatest.md) +- [`concat`](../../doc/api/core/operators/concatproto.md) +- [`concatMap`](../../doc/api/core/operators/concatmap.md) +- [`connect`](../../doc/api/core/operators/connect.md) +- [`debounce`](../../doc/api/core/operators/debounce.md) +- [`defaultIfEmpty`](../../doc/api/core/operators/defaultifempty.md) +- [`delay`](../../doc/api/core/operators/delay.md) +- [`dematerialize`](../../doc/api/core/operators/dematerialize.md) +- [`distinctUntilChanged`](../../doc/api/core/operators/distinctuntilchanged.md) +- [`do | doAction`](../../doc/api/core/operators/do.md) +- [`doOnNext`](../../doc/api/core/operators/doonnext.md) +- [`doOnError`](../../doc/api/core/operators/doonerror.md) +- [`doOnCompleted`](../../doc/api/core/operators/dooncompleted.md) +- [`filter`](../../doc/api/core/operators/where.md) +- [`finally | finallyAction`](../../doc/api/core/operators/finally.md) +- [`flatMap`](../../doc/api/core/operators/selectmany.md) +- [`flatMapLatest`](../../doc/api/core/operators/flatmaplatest.md) +- [`ignoreElements`](../../doc/api/core/operators/ignoreelements.md) +- [`map`](../../doc/api/core/operators/select.md) +- [`merge`](../../doc/api/core/operators/mergeproto.md) +- [`mergeObservable | mergeAll`](../../doc/api/core/operators/mergeall.md) +- [`multicast`](../../doc/api/core/operators/multicast.md) +- [`publish`](../../doc/api/core/operators/publish.md) +- [`publishLast`](../../doc/api/core/operators/publishlast.md) +- [`publishValue`](../../doc/api/core/operators/publishvalue.md) +- [`refCount`](../../doc/api/core/operators/refcount.md) +- [`repeat`](../../doc/api/core/operators/repeat.md) +- [`replay`](../../doc/api/core/operators/replay.md) +- [`retry`](../../doc/api/core/operators/retry.md) +- [`retryWhen`](../../doc/api/core/operators/retrywhen.md) +- [`sample`](../../doc/api/core/operators/sample.md) +- [`scan`](../../doc/api/core/operators/scan.md) +- [`select`](../../doc/api/core/operators/select.md) +- [`selectConcat`](../../doc/api/core/operators/concatmap.md) +- [`selectMany`](../../doc/api/core/operators/selectmany.md) +- [`selectSwitch`](../../doc/api/core/operators/flatmaplatest.md) +- [`singleInstance`](../../doc/api/core/operators/singleinstance.md) +- [`skip`](../../doc/api/core/operators/skip.md) +- [`skipLast`](../../doc/api/core/operators/skiplast.md) +- [`skipUntil`](../../doc/api/core/operators/skipuntil.md) +- [`skipWhile`](../../doc/api/core/operators/skipwhile.md) +- [`startWith`](../../doc/api/core/operators/startwith.md) +- [`subscribe | forEach`](../../doc/api/core/operators/subscribe.md) +- [`subscribeOnNext`](../../doc/api/core/operators/subscribeonnext.md) +- [`subscribeOnError`](../../doc/api/core/operators/subscribeonerror.md) +- [`subscribeOnCompleted`](../../doc/api/core/operators/subscribeoncompleted.md) +- [`switch | switchLatest`](../../doc/api/core/operators/switch.md) +- [`take`](../../doc/api/core/operators/take.md) +- [`takeLast`](../../doc/api/core/operators/takelast.md) +- [`takeUntil`](../../doc/api/core/operators/takeuntil.md) +- [`takeWhile`](../../doc/api/core/operators/takewhile.md) +- [`tap`](../../doc/api/core/operators/do.md) +- [`tapOnNext`](../../doc/api/core/operators/doonnext.md) +- [`tapOnError`](../../doc/api/core/operators/doonerror.md) +- [`tapOnCompleted`](../../doc/api/core/operators/dooncompleted.md) +- [`throttle`](../../doc/api/core/operators/throttle.md) +- [`throttleFirst`](../../doc/api/core/operators/throttlefirst.md) +- [`timeout`](../../doc/api/core/operators/timeout.md) +- [`timestamp`](../../doc/api/core/operators/timestamp.md) +- [`toArray`](../../doc/api/core/operators/toarray.md) +- [`transduce`](../../doc/api/core/operators/transduce.md) +- [`where`](../../doc/api/core/operators/where.md) +- [`withLatestFrom`](../../doc/api/core/operators/withlatestfrom.md) +- [`zip`](../../doc/api/core/operators/zipproto.md) + +## Included Classes ## + +### Core Objects +- [`Rx.Observer`](../../doc/api/core/observer.md) +- [`Rx.Notification`](../../doc/api/core/notification.md) + +### Subjects + +- [`Rx.AsyncSubject`](../../doc/api/subjects/asyncsubject.md) +- [`Rx.BehaviorSubject`](../../doc/api/subjects/behaviorsubject.md) +- [`Rx.ReplaySubject`](../../doc/api/subjects/replaysubject.md) +- [`Rx.Subject`](../../doc/api/subjects/subject.md) + +### Schedulers + +- [`Rx.Scheduler`](../../doc/api/schedulers/scheduler.md) + +### Disposables + +- [`Rx.CompositeDisposable`](../../doc/api/disposables/compositedisposable.md) +- [`Rx.Disposable`](../../doc/api/disposables/disposable.md) +- [`Rx.RefCountDisposable`](../../doc/api/disposables/refcountdisposable.md) +- [`Rx.SerialDisposable`](../../doc/api/disposables/serialdisposable.md) +- [`Rx.SingleAssignmentDisposable`](../../doc/api/disposables/singleassignmentdisposable.md) + +## Contributing ## + +There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)). + +You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. + +## License ## + +Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +Microsoft Open Technologies would like to thank its contributors, a list +of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You may +obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions +and limitations under the License. diff --git a/tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.js b/tools/eslint/node_modules/rx-lite/rx.lite.js similarity index 83% rename from tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.js rename to tools/eslint/node_modules/rx-lite/rx.lite.js index cecf40454c3518..e38d7a5defb2ac 100644 --- a/tools/eslint/node_modules/inquirer/node_modules/rx/dist/rx.lite.js +++ b/tools/eslint/node_modules/rx-lite/rx.lite.js @@ -3,46 +3,37 @@ ;(function (undefined) { var objectTypes = { - 'boolean': false, 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false + 'object': true }; - var root = (objectTypes[typeof window] && window) || this, + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports, + freeSelf = objectTypes[typeof self] && self.Object && self, + freeWindow = objectTypes[typeof window] && window && window.Object && window, freeModule = objectTypes[typeof module] && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports && freeExports, - freeGlobal = objectTypes[typeof global] && global; + freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { - root = freeGlobal; - } + var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; var Rx = { - internals: {}, - config: { - Promise: root.Promise - }, - helpers: { } + internals: {}, + config: { + Promise: root.Promise + }, + helpers: { } }; // Defaults var noop = Rx.helpers.noop = function () { }, - notDefined = Rx.helpers.notDefined = function (x) { return typeof x === 'undefined'; }, identity = Rx.helpers.identity = function (x) { return x; }, - pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; }, - just = Rx.helpers.just = function (value) { return function () { return value; }; }, defaultNow = Rx.helpers.defaultNow = Date.now, defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); }, defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); }, defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); }, defaultError = Rx.helpers.defaultError = function (err) { throw err; }, isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.subscribe !== 'function' && typeof p.then === 'function'; }, - asArray = Rx.helpers.asArray = function () { return Array.prototype.slice.call(arguments); }, - not = Rx.helpers.not = function (a) { return !a; }, isFunction = Rx.helpers.isFunction = (function () { var isFn = function (value) { @@ -65,45 +56,59 @@ return a; } - Rx.config.longStackSupport = false; - var hasStacks = false; - try { - throw new Error(); - } catch (e) { - hasStacks = !!e.stack; + var errorObj = {e: {}}; + function tryCatcherGen(tryCatchTarget) { + return function tryCatcher() { + try { + return tryCatchTarget.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } + } + } + var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) { + if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } + return tryCatcherGen(fn); } + function thrower(e) { + throw e; + } + + Rx.config.longStackSupport = false; + var hasStacks = false, stacks = tryCatch(function () { throw new Error(); })(); + hasStacks = !!stacks.e && !!stacks.e.stack; // All code after this point will be filtered from stack traces reported by RxJS var rStartingLine = captureLine(), rFileName; - var STACK_JUMP_SEPARATOR = "From previous event:"; + var STACK_JUMP_SEPARATOR = 'From previous event:'; function makeStackTraceLong(error, observable) { - // If possible, transform the error stack trace by removing Node and RxJS - // cruft, then concatenating with the stack trace of `observable`. - if (hasStacks && - observable.stack && - typeof error === "object" && - error !== null && - error.stack && - error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 - ) { - var stacks = []; - for (var o = observable; !!o; o = o.source) { - if (o.stack) { - stacks.unshift(o.stack); - } + // If possible, transform the error stack trace by removing Node and RxJS + // cruft, then concatenating with the stack trace of `observable`. + if (hasStacks && + observable.stack && + typeof error === 'object' && + error !== null && + error.stack && + error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 + ) { + var stacks = []; + for (var o = observable; !!o; o = o.source) { + if (o.stack) { + stacks.unshift(o.stack); } - stacks.unshift(error.stack); + } + stacks.unshift(error.stack); - var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n"); - error.stack = filterStackString(concatedStacks); + var concatedStacks = stacks.join('\n' + STACK_JUMP_SEPARATOR + '\n'); + error.stack = filterStackString(concatedStacks); } } function filterStackString(stackString) { - var lines = stackString.split("\n"), - desiredLines = []; + var lines = stackString.split('\n'), desiredLines = []; for (var i = 0, len = lines.length; i < len; i++) { var line = lines[i]; @@ -111,7 +116,7 @@ desiredLines.push(line); } } - return desiredLines.join("\n"); + return desiredLines.join('\n'); } function isInternalFrame(stackLine) { @@ -127,8 +132,8 @@ } function isNodeFrame(stackLine) { - return stackLine.indexOf("(module.js:") !== -1 || - stackLine.indexOf("(node.js:") !== -1; + return stackLine.indexOf('(module.js:') !== -1 || + stackLine.indexOf('(node.js:') !== -1; } function captureLine() { @@ -137,8 +142,8 @@ try { throw new Error(); } catch (e) { - var lines = e.stack.split("\n"); - var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2]; + var lines = e.stack.split('\n'); + var firstLine = lines[0].indexOf('@') > 0 ? lines[1] : lines[2]; var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); if (!fileNameAndLineNumber) { return; } @@ -148,48 +153,53 @@ } function getFileNameAndLineNumber(stackLine) { - // Named functions: "at functionName (filename:lineNumber:columnNumber)" + // Named functions: 'at functionName (filename:lineNumber:columnNumber)' var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); if (attempt1) { return [attempt1[1], Number(attempt1[2])]; } - // Anonymous functions: "at filename:lineNumber:columnNumber" + // Anonymous functions: 'at filename:lineNumber:columnNumber' var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); if (attempt2) { return [attempt2[1], Number(attempt2[2])]; } - // Firefox style: "function@filename:lineNumber or @filename:lineNumber" + // Firefox style: 'function@filename:lineNumber or @filename:lineNumber' var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); if (attempt3) { return [attempt3[1], Number(attempt3[2])]; } } var EmptyError = Rx.EmptyError = function() { this.message = 'Sequence contains no elements.'; + this.name = 'EmptyError'; Error.call(this); }; - EmptyError.prototype = Error.prototype; + EmptyError.prototype = Object.create(Error.prototype); var ObjectDisposedError = Rx.ObjectDisposedError = function() { this.message = 'Object has been disposed'; + this.name = 'ObjectDisposedError'; Error.call(this); }; - ObjectDisposedError.prototype = Error.prototype; + ObjectDisposedError.prototype = Object.create(Error.prototype); var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () { this.message = 'Argument out of range'; + this.name = 'ArgumentOutOfRangeError'; Error.call(this); }; - ArgumentOutOfRangeError.prototype = Error.prototype; + ArgumentOutOfRangeError.prototype = Object.create(Error.prototype); var NotSupportedError = Rx.NotSupportedError = function (message) { this.message = message || 'This operation is not supported'; + this.name = 'NotSupportedError'; Error.call(this); }; - NotSupportedError.prototype = Error.prototype; + NotSupportedError.prototype = Object.create(Error.prototype); var NotImplementedError = Rx.NotImplementedError = function (message) { this.message = message || 'This operation is not implemented'; + this.name = 'NotImplementedError'; Error.call(this); }; - NotImplementedError.prototype = Error.prototype; + NotImplementedError.prototype = Object.create(Error.prototype); var notImplemented = Rx.helpers.notImplemented = function () { throw new NotImplementedError(); @@ -530,29 +540,10 @@ return result; } - var errorObj = {e: {}}; - var tryCatchTarget; - function tryCatcher() { - try { - return tryCatchTarget.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } - } - function tryCatch(fn) { - if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } - tryCatchTarget = fn; - return tryCatcher; - } - function thrower(e) { - throw e; - } - var hasProp = {}.hasOwnProperty, slice = Array.prototype.slice; - var inherits = this.inherits = Rx.internals.inherits = function (child, parent) { + var inherits = Rx.internals.inherits = function (child, parent) { function __() { this.constructor = child; } __.prototype = parent.prototype; child.prototype = new __(); @@ -583,92 +574,6 @@ return a; } - // Collections - function IndexedItem(id, value) { - this.id = id; - this.value = value; - } - - IndexedItem.prototype.compareTo = function (other) { - var c = this.value.compareTo(other.value); - c === 0 && (c = this.id - other.id); - return c; - }; - - // Priority Queue for Scheduling - var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) { - this.items = new Array(capacity); - this.length = 0; - }; - - var priorityProto = PriorityQueue.prototype; - priorityProto.isHigherPriority = function (left, right) { - return this.items[left].compareTo(this.items[right]) < 0; - }; - - priorityProto.percolate = function (index) { - if (index >= this.length || index < 0) { return; } - var parent = index - 1 >> 1; - if (parent < 0 || parent === index) { return; } - if (this.isHigherPriority(index, parent)) { - var temp = this.items[index]; - this.items[index] = this.items[parent]; - this.items[parent] = temp; - this.percolate(parent); - } - }; - - priorityProto.heapify = function (index) { - +index || (index = 0); - if (index >= this.length || index < 0) { return; } - var left = 2 * index + 1, - right = 2 * index + 2, - first = index; - if (left < this.length && this.isHigherPriority(left, first)) { - first = left; - } - if (right < this.length && this.isHigherPriority(right, first)) { - first = right; - } - if (first !== index) { - var temp = this.items[index]; - this.items[index] = this.items[first]; - this.items[first] = temp; - this.heapify(first); - } - }; - - priorityProto.peek = function () { return this.items[0].value; }; - - priorityProto.removeAt = function (index) { - this.items[index] = this.items[--this.length]; - this.items[this.length] = undefined; - this.heapify(); - }; - - priorityProto.dequeue = function () { - var result = this.peek(); - this.removeAt(0); - return result; - }; - - priorityProto.enqueue = function (item) { - var index = this.length++; - this.items[index] = new IndexedItem(PriorityQueue.count++, item); - this.percolate(index); - }; - - priorityProto.remove = function (item) { - for (var i = 0; i < this.length; i++) { - if (this.items[i].value === item) { - this.removeAt(i); - return true; - } - } - return false; - }; - PriorityQueue.count = 0; - /** * Represents a group of disposable resources that are disposed together. * @constructor @@ -1021,51 +926,62 @@ function invokeRecImmediate(scheduler, pair) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); + action(state, innerAction); + return group; - function recursiveAction(state1) { - action(state1, function (state2) { - var isAdded = false, isDone = false, - d = scheduler.scheduleWithState(state2, function (scheduler1, state3) { - if (isAdded) { - group.remove(d); - } else { - isDone = true; - } - recursiveAction(state3); - return disposableEmpty; - }); - if (!isDone) { - group.add(d); - isAdded = true; + function innerAction(state2) { + var isAdded = false, isDone = false; + + var d = scheduler.scheduleWithState(state2, scheduleWork); + if (!isDone) { + group.add(d); + isAdded = true; + } + + function scheduleWork(_, state3) { + if (isAdded) { + group.remove(d); + } else { + isDone = true; } - }); + action(state3, innerAction); + return disposableEmpty; + } } - recursiveAction(state); - return group; } function invokeRecDate(scheduler, pair, method) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); - function recursiveAction(state1) { - action(state1, function (state2, dueTime1) { - var isAdded = false, isDone = false, - d = scheduler[method](state2, dueTime1, function (scheduler1, state3) { - if (isAdded) { - group.remove(d); - } else { - isDone = true; - } - recursiveAction(state3); - return disposableEmpty; - }); - if (!isDone) { - group.add(d); - isAdded = true; - } - }); - }; - recursiveAction(state); + action(state, innerAction); return group; + + function innerAction(state2, dueTime1) { + var isAdded = false, isDone = false; + + var d = scheduler[method](state2, dueTime1, scheduleWork); + if (!isDone) { + group.add(d); + isAdded = true; + } + + function scheduleWork(_, state3) { + if (isAdded) { + group.remove(d); + } else { + isDone = true; + } + action(state3, innerAction); + return disposableEmpty; + } + } + } + + function invokeRecDateRelative(s, p) { + return invokeRecDate(s, p, 'scheduleWithRelativeAndState'); + } + + function invokeRecDateAbsolute(s, p) { + return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState'); } function scheduleInnerRecursive(action, self) { @@ -1109,9 +1025,7 @@ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithRelativeAndState = function (state, dueTime, action) { - return this._scheduleRelative([state, action], dueTime, function (s, p) { - return invokeRecDate(s, p, 'scheduleWithRelativeAndState'); - }); + return this._scheduleRelative([state, action], dueTime, invokeRecDateRelative); }; /** @@ -1132,9 +1046,7 @@ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithAbsoluteAndState = function (state, dueTime, action) { - return this._scheduleAbsolute([state, action], dueTime, function (s, p) { - return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState'); - }); + return this._scheduleAbsolute([state, action], dueTime, invokeRecDateAbsolute); }; }(Scheduler.prototype)); @@ -1180,7 +1092,7 @@ function runTrampoline () { while (queue.length > 0) { - var item = queue.dequeue(); + var item = queue.shift(); !item.isCancelled() && item.invoke(); } } @@ -1189,14 +1101,13 @@ var si = new ScheduledItem(this, state, action, this.now()); if (!queue) { - queue = new PriorityQueue(4); - queue.enqueue(si); + queue = [si]; var result = tryCatch(runTrampoline)(); queue = null; if (result === errorObj) { return thrower(result.e); } } else { - queue.enqueue(si); + queue.push(si); } return si.disposable; } @@ -1543,7 +1454,6 @@ */ function AbstractObserver() { this.isStopped = false; - __super__.call(this); } // Must be implemented by other observers @@ -1556,7 +1466,7 @@ * @param {Any} value Next element in the sequence. */ AbstractObserver.prototype.onNext = function (value) { - if (!this.isStopped) { this.next(value); } + !this.isStopped && this.next(value); }; /** @@ -1583,9 +1493,7 @@ /** * Disposes the observer, causing it to transition to the stopped state. */ - AbstractObserver.prototype.dispose = function () { - this.isStopped = true; - }; + AbstractObserver.prototype.dispose = function () { this.isStopped = true; }; AbstractObserver.prototype.fail = function (e) { if (!this.isStopped) { @@ -1652,25 +1560,23 @@ */ var Observable = Rx.Observable = (function () { - function Observable(subscribe) { - if (Rx.config.longStackSupport && hasStacks) { - try { - throw new Error(); - } catch (e) { - this.stack = e.stack.substring(e.stack.indexOf("\n") + 1); - } - - var self = this; - this._subscribe = function (observer) { - var oldOnError = observer.onError.bind(observer); + function makeSubscribe(self, subscribe) { + return function (o) { + var oldOnError = o.onError; + o.onError = function (e) { + makeStackTraceLong(e, self); + oldOnError.call(o, e); + }; - observer.onError = function (err) { - makeStackTraceLong(err, self); - oldOnError(err); - }; + return subscribe.call(self, o); + }; + } - return subscribe.call(self, observer); - }; + function Observable(subscribe) { + if (Rx.config.longStackSupport && hasStacks) { + var e = tryCatch(thrower)(new Error()).e; + this.stack = e.stack.substring(e.stack.indexOf('\n') + 1); + this._subscribe = makeSubscribe(this, subscribe); } else { this._subscribe = subscribe; } @@ -1679,16 +1585,25 @@ observableProto = Observable.prototype; /** - * Subscribes an observer to the observable sequence. - * @param {Mixed} [observerOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. + * Determines whether the given object is an Observable + * @param {Any} An object to determine whether it is an Observable + * @returns {Boolean} true if an Observable, else false. + */ + Observable.isObservable = function (o) { + return o && isFunction(o.subscribe); + } + + /** + * Subscribes an o to the observable sequence. + * @param {Mixed} [oOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions. */ - observableProto.subscribe = observableProto.forEach = function (observerOrOnNext, onError, onCompleted) { - return this._subscribe(typeof observerOrOnNext === 'object' ? - observerOrOnNext : - observerCreate(observerOrOnNext, onError, onCompleted)); + observableProto.subscribe = observableProto.forEach = function (oOrOnNext, onError, onCompleted) { + return this._subscribe(typeof oOrOnNext === 'object' ? + oOrOnNext : + observerCreate(oOrOnNext, onError, onCompleted)); }; /** @@ -1753,13 +1668,13 @@ }; ScheduledObserver.prototype.ensureActive = function () { - var isOwner = false, parent = this; + var isOwner = false; if (!this.hasFaulted && this.queue.length > 0) { isOwner = !this.isAcquired; this.isAcquired = true; } if (isOwner) { - this.disposable.setDisposable(this.scheduler.scheduleRecursive(function (self) { + this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this, function (parent, self) { var work; if (parent.queue.length > 0) { work = parent.queue.shift(); @@ -1767,14 +1682,13 @@ parent.isAcquired = false; return; } - try { - work(); - } catch (ex) { + var res = tryCatch(work)(); + if (res === errorObj) { parent.queue = []; parent.hasFaulted = true; - throw ex; + return thrower(res.e); } - self(); + self(parent); })); } }; @@ -1825,6 +1739,70 @@ return ObservableBase; }(Observable)); +var FlatMapObservable = (function(__super__){ + + inherits(FlatMapObservable, __super__); + + function FlatMapObservable(source, selector, resultSelector, thisArg) { + this.resultSelector = Rx.helpers.isFunction(resultSelector) ? + resultSelector : null; + + this.selector = Rx.internals.bindCallback(Rx.helpers.isFunction(selector) ? selector : function() { return selector; }, thisArg, 3); + this.source = source; + + __super__.call(this); + + } + + FlatMapObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new InnerObserver(o, this.selector, this.resultSelector, this)); + }; + + function InnerObserver(observer, selector, resultSelector, source) { + this.i = 0; + this.selector = selector; + this.resultSelector = resultSelector; + this.source = source; + this.isStopped = false; + this.o = observer; + } + + InnerObserver.prototype._wrapResult = function(result, x, i) { + return this.resultSelector ? + result.map(function(y, i2) { return this.resultSelector(x, y, i, i2); }, this) : + result; + }; + + InnerObserver.prototype.onNext = function(x) { + + if (this.isStopped) return; + + var i = this.i++; + var result = tryCatch(this.selector)(x, i, this.source); + + if (result === errorObj) { + return this.o.onError(result.e); + } + + Rx.helpers.isPromise(result) && (result = Rx.Observable.fromPromise(result)); + (Rx.helpers.isArrayLike(result) || Rx.helpers.isIterable(result)) && (result = Rx.Observable.from(result)); + + this.o.onNext(this._wrapResult(result, x, i)); + + }; + + InnerObserver.prototype.onError = function(e) { + if(!this.isStopped) { this.isStopped = true; this.o.onError(e); } + }; + + InnerObserver.prototype.onCompleted = function() { + if (!this.isStopped) {this.isStopped = true; this.o.onCompleted(); } + }; + + return FlatMapObservable; + +}(ObservableBase)); + var Enumerable = Rx.internals.Enumerable = function () { }; var ConcatEnumerableObservable = (function(__super__) { @@ -1833,7 +1811,7 @@ this.sources = sources; __super__.call(this); } - + ConcatEnumerableObservable.prototype.subscribeCore = function (o) { var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursiveWithState(this.sources[$iterator$](), function (e, self) { @@ -1858,7 +1836,7 @@ isDisposed = true; })); }; - + function InnerObserver(o, s, e) { this.o = o; this.s = s; @@ -1887,21 +1865,21 @@ } return false; }; - + return ConcatEnumerableObservable; }(ObservableBase)); Enumerable.prototype.concat = function () { return new ConcatEnumerableObservable(this); }; - + var CatchErrorObservable = (function(__super__) { inherits(CatchErrorObservable, __super__); function CatchErrorObservable(sources) { this.sources = sources; __super__.call(this); } - + CatchErrorObservable.prototype.subscribeCore = function (o) { var e = this.sources[$iterator$](); @@ -1930,7 +1908,7 @@ isDisposed = true; })); }; - + return CatchErrorObservable; }(ObservableBase)); @@ -1991,18 +1969,18 @@ })); }); }; - + var RepeatEnumerable = (function (__super__) { inherits(RepeatEnumerable, __super__); - + function RepeatEnumerable(v, c) { this.v = v; this.c = c == null ? -1 : c; } RepeatEnumerable.prototype[$iterator$] = function () { - return new RepeatEnumerator(this); + return new RepeatEnumerator(this); }; - + function RepeatEnumerator(p) { this.v = p.v; this.l = p.c; @@ -2010,16 +1988,16 @@ RepeatEnumerator.prototype.next = function () { if (this.l === 0) { return doneEnumerator; } if (this.l > 0) { this.l--; } - return { done: false, value: this.v }; + return { done: false, value: this.v }; }; - + return RepeatEnumerable; }(Enumerable)); var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) { return new RepeatEnumerable(value, repeatCount); }; - + var OfEnumerable = (function(__super__) { inherits(OfEnumerable, __super__); function OfEnumerable(s, fn, thisArg) { @@ -2029,7 +2007,7 @@ OfEnumerable.prototype[$iterator$] = function () { return new OfEnumerator(this); }; - + function OfEnumerator(p) { this.i = -1; this.s = p.s; @@ -2039,9 +2017,9 @@ OfEnumerator.prototype.next = function () { return ++this.i < this.l ? { done: false, value: !this.fn ? this.s[this.i] : this.fn(this.s[this.i], this.i, this.s) } : - doneEnumerator; + doneEnumerator; }; - + return OfEnumerable; }(Enumerable)); @@ -2086,7 +2064,7 @@ this.o.onError(e); return true; } - + return false; }; @@ -2110,7 +2088,7 @@ * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable. * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method. */ - Observable.create = Observable.createWithDisposable = function (subscribe, parent) { + Observable.create = function (subscribe, parent) { return new AnonymousObservable(subscribe, parent); }; @@ -2143,26 +2121,29 @@ } EmptyObservable.prototype.subscribeCore = function (observer) { - var sink = new EmptySink(observer, this); + var sink = new EmptySink(observer, this.scheduler); return sink.run(); }; - function EmptySink(observer, parent) { + function EmptySink(observer, scheduler) { this.observer = observer; - this.parent = parent; + this.scheduler = scheduler; } function scheduleItem(s, state) { state.onCompleted(); + return disposableEmpty; } EmptySink.prototype.run = function () { - return this.parent.scheduler.scheduleWithState(this.observer, scheduleItem); + return this.scheduler.scheduleWithState(this.observer, scheduleItem); }; return EmptyObservable; }(ObservableBase)); + var EMPTY_OBSERVABLE = new EmptyObservable(immediateScheduler); + /** * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. * @@ -2174,7 +2155,7 @@ */ var observableEmpty = Observable.empty = function (scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); - return new EmptyObservable(scheduler); + return scheduler === immediateScheduler ? EMPTY_OBSERVABLE : new EmptyObservable(scheduler); }; var FromObservable = (function(__super__) { @@ -2186,8 +2167,8 @@ __super__.call(this); } - FromObservable.prototype.subscribeCore = function (observer) { - var sink = new FromSink(observer, this); + FromObservable.prototype.subscribeCore = function (o) { + var sink = new FromSink(o, this); return sink.run(); }; @@ -2195,38 +2176,30 @@ }(ObservableBase)); var FromSink = (function () { - function FromSink(observer, parent) { - this.observer = observer; + function FromSink(o, parent) { + this.o = o; this.parent = parent; } FromSink.prototype.run = function () { var list = Object(this.parent.iterable), it = getIterable(list), - observer = this.observer, + o = this.o, mapper = this.parent.mapper; function loopRecursive(i, recurse) { - try { - var next = it.next(); - } catch (e) { - return observer.onError(e); - } - if (next.done) { - return observer.onCompleted(); - } + var next = tryCatch(it.next).call(it); + if (next === errorObj) { return o.onError(next.e); } + if (next.done) { return o.onCompleted(); } var result = next.value; - if (mapper) { - try { - result = mapper(result, i); - } catch (e) { - return observer.onError(e); - } + if (isFunction(mapper)) { + result = tryCatch(mapper)(result, i); + if (result === errorObj) { return o.onError(result.e); } } - observer.onNext(result); + o.onNext(result); recurse(i + 1); } @@ -2238,7 +2211,7 @@ var maxSafeInteger = Math.pow(2, 53) - 1; - function StringIterable(str) { + function StringIterable(s) { this._s = s; } @@ -2246,7 +2219,7 @@ return new StringIterator(this._s); }; - function StringIterator(str) { + function StringIterator(s) { this._s = s; this._l = s.length; this._i = 0; @@ -2401,12 +2374,14 @@ return NeverObservable; }(ObservableBase)); + var NEVER_OBSERVABLE = new NeverObservable(); + /** * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). * @returns {Observable} An observable sequence whose observers will never get called. */ var observableNever = Observable.never = function () { - return new NeverObservable(); + return NEVER_OBSERVABLE; }; function observableOf (scheduler, array) { @@ -2592,23 +2567,28 @@ } JustObservable.prototype.subscribeCore = function (observer) { - var sink = new JustSink(observer, this); + var sink = new JustSink(observer, this.value, this.scheduler); return sink.run(); }; - function JustSink(observer, parent) { + function JustSink(observer, value, scheduler) { this.observer = observer; - this.parent = parent; + this.value = value; + this.scheduler = scheduler; } function scheduleItem(s, state) { var value = state[0], observer = state[1]; observer.onNext(value); observer.onCompleted(); + return disposableEmpty; } JustSink.prototype.run = function () { - return this.parent.scheduler.scheduleWithState([this.parent.value, this.observer], scheduleItem); + var state = [this.value, this.observer]; + return this.scheduler === immediateScheduler ? + scheduleItem(null, state) : + this.scheduler.scheduleWithState(state, scheduleItem); }; return JustObservable; @@ -2621,7 +2601,7 @@ * @param {Scheduler} scheduler Scheduler to send the single element on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} An observable sequence containing the single specified element. */ - var observableReturn = Observable['return'] = Observable.just = Observable.returnValue = function (value, scheduler) { + var observableReturn = Observable['return'] = Observable.just = function (value, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new JustObservable(value, scheduler); }; @@ -2663,44 +2643,51 @@ * @param {Scheduler} scheduler Scheduler to send the exceptional termination call on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} The observable sequence that terminates exceptionally with the specified exception object. */ - var observableThrow = Observable['throw'] = Observable.throwError = Observable.throwException = function (error, scheduler) { + var observableThrow = Observable['throw'] = function (error, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new ThrowObservable(error, scheduler); }; + var CatchObserver = (function(__super__) { + inherits(CatchObserver, __super__); + function CatchObserver(o, s, fn) { + this._o = o; + this._s = s; + this._fn = fn; + __super__.call(this); + } + + CatchObserver.prototype.next = function (x) { this._o.onNext(x); }; + CatchObserver.prototype.completed = function () { return this._o.onCompleted(); }; + CatchObserver.prototype.error = function (e) { + var result = tryCatch(this._fn)(e); + if (result === errorObj) { return this._o.onError(result.e); } + isPromise(result) && (result = observableFromPromise(result)); + + var d = new SingleAssignmentDisposable(); + this._s.setDisposable(d); + d.setDisposable(result.subscribe(this._o)); + }; + + return CatchObserver; + }(AbstractObserver)); + function observableCatchHandler(source, handler) { return new AnonymousObservable(function (o) { var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable(); subscription.setDisposable(d1); - d1.setDisposable(source.subscribe(function (x) { o.onNext(x); }, function (e) { - try { - var result = handler(e); - } catch (ex) { - return o.onError(ex); - } - isPromise(result) && (result = observableFromPromise(result)); - - var d = new SingleAssignmentDisposable(); - subscription.setDisposable(d); - d.setDisposable(result.subscribe(o)); - }, function (x) { o.onCompleted(x); })); - + d1.setDisposable(source.subscribe(new CatchObserver(o, subscription, handler))); return subscription; }, source); } /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. - * @example - * 1 - xs.catchException(ys) - * 2 - xs.catchException(function (ex) { return ys(ex); }) * @param {Mixed} handlerOrSecond Exception handler function that returns an observable sequence given the error that occurred in the first sequence, or a second observable sequence used to produce results when an error occurred in the first sequence. * @returns {Observable} An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred. */ - observableProto['catch'] = observableProto.catchError = observableProto.catchException = function (handlerOrSecond) { - return typeof handlerOrSecond === 'function' ? - observableCatchHandler(this, handlerOrSecond) : - observableCatch([this, handlerOrSecond]); + observableProto['catch'] = function (handlerOrSecond) { + return isFunction(handlerOrSecond) ? observableCatchHandler(this, handlerOrSecond) : observableCatch([this, handlerOrSecond]); }; /** @@ -2708,12 +2695,14 @@ * @param {Array | Arguments} args Arguments or an array to use as the next sequence if an error occurs. * @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. */ - var observableCatch = Observable.catchError = Observable['catch'] = Observable.catchException = function () { - var items = []; + var observableCatch = Observable['catch'] = function () { + var items; if (Array.isArray(arguments[0])) { items = arguments[0]; } else { - for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); } + var len = arguments.length; + items = new Array(len); + for(var i = 0; i < len; i++) { items[i] = arguments[i]; } } return enumerableOf(items).catchError(); }; @@ -2738,6 +2727,13 @@ return combineLatest.apply(this, args); }; + function falseFactory() { return false; } + function argumentsToArray() { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return args; + } + /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. * @@ -2749,12 +2745,11 @@ var combineLatest = Observable.combineLatest = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - var resultSelector = args.pop(); + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; Array.isArray(args[0]) && (args = args[0]); return new AnonymousObservable(function (o) { var n = args.length, - falseFactory = function () { return false; }, hasValue = arrayInitialize(n, falseFactory), hasValueAll = false, isDone = arrayInitialize(n, falseFactory), @@ -2809,18 +2804,18 @@ return observableConcat.apply(null, args); }; - var ConcatObservable = (function(__super__) { - inherits(ConcatObservable, __super__); - function ConcatObservable(sources) { - this.sources = sources; - __super__.call(this); - } - - ConcatObservable.prototype.subscribeCore = function(o) { + var ConcatObservable = (function(__super__) { + inherits(ConcatObservable, __super__); + function ConcatObservable(sources) { + this.sources = sources; + __super__.call(this); + } + + ConcatObservable.prototype.subscribeCore = function(o) { var sink = new ConcatSink(this.sources, o); return sink.run(); - }; - + }; + function ConcatSink(sources, o) { this.sources = sources; this.o = o; @@ -2830,9 +2825,9 @@ var cancelable = immediateScheduler.scheduleRecursiveWithState(0, function (i, self) { if (isDisposed) { return; } if (i === length) { - return o.onCompleted(); - } - + return o.onCompleted(); + } + // Check if promise var currentValue = sources[i]; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); @@ -2850,11 +2845,11 @@ isDisposed = true; })); }; - - - return ConcatObservable; - }(ObservableBase)); - + + + return ConcatObservable; + }(ObservableBase)); + /** * Concatenates all the observable sequences. * @param {Array | Arguments} args Arguments or an array to concat to the observable sequence. @@ -2875,7 +2870,7 @@ * Concatenates an observable sequence of observable sequences. * @returns {Observable} An observable sequence that contains the elements of each observed inner sequence, in sequential order. */ - observableProto.concatAll = observableProto.concatObservable = function () { + observableProto.concatAll = function () { return this.merge(1); }; @@ -3124,7 +3119,7 @@ m.setDisposable(this.source.subscribe(new MergeAllObserver(observer, g))); return g; }; - + function MergeAllObserver(o, g) { this.o = o; this.g = g; @@ -3138,7 +3133,7 @@ isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); - sad.setDisposable(innerSource.subscribe(new InnerObserver(this, this.g, sad))); + sad.setDisposable(innerSource.subscribe(new InnerObserver(this, sad))); }; MergeAllObserver.prototype.onError = function (e) { if(!this.isStopped) { @@ -3164,9 +3159,8 @@ return false; }; - function InnerObserver(parent, g, sad) { + function InnerObserver(parent, sad) { this.parent = parent; - this.g = g; this.sad = sad; this.isStopped = false; } @@ -3203,7 +3197,7 @@ * Merges an observable sequence of observable sequences into an observable sequence. * @returns {Observable} The observable sequence that merges the elements of the inner sequences. */ - observableProto.mergeAll = observableProto.mergeObservable = function () { + observableProto.mergeAll = function () { return new MergeAllObservable(this); }; @@ -3436,24 +3430,13 @@ }, this); }; - function zipArray(second, resultSelector) { - var first = this; - return new AnonymousObservable(function (o) { - var index = 0, len = second.length; - return first.subscribe(function (left) { - if (index < len) { - var right = second[index++], res = tryCatch(resultSelector)(left, right); - if (res === errorObj) { return o.onError(res.e); } - o.onNext(res); - } else { - o.onCompleted(); - } - }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); - }, first); - } - function falseFactory() { return false; } function emptyArrayFactory() { return []; } + function argumentsToArray() { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return args; + } /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. @@ -3461,11 +3444,14 @@ * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. */ observableProto.zip = function () { - if (Array.isArray(arguments[0])) { return zipArray.apply(this, arguments); } + if (arguments.length === 0) { throw new Error('invalid arguments'); } + var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; + Array.isArray(args[0]) && (args = args[0]); - var parent = this, resultSelector = args.pop(); + var parent = this; args.unshift(parent); return new AnonymousObservable(function (o) { var n = args.length, @@ -3476,7 +3462,9 @@ for (var idx = 0; idx < n; idx++) { (function (i) { var source = args[i], sad = new SingleAssignmentDisposable(); + isPromise(source) && (source = observableFromPromise(source)); + sad.setDisposable(source.subscribe(function (x) { queues[i].push(x); if (queues.every(function (x) { return x.length > 0; })) { @@ -3508,127 +3496,175 @@ Observable.zip = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + if (Array.isArray(args[0])) { + args = isFunction(args[1]) ? args[0].concat(args[1]) : args[0]; + } var first = args.shift(); return first.zip.apply(first, args); }; - function falseFactory() { return false; } - function arrayFactory() { return []; } +function falseFactory() { return false; } +function emptyArrayFactory() { return []; } +function argumentsToArray() { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return args; +} + +/** + * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. + * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. + * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. + */ +observableProto.zipIterable = function () { + if (arguments.length === 0) { throw new Error('invalid arguments'); } + + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; + + var parent = this; + args.unshift(parent); + return new AnonymousObservable(function (o) { + var n = args.length, + queues = arrayInitialize(n, emptyArrayFactory), + isDone = arrayInitialize(n, falseFactory); + + var subscriptions = new Array(n); + for (var idx = 0; idx < n; idx++) { + (function (i) { + var source = args[i], sad = new SingleAssignmentDisposable(); + + (isArrayLike(source) || isIterable(source)) && (source = observableFrom(source)); + + sad.setDisposable(source.subscribe(function (x) { + queues[i].push(x); + if (queues.every(function (x) { return x.length > 0; })) { + var queuedValues = queues.map(function (x) { return x.shift(); }), + res = tryCatch(resultSelector).apply(parent, queuedValues); + if (res === errorObj) { return o.onError(res.e); } + o.onNext(res); + } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { + o.onCompleted(); + } + }, function (e) { o.onError(e); }, function () { + isDone[i] = true; + isDone.every(identity) && o.onCompleted(); + })); + subscriptions[i] = sad; + })(idx); + } + + return new CompositeDisposable(subscriptions); + }, parent); +}; + + function asObservable(source) { + return function subscribe(o) { return source.subscribe(o); }; + } /** - * Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. - * @param arguments Observable sources. - * @returns {Observable} An observable sequence containing lists of elements at corresponding indexes. + * Hides the identity of an observable sequence. + * @returns {Observable} An observable sequence that hides the identity of the source sequence. */ - Observable.zipArray = function () { - var sources; - if (Array.isArray(arguments[0])) { - sources = arguments[0]; - } else { - var len = arguments.length; - sources = new Array(len); - for(var i = 0; i < len; i++) { sources[i] = arguments[i]; } - } + observableProto.asObservable = function () { + return new AnonymousObservable(asObservable(this), this); + }; + + /** + * Dematerializes the explicit notification values of an observable sequence as implicit notifications. + * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. + */ + observableProto.dematerialize = function () { + var source = this; return new AnonymousObservable(function (o) { - var n = sources.length, - queues = arrayInitialize(n, arrayFactory), - isDone = arrayInitialize(n, falseFactory); + return source.subscribe(function (x) { return x.accept(o); }, function(e) { o.onError(e); }, function () { o.onCompleted(); }); + }, this); + }; - var subscriptions = new Array(n); - for (var idx = 0; idx < n; idx++) { - (function (i) { - subscriptions[i] = new SingleAssignmentDisposable(); - subscriptions[i].setDisposable(sources[i].subscribe(function (x) { - queues[i].push(x); - if (queues.every(function (x) { return x.length > 0; })) { - var res = queues.map(function (x) { return x.shift(); }); - o.onNext(res); - } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { - return o.onCompleted(); - } - }, function (e) { o.onError(e); }, function () { - isDone[i] = true; - isDone.every(identity) && o.onCompleted(); - })); - })(idx); - } + var DistinctUntilChangedObservable = (function(__super__) { + inherits(DistinctUntilChangedObservable, __super__); + function DistinctUntilChangedObservable(source, keyFn, comparer) { + this.source = source; + this.keyFn = keyFn; + this.comparer = comparer; + __super__.call(this); + } - return new CompositeDisposable(subscriptions); - }); - }; + DistinctUntilChangedObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new DistinctUntilChangedObserver(o, this.keyFn, this.comparer)); + }; - /** - * Hides the identity of an observable sequence. - * @returns {Observable} An observable sequence that hides the identity of the source sequence. - */ - observableProto.asObservable = function () { - var source = this; - return new AnonymousObservable(function (o) { return source.subscribe(o); }, source); - }; + return DistinctUntilChangedObservable; + }(ObservableBase)); - /** - * Dematerializes the explicit notification values of an observable sequence as implicit notifications. - * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. - */ - observableProto.dematerialize = function () { - var source = this; - return new AnonymousObservable(function (o) { - return source.subscribe(function (x) { return x.accept(o); }, function(e) { o.onError(e); }, function () { o.onCompleted(); }); - }, this); - }; + var DistinctUntilChangedObserver = (function(__super__) { + inherits(DistinctUntilChangedObserver, __super__); + function DistinctUntilChangedObserver(o, keyFn, comparer) { + this.o = o; + this.keyFn = keyFn; + this.comparer = comparer; + this.hasCurrentKey = false; + this.currentKey = null; + __super__.call(this); + } + + DistinctUntilChangedObserver.prototype.next = function (x) { + var key = x, comparerEquals; + if (isFunction(this.keyFn)) { + key = tryCatch(this.keyFn)(x); + if (key === errorObj) { return this.o.onError(key.e); } + } + if (this.hasCurrentKey) { + comparerEquals = tryCatch(this.comparer)(this.currentKey, key); + if (comparerEquals === errorObj) { return this.o.onError(comparerEquals.e); } + } + if (!this.hasCurrentKey || !comparerEquals) { + this.hasCurrentKey = true; + this.currentKey = key; + this.o.onNext(x); + } + }; + DistinctUntilChangedObserver.prototype.error = function(e) { + this.o.onError(e); + }; + DistinctUntilChangedObserver.prototype.completed = function () { + this.o.onCompleted(); + }; + + return DistinctUntilChangedObserver; + }(AbstractObserver)); /** - * Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - * - * var obs = observable.distinctUntilChanged(); - * var obs = observable.distinctUntilChanged(function (x) { return x.id; }); - * var obs = observable.distinctUntilChanged(function (x) { return x.id; }, function (x, y) { return x === y; }); - * - * @param {Function} [keySelector] A function to compute the comparison key for each element. If not provided, it projects the value. - * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. - * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. - */ - observableProto.distinctUntilChanged = function (keySelector, comparer) { - var source = this; + * Returns an observable sequence that contains only distinct contiguous elements according to the keyFn and the comparer. + * @param {Function} [keyFn] A function to compute the comparison key for each element. If not provided, it projects the value. + * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. + * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. + */ + observableProto.distinctUntilChanged = function (keyFn, comparer) { comparer || (comparer = defaultComparer); - return new AnonymousObservable(function (o) { - var hasCurrentKey = false, currentKey; - return source.subscribe(function (value) { - var key = value; - if (keySelector) { - key = tryCatch(keySelector)(value); - if (key === errorObj) { return o.onError(key.e); } - } - if (hasCurrentKey) { - var comparerEquals = tryCatch(comparer)(currentKey, key); - if (comparerEquals === errorObj) { return o.onError(comparerEquals.e); } - } - if (!hasCurrentKey || !comparerEquals) { - hasCurrentKey = true; - currentKey = key; - o.onNext(value); - } - }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); - }, this); + return new DistinctUntilChangedObservable(this, keyFn, comparer); }; var TapObservable = (function(__super__) { inherits(TapObservable,__super__); function TapObservable(source, observerOrOnNext, onError, onCompleted) { this.source = source; - this.t = !observerOrOnNext || isFunction(observerOrOnNext) ? - observerCreate(observerOrOnNext || noop, onError || noop, onCompleted || noop) : - observerOrOnNext; + this._oN = observerOrOnNext; + this._oE = onError; + this._oC = onCompleted; __super__.call(this); } TapObservable.prototype.subscribeCore = function(o) { - return this.source.subscribe(new InnerObserver(o, this.t)); + return this.source.subscribe(new InnerObserver(o, this)); }; - function InnerObserver(o, t) { + function InnerObserver(o, p) { this.o = o; - this.t = t; + this.t = !p._oN || isFunction(p._oN) ? + observerCreate(p._oN || noop, p._oE || noop, p._oC || noop) : + p._oN; this.isStopped = false; } InnerObserver.prototype.onNext = function(x) { @@ -3716,36 +3752,22 @@ * @param {Function} finallyAction Action to invoke after the source observable sequence terminates. * @returns {Observable} Source sequence with the action-invoking termination behavior applied. */ - observableProto['finally'] = observableProto.ensure = function (action) { + observableProto['finally'] = function (action) { var source = this; return new AnonymousObservable(function (observer) { - var subscription; - try { - subscription = source.subscribe(observer); - } catch (e) { + var subscription = tryCatch(source.subscribe).call(source, observer); + if (subscription === errorObj) { action(); - throw e; + return thrower(subscription.e); } return disposableCreate(function () { - try { - subscription.dispose(); - } catch (e) { - throw e; - } finally { - action(); - } + var r = tryCatch(subscription.dispose).call(subscription); + action(); + r === errorObj && thrower(r.e); }); }, this); }; - /** - * @deprecated use #finally or #ensure instead. - */ - observableProto.finallyAction = function (action) { - //deprecate('finallyAction', 'finally or ensure'); - return this.ensure(action); - }; - var IgnoreElementsObservable = (function(__super__) { inherits(IgnoreElementsObservable, __super__); @@ -3840,7 +3862,7 @@ }; /** - * Repeats the source observable sequence upon error each time the notifier emits or until it successfully terminates. + * Repeats the source observable sequence upon error each time the notifier emits or until it successfully terminates. * if the notifier completes, the observable sequence completes. * * @example @@ -3862,15 +3884,15 @@ __super__.call(this); } - ScanObservable.prototype.subscribeCore = function(observer) { - return this.source.subscribe(new ScanObserver(observer,this)); + ScanObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new InnerObserver(o,this)); }; return ScanObservable; }(ObservableBase)); - function ScanObserver(observer, parent) { - this.observer = observer; + function InnerObserver(o, parent) { + this.o = o; this.accumulator = parent.accumulator; this.hasSeed = parent.hasSeed; this.seed = parent.seed; @@ -3879,42 +3901,41 @@ this.hasValue = false; this.isStopped = false; } - ScanObserver.prototype.onNext = function (x) { - if (this.isStopped) { return; } - !this.hasValue && (this.hasValue = true); - try { + InnerObserver.prototype = { + onNext: function (x) { + if (this.isStopped) { return; } + !this.hasValue && (this.hasValue = true); if (this.hasAccumulation) { - this.accumulation = this.accumulator(this.accumulation, x); + this.accumulation = tryCatch(this.accumulator)(this.accumulation, x); } else { - this.accumulation = this.hasSeed ? this.accumulator(this.seed, x) : x; + this.accumulation = this.hasSeed ? tryCatch(this.accumulator)(this.seed, x) : x; this.hasAccumulation = true; } - } catch (e) { - return this.observer.onError(e); - } - this.observer.onNext(this.accumulation); - }; - ScanObserver.prototype.onError = function (e) { - if (!this.isStopped) { - this.isStopped = true; - this.observer.onError(e); - } - }; - ScanObserver.prototype.onCompleted = function () { - if (!this.isStopped) { - this.isStopped = true; - !this.hasValue && this.hasSeed && this.observer.onNext(this.seed); - this.observer.onCompleted(); - } - }; - ScanObserver.prototype.dispose = function() { this.isStopped = true; }; - ScanObserver.prototype.fail = function (e) { - if (!this.isStopped) { - this.isStopped = true; - this.observer.onError(e); - return true; + if (this.accumulation === errorObj) { return this.o.onError(this.accumulation.e); } + this.o.onNext(this.accumulation); + }, + onError: function (e) { + if (!this.isStopped) { + this.isStopped = true; + this.o.onError(e); + } + }, + onCompleted: function () { + if (!this.isStopped) { + this.isStopped = true; + !this.hasValue && this.hasSeed && this.o.onNext(this.seed); + this.o.onCompleted(); + } + }, + dispose: function() { this.isStopped = true; }, + fail: function (e) { + if (!this.isStopped) { + this.isStopped = true; + this.o.onError(e); + return true; + } + return false; } - return false; }; /** @@ -3925,13 +3946,10 @@ * @returns {Observable} An observable sequence containing the accumulated values. */ observableProto.scan = function () { - var hasSeed = false, seed, accumulator, source = this; + var hasSeed = false, seed, accumulator = arguments[0]; if (arguments.length === 2) { hasSeed = true; - seed = arguments[0]; - accumulator = arguments[1]; - } else { - accumulator = arguments[0]; + seed = arguments[1]; } return new ScanObservable(this, accumulator, hasSeed, seed); }; @@ -3999,52 +4017,9 @@ }, source); }; - function concatMap(source, selector, thisArg) { - var selectorFunc = bindCallback(selector, thisArg, 3); - return source.map(function (x, i) { - var result = selectorFunc(x, i, source); - isPromise(result) && (result = observableFromPromise(result)); - (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); - return result; - }).concatAll(); - } - - /** - * One of the Following: - * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - * - * @example - * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }); - * Or: - * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. - * - * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); - * Or: - * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. - * - * var res = source.concatMap(Rx.Observable.fromArray([1,2,3])); - * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the - * source sequence onto which could be either an observable or Promise. - * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. - * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. - */ - observableProto.selectConcat = observableProto.concatMap = function (selector, resultSelector, thisArg) { - if (isFunction(selector) && isFunction(resultSelector)) { - return this.concatMap(function (x, i) { - var selectorResult = selector(x, i); - isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); - (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); - - return selectorResult.map(function (y, i2) { - return resultSelector(x, y, i, i2); - }); - }); - } - return isFunction(selector) ? - concatMap(this, selector, thisArg) : - concatMap(this, function () { return selector; }); - }; - +observableProto.flatMapConcat = observableProto.concatMap = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(1); +}; var MapObservable = (function (__super__) { inherits(MapObservable, __super__); @@ -4053,7 +4028,7 @@ this.selector = bindCallback(selector, thisArg, 3); __super__.call(this); } - + function innerMap(selector, self) { return function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); } } @@ -4065,7 +4040,7 @@ MapObservable.prototype.subscribeCore = function (o) { return this.source.subscribe(new InnerObserver(o, this.selector, this)); }; - + function InnerObserver(o, selector, source) { this.o = o; this.selector = selector; @@ -4073,13 +4048,11 @@ this.i = 0; this.isStopped = false; } - + InnerObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var result = tryCatch(this.selector)(x, this.i++, this.source); - if (result === errorObj) { - return this.o.onError(result.e); - } + if (result === errorObj) { return this.o.onError(result.e); } this.o.onNext(result); }; InnerObserver.prototype.onError = function (e) { @@ -4095,7 +4068,7 @@ this.o.onError(e); return true; } - + return false; }; @@ -4116,16 +4089,8 @@ new MapObservable(this, selectorFn, thisArg); }; - /** - * Retrieves the value of a specified nested property from all elements in - * the Observable sequence. - * @param {Arguments} arguments The nested properties to pluck. - * @returns {Observable} Returns a new Observable sequence of property values. - */ - observableProto.pluck = function () { - var args = arguments, len = arguments.length; - if (len === 0) { throw new Error('List of properties cannot be empty.'); } - return this.map(function (x) { + function plucker(args, len) { + return function mapper(x) { var currentProp = x; for (var i = 0; i < len; i++) { var p = currentProp[args[i]]; @@ -4136,67 +4101,36 @@ } } return currentProp; - }); - }; - - function flatMap(source, selector, thisArg) { - var selectorFunc = bindCallback(selector, thisArg, 3); - return source.map(function (x, i) { - var result = selectorFunc(x, i, source); - isPromise(result) && (result = observableFromPromise(result)); - (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); - return result; - }).mergeAll(); + } } /** - * One of the Following: - * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - * - * @example - * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }); - * Or: - * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. - * - * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); - * Or: - * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. - * - * var res = source.selectMany(Rx.Observable.fromArray([1,2,3])); - * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the source sequence onto which could be either an observable or Promise. - * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. + * @returns {Observable} Returns a new Observable sequence of property values. */ - observableProto.selectMany = observableProto.flatMap = function (selector, resultSelector, thisArg) { - if (isFunction(selector) && isFunction(resultSelector)) { - return this.flatMap(function (x, i) { - var selectorResult = selector(x, i); - isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); - (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); - - return selectorResult.map(function (y, i2) { - return resultSelector(x, y, i, i2); - }); - }, thisArg); - } - return isFunction(selector) ? - flatMap(this, selector, thisArg) : - flatMap(this, function () { return selector; }); + observableProto.pluck = function () { + var len = arguments.length, args = new Array(len); + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return this.map(plucker(args, len)); }; - /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then - * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences - * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - observableProto.selectSwitch = observableProto.flatMapLatest = observableProto.switchMap = function (selector, thisArg) { - return this.select(selector, thisArg).switchLatest(); - }; +observableProto.flatMap = observableProto.selectMany = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).mergeAll(); +}; + + +// +//Rx.Observable.prototype.flatMapWithMaxConcurrent = function(limit, selector, resultSelector, thisArg) { +// return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(limit); +//}; +// +Rx.Observable.prototype.flatMapLatest = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).switchLatest(); +}; var SkipObservable = (function(__super__) { inherits(SkipObservable, __super__); function SkipObservable(source, count) { @@ -4204,11 +4138,11 @@ this.skipCount = count; __super__.call(this); } - + SkipObservable.prototype.subscribeCore = function (o) { return this.source.subscribe(new InnerObserver(o, this.skipCount)); }; - + function InnerObserver(o, c) { this.c = c; this.r = c; @@ -4217,7 +4151,7 @@ } InnerObserver.prototype.onNext = function (x) { if (this.isStopped) { return; } - if (this.r <= 0) { + if (this.r <= 0) { this.o.onNext(x); } else { this.r--; @@ -4238,10 +4172,10 @@ } return false; }; - + return SkipObservable; - }(ObservableBase)); - + }(ObservableBase)); + /** * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. * @param {Number} count The number of elements to skip before returning the remaining elements. @@ -4346,7 +4280,7 @@ FilterObservable.prototype.subscribeCore = function (o) { return this.source.subscribe(new InnerObserver(o, this.predicate, this)); }; - + function innerPredicate(predicate, self) { return function(x, i, o) { return self.predicate(x, i, o) && predicate.call(this, x, i, o); } } @@ -4354,7 +4288,7 @@ FilterObservable.prototype.internalFilter = function(predicate, thisArg) { return new FilterObservable(this.source, innerPredicate(predicate, this), thisArg); }; - + function InnerObserver(o, predicate, source) { this.o = o; this.predicate = predicate; @@ -4362,7 +4296,7 @@ this.i = 0; this.isStopped = false; } - + InnerObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var shouldYield = tryCatch(this.predicate)(x, this.i++, this.source); @@ -4402,116 +4336,128 @@ new FilterObservable(this, predicate, thisArg); }; - /** - * Converts a callback function to an observable sequence. - * - * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence. - * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. - * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next. - * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array. - */ - Observable.fromCallback = function (func, context, selector) { - return function () { - var len = arguments.length, args = new Array(len) - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } +function createCbObservable(fn, ctx, selector, args) { + var o = new AsyncSubject(); - return new AnonymousObservable(function (observer) { - function handler() { - var len = arguments.length, results = new Array(len); - for(var i = 0; i < len; i++) { results[i] = arguments[i]; } - - if (selector) { - try { - results = selector.apply(context, results); - } catch (e) { - return observer.onError(e); - } + args.push(createCbHandler(o, ctx, selector)); + fn.apply(ctx, args); - observer.onNext(results); - } else { - if (results.length <= 1) { - observer.onNext.apply(observer, results); - } else { - observer.onNext(results); - } - } + return o.asObservable(); +} - observer.onCompleted(); - } +function createCbHandler(o, ctx, selector) { + return function handler () { + var len = arguments.length, results = new Array(len); + for(var i = 0; i < len; i++) { results[i] = arguments[i]; } - args.push(handler); - func.apply(context, args); - }).publishLast().refCount(); - }; + if (isFunction(selector)) { + results = tryCatch(selector).apply(ctx, results); + if (results === errorObj) { return o.onError(results.e); } + o.onNext(results); + } else { + if (results.length <= 1) { + o.onNext(results[0]); + } else { + o.onNext(results); + } + } + + o.onCompleted(); }; +} - /** - * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format. - * @param {Function} func The function to call - * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. - * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next. - * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array. - */ - Observable.fromNodeCallback = function (func, context, selector) { - return function () { - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } +/** + * Converts a callback function to an observable sequence. + * + * @param {Function} fn Function with a callback as the last parameter to convert to an Observable sequence. + * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined. + * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next. + * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array. + */ +Observable.fromCallback = function (fn, ctx, selector) { + return function () { + typeof ctx === 'undefined' && (ctx = this); - return new AnonymousObservable(function (observer) { - function handler(err) { - if (err) { - observer.onError(err); - return; - } + var len = arguments.length, args = new Array(len) + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return createCbObservable(fn, ctx, selector, args); + }; +}; - var len = arguments.length, results = []; - for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; } +function createNodeObservable(fn, ctx, selector, args) { + var o = new AsyncSubject(); - if (selector) { - try { - results = selector.apply(context, results); - } catch (e) { - return observer.onError(e); - } - observer.onNext(results); - } else { - if (results.length <= 1) { - observer.onNext.apply(observer, results); - } else { - observer.onNext(results); - } - } + args.push(createNodeHandler(o, ctx, selector)); + fn.apply(ctx, args); - observer.onCompleted(); - } + return o.asObservable(); +} - args.push(handler); - func.apply(context, args); - }).publishLast().refCount(); - }; - }; +function createNodeHandler(o, ctx, selector) { + return function handler () { + var err = arguments[0]; + if (err) { return o.onError(err); } - function createListener (element, name, handler) { - if (element.addEventListener) { - element.addEventListener(name, handler, false); - return disposableCreate(function () { - element.removeEventListener(name, handler, false); - }); + var len = arguments.length, results = []; + for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; } + + if (isFunction(selector)) { + var results = tryCatch(selector).apply(ctx, results); + if (results === errorObj) { return o.onError(results.e); } + o.onNext(results); + } else { + if (results.length <= 1) { + o.onNext(results[0]); + } else { + o.onNext(results); + } } - throw new Error('No listener found'); + + o.onCompleted(); + }; +} + +/** + * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format. + * @param {Function} fn The function to call + * @param {Mixed} [ctx] The context for the func parameter to be executed. If not specified, defaults to undefined. + * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next. + * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array. + */ +Observable.fromNodeCallback = function (fn, ctx, selector) { + return function () { + typeof ctx === 'undefined' && (ctx = this); + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return createNodeObservable(fn, ctx, selector, args); + }; +}; + + function ListenDisposable(e, n, fn) { + this._e = e; + this._n = n; + this._fn = fn; + this._e.addEventListener(this._n, this._fn, false); + this.isDisposed = false; } + ListenDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this._e.removeEventListener(this._n, this._fn, false); + this.isDisposed = true; + } + }; function createEventListener (el, eventName, handler) { var disposables = new CompositeDisposable(); // Asume NodeList or HTMLCollection - var toStr = Object.prototype.toString; - if (toStr.call(el) === '[object NodeList]' || toStr.call(el) === '[object HTMLCollection]') { + var elemToString = Object.prototype.toString.call(el); + if (elemToString === '[object NodeList]' || elemToString === '[object HTMLCollection]') { for (var i = 0, len = el.length; i < len; i++) { disposables.add(createEventListener(el.item(i), eventName, handler)); } } else if (el) { - disposables.add(createListener(el, eventName, handler)); + disposables.add(new ListenDisposable(el, eventName, handler)); } return disposables; @@ -4522,12 +4468,19 @@ */ Rx.config.useNativeEvents = false; + function eventHandler(o, selector) { + return function handler () { + var results = arguments[0]; + if (isFunction(selector)) { + results = tryCatch(selector).apply(null, arguments); + if (results === errorObj) { return o.onError(results.e); } + } + o.onNext(results); + }; + } + /** * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList. - * - * @example - * var source = Rx.Observable.fromEvent(element, 'mouseup'); - * * @param {Object} element The DOMElement or NodeList to attach a listener. * @param {String} eventName The event name to attach the observable sequence. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. @@ -4552,23 +4505,12 @@ selector); } } - return new AnonymousObservable(function (observer) { + + return new AnonymousObservable(function (o) { return createEventListener( element, eventName, - function handler (e) { - var results = e; - - if (selector) { - try { - results = selector(arguments); - } catch (err) { - return observer.onError(err); - } - } - - observer.onNext(results); - }); + eventHandler(o, selector)); }).publish().refCount(); }; @@ -4577,57 +4519,54 @@ * @param {Function} addHandler The function to add a handler to the emitter. * @param {Function} [removeHandler] The optional function to remove a handler from an emitter. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. + * @param {Scheduler} [scheduler] A scheduler used to schedule the remove handler. * @returns {Observable} An observable sequence which wraps an event from an event emitter */ - var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector) { - return new AnonymousObservable(function (observer) { - function innerHandler (e) { - var result = e; - if (selector) { - try { - result = selector(arguments); - } catch (err) { - return observer.onError(err); - } + var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector, scheduler) { + isScheduler(scheduler) || (scheduler = immediateScheduler); + return new AnonymousObservable(function (o) { + function innerHandler () { + var result = arguments[0]; + if (isFunction(selector)) { + result = tryCatch(selector).apply(null, arguments); + if (result === errorObj) { return o.onError(result.e); } } - observer.onNext(result); + o.onNext(result); } var returnValue = addHandler(innerHandler); return disposableCreate(function () { - if (removeHandler) { - removeHandler(innerHandler, returnValue); - } + isFunction(removeHandler) && removeHandler(innerHandler, returnValue); }); }).publish().refCount(); }; - var FromPromiseObservable = (function(__super__) { - inherits(FromPromiseObservable, __super__); - function FromPromiseObservable(p) { - this.p = p; - __super__.call(this); - } - - FromPromiseObservable.prototype.subscribeCore = function(o) { - this.p.then(function (data) { - o.onNext(data); - o.onCompleted(); - }, function (err) { o.onError(err); }); - return disposableEmpty; - }; - - return FromPromiseObservable; - }(ObservableBase)); - - /** - * Converts a Promise to an Observable sequence - * @param {Promise} An ES6 Compliant promise. - * @returns {Observable} An Observable sequence which wraps the existing promise success and failure. - */ - var observableFromPromise = Observable.fromPromise = function (promise) { - return new FromPromiseObservable(promise); - }; + var FromPromiseObservable = (function(__super__) { + inherits(FromPromiseObservable, __super__); + function FromPromiseObservable(p) { + this.p = p; + __super__.call(this); + } + + FromPromiseObservable.prototype.subscribeCore = function(o) { + this.p.then(function (data) { + o.onNext(data); + o.onCompleted(); + }, function (err) { o.onError(err); }); + return disposableEmpty; + }; + + return FromPromiseObservable; + }(ObservableBase)); + + /** + * Converts a Promise to an Observable sequence + * @param {Promise} An ES6 Compliant promise. + * @returns {Observable} An Observable sequence which wraps the existing promise success and failure. + */ + var observableFromPromise = Observable.fromPromise = function (promise) { + return new FromPromiseObservable(promise); + }; /* * Converts an existing observable sequence to an ES6 Compatible Promise * @example @@ -4919,7 +4858,7 @@ var observableTimer = Observable.timer = function (dueTime, periodOrScheduler, scheduler) { var period; isScheduler(scheduler) || (scheduler = timeoutScheduler); - if (periodOrScheduler !== undefined && typeof periodOrScheduler === 'number') { + if (periodOrScheduler != null && typeof periodOrScheduler === 'number') { period = periodOrScheduler; } else if (isScheduler(periodOrScheduler)) { scheduler = periodOrScheduler; @@ -4928,16 +4867,15 @@ return observableTimerDate(dueTime.getTime(), scheduler); } if (dueTime instanceof Date && period !== undefined) { - period = periodOrScheduler; - return observableTimerDateAndPeriod(dueTime.getTime(), period, scheduler); + return observableTimerDateAndPeriod(dueTime.getTime(), periodOrScheduler, scheduler); } return period === undefined ? observableTimerTimeSpan(dueTime, scheduler) : observableTimerTimeSpanAndPeriod(dueTime, period, scheduler); }; - function observableDelayTimeSpan(source, dueTime, scheduler) { - return new AnonymousObservable(function (observer) { + function observableDelayRelative(source, dueTime, scheduler) { + return new AnonymousObservable(function (o) { var active = false, cancelable = new SerialDisposable(), exception = null, @@ -4958,7 +4896,7 @@ } if (shouldRun) { if (exception !== null) { - observer.onError(exception); + o.onError(exception); } else { d = new SingleAssignmentDisposable(); cancelable.setDisposable(d); @@ -4974,7 +4912,7 @@ result = q.shift().value; } if (result !== null) { - result.accept(observer); + result.accept(o); } } while (result !== null); shouldRecurse = false; @@ -4988,7 +4926,7 @@ e = exception; running = false; if (e !== null) { - observer.onError(e); + o.onError(e); } else if (shouldRecurse) { self(recurseDueTime); } @@ -5000,42 +4938,91 @@ }, source); } - function observableDelayDate(source, dueTime, scheduler) { + function observableDelayAbsolute(source, dueTime, scheduler) { return observableDefer(function () { - return observableDelayTimeSpan(source, dueTime - scheduler.now(), scheduler); + return observableDelayRelative(source, dueTime - scheduler.now(), scheduler); }); } + function delayWithSelector(source, subscriptionDelay, delayDurationSelector) { + var subDelay, selector; + if (isFunction(subscriptionDelay)) { + selector = subscriptionDelay; + } else { + subDelay = subscriptionDelay; + selector = delayDurationSelector; + } + return new AnonymousObservable(function (o) { + var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable(); + + function start() { + subscription.setDisposable(source.subscribe( + function (x) { + var delay = tryCatch(selector)(x); + if (delay === errorObj) { return o.onError(delay.e); } + var d = new SingleAssignmentDisposable(); + delays.add(d); + d.setDisposable(delay.subscribe( + function () { + o.onNext(x); + delays.remove(d); + done(); + }, + function (e) { o.onError(e); }, + function () { + o.onNext(x); + delays.remove(d); + done(); + } + )); + }, + function (e) { o.onError(e); }, + function () { + atEnd = true; + subscription.dispose(); + done(); + } + )); + } + + function done () { + atEnd && delays.length === 0 && o.onCompleted(); + } + + if (!subDelay) { + start(); + } else { + subscription.setDisposable(subDelay.subscribe(start, function (e) { o.onError(e); }, start)); + } + + return new CompositeDisposable(subscription, delays); + }, this); + } + /** - * Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved. + * Time shifts the observable sequence by dueTime. + * The relative time intervals between the values are preserved. * - * @example - * 1 - res = Rx.Observable.delay(new Date()); - * 2 - res = Rx.Observable.delay(new Date(), Rx.Scheduler.timeout); - * - * 3 - res = Rx.Observable.delay(5000); - * 4 - res = Rx.Observable.delay(5000, 1000, Rx.Scheduler.timeout); - * @memberOf Observable# * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence. * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used. * @returns {Observable} Time-shifted sequence. */ - observableProto.delay = function (dueTime, scheduler) { - isScheduler(scheduler) || (scheduler = timeoutScheduler); - return dueTime instanceof Date ? - observableDelayDate(this, dueTime.getTime(), scheduler) : - observableDelayTimeSpan(this, dueTime, scheduler); + observableProto.delay = function () { + if (typeof arguments[0] === 'number' || arguments[0] instanceof Date) { + var dueTime = arguments[0], scheduler = arguments[1]; + isScheduler(scheduler) || (scheduler = timeoutScheduler); + return dueTime instanceof Date ? + observableDelayAbsolute(this, dueTime, scheduler) : + observableDelayRelative(this, dueTime, scheduler); + } else if (isFunction(arguments[0])) { + return delayWithSelector(this, arguments[0], arguments[1]); + } else { + throw new Error('Invalid arguments'); + } }; - /** - * Ignores values from an observable sequence which are followed by another value before dueTime. - * @param {Number} dueTime Duration of the debounce period for each value (specified as an integer denoting milliseconds). - * @param {Scheduler} [scheduler] Scheduler to run the debounce timers on. If not specified, the timeout scheduler is used. - * @returns {Observable} The debounced sequence. - */ - observableProto.debounce = observableProto.throttleWithTimeout = function (dueTime, scheduler) { + function debounce(source, dueTime, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); - var source = this; return new AnonymousObservable(function (observer) { var cancelable = new SerialDisposable(), hasvalue = false, value, id = 0; var subscription = source.subscribe( @@ -5066,14 +5053,63 @@ }); return new CompositeDisposable(subscription, cancelable); }, this); - }; + } - /** - * @deprecated use #debounce or #throttleWithTimeout instead. - */ - observableProto.throttle = function(dueTime, scheduler) { - //deprecate('throttle', 'debounce or throttleWithTimeout'); - return this.debounce(dueTime, scheduler); + function debounceWithSelector(source, durationSelector) { + return new AnonymousObservable(function (o) { + var value, hasValue = false, cancelable = new SerialDisposable(), id = 0; + var subscription = source.subscribe( + function (x) { + var throttle = tryCatch(durationSelector)(x); + if (throttle === errorObj) { return o.onError(throttle.e); } + + isPromise(throttle) && (throttle = observableFromPromise(throttle)); + + hasValue = true; + value = x; + id++; + var currentid = id, d = new SingleAssignmentDisposable(); + cancelable.setDisposable(d); + d.setDisposable(throttle.subscribe( + function () { + hasValue && id === currentid && o.onNext(value); + hasValue = false; + d.dispose(); + }, + function (e) { o.onError(e); }, + function () { + hasValue && id === currentid && o.onNext(value); + hasValue = false; + d.dispose(); + } + )); + }, + function (e) { + cancelable.dispose(); + o.onError(e); + hasValue = false; + id++; + }, + function () { + cancelable.dispose(); + hasValue && o.onNext(value); + o.onCompleted(); + hasValue = false; + id++; + } + ); + return new CompositeDisposable(subscription, cancelable); + }, source); + } + + observableProto.debounce = function () { + if (isFunction (arguments[0])) { + return debounceWithSelector(this, arguments[0]); + } else if (typeof arguments[0] === 'number') { + return debounce(this, arguments[0], arguments[1]); + } else { + throw new Error('Invalid arguments'); + } }; /** @@ -5114,7 +5150,7 @@ function (e) { o.onError(e); }, function () { atEnd = true; - sourceSubscription.dispose(); + sourceSubscription.dispose(); } )); @@ -5144,22 +5180,78 @@ sampleObservable(this, intervalOrSampler); }; - /** - * Returns the source observable sequence or the other observable sequence if dueTime elapses. - * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs. - * @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used. - * @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used. - * @returns {Observable} The source sequence switching to the other sequence in case of a timeout. - */ - observableProto.timeout = function (dueTime, other, scheduler) { - (other == null || typeof other === 'string') && (other = observableThrow(new Error(other || 'Timeout'))); + var TimeoutError = Rx.TimeoutError = function(message) { + this.message = message || 'Timeout has occurred'; + this.name = 'TimeoutError'; + Error.call(this); + }; + TimeoutError.prototype = Object.create(Error.prototype); + + function timeoutWithSelector(source, firstTimeout, timeoutDurationSelector, other) { + if (isFunction(firstTimeout)) { + other = timeoutDurationSelector; + timeoutDurationSelector = firstTimeout; + firstTimeout = observableNever(); + } + other || (other = observableThrow(new TimeoutError())); + return new AnonymousObservable(function (o) { + var subscription = new SerialDisposable(), timer = new SerialDisposable(), original = new SingleAssignmentDisposable(); + + subscription.setDisposable(original); + + var id = 0, switched = false; + + function setTimer(timeout) { + var myId = id, d = new SingleAssignmentDisposable(); + timer.setDisposable(d); + d.setDisposable(timeout.subscribe(function () { + id === myId && subscription.setDisposable(other.subscribe(o)); + d.dispose(); + }, function (e) { + id === myId && o.onError(e); + }, function () { + id === myId && subscription.setDisposable(other.subscribe(o)); + })); + }; + + setTimer(firstTimeout); + + function oWins() { + var res = !switched; + if (res) { id++; } + return res; + } + + original.setDisposable(source.subscribe(function (x) { + if (oWins()) { + o.onNext(x); + var timeout = tryCatch(timeoutDurationSelector)(x); + if (timeout === errorObj) { return o.onError(timeout.e); } + setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout); + } + }, function (e) { + oWins() && o.onError(e); + }, function () { + oWins() && o.onCompleted(); + })); + return new CompositeDisposable(subscription, timer); + }, source); + } + + function timeout(source, dueTime, other, scheduler) { + if (other == null) { throw new Error('other or scheduler must be specified'); } + if (isScheduler(other)) { + scheduler = other; + other = observableThrow(new TimeoutError()); + } + if (other instanceof Error) { other = observableThrow(other); } isScheduler(scheduler) || (scheduler = timeoutScheduler); - var source = this, schedulerMethod = dueTime instanceof Date ? + var schedulerMethod = dueTime instanceof Date ? 'scheduleWithAbsolute' : 'scheduleWithRelative'; - return new AnonymousObservable(function (observer) { + return new AnonymousObservable(function (o) { var id = 0, original = new SingleAssignmentDisposable(), subscription = new SerialDisposable(), @@ -5173,7 +5265,7 @@ timer.setDisposable(scheduler[schedulerMethod](dueTime, function () { if (id === myId) { isPromise(other) && (other = observableFromPromise(other)); - subscription.setDisposable(other.subscribe(observer)); + subscription.setDisposable(other.subscribe(o)); } })); } @@ -5183,22 +5275,33 @@ original.setDisposable(source.subscribe(function (x) { if (!switched) { id++; - observer.onNext(x); + o.onNext(x); createTimer(); } }, function (e) { if (!switched) { id++; - observer.onError(e); + o.onError(e); } }, function () { if (!switched) { id++; - observer.onCompleted(); + o.onCompleted(); } })); return new CompositeDisposable(subscription, timer); }, source); + } + + observableProto.timeout = function () { + var firstArg = arguments[0]; + if (firstArg instanceof Date || typeof firstArg === 'number') { + return timeout(this, firstArg, arguments[1], arguments[2]); + } else if (Observable.isObservable(firstArg) || isFunction(firstArg)) { + return timeoutWithSelector(this, firstArg, arguments[1], arguments[2]); + } else { + throw new Error('Invalid arguments'); + } }; /** @@ -5207,7 +5310,7 @@ * @param {Scheduler} [scheduler] the Scheduler to use internally to manage the timers that handle timeout for each item. If not provided, defaults to Scheduler.timeout. * @returns {Observable} An Observable that performs the throttle operation. */ - observableProto.throttleFirst = function (windowDuration, scheduler) { + observableProto.throttle = function (windowDuration, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); var duration = +windowDuration || 0; if (duration <= 0) { throw new RangeError('windowDuration cannot be less or equal zero.'); } @@ -5293,7 +5396,7 @@ err; function next(x, i) { - values[i] = x + values[i] = x; hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { if (err) { return o.onError(err); } @@ -5345,7 +5448,7 @@ var subscription = combineLatestSource( this.source, - this.pauser.distinctUntilChanged().startWith(false), + this.pauser.startWith(false).distinctUntilChanged(), function (data, shouldFire) { return { data: data, shouldFire: shouldFire }; }) @@ -5415,144 +5518,147 @@ return new PausableBufferedObservable(this, subject); }; - var ControlledObservable = (function (__super__) { +var ControlledObservable = (function (__super__) { - inherits(ControlledObservable, __super__); - - function subscribe (observer) { - return this.source.subscribe(observer); - } - - function ControlledObservable (source, enableQueue, scheduler) { - __super__.call(this, subscribe, source); - this.subject = new ControlledSubject(enableQueue, scheduler); - this.source = source.multicast(this.subject).refCount(); - } + inherits(ControlledObservable, __super__); - ControlledObservable.prototype.request = function (numberOfItems) { - return this.subject.request(numberOfItems == null ? -1 : numberOfItems); - }; + function subscribe (observer) { + return this.source.subscribe(observer); + } - return ControlledObservable; + function ControlledObservable (source, enableQueue, scheduler) { + __super__.call(this, subscribe, source); + this.subject = new ControlledSubject(enableQueue, scheduler); + this.source = source.multicast(this.subject).refCount(); + } - }(Observable)); + ControlledObservable.prototype.request = function (numberOfItems) { + return this.subject.request(numberOfItems == null ? -1 : numberOfItems); + }; - var ControlledSubject = (function (__super__) { + return ControlledObservable; - function subscribe (observer) { - return this.subject.subscribe(observer); - } +}(Observable)); - inherits(ControlledSubject, __super__); +var ControlledSubject = (function (__super__) { - function ControlledSubject(enableQueue, scheduler) { - enableQueue == null && (enableQueue = true); + function subscribe (observer) { + return this.subject.subscribe(observer); + } - __super__.call(this, subscribe); - this.subject = new Subject(); - this.enableQueue = enableQueue; - this.queue = enableQueue ? [] : null; - this.requestedCount = 0; - this.requestedDisposable = disposableEmpty; - this.error = null; - this.hasFailed = false; - this.hasCompleted = false; - this.scheduler = scheduler || currentThreadScheduler; - } + inherits(ControlledSubject, __super__); + + function ControlledSubject(enableQueue, scheduler) { + enableQueue == null && (enableQueue = true); + + __super__.call(this, subscribe); + this.subject = new Subject(); + this.enableQueue = enableQueue; + this.queue = enableQueue ? [] : null; + this.requestedCount = 0; + this.requestedDisposable = null; + this.error = null; + this.hasFailed = false; + this.hasCompleted = false; + this.scheduler = scheduler || currentThreadScheduler; + } - addProperties(ControlledSubject.prototype, Observer, { - onCompleted: function () { - this.hasCompleted = true; - if (!this.enableQueue || this.queue.length === 0) { - this.subject.onCompleted(); - } else { - this.queue.push(Notification.createOnCompleted()); - } - }, - onError: function (error) { - this.hasFailed = true; - this.error = error; - if (!this.enableQueue || this.queue.length === 0) { - this.subject.onError(error); - } else { - this.queue.push(Notification.createOnError(error)); + addProperties(ControlledSubject.prototype, Observer, { + onCompleted: function () { + this.hasCompleted = true; + if (!this.enableQueue || this.queue.length === 0) { + this.subject.onCompleted(); + this.disposeCurrentRequest() + } else { + this.queue.push(Notification.createOnCompleted()); + } + }, + onError: function (error) { + this.hasFailed = true; + this.error = error; + if (!this.enableQueue || this.queue.length === 0) { + this.subject.onError(error); + this.disposeCurrentRequest() + } else { + this.queue.push(Notification.createOnError(error)); + } + }, + onNext: function (value) { + if (this.requestedCount <= 0) { + this.enableQueue && this.queue.push(Notification.createOnNext(value)); + } else { + (this.requestedCount-- === 0) && this.disposeCurrentRequest(); + this.subject.onNext(value); + } + }, + _processRequest: function (numberOfItems) { + if (this.enableQueue) { + while (this.queue.length > 0 && (numberOfItems > 0 || this.queue[0].kind !== 'N')) { + var first = this.queue.shift(); + first.accept(this.subject); + if (first.kind === 'N') { + numberOfItems--; + } else { + this.disposeCurrentRequest(); + this.queue = []; + } } - }, - onNext: function (value) { - var hasRequested = false; + } - if (this.requestedCount === 0) { - this.enableQueue && this.queue.push(Notification.createOnNext(value)); - } else { - (this.requestedCount !== -1 && this.requestedCount-- === 0) && this.disposeCurrentRequest(); - hasRequested = true; - } - hasRequested && this.subject.onNext(value); - }, - _processRequest: function (numberOfItems) { - if (this.enableQueue) { - while ((this.queue.length >= numberOfItems && numberOfItems > 0) || - (this.queue.length > 0 && this.queue[0].kind !== 'N')) { - var first = this.queue.shift(); - first.accept(this.subject); - if (first.kind === 'N') { - numberOfItems--; - } else { - this.disposeCurrentRequest(); - this.queue = []; - } - } + return numberOfItems; + }, + request: function (number) { + this.disposeCurrentRequest(); + var self = this; - return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0}; - } + this.requestedDisposable = this.scheduler.scheduleWithState(number, + function(s, i) { + var remaining = self._processRequest(i); + var stopped = self.hasCompleted || self.hasFailed + if (!stopped && remaining > 0) { + self.requestedCount = remaining; - return { numberOfItems: numberOfItems, returnValue: false }; - }, - request: function (number) { - this.disposeCurrentRequest(); - var self = this; - - this.requestedDisposable = this.scheduler.scheduleWithState(number, - function(s, i) { - var r = self._processRequest(i), remaining = r.numberOfItems; - if (!r.returnValue) { - self.requestedCount = remaining; - self.requestedDisposable = disposableCreate(function () { - self.requestedCount = 0; - }); - } - }); + return disposableCreate(function () { + self.requestedCount = 0; + }); + // Scheduled item is still in progress. Return a new + // disposable to allow the request to be interrupted + // via dispose. + } + }); - return this.requestedDisposable; - }, - disposeCurrentRequest: function () { + return this.requestedDisposable; + }, + disposeCurrentRequest: function () { + if (this.requestedDisposable) { this.requestedDisposable.dispose(); - this.requestedDisposable = disposableEmpty; + this.requestedDisposable = null; } - }); - - return ControlledSubject; - }(Observable)); - - /** - * Attaches a controller to the observable sequence with the ability to queue. - * @example - * var source = Rx.Observable.interval(100).controlled(); - * source.request(3); // Reads 3 values - * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request - * @param {Scheduler} scheduler determines how the requests will be scheduled - * @returns {Observable} The observable sequence which only propagates values on request. - */ - observableProto.controlled = function (enableQueue, scheduler) { - - if (enableQueue && isScheduler(enableQueue)) { - scheduler = enableQueue; - enableQueue = true; } + }); + + return ControlledSubject; +}(Observable)); + +/** + * Attaches a controller to the observable sequence with the ability to queue. + * @example + * var source = Rx.Observable.interval(100).controlled(); + * source.request(3); // Reads 3 values + * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request + * @param {Scheduler} scheduler determines how the requests will be scheduled + * @returns {Observable} The observable sequence which only propagates values on request. + */ +observableProto.controlled = function (enableQueue, scheduler) { + + if (enableQueue && isScheduler(enableQueue)) { + scheduler = enableQueue; + enableQueue = true; + } - if (enableQueue == null) { enableQueue = true; } - return new ControlledObservable(this, enableQueue, scheduler); - }; + if (enableQueue == null) { enableQueue = true; } + return new ControlledObservable(this, enableQueue, scheduler); +}; /** * Pipes the existing Observable sequence into a Node.js Stream. @@ -5612,11 +5718,8 @@ var xform = transducer(transformForObserver(o)); return source.subscribe( function(v) { - try { - xform['@@transducer/step'](o, v); - } catch (e) { - o.onError(e); - } + var res = tryCatch(xform['@@transducer/step']).call(xform, o, v); + if (res === errorObj) { o.onError(res.e); } }, function (e) { o.onError(e); }, function() { xform['@@transducer/result'](o); } @@ -5634,8 +5737,8 @@ } function setDisposable(s, state) { - var ado = state[0], subscribe = state[1]; - var sub = tryCatch(subscribe)(ado); + var ado = state[0], self = state[1]; + var sub = tryCatch(self.__subscribe).call(self, ado); if (sub === errorObj) { if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); } @@ -5643,21 +5746,21 @@ ado.setDisposable(fixSubscriber(sub)); } - function AnonymousObservable(subscribe, parent) { - this.source = parent; - - function s(observer) { - var ado = new AutoDetachObserver(observer), state = [ado, subscribe]; + function innerSubscribe(observer) { + var ado = new AutoDetachObserver(observer), state = [ado, this]; - if (currentThreadScheduler.scheduleRequired()) { - currentThreadScheduler.scheduleWithState(state, setDisposable); - } else { - setDisposable(null, state); - } - return ado; + if (currentThreadScheduler.scheduleRequired()) { + currentThreadScheduler.scheduleWithState(state, setDisposable); + } else { + setDisposable(null, state); } + return ado; + } - __super__.call(this, s); + function AnonymousObservable(subscribe, parent) { + this.source = parent; + this.__subscribe = subscribe; + __super__.call(this, innerSubscribe); } return AnonymousObservable; diff --git a/tools/eslint/node_modules/rx-lite/rx.lite.map b/tools/eslint/node_modules/rx-lite/rx.lite.map new file mode 100644 index 00000000000000..f3dc95d64aa914 --- /dev/null +++ b/tools/eslint/node_modules/rx-lite/rx.lite.map @@ -0,0 +1 @@ +{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","cloneArray","arr","len","length","a","Array","i","tryCatcherGen","tryCatchTarget","apply","this","arguments","e","errorObj","thrower","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","StringIterable","s","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","observer","parent","observableOf","scheduler","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","CatchObserver","falseFactory","argumentsToArray","args","emptyArrayFactory","asObservable","InnerObserver","accumulator","hasSeed","seed","hasAccumulation","accumulation","hasValue","isStopped","plucker","x","currentProp","p","createCbObservable","fn","ctx","selector","AsyncSubject","createCbHandler","results","tryCatch","onError","onNext","onCompleted","createNodeObservable","createNodeHandler","err","ListenDisposable","n","_e","_n","_fn","addEventListener","isDisposed","createEventListener","el","eventName","disposables","CompositeDisposable","elemToString","add","item","eventHandler","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","d","normalizeTime","scheduleRecursiveWithAbsoluteAndState","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayRelative","active","cancelable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayAbsolute","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","start","delay","delays","remove","done","atEnd","dispose","debounce","timeoutScheduler","hasvalue","id","currentId","debounceWithSelector","durationSelector","throttle","isPromise","observableFromPromise","currentid","sampleObservable","sampler","sampleSubscribe","sourceSubscription","newValue","timeoutWithSelector","firstTimeout","timeoutDurationSelector","other","observableNever","observableThrow","TimeoutError","setTimer","timeout","myId","timer","oWins","res","switched","original","schedulerMethod","Date","createTimer","combineLatestSource","subject","resultSelector","next","values","hasValueAll","every","identity","isDone","objectTypes","function","freeExports","exports","nodeType","freeSelf","freeWindow","window","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","defaultNow","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","isFn","longStackSupport","EmptyError","message","name","create","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","isIterable","isArrayLike","supportNodeClass","bindCallback","func","thisArg","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","isArray","isDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","disposableEmpty","empty","checkDisposed","disposable","current","old","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","compareTo","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","innerAction","state2","scheduleWork","_","state3","isAdded","group","invokeRecDate","method","dueTime1","invokeRecDateRelative","invokeRecDateAbsolute","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","scheduleMethod","clearMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_action","_cancel","_scheduler","bind","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","attachEvent","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","observableProto","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","completed","fail","_onNext","_onError","_onCompleted","Observable","makeSubscribe","oldOnError","_subscribe","isObservable","forEach","oOrOnNext","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","FlatMapObservable","_wrapResult","map","i2","fromPromise","from","Enumerable","ConcatEnumerableObservable","currentItem","currentValue","concat","CatchErrorObservable","lastException","catchError","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","ex","RepeatEnumerable","v","c","RepeatEnumerator","l","enumerableRepeat","repeat","repeatCount","OfEnumerable","OfEnumerator","enumerableOf","of","ToArrayObservable","toArray","defer","observableFactory","EmptyObservable","EmptySink","scheduleItem","sink","run","EMPTY_OBSERVABLE","observableEmpty","FromObservable","iterable","mapper","FromSink","loopRecursive","list","pow","charAt","observableFrom","mapFn","observableFromArray","fromArray","NeverObservable","NEVER_OBSERVABLE","never","ofWithScheduler","PairsObservable","keys","pairs","RangeObservable","rangeCount","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","just","ThrowSink","_o","handlerOrSecond","observableCatch","items","combineLatest","filter","j","subscriptions","sad","observableConcat","ConcatObservable","ConcatSink","concatAll","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","mergeAll","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","m","innerSubscription","MergeAllObservable","MergeAllObserver","skipUntil","isOpen","left","rightSubscription","SwitchObservable","SwitchObserver","stopped","latest","hasLatest","switchLatest","TakeUntilObservable","takeUntil","withLatestFrom","allValues","zip","queues","queuedValues","first","zipIterable","dematerialize","DistinctUntilChangedObservable","keyFn","DistinctUntilChangedObserver","hasCurrentKey","currentKey","comparerEquals","distinctUntilChanged","TapObservable","_oN","_oE","_oC","t","tap","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","IgnoreElementsObservable","ignoreElements","retry","retryCount","retryWhen","ScanObservable","scan","skipLast","startWith","takeLast","flatMapConcat","concatMap","MapObservable","innerMap","internalMap","select","selectorFn","pluck","flatMap","selectMany","flatMapLatest","SkipObservable","skipCount","skip","skipWhile","predicate","take","remaining","takeWhile","FilterObservable","innerPredicate","internalFilter","shouldYield","where","fromCallback","fromNodeCallback","removeEventListener","useNativeEvents","fromEvent","element","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","addHandler","removeHandler","innerHandler","returnValue","FromPromiseObservable","promise","toPromise","promiseCtor","resolve","reject","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","share","publishLast","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","windowSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","periodOrScheduler","getTime","sample","throttleLatest","intervalOrSampler","firstArg","windowDuration","duration","RangeError","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","drainQueue","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","disposeCurrentRequest","_processRequest","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","__subscribe","innerSubscribe","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAkDR,QAASC,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAIX,QAASG,GAAcC,GACrB,MAAO,YACL,IACE,MAAOA,GAAeC,MAAMC,KAAMC,WAClC,MAAOC,GAEP,MADAC,IAASD,EAAIA,EACNC,KAQb,QAASC,GAAQF,GACf,KAAMA,GAYR,QAASG,GAAmBC,EAAOC,GAGjC,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG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zB,EAAMi0B,EAAGh0B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIyI,GAAWorB,EAAG7zB,EAClByI,GAAS+C,cACT/C,EAASuY,eAEX5gB,KAAKszB,UAAU7zB,OAAS,IAK1B0P,QAAS,WACPnP,KAAK8L,YAAa,EAClB9L,KAAKszB,UAAY,QAId/D,GACPxP,GAKFnN,IAAGmhB,OAAU,SAAUtU,GAGrB,QAASsU,KACPtU,EAAUtc,KAAKnD,MAajB,MAhBA0V,IAASqe,EAAQtU,GASjBsU,EAAO/vB,UAAU+sB,MAAQ,WAAc/wB,KAAKmL,QAAO,IAKnD4oB,EAAO/vB,UAAUgtB,OAAS,WAAchxB,KAAKmL,QAAO,IAE7C4oB,GACPxR,IAEmB,kBAAVyR,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE1sB,GAAKqL,GAAKA,GAEVohB,OAAO,WACL,MAAOphB,OAEAX,IAAeM,GAEpBE,IACDF,GAAWL,QAAUU,IAAIA,GAAKA,GAE/BX,GAAYW,GAAKA,GAInBrL,GAAKqL,GAAKA,EAIZ,IAAI1Q,IAAcC,MAElBgB,KAAKnD"} \ No newline at end of file diff --git a/tools/eslint/node_modules/rx-lite/rx.lite.min.js b/tools/eslint/node_modules/rx-lite/rx.lite.min.js new file mode 100644 index 00000000000000..ed43db29b0e35d --- /dev/null +++ b/tools/eslint/node_modules/rx-lite/rx.lite.min.js @@ -0,0 +1,5 @@ +/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ +(function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a){return function(){try{return a.apply(this,arguments)}catch(b){return sa.e=b,sa}}}function d(a){throw a}function e(a,b){if(ua&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(ya)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+ya+"\n");a.stack=f(e)}}function f(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];g(f)||h(f)||!f||c.push(f)}return c.join("\n")}function g(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===wa&&d>=xa&&ed>=d}function h(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function i(){if(ua)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return wa=d[0],d[1]}}function j(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function k(a){var b=[];if(!gb(a))return b;fb.nonEnumArgs&&a.length&&hb(a)&&(a=jb.call(a));var c=fb.enumPrototypes&&"function"==typeof a,d=fb.enumErrorProps&&(a===_a||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(fb.nonEnumShadows&&a!==ab){var f=a.constructor,g=-1,h=Na;if(a===(f&&f.prototype))var i=a===bb?Xa:a===_a?Sa:Ya.call(a),j=eb[i];for(;++g-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a){this._s=a}function r(a){this._s=a,this._l=a.length,this._i=0}function s(a){this._a=a}function t(a){this._a=a,this._l=x(a),this._i=0}function u(a){return"number"==typeof a&&ia.isFinite(a)}function v(b){var c,d=b[Ga];if(!d&&"string"==typeof b)return c=new q(b),c[Ga]();if(!d&&b.length!==a)return c=new s(b),c[Ga]();if(!d)throw new TypeError("Object is not iterable");return b[Ga]()}function w(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function x(a){var b=+a.length;return isNaN(b)?0:0!==b&&u(b)?(b=w(b)*Math.floor(Math.abs(b)),0>=b?0:b>gc?gc:b):b}function y(a,b){this.observer=a,this.parent=b}function z(a,b){return yb(a)||(a=Cb),new ic(b,a)}function A(a,b){this.observer=a,this.parent=b}function B(a,b){this.observer=a,this.parent=b}function C(a,b){return new Yc(function(c){var d=new tb,e=new ub;return e.setDisposable(d),d.setDisposable(a.subscribe(new uc(c,e,b))),e},a)}function D(){return!1}function E(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function D(){return!1}function D(){return!1}function F(){return[]}function E(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function D(){return!1}function F(){return[]}function E(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function G(a){return function(b){return a.subscribe(b)}}function H(a,b){this.o=a,this.accumulator=b.accumulator,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.accumulation=null,this.hasValue=!1,this.isStopped=!1}function I(b,c){return function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e}}function J(a,b,c,d){var e=new ad;return d.push(K(e,b,c)),a.apply(b,d),e.asObservable()}function K(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(ra(c)){if(e=ta(c).apply(b,e),e===sa)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function L(a,b,c,d){var e=new ad;return d.push(M(e,b,c)),a.apply(b,d),e.asObservable()}function M(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(ra(c)){var f=ta(c).apply(b,f);if(f===sa)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function N(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function O(a,b,c){var d=new mb,e=Object.prototype.toString.call(a);if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(O(a.item(f),b,c));else a&&d.add(new N(a,b,c));return d}function P(a,b){return function(){var c=arguments[0];return ra(b)&&(c=ta(b).apply(null,arguments),c===sa)?a.onError(c.e):void a.onNext(c)}}function Q(a,b){return new Yc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return new Yc(function(d){var e=a,f=xb(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function S(a,b){return new Yc(function(c){return b.scheduleWithRelative(xb(a),function(){c.onNext(0),c.onCompleted()})})}function T(a,b,c){return a===b?new Yc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):ac(function(){return R(c.now()+a,b,c)})}function U(a,b,c){return new Yc(function(d){var e,f=!1,g=new ub,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new tb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new mb(e,g)},a)}function V(a,b,c){return ac(function(){return U(a,b-c.now(),c)})}function W(a,b,c){var d,e;return ra(b)?e=b:(d=b,e=c),new Yc(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=ta(e)(a);if(c===sa)return b.onError(c.e);var d=new tb;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new mb,h=!1,i=new ub;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new mb(i,g)},this)}function X(a,b,c){return yb(c)||(c=Hb),new Yc(function(d){var e,f=new ub,g=!1,h=0,i=a.subscribe(function(a){g=!0,e=a,h++;var i=h,j=new tb;f.setDisposable(j),j.setDisposable(c.scheduleWithRelative(b,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new mb(i,f)},this)}function Y(a,b){return new Yc(function(c){var d,e=!1,f=new ub,g=0,h=a.subscribe(function(a){var h=ta(b)(a);if(h===sa)return c.onError(h.e);qa(h)&&(h=Qc(h)),e=!0,d=a,g++;var i=g,j=new tb;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new mb(h,f)},a)}function Z(a,b){return new Yc(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new tb;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new mb(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}function $(a,b,c,d){return ra(b)&&(d=c,c=b,b=mc()),d||(d=tc(new Tc)),new Yc(function(e){function f(a){var b=k,c=new tb;i.setDisposable(c),c.setDisposable(a.subscribe(function(){k===b&&h.setDisposable(d.subscribe(e)),c.dispose()},function(a){k===b&&e.onError(a)},function(){k===b&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new ub,i=new ub,j=new tb;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=ta(c)(a);if(b===sa)return e.onError(b.e);f(qa(b)?Qc(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new mb(h,i)},a)}function _(a,b,c,d){if(null==c)throw new Error("other or scheduler must be specified");yb(c)&&(d=c,c=tc(new Tc)),c instanceof Error&&(c=tc(c)),yb(d)||(d=Hb);var e=b instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Yc(function(f){function g(){var a=h;l.setDisposable(d[e](b,function(){h===a&&(qa(c)&&(c=Qc(c)),j.setDisposable(c.subscribe(f)))}))}var h=0,i=new tb,j=new ub,k=!1,l=new ub;return j.setDisposable(i),g(),i.setDisposable(a.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new mb(j,l)},a)}function aa(a,b,c){return new Yc(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(la))){if(f)return d.onError(f);var e=ta(c).apply(null,j);if(e===sa)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new mb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var ba={"function":!0,object:!0},ca=ba[typeof exports]&&exports&&!exports.nodeType&&exports,da=ba[typeof self]&&self.Object&&self,ea=ba[typeof window]&&window&&window.Object&&window,fa=ba[typeof module]&&module&&!module.nodeType&&module,ga=fa&&fa.exports===ca&&ca,ha=ca&&fa&&"object"==typeof global&&global&&global.Object&&global,ia=ia=ha||ea!==(this&&this.window)&&ea||da||this,ja={internals:{},config:{Promise:ia.Promise},helpers:{}},ka=ja.helpers.noop=function(){},la=ja.helpers.identity=function(a){return a},ma=ja.helpers.defaultNow=Date.now,na=ja.helpers.defaultComparer=function(a,b){return ib(a,b)},oa=ja.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},pa=(ja.helpers.defaultKeySerializer=function(a){return a.toString()},ja.helpers.defaultError=function(a){throw a}),qa=ja.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ra=ja.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ya.call(a)}),a}(),sa={e:{}},ta=ja.internals.tryCatch=function(a){if(!ra(a))throw new TypeError("fn must be a function");return c(a)};ja.config.longStackSupport=!1;var ua=!1,va=ta(function(){throw new Error})();ua=!!va.e&&!!va.e.stack;var wa,xa=i(),ya="From previous event:",za=ja.EmptyError=function(){this.message="Sequence contains no elements.",this.name="EmptyError",Error.call(this)};za.prototype=Object.create(Error.prototype);var Aa=ja.ObjectDisposedError=function(){this.message="Object has been disposed",this.name="ObjectDisposedError",Error.call(this)};Aa.prototype=Object.create(Error.prototype);var Ba=ja.ArgumentOutOfRangeError=function(){this.message="Argument out of range",this.name="ArgumentOutOfRangeError",Error.call(this)};Ba.prototype=Object.create(Error.prototype);var Ca=ja.NotSupportedError=function(a){this.message=a||"This operation is not supported",this.name="NotSupportedError",Error.call(this)};Ca.prototype=Object.create(Error.prototype);var Da=ja.NotImplementedError=function(a){this.message=a||"This operation is not implemented",this.name="NotImplementedError",Error.call(this)};Da.prototype=Object.create(Error.prototype);var Ea=ja.helpers.notImplemented=function(){throw new Da},Fa=ja.helpers.notSupported=function(){throw new Ca},Ga="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";ia.Set&&"function"==typeof(new ia.Set)["@@iterator"]&&(Ga="@@iterator");var Ha=ja.doneEnumerator={done:!0,value:a},Ia=ja.helpers.isIterable=function(b){return b[Ga]!==a},Ja=ja.helpers.isArrayLike=function(b){return b&&b.length!==a};ja.helpers.iterator=Ga;var Ka,La=ja.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Ma=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Na=Ma.length,Oa="[object Arguments]",Pa="[object Array]",Qa="[object Boolean]",Ra="[object Date]",Sa="[object Error]",Ta="[object Function]",Ua="[object Number]",Va="[object Object]",Wa="[object RegExp]",Xa="[object String]",Ya=Object.prototype.toString,Za=Object.prototype.hasOwnProperty,$a=Ya.call(arguments)==Oa,_a=Error.prototype,ab=Object.prototype,bb=String.prototype,cb=ab.propertyIsEnumerable;try{Ka=!(Ya.call(document)==Va&&!({toString:0}+""))}catch(db){Ka=!0}var eb={};eb[Pa]=eb[Ra]=eb[Ua]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},eb[Qa]=eb[Xa]={constructor:!0,toString:!0,valueOf:!0},eb[Sa]=eb[Ta]=eb[Wa]={constructor:!0,toString:!0},eb[Va]={constructor:!0};var fb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);fb.enumErrorProps=cb.call(_a,"message")||cb.call(_a,"name"),fb.enumPrototypes=cb.call(a,"prototype"),fb.nonEnumArgs=0!=c,fb.nonEnumShadows=!/valueOf/.test(b)}(1);var gb=ja.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},hb=function(a){return a&&"object"==typeof a?Ya.call(a)==Oa:!1};$a||(hb=function(a){return a&&"object"==typeof a?Za.call(a,"callee"):!1});var ib=ja.internals.isEqual=function(a,b){return o(a,b,[],[])},jb=({}.hasOwnProperty,Array.prototype.slice),kb=ja.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},lb=ja.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},mb=(ja.internals.addRef=function(a,b){return new Yc(function(c){return new mb(b.getDisposable(),a.subscribe(c))})},ja.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!rb(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length}),nb=mb.prototype;nb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},nb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},nb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var ob=ja.Disposable=function(a){this.isDisposed=!1,this.action=a||ka};ob.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var pb=ob.create=function(a){return new ob(a)},qb=ob.empty={dispose:ka},rb=ob.isDisposable=function(a){return a&&ra(a.dispose)},sb=ob.checkDisposed=function(a){if(a.isDisposed)throw new Aa},tb=ja.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};tb.prototype.getDisposable=function(){return this.current},tb.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},tb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var ub=ja.SerialDisposable=function(){this.isDisposed=!1,this.current=null};ub.prototype.getDisposable=function(){return this.current},ub.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},ub.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var vb=(ja.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?qb:new a(this)},b}(),ja.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||oa,this.disposable=new tb});vb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},vb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},vb.prototype.isCancelled=function(){return this.disposable.isDisposed},vb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var wb=ja.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),qb}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=ma,a.normalize=function(a){return 0>a&&(a=0),a},a}(),xb=wb.normalize,yb=wb.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),qb}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new mb;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),qb}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new mb;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(wb.prototype),function(a){wb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},wb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof ia.setInterval)throw new Ca;b=xb(b);var d=a,e=ia.setInterval(function(){d=c(d)},b);return pb(function(){ia.clearInterval(e)})}}(wb.prototype);var zb,Ab,Bb=wb.immediate=function(){function a(a,b){return b(this,a)}return new wb(ma,a,Fa,Fa)}(),Cb=wb.currentThread=function(){function a(){for(;c.length>0;){var a=c.shift();!a.isCancelled()&&a.invoke()}}function b(b,e){var f=new vb(this,b,e,this.now());if(c)c.push(f);else{c=[f];var g=ta(a)();if(c=null,g===sa)return d(g.e)}return f.disposable}var c,e=new wb(ma,b,Fa,Fa);return e.scheduleRequired=function(){return!c},e}(),Db=(ja.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new tb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),function(){var a,b=ka;if(ia.setTimeout)a=ia.setTimeout,b=ia.clearTimeout;else{if(!ia.WScript)throw new Ca;a=function(a,b){ia.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Eb=Db.setTimeout,Fb=Db.clearTimeout;!function(){function a(b){if(g)Eb(function(){a(b)},0);else{var c=f[b];if(c){g=!0;var e=ta(c)();if(Ab(b),g=!1,e===sa)return d(e.e)}}}function b(){if(!ia.postMessage||ia.importScripts)return!1;var a=!1,b=ia.onmessage;return ia.onmessage=function(){a=!0},ia.postMessage("","*"),ia.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,j.length)===j&&a(b.data.substring(j.length))}var e=1,f={},g=!1;Ab=function(a){delete f[a]};var h=RegExp("^"+String(Ya).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),i="function"==typeof(i=ha&&ga&&ha.setImmediate)&&!h.test(i)&&i;if(ra(i))zb=function(b){var c=e++;return f[c]=b,i(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))zb=function(b){var c=e++;return f[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var j="ms.rx.schedule"+Math.random();ia.addEventListener?ia.addEventListener("message",c,!1):ia.attachEvent?ia.attachEvent("onmessage",c):ia.onmessage=c,zb=function(a){var b=e++;return f[b]=a,ia.postMessage(j+currentId,"*"),b}}else if(ia.MessageChannel){var k=new ia.MessageChannel;k.port1.onmessage=function(b){a(b.data)},zb=function(a){var b=e++;return f[b]=a,k.port2.postMessage(b),b}}else zb="document"in ia&&"onreadystatechange"in ia.document.createElement("script")?function(b){var c=ia.document.createElement("script"),d=e++;return f[d]=b,c.onreadystatechange=function(){a(d),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},ia.document.documentElement.appendChild(c),d}:function(b){var c=e++;return f[c]=b,Eb(function(){a(c)},0),c}}();var Gb,Hb=wb.timeout=wb["default"]=function(){function a(a,b){var c=this,d=new tb,e=zb(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new mb(d,pb(function(){Ab(e)}))}function b(a,b,c){var d=this,e=wb.normalize(b),f=new tb;if(0===e)return d.scheduleWithState(a,c);var g=Eb(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new mb(f,pb(function(){Fb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new wb(ma,a,b,c)}(),Ib=ja.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return yb(a)||(a=Bb),new Yc(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Jb=Ib.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new Ib("N",d,null,a,b,c)}}(),Kb=Ib.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new Ib("E",null,d,a,b,c)}}(),Lb=Ib.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new Ib("C",null,null,a,b,c)}}(),Mb=ja.Observer=function(){},Nb=Mb.create=function(a,b,c){return a||(a=ka),b||(b=pa),c||(c=ka),new Pb(a,b,c)},Ob=ja.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return kb(b,a),b.prototype.next=Ea,b.prototype.error=Ea,b.prototype.completed=Ea,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Mb),Pb=ja.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return kb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Ob),Qb=ja.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){e(b,a),d.call(c,b)},b.call(a,c)}}function b(b){if(ja.config.longStackSupport&&ua){var c=ta(d)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return Gb=b.prototype,b.isObservable=function(a){return a&&ra(a.subscribe)},Gb.subscribe=Gb.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Nb(a,b,c))},Gb.subscribeOnNext=function(a,b){return this._subscribe(Nb("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Gb.subscribeOnError=function(a,b){return this._subscribe(Nb(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Gb.subscribeOnCompleted=function(a,b){return this._subscribe(Nb(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),Rb=ja.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new ub}return kb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var e=ta(c)();return e===sa?(a.queue=[],a.hasFaulted=!0,d(e.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Ob),Sb=ja.ObservableBase=function(a){function b(a){return a&&ra(a.dispose)?a:ra(a)?pb(a):qb}function c(a,c){var e=c[0],f=c[1],g=ta(f.subscribeCore).call(f,e);return g!==sa||e.fail(sa.e)?void e.setDisposable(b(g)):d(sa.e)}function e(a){var b=new Zc(a),d=[b,this];return Cb.scheduleRequired()?Cb.scheduleWithState(d,c):c(null,d),b}function f(){a.call(this,e)}return kb(f,a),f.prototype.subscribeCore=Ea,f}(Qb),Tb=function(a){function b(b,c,d,e){this.resultSelector=ja.helpers.isFunction(d)?d:null,this.selector=ja.internals.bindCallback(ja.helpers.isFunction(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.isStopped=!1,this.o=a}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.onNext=function(a){if(!this.isStopped){var b=this.i++,c=ta(this.selector)(a,b,this.source);if(c===sa)return this.o.onError(c.e);ja.helpers.isPromise(c)&&(c=ja.Observable.fromPromise(c)),(ja.helpers.isArrayLike(c)||ja.helpers.isIterable(c))&&(c=ja.Observable.from(c)),this.o.onNext(this._wrapResult(c,a,b))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},b}(Sb),Ub=ja.internals.Enumerable=function(){},Vb=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b,c){this.o=a,this.s=b,this.e=c,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){var b,d=new ub,e=Bb.scheduleRecursiveWithState(this.sources[Ga](),function(e,f){if(!b){var g=ta(e.next).call(e);if(g===sa)return a.onError(g.e);if(g.done)return a.onCompleted();var h=g.value;qa(h)&&(h=Qc(h));var i=new tb;d.setDisposable(i),i.setDisposable(h.subscribe(new c(a,f,e)))}});return new mb(d,e,pb(function(){b=!0}))},c.prototype.onNext=function(a){this.isStopped||this.o.onNext(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.s(this.e))},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Ub.prototype.concat=function(){return new Vb(this)};var Wb=function(a){function b(b){this.sources=b,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){var b,c=this.sources[Ga](),d=new ub,e=Bb.scheduleRecursiveWithState(null,function(e,f){if(!b){var g=ta(c.next).call(c);if(g===sa)return a.onError(g.e);if(g.done)return null!==e?a.onError(e):a.onCompleted();var h=g.value;qa(h)&&(h=Qc(h));var i=new tb;d.setDisposable(i),i.setDisposable(h.subscribe(function(b){a.onNext(b)},f,function(){a.onCompleted()}))}});return new mb(d,e,pb(function(){b=!0}))},b}(Sb);Ub.prototype.catchError=function(){return new Wb(this)},Ub.prototype.catchErrorWhen=function(a){var b=this;return new Yc(function(c){var d,e,f=new _c,g=new _c,h=a(f),i=h.subscribe(g),j=b[Ga](),k=new ub,l=Bb.scheduleRecursive(function(a){if(!d){var b=ta(j.next).call(j);if(b===sa)return c.onError(b.e);if(b.done)return void(e?c.onError(e):c.onCompleted());var h=b.value;qa(h)&&(h=Qc(h));var i=new tb,l=new tb;k.setDisposable(new mb(l,i)),i.setDisposable(h.subscribe(function(a){c.onNext(a)},function(b){l.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new mb(i,k,l,pb(function(){d=!0}))})};var Xb=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return kb(b,a),b.prototype[Ga]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Ha:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(Ub),Yb=Ub.repeat=function(a,b){return new Xb(a,b)},Zb=function(a){function b(a,b,c){this.s=a,this.fn=b?La(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return kb(b,a),b.prototype[Ga]=function(){return new c(this)},c.prototype.next=function(){return++this.ia?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var jc=Qb.fromArray=function(a,b){return yb(b)||(b=Cb),new ic(a,b)},kc=function(a){function b(){a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){return qb},b}(Sb),lc=new kc,mc=Qb.never=function(){return lc};Qb.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new ic(b,Cb)},Qb.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new ic(c,a)};var nc=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new A(a,this);return b.run()},b}(Sb);A.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Qb.pairs=function(a,b){return b||(b=Cb),new nc(a,b)};var oc=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new pc(a,this);return b.run()},b}(Sb),pc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.rangeCount,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Qb.range=function(a,b,c){return yb(c)||(c=Cb),new oc(a,b,c)};var qc=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new B(a,this);return b.run()},b}(Sb);B.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Qb.repeat=function(a,b,c){return yb(c)||(c=Cb),new qc(a,b,c)};var rc=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b,c){this.observer=a,this.value=b,this.scheduler=c}function d(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),qb}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.value,this.scheduler);return b.run()},c.prototype.run=function(){var a=[this.value,this.observer];return this.scheduler===Bb?d(null,a):this.scheduler.scheduleWithState(a,d)},b}(Sb),sc=(Qb["return"]=Qb.just=function(a,b){return yb(b)||(b=Bb),new rc(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],d)},b}(Sb)),tc=Qb["throw"]=function(a,b){return yb(b)||(b=Bb),new sc(a,b)},uc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return kb(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=ta(this._fn)(a);if(b===sa)return this._o.onError(b.e);qa(b)&&(b=Qc(b));var c=new tb;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(Ob);Gb["catch"]=function(a){return ra(a)?C(this,a):vc([this,a])};var vc=Qb["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return $b(a).catchError()};Gb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),wc.apply(this,b)};var wc=Qb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ra(b[a-1])?b.pop():E;return Array.isArray(b[0])&&(b=b[0]),new Yc(function(a){function c(b){if(g[b]=!0,h||(h=g.every(la))){try{var c=d.apply(null,j)}catch(e){return a.onError(e)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(la)&&a.onCompleted()}function e(b){i[b]=!0,i.every(la)&&a.onCompleted()}for(var f=b.length,g=p(f,D),h=!1,i=p(f,D),j=new Array(f),k=new Array(f),l=0;f>l;l++)!function(d){var f=b[d],g=new tb;qa(f)&&(f=Qc(f)),g.setDisposable(f.subscribe(function(a){j[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),k[d]=g}(l);return new mb(k)},this)};Gb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),yc.apply(null,a)};var xc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new ub,c=this.sources,d=c.length,e=this.o,f=Bb.scheduleRecursiveWithState(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];qa(h)&&(h=Qc(h));var i=new tb;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new mb(b,f,pb(function(){a=!0}))},b}(Sb),yc=Qb.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new xc(a)};Gb.concatAll=function(){return this.merge(1)};var zc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new mb;return b.add(this.source.subscribe(new Ac(a,this.maxConcurrent,b))),b},b}(Sb),Ac=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new tb;this.g.add(c),qa(a)&&(a=Qc(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Gb.merge=function(a){return"number"!=typeof a?Bc(this,a):new zc(this,a)};var Bc=Qb.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(yb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Bb,b=0;d>b;b++)c.push(arguments[b]);else for(a=Bb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),z(a,c).mergeAll()},Cc=ja.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Cc.prototype=Error.prototype,Qb.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=z(null,a);return new Yc(function(a){function b(){0===g.length?a.onCompleted():1===g.length?a.onError(g[0]):a.onError(new Cc(g))}var c=new mb,e=new tb,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new tb;c.add(e),qa(d)&&(d=Qc(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})};var Dc=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new mb,d=new tb;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype.onNext=function(a){if(!this.isStopped){var b=new tb;this.g.add(b),qa(a)&&(a=Qc(a)),b.setDisposable(a.subscribe(new d(this,b)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},d.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Sb);Gb.mergeAll=function(){return new Dc(this)},Gb.skipUntil=function(a){var b=this;return new Yc(function(c){var d=!1,e=new mb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));qa(a)&&(a=Qc(a));var f=new tb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)};var Ec=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,this.isStopped=!1}function d(a,b){this.parent=a,this.id=b,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,d=this.source.subscribe(new c(a,b));return new mb(d,b)},c.prototype.onNext=function(a){if(!this.isStopped){var b=new tb,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),qa(a)&&(a=Qc(a)),b.setDisposable(a.subscribe(new d(this,c)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.stopped=!0,!this.hasLatest&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&this.parent.o.onError(a))},d.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.isStopped&&this.parent.o.onCompleted()))},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Sb);Gb["switch"]=Gb.switchLatest=function(){return new Ec(this)};var Fc=function(a){function b(b,c){this.source=b,this.other=qa(c)?Qc(c):c,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){return new mb(this.source.subscribe(a),this.other.subscribe(new c(a)))},c.prototype.onNext=function(a){this.isStopped||this.o.onCompleted()},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){!this.isStopped&&(this.isStopped=!0)},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Gb.takeUntil=function(a){return new Fc(this,a)},Gb.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;return Array.isArray(b[0])&&(b=b[0]),new Yc(function(a){for(var c=b.length,f=p(c,D),g=!1,h=new Array(c),i=new Array(c+1),j=0;c>j;j++)!function(c){var d=b[c],e=new tb;qa(d)&&(d=Qc(d)),e.setDisposable(d.subscribe(function(a){h[c]=a,f[c]=!0,g=f.every(la)},function(b){a.onError(b)},ka)),i[c]=e}(j);var k=new tb;return k.setDisposable(e.subscribe(function(b){var c=[b].concat(h);if(g){var e=ta(d).apply(null,c);return e===sa?a.onError(e.e):void a.onNext(e)}},function(b){a.onError(b)},function(){a.onCompleted()})),i[c]=k,new mb(i)},this)},Gb.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ra(b[a-1])?b.pop():E;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new Yc(function(a){for(var c=b.length,f=p(c,F),g=p(c,D),h=new Array(c),i=0;c>i;i++)!function(c){var i=b[c],j=new tb;qa(i)&&(i=Qc(i)),j.setDisposable(i.subscribe(function(b){if(f[c].push(b),f.every(function(a){return a.length>0})){var h=f.map(function(a){return a.shift()}),i=ta(d).apply(e,h);if(i===sa)return a.onError(i.e);a.onNext(i)}else g.filter(function(a,b){return b!==c}).every(la)&&a.onCompleted()},function(b){a.onError(b)},function(){g[c]=!0,g.every(la)&&a.onCompleted()})),h[c]=j}(i);return new mb(h)},e)},Qb.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ra(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)},Gb.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ra(b[a-1])?b.pop():E,e=this;return b.unshift(e),new Yc(function(a){for(var c=b.length,f=p(c,F),g=p(c,D),h=new Array(c),i=0;c>i;i++)!function(c){var i=b[c],j=new tb;(Ja(i)||Ia(i))&&(i=hc(i)),j.setDisposable(i.subscribe(function(b){if(f[c].push(b),f.every(function(a){return a.length>0})){var h=f.map(function(a){return a.shift()}),i=ta(d).apply(e,h);if(i===sa)return a.onError(i.e);a.onNext(i)}else g.filter(function(a,b){return b!==c}).every(la)&&a.onCompleted()},function(b){a.onError(b)},function(){g[c]=!0,g.every(la)&&a.onCompleted()})),h[c]=j}(i);return new mb(h)},e)},Gb.asObservable=function(){return new Yc(G(this),this)},Gb.dematerialize=function(){var a=this;return new Yc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)};var Gc=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Hc(a,this.keyFn,this.comparer))},b}(Sb),Hc=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return kb(b,a),b.prototype.next=function(a){var b,c=a;return ra(this.keyFn)&&(c=ta(this.keyFn)(a),c===sa)?this.o.onError(c.e):this.hasCurrentKey&&(b=ta(this.comparer)(this.currentKey,c),b===sa)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(Ob);Gb.distinctUntilChanged=function(a,b){return b||(b=na),new Gc(this,a,b)};var Ic=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ra(b._oN)?Nb(b._oN||ka,b._oE||ka,b._oC||ka):b._oN,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype.onNext=function(a){if(!this.isStopped){var b=ta(this.t.onNext).call(this.t,a);b===sa&&this.o.onError(b.e),this.o.onNext(a)}},c.prototype.onError=function(a){if(!this.isStopped){this.isStopped=!0;var b=ta(this.t.onError).call(this.t,a);if(b===sa)return this.o.onError(b.e);this.o.onError(a)}},c.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=ta(this.t.onCompleted).call(this.t);if(a===sa)return this.o.onError(a.e);this.o.onCompleted()}},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Gb["do"]=Gb.tap=Gb.doAction=function(a,b,c){return new Ic(this,a,b,c)},Gb.doOnNext=Gb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Gb.doOnError=Gb.tapOnError=function(a,b){return this.tap(ka,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Gb.doOnCompleted=Gb.tapOnCompleted=function(a,b){return this.tap(ka,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Gb["finally"]=function(a){var b=this;return new Yc(function(c){var e=ta(b.subscribe).call(b,c);return e===sa?(a(),d(e.e)):pb(function(){var b=ta(e.dispose).call(e);a(),b===sa&&d(b.e)})},this)};var Jc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=ka,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(Sb);Gb.ignoreElements=function(){return new Jc(this)},Gb.materialize=function(){var a=this;return new Yc(function(b){return a.subscribe(function(a){b.onNext(Jb(a))},function(a){b.onNext(Kb(a)),b.onCompleted()},function(){b.onNext(Lb()),b.onCompleted()})},a)},Gb.repeat=function(a){return Yb(this,a).concat()},Gb.retry=function(a){return Yb(this,a).catchError()},Gb.retryWhen=function(a){return Yb(this).catchErrorWhen(a)};var Kc=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new H(a,this))},b}(Sb);H.prototype={onNext:function(a){return this.isStopped?void 0:(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.accumulation=ta(this.accumulator)(this.accumulation,a):(this.accumulation=this.hasSeed?ta(this.accumulator)(this.seed,a):a,this.hasAccumulation=!0),this.accumulation===sa?this.o.onError(this.accumulation.e):void this.o.onNext(this.accumulation))},onError:function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},onCompleted:function(){this.isStopped||(this.isStopped=!0,!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),this.o.onCompleted())},dispose:function(){this.isStopped=!0},fail:function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)}},Gb.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Kc(this,c,b,a)},Gb.skipLast=function(a){if(0>a)throw new Ba;var b=this;return new Yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Gb.startWith=function(){var a,b=0;arguments.length&&yb(arguments[0])?(a=arguments[0],b=1):a=Bb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return $b([jc(c,a),this]).concat()},Gb.takeLast=function(a){if(0>a)throw new Ba;var b=this;return new Yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Gb.flatMapConcat=Gb.concatMap=function(a,b,c){return new Tb(this,a,b,c).merge(1)};var Lc=function(a){function b(b,c,d){this.source=b,this.selector=La(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}return kb(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},d.prototype.onNext=function(a){if(!this.isStopped){var b=ta(this.selector)(a,this.i++,this.source);return b===sa?this.o.onError(b.e):void this.o.onNext(b)}},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},d.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Gb.map=Gb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Lc?this.internalMap(c,b):new Lc(this,c,b)},Gb.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(I(b,a))},Gb.flatMap=Gb.selectMany=function(a,b,c){return new Tb(this,a,b,c).mergeAll()},ja.Observable.prototype.flatMapLatest=function(a,b,c){return new Tb(this,a,b,c).switchLatest()};var Mc=function(a){function b(b,c){this.source=b,this.skipCount=c,a.call(this)}function c(a,b){this.c=b,this.r=b,this.o=a,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.skipCount))},c.prototype.onNext=function(a){this.isStopped||(this.r<=0?this.o.onNext(a):this.r--)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Gb.skip=function(a){if(0>a)throw new Ba;return new Mc(this,a)},Gb.skipWhile=function(a,b){var c=this,d=La(a,b,3);return new Yc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Gb.take=function(a,b){if(0>a)throw new Ba;if(0===a)return dc(b);var c=this;return new Yc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0>=d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Gb.takeWhile=function(a,b){var c=this,d=La(a,b,3);return new Yc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Nc=function(a){function b(b,c,d){this.source=b,this.predicate=La(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}return kb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},d.prototype.onNext=function(a){if(!this.isStopped){var b=ta(this.predicate)(a,this.i++,this.source);return b===sa?this.o.onError(b.e):void(b&&this.o.onNext(a))}},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},d.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Sb);Gb.filter=Gb.where=function(a,b){return this instanceof Nc?this.internalFilter(a,b):new Nc(this,a,b)},Qb.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return J(a,b,c,e)}},Qb.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return L(a,b,c,e)}},N.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},ja.config.useNativeEvents=!1,Qb.fromEvent=function(a,b,c){return a.addListener?Oc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ja.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Yc(function(d){return O(a,b,P(d,c))}).publish().refCount():Oc(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Oc=Qb.fromEventPattern=function(a,b,c,d){return yb(d)||(d=Bb),new Yc(function(d){function e(){var a=arguments[0];return ra(c)&&(a=ta(c).apply(null,arguments),a===sa)?d.onError(a.e):void d.onNext(a)}var f=a(e);return pb(function(){ra(b)&&b(e,f)})}).publish().refCount()},Pc=function(a){function b(b){this.p=b,a.call(this)}return kb(b,a),b.prototype.subscribeCore=function(a){return this.p.then(function(b){a.onNext(b),a.onCompleted()},function(b){a.onError(b)}),qb},b}(Sb),Qc=Qb.fromPromise=function(a){return new Pc(a)};Gb.toPromise=function(a){if(a||(a=ja.config.Promise),!a)throw new Ca("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Qb.startAsync=function(a){var b;try{b=a()}catch(c){return tc(c)}return Qc(b)},Gb.multicast=function(a,b){var c=this;return"function"==typeof a?new Yc(function(d){var e=c.multicast(a());return new mb(b(e).subscribe(d),e.connect())},c):new Rc(c,a)},Gb.publish=function(a){return a&&ra(a)?this.multicast(function(){return new _c},a):this.multicast(new _c)},Gb.share=function(){return this.publish().refCount()},Gb.publishLast=function(a){return a&&ra(a)?this.multicast(function(){return new ad},a):this.multicast(new ad)},Gb.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new cd(b)},a):this.multicast(new cd(a))},Gb.shareValue=function(a){return this.publishValue(a).refCount()},Gb.replay=function(a,b,c,d){return a&&ra(a)?this.multicast(function(){return new dd(b,c,d)},a):this.multicast(new dd(b,c,d))},Gb.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Rc=ja.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new mb(f.subscribe(c),pb(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return kb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Yc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Qb),Sc=Qb.interval=function(a,b){return T(a,a,yb(b)?b:Hb)};Qb.timer=function(b,c,d){var e;return yb(d)||(d=Hb),null!=c&&"number"==typeof c?e=c:yb(c)&&(d=c),b instanceof Date&&e===a?Q(b.getTime(),d):b instanceof Date&&e!==a?R(b.getTime(),c,d):e===a?S(b,d):T(b,e,d)};Gb.delay=function(){if("number"==typeof arguments[0]||arguments[0]instanceof Date){var a=arguments[0],b=arguments[1];return yb(b)||(b=Hb),a instanceof Date?V(this,a,b):U(this,a,b)}if(ra(arguments[0]))return W(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},Gb.debounce=function(){if(ra(arguments[0]))return Y(this,arguments[0]);if("number"==typeof arguments[0])return X(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},Gb.timestamp=function(a){return yb(a)||(a=Hb),this.map(function(b){return{value:b,timestamp:a.now()}})},Gb.sample=Gb.throttleLatest=function(a,b){return yb(b)||(b=Hb),"number"==typeof a?Z(this,Sc(a,b)):Z(this,a)};var Tc=ja.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};Tc.prototype=Object.create(Error.prototype),Gb.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return _(this,a,arguments[1],arguments[2]);if(Qb.isObservable(a)||ra(a))return $(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},Gb.throttle=function(a,b){yb(b)||(b=Hb);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Yc(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var Uc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=qb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=qb)});return new mb(c,d,e)}function c(c,d){this.source=c,this.controller=new _c,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,a.call(this,b,c)}return kb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Qb);Gb.pausable=function(a){return new Uc(this,a)};var Vc=function(b){function c(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=aa(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){ +d!==a&&f.shouldFire!=d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f}function d(a,d){this.source=a,this.controller=new _c,d&&d.subscribe?this.pauser=this.controller.merge(d):this.pauser=this.controller,b.call(this,c,a)}return kb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Qb);Gb.pausableBuffered=function(a){return new Vc(this,a)};var Wc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new Xc(d,e),this.source=c.multicast(this.subject).refCount()}return kb(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(Qb),Xc=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new _c,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||Cb}return kb(c,a),lb(c.prototype,Mb,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Ib.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Ib.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(Ib.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,pb(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),c}(Qb);Gb.controlled=function(a,b){return a&&yb(a)&&(b=a,a=!0),null==a&&(a=!0),new Wc(this,a,b)},Gb.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},Gb.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Yc(function(d){var e=a(b(d));return c.subscribe(function(a){var b=ta(e["@@transducer/step"]).call(e,d,a);b===sa&&d.onError(b.e)},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)};var Yc=ja.AnonymousObservable=function(a){function b(a){return a&&ra(a.dispose)?a:ra(a)?pb(a):qb}function c(a,c){var e=c[0],f=c[1],g=ta(f.__subscribe).call(f,e);return g!==sa||e.fail(sa.e)?void e.setDisposable(b(g)):d(sa.e)}function e(a){var b=new Zc(a),d=[b,this];return Cb.scheduleRequired()?Cb.scheduleWithState(d,c):c(null,d),b}function f(b,c){this.source=c,this.__subscribe=b,a.call(this,e)}return kb(f,a),f}(Qb),Zc=function(a){function b(b){a.call(this),this.observer=b,this.m=new tb}kb(b,a);var c=b.prototype;return c.next=function(a){var b=ta(this.observer.onNext).call(this.observer,a);b===sa&&(this.dispose(),d(b.e))},c.error=function(a){var b=ta(this.observer.onError).call(this.observer,a);this.dispose(),b===sa&&d(b.e)},c.completed=function(){var a=ta(this.observer.onCompleted).call(this.observer);this.dispose(),a===sa&&d(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Ob),$c=function(a,b){this.subject=a,this.observer=b};$c.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var _c=ja.Subject=function(a){function c(a){return sb(this),this.isStopped?this.hasError?(a.onError(this.error),qb):(a.onCompleted(),qb):(this.observers.push(a),new $c(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return kb(d,a),lb(d.prototype,Mb.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(sb(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(sb(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new bd(a,b)},d}(Qb),ad=ja.AsyncSubject=function(a){function c(a){return sb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),qb):(this.observers.push(a),new $c(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return kb(d,a),lb(d.prototype,Mb,{hasObservers:function(){return sb(this),this.observers.length>0},onCompleted:function(){var a,c;if(sb(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){sb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Qb),bd=ja.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return kb(c,a),lb(c.prototype,Mb.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Qb),cd=ja.BehaviorSubject=function(a){function c(a){return sb(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),qb):(this.observers.push(a),a.onNext(this.value),new $c(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return kb(d,a),lb(d.prototype,Mb,{getValue:function(){if(sb(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(sb(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(sb(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Qb),dd=ja.ReplaySubject=function(a){function c(a,b){return pb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new Rb(this.scheduler,a),d=c(this,b);sb(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||Cb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return kb(e,a),lb(e.prototype,Mb.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(sb(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(sb(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Qb);ja.Pauser=function(a){function b(){a.call(this)}return kb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(_c),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ia.Rx=ja,define(function(){return ja})):ca&&fa?ga?(fa.exports=ja).Rx=ja:ca.Rx=ja:ia.Rx=ja;var ed=i()}).call(this); +//# sourceMappingURL=rx.lite.map \ No newline at end of file diff --git a/tools/eslint/node_modules/shelljs/.documentup.json b/tools/eslint/node_modules/shelljs/.documentup.json new file mode 100644 index 00000000000000..57fe30116b7659 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/.documentup.json @@ -0,0 +1,6 @@ +{ + "name": "ShellJS", + "twitter": [ + "r2r" + ] +} diff --git a/tools/eslint/node_modules/shelljs/LICENSE b/tools/eslint/node_modules/shelljs/LICENSE new file mode 100644 index 00000000000000..fb35c092f1a8a7 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +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 Artur Adib nor the + names of the 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 ARTUR ADIB 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/tools/eslint/node_modules/shelljs/README.md b/tools/eslint/node_modules/shelljs/README.md new file mode 100644 index 00000000000000..d08d13e8b06eb5 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/README.md @@ -0,0 +1,579 @@ +# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) + +ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! + +The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: + ++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader ++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger ++ [JSHint](http://jshint.com) - Most popular JavaScript linter ++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers ++ [Yeoman](http://yeoman.io/) - Web application stack and development tool ++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation + +and [many more](https://npmjs.org/browse/depended/shelljs). + +Connect with [@r2r](http://twitter.com/r2r) on Twitter for questions, suggestions, etc. + +## Installing + +Via npm: + +```bash +$ npm install [-g] shelljs +``` + +If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to +run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: + +```bash +$ shjs my_script +``` + +You can also just copy `shell.js` into your project's directory, and `require()` accordingly. + + +## Examples + +### JavaScript + +```javascript +require('shelljs/global'); + +if (!which('git')) { + echo('Sorry, this script requires git'); + exit(1); +} + +// Copy files to release dir +mkdir('-p', 'out/Release'); +cp('-R', 'stuff/*', 'out/Release'); + +// Replace macros in each .js file +cd('lib'); +ls('*.js').forEach(function(file) { + sed('-i', 'BUILD_VERSION', 'v0.1.2', file); + sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); + sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); +}); +cd('..'); + +// Run external tool synchronously +if (exec('git commit -am "Auto-commit"').code !== 0) { + echo('Error: Git commit failed'); + exit(1); +} +``` + +### CoffeeScript + +```coffeescript +require 'shelljs/global' + +if not which 'git' + echo 'Sorry, this script requires git' + exit 1 + +# Copy files to release dir +mkdir '-p', 'out/Release' +cp '-R', 'stuff/*', 'out/Release' + +# Replace macros in each .js file +cd 'lib' +for file in ls '*.js' + sed '-i', 'BUILD_VERSION', 'v0.1.2', file + sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file + sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file +cd '..' + +# Run external tool synchronously +if (exec 'git commit -am "Auto-commit"').code != 0 + echo 'Error: Git commit failed' + exit 1 +``` + +## Global vs. Local + +The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. + +Example: + +```javascript +var shell = require('shelljs'); +shell.echo('hello world'); +``` + +## Make tool + +A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. + +Example (CoffeeScript): + +```coffeescript +require 'shelljs/make' + +target.all = -> + target.bundle() + target.docs() + +target.bundle = -> + cd __dirname + mkdir 'build' + cd 'lib' + (cat '*.js').to '../build/output.js' + +target.docs = -> + cd __dirname + mkdir 'docs' + cd 'lib' + for file in ls '*.js' + text = grep '//@', file # extract special comments + text.replace '//@', '' # remove comment tags + text.to 'docs/my_docs.md' +``` + +To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`. + +You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`: + +```javascript +require('shelljs/make'); + +target.bundle = function(argsArray) { + // argsArray = ['arg1', 'arg2'] + /* ... */ +} +``` + + + + + +## Command reference + + +All commands run synchronously, unless otherwise stated. + + +### cd('dir') +Changes to directory `dir` for the duration of the script + + +### pwd() +Returns the current directory. + + +### ls([options ,] path [,path ...]) +### ls([options ,] path_array) +Available options: + ++ `-R`: recursive ++ `-A`: all files (include files beginning with `.`, except for `.` and `..`) + +Examples: + +```javascript +ls('projs/*.js'); +ls('-R', '/users/me', '/tmp'); +ls('-R', ['/users/me', '/tmp']); // same as above +``` + +Returns array of files in the given path, or in current directory if no path provided. + + +### find(path [,path ...]) +### find(path_array) +Examples: + +```javascript +find('src', 'lib'); +find(['src', 'lib']); // same as above +find('.').filter(function(file) { return file.match(/\.js$/); }); +``` + +Returns array of all files (however deep) in the given paths. + +The main difference from `ls('-R', path)` is that the resulting file names +include the base directories, e.g. `lib/resources/file1` instead of just `file1`. + + +### cp([options ,] source [,source ...], dest) +### cp([options ,] source_array, dest) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +cp('file1', 'dir1'); +cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +``` + +Copies files. The wildcard `*` is accepted. + + +### rm([options ,] file [, file ...]) +### rm([options ,] file_array) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +rm('-rf', '/tmp/*'); +rm('some_file.txt', 'another_file.txt'); +rm(['some_file.txt', 'another_file.txt']); // same as above +``` + +Removes files. The wildcard `*` is accepted. + + +### mv(source [, source ...], dest') +### mv(source_array, dest') +Available options: + ++ `f`: force + +Examples: + +```javascript +mv('-f', 'file', 'dir/'); +mv('file1', 'file2', 'dir/'); +mv(['file1', 'file2'], 'dir/'); // same as above +``` + +Moves files. The wildcard `*` is accepted. + + +### mkdir([options ,] dir [, dir ...]) +### mkdir([options ,] dir_array) +Available options: + ++ `p`: full path (will create intermediate dirs if necessary) + +Examples: + +```javascript +mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +``` + +Creates directories. + + +### test(expression) +Available expression primaries: + ++ `'-b', 'path'`: true if path is a block device ++ `'-c', 'path'`: true if path is a character device ++ `'-d', 'path'`: true if path is a directory ++ `'-e', 'path'`: true if path exists ++ `'-f', 'path'`: true if path is a regular file ++ `'-L', 'path'`: true if path is a symbolic link ++ `'-p', 'path'`: true if path is a pipe (FIFO) ++ `'-S', 'path'`: true if path is a socket + +Examples: + +```javascript +if (test('-d', path)) { /* do something with dir */ }; +if (!test('-f', path)) continue; // skip if it's a regular file +``` + +Evaluates expression using the available primaries and returns corresponding value. + + +### cat(file [, file ...]) +### cat(file_array) + +Examples: + +```javascript +var str = cat('file*.txt'); +var str = cat('file1', 'file2'); +var str = cat(['file1', 'file2']); // same as above +``` + +Returns a string containing the given file, or a concatenated string +containing the files if more than one file is given (a new line character is +introduced between each file). Wildcard `*` accepted. + + +### 'string'.to(file) + +Examples: + +```javascript +cat('input.txt').to('output.txt'); +``` + +Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ + + +### 'string'.toEnd(file) + +Examples: + +```javascript +cat('input.txt').toEnd('output.txt'); +``` + +Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). + + +### sed([options ,] search_regex, replacement, file) +Available options: + ++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ + +Examples: + +```javascript +sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +``` + +Reads an input string from `file` and performs a JavaScript `replace()` on the input +using the given search regex and replacement string or function. Returns the new string after replacement. + + +### grep([options ,] regex_filter, file [, file ...]) +### grep([options ,] regex_filter, file_array) +Available options: + ++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. + +Examples: + +```javascript +grep('-v', 'GLOBAL_VARIABLE', '*.js'); +grep('GLOBAL_VARIABLE', '*.js'); +``` + +Reads input string from given files and returns a string containing all lines of the +file that match the given `regex_filter`. Wildcard `*` accepted. + + +### which(command) + +Examples: + +```javascript +var nodeExec = which('node'); +``` + +Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +Returns string containing the absolute path to the command. + + +### echo(string [,string ...]) + +Examples: + +```javascript +echo('hello world'); +var str = echo('hello world'); +``` + +Prints string to stdout, and returns string with additional utility methods +like `.to()`. + + +### pushd([options,] [dir | '-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. + +Arguments: + ++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. ++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. ++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + +Examples: + +```javascript +// process.cwd() === '/usr' +pushd('/etc'); // Returns /etc /usr +pushd('+1'); // Returns /usr /etc +``` + +Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + +### popd([options,] ['-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. + +Arguments: + ++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. ++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + +Examples: + +```javascript +echo(process.cwd()); // '/usr' +pushd('/etc'); // '/etc /usr' +echo(process.cwd()); // '/etc' +popd(); // '/usr' +echo(process.cwd()); // '/usr' +``` + +When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + +### dirs([options | '+N' | '-N']) + +Available options: + ++ `-c`: Clears the directory stack by deleting all of the elements. + +Arguments: + ++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. ++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. + +Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + +See also: pushd, popd + + +### ln(options, source, dest) +### ln(source, dest) +Available options: + ++ `s`: symlink ++ `f`: force + +Examples: + +```javascript +ln('file', 'newlink'); +ln('-sf', 'file', 'existing'); +``` + +Links source to dest. Use -f to force the link, should dest already exist. + + +### exit(code) +Exits the current process with the given exit code. + +### env['VAR_NAME'] +Object containing environment variables (both getter and setter). Shortcut to process.env. + +### exec(command [, options] [, callback]) +Available options (all `false` by default): + ++ `async`: Asynchronous execution. Defaults to true if a callback is provided. ++ `silent`: Do not echo program output to console. + +Examples: + +```javascript +var version = exec('node --version', {silent:true}).output; + +var child = exec('some_long_running_process', {async:true}); +child.stdout.on('data', function(data) { + /* ... do something with data ... */ +}); + +exec('some_long_running_process', function(code, output) { + console.log('Exit code:', code); + console.log('Program output:', output); +}); +``` + +Executes the given `command` _synchronously_, unless otherwise specified. +When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +the `callback` gets the arguments `(code, output)`. + +**Note:** For long-lived processes, it's best to run `exec()` asynchronously as +the current synchronous implementation uses a lot of CPU. This should be getting +fixed soon. + + +### chmod(octal_mode || octal_string, file) +### chmod(symbolic_mode, file) + +Available options: + ++ `-v`: output a diagnostic for every file processed ++ `-c`: like verbose but report only when a change is made ++ `-R`: change files and directories recursively + +Examples: + +```javascript +chmod(755, '/Users/brandon'); +chmod('755', '/Users/brandon'); // same as above +chmod('u+x', '/Users/brandon'); +``` + +Alters the permissions of a file or directory by either specifying the +absolute permissions in octal form or expressing the changes in symbols. +This command tries to mimic the POSIX behavior as much as possible. +Notable exceptions: + ++ In symbolic modes, 'a-r' and '-r' are identical. No consideration is + given to the umask. ++ There is no "quiet" option since default behavior is to run silent. + + +## Non-Unix commands + + +### tempdir() + +Examples: + +```javascript +var tmp = tempdir(); // "/tmp" for most *nix platforms +``` + +Searches and returns string containing a writeable, platform-dependent temporary directory. +Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). + + +### error() +Tests if error occurred in the last command. Returns `null` if no error occurred, +otherwise returns string explaining the error + + +## Configuration + + +### config.silent +Example: + +```javascript +var sh = require('shelljs'); +var silentState = sh.config.silent; // save old silent state +sh.config.silent = true; +/* ... */ +sh.config.silent = silentState; // restore old silent state +``` + +Suppresses all command output if `true`, except for `echo()` calls. +Default is `false`. + +### config.fatal +Example: + +```javascript +require('shelljs/global'); +config.fatal = true; +cp('this_file_does_not_exist', '/dev/null'); // dies here +/* more commands... */ +``` + +If `true` the script will die on errors. Default is `false`. diff --git a/tools/eslint/node_modules/shelljs/RELEASE.md b/tools/eslint/node_modules/shelljs/RELEASE.md new file mode 100644 index 00000000000000..69ef3fbb0a7832 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/RELEASE.md @@ -0,0 +1,9 @@ +# Release steps + +* Ensure master passes CI tests +* Bump version in package.json. Any breaking change or new feature should bump minor (or even major). Non-breaking changes or fixes can just bump patch. +* Update README manually if the changes are not documented in-code. If so, run `scripts/generate-docs.js` +* Commit +* `$ git tag ` (see `git tag -l` for latest) +* `$ git push origin master --tags` +* `$ npm publish .` diff --git a/tools/eslint/node_modules/shelljs/bin/shjs b/tools/eslint/node_modules/shelljs/bin/shjs new file mode 100755 index 00000000000000..d239a7ad4b987a --- /dev/null +++ b/tools/eslint/node_modules/shelljs/bin/shjs @@ -0,0 +1,51 @@ +#!/usr/bin/env node +require('../global'); + +if (process.argv.length < 3) { + console.log('ShellJS: missing argument (script name)'); + console.log(); + process.exit(1); +} + +var args, + scriptName = process.argv[2]; +env['NODE_PATH'] = __dirname + '/../..'; + +if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { + if (test('-f', scriptName + '.js')) + scriptName += '.js'; + if (test('-f', scriptName + '.coffee')) + scriptName += '.coffee'; +} + +if (!test('-f', scriptName)) { + console.log('ShellJS: script not found ('+scriptName+')'); + console.log(); + process.exit(1); +} + +args = process.argv.slice(3); + +for (var i = 0, l = args.length; i < l; i++) { + if (args[i][0] !== "-"){ + args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words + } +} + +if (scriptName.match(/\.coffee$/)) { + // + // CoffeeScript + // + if (which('coffee')) { + exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); + } else { + console.log('ShellJS: CoffeeScript interpreter not found'); + console.log(); + process.exit(1); + } +} else { + // + // JavaScript + // + exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); +} diff --git a/tools/eslint/node_modules/shelljs/global.js b/tools/eslint/node_modules/shelljs/global.js new file mode 100644 index 00000000000000..97f0033cc15303 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/global.js @@ -0,0 +1,3 @@ +var shell = require('./shell.js'); +for (var cmd in shell) + global[cmd] = shell[cmd]; diff --git a/tools/eslint/node_modules/shelljs/make.js b/tools/eslint/node_modules/shelljs/make.js new file mode 100644 index 00000000000000..f78b4cfd4237e9 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/make.js @@ -0,0 +1,56 @@ +require('./global'); + +global.config.fatal = true; +global.target = {}; + +var args = process.argv.slice(2), + targetArgs, + dashesLoc = args.indexOf('--'); + +// split args, everything after -- if only for targets +if (dashesLoc > -1) { + targetArgs = args.slice(dashesLoc + 1, args.length); + args = args.slice(0, dashesLoc); +} + +// This ensures we only execute the script targets after the entire script has +// been evaluated +setTimeout(function() { + var t; + + if (args.length === 1 && args[0] === '--help') { + console.log('Available targets:'); + for (t in global.target) + console.log(' ' + t); + return; + } + + // Wrap targets to prevent duplicate execution + for (t in global.target) { + (function(t, oldTarget){ + + // Wrap it + global.target[t] = function() { + if (oldTarget.done) + return; + oldTarget.done = true; + return oldTarget.apply(oldTarget, arguments); + }; + + })(t, global.target[t]); + } + + // Execute desired targets + if (args.length > 0) { + args.forEach(function(arg) { + if (arg in global.target) + global.target[arg](targetArgs); + else { + console.log('no such target: ' + arg); + } + }); + } else if ('all' in global.target) { + global.target.all(targetArgs); + } + +}, 0); diff --git a/tools/eslint/node_modules/shelljs/package.json b/tools/eslint/node_modules/shelljs/package.json new file mode 100644 index 00000000000000..a884367b97a9d9 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "shelljs@^0.5.3", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "shelljs@>=0.5.3 <0.6.0", + "_id": "shelljs@0.5.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/shelljs", + "_nodeVersion": "1.2.0", + "_npmUser": { + "email": "arturadib@gmail.com", + "name": "artur" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "shelljs", + "raw": "shelljs@^0.5.3", + "rawSpec": "^0.5.3", + "scope": null, + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "_shrinkwrap": null, + "_spec": "shelljs@^0.5.3", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "arturadib@gmail.com", + "name": "Artur Adib" + }, + "bin": { + "shjs": "./bin/shjs" + }, + "bugs": { + "url": "https://github.com/arturadib/shelljs/issues" + }, + "dependencies": {}, + "description": "Portable Unix shell commands for Node.js", + "devDependencies": { + "jshint": "~2.1.11" + }, + "directories": {}, + "dist": { + "shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "tarball": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "22d0975040b9b8234755dc6e692d6869436e8485", + "homepage": "http://github.com/arturadib/shelljs", + "keywords": [ + "jake", + "make", + "makefile", + "shell", + "synchronous", + "unix" + ], + "license": "BSD*", + "main": "./shell.js", + "maintainers": [ + { + "name": "artur", + "email": "arturadib@gmail.com" + } + ], + "name": "shelljs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/arturadib/shelljs.git" + }, + "scripts": { + "test": "node scripts/run-tests" + }, + "version": "0.5.3" +} diff --git a/tools/eslint/node_modules/shelljs/scripts/generate-docs.js b/tools/eslint/node_modules/shelljs/scripts/generate-docs.js new file mode 100755 index 00000000000000..532fed9f090caa --- /dev/null +++ b/tools/eslint/node_modules/shelljs/scripts/generate-docs.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node +require('../global'); + +echo('Appending docs to README.md'); + +cd(__dirname + '/..'); + +// Extract docs from shell.js +var docs = grep('//@', 'shell.js'); + +docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { + var file = path.match('.js$') ? path : path+'.js'; + return grep('//@', file); +}); + +// Remove '//@' +docs = docs.replace(/\/\/\@ ?/g, ''); +// Append docs to README +sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); + +echo('All done.'); diff --git a/tools/eslint/node_modules/shelljs/scripts/run-tests.js b/tools/eslint/node_modules/shelljs/scripts/run-tests.js new file mode 100755 index 00000000000000..f9d31e06892bab --- /dev/null +++ b/tools/eslint/node_modules/shelljs/scripts/run-tests.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node +require('../global'); + +var path = require('path'); + +var failed = false; + +// +// Lint +// +JSHINT_BIN = './node_modules/jshint/bin/jshint'; +cd(__dirname + '/..'); + +if (!test('-f', JSHINT_BIN)) { + echo('JSHint not found. Run `npm install` in the root dir first.'); + exit(1); +} + +if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { + failed = true; + echo('*** JSHINT FAILED! (return code != 0)'); + echo(); +} else { + echo('All JSHint tests passed'); + echo(); +} + +// +// Unit tests +// +cd(__dirname + '/../test'); +ls('*.js').forEach(function(file) { + echo('Running test:', file); + if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) + failed = true; + echo('*** TEST FAILED! (missing exit code "123")'); + echo(); + } +}); + +if (failed) { + echo(); + echo('*******************************************************'); + echo('WARNING: Some tests did not pass!'); + echo('*******************************************************'); + exit(1); +} else { + echo(); + echo('All tests passed.'); +} diff --git a/tools/eslint/node_modules/shelljs/shell.js b/tools/eslint/node_modules/shelljs/shell.js new file mode 100644 index 00000000000000..bdeb5597249678 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/shell.js @@ -0,0 +1,159 @@ +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/arturadib/shelljs +// + +var common = require('./src/common'); + + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ + +//@include ./src/cd +var _cd = require('./src/cd'); +exports.cd = common.wrap('cd', _cd); + +//@include ./src/pwd +var _pwd = require('./src/pwd'); +exports.pwd = common.wrap('pwd', _pwd); + +//@include ./src/ls +var _ls = require('./src/ls'); +exports.ls = common.wrap('ls', _ls); + +//@include ./src/find +var _find = require('./src/find'); +exports.find = common.wrap('find', _find); + +//@include ./src/cp +var _cp = require('./src/cp'); +exports.cp = common.wrap('cp', _cp); + +//@include ./src/rm +var _rm = require('./src/rm'); +exports.rm = common.wrap('rm', _rm); + +//@include ./src/mv +var _mv = require('./src/mv'); +exports.mv = common.wrap('mv', _mv); + +//@include ./src/mkdir +var _mkdir = require('./src/mkdir'); +exports.mkdir = common.wrap('mkdir', _mkdir); + +//@include ./src/test +var _test = require('./src/test'); +exports.test = common.wrap('test', _test); + +//@include ./src/cat +var _cat = require('./src/cat'); +exports.cat = common.wrap('cat', _cat); + +//@include ./src/to +var _to = require('./src/to'); +String.prototype.to = common.wrap('to', _to); + +//@include ./src/toEnd +var _toEnd = require('./src/toEnd'); +String.prototype.toEnd = common.wrap('toEnd', _toEnd); + +//@include ./src/sed +var _sed = require('./src/sed'); +exports.sed = common.wrap('sed', _sed); + +//@include ./src/grep +var _grep = require('./src/grep'); +exports.grep = common.wrap('grep', _grep); + +//@include ./src/which +var _which = require('./src/which'); +exports.which = common.wrap('which', _which); + +//@include ./src/echo +var _echo = require('./src/echo'); +exports.echo = _echo; // don't common.wrap() as it could parse '-options' + +//@include ./src/dirs +var _dirs = require('./src/dirs').dirs; +exports.dirs = common.wrap("dirs", _dirs); +var _pushd = require('./src/dirs').pushd; +exports.pushd = common.wrap('pushd', _pushd); +var _popd = require('./src/dirs').popd; +exports.popd = common.wrap("popd", _popd); + +//@include ./src/ln +var _ln = require('./src/ln'); +exports.ln = common.wrap('ln', _ln); + +//@ +//@ ### exit(code) +//@ Exits the current process with the given exit code. +exports.exit = process.exit; + +//@ +//@ ### env['VAR_NAME'] +//@ Object containing environment variables (both getter and setter). Shortcut to process.env. +exports.env = process.env; + +//@include ./src/exec +var _exec = require('./src/exec'); +exports.exec = common.wrap('exec', _exec, {notUnix:true}); + +//@include ./src/chmod +var _chmod = require('./src/chmod'); +exports.chmod = common.wrap('chmod', _chmod); + + + +//@ +//@ ## Non-Unix commands +//@ + +//@include ./src/tempdir +var _tempDir = require('./src/tempdir'); +exports.tempdir = common.wrap('tempdir', _tempDir); + + +//@include ./src/error +var _error = require('./src/error'); +exports.error = _error; + + + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ Example: +//@ +//@ ```javascript +//@ var sh = require('shelljs'); +//@ var silentState = sh.config.silent; // save old silent state +//@ sh.config.silent = true; +//@ /* ... */ +//@ sh.config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ Example: +//@ +//@ ```javascript +//@ require('shelljs/global'); +//@ config.fatal = true; +//@ cp('this_file_does_not_exist', '/dev/null'); // dies here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true` the script will die on errors. Default is `false`. diff --git a/tools/eslint/node_modules/shelljs/src/cat.js b/tools/eslint/node_modules/shelljs/src/cat.js new file mode 100644 index 00000000000000..f6f4d254ae2cbd --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/cat.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### cat(file [, file ...]) +//@ ### cat(file_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). Wildcard `*` accepted. +function _cat(options, files) { + var cat = ''; + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + cat += fs.readFileSync(file, 'utf8') + '\n'; + }); + + if (cat[cat.length-1] === '\n') + cat = cat.substring(0, cat.length-1); + + return common.ShellString(cat); +} +module.exports = _cat; diff --git a/tools/eslint/node_modules/shelljs/src/cd.js b/tools/eslint/node_modules/shelljs/src/cd.js new file mode 100644 index 00000000000000..230f432651e84b --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/cd.js @@ -0,0 +1,19 @@ +var fs = require('fs'); +var common = require('./common'); + +//@ +//@ ### cd('dir') +//@ Changes to directory `dir` for the duration of the script +function _cd(options, dir) { + if (!dir) + common.error('directory not specified'); + + if (!fs.existsSync(dir)) + common.error('no such file or directory: ' + dir); + + if (!fs.statSync(dir).isDirectory()) + common.error('not a directory: ' + dir); + + process.chdir(dir); +} +module.exports = _cd; diff --git a/tools/eslint/node_modules/shelljs/src/chmod.js b/tools/eslint/node_modules/shelljs/src/chmod.js new file mode 100644 index 00000000000000..f2888930b35079 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/chmod.js @@ -0,0 +1,208 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +var PERMS = (function (base) { + return { + OTHER_EXEC : base.EXEC, + OTHER_WRITE : base.WRITE, + OTHER_READ : base.READ, + + GROUP_EXEC : base.EXEC << 3, + GROUP_WRITE : base.WRITE << 3, + GROUP_READ : base.READ << 3, + + OWNER_EXEC : base.EXEC << 6, + OWNER_WRITE : base.WRITE << 6, + OWNER_READ : base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is + // the preferred way, else a jshint warning is thrown. + STICKY : parseInt('01000', 8), + SETGID : parseInt('02000', 8), + SETUID : parseInt('04000', 8), + + TYPE_MASK : parseInt('0770000', 8) + }; +})({ + EXEC : 1, + WRITE : 2, + READ : 4 +}); + +//@ +//@ ### chmod(octal_mode || octal_string, file) +//@ ### chmod(symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is +//@ given to the umask. +//@ + There is no "quiet" option since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + filePattern = mode; + mode = options; + options = ''; + } + else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose' + }); + + if (typeof filePattern === 'string') { + filePattern = [ filePattern ]; + } + + var files; + + if (options.recursive) { + files = []; + common.expand(filePattern).forEach(function addFile(expandedFile) { + var stat = fs.lstatSync(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } + else { + files = common.expand(filePattern); + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { + return; + } + + var perms = fs.statSync(file).mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + /*jshint regexdash:true */ + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') != -1; + var changeWrite = change.indexOf('w') != -1; + var changeExec = change.indexOf('x') != -1; + var changeSticky = change.indexOf('t') != -1; + var changeSetuid = change.indexOf('s') != -1; + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + } + + if (options.verbose) { + log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms != newPerms) { + if (!options.verbose && options.changes) { + log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + } + } + else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } + else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); +} +module.exports = _chmod; diff --git a/tools/eslint/node_modules/shelljs/src/common.js b/tools/eslint/node_modules/shelljs/src/common.js new file mode 100644 index 00000000000000..8d10f3dde7281a --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/common.js @@ -0,0 +1,203 @@ +var os = require('os'); +var fs = require('fs'); +var _ls = require('./ls'); + +// Module globals +var config = { + silent: false, + fatal: false +}; +exports.config = config; + +var state = { + error: null, + currentCmd: 'shell.js', + tempDir: null +}; +exports.state = state; + +var platform = os.type().match(/^Win/) ? 'win' : 'unix'; +exports.platform = platform; + +function log() { + if (!config.silent) + console.log.apply(this, arguments); +} +exports.log = log; + +// Shows error message. Throws unless _continue or config.fatal are true +function error(msg, _continue) { + if (state.error === null) + state.error = ''; + state.error += state.currentCmd + ': ' + msg + '\n'; + + if (msg.length > 0) + log(state.error); + + if (config.fatal) + process.exit(1); + + if (!_continue) + throw ''; +} +exports.error = error; + +// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. +// For now, this is a dummy function to bookmark places we need such strings +function ShellString(str) { + return str; +} +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +function parseOptions(str, map) { + if (!map) + error('parseOptions() internal error: no map given'); + + // All options are false by default + var options = {}; + for (var letter in map) + options[map[letter]] = false; + + if (!str) + return options; // defaults + + if (typeof str !== 'string') + error('parseOptions() internal error: wrong str'); + + // e.g. match[1] = 'Rf' for str = '-Rf' + var match = str.match(/^\-(.+)/); + if (!match) + return options; + + // e.g. chars = ['R', 'f'] + var chars = match[1].split(''); + + chars.forEach(function(c) { + if (c in map) + options[map[c]] = true; + else + error('option not recognized: '+c); + }); + + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + var expanded = []; + list.forEach(function(listEl) { + // Wildcard present on directory names ? + if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) { + var match = listEl.match(/^([^*]+\/|)(.*)/); + var root = match[1]; + var rest = match[2]; + var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*"); + restRegex = new RegExp(restRegex); + + _ls('-R', root).filter(function (e) { + return restRegex.test(e); + }).forEach(function(file) { + expanded.push(file); + }); + } + // Wildcard present on file names ? + else if (listEl.search(/\*/) > -1) { + _ls('', listEl).forEach(function(file) { + expanded.push(file); + }); + } else { + expanded.push(listEl); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch(e) { + // Try to override file permission + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) + return parseInt(16*Math.random(), 10).toString(16); + else { + var hash = ''; + for (var i=0; i and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + if (options.recursive) { + // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" + // (see Github issue #15) + sources.forEach(function(src, i) { + if (src[src.length - 1] === '/') + sources[i] += '*'; + }); + + // Create dest + try { + fs.mkdirSync(dest, parseInt('0777', 8)); + } catch (e) { + // like Unix's cp, keep going even if we can't create dest dir + } + } + + sources = common.expand(sources); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + if (fs.statSync(src).isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.log(src + ' is a directory (not copied)'); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = path.join(dest, path.basename(src)), + checkDir = fs.statSync(src); + try { + fs.mkdirSync(newDest, checkDir.mode); + } catch (e) { + //if the directory already exists, that's okay + if (e.code !== 'EEXIST') { + common.error('dest file no such file or directory: ' + newDest, true); + throw e; + } + } + + cpdirSyncRecursive(src, newDest, {force: options.force}); + } + return; // done with dir + } + + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + copyFileSync(src, thisDest); + }); // forEach(src) +} +module.exports = _cp; diff --git a/tools/eslint/node_modules/shelljs/src/dirs.js b/tools/eslint/node_modules/shelljs/src/dirs.js new file mode 100644 index 00000000000000..58fae8b3c6fae3 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/dirs.js @@ -0,0 +1,191 @@ +var common = require('./common'); +var _cd = require('./cd'); +var path = require('path'); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } else { + common.error(index + ': directory stack index out of range'); + } + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(''); +} +exports.pushd = _pushd; + +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(''); +} +exports.popd = _popd; + +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. +//@ +//@ See also: pushd, popd +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c' : 'clear' + }); + + if (options['clear']) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + common.log(stack[index]); + return stack[index]; + } + + common.log(stack.join(' ')); + + return stack; +} +exports.dirs = _dirs; diff --git a/tools/eslint/node_modules/shelljs/src/echo.js b/tools/eslint/node_modules/shelljs/src/echo.js new file mode 100644 index 00000000000000..760ea840f07218 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/echo.js @@ -0,0 +1,20 @@ +var common = require('./common'); + +//@ +//@ ### echo(string [,string ...]) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ ``` +//@ +//@ Prints string to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo() { + var messages = [].slice.call(arguments, 0); + console.log.apply(this, messages); + return common.ShellString(messages.join(' ')); +} +module.exports = _echo; diff --git a/tools/eslint/node_modules/shelljs/src/error.js b/tools/eslint/node_modules/shelljs/src/error.js new file mode 100644 index 00000000000000..cca3efb608d0dc --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/error.js @@ -0,0 +1,10 @@ +var common = require('./common'); + +//@ +//@ ### error() +//@ Tests if error occurred in the last command. Returns `null` if no error occurred, +//@ otherwise returns string explaining the error +function error() { + return common.state.error; +}; +module.exports = error; diff --git a/tools/eslint/node_modules/shelljs/src/exec.js b/tools/eslint/node_modules/shelljs/src/exec.js new file mode 100644 index 00000000000000..d259a9f26c8341 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/exec.js @@ -0,0 +1,216 @@ +var common = require('./common'); +var _tempDir = require('./tempdir'); +var _pwd = require('./pwd'); +var path = require('path'); +var fs = require('fs'); +var child = require('child_process'); + +// Hack to run child_process.exec() synchronously (sync avoids callback hell) +// Uses a custom wait loop that checks for a flag file, created when the child process is done. +// (Can't do a wait loop that checks for internal Node variables/messages as +// Node is single-threaded; callbacks and other internal state changes are done in the +// event loop). +function execSync(cmd, opts) { + var tempDir = _tempDir(); + var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), + codeFile = path.resolve(tempDir+'/'+common.randomFileName()), + scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), + sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var previousStdoutContent = ''; + // Echoes stdout changes from running process, if not silent + function updateStdout() { + if (options.silent || !fs.existsSync(stdoutFile)) + return; + + var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); + // No changes since last time? + if (stdoutContent.length <= previousStdoutContent.length) + return; + + process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); + previousStdoutContent = stdoutContent; + } + + function escape(str) { + return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); + } + + if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); + + var execCommand = '"'+process.execPath+'" '+scriptFile; + var execOptions = { + env: process.env, + cwd: _pwd(), + maxBuffer: 20*1024*1024 + }; + + if (typeof child.execSync === 'function') { + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});", + "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');", + "childProcess.stdout.pipe(stdoutStream, {end: false});", + "childProcess.stderr.pipe(stdoutStream, {end: false});", + "childProcess.stdout.pipe(process.stdout);", + "childProcess.stderr.pipe(process.stderr);", + "var stdoutEnded = false, stderrEnded = false;", + "function tryClosing(){ if(stdoutEnded && stderrEnded){ stdoutStream.end(); } }", + "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosing(); });", + "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosing(); });" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + if (options.silent) { + execOptions.stdio = 'ignore'; + } else { + execOptions.stdio = [0, 1, 2]; + } + + // Welcome to the future + child.execSync(execCommand, execOptions); + } else { + cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix + + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + child.exec(execCommand, execOptions); + + // The wait loop + // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage + // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing + // CPU usage, though apparently not so much on Windows) + while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + } + + // At this point codeFile exists, but it's not necessarily flushed yet. + // Keep reading it until it is. + var code = parseInt('', 10); + while (isNaN(code)) { + code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); + } + + var stdout = fs.readFileSync(stdoutFile, 'utf8'); + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + try { common.unlinkSync(scriptFile); } catch(e) {} + try { common.unlinkSync(stdoutFile); } catch(e) {} + try { common.unlinkSync(codeFile); } catch(e) {} + try { common.unlinkSync(sleepFile); } catch(e) {} + + // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html + if (code === 1 || code === 2 || code >= 126) { + common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes + } + // True if successful, false if not + var obj = { + code: code, + output: stdout + }; + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, callback) { + var output = ''; + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { + if (callback) + callback(err ? err.code : 0, output); + }); + + c.stdout.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + c.stderr.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ Available options (all `false` by default): +//@ +//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. +//@ + `silent`: Do not echo program output to console. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).output; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, output) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', output); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. +//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +//@ the `callback` gets the arguments `(code, output)`. +//@ +//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as +//@ the current synchronous implementation uses a lot of CPU. This should be getting +//@ fixed soon. +function _exec(command, options, callback) { + if (!command) + common.error('must specify command'); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false + }, options); + + if (options.async) + return execAsync(command, options, callback); + else + return execSync(command, options); +} +module.exports = _exec; diff --git a/tools/eslint/node_modules/shelljs/src/find.js b/tools/eslint/node_modules/shelljs/src/find.js new file mode 100644 index 00000000000000..d9eeec26a93b67 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/find.js @@ -0,0 +1,51 @@ +var fs = require('fs'); +var common = require('./common'); +var _ls = require('./ls'); + +//@ +//@ ### find(path [,path ...]) +//@ ### find(path_array) +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. +function _find(options, paths) { + if (!paths) + common.error('no path specified'); + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + function pushFile(file) { + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + list.push(file); + } + + // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory + + paths.forEach(function(file) { + pushFile(file); + + if (fs.statSync(file).isDirectory()) { + _ls('-RA', file+'/*').forEach(function(subfile) { + pushFile(subfile); + }); + } + }); + + return list; +} +module.exports = _find; diff --git a/tools/eslint/node_modules/shelljs/src/grep.js b/tools/eslint/node_modules/shelljs/src/grep.js new file mode 100644 index 00000000000000..00c7d6a4068435 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/grep.js @@ -0,0 +1,52 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### grep([options ,] regex_filter, file [, file ...]) +//@ ### grep([options ,] regex_filter, file_array) +//@ Available options: +//@ +//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. Wildcard `*` accepted. +function _grep(options, regex, files) { + options = common.parseOptions(options, { + 'v': 'inverse' + }); + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 2); + // if it's array leave it as it is + + files = common.expand(files); + + var grep = ''; + files.forEach(function(file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, true); + return; + } + + var contents = fs.readFileSync(file, 'utf8'), + lines = contents.split(/\r*\n/); + lines.forEach(function(line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) + grep += line + '\n'; + }); + }); + + return common.ShellString(grep); +} +module.exports = _grep; diff --git a/tools/eslint/node_modules/shelljs/src/ln.js b/tools/eslint/node_modules/shelljs/src/ln.js new file mode 100644 index 00000000000000..a7b9701b3723cb --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/ln.js @@ -0,0 +1,53 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); +var os = require('os'); + +//@ +//@ ### ln(options, source, dest) +//@ ### ln(source, dest) +//@ Available options: +//@ +//@ + `s`: symlink +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ln('file', 'newlink'); +//@ ln('-sf', 'file', 'existing'); +//@ ``` +//@ +//@ Links source to dest. Use -f to force the link, should dest already exist. +function _ln(options, source, dest) { + options = common.parseOptions(options, { + 's': 'symlink', + 'f': 'force' + }); + + if (!source || !dest) { + common.error('Missing and/or '); + } + + source = path.resolve(process.cwd(), String(source)); + dest = path.resolve(process.cwd(), String(dest)); + + if (!fs.existsSync(source)) { + common.error('Source file does not exist', true); + } + + if (fs.existsSync(dest)) { + if (!options.force) { + common.error('Destination file exists', true); + } + + fs.unlinkSync(dest); + } + + if (options.symlink) { + fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } else { + fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } +} +module.exports = _ln; diff --git a/tools/eslint/node_modules/shelljs/src/ls.js b/tools/eslint/node_modules/shelljs/src/ls.js new file mode 100644 index 00000000000000..3345db4466bc52 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/ls.js @@ -0,0 +1,126 @@ +var path = require('path'); +var fs = require('fs'); +var common = require('./common'); +var _cd = require('./cd'); +var _pwd = require('./pwd'); + +//@ +//@ ### ls([options ,] path [,path ...]) +//@ ### ls([options ,] path_array) +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ``` +//@ +//@ Returns array of files in the given path, or in current directory if no path provided. +function _ls(options, paths) { + options = common.parseOptions(options, { + 'R': 'recursive', + 'A': 'all', + 'a': 'all_deprecated' + }); + + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) + paths = ['.']; + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + // Conditionally pushes file to list - returns true if pushed, false otherwise + // (e.g. prevents hidden files to be included unless explicitly told so) + function pushFile(file, query) { + // hidden file? + if (path.basename(file)[0] === '.') { + // not explicitly asking for hidden files? + if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) + return false; + } + + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + + list.push(file); + return true; + } + + paths.forEach(function(p) { + if (fs.existsSync(p)) { + var stats = fs.statSync(p); + // Simple file? + if (stats.isFile()) { + pushFile(p, p); + return; // continue + } + + // Simple dir? + if (stats.isDirectory()) { + // Iterate over p contents + fs.readdirSync(p).forEach(function(file) { + if (!pushFile(file, p)) + return; + + // Recursive? + if (options.recursive) { + var oldDir = _pwd(); + _cd('', p); + if (fs.statSync(file).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); + _cd('', oldDir); + } + }); + return; // continue + } + } + + // p does not exist - possible wildcard present + + var basename = path.basename(p); + var dirname = path.dirname(p); + // Wildcard present on an existing dir? (e.g. '/tmp/*.js') + if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { + // Escape special regular expression chars + var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); + // Translates wildcard into regex + regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; + // Iterate over directory contents + fs.readdirSync(dirname).forEach(function(file) { + if (file.match(new RegExp(regexp))) { + if (!pushFile(path.normalize(dirname+'/'+file), basename)) + return; + + // Recursive? + if (options.recursive) { + var pp = dirname + '/' + file; + if (fs.lstatSync(pp).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); + } // recursive + } // if file matches + }); // forEach + return; + } + + common.error('no such file or directory: ' + p, true); + }); + + return list; +} +module.exports = _ls; diff --git a/tools/eslint/node_modules/shelljs/src/mkdir.js b/tools/eslint/node_modules/shelljs/src/mkdir.js new file mode 100644 index 00000000000000..5a7088f2609c9f --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/mkdir.js @@ -0,0 +1,68 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Recursively creates 'dir' +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options ,] dir [, dir ...]) +//@ ### mkdir([options ,] dir_array) +//@ Available options: +//@ +//@ + `p`: full path (will create intermediate dirs if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + options = common.parseOptions(options, { + 'p': 'fullpath' + }); + if (!dirs) + common.error('no paths given'); + + if (typeof dirs === 'string') + dirs = [].slice.call(arguments, 1); + // if it's array leave it as it is + + dirs.forEach(function(dir) { + if (fs.existsSync(dir)) { + if (!options.fullpath) + common.error('path already exists: ' + dir, true); + return; // skip dir + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, true); + return; // skip dir + } + + if (options.fullpath) + mkdirSyncRecursive(dir); + else + fs.mkdirSync(dir, parseInt('0777', 8)); + }); +} // mkdir +module.exports = _mkdir; diff --git a/tools/eslint/node_modules/shelljs/src/mv.js b/tools/eslint/node_modules/shelljs/src/mv.js new file mode 100644 index 00000000000000..11f96071875a47 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/mv.js @@ -0,0 +1,80 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### mv(source [, source ...], dest') +//@ ### mv(source_array, dest') +//@ Available options: +//@ +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-f', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves files. The wildcard `*` is accepted. +function _mv(options, sources, dest) { + options = common.parseOptions(options, { + 'f': 'force' + }); + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + sources = common.expand(sources); + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: '+src, true); + return; // skip file + } + + fs.renameSync(src, thisDest); + }); // forEach(src) +} // mv +module.exports = _mv; diff --git a/tools/eslint/node_modules/shelljs/src/popd.js b/tools/eslint/node_modules/shelljs/src/popd.js new file mode 100644 index 00000000000000..11ea24fa464a04 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/popd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/tools/eslint/node_modules/shelljs/src/pushd.js b/tools/eslint/node_modules/shelljs/src/pushd.js new file mode 100644 index 00000000000000..11ea24fa464a04 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/pushd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/tools/eslint/node_modules/shelljs/src/pwd.js b/tools/eslint/node_modules/shelljs/src/pwd.js new file mode 100644 index 00000000000000..41727bb918b78c --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/pwd.js @@ -0,0 +1,11 @@ +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### pwd() +//@ Returns the current directory. +function _pwd(options) { + var pwd = path.resolve(process.cwd()); + return common.ShellString(pwd); +} +module.exports = _pwd; diff --git a/tools/eslint/node_modules/shelljs/src/rm.js b/tools/eslint/node_modules/shelljs/src/rm.js new file mode 100644 index 00000000000000..bd608cb09a59e8 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/rm.js @@ -0,0 +1,163 @@ +var common = require('./common'); +var fs = require('fs'); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for(var i = 0; i < files.length; i++) { + var file = dir + "/" + files[i], + currFile = fs.lstatSync(file); + + if(currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } + + else if(currFile.isSymbolicLink()) { // Unlink symlinks + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + else // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + // Retry on windows, sometimes it takes a little time before all the files in the directory are gone + var start = Date.now(); + while (true) { + try { + result = fs.rmdirSync(dir); + if (fs.existsSync(dir)) throw { code: "EAGAIN" } + break; + } catch(er) { + // In addition to error codes, also check if the directory still exists and loop again if true + if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) { + if (Date.now() - start > 1000) throw er; + } else if (er.code === "ENOENT") { + // Directory did not exist, deletion was successful + break; + } else { + throw er; + } + } + } + } catch(e) { + common.error('could not remove directory (code '+e.code+'): ' + dir, true); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch(e) { + writePermission = false; + } + + return writePermission; +} + +//@ +//@ ### rm([options ,] file [, file ...]) +//@ ### rm([options ,] file_array) +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. The wildcard `*` is accepted. +function _rm(options, files) { + options = common.parseOptions(options, { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive' + }); + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) { + // Path does not exist, no force flag given + if (!options.force) + common.error('no such file or directory: '+file, true); + + return; // skip file + } + + // If here, path exists + + var stats = fs.lstatSync(file); + if (stats.isFile() || stats.isSymbolicLink()) { + + // Do not check for file writing permissions + if (options.force) { + common.unlinkSync(file); + return; + } + + if (isWriteable(file)) + common.unlinkSync(file); + else + common.error('permission denied: '+file, true); + + return; + } // simple file + + // Path is an existing directory, but no -r flag given + if (stats.isDirectory() && !options.recursive) { + common.error('path is a directory', true); + return; // skip path + } + + // Recursively remove existing directory + if (stats.isDirectory() && options.recursive) { + rmdirSyncRecursive(file, options.force); + } + }); // forEach(file) +} // rm +module.exports = _rm; diff --git a/tools/eslint/node_modules/shelljs/src/sed.js b/tools/eslint/node_modules/shelljs/src/sed.js new file mode 100644 index 00000000000000..65f7cb49d1cae1 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/sed.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### sed([options ,] search_regex, replacement, file) +//@ Available options: +//@ +//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input +//@ using the given search regex and replacement string or function. Returns the new string after replacement. +function _sed(options, regex, replacement, file) { + options = common.parseOptions(options, { + 'i': 'inplace' + }); + + if (typeof replacement === 'string' || typeof replacement === 'function') + replacement = replacement; // no-op + else if (typeof replacement === 'number') + replacement = replacement.toString(); // fallback + else + common.error('invalid replacement string'); + + if (!file) + common.error('no file given'); + + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); + if (options.inplace) + fs.writeFileSync(file, result, 'utf8'); + + return common.ShellString(result); +} +module.exports = _sed; diff --git a/tools/eslint/node_modules/shelljs/src/tempdir.js b/tools/eslint/node_modules/shelljs/src/tempdir.js new file mode 100644 index 00000000000000..45953c24e98134 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/tempdir.js @@ -0,0 +1,56 @@ +var common = require('./common'); +var os = require('os'); +var fs = require('fs'); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) + return false; + + if (!fs.statSync(dir).isDirectory()) + return false; + + var testFile = dir+'/'+common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + return false; + } +} + + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + var state = common.state; + if (state.tempDir) + return state.tempDir; // from cache + + state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ + writeableDir(process.env['TMPDIR']) || + writeableDir(process.env['TEMP']) || + writeableDir(process.env['TMP']) || + writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return state.tempDir; +} +module.exports = _tempDir; diff --git a/tools/eslint/node_modules/shelljs/src/test.js b/tools/eslint/node_modules/shelljs/src/test.js new file mode 100644 index 00000000000000..8a4ac7d4d10270 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/test.js @@ -0,0 +1,85 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### test(expression) +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symboilc link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates expression using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) + common.error('no path given'); + + // hack - only works with unary primaries + options = common.parseOptions(options, { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket' + }); + + var canInterpret = false; + for (var key in options) + if (options[key] === true) { + canInterpret = true; + break; + } + + if (!canInterpret) + common.error('could not interpret expression'); + + if (options.link) { + try { + return fs.lstatSync(path).isSymbolicLink(); + } catch(e) { + return false; + } + } + + if (!fs.existsSync(path)) + return false; + + if (options.exists) + return true; + + var stats = fs.statSync(path); + + if (options.block) + return stats.isBlockDevice(); + + if (options.character) + return stats.isCharacterDevice(); + + if (options.directory) + return stats.isDirectory(); + + if (options.file) + return stats.isFile(); + + if (options.pipe) + return stats.isFIFO(); + + if (options.socket) + return stats.isSocket(); +} // test +module.exports = _test; diff --git a/tools/eslint/node_modules/shelljs/src/to.js b/tools/eslint/node_modules/shelljs/src/to.js new file mode 100644 index 00000000000000..f0299993a7ae25 --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/to.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.writeFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not write to file (code '+e.code+'): '+file, true); + } +} +module.exports = _to; diff --git a/tools/eslint/node_modules/shelljs/src/toEnd.js b/tools/eslint/node_modules/shelljs/src/toEnd.js new file mode 100644 index 00000000000000..f6d099d9a3a5ed --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/toEnd.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). +function _toEnd(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.appendFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not append to file (code '+e.code+'): '+file, true); + } +} +module.exports = _toEnd; diff --git a/tools/eslint/node_modules/shelljs/src/which.js b/tools/eslint/node_modules/shelljs/src/which.js new file mode 100644 index 00000000000000..2822ecfb14c97e --- /dev/null +++ b/tools/eslint/node_modules/shelljs/src/which.js @@ -0,0 +1,83 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Cross-platform method for splitting environment PATH variables +function splitPath(p) { + for (i=1;i<2;i++) {} + + if (!p) + return []; + + if (common.platform === 'win') + return p.split(';'); + else + return p.split(':'); +} + +function checkPath(path) { + return fs.existsSync(path) && fs.statSync(path).isDirectory() == false; +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +//@ Returns string containing the absolute path to the command. +function _which(options, cmd) { + if (!cmd) + common.error('must specify command'); + + var pathEnv = process.env.path || process.env.Path || process.env.PATH, + pathArray = splitPath(pathEnv), + where = null; + + // No relative/absolute paths provided? + if (cmd.search(/\//) === -1) { + // Search for command in PATH + pathArray.forEach(function(dir) { + if (where) + return; // already found it + + var attempt = path.resolve(dir + '/' + cmd); + if (checkPath(attempt)) { + where = attempt; + return; + } + + if (common.platform === 'win') { + var baseAttempt = attempt; + attempt = baseAttempt + '.exe'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.cmd'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.bat'; + if (checkPath(attempt)) { + where = attempt; + return; + } + } // if 'win' + }); + } + + // Command not found anywhere? + if (!checkPath(cmd) && !where) + return null; + + where = where || path.resolve(cmd); + + return common.ShellString(where); +} +module.exports = _which; diff --git a/tools/eslint/node_modules/source-map/README.md b/tools/eslint/node_modules/source-map/README.md new file mode 100644 index 00000000000000..b7c6786cef3294 --- /dev/null +++ b/tools/eslint/node_modules/source-map/README.md @@ -0,0 +1,510 @@ +# Source Map + +This is a library to generate and consume the source map format +[described here][format]. + +This library is written in the Asynchronous Module Definition format, and works +in the following environments: + +* Modern Browsers supporting ECMAScript 5 (either after the build, or with an + AMD loader such as RequireJS) + +* Inside Firefox (as a JSM file, after the build) + +* With NodeJS versions 0.8.X and higher + +## Node + + $ npm install source-map + +## Building from Source (for everywhere else) + +Install Node and then run + + $ git clone https://fitzgen@github.com/mozilla/source-map.git + $ cd source-map + $ npm link . + +Next, run + + $ node Makefile.dryice.js + +This should spew a bunch of stuff to stdout, and create the following files: + +* `dist/source-map.js` - The unminified browser version. + +* `dist/source-map.min.js` - The minified browser version. + +* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// NodeJS +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +let sourceMap = {}; +Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referrenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then `smc.sourceContentFor(s)` +will succeed for every source `s` in `smc.sources`. + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new SourceMapGenerator based on a SourceMapConsumer + +* `sourceMapConsumer` The SourceMap. + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimium of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming whitespace from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +## Tests + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. + +To add new tests, create a new file named `test/test-.js` +and export your test functions with names that start with "test", for example + +```js +exports["test doing the foo bar"] = function (assert, util) { + ... +}; +``` + +The new test will be located automatically when you run the suite. + +The `util` argument is the test utility module located at `test/source-map/util`. + +The `assert` argument is a cut down version of node's assert module. You have +access to the following assertion functions: + +* `doesNotThrow` + +* `equal` + +* `ok` + +* `strictEqual` + +* `throws` + +(The reason for the restricted set of test functions is because we need the +tests to run inside Firefox's test suite as well and so the assert module is +shimmed in that environment. See `build/assert-shim.js`.) + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit +[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap +[Dryice]: https://github.com/mozilla/dryice diff --git a/tools/eslint/node_modules/source-map/build/assert-shim.js b/tools/eslint/node_modules/source-map/build/assert-shim.js new file mode 100644 index 00000000000000..daa1a623c79827 --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/assert-shim.js @@ -0,0 +1,56 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +define('test/source-map/assert', ['exports'], function (exports) { + + let do_throw = function (msg) { + throw new Error(msg); + }; + + exports.init = function (throw_fn) { + do_throw = throw_fn; + }; + + exports.doesNotThrow = function (fn) { + try { + fn(); + } + catch (e) { + do_throw(e.message); + } + }; + + exports.equal = function (actual, expected, msg) { + msg = msg || String(actual) + ' != ' + String(expected); + if (actual != expected) { + do_throw(msg); + } + }; + + exports.ok = function (val, msg) { + msg = msg || String(val) + ' is falsey'; + if (!Boolean(val)) { + do_throw(msg); + } + }; + + exports.strictEqual = function (actual, expected, msg) { + msg = msg || String(actual) + ' !== ' + String(expected); + if (actual !== expected) { + do_throw(msg); + } + }; + + exports.throws = function (fn) { + try { + fn(); + do_throw('Expected an error to be thrown, but it wasn\'t.'); + } + catch (e) { + } + }; + +}); diff --git a/tools/eslint/node_modules/source-map/build/mini-require.js b/tools/eslint/node_modules/source-map/build/mini-require.js new file mode 100644 index 00000000000000..0daf453773f47d --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/mini-require.js @@ -0,0 +1,152 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * Define a module along with a payload. + * @param {string} moduleName Name for the payload + * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec + * @param {function} payload Function with (require, exports, module) params + */ +function define(moduleName, deps, payload) { + if (typeof moduleName != "string") { + throw new TypeError('Expected string, got: ' + moduleName); + } + + if (arguments.length == 2) { + payload = deps; + } + + if (moduleName in define.modules) { + throw new Error("Module already defined: " + moduleName); + } + define.modules[moduleName] = payload; +}; + +/** + * The global store of un-instantiated modules + */ +define.modules = {}; + + +/** + * We invoke require() in the context of a Domain so we can have multiple + * sets of modules running separate from each other. + * This contrasts with JSMs which are singletons, Domains allows us to + * optionally load a CommonJS module twice with separate data each time. + * Perhaps you want 2 command lines with a different set of commands in each, + * for example. + */ +function Domain() { + this.modules = {}; + this._currentModule = null; +} + +(function () { + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * There are 2 ways to call this, either with an array of dependencies and a + * callback to call when the dependencies are found (which can happen + * asynchronously in an in-page context) or with a single string an no callback + * where the dependency is resolved synchronously and returned. + * The API is designed to be compatible with the CommonJS AMD spec and + * RequireJS. + * @param {string[]|string} deps A name, or names for the payload + * @param {function|undefined} callback Function to call when the dependencies + * are resolved + * @return {undefined|object} The module required or undefined for + * array/callback method + */ + Domain.prototype.require = function(deps, callback) { + if (Array.isArray(deps)) { + var params = deps.map(function(dep) { + return this.lookup(dep); + }, this); + if (callback) { + callback.apply(null, params); + } + return undefined; + } + else { + return this.lookup(deps); + } + }; + + function normalize(path) { + var bits = path.split('/'); + var i = 1; + while (i < bits.length) { + if (bits[i] === '..') { + bits.splice(i-1, 1); + } else if (bits[i] === '.') { + bits.splice(i, 1); + } else { + i++; + } + } + return bits.join('/'); + } + + function join(a, b) { + a = a.trim(); + b = b.trim(); + if (/^\//.test(b)) { + return b; + } else { + return a.replace(/\/*$/, '/') + b; + } + } + + function dirname(path) { + var bits = path.split('/'); + bits.pop(); + return bits.join('/'); + } + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * @param {string} moduleName A name for the payload to lookup + * @return {object} The module specified by aModuleName or null if not found. + */ + Domain.prototype.lookup = function(moduleName) { + if (/^\./.test(moduleName)) { + moduleName = normalize(join(dirname(this._currentModule), moduleName)); + } + + if (moduleName in this.modules) { + var module = this.modules[moduleName]; + return module; + } + + if (!(moduleName in define.modules)) { + throw new Error("Module not defined: " + moduleName); + } + + var module = define.modules[moduleName]; + + if (typeof module == "function") { + var exports = {}; + var previousModule = this._currentModule; + this._currentModule = moduleName; + module(this.require.bind(this), exports, { id: moduleName, uri: "" }); + this._currentModule = previousModule; + module = exports; + } + + // cache the resulting module object for next time + this.modules[moduleName] = module; + + return module; + }; + +}()); + +define.Domain = Domain; +define.globalDomain = new Domain(); +var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/tools/eslint/node_modules/source-map/build/prefix-source-map.jsm b/tools/eslint/node_modules/source-map/build/prefix-source-map.jsm new file mode 100644 index 00000000000000..209dbd7d37fdcc --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/prefix-source-map.jsm @@ -0,0 +1,21 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +/////////////////////////////////////////////////////////////////////////////// + + +this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; + +Components.utils.import("resource://gre/modules/devtools/Console.jsm"); +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/tools/eslint/node_modules/source-map/build/prefix-utils.jsm b/tools/eslint/node_modules/source-map/build/prefix-utils.jsm new file mode 100644 index 00000000000000..80341d4528cf43 --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/prefix-utils.jsm @@ -0,0 +1,18 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); +Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); + +this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/tools/eslint/node_modules/source-map/build/suffix-browser.js b/tools/eslint/node_modules/source-map/build/suffix-browser.js new file mode 100644 index 00000000000000..fb29ff5fd287e0 --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/suffix-browser.js @@ -0,0 +1,8 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.sourceMap = { + SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, + SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, + SourceNode: require('source-map/source-node').SourceNode +}; diff --git a/tools/eslint/node_modules/source-map/build/suffix-source-map.jsm b/tools/eslint/node_modules/source-map/build/suffix-source-map.jsm new file mode 100644 index 00000000000000..cf3c2d8d30649f --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/suffix-source-map.jsm @@ -0,0 +1,6 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; +this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; +this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/tools/eslint/node_modules/source-map/build/suffix-utils.jsm b/tools/eslint/node_modules/source-map/build/suffix-utils.jsm new file mode 100644 index 00000000000000..b31b84cb61bed9 --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/suffix-utils.jsm @@ -0,0 +1,21 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +function runSourceMapTests(modName, do_throw) { + let mod = require(modName); + let assert = require('test/source-map/assert'); + let util = require('test/source-map/util'); + + assert.init(do_throw); + + for (let k in mod) { + if (/^test/.test(k)) { + mod[k](assert, util); + } + } + +} +this.runSourceMapTests = runSourceMapTests; diff --git a/tools/eslint/node_modules/source-map/build/test-prefix.js b/tools/eslint/node_modules/source-map/build/test-prefix.js new file mode 100644 index 00000000000000..1b13f300e5281a --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/test-prefix.js @@ -0,0 +1,8 @@ +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://test/Utils.jsm'); diff --git a/tools/eslint/node_modules/source-map/build/test-suffix.js b/tools/eslint/node_modules/source-map/build/test-suffix.js new file mode 100644 index 00000000000000..bec2de3f269db8 --- /dev/null +++ b/tools/eslint/node_modules/source-map/build/test-suffix.js @@ -0,0 +1,3 @@ +function run_test() { + runSourceMapTests('{THIS_MODULE}', do_throw); +} diff --git a/tools/eslint/node_modules/source-map/lib/source-map.js b/tools/eslint/node_modules/source-map/lib/source-map.js new file mode 100644 index 00000000000000..121ad241634413 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/tools/eslint/node_modules/source-map/lib/source-map/array-set.js b/tools/eslint/node_modules/source-map/lib/source-map/array-set.js new file mode 100644 index 00000000000000..19cb841ca492c0 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/array-set.js @@ -0,0 +1,107 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/base64-vlq.js b/tools/eslint/node_modules/source-map/lib/source-map/base64-vlq.js new file mode 100644 index 00000000000000..bbe9a58e25fd74 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/base64-vlq.js @@ -0,0 +1,146 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler 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. + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/base64.js b/tools/eslint/node_modules/source-map/lib/source-map/base64.js new file mode 100644 index 00000000000000..35adbc1a475986 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/base64.js @@ -0,0 +1,73 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/binary-search.js b/tools/eslint/node_modules/source-map/lib/source-map/binary-search.js new file mode 100644 index 00000000000000..7936f7e7c0fad5 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/binary-search.js @@ -0,0 +1,117 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/mapping-list.js b/tools/eslint/node_modules/source-map/lib/source-map/mapping-list.js new file mode 100644 index 00000000000000..01aff2241f3490 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/mapping-list.js @@ -0,0 +1,86 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + var mapping; + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/quick-sort.js b/tools/eslint/node_modules/source-map/lib/source-map/quick-sort.js new file mode 100644 index 00000000000000..e0551eda59e4bb --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/quick-sort.js @@ -0,0 +1,120 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/source-map-consumer.js b/tools/eslint/node_modules/source-map/lib/source-map/source-map-consumer.js new file mode 100644 index 00000000000000..cbdc467c521e45 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/source-map-consumer.js @@ -0,0 +1,1077 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + var quickSort = require('./quick-sort').quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + sources = sources.map(util.normalize); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + }; + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[i]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.column + + (section.generatedOffset.generatedLine === mapping.generatedLine) + ? section.generatedOffset.generatedColumn - 1 + : 0, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + }; + }; + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/source-map-generator.js b/tools/eslint/node_modules/source-map/lib/source-map/source-map-generator.js new file mode 100644 index 00000000000000..d8a9025bda7b03 --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/source-map-generator.js @@ -0,0 +1,399 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/source-node.js b/tools/eslint/node_modules/source-map/lib/source-map/source-node.js new file mode 100644 index 00000000000000..9ee90bd568279d --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/source-node.js @@ -0,0 +1,414 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); diff --git a/tools/eslint/node_modules/source-map/lib/source-map/util.js b/tools/eslint/node_modules/source-map/lib/source-map/util.js new file mode 100644 index 00000000000000..0b9d75dd813eab --- /dev/null +++ b/tools/eslint/node_modules/source-map/lib/source-map/util.js @@ -0,0 +1,370 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '
    /..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + }; + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +}); diff --git a/tools/eslint/node_modules/source-map/package.json b/tools/eslint/node_modules/source-map/package.json new file mode 100644 index 00000000000000..dbe6ed71a71946 --- /dev/null +++ b/tools/eslint/node_modules/source-map/package.json @@ -0,0 +1,226 @@ +{ + "_args": [ + [ + "source-map@^0.4.4", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/handlebars" + ] + ], + "_from": "source-map@>=0.4.4 <0.5.0", + "_id": "source-map@0.4.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/source-map", + "_npmUser": { + "email": "fitzgen@gmail.com", + "name": "nickfitzgerald" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "name": "source-map", + "raw": "source-map@^0.4.4", + "rawSpec": "^0.4.4", + "scope": null, + "spec": ">=0.4.4 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/handlebars" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "_shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", + "_shrinkwrap": null, + "_spec": "source-map@^0.4.4", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/handlebars", + "author": { + "email": "nfitzgerald@mozilla.com", + "name": "Nick Fitzgerald" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "contributors": [ + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" + }, + { + "name": "Chris Montgomery", + "email": "christopher.montgomery@dowjones.com" + }, + { + "name": "J. Ryan Stinnett", + "email": "jryans@gmail.com" + }, + { + "name": "Jack Herrington", + "email": "jherrington@walmartlabs.com" + }, + { + "name": "Chris Truter", + "email": "jeffpalentine@gmail.com" + }, + { + "name": "Daniel Espeset", + "email": "daniel@danielespeset.com" + }, + { + "name": "Jamie Wong", + "email": "jamie.lf.wong@gmail.com" + }, + { + "name": "Eddy Bruël", + "email": "ejpbruel@mozilla.com" + }, + { + "name": "Hawken Rives", + "email": "hawkrives@gmail.com" + }, + { + "name": "Gilad Peleg", + "email": "giladp007@gmail.com" + } + ], + "dependencies": { + "amdefine": ">=0.0.4" + }, + "description": "Generates and consumes source maps", + "devDependencies": { + "dryice": ">=0.4.8" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "eba4f5da9c0dc999de68032d8b4f76173652036b", + "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "build/", + "lib/" + ], + "homepage": "https://github.com/mozilla/source-map", + "license": "BSD-3-Clause", + "main": "./lib/source-map.js", + "maintainers": [ + { + "name": "mozilla-devtools", + "email": "mozilla-developer-tools@googlegroups.com" + }, + { + "name": "mozilla", + "email": "dherman@mozilla.com" + }, + { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + } + ], + "name": "source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/mozilla/source-map.git" + }, + "scripts": { + "build": "node Makefile.dryice.js", + "test": "node test/run-tests.js" + }, + "version": "0.4.4" +} diff --git a/tools/eslint/node_modules/sprintf-js/LICENSE b/tools/eslint/node_modules/sprintf-js/LICENSE new file mode 100644 index 00000000000000..663ac52e4d8cd9 --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2007-2014, Alexandru Marasteanu +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 this software 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 AUTHORS OR COPYRIGHT HOLDERS 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/tools/eslint/node_modules/sprintf-js/README.md b/tools/eslint/node_modules/sprintf-js/README.md new file mode 100644 index 00000000000000..83863561b29199 --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/README.md @@ -0,0 +1,88 @@ +# sprintf.js +**sprintf.js** is a complete open source JavaScript sprintf implementation for the *browser* and *node.js*. + +Its prototype is simple: + + string sprintf(string format , [mixed arg1 [, mixed arg2 [ ,...]]]) + +The placeholders in the format string are marked by `%` and are followed by one or more of these elements, in this order: + +* An optional number followed by a `$` sign that selects which argument index to use for the value. If not specified, arguments will be placed in the same order as the placeholders in the input string. +* An optional `+` sign that forces to preceed the result with a plus or minus sign on numeric values. By default, only the `-` sign is used on negative numbers. +* An optional padding specifier that says what character to use for padding (if specified). Possible values are `0` or any other character precedeed by a `'` (single quote). The default is to pad with *spaces*. +* An optional `-` sign, that causes sprintf to left-align the result of this placeholder. The default is to right-align the result. +* An optional number, that says how many characters the result should have. If the value to be returned is shorter than this number, the result will be padded. When used with the `j` (JSON) type specifier, the padding length specifies the tab size used for indentation. +* An optional precision modifier, consisting of a `.` (dot) followed by a number, that says how many digits should be displayed for floating point numbers. When used with the `g` type specifier, it specifies the number of significant digits. When used on a string, it causes the result to be truncated. +* A type specifier that can be any of: + * `%` — yields a literal `%` character + * `b` — yields an integer as a binary number + * `c` — yields an integer as the character with that ASCII value + * `d` or `i` — yields an integer as a signed decimal number + * `e` — yields a float using scientific notation + * `u` — yields an integer as an unsigned decimal number + * `f` — yields a float as is; see notes on precision above + * `g` — yields a float as is; see notes on precision above + * `o` — yields an integer as an octal number + * `s` — yields a string as is + * `x` — yields an integer as a hexadecimal number (lower-case) + * `X` — yields an integer as a hexadecimal number (upper-case) + * `j` — yields a JavaScript object or array as a JSON encoded string + +## JavaScript `vsprintf` +`vsprintf` is the same as `sprintf` except that it accepts an array of arguments, rather than a variable number of arguments: + + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +## Argument swapping +You can also swap the arguments. That is, the order of the placeholders doesn't have to match the order of the arguments. You can do that by simply indicating in the format string which arguments the placeholders refer to: + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") +And, of course, you can repeat the placeholders without having to increase the number of arguments. + +## Named arguments +Format strings may contain replacement fields rather than positional placeholders. Instead of referring to a certain argument, you can now refer to a certain key within an object. Replacement fields are surrounded by rounded parentheses - `(` and `)` - and begin with a keyword that refers to a key: + + var user = { + name: "Dolly" + } + sprintf("Hello %(name)s", user) // Hello Dolly +Keywords in replacement fields can be optionally followed by any number of keywords or indexes: + + var users = [ + {name: "Dolly"}, + {name: "Molly"}, + {name: "Polly"} + ] + sprintf("Hello %(users[0].name)s, %(users[1].name)s and %(users[2].name)s", {users: users}) // Hello Dolly, Molly and Polly +Note: mixing positional and named placeholders is not (yet) supported + +## Computed values +You can pass in a function as a dynamic value and it will be invoked (with no arguments) in order to compute the value on-the-fly. + + sprintf("Current timestamp: %d", Date.now) // Current timestamp: 1398005382890 + sprintf("Current date and time: %s", function() { return new Date().toString() }) + +# AngularJS +You can now use `sprintf` and `vsprintf` (also aliased as `fmt` and `vfmt` respectively) in your AngularJS projects. See `demo/`. + +# Installation + +## Via Bower + + bower install sprintf + +## Or as a node.js module + + npm install sprintf-js + +### Usage + + var sprintf = require("sprintf-js").sprintf, + vsprintf = require("sprintf-js").vsprintf + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +# License + +**sprintf.js** is licensed under the terms of the 3-clause BSD license. diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/angular-sprintf.min.js b/tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/angular-sprintf.min.js rename to tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/angular-sprintf.min.map b/tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/dist/angular-sprintf.min.map rename to tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.js.map diff --git a/tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map b/tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map new file mode 100644 index 00000000000000..055964c624c1ac --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/dist/angular-sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} \ No newline at end of file diff --git a/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js new file mode 100644 index 00000000000000..dc61e51add29bb --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ + +!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"j":g=JSON.stringify(g,null,j[6]?parseInt(j[6]):0);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"g":g=j[7]?parseFloat(g).toPrecision(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}e.json.test(j[8])?q[q.length]=g:(!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g)}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); +//# sourceMappingURL=sprintf.min.map \ No newline at end of file diff --git a/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map new file mode 100644 index 00000000000000..369dbafab157ae --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA4JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GApLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc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,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYsC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI9B,EAAM,GAAI,CACV4B,GAAa,CACb,IAAIG,MAAiBC,EAAoBhC,EAAM,GAAIiC,IACnD,IAAuD,QAAlDA,EAAcjD,EAAGnB,IAAIgE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAWzB,QAAU2B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG3B,UACnE,GAA8D,QAAzD2B,EAAcjD,EAAGQ,WAAWqC,KAAKG,IAClCD,EAAWA,EAAWzB,QAAU2B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAcjD,EAAGS,aAAaoC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWzB,QAAU2B,EAAY,GAUxDjC,EAAM,GAAK+B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIlB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC2B,EAAOA,EAAKL,UAAUtB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIuC,GAAW,SAASR,EAAK9B,EAAMuC,GAG/B,MAFAA,IAASvC,OAAYnB,MAAM,GAC3B0D,EAAMC,OAAO,EAAG,EAAGV,GACZ9D,EAAQyE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ1E,QAAUA,EAClB0E,QAAQJ,SAAWA,IAGnBvE,EAAOC,QAAUA,EACjBD,EAAOuE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI3E,QAASA,EACTsE,SAAUA,OAKT,mBAAXvE,QAAyB8E,KAAO9E"} \ No newline at end of file diff --git a/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.map b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.map new file mode 100644 index 00000000000000..ee011aaa5aa56f --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/dist/sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","toPrecision","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA+JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GAvLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,UACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,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IAAI/B,EAAM,GAAI,CACV6B,GAAa,CACb,IAAIG,MAAiBC,EAAoBjC,EAAM,GAAIkC,IACnD,IAAuD,QAAlDA,EAAclD,EAAGnB,IAAIiE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAW1B,QAAU4B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG5B,UACnE,GAA8D,QAAzD4B,EAAclD,EAAGQ,WAAWsC,KAAKG,IAClCD,EAAWA,EAAW1B,QAAU4B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAclD,EAAGS,aAAaqC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAW1B,QAAU4B,EAAY,GAUxDlC,EAAM,GAAKgC,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAInB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC4B,EAAOA,EAAKL,UAAUvB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIwC,GAAW,SAASR,EAAK/B,EAAMwC,GAG/B,MAFAA,IAASxC,OAAYnB,MAAM,GAC3B2D,EAAMC,OAAO,EAAG,EAAGV,GACZ/D,EAAQ0E,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ3E,QAAUA,EAClB2E,QAAQJ,SAAWA,IAGnBxE,EAAOC,QAAUA,EACjBD,EAAOwE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI5E,QAASA,EACTuE,SAAUA,OAKT,mBAAXxE,QAAyB+E,KAAO/E"} \ No newline at end of file diff --git a/tools/eslint/node_modules/sprintf-js/package.json b/tools/eslint/node_modules/sprintf-js/package.json new file mode 100644 index 00000000000000..bed616ce73c31b --- /dev/null +++ b/tools/eslint/node_modules/sprintf-js/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "sprintf-js@~1.0.2", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/argparse" + ] + ], + "_from": "sprintf-js@>=1.0.2 <1.1.0", + "_id": "sprintf-js@1.0.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/sprintf-js", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "hello@alexei.ro", + "name": "alexei" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "sprintf-js", + "raw": "sprintf-js@~1.0.2", + "rawSpec": "~1.0.2", + "scope": null, + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/argparse" + ], + "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "_shasum": "04e6926f662895354f3dd015203633b857297e2c", + "_shrinkwrap": null, + "_spec": "sprintf-js@~1.0.2", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/argparse", + "author": { + "email": "hello@alexei.ro", + "name": "Alexandru Marasteanu", + "url": "http://alexei.ro/" + }, + "bugs": { + "url": "https://github.com/alexei/sprintf.js/issues" + }, + "dependencies": {}, + "description": "JavaScript sprintf implementation", + "devDependencies": { + "grunt": "*", + "grunt-contrib-uglify": "*", + "grunt-contrib-watch": "*", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "04e6926f662895354f3dd015203633b857297e2c", + "tarball": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + }, + "gitHead": "747b806c2dab5b64d5c9958c42884946a187c3b1", + "homepage": "https://github.com/alexei/sprintf.js#readme", + "license": "BSD-3-Clause", + "main": "src/sprintf.js", + "maintainers": [ + { + "name": "alexei", + "email": "hello@alexei.ro" + } + ], + "name": "sprintf-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/alexei/sprintf.js.git" + }, + "scripts": { + "test": "mocha test/test.js" + }, + "version": "1.0.3" +} diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/src/angular-sprintf.js b/tools/eslint/node_modules/sprintf-js/src/angular-sprintf.js similarity index 100% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/src/angular-sprintf.js rename to tools/eslint/node_modules/sprintf-js/src/angular-sprintf.js diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/src/sprintf.js b/tools/eslint/node_modules/sprintf-js/src/sprintf.js similarity index 83% rename from tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/src/sprintf.js rename to tools/eslint/node_modules/sprintf-js/src/sprintf.js index 0ccb64c981e878..c0fc7c08b2e6fe 100644 --- a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js/src/sprintf.js +++ b/tools/eslint/node_modules/sprintf-js/src/sprintf.js @@ -1,10 +1,12 @@ (function(window) { var re = { not_string: /[^s]/, - number: /[dief]/, + number: /[diefg]/, + json: /[j]/, + not_json: /[^j]/, text: /^[^\x25]+/, modulo: /^\x25{2}/, - placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fiosuxX])/, + placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/, key: /^([a-z_][a-z_\d]*)/i, key_access: /^\.([a-z_][a-z_\d]*)/i, index_access: /^\[(\d+)\]/, @@ -48,7 +50,7 @@ arg = arg() } - if (re.not_string.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) { + if (re.not_string.test(match[8]) && re.not_json.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) { throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg))) } @@ -67,12 +69,18 @@ case "i": arg = parseInt(arg, 10) break + case "j": + arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0) + break case "e": arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential() break case "f": arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg) break + case "g": + arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg) + break case "o": arg = arg.toString(8) break @@ -89,17 +97,22 @@ arg = arg.toString(16).toUpperCase() break } - if (re.number.test(match[8]) && (!is_positive || match[3])) { - sign = is_positive ? "+" : "-" - arg = arg.toString().replace(re.sign, "") + if (re.json.test(match[8])) { + output[output.length] = arg } else { - sign = "" + if (re.number.test(match[8]) && (!is_positive || match[3])) { + sign = is_positive ? "+" : "-" + arg = arg.toString().replace(re.sign, "") + } + else { + sign = "" + } + pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " " + pad_length = match[6] - (sign + arg).length + pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : "" + output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg) } - pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " " - pad_length = match[6] - (sign + arg).length - pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : "" - output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg) } } return output.join("") diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/tools/eslint/node_modules/string_decoder/LICENSE similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE rename to tools/eslint/node_modules/string_decoder/LICENSE diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md b/tools/eslint/node_modules/string_decoder/README.md similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md rename to tools/eslint/node_modules/string_decoder/README.md diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js b/tools/eslint/node_modules/string_decoder/index.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js rename to tools/eslint/node_modules/string_decoder/index.js diff --git a/tools/eslint/node_modules/string_decoder/package.json b/tools/eslint/node_modules/string_decoder/package.json new file mode 100644 index 00000000000000..c945b1e076f9e1 --- /dev/null +++ b/tools/eslint/node_modules/string_decoder/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "string_decoder@~0.10.x", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@>=0.10.0 <0.11.0", + "_id": "string_decoder@0.10.31", + "_inCache": true, + "_installable": true, + "_location": "/eslint/string_decoder", + "_npmUser": { + "email": "rod@vagg.org", + "name": "rvagg" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "string_decoder", + "raw": "string_decoder@~0.10.x", + "rawSpec": "~0.10.x", + "scope": null, + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_shrinkwrap": null, + "_spec": "string_decoder@~0.10.x", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": {}, + "description": "The string_decoder module from Node core", + "devDependencies": { + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "browser", + "browserify", + "decoder", + "string" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "0.10.31" +} diff --git a/tools/eslint/node_modules/chalk/node_modules/strip-ansi/index.js b/tools/eslint/node_modules/strip-ansi/index.js similarity index 100% rename from tools/eslint/node_modules/chalk/node_modules/strip-ansi/index.js rename to tools/eslint/node_modules/strip-ansi/index.js diff --git a/tools/eslint/node_modules/strip-ansi/license b/tools/eslint/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/eslint/node_modules/strip-ansi/package.json b/tools/eslint/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..6ff9da0e23efb8 --- /dev/null +++ b/tools/eslint/node_modules/strip-ansi/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "strip-ansi@^3.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk" + ] + ], + "_from": "strip-ansi@>=3.0.0 <4.0.0", + "_id": "strip-ansi@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/strip-ansi", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "strip-ansi", + "raw": "strip-ansi@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/chalk", + "/eslint/inquirer" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz", + "_shasum": "7510b665567ca914ccb5d7e072763ac968be3724", + "_shrinkwrap": null, + "_spec": "strip-ansi@^3.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "7510b665567ca914ccb5d7e072763ac968be3724", + "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "3f05b9810e1438f946e2eb84ee854cc00b972e9e", + "homepage": "https://github.com/sindresorhus/strip-ansi", + "keywords": [ + "256", + "ansi", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "log", + "logging", + "remove", + "rgb", + "shell", + "string", + "strip", + "styles", + "terminal", + "text", + "trim", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "strip-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-ansi.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/strip-ansi/readme.md b/tools/eslint/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000000000..76091512df5e46 --- /dev/null +++ b/tools/eslint/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/sindresorhus/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/sindresorhus/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/strip-json-comments/cli.js b/tools/eslint/node_modules/strip-json-comments/cli.js index ac4da48457a2f5..aec5aa20e4a073 100755 --- a/tools/eslint/node_modules/strip-json-comments/cli.js +++ b/tools/eslint/node_modules/strip-json-comments/cli.js @@ -20,9 +20,9 @@ function getStdin(cb) { } if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-json-comments > '); + console.log('strip-json-comments input-file > output-file'); console.log('or'); - console.log('cat | strip-json-comments > '); + console.log('strip-json-comments < input-file > output-file'); return; } diff --git a/tools/eslint/node_modules/strip-json-comments/license b/tools/eslint/node_modules/strip-json-comments/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/strip-json-comments/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/eslint/node_modules/strip-json-comments/package.json b/tools/eslint/node_modules/strip-json-comments/package.json index 0b4dc57515d3f0..d011732c3d30bb 100644 --- a/tools/eslint/node_modules/strip-json-comments/package.json +++ b/tools/eslint/node_modules/strip-json-comments/package.json @@ -1,78 +1,104 @@ { - "name": "strip-json-comments", - "version": "1.0.2", - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "keywords": [ - "json", - "strip", - "remove", - "delete", - "trim", - "comments", - "multiline", - "parse", - "config", - "configuration", - "conf", - "settings", - "util", - "env", - "environment", - "cli", - "bin" + "_args": [ + [ + "strip-json-comments@~1.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] ], - "license": "MIT", - "author": { - "name": "Sindre Sorhus", + "_from": "strip-json-comments@>=1.0.1 <1.1.0", + "_id": "strip-json-comments@1.0.4", + "_inCache": true, + "_installable": true, + "_location": "/eslint/strip-json-comments", + "_nodeVersion": "0.12.5", + "_npmUser": { "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "name": "sindresorhus" }, - "files": [ - "cli.js", - "strip-json-comments.js" + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "strip-json-comments", + "raw": "strip-json-comments@~1.0.1", + "rawSpec": "~1.0.1", + "scope": null, + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" ], - "main": "strip-json-comments", + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "_shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", + "_shrinkwrap": null, + "_spec": "strip-json-comments@~1.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, "bin": { "strip-json-comments": "cli.js" }, - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-json-comments.git" - }, - "scripts": { - "test": "mocha" + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" }, + "dependencies": {}, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", "devDependencies": { "mocha": "*" }, + "directories": {}, + "dist": { + "shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", + "tarball": "http://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + }, "engines": { "node": ">=0.8.0" }, - "gitHead": "142dd671c71f90fb7fdba440184b1bb64543acb3", - "bugs": { - "url": "https://github.com/sindresorhus/strip-json-comments/issues" - }, + "files": [ + "cli.js", + "strip-json-comments.js" + ], + "gitHead": "f58348696368583cc5bb18525fe31eacc9bd00e1", "homepage": "https://github.com/sindresorhus/strip-json-comments", - "_id": "strip-json-comments@1.0.2", - "_shasum": "5a48ab96023dbac1b7b8d0ffabf6f63f1677be9f", - "_from": "strip-json-comments@>=1.0.1 <1.1.0", - "_npmVersion": "2.1.2", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, + "keywords": [ + "bin", + "cli", + "comments", + "conf", + "config", + "configuration", + "delete", + "env", + "environment", + "json", + "multiline", + "parse", + "remove", + "settings", + "strip", + "trim", + "util" + ], + "license": "MIT", + "main": "strip-json-comments", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], - "dist": { - "shasum": "5a48ab96023dbac1b7b8d0ffabf6f63f1677be9f", - "tarball": "http://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.2.tgz" + "name": "strip-json-comments", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.2.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "test": "mocha --ui tdd" + }, + "version": "1.0.4" } diff --git a/tools/eslint/node_modules/strip-json-comments/readme.md b/tools/eslint/node_modules/strip-json-comments/readme.md index 336523243e6c0d..63ce165b23809f 100644 --- a/tools/eslint/node_modules/strip-json-comments/readme.md +++ b/tools/eslint/node_modules/strip-json-comments/readme.md @@ -13,10 +13,11 @@ This is now possible: It will remove single-line comments `//` and multi-line comments `/**/`. -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 and a [require hook](https://github.com/uTest/autostrip-json-comments). +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. +- -*There's already [json-comments](https://npmjs.org/package/json-comments), but it's only for Node.js and uses a naive regex to strip comments which fails on simple cases like `{"a":"//"}`. This module however parses out the comments.* +*There's also [`json-comments`](https://npmjs.org/package/json-comments), but it's only for Node.js, inefficient, bloated as it also minifies, and comes with a `require` hook, which is :(* ## Install @@ -69,6 +70,11 @@ strip-json-comments < input-file > output-file ``` +## Related + +- [`strip-css-comments`](https://github.com/sindresorhus/strip-css-comments) + + ## License MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/strip-json-comments/strip-json-comments.js b/tools/eslint/node_modules/strip-json-comments/strip-json-comments.js index a47976fd51b4c0..eb77ce7456b8e5 100644 --- a/tools/eslint/node_modules/strip-json-comments/strip-json-comments.js +++ b/tools/eslint/node_modules/strip-json-comments/strip-json-comments.js @@ -8,6 +8,9 @@ (function () { 'use strict'; + var singleComment = 1; + var multiComment = 2; + function stripJsonComments(str) { var currentChar; var nextChar; @@ -19,8 +22,11 @@ currentChar = str[i]; nextChar = str[i + 1]; - if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') { - insideString = !insideString; + if (!insideComment && currentChar === '"') { + var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!insideComment && !escaped && currentChar === '"') { + insideString = !insideString; + } } if (insideString) { @@ -29,21 +35,21 @@ } if (!insideComment && currentChar + nextChar === '//') { - insideComment = 'single'; + insideComment = singleComment; i++; - } else if (insideComment === 'single' && currentChar + nextChar === '\r\n') { + } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { insideComment = false; i++; ret += currentChar; ret += nextChar; continue; - } else if (insideComment === 'single' && currentChar === '\n') { + } else if (insideComment === singleComment && currentChar === '\n') { insideComment = false; } else if (!insideComment && currentChar + nextChar === '/*') { - insideComment = 'multi'; + insideComment = multiComment; i++; continue; - } else if (insideComment === 'multi' && currentChar + nextChar === '*/') { + } else if (insideComment === multiComment && currentChar + nextChar === '*/') { insideComment = false; i++; continue; diff --git a/tools/eslint/node_modules/supports-color/index.js b/tools/eslint/node_modules/supports-color/index.js new file mode 100644 index 00000000000000..4346e272e1f1cd --- /dev/null +++ b/tools/eslint/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/tools/eslint/node_modules/supports-color/license b/tools/eslint/node_modules/supports-color/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/eslint/node_modules/supports-color/package.json b/tools/eslint/node_modules/supports-color/package.json new file mode 100644 index 00000000000000..61f1cd1e66aba9 --- /dev/null +++ b/tools/eslint/node_modules/supports-color/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "supports-color@^2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk" + ] + ], + "_from": "supports-color@>=2.0.0 <3.0.0", + "_id": "supports-color@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/supports-color", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "supports-color", + "raw": "supports-color@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "_shasum": "535d045ce6b6363fa40117084629995e9df324c7", + "_shrinkwrap": null, + "_spec": "supports-color@^2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/chalk", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": {}, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + }, + "directories": {}, + "dist": { + "shasum": "535d045ce6b6363fa40117084629995e9df324c7", + "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588", + "homepage": "https://github.com/chalk/supports-color", + "keywords": [ + "256", + "ansi", + "capability", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "detect", + "rgb", + "shell", + "styles", + "support", + "supports", + "terminal", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "supports-color", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.0" +} diff --git a/tools/eslint/node_modules/supports-color/readme.md b/tools/eslint/node_modules/supports-color/readme.md new file mode 100644 index 00000000000000..b4761f1ecdeaf0 --- /dev/null +++ b/tools/eslint/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/text-table/.travis.yml b/tools/eslint/node_modules/text-table/.travis.yml deleted file mode 100644 index cc4dba29d959a2..00000000000000 --- a/tools/eslint/node_modules/text-table/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/tools/eslint/node_modules/text-table/example/align.js b/tools/eslint/node_modules/text-table/example/align.js deleted file mode 100644 index 9be43098cf87b8..00000000000000 --- a/tools/eslint/node_modules/text-table/example/align.js +++ /dev/null @@ -1,8 +0,0 @@ -var table = require('../'); -var t = table([ - [ 'beep', '1024' ], - [ 'boop', '33450' ], - [ 'foo', '1006' ], - [ 'bar', '45' ] -], { align: [ 'l', 'r' ] }); -console.log(t); diff --git a/tools/eslint/node_modules/text-table/example/center.js b/tools/eslint/node_modules/text-table/example/center.js deleted file mode 100644 index 52b1c69e012cb1..00000000000000 --- a/tools/eslint/node_modules/text-table/example/center.js +++ /dev/null @@ -1,8 +0,0 @@ -var table = require('../'); -var t = table([ - [ 'beep', '1024', 'xyz' ], - [ 'boop', '3388450', 'tuv' ], - [ 'foo', '10106', 'qrstuv' ], - [ 'bar', '45', 'lmno' ] -], { align: [ 'l', 'c', 'l' ] }); -console.log(t); diff --git a/tools/eslint/node_modules/text-table/example/dotalign.js b/tools/eslint/node_modules/text-table/example/dotalign.js deleted file mode 100644 index 2cea6299368475..00000000000000 --- a/tools/eslint/node_modules/text-table/example/dotalign.js +++ /dev/null @@ -1,9 +0,0 @@ -var table = require('../'); -var t = table([ - [ 'beep', '1024' ], - [ 'boop', '334.212' ], - [ 'foo', '1006' ], - [ 'bar', '45.6' ], - [ 'baz', '123.' ] -], { align: [ 'l', '.' ] }); -console.log(t); diff --git a/tools/eslint/node_modules/text-table/example/doubledot.js b/tools/eslint/node_modules/text-table/example/doubledot.js deleted file mode 100644 index bab983b664cd6d..00000000000000 --- a/tools/eslint/node_modules/text-table/example/doubledot.js +++ /dev/null @@ -1,11 +0,0 @@ -var table = require('../'); -var t = table([ - [ '0.1.2' ], - [ '11.22.33' ], - [ '5.6.7' ], - [ '1.22222' ], - [ '12345.' ], - [ '5555.' ], - [ '123' ] -], { align: [ '.' ] }); -console.log(t); diff --git a/tools/eslint/node_modules/text-table/example/table.js b/tools/eslint/node_modules/text-table/example/table.js deleted file mode 100644 index 903ea4c417ccb0..00000000000000 --- a/tools/eslint/node_modules/text-table/example/table.js +++ /dev/null @@ -1,6 +0,0 @@ -var table = require('../'); -var t = table([ - [ 'master', '0123456789abcdef' ], - [ 'staging', 'fedcba9876543210' ] -]); -console.log(t); diff --git a/tools/eslint/node_modules/text-table/package.json b/tools/eslint/node_modules/text-table/package.json index 822956753fade0..23457f8f8fcd82 100644 --- a/tools/eslint/node_modules/text-table/package.json +++ b/tools/eslint/node_modules/text-table/package.json @@ -1,54 +1,96 @@ { - "name": "text-table", - "version": "0.2.0", + "_args": [ + [ + "text-table@~0.2.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "text-table@>=0.2.0 <0.3.0", + "_id": "text-table@0.2.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/text-table", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.3.7", + "_phantomChildren": {}, + "_requested": { + "name": "text-table", + "raw": "text-table@~0.2.0", + "rawSpec": "~0.2.0", + "scope": null, + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "_shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4", + "_shrinkwrap": null, + "_spec": "text-table@~0.2.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/text-table/issues" + }, + "dependencies": {}, "description": "borderless text tables with alignment", - "main": "index.js", "devDependencies": { + "cli-color": "~0.2.3", "tap": "~0.4.0", - "tape": "~1.0.2", - "cli-color": "~0.2.3" - }, - "scripts": { - "test": "tap test/*.js" + "tape": "~1.0.2" }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/20..latest", - "firefox/10..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/text-table.git" + "directories": {}, + "dist": { + "shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4", + "tarball": "http://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" }, "homepage": "https://github.com/substack/text-table", "keywords": [ - "text", - "table", "align", "ascii", "rows", - "tabular" + "table", + "tabular", + "text" ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "text-table", + "optionalDependencies": {}, "readme": "# text-table\n\ngenerate borderless text table strings suitable for printing to stdout\n\n[![build status](https://secure.travis-ci.org/substack/text-table.png)](http://travis-ci.org/substack/text-table)\n\n[![browser support](https://ci.testling.com/substack/text-table.png)](http://ci.testling.com/substack/text-table)\n\n# example\n\n## default align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'master', '0123456789abcdef' ],\n [ 'staging', 'fedcba9876543210' ]\n]);\nconsole.log(t);\n```\n\n```\nmaster 0123456789abcdef\nstaging fedcba9876543210\n```\n\n## left-right align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '33450' ],\n [ 'foo', '1006' ],\n [ 'bar', '45' ]\n], { align: [ 'l', 'r' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 33450\nfoo 1006\nbar 45\n```\n\n## dotted align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '334.212' ],\n [ 'foo', '1006' ],\n [ 'bar', '45.6' ],\n [ 'baz', '123.' ]\n], { align: [ 'l', '.' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 334.212\nfoo 1006\nbar 45.6\nbaz 123.\n```\n\n## centered\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024', 'xyz' ],\n [ 'boop', '3388450', 'tuv' ],\n [ 'foo', '10106', 'qrstuv' ],\n [ 'bar', '45', 'lmno' ]\n], { align: [ 'l', 'c', 'l' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024 xyz\nboop 3388450 tuv\nfoo 10106 qrstuv\nbar 45 lmno\n```\n\n# methods\n\n``` js\nvar table = require('text-table')\n```\n\n## var s = table(rows, opts={})\n\nReturn a formatted table string `s` from an array of `rows` and some options\n`opts`.\n\n`rows` should be an array of arrays containing strings, numbers, or other\nprintable values.\n\noptions can be:\n\n* `opts.hsep` - separator to use between columns, default `' '`\n* `opts.align` - array of alignment types for each column, default `['l','l',...]`\n* `opts.stringLength` - callback function to use when calculating the string length\n\nalignment types are:\n\n* `'l'` - left\n* `'r'` - right\n* `'c'` - center\n* `'.'` - decimal\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install text-table\n```\n\n# Use with ANSI-colors\n\nSince the string length of ANSI color schemes does not equal the length\nJavaScript sees internally it is necessary to pass the a custom string length\ncalculator during the main function call.\n\nSee the `test/ansi-colors.js` file for an example.\n\n# license\n\nMIT\n", "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/text-table/issues" + "repository": { + "type": "git", + "url": "git://github.com/substack/text-table.git" }, - "_id": "text-table@0.2.0", - "_shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4", - "_from": "text-table@>=0.2.0 <0.3.0", - "_resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "browsers": [ + "chrome/20..latest", + "firefox/10..latest", + "ie/6..latest", + "ipad/6", + "iphone/6", + "opera/11.0..latest", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "0.2.0" } diff --git a/tools/eslint/node_modules/text-table/test/align.js b/tools/eslint/node_modules/text-table/test/align.js deleted file mode 100644 index 245357f26a76b9..00000000000000 --- a/tools/eslint/node_modules/text-table/test/align.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var table = require('../'); - -test('align', function (t) { - t.plan(1); - var s = table([ - [ 'beep', '1024' ], - [ 'boop', '33450' ], - [ 'foo', '1006' ], - [ 'bar', '45' ] - ], { align: [ 'l', 'r' ] }); - t.equal(s, [ - 'beep 1024', - 'boop 33450', - 'foo 1006', - 'bar 45' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/text-table/test/ansi-colors.js b/tools/eslint/node_modules/text-table/test/ansi-colors.js deleted file mode 100644 index fbc5bb10ad732a..00000000000000 --- a/tools/eslint/node_modules/text-table/test/ansi-colors.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var table = require('../'); -var color = require('cli-color'); -var ansiTrim = require('cli-color/lib/trim'); - -test('center', function (t) { - t.plan(1); - var opts = { - align: [ 'l', 'c', 'l' ], - stringLength: function(s) { return ansiTrim(s).length } - }; - var s = table([ - [ - color.red('Red'), color.green('Green'), color.blue('Blue') - ], - [ - color.bold('Bold'), color.underline('Underline'), - color.italic('Italic') - ], - [ - color.inverse('Inverse'), color.strike('Strike'), - color.blink('Blink') - ], - [ 'bar', '45', 'lmno' ] - ], opts); - t.equal(ansiTrim(s), [ - 'Red Green Blue', - 'Bold Underline Italic', - 'Inverse Strike Blink', - 'bar 45 lmno' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/text-table/test/center.js b/tools/eslint/node_modules/text-table/test/center.js deleted file mode 100644 index c2c7a62a8f8cca..00000000000000 --- a/tools/eslint/node_modules/text-table/test/center.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var table = require('../'); - -test('center', function (t) { - t.plan(1); - var s = table([ - [ 'beep', '1024', 'xyz' ], - [ 'boop', '3388450', 'tuv' ], - [ 'foo', '10106', 'qrstuv' ], - [ 'bar', '45', 'lmno' ] - ], { align: [ 'l', 'c', 'l' ] }); - t.equal(s, [ - 'beep 1024 xyz', - 'boop 3388450 tuv', - 'foo 10106 qrstuv', - 'bar 45 lmno' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/text-table/test/dotalign.js b/tools/eslint/node_modules/text-table/test/dotalign.js deleted file mode 100644 index f804f9281ab135..00000000000000 --- a/tools/eslint/node_modules/text-table/test/dotalign.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var table = require('../'); - -test('dot align', function (t) { - t.plan(1); - var s = table([ - [ 'beep', '1024' ], - [ 'boop', '334.212' ], - [ 'foo', '1006' ], - [ 'bar', '45.6' ], - [ 'baz', '123.' ] - ], { align: [ 'l', '.' ] }); - t.equal(s, [ - 'beep 1024', - 'boop 334.212', - 'foo 1006', - 'bar 45.6', - 'baz 123.' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/text-table/test/doubledot.js b/tools/eslint/node_modules/text-table/test/doubledot.js deleted file mode 100644 index 659b57c9314bca..00000000000000 --- a/tools/eslint/node_modules/text-table/test/doubledot.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tape'); -var table = require('../'); - -test('dot align', function (t) { - t.plan(1); - var s = table([ - [ '0.1.2' ], - [ '11.22.33' ], - [ '5.6.7' ], - [ '1.22222' ], - [ '12345.' ], - [ '5555.' ], - [ '123' ] - ], { align: [ '.' ] }); - t.equal(s, [ - ' 0.1.2', - '11.22.33', - ' 5.6.7', - ' 1.22222', - '12345.', - ' 5555.', - ' 123' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/text-table/test/table.js b/tools/eslint/node_modules/text-table/test/table.js deleted file mode 100644 index 9c6701464cf66a..00000000000000 --- a/tools/eslint/node_modules/text-table/test/table.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require('tape'); -var table = require('../'); - -test('table', function (t) { - t.plan(1); - var s = table([ - [ 'master', '0123456789abcdef' ], - [ 'staging', 'fedcba9876543210' ] - ]); - t.equal(s, [ - 'master 0123456789abcdef', - 'staging fedcba9876543210' - ].join('\n')); -}); diff --git a/tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.APACHE2 b/tools/eslint/node_modules/through/LICENSE.APACHE2 similarity index 100% rename from tools/eslint/node_modules/inquirer/node_modules/through/LICENSE.APACHE2 rename to tools/eslint/node_modules/through/LICENSE.APACHE2 diff --git a/tools/eslint/node_modules/through/LICENSE.MIT b/tools/eslint/node_modules/through/LICENSE.MIT new file mode 100644 index 00000000000000..49e7da41fec2be --- /dev/null +++ b/tools/eslint/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +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/eslint/node_modules/through/index.js b/tools/eslint/node_modules/through/index.js new file mode 100644 index 00000000000000..9f443ffd2b1936 --- /dev/null +++ b/tools/eslint/node_modules/through/index.js @@ -0,0 +1,107 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} diff --git a/tools/eslint/node_modules/through/package.json b/tools/eslint/node_modules/through/package.json new file mode 100644 index 00000000000000..10e4f47edb9713 --- /dev/null +++ b/tools/eslint/node_modules/through/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "through@^2.3.6", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer" + ] + ], + "_from": "through@>=2.3.6 <3.0.0", + "_id": "through@2.3.8", + "_inCache": true, + "_installable": true, + "_location": "/eslint/through", + "_nodeVersion": "2.3.1", + "_npmUser": { + "email": "dominic.tarr@gmail.com", + "name": "dominictarr" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "name": "through", + "raw": "through@^2.3.6", + "rawSpec": "^2.3.6", + "scope": null, + "spec": ">=2.3.6 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/inquirer" + ], + "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "_shrinkwrap": null, + "_spec": "through@^2.3.6", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inquirer", + "author": { + "email": "dominic.tarr@gmail.com", + "name": "Dominic Tarr", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/through/issues" + }, + "dependencies": {}, + "description": "simplified stream construction", + "devDependencies": { + "from": "~0.1.3", + "stream-spec": "~0.3.5", + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "tarball": "http://registry.npmjs.org/through/-/through-2.3.8.tgz" + }, + "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", + "homepage": "https://github.com/dominictarr/through", + "keywords": [ + "pipe", + "stream", + "streams", + "user-streams" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "through", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/through.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "testling": { + "browsers": [ + "chrome/20..latest", + "ff/15..latest", + "ie/8..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "2.3.8" +} diff --git a/tools/eslint/node_modules/through/readme.markdown b/tools/eslint/node_modules/through/readme.markdown new file mode 100644 index 00000000000000..4939fffe422cf5 --- /dev/null +++ b/tools/eslint/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/tools/eslint/node_modules/tryit/README.md b/tools/eslint/node_modules/tryit/README.md new file mode 100644 index 00000000000000..25a6ad580962f4 --- /dev/null +++ b/tools/eslint/node_modules/tryit/README.md @@ -0,0 +1,56 @@ +# tryit + +Tiny module wrapping try/catch in JavaScript. + +It's *literally 11 lines of code*, [just read it](tryit.js) that's all the documentation you'll need. + + +## install + +``` +npm install tryit +``` + +## usage + +What you'd normally do: +```js +try { + dangerousThing(); +} catch (e) { + console.log('something'); +} +``` + +With try-it (all it does is wrap try-catch) +```js +var tryit = require('tryit'); + +tryit(dangerousThing); +``` + +You can also handle the error by passing a second function +```js +tryit(dangerousThing, function (e) { + if (e) { + console.log('do something'); + } +}) +``` + +The second function follows error-first pattern common in node. So if you pass a callback it gets called in both cases. But will have an error as the first argument if it fails. + +## WHAT? WHY DO THIS!? + +Primary motivation is having a clean way to wrap things that might fail, where I don't care if it fails. I just want to try it. + +This includes stuff like blindly reading/parsing stuff from localStorage in the browser. If it's not there or if parsing it fails, that's fine. But I don't want to leave a bunch of empty `catch (e) {}` blocks in the code. + +Obviously, this is useful any time you're going to attempt to read some unknown data structure. + +In addition, my understanding is that it's hard for JS engines to optimize code in try blocks. By actually passing the code to be executed into a re-used try block, we can avoid having to have more than a single try block in our app. Again, this is not a primary motivation, just a potential side benefit. + + +## license + +[MIT](http://mit.joreteg.com/) diff --git a/tools/eslint/node_modules/tryit/package.json b/tools/eslint/node_modules/tryit/package.json new file mode 100644 index 00000000000000..a17558af7c4d32 --- /dev/null +++ b/tools/eslint/node_modules/tryit/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "tryit@^1.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-resolvable" + ] + ], + "_from": "tryit@>=1.0.1 <2.0.0", + "_id": "tryit@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/tryit", + "_nodeVersion": "4.1.0", + "_npmUser": { + "email": "henrik@joreteg.com", + "name": "henrikjoreteg" + }, + "_npmVersion": "3.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "tryit", + "raw": "tryit@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/is-resolvable" + ], + "_resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz", + "_shasum": "c196b0073e6b1c595d93c9c830855b7acc32a453", + "_shrinkwrap": null, + "_spec": "tryit@^1.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-resolvable", + "author": { + "email": "henrik@andyet.net", + "name": "Henrik Joreteg" + }, + "bugs": { + "url": "https://github.com/HenrikJoreteg/tryit/issues" + }, + "dependencies": {}, + "description": "Module to wrap try-catch for better performance and cleaner API.", + "devDependencies": { + "tap-spec": "^2.1.2", + "tape": "^3.0.3" + }, + "directories": {}, + "dist": { + "shasum": "c196b0073e6b1c595d93c9c830855b7acc32a453", + "tarball": "http://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" + }, + "gitHead": "b567b4feb491e2ee89addd3d06f66d6ec2217cf5", + "homepage": "https://github.com/HenrikJoreteg/tryit#readme", + "keywords": [ + "errorhandling", + "errors", + "try" + ], + "license": "MIT", + "main": "tryit.js", + "maintainers": [ + { + "name": "henrikjoreteg", + "email": "henrik@andyet.net" + } + ], + "name": "tryit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/HenrikJoreteg/tryit.git" + }, + "scripts": { + "test": "node test/test.js | tap-spec" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/tryit/tryit.js b/tools/eslint/node_modules/tryit/tryit.js new file mode 100644 index 00000000000000..98a57007ea178b --- /dev/null +++ b/tools/eslint/node_modules/tryit/tryit.js @@ -0,0 +1,14 @@ +// tryit +// Simple, re-usuable try-catch, this is a performance optimization +// and provides a cleaner API. +module.exports = function (fn, cb) { + var err; + + try { + fn(); + } catch (e) { + err = e; + } + + if (cb) cb(err || null); +}; diff --git a/tools/eslint/node_modules/optionator/node_modules/type-check/LICENSE b/tools/eslint/node_modules/type-check/LICENSE similarity index 100% rename from tools/eslint/node_modules/optionator/node_modules/type-check/LICENSE rename to tools/eslint/node_modules/type-check/LICENSE diff --git a/tools/eslint/node_modules/type-check/README.md b/tools/eslint/node_modules/type-check/README.md new file mode 100644 index 00000000000000..ec92d5930b9566 --- /dev/null +++ b/tools/eslint/node_modules/type-check/README.md @@ -0,0 +1,210 @@ +# type-check [![Build Status](https://travis-ci.org/gkz/type-check.png?branch=master)](https://travis-ci.org/gkz/type-check) + + + +`type-check` is a library which allows you to check the types of JavaScript values at runtime with a Haskell like type syntax. It is great for checking external input, for testing, or even for adding a bit of safety to your internal code. It is a major component of [levn](https://github.com/gkz/levn). MIT license. Version 0.3.2. Check out the [demo](http://gkz.github.io/type-check/). + +For updates on `type-check`, [follow me on twitter](https://twitter.com/gkzahariev). + + npm install type-check + +## Quick Examples + +```js +// Basic types: +var typeCheck = require('type-check').typeCheck; +typeCheck('Number', 1); // true +typeCheck('Number', 'str'); // false +typeCheck('Error', new Error); // true +typeCheck('Undefined', undefined); // true + +// Comment +typeCheck('count::Number', 1); // true + +// One type OR another type: +typeCheck('Number | String', 2); // true +typeCheck('Number | String', 'str'); // true + +// Wildcard, matches all types: +typeCheck('*', 2) // true + +// Array, all elements of a single type: +typeCheck('[Number]', [1, 2, 3]); // true +typeCheck('[Number]', [1, 'str', 3]); // false + +// Tuples, or fixed length arrays with elements of different types: +typeCheck('(String, Number)', ['str', 2]); // true +typeCheck('(String, Number)', ['str']); // false +typeCheck('(String, Number)', ['str', 2, 5]); // false + +// Object properties: +typeCheck('{x: Number, y: Boolean}', {x: 2, y: false}); // true +typeCheck('{x: Number, y: Boolean}', {x: 2}); // false +typeCheck('{x: Number, y: Maybe Boolean}', {x: 2}); // true +typeCheck('{x: Number, y: Boolean}', {x: 2, y: false, z: 3}); // false +typeCheck('{x: Number, y: Boolean, ...}', {x: 2, y: false, z: 3}); // true + +// A particular type AND object properties: +typeCheck('RegExp{source: String, ...}', /re/i); // true +typeCheck('RegExp{source: String, ...}', {source: 're'}); // false + +// Custom types: +var opt = {customTypes: + {Even: { typeOf: 'Number', validate: function(x) { return x % 2 === 0; }}}}; +typeCheck('Even', 2, opt); // true + +// Nested: +var type = '{a: (String, [Number], {y: Array, ...}), b: Error{message: String, ...}}' +typeCheck(type, {a: ['hi', [1, 2, 3], {y: [1, 'ms']}], b: new Error('oh no')}); // true +``` + +Check out the [type syntax format](#syntax) and [guide](#guide). + +## Usage + +`require('type-check');` returns an object that exposes four properties. `VERSION` is the current version of the library as a string. `typeCheck`, `parseType`, and `parsedTypeCheck` are functions. + +```js +// typeCheck(type, input, options); +typeCheck('Number', 2); // true + +// parseType(type); +var parsedType = parseType('Number'); // object + +// parsedTypeCheck(parsedType, input, options); +parsedTypeCheck(parsedType, 2); // true +``` + +### typeCheck(type, input, options) + +`typeCheck` checks a JavaScript value `input` against `type` written in the [type format](#type-format) (and taking account the optional `options`) and returns whether the `input` matches the `type`. + +##### arguments +* type - `String` - the type written in the [type format](#type-format) which to check against +* input - `*` - any JavaScript value, which is to be checked against the type +* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types) + +##### returns +`Boolean` - whether the input matches the type + +##### example +```js +typeCheck('Number', 2); // true +``` + +### parseType(type) + +`parseType` parses string `type` written in the [type format](#type-format) into an object representing the parsed type. + +##### arguments +* type - `String` - the type written in the [type format](#type-format) which to parse + +##### returns +`Object` - an object in the parsed type format representing the parsed type + +##### example +```js +parseType('Number'); // [{type: 'Number'}] +``` +### parsedTypeCheck(parsedType, input, options) + +`parsedTypeCheck` checks a JavaScript value `input` against parsed `type` in the parsed type format (and taking account the optional `options`) and returns whether the `input` matches the `type`. Use this in conjunction with `parseType` if you are going to use a type more than once. + +##### arguments +* type - `Object` - the type in the parsed type format which to check against +* input - `*` - any JavaScript value, which is to be checked against the type +* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types) + +##### returns +`Boolean` - whether the input matches the type + +##### example +```js +parsedTypeCheck([{type: 'Number'}], 2); // true +var parsedType = parseType('String'); +parsedTypeCheck(parsedType, 'str'); // true +``` + + +## Type Format + +### Syntax + +White space is ignored. The root node is a __Types__. + +* __Identifier__ = `[\$\w]+` - a group of any lower or upper case letters, numbers, underscores, or dollar signs - eg. `String` +* __Type__ = an `Identifier`, an `Identifier` followed by a `Structure`, just a `Structure`, or a wildcard `*` - eg. `String`, `Object{x: Number}`, `{x: Number}`, `Array{0: String, 1: Boolean, length: Number}`, `*` +* __Types__ = optionally a comment (an `Indentifier` followed by a `::`), optionally the identifier `Maybe`, one or more `Type`, separated by `|` - eg. `Number`, `String | Date`, `Maybe Number`, `Maybe Boolean | String` +* __Structure__ = `Fields`, or a `Tuple`, or an `Array` - eg. `{x: Number}`, `(String, Number)`, `[Date]` +* __Fields__ = a `{`, followed one or more `Field` separated by a comma `,` (trailing comma `,` is permitted), optionally an `...` (always preceded by a comma `,`), followed by a `}` - eg. `{x: Number, y: String}`, `{k: Function, ...}` +* __Field__ = an `Identifier`, followed by a colon `:`, followed by `Types` - eg. `x: Date | String`, `y: Boolean` +* __Tuple__ = a `(`, followed by one or more `Types` separated by a comma `,` (trailing comma `,` is permitted), followed by a `)` - eg `(Date)`, `(Number, Date)` +* __Array__ = a `[` followed by exactly one `Types` followed by a `]` - eg. `[Boolean]`, `[Boolean | Null]` + +### Guide + +`type-check` uses `Object.toString` to find out the basic type of a value. Specifically, + +```js +{}.toString.call(VALUE).slice(8, -1) +{}.toString.call(true).slice(8, -1) // 'Boolean' +``` +A basic type, eg. `Number`, uses this check. This is much more versatile than using `typeof` - for example, with `document`, `typeof` produces `'object'` which isn't that useful, and our technique produces `'HTMLDocument'`. + +You may check for multiple types by separating types with a `|`. The checker proceeds from left to right, and passes if the value is any of the types - eg. `String | Boolean` first checks if the value is a string, and then if it is a boolean. If it is none of those, then it returns false. + +Adding a `Maybe` in front of a list of multiple types is the same as also checking for `Null` and `Undefined` - eg. `Maybe String` is equivalent to `Undefined | Null | String`. + +You may add a comment to remind you of what the type is for by following an identifier with a `::` before a type (or multiple types). The comment is simply thrown out. + +The wildcard `*` matches all types. + +There are three types of structures for checking the contents of a value: 'fields', 'tuple', and 'array'. + +If used by itself, a 'fields' structure will pass with any type of object as long as it is an instance of `Object` and the properties pass - this allows for duck typing - eg. `{x: Boolean}`. + +To check if the properties pass, and the value is of a certain type, you can specify the type - eg. `Error{message: String}`. + +If you want to make a field optional, you can simply use `Maybe` - eg. `{x: Boolean, y: Maybe String}` will still pass if `y` is undefined (or null). + +If you don't care if the value has properties beyond what you have specified, you can use the 'etc' operator `...` - eg. `{x: Boolean, ...}` will match an object with an `x` property that is a boolean, and with zero or more other properties. + +For an array, you must specify one or more types (separated by `|`) - it will pass for something of any length as long as each element passes the types provided - eg. `[Number]`, `[Number | String]`. + +A tuple checks for a fixed number of elements, each of a potentially different type. Each element is separated by a comma - eg. `(String, Number)`. + +An array and tuple structure check that the value is of type `Array` by default, but if another type is specified, they will check for that instead - eg. `Int32Array[Number]`. You can use the wildcard `*` to search for any type at all. + +Check out the [type precedence](https://github.com/zaboco/type-precedence) library for type-check. + +## Options + +Options is an object. It is an optional parameter to the `typeCheck` and `parsedTypeCheck` functions. The only current option is `customTypes`. + + +### Custom Types + +__Example:__ + +```js +var options = { + customTypes: { + Even: { + typeOf: 'Number', + validate: function(x) { + return x % 2 === 0; + } + } + } +}; +typeCheck('Even', 2, options); // true +typeCheck('Even', 3, options); // false +``` + +`customTypes` allows you to set up custom types for validation. The value of this is an object. The keys of the object are the types you will be matching. Each value of the object will be an object having a `typeOf` property - a string, and `validate` property - a function. + +The `typeOf` property is the type the value should be, and `validate` is a function which should return true if the value is of that type. `validate` receives one parameter, which is the value that we are checking. + +## Technical About + +`type-check` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It also uses the [prelude.ls](http://preludels.com/) library. diff --git a/tools/eslint/node_modules/optionator/node_modules/type-check/lib/check.js b/tools/eslint/node_modules/type-check/lib/check.js similarity index 99% rename from tools/eslint/node_modules/optionator/node_modules/type-check/lib/check.js rename to tools/eslint/node_modules/type-check/lib/check.js index c1e51ff90b0173..0504c8d2f4aceb 100644 --- a/tools/eslint/node_modules/optionator/node_modules/type-check/lib/check.js +++ b/tools/eslint/node_modules/type-check/lib/check.js @@ -1,4 +1,4 @@ -// Generated by LiveScript 1.2.0 +// Generated by LiveScript 1.4.0 (function(){ var ref$, any, all, isItNaN, types, defaultType, customTypes, toString$ = {}.toString; ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN; diff --git a/tools/eslint/node_modules/type-check/lib/index.js b/tools/eslint/node_modules/type-check/lib/index.js new file mode 100644 index 00000000000000..f3316bab490280 --- /dev/null +++ b/tools/eslint/node_modules/type-check/lib/index.js @@ -0,0 +1,16 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var VERSION, parseType, parsedTypeCheck, typeCheck; + VERSION = '0.3.2'; + parseType = require('./parse-type'); + parsedTypeCheck = require('./check'); + typeCheck = function(type, input, options){ + return parsedTypeCheck(parseType(type), input, options); + }; + module.exports = { + VERSION: VERSION, + typeCheck: typeCheck, + parsedTypeCheck: parsedTypeCheck, + parseType: parseType + }; +}).call(this); diff --git a/tools/eslint/node_modules/optionator/node_modules/type-check/lib/parse-type.js b/tools/eslint/node_modules/type-check/lib/parse-type.js similarity index 99% rename from tools/eslint/node_modules/optionator/node_modules/type-check/lib/parse-type.js rename to tools/eslint/node_modules/type-check/lib/parse-type.js index 32c3a460e33644..5baf661faec65f 100644 --- a/tools/eslint/node_modules/optionator/node_modules/type-check/lib/parse-type.js +++ b/tools/eslint/node_modules/type-check/lib/parse-type.js @@ -1,4 +1,4 @@ -// Generated by LiveScript 1.2.0 +// Generated by LiveScript 1.4.0 (function(){ var identifierRegex, tokenRegex; identifierRegex = /[\$\w]+/; diff --git a/tools/eslint/node_modules/type-check/package.json b/tools/eslint/node_modules/type-check/package.json new file mode 100644 index 00000000000000..d4319c26bce57d --- /dev/null +++ b/tools/eslint/node_modules/type-check/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "type-check@~0.3.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator" + ] + ], + "_from": "type-check@>=0.3.1 <0.4.0", + "_id": "type-check@0.3.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/type-check", + "_nodeVersion": "4.2.4", + "_npmUser": { + "email": "z@georgezahariev.com", + "name": "gkz" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "name": "type-check", + "raw": "type-check@~0.3.1", + "rawSpec": "~0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/levn", + "/eslint/optionator" + ], + "_resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "_shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", + "_shrinkwrap": null, + "_spec": "type-check@~0.3.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optionator", + "author": { + "email": "z@georgezahariev.com", + "name": "George Zahariev" + }, + "bugs": { + "url": "https://github.com/gkz/type-check/issues" + }, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.", + "devDependencies": { + "browserify": "~12.0.1", + "istanbul": "~0.4.1", + "livescript": "~1.4.0", + "mocha": "~2.3.4" + }, + "directories": {}, + "dist": { + "shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", + "tarball": "http://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "LICENSE", + "README.md", + "lib" + ], + "gitHead": "0ab04e7a660485d0cc3aa87e95f2f9a6464cf8e6", + "homepage": "https://github.com/gkz/type-check", + "keywords": [ + "check", + "checking", + "library", + "type" + ], + "license": "MIT", + "main": "./lib/", + "maintainers": [ + { + "name": "gkz", + "email": "z@georgezahariev.com" + } + ], + "name": "type-check", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/gkz/type-check.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.3.2" +} diff --git a/tools/eslint/node_modules/concat-stream/node_modules/typedarray/LICENSE b/tools/eslint/node_modules/typedarray/LICENSE similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/typedarray/LICENSE rename to tools/eslint/node_modules/typedarray/LICENSE diff --git a/tools/eslint/node_modules/concat-stream/node_modules/typedarray/index.js b/tools/eslint/node_modules/typedarray/index.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/typedarray/index.js rename to tools/eslint/node_modules/typedarray/index.js diff --git a/tools/eslint/node_modules/typedarray/package.json b/tools/eslint/node_modules/typedarray/package.json new file mode 100644 index 00000000000000..50819023abf47e --- /dev/null +++ b/tools/eslint/node_modules/typedarray/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "typedarray@~0.0.5", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/concat-stream" + ] + ], + "_from": "typedarray@>=0.0.5 <0.1.0", + "_id": "typedarray@0.0.6", + "_inCache": true, + "_installable": true, + "_location": "/eslint/typedarray", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "name": "typedarray", + "raw": "typedarray@~0.0.5", + "rawSpec": "~0.0.5", + "scope": null, + "spec": ">=0.0.5 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/concat-stream" + ], + "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", + "_shrinkwrap": null, + "_spec": "typedarray@~0.0.5", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/concat-stream", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/typedarray/issues" + }, + "dependencies": {}, + "description": "TypedArray polyfill for old browsers", + "devDependencies": { + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", + "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + }, + "homepage": "https://github.com/substack/typedarray", + "keywords": [ + "ArrayBuffer", + "DataView", + "Float32Array", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "array", + "polyfill", + "typed" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "typedarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/typedarray.git" + }, + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "testling": { + "browsers": [ + "android-browser/4.2..latest", + "chrome/22..latest", + "chrome/canary", + "firefox/16..latest", + "firefox/nightly", + "ie/6..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "opera/12..latest", + "opera/next", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "0.0.6" +} diff --git a/tools/eslint/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/tools/eslint/node_modules/typedarray/readme.markdown similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/typedarray/readme.markdown rename to tools/eslint/node_modules/typedarray/readme.markdown diff --git a/tools/eslint/node_modules/uglify-js/LICENSE b/tools/eslint/node_modules/uglify-js/LICENSE new file mode 100644 index 00000000000000..dd7706f0cbfaff --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/LICENSE @@ -0,0 +1,29 @@ +UglifyJS is released under the BSD license: + +Copyright 2012-2013 (c) Mihai Bazon + +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 HOLDER “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 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/tools/eslint/node_modules/uglify-js/README.md b/tools/eslint/node_modules/uglify-js/README.md new file mode 100644 index 00000000000000..bd0d7c483b5b13 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/README.md @@ -0,0 +1,790 @@ +UglifyJS 2 +========== +[![Build Status](https://travis-ci.org/mishoo/UglifyJS2.svg)](https://travis-ci.org/mishoo/UglifyJS2) + +UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. + +This page documents the command line utility. For +[API and internals documentation see my website](http://lisperator.net/uglifyjs/). +There's also an +[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox, +Chrome and probably Safari). + +Install +------- + +First make sure you have installed the latest version of [node.js](http://nodejs.org/) +(You may need to restart your computer after this step). + +From NPM for use as a command line app: + + npm install uglify-js -g + +From NPM for programmatic use: + + npm install uglify-js + +From Git: + + git clone git://github.com/mishoo/UglifyJS2.git + cd UglifyJS2 + npm link . + +Usage +----- + + uglifyjs [input files] [options] + +UglifyJS2 can take multiple input files. It's recommended that you pass the +input files first, then pass the options. UglifyJS will parse input files +in sequence and apply any compression options. The files are parsed in the +same global scope, that is, a reference from a file to some +variable/function declared in another file will be matched properly. + +If you want to read from STDIN instead, pass a single dash instead of input +files. + +If you wish to pass your options before the input files, separate the two with +a double dash to prevent input files being used as option arguments: + + uglifyjs --compress --mangle -- input.js + +The available options are: + +``` + --source-map Specify an output file where to generate source + map. + --source-map-root The path to the original source to be included + in the source map. + --source-map-url The path to the source map to be added in //# + sourceMappingURL. Defaults to the value passed + with --source-map. + --source-map-include-sources Pass this flag if you want to include the + content of source files in the source map as + sourcesContent property. + --in-source-map Input source map, useful if you're compressing + JS that was generated from some other original + code. + --screw-ie8 Pass this flag if you don't care about full + compliance with Internet Explorer 6-8 quirks + (by default UglifyJS will try to be IE-proof). + --expr Parse a single expression, rather than a + program (for parsing JSON) + -p, --prefix Skip prefix for original filenames that appear + in source maps. For example -p 3 will drop 3 + directories from file names and ensure they are + relative paths. You can also specify -p + relative, which will make UglifyJS figure out + itself the relative paths between original + sources, the source map and the output file. + -o, --output Output file (default STDOUT). + -b, --beautify Beautify output/specify output options. + -m, --mangle Mangle names/pass mangler options. + -r, --reserved Reserved names to exclude from mangling. + -c, --compress Enable compressor/pass compressor options. Pass + options like -c + hoist_vars=false,if_return=false. Use -c with + no argument to use the default compression + options. + -d, --define Global definitions + -e, --enclose Embed everything in a big function, with a + configurable parameter/argument list. + --comments Preserve copyright comments in the output. By + default this works like Google Closure, keeping + JSDoc-style comments that contain "@license" or + "@preserve". You can optionally pass one of the + following arguments to this flag: + - "all" to keep all comments + - a valid JS regexp (needs to start with a + slash) to keep only comments that match. + Note that currently not *all* comments can be + kept when compression is on, because of dead + code removal or cascading statements into + sequences. + --preamble Preamble to prepend to the output. You can use + this to insert a comment, for example for + licensing information. This will not be + parsed, but the source map will adjust for its + presence. + --stats Display operations run time on STDERR. + --acorn Use Acorn for parsing. + --spidermonkey Assume input files are SpiderMonkey AST format + (as JSON). + --self Build itself (UglifyJS2) as a library (implies + --wrap=UglifyJS --export-all) + --wrap Embed everything in a big function, making the + “exports” and “global” variables available. You + need to pass an argument to this option to + specify the name that your module will take + when included in, say, a browser. + --export-all Only used when --wrap, this tells UglifyJS to + add code to automatically export all globals. + --lint Display some scope warnings + -v, --verbose Verbose + -V, --version Print version number and exit. + --noerr Don't throw an error for unknown options in -c, + -b or -m. + --bare-returns Allow return outside of functions. Useful when + minifying CommonJS modules. + --keep-fnames Do not mangle/drop function names. Useful for + code relying on Function.prototype.name. + --reserved-file File containing reserved names + --reserve-domprops Make (most?) DOM properties reserved for + --mangle-props + --mangle-props Mangle property names + --mangle-regex Only mangle property names matching the regex + --name-cache File to hold mangled names mappings + --pure-funcs List of functions that can be safely removed if + their return value is not used [array] +``` + +Specify `--output` (`-o`) to declare the output file. Otherwise the output +goes to STDOUT. + +## Source map options + +UglifyJS2 can generate a source map file, which is highly useful for +debugging your compressed JavaScript. To get a source map, pass +`--source-map output.js.map` (full path to the file where you want the +source map dumped). + +Additionally you might need `--source-map-root` to pass the URL where the +original files can be found. In case you are passing full paths to input +files to UglifyJS, you can use `--prefix` (`-p`) to specify the number of +directories to drop from the path prefix when declaring files in the source +map. + +For example: + + uglifyjs /home/doe/work/foo/src/js/file1.js \ + /home/doe/work/foo/src/js/file2.js \ + -o foo.min.js \ + --source-map foo.min.js.map \ + --source-map-root http://foo.com/src \ + -p 5 -c -m + +The above will compress and mangle `file1.js` and `file2.js`, will drop the +output in `foo.min.js` and the source map in `foo.min.js.map`. The source +mapping will refer to `http://foo.com/src/js/file1.js` and +`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` +as the source map root, and the original files as `js/file1.js` and +`js/file2.js`). + +### Composed source map + +When you're compressing JS code that was output by a compiler such as +CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd +like to map back to the original code (i.e. CoffeeScript). UglifyJS has an +option to take an input source map. Assuming you have a mapping from +CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → +compressed JS by mapping every token in the compiled JS to its original +location. + +To use this feature you need to pass `--in-source-map +/path/to/input/source.map`. Normally the input source map should also point +to the file containing the generated JS, so if that's correct you can omit +input files from the command line. + +## Mangler options + +To enable the mangler you need to pass `--mangle` (`-m`). The following +(comma-separated) options are supported: + +- `sort` — to assign shorter names to most frequently used variables. This + saves a few hundred bytes on jQuery before gzip, but the output is + _bigger_ after gzip (and seems to happen for other libraries I tried it + on) therefore it's not enabled by default. + +- `toplevel` — mangle names declared in the toplevel scope (disabled by + default). + +- `eval` — mangle names visible in scopes where `eval` or `with` are used + (disabled by default). + +When mangling is enabled but you want to prevent certain names from being +mangled, you can declare those names with `--reserved` (`-r`) — pass a +comma-separated list of names. For example: + + uglifyjs ... -m -r '$,require,exports' + +to prevent the `require`, `exports` and `$` names from being changed. + +### Mangling property names (`--mangle-props`) + +**Note:** this will probably break your code. Mangling property names is a +separate step, different from variable name mangling. Pass +`--mangle-props`. It will mangle all properties that are seen in some +object literal, or that are assigned to. For example: + +```js +var x = { + foo: 1 +}; + +x.bar = 2; +x["baz"] = 3; +x[condition ? "moo" : "boo"] = 4; +console.log(x.something()); +``` + +In the above code, `foo`, `bar`, `baz`, `moo` and `boo` will be replaced +with single characters, while `something()` will be left as is. + +In order for this to be of any use, we should avoid mangling standard JS +names. For instance, if your code would contain `x.length = 10`, then +`length` becomes a candidate for mangling and it will be mangled throughout +the code, regardless if it's being used as part of your own objects or +accessing an array's length. To avoid that, you can use `--reserved-file` +to pass a filename that should contain the names to be excluded from +mangling. This file can be used both for excluding variable names and +property names. It could look like this, for example: + +```js +{ + "vars": [ "define", "require", ... ], + "props": [ "length", "prototype", ... ] +} +``` + +`--reserved-file` can be an array of file names (either a single +comma-separated argument, or you can pass multiple `--reserved-file` +arguments) — in this case it will exclude names from all those files. + +A default exclusion file is provided in `tools/domprops.json` which should +cover most standard JS and DOM properties defined in various browsers. Pass +`--reserve-domprops` to read that in. + +You can also use a regular expression to define which property names should be +mangled. For example, `--mangle-regex="/^_/"` will only mangle property names +that start with an underscore. + +When you compress multiple files using this option, in order for them to +work together in the end we need to ensure somehow that one property gets +mangled to the same name in all of them. For this, pass `--name-cache +filename.json` and UglifyJS will maintain these mappings in a file which can +then be reused. It should be initially empty. Example: + +``` +rm -f /tmp/cache.json # start fresh +uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js +uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js +``` + +Now, `part1.js` and `part2.js` will be consistent with each other in terms +of mangled property names. + +Using the name cache is not necessary if you compress all your files in a +single call to UglifyJS. + +## Compressor options + +You need to pass `--compress` (`-c`) to enable the compressor. Optionally +you can pass a comma-separated list of options. Options are in the form +`foo=bar`, or just `foo` (the latter implies a boolean option that you want +to set `true`; it's effectively a shortcut for `foo=true`). + +- `sequences` -- join consecutive simple statements using the comma operator + +- `properties` -- rewrite property access using the dot notation, for + example `foo["bar"] → foo.bar` + +- `dead_code` -- remove unreachable code + +- `drop_debugger` -- remove `debugger;` statements + +- `unsafe` (default: false) -- apply "unsafe" transformations (discussion below) + +- `conditionals` -- apply optimizations for `if`-s and conditional + expressions + +- `comparisons` -- apply certain optimizations to binary nodes, for example: + `!(a <= b) → a > b` (only when `unsafe`), attempts to negate binary nodes, + e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. + +- `evaluate` -- attempt to evaluate constant expressions + +- `booleans` -- various optimizations for boolean context, for example `!!a + ? b : c → a ? b : c` + +- `loops` -- optimizations for `do`, `while` and `for` loops when we can + statically determine the condition + +- `unused` -- drop unreferenced functions and variables + +- `hoist_funs` -- hoist function declarations + +- `hoist_vars` (default: false) -- hoist `var` declarations (this is `false` + by default because it seems to increase the size of the output in general) + +- `if_return` -- optimizations for if/return and if/continue + +- `join_vars` -- join consecutive `var` statements + +- `cascade` -- small optimization for sequences, transform `x, x` into `x` + and `x = something(), x` into `x = something()` + +- `warnings` -- display warnings when dropping unreachable code or unused + declarations etc. + +- `negate_iife` -- negate "Immediately-Called Function Expressions" + where the return value is discarded, to avoid the parens that the + code generator would insert. + +- `pure_getters` -- the default is `false`. If you pass `true` for + this, UglifyJS will assume that object property access + (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. + +- `pure_funcs` -- default `null`. You can pass an array of names and + UglifyJS will assume that those functions do not produce side + effects. DANGER: will not check if the name is redefined in scope. + An example case here, for instance `var q = Math.floor(a/b)`. If + variable `q` is not used elsewhere, UglifyJS will drop it, but will + still keep the `Math.floor(a/b)`, not knowing what it does. You can + pass `pure_funcs: [ 'Math.floor' ]` to let it know that this + function won't produce any side effect, in which case the whole + statement would get discarded. The current implementation adds some + overhead (compression will be slower). + +- `drop_console` -- default `false`. Pass `true` to discard calls to + `console.*` functions. + +- `keep_fargs` -- default `true`. Prevents the + compressor from discarding unused function arguments. You need this + for code which relies on `Function.length`. + +- `keep_fnames` -- default `false`. Pass `true` to prevent the + compressor from mangling/discarding function names. Useful for code relying on + `Function.prototype.name`. + + +### The `unsafe` option + +It enables some transformations that *might* break code logic in certain +contrived cases, but should be fine for most code. You might want to try it +on your own code, it should reduce the minified size. Here's what happens +when this flag is on: + +- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]` +- `new Object()` → `{}` +- `String(exp)` or `exp.toString()` → `"" + exp` +- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` +- `typeof foo == "undefined"` → `foo === void 0` +- `void 0` → `undefined` (if there is a variable named "undefined" in + scope; we do it because the variable name will be mangled, typically + reduced to a single character) + +### Conditional compilation + +You can use the `--define` (`-d`) switch in order to declare global +variables that UglifyJS will assume to be constants (unless defined in +scope). For example if you pass `--define DEBUG=false` then, coupled with +dead code removal UglifyJS will discard the following from the output: +```javascript +if (DEBUG) { + console.log("debug stuff"); +} +``` + +UglifyJS will warn about the condition being always false and about dropping +unreachable code; for now there is no option to turn off only this specific +warning, you can pass `warnings=false` to turn off *all* warnings. + +Another way of doing that is to declare your globals as constants in a +separate file and include it into the build. For example you can have a +`build/defines.js` file with the following: +```javascript +const DEBUG = false; +const PRODUCTION = true; +// etc. +``` + +and build your code like this: + + uglifyjs build/defines.js js/foo.js js/bar.js... -c + +UglifyJS will notice the constants and, since they cannot be altered, it +will evaluate references to them to the value itself and drop unreachable +code as usual. The possible downside of this approach is that the build +will contain the `const` declarations. + + +## Beautifier options + +The code generator tries to output shortest code possible by default. In +case you want beautified output, pass `--beautify` (`-b`). Optionally you +can pass additional arguments that control the code output: + +- `beautify` (default `true`) -- whether to actually beautify the output. + Passing `-b` will set this to true, but you might need to pass `-b` even + when you want to generate minified code, in order to specify additional + arguments, so you can use `-b beautify=false` to override it. +- `indent-level` (default 4) +- `indent-start` (default 0) -- prefix all lines by that many spaces +- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal + objects +- `space-colon` (default `true`) -- insert a space after the colon signs +- `ascii-only` (default `false`) -- escape Unicode characters in strings and + regexps +- `inline-script` (default `false`) -- escape the slash in occurrences of + ` 0) { + print_error("WARN: Ignoring input files since --self was passed"); + } + files = UglifyJS.FILES; + if (!ARGS.wrap) ARGS.wrap = "UglifyJS"; +} + +var ORIG_MAP = ARGS.in_source_map; + +if (ORIG_MAP) { + ORIG_MAP = JSON.parse(fs.readFileSync(ORIG_MAP)); + if (files.length == 0) { + print_error("INFO: Using file from the input source map: " + ORIG_MAP.file); + files = [ ORIG_MAP.file ]; + } + if (ARGS.source_map_root == null) { + ARGS.source_map_root = ORIG_MAP.sourceRoot; + } +} + +if (files.length == 0) { + files = [ "-" ]; +} + +if (files.indexOf("-") >= 0 && ARGS.source_map) { + print_error("ERROR: Source map doesn't work with input from STDIN"); + process.exit(1); +} + +if (files.filter(function(el){ return el == "-" }).length > 1) { + print_error("ERROR: Can read a single file from STDIN (two or more dashes specified)"); + process.exit(1); +} + +var STATS = {}; +var OUTPUT_FILE = ARGS.o; +var TOPLEVEL = null; +var P_RELATIVE = ARGS.p && ARGS.p == "relative"; +var SOURCES_CONTENT = {}; + +var SOURCE_MAP = ARGS.source_map ? UglifyJS.SourceMap({ + file: P_RELATIVE ? path.relative(path.dirname(ARGS.source_map), OUTPUT_FILE) : OUTPUT_FILE, + root: ARGS.source_map_root, + orig: ORIG_MAP, +}) : null; + +OUTPUT_OPTIONS.source_map = SOURCE_MAP; + +try { + var output = UglifyJS.OutputStream(OUTPUT_OPTIONS); + var compressor = COMPRESS && UglifyJS.Compressor(COMPRESS); +} catch(ex) { + if (ex instanceof UglifyJS.DefaultsError) { + print_error(ex.msg); + print_error("Supported options:"); + print_error(sys.inspect(ex.defs)); + process.exit(1); + } +} + +async.eachLimit(files, 1, function (file, cb) { + read_whole_file(file, function (err, code) { + if (err) { + print_error("ERROR: can't read file: " + file); + process.exit(1); + } + if (ARGS.p != null) { + if (P_RELATIVE) { + file = path.relative(path.dirname(ARGS.source_map), file).replace(/\\/g, '/'); + } else { + var p = parseInt(ARGS.p, 10); + if (!isNaN(p)) { + file = file.replace(/^\/+/, "").split(/\/+/).slice(ARGS.p).join("/"); + } + } + } + SOURCES_CONTENT[file] = code; + time_it("parse", function(){ + if (ARGS.spidermonkey) { + var program = JSON.parse(code); + if (!TOPLEVEL) TOPLEVEL = program; + else TOPLEVEL.body = TOPLEVEL.body.concat(program.body); + } + else if (ARGS.acorn) { + TOPLEVEL = acorn.parse(code, { + locations : true, + sourceFile : file, + program : TOPLEVEL + }); + } + else { + try { + TOPLEVEL = UglifyJS.parse(code, { + filename : file, + toplevel : TOPLEVEL, + expression : ARGS.expr, + bare_returns : ARGS.bare_returns, + }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + print_error("Parse error at " + file + ":" + ex.line + "," + ex.col); + print_error(ex.message); + print_error(ex.stack); + process.exit(1); + } + throw ex; + } + }; + }); + cb(); + }); +}, function () { + if (ARGS.acorn || ARGS.spidermonkey) time_it("convert_ast", function(){ + TOPLEVEL = UglifyJS.AST_Node.from_mozilla_ast(TOPLEVEL); + }); + + if (ARGS.wrap != null) { + TOPLEVEL = TOPLEVEL.wrap_commonjs(ARGS.wrap, ARGS.export_all); + } + + if (ARGS.enclose != null) { + var arg_parameter_list = ARGS.enclose; + if (arg_parameter_list === true) { + arg_parameter_list = []; + } + else if (!(arg_parameter_list instanceof Array)) { + arg_parameter_list = [arg_parameter_list]; + } + TOPLEVEL = TOPLEVEL.wrap_enclose(arg_parameter_list); + } + + if (ARGS.mangle_props || ARGS.name_cache) (function(){ + var reserved = RESERVED ? RESERVED.props : null; + var cache = readNameCache("props"); + var regex; + + try { + regex = ARGS.mangle_regex ? extractRegex(ARGS.mangle_regex) : null; + } catch (e) { + print_error("ERROR: Invalid --mangle-regex: " + e.message); + process.exit(1); + } + + TOPLEVEL = UglifyJS.mangle_properties(TOPLEVEL, { + reserved : reserved, + cache : cache, + only_cache : !ARGS.mangle_props, + regex : regex + }); + writeNameCache("props", cache); + })(); + + var SCOPE_IS_NEEDED = COMPRESS || MANGLE || ARGS.lint + var TL_CACHE = readNameCache("vars"); + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope({ screw_ie8: ARGS.screw_ie8, cache: TL_CACHE }); + if (ARGS.lint) { + TOPLEVEL.scope_warnings(); + } + }); + } + + if (COMPRESS) { + time_it("squeeze", function(){ + TOPLEVEL = TOPLEVEL.transform(compressor); + }); + } + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope({ screw_ie8: ARGS.screw_ie8, cache: TL_CACHE }); + if (MANGLE && !TL_CACHE) { + TOPLEVEL.compute_char_frequency(MANGLE); + } + }); + } + + if (MANGLE) time_it("mangle", function(){ + MANGLE.cache = TL_CACHE; + TOPLEVEL.mangle_names(MANGLE); + }); + + writeNameCache("vars", TL_CACHE); + + if (ARGS.source_map_include_sources) { + for (var file in SOURCES_CONTENT) { + if (SOURCES_CONTENT.hasOwnProperty(file)) { + SOURCE_MAP.get().setSourceContent(file, SOURCES_CONTENT[file]); + } + } + } + + if (ARGS.dump_spidermonkey_ast) { + print(JSON.stringify(TOPLEVEL.to_mozilla_ast(), null, 2)); + } else { + time_it("generate", function(){ + TOPLEVEL.print(output); + }); + + output = output.get(); + + if (SOURCE_MAP) { + fs.writeFileSync(ARGS.source_map, SOURCE_MAP, "utf8"); + var source_map_url = ARGS.source_map_url || ( + P_RELATIVE + ? path.relative(path.dirname(OUTPUT_FILE), ARGS.source_map) + : ARGS.source_map + ); + output += "\n//# sourceMappingURL=" + source_map_url; + } + + if (OUTPUT_FILE) { + fs.writeFileSync(OUTPUT_FILE, output, "utf8"); + } else { + print(output); + } + } + + if (ARGS.stats) { + print_error(UglifyJS.string_template("Timing information (compressed {count} files):", { + count: files.length + })); + for (var i in STATS) if (STATS.hasOwnProperty(i)) { + print_error(UglifyJS.string_template("- {name}: {time}s", { + name: i, + time: (STATS[i] / 1000).toFixed(3) + })); + } + } +}); + +/* -----[ functions ]----- */ + +function normalize(o) { + for (var i in o) if (o.hasOwnProperty(i) && /-/.test(i)) { + o[i.replace(/-/g, "_")] = o[i]; + delete o[i]; + } +} + +function getOptions(x, constants) { + x = ARGS[x]; + if (x == null) return null; + var ret = {}; + if (x !== "") { + var ast; + try { + ast = UglifyJS.parse(x, { expression: true }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + print_error("Error parsing arguments in: " + x); + process.exit(1); + } + } + ast.walk(new UglifyJS.TreeWalker(function(node){ + if (node instanceof UglifyJS.AST_Seq) return; // descend + if (node instanceof UglifyJS.AST_Assign) { + var name = node.left.print_to_string({ beautify: false }).replace(/-/g, "_"); + var value = node.right; + if (constants) + value = new Function("return (" + value.print_to_string() + ")")(); + ret[name] = value; + return true; // no descend + } + if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_Binary) { + var name = node.print_to_string({ beautify: false }).replace(/-/g, "_"); + ret[name] = true; + return true; // no descend + } + print_error(node.TYPE) + print_error("Error parsing arguments in: " + x); + process.exit(1); + })); + } + return ret; +} + +function read_whole_file(filename, cb) { + if (filename == "-") { + var chunks = []; + process.stdin.setEncoding('utf-8'); + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }).on('end', function () { + cb(null, chunks.join("")); + }); + process.openStdin(); + } else { + fs.readFile(filename, "utf-8", cb); + } +} + +function time_it(name, cont) { + var t1 = new Date().getTime(); + var ret = cont(); + if (ARGS.stats) { + var spent = new Date().getTime() - t1; + if (STATS[name]) STATS[name] += spent; + else STATS[name] = spent; + } + return ret; +} + +function print_error(msg) { + console.error("%s", msg); +} + +function print(txt) { + console.log("%s", txt); +} diff --git a/tools/eslint/node_modules/uglify-js/lib/ast.js b/tools/eslint/node_modules/uglify-js/lib/ast.js new file mode 100644 index 00000000000000..0ac14dc97cfab9 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/ast.js @@ -0,0 +1,1014 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function DEFNODE(type, props, methods, base) { + if (arguments.length < 4) base = AST_Node; + if (!props) props = []; + else props = props.split(/\s+/); + var self_props = props; + if (base && base.PROPS) + props = props.concat(base.PROPS); + var code = "return function AST_" + type + "(props){ if (props) { "; + for (var i = props.length; --i >= 0;) { + code += "this." + props[i] + " = props." + props[i] + ";"; + } + var proto = base && new base; + if (proto && proto.initialize || (methods && methods.initialize)) + code += "this.initialize();"; + code += "}}"; + var ctor = new Function(code)(); + if (proto) { + ctor.prototype = proto; + ctor.BASE = base; + } + if (base) base.SUBCLASSES.push(ctor); + ctor.prototype.CTOR = ctor; + ctor.PROPS = props || null; + ctor.SELF_PROPS = self_props; + ctor.SUBCLASSES = []; + if (type) { + ctor.prototype.TYPE = ctor.TYPE = type; + } + if (methods) for (i in methods) if (methods.hasOwnProperty(i)) { + if (/^\$/.test(i)) { + ctor[i.substr(1)] = methods[i]; + } else { + ctor.prototype[i] = methods[i]; + } + } + ctor.DEFMETHOD = function(name, method) { + this.prototype[name] = method; + }; + exports["AST_" + type] = ctor; + return ctor; +}; + +var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos nlb comments_before file raw", { +}, null); + +var AST_Node = DEFNODE("Node", "start end", { + clone: function() { + return new this.CTOR(this); + }, + $documentation: "Base class of all AST nodes", + $propdoc: { + start: "[AST_Token] The first token of this node", + end: "[AST_Token] The last token of this node" + }, + _walk: function(visitor) { + return visitor._visit(this); + }, + walk: function(visitor) { + return this._walk(visitor); // not sure the indirection will be any help + } +}, null); + +AST_Node.warn_function = null; +AST_Node.warn = function(txt, props) { + if (AST_Node.warn_function) + AST_Node.warn_function(string_template(txt, props)); +}; + +/* -----[ statements ]----- */ + +var AST_Statement = DEFNODE("Statement", null, { + $documentation: "Base class of all statements", +}); + +var AST_Debugger = DEFNODE("Debugger", null, { + $documentation: "Represents a debugger statement", +}, AST_Statement); + +var AST_Directive = DEFNODE("Directive", "value scope quote", { + $documentation: "Represents a directive, like \"use strict\";", + $propdoc: { + value: "[string] The value of this directive as a plain string (it's not an AST_String!)", + scope: "[AST_Scope/S] The scope that this directive affects", + quote: "[string] the original quote character" + }, +}, AST_Statement); + +var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { + $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", + $propdoc: { + body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +function walk_body(node, visitor) { + if (node.body instanceof AST_Statement) { + node.body._walk(visitor); + } + else node.body.forEach(function(stat){ + stat._walk(visitor); + }); +}; + +var AST_Block = DEFNODE("Block", "body", { + $documentation: "A body of statements (usually bracketed)", + $propdoc: { + body: "[AST_Statement*] an array of statements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + }); + } +}, AST_Statement); + +var AST_BlockStatement = DEFNODE("BlockStatement", null, { + $documentation: "A block statement", +}, AST_Block); + +var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { + $documentation: "The empty statement (empty block or simply a semicolon)", + _walk: function(visitor) { + return visitor._visit(this); + } +}, AST_Statement); + +var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { + $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", + $propdoc: { + body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { + $documentation: "Statement with a label", + $propdoc: { + label: "[AST_Label] a label definition" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.label._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_IterationStatement = DEFNODE("IterationStatement", null, { + $documentation: "Internal class. All loops inherit from it." +}, AST_StatementWithBody); + +var AST_DWLoop = DEFNODE("DWLoop", "condition", { + $documentation: "Base class for do/while statements", + $propdoc: { + condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" + } +}, AST_IterationStatement); + +var AST_Do = DEFNODE("Do", null, { + $documentation: "A `do` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + this.condition._walk(visitor); + }); + } +}, AST_DWLoop); + +var AST_While = DEFNODE("While", null, { + $documentation: "A `while` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_DWLoop); + +var AST_For = DEFNODE("For", "init condition step", { + $documentation: "A `for` statement", + $propdoc: { + init: "[AST_Node?] the `for` initialization code, or null if empty", + condition: "[AST_Node?] the `for` termination clause, or null if empty", + step: "[AST_Node?] the `for` update clause, or null if empty" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.init) this.init._walk(visitor); + if (this.condition) this.condition._walk(visitor); + if (this.step) this.step._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_ForIn = DEFNODE("ForIn", "init name object", { + $documentation: "A `for ... in` statement", + $propdoc: { + init: "[AST_Node] the `for/in` initialization code", + name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", + object: "[AST_Node] the object that we're looping through" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.init._walk(visitor); + this.object._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_With = DEFNODE("With", "expression", { + $documentation: "A `with` statement", + $propdoc: { + expression: "[AST_Node] the `with` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ scope and functions ]----- */ + +var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { + $documentation: "Base class for all statements introducing a lexical scope", + $propdoc: { + directives: "[string*/S] an array of directives declared in this scope", + variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", + functions: "[Object/S] like `variables`, but only lists function declarations", + uses_with: "[boolean/S] tells whether this scope uses the `with` statement", + uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", + parent_scope: "[AST_Scope?/S] link to the parent scope", + enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", + cname: "[integer/S] current index for mangling variables (used internally by the mangler)", + }, +}, AST_Block); + +var AST_Toplevel = DEFNODE("Toplevel", "globals", { + $documentation: "The toplevel scope", + $propdoc: { + globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", + }, + wrap_enclose: function(arg_parameter_pairs) { + var self = this; + var args = []; + var parameters = []; + + arg_parameter_pairs.forEach(function(pair) { + var splitAt = pair.lastIndexOf(":"); + + args.push(pair.substr(0, splitAt)); + parameters.push(pair.substr(splitAt + 1)); + }); + + var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_Directive && node.value == "$ORIG") { + return MAP.splice(self.body); + } + })); + return wrapped_tl; + }, + wrap_commonjs: function(name, export_all) { + var self = this; + var to_export = []; + if (export_all) { + self.figure_out_scope(); + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_SymbolDeclaration && node.definition().global) { + if (!find_if(function(n){ return n.name == node.name }, to_export)) + to_export.push(node); + } + })); + } + var wrapped_tl = "(function(exports, global){ '$ORIG'; '$EXPORTS'; global['" + name + "'] = exports; }({}, (function(){return this}())))"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_Directive) { + switch (node.value) { + case "$ORIG": + return MAP.splice(self.body); + case "$EXPORTS": + var body = []; + to_export.forEach(function(sym){ + body.push(new AST_SimpleStatement({ + body: new AST_Assign({ + left: new AST_Sub({ + expression: new AST_SymbolRef({ name: "exports" }), + property: new AST_String({ value: sym.name }), + }), + operator: "=", + right: new AST_SymbolRef(sym), + }), + })); + }); + return MAP.splice(body); + } + } + })); + return wrapped_tl; + } +}, AST_Scope); + +var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { + $documentation: "Base class for functions", + $propdoc: { + name: "[AST_SymbolDeclaration?] the name of this function", + argnames: "[AST_SymbolFunarg*] array of function arguments", + uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.name) this.name._walk(visitor); + this.argnames.forEach(function(arg){ + arg._walk(visitor); + }); + walk_body(this, visitor); + }); + } +}, AST_Scope); + +var AST_Accessor = DEFNODE("Accessor", null, { + $documentation: "A setter/getter function. The `name` property is always null." +}, AST_Lambda); + +var AST_Function = DEFNODE("Function", null, { + $documentation: "A function expression" +}, AST_Lambda); + +var AST_Defun = DEFNODE("Defun", null, { + $documentation: "A function definition" +}, AST_Lambda); + +/* -----[ JUMPS ]----- */ + +var AST_Jump = DEFNODE("Jump", null, { + $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" +}, AST_Statement); + +var AST_Exit = DEFNODE("Exit", "value", { + $documentation: "Base class for “exits” (`return` and `throw`)", + $propdoc: { + value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" + }, + _walk: function(visitor) { + return visitor._visit(this, this.value && function(){ + this.value._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Return = DEFNODE("Return", null, { + $documentation: "A `return` statement" +}, AST_Exit); + +var AST_Throw = DEFNODE("Throw", null, { + $documentation: "A `throw` statement" +}, AST_Exit); + +var AST_LoopControl = DEFNODE("LoopControl", "label", { + $documentation: "Base class for loop control statements (`break` and `continue`)", + $propdoc: { + label: "[AST_LabelRef?] the label, or null if none", + }, + _walk: function(visitor) { + return visitor._visit(this, this.label && function(){ + this.label._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Break = DEFNODE("Break", null, { + $documentation: "A `break` statement" +}, AST_LoopControl); + +var AST_Continue = DEFNODE("Continue", null, { + $documentation: "A `continue` statement" +}, AST_LoopControl); + +/* -----[ IF ]----- */ + +var AST_If = DEFNODE("If", "condition alternative", { + $documentation: "A `if` statement", + $propdoc: { + condition: "[AST_Node] the `if` condition", + alternative: "[AST_Statement?] the `else` part, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + if (this.alternative) this.alternative._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ SWITCH ]----- */ + +var AST_Switch = DEFNODE("Switch", "expression", { + $documentation: "A `switch` statement", + $propdoc: { + expression: "[AST_Node] the `switch` “discriminant”" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { + $documentation: "Base class for `switch` branches", +}, AST_Block); + +var AST_Default = DEFNODE("Default", null, { + $documentation: "A `default` switch branch", +}, AST_SwitchBranch); + +var AST_Case = DEFNODE("Case", "expression", { + $documentation: "A `case` switch branch", + $propdoc: { + expression: "[AST_Node] the `case` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_SwitchBranch); + +/* -----[ EXCEPTIONS ]----- */ + +var AST_Try = DEFNODE("Try", "bcatch bfinally", { + $documentation: "A `try` statement", + $propdoc: { + bcatch: "[AST_Catch?] the catch block, or null if not present", + bfinally: "[AST_Finally?] the finally block, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + if (this.bcatch) this.bcatch._walk(visitor); + if (this.bfinally) this.bfinally._walk(visitor); + }); + } +}, AST_Block); + +var AST_Catch = DEFNODE("Catch", "argname", { + $documentation: "A `catch` node; only makes sense as part of a `try` statement", + $propdoc: { + argname: "[AST_SymbolCatch] symbol for the exception" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.argname._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_Finally = DEFNODE("Finally", null, { + $documentation: "A `finally` node; only makes sense as part of a `try` statement" +}, AST_Block); + +/* -----[ VAR/CONST ]----- */ + +var AST_Definitions = DEFNODE("Definitions", "definitions", { + $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", + $propdoc: { + definitions: "[AST_VarDef*] array of variable definitions" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.definitions.forEach(function(def){ + def._walk(visitor); + }); + }); + } +}, AST_Statement); + +var AST_Var = DEFNODE("Var", null, { + $documentation: "A `var` statement" +}, AST_Definitions); + +var AST_Const = DEFNODE("Const", null, { + $documentation: "A `const` statement" +}, AST_Definitions); + +var AST_VarDef = DEFNODE("VarDef", "name value", { + $documentation: "A variable declaration; only appears in a AST_Definitions node", + $propdoc: { + name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", + value: "[AST_Node?] initializer, or null of there's no initializer" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.name._walk(visitor); + if (this.value) this.value._walk(visitor); + }); + } +}); + +/* -----[ OTHER ]----- */ + +var AST_Call = DEFNODE("Call", "expression args", { + $documentation: "A function call expression", + $propdoc: { + expression: "[AST_Node] expression to invoke as function", + args: "[AST_Node*] array of arguments" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.args.forEach(function(arg){ + arg._walk(visitor); + }); + }); + } +}); + +var AST_New = DEFNODE("New", null, { + $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" +}, AST_Call); + +var AST_Seq = DEFNODE("Seq", "car cdr", { + $documentation: "A sequence expression (two comma-separated expressions)", + $propdoc: { + car: "[AST_Node] first element in sequence", + cdr: "[AST_Node] second element in sequence" + }, + $cons: function(x, y) { + var seq = new AST_Seq(x); + seq.car = x; + seq.cdr = y; + return seq; + }, + $from_array: function(array) { + if (array.length == 0) return null; + if (array.length == 1) return array[0].clone(); + var list = null; + for (var i = array.length; --i >= 0;) { + list = AST_Seq.cons(array[i], list); + } + var p = list; + while (p) { + if (p.cdr && !p.cdr.cdr) { + p.cdr = p.cdr.car; + break; + } + p = p.cdr; + } + return list; + }, + to_array: function() { + var p = this, a = []; + while (p) { + a.push(p.car); + if (p.cdr && !(p.cdr instanceof AST_Seq)) { + a.push(p.cdr); + break; + } + p = p.cdr; + } + return a; + }, + add: function(node) { + var p = this; + while (p) { + if (!(p.cdr instanceof AST_Seq)) { + var cell = AST_Seq.cons(p.cdr, node); + return p.cdr = cell; + } + p = p.cdr; + } + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.car._walk(visitor); + if (this.cdr) this.cdr._walk(visitor); + }); + } +}); + +var AST_PropAccess = DEFNODE("PropAccess", "expression property", { + $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", + $propdoc: { + expression: "[AST_Node] the “container” expression", + property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" + } +}); + +var AST_Dot = DEFNODE("Dot", null, { + $documentation: "A dotted property access expression", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Sub = DEFNODE("Sub", null, { + $documentation: "Index-style property access, i.e. `a[\"foo\"]`", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.property._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Unary = DEFNODE("Unary", "operator expression", { + $documentation: "Base class for unary expressions", + $propdoc: { + operator: "[string] the operator", + expression: "[AST_Node] expression that this unary operator applies to" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}); + +var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { + $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" +}, AST_Unary); + +var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { + $documentation: "Unary postfix expression, i.e. `i++`" +}, AST_Unary); + +var AST_Binary = DEFNODE("Binary", "left operator right", { + $documentation: "Binary expression, i.e. `a + b`", + $propdoc: { + left: "[AST_Node] left-hand side expression", + operator: "[string] the operator", + right: "[AST_Node] right-hand side expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.left._walk(visitor); + this.right._walk(visitor); + }); + } +}); + +var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { + $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", + $propdoc: { + condition: "[AST_Node]", + consequent: "[AST_Node]", + alternative: "[AST_Node]" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.consequent._walk(visitor); + this.alternative._walk(visitor); + }); + } +}); + +var AST_Assign = DEFNODE("Assign", null, { + $documentation: "An assignment expression — `a = b + 5`", +}, AST_Binary); + +/* -----[ LITERALS ]----- */ + +var AST_Array = DEFNODE("Array", "elements", { + $documentation: "An array literal", + $propdoc: { + elements: "[AST_Node*] array of elements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.elements.forEach(function(el){ + el._walk(visitor); + }); + }); + } +}); + +var AST_Object = DEFNODE("Object", "properties", { + $documentation: "An object literal", + $propdoc: { + properties: "[AST_ObjectProperty*] array of properties" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.properties.forEach(function(prop){ + prop._walk(visitor); + }); + }); + } +}); + +var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { + $documentation: "Base class for literal object properties", + $propdoc: { + key: "[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an arbitrary AST_Node.", + value: "[AST_Node] property value. For setters and getters this is an AST_Function." + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.value._walk(visitor); + }); + } +}); + +var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote", { + $documentation: "A key: value object property", + $propdoc: { + quote: "[string] the original quote character" + } +}, AST_ObjectProperty); + +var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { + $documentation: "An object setter property", +}, AST_ObjectProperty); + +var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { + $documentation: "An object getter property", +}, AST_ObjectProperty); + +var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { + $propdoc: { + name: "[string] name of this symbol", + scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", + thedef: "[SymbolDef/S] the definition of this symbol" + }, + $documentation: "Base class for all symbols", +}); + +var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { + $documentation: "The name of a property accessor (setter/getter function)" +}, AST_Symbol); + +var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { + $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", + $propdoc: { + init: "[AST_Node*/S] array of initializers for this declaration." + } +}, AST_Symbol); + +var AST_SymbolVar = DEFNODE("SymbolVar", null, { + $documentation: "Symbol defining a variable", +}, AST_SymbolDeclaration); + +var AST_SymbolConst = DEFNODE("SymbolConst", null, { + $documentation: "A constant declaration" +}, AST_SymbolDeclaration); + +var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { + $documentation: "Symbol naming a function argument", +}, AST_SymbolVar); + +var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { + $documentation: "Symbol defining a function", +}, AST_SymbolDeclaration); + +var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { + $documentation: "Symbol naming a function expression", +}, AST_SymbolDeclaration); + +var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { + $documentation: "Symbol naming the exception in catch", +}, AST_SymbolDeclaration); + +var AST_Label = DEFNODE("Label", "references", { + $documentation: "Symbol naming a label (declaration)", + $propdoc: { + references: "[AST_LoopControl*] a list of nodes referring to this label" + }, + initialize: function() { + this.references = []; + this.thedef = this; + } +}, AST_Symbol); + +var AST_SymbolRef = DEFNODE("SymbolRef", null, { + $documentation: "Reference to some symbol (not definition/declaration)", +}, AST_Symbol); + +var AST_LabelRef = DEFNODE("LabelRef", null, { + $documentation: "Reference to a label symbol", +}, AST_Symbol); + +var AST_This = DEFNODE("This", null, { + $documentation: "The `this` symbol", +}, AST_Symbol); + +var AST_Constant = DEFNODE("Constant", null, { + $documentation: "Base class for all constants", + getValue: function() { + return this.value; + } +}); + +var AST_String = DEFNODE("String", "value quote", { + $documentation: "A string literal", + $propdoc: { + value: "[string] the contents of this string", + quote: "[string] the original quote character" + } +}, AST_Constant); + +var AST_Number = DEFNODE("Number", "value literal", { + $documentation: "A number literal", + $propdoc: { + value: "[number] the numeric value", + literal: "[string] numeric value as string (optional)" + } +}, AST_Constant); + +var AST_RegExp = DEFNODE("RegExp", "value", { + $documentation: "A regexp literal", + $propdoc: { + value: "[RegExp] the actual regexp" + } +}, AST_Constant); + +var AST_Atom = DEFNODE("Atom", null, { + $documentation: "Base class for atoms", +}, AST_Constant); + +var AST_Null = DEFNODE("Null", null, { + $documentation: "The `null` atom", + value: null +}, AST_Atom); + +var AST_NaN = DEFNODE("NaN", null, { + $documentation: "The impossible value", + value: 0/0 +}, AST_Atom); + +var AST_Undefined = DEFNODE("Undefined", null, { + $documentation: "The `undefined` value", + value: (function(){}()) +}, AST_Atom); + +var AST_Hole = DEFNODE("Hole", null, { + $documentation: "A hole in an array", + value: (function(){}()) +}, AST_Atom); + +var AST_Infinity = DEFNODE("Infinity", null, { + $documentation: "The `Infinity` value", + value: 1/0 +}, AST_Atom); + +var AST_Boolean = DEFNODE("Boolean", null, { + $documentation: "Base class for booleans", +}, AST_Atom); + +var AST_False = DEFNODE("False", null, { + $documentation: "The `false` atom", + value: false +}, AST_Boolean); + +var AST_True = DEFNODE("True", null, { + $documentation: "The `true` atom", + value: true +}, AST_Boolean); + +/* -----[ TreeWalker ]----- */ + +function TreeWalker(callback) { + this.visit = callback; + this.stack = []; + this.directives = Object.create(null); +}; +TreeWalker.prototype = { + _visit: function(node, descend) { + this.push(node); + var ret = this.visit(node, descend ? function(){ + descend.call(node); + } : noop); + if (!ret && descend) { + descend.call(node); + } + this.pop(node); + return ret; + }, + parent: function(n) { + return this.stack[this.stack.length - 2 - (n || 0)]; + }, + push: function (node) { + if (node instanceof AST_Lambda) { + this.directives = Object.create(this.directives); + } else if (node instanceof AST_Directive) { + this.directives[node.value] = this.directives[node.value] ? "up" : true; + } + this.stack.push(node); + }, + pop: function(node) { + this.stack.pop(); + if (node instanceof AST_Lambda) { + this.directives = Object.getPrototypeOf(this.directives); + } + }, + self: function() { + return this.stack[this.stack.length - 1]; + }, + find_parent: function(type) { + var stack = this.stack; + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof type) return x; + } + }, + has_directive: function(type) { + var dir = this.directives[type]; + if (dir) return dir; + var node = this.stack[this.stack.length - 1]; + if (node instanceof AST_Scope) { + for (var i = 0; i < node.body.length; ++i) { + var st = node.body[i]; + if (!(st instanceof AST_Directive)) break; + if (st.value == type) return true; + } + } + }, + in_boolean_context: function() { + var stack = this.stack; + var i = stack.length, self = stack[--i]; + while (i > 0) { + var p = stack[--i]; + if ((p instanceof AST_If && p.condition === self) || + (p instanceof AST_Conditional && p.condition === self) || + (p instanceof AST_DWLoop && p.condition === self) || + (p instanceof AST_For && p.condition === self) || + (p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self)) + { + return true; + } + if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) + return false; + self = p; + } + }, + loopcontrol_target: function(label) { + var stack = this.stack; + if (label) for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_LabeledStatement && x.label.name == label.name) { + return x.body; + } + } else for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_Switch || x instanceof AST_IterationStatement) + return x; + } + } +}; diff --git a/tools/eslint/node_modules/uglify-js/lib/compress.js b/tools/eslint/node_modules/uglify-js/lib/compress.js new file mode 100644 index 00000000000000..32833ebf93a5b8 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/compress.js @@ -0,0 +1,2534 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function Compressor(options, false_by_default) { + if (!(this instanceof Compressor)) + return new Compressor(options, false_by_default); + TreeTransformer.call(this, this.before, this.after); + this.options = defaults(options, { + sequences : !false_by_default, + properties : !false_by_default, + dead_code : !false_by_default, + drop_debugger : !false_by_default, + unsafe : false, + unsafe_comps : false, + conditionals : !false_by_default, + comparisons : !false_by_default, + evaluate : !false_by_default, + booleans : !false_by_default, + loops : !false_by_default, + unused : !false_by_default, + hoist_funs : !false_by_default, + keep_fargs : true, + keep_fnames : false, + hoist_vars : false, + if_return : !false_by_default, + join_vars : !false_by_default, + cascade : !false_by_default, + side_effects : !false_by_default, + pure_getters : false, + pure_funcs : null, + negate_iife : !false_by_default, + screw_ie8 : false, + drop_console : false, + angular : false, + + warnings : true, + global_defs : {} + }, true); +}; + +Compressor.prototype = new TreeTransformer; +merge(Compressor.prototype, { + option: function(key) { return this.options[key] }, + warn: function() { + if (this.options.warnings) + AST_Node.warn.apply(AST_Node, arguments); + }, + before: function(node, descend, in_list) { + if (node._squeezed) return node; + var was_scope = false; + if (node instanceof AST_Scope) { + node = node.hoist_declarations(this); + was_scope = true; + } + descend(node, this); + node = node.optimize(this); + if (was_scope && node instanceof AST_Scope) { + node.drop_unused(this); + descend(node, this); + } + node._squeezed = true; + return node; + } +}); + +(function(){ + + function OPT(node, optimizer) { + node.DEFMETHOD("optimize", function(compressor){ + var self = this; + if (self._optimized) return self; + if (compressor.has_directive("use asm")) return self; + var opt = optimizer(self, compressor); + opt._optimized = true; + if (opt === self) return opt; + return opt.transform(compressor); + }); + }; + + OPT(AST_Node, function(self, compressor){ + return self; + }); + + AST_Node.DEFMETHOD("equivalent_to", function(node){ + // XXX: this is a rather expensive way to test two node's equivalence: + return this.print_to_string() == node.print_to_string(); + }); + + function make_node(ctor, orig, props) { + if (!props) props = {}; + if (orig) { + if (!props.start) props.start = orig.start; + if (!props.end) props.end = orig.end; + } + return new ctor(props); + }; + + function make_node_from_constant(compressor, val, orig) { + // XXX: WIP. + // if (val instanceof AST_Node) return val.transform(new TreeTransformer(null, function(node){ + // if (node instanceof AST_SymbolRef) { + // var scope = compressor.find_parent(AST_Scope); + // var def = scope.find_variable(node); + // node.thedef = def; + // return node; + // } + // })).transform(compressor); + + if (val instanceof AST_Node) return val.transform(compressor); + switch (typeof val) { + case "string": + return make_node(AST_String, orig, { + value: val + }).optimize(compressor); + case "number": + return make_node(isNaN(val) ? AST_NaN : AST_Number, orig, { + value: val + }).optimize(compressor); + case "boolean": + return make_node(val ? AST_True : AST_False, orig).optimize(compressor); + case "undefined": + return make_node(AST_Undefined, orig).optimize(compressor); + default: + if (val === null) { + return make_node(AST_Null, orig, { value: null }).optimize(compressor); + } + if (val instanceof RegExp) { + return make_node(AST_RegExp, orig, { value: val }).optimize(compressor); + } + throw new Error(string_template("Can't handle constant of type: {type}", { + type: typeof val + })); + } + }; + + function as_statement_array(thing) { + if (thing === null) return []; + if (thing instanceof AST_BlockStatement) return thing.body; + if (thing instanceof AST_EmptyStatement) return []; + if (thing instanceof AST_Statement) return [ thing ]; + throw new Error("Can't convert thing to statement array"); + }; + + function is_empty(thing) { + if (thing === null) return true; + if (thing instanceof AST_EmptyStatement) return true; + if (thing instanceof AST_BlockStatement) return thing.body.length == 0; + return false; + }; + + function loop_body(x) { + if (x instanceof AST_Switch) return x; + if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { + return (x.body instanceof AST_BlockStatement ? x.body : x); + } + return x; + }; + + function tighten_body(statements, compressor) { + var CHANGED, max_iter = 10; + do { + CHANGED = false; + if (compressor.option("angular")) { + statements = process_for_angular(statements); + } + statements = eliminate_spurious_blocks(statements); + if (compressor.option("dead_code")) { + statements = eliminate_dead_code(statements, compressor); + } + if (compressor.option("if_return")) { + statements = handle_if_return(statements, compressor); + } + if (compressor.option("sequences")) { + statements = sequencesize(statements, compressor); + } + if (compressor.option("join_vars")) { + statements = join_consecutive_vars(statements, compressor); + } + } while (CHANGED && max_iter-- > 0); + + if (compressor.option("negate_iife")) { + negate_iifes(statements, compressor); + } + + return statements; + + function process_for_angular(statements) { + function has_inject(comment) { + return /@ngInject/.test(comment.value); + } + function make_arguments_names_list(func) { + return func.argnames.map(function(sym){ + return make_node(AST_String, sym, { value: sym.name }); + }); + } + function make_array(orig, elements) { + return make_node(AST_Array, orig, { elements: elements }); + } + function make_injector(func, name) { + return make_node(AST_SimpleStatement, func, { + body: make_node(AST_Assign, func, { + operator: "=", + left: make_node(AST_Dot, name, { + expression: make_node(AST_SymbolRef, name, name), + property: "$inject" + }), + right: make_array(func, make_arguments_names_list(func)) + }) + }); + } + function check_expression(body) { + if (body && body.args) { + // if this is a function call check all of arguments passed + body.args.forEach(function(argument, index, array) { + var comments = argument.start.comments_before; + // if the argument is function preceded by @ngInject + if (argument instanceof AST_Lambda && comments.length && has_inject(comments[0])) { + // replace the function with an array of names of its parameters and function at the end + array[index] = make_array(argument, make_arguments_names_list(argument).concat(argument)); + } + }); + // if this is chained call check previous one recursively + if (body.expression && body.expression.expression) { + check_expression(body.expression.expression); + } + } + } + return statements.reduce(function(a, stat){ + a.push(stat); + + if (stat.body && stat.body.args) { + check_expression(stat.body); + } else { + var token = stat.start; + var comments = token.comments_before; + if (comments && comments.length > 0) { + var last = comments.pop(); + if (has_inject(last)) { + // case 1: defun + if (stat instanceof AST_Defun) { + a.push(make_injector(stat, stat.name)); + } + else if (stat instanceof AST_Definitions) { + stat.definitions.forEach(function(def) { + if (def.value && def.value instanceof AST_Lambda) { + a.push(make_injector(def.value, def.name)); + } + }); + } + else { + compressor.warn("Unknown statement marked with @ngInject [{file}:{line},{col}]", token); + } + } + } + } + + return a; + }, []); + } + + function eliminate_spurious_blocks(statements) { + var seen_dirs = []; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_BlockStatement) { + CHANGED = true; + a.push.apply(a, eliminate_spurious_blocks(stat.body)); + } else if (stat instanceof AST_EmptyStatement) { + CHANGED = true; + } else if (stat instanceof AST_Directive) { + if (seen_dirs.indexOf(stat.value) < 0) { + a.push(stat); + seen_dirs.push(stat.value); + } else { + CHANGED = true; + } + } else { + a.push(stat); + } + return a; + }, []); + }; + + function handle_if_return(statements, compressor) { + var self = compressor.self(); + var in_lambda = self instanceof AST_Lambda; + var ret = []; + loop: for (var i = statements.length; --i >= 0;) { + var stat = statements[i]; + switch (true) { + case (in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0): + CHANGED = true; + // note, ret.length is probably always zero + // because we drop unreachable code before this + // step. nevertheless, it's good to check. + continue loop; + case stat instanceof AST_If: + if (stat.body instanceof AST_Return) { + //--- + // pretty silly case, but: + // if (foo()) return; return; ==> foo(); return; + if (((in_lambda && ret.length == 0) + || (ret[0] instanceof AST_Return && !ret[0].value)) + && !stat.body.value && !stat.alternative) { + CHANGED = true; + var cond = make_node(AST_SimpleStatement, stat.condition, { + body: stat.condition + }); + ret.unshift(cond); + continue loop; + } + //--- + // if (foo()) return x; return y; ==> return foo() ? x : y; + if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0]; + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return x; [ return ; ] ==> return foo() ? x : undefined; + if ((ret.length == 0 || ret[0] instanceof AST_Return) && stat.body.value && !stat.alternative && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0] || make_node(AST_Return, stat, { + value: make_node(AST_Undefined, stat) + }); + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return; [ else x... ]; y... ==> if (!foo()) { x...; y... } + if (!stat.body.value && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = null; + ret = [ stat.transform(compressor) ]; + continue loop; + } + //--- + // XXX: what was the intention of this case? + // if sequences is not enabled, this can lead to an endless loop (issue #866). + // however, with sequences on this helps producing slightly better output for + // the example code. + if (compressor.option("sequences") + && ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement + && (!stat.alternative || stat.alternative instanceof AST_SimpleStatement)) { + CHANGED = true; + ret.push(make_node(AST_Return, ret[0], { + value: make_node(AST_Undefined, ret[0]) + }).transform(compressor)); + ret = as_statement_array(stat.alternative).concat(ret); + ret.unshift(stat); + continue loop; + } + } + + var ab = aborts(stat.body); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + var body = as_statement_array(stat.body).slice(0, -1); + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat, { + body: body + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + var ab = aborts(stat.alternative); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + stat = stat.clone(); + stat.body = make_node(AST_BlockStatement, stat.body, { + body: as_statement_array(stat.body).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat.alternative, { + body: as_statement_array(stat.alternative).slice(0, -1) + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + ret.unshift(stat); + break; + default: + ret.unshift(stat); + break; + } + } + return ret; + }; + + function eliminate_dead_code(statements, compressor) { + var has_quit = false; + var orig = statements.length; + var self = compressor.self(); + statements = statements.reduce(function(a, stat){ + if (has_quit) { + extract_declarations_from_unreachable_code(compressor, stat, a); + } else { + if (stat instanceof AST_LoopControl) { + var lct = compressor.loopcontrol_target(stat.label); + if ((stat instanceof AST_Break + && lct instanceof AST_BlockStatement + && loop_body(lct) === self) || (stat instanceof AST_Continue + && loop_body(lct) === self)) { + if (stat.label) { + remove(stat.label.thedef.references, stat); + } + } else { + a.push(stat); + } + } else { + a.push(stat); + } + if (aborts(stat)) has_quit = true; + } + return a; + }, []); + CHANGED = statements.length != orig; + return statements; + }; + + function sequencesize(statements, compressor) { + if (statements.length < 2) return statements; + var seq = [], ret = []; + function push_seq() { + seq = AST_Seq.from_array(seq); + if (seq) ret.push(make_node(AST_SimpleStatement, seq, { + body: seq + })); + seq = []; + }; + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement && seq.length < 2000) seq.push(stat.body); + else push_seq(), ret.push(stat); + }); + push_seq(); + ret = sequencesize_2(ret, compressor); + CHANGED = ret.length != statements.length; + return ret; + }; + + function sequencesize_2(statements, compressor) { + function cons_seq(right) { + ret.pop(); + var left = prev.body; + if (left instanceof AST_Seq) { + left.add(right); + } else { + left = AST_Seq.cons(left, right); + } + return left.transform(compressor); + }; + var ret = [], prev = null; + statements.forEach(function(stat){ + if (prev) { + if (stat instanceof AST_For) { + var opera = {}; + try { + prev.body.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw opera; + })); + if (stat.init && !(stat.init instanceof AST_Definitions)) { + stat.init = cons_seq(stat.init); + } + else if (!stat.init) { + stat.init = prev.body; + ret.pop(); + } + } catch(ex) { + if (ex !== opera) throw ex; + } + } + else if (stat instanceof AST_If) { + stat.condition = cons_seq(stat.condition); + } + else if (stat instanceof AST_With) { + stat.expression = cons_seq(stat.expression); + } + else if (stat instanceof AST_Exit && stat.value) { + stat.value = cons_seq(stat.value); + } + else if (stat instanceof AST_Exit) { + stat.value = cons_seq(make_node(AST_Undefined, stat)); + } + else if (stat instanceof AST_Switch) { + stat.expression = cons_seq(stat.expression); + } + } + ret.push(stat); + prev = stat instanceof AST_SimpleStatement ? stat : null; + }); + return ret; + }; + + function join_consecutive_vars(statements, compressor) { + var prev = null; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { + prev.definitions = prev.definitions.concat(stat.definitions); + CHANGED = true; + } + else if (stat instanceof AST_For + && prev instanceof AST_Definitions + && (!stat.init || stat.init.TYPE == prev.TYPE)) { + CHANGED = true; + a.pop(); + if (stat.init) { + stat.init.definitions = prev.definitions.concat(stat.init.definitions); + } else { + stat.init = prev; + } + a.push(stat); + prev = stat; + } + else { + prev = stat; + a.push(stat); + } + return a; + }, []); + }; + + function negate_iifes(statements, compressor) { + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement) { + stat.body = (function transform(thing) { + return thing.transform(new TreeTransformer(function(node){ + if (node instanceof AST_Call && node.expression instanceof AST_Function) { + return make_node(AST_UnaryPrefix, node, { + operator: "!", + expression: node + }); + } + else if (node instanceof AST_Call) { + node.expression = transform(node.expression); + } + else if (node instanceof AST_Seq) { + node.car = transform(node.car); + } + else if (node instanceof AST_Conditional) { + var expr = transform(node.condition); + if (expr !== node.condition) { + // it has been negated, reverse + node.condition = expr; + var tmp = node.consequent; + node.consequent = node.alternative; + node.alternative = tmp; + } + } + return node; + })); + })(stat.body); + } + }); + }; + + }; + + function extract_declarations_from_unreachable_code(compressor, stat, target) { + compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); + stat.walk(new TreeWalker(function(node){ + if (node instanceof AST_Definitions) { + compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); + node.remove_initializers(); + target.push(node); + return true; + } + if (node instanceof AST_Defun) { + target.push(node); + return true; + } + if (node instanceof AST_Scope) { + return true; + } + })); + }; + + /* -----[ boolean/negation helpers ]----- */ + + // methods to determine whether an expression has a boolean result type + (function (def){ + var unary_bool = [ "!", "delete" ]; + var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; + def(AST_Node, function(){ return false }); + def(AST_UnaryPrefix, function(){ + return member(this.operator, unary_bool); + }); + def(AST_Binary, function(){ + return member(this.operator, binary_bool) || + ( (this.operator == "&&" || this.operator == "||") && + this.left.is_boolean() && this.right.is_boolean() ); + }); + def(AST_Conditional, function(){ + return this.consequent.is_boolean() && this.alternative.is_boolean(); + }); + def(AST_Assign, function(){ + return this.operator == "=" && this.right.is_boolean(); + }); + def(AST_Seq, function(){ + return this.cdr.is_boolean(); + }); + def(AST_True, function(){ return true }); + def(AST_False, function(){ return true }); + })(function(node, func){ + node.DEFMETHOD("is_boolean", func); + }); + + // methods to determine if an expression has a string result type + (function (def){ + def(AST_Node, function(){ return false }); + def(AST_String, function(){ return true }); + def(AST_UnaryPrefix, function(){ + return this.operator == "typeof"; + }); + def(AST_Binary, function(compressor){ + return this.operator == "+" && + (this.left.is_string(compressor) || this.right.is_string(compressor)); + }); + def(AST_Assign, function(compressor){ + return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); + }); + def(AST_Seq, function(compressor){ + return this.cdr.is_string(compressor); + }); + def(AST_Conditional, function(compressor){ + return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); + }); + def(AST_Call, function(compressor){ + return compressor.option("unsafe") + && this.expression instanceof AST_SymbolRef + && this.expression.name == "String" + && this.expression.undeclared(); + }); + })(function(node, func){ + node.DEFMETHOD("is_string", func); + }); + + function best_of(ast1, ast2) { + return ast1.print_to_string().length > + ast2.print_to_string().length + ? ast2 : ast1; + }; + + // methods to evaluate a constant expression + (function (def){ + // The evaluate method returns an array with one or two + // elements. If the node has been successfully reduced to a + // constant, then the second element tells us the value; + // otherwise the second element is missing. The first element + // of the array is always an AST_Node descendant; if + // evaluation was successful it's a node that represents the + // constant; otherwise it's the original or a replacement node. + AST_Node.DEFMETHOD("evaluate", function(compressor){ + if (!compressor.option("evaluate")) return [ this ]; + try { + var val = this._eval(compressor); + return [ best_of(make_node_from_constant(compressor, val, this), this), val ]; + } catch(ex) { + if (ex !== def) throw ex; + return [ this ]; + } + }); + def(AST_Statement, function(){ + throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); + }); + def(AST_Function, function(){ + // XXX: AST_Function inherits from AST_Scope, which itself + // inherits from AST_Statement; however, an AST_Function + // isn't really a statement. This could byte in other + // places too. :-( Wish JS had multiple inheritance. + throw def; + }); + function ev(node, compressor) { + if (!compressor) throw new Error("Compressor must be passed"); + + return node._eval(compressor); + }; + def(AST_Node, function(){ + throw def; // not constant + }); + def(AST_Constant, function(){ + return this.getValue(); + }); + def(AST_UnaryPrefix, function(compressor){ + var e = this.expression; + switch (this.operator) { + case "!": return !ev(e, compressor); + case "typeof": + // Function would be evaluated to an array and so typeof would + // incorrectly return 'object'. Hence making is a special case. + if (e instanceof AST_Function) return typeof function(){}; + + e = ev(e, compressor); + + // typeof returns "object" or "function" on different platforms + // so cannot evaluate reliably + if (e instanceof RegExp) throw def; + + return typeof e; + case "void": return void ev(e, compressor); + case "~": return ~ev(e, compressor); + case "-": + e = ev(e, compressor); + if (e === 0) throw def; + return -e; + case "+": return +ev(e, compressor); + } + throw def; + }); + def(AST_Binary, function(c){ + var left = this.left, right = this.right; + switch (this.operator) { + case "&&" : return ev(left, c) && ev(right, c); + case "||" : return ev(left, c) || ev(right, c); + case "|" : return ev(left, c) | ev(right, c); + case "&" : return ev(left, c) & ev(right, c); + case "^" : return ev(left, c) ^ ev(right, c); + case "+" : return ev(left, c) + ev(right, c); + case "*" : return ev(left, c) * ev(right, c); + case "/" : return ev(left, c) / ev(right, c); + case "%" : return ev(left, c) % ev(right, c); + case "-" : return ev(left, c) - ev(right, c); + case "<<" : return ev(left, c) << ev(right, c); + case ">>" : return ev(left, c) >> ev(right, c); + case ">>>" : return ev(left, c) >>> ev(right, c); + case "==" : return ev(left, c) == ev(right, c); + case "===" : return ev(left, c) === ev(right, c); + case "!=" : return ev(left, c) != ev(right, c); + case "!==" : return ev(left, c) !== ev(right, c); + case "<" : return ev(left, c) < ev(right, c); + case "<=" : return ev(left, c) <= ev(right, c); + case ">" : return ev(left, c) > ev(right, c); + case ">=" : return ev(left, c) >= ev(right, c); + case "in" : return ev(left, c) in ev(right, c); + case "instanceof" : return ev(left, c) instanceof ev(right, c); + } + throw def; + }); + def(AST_Conditional, function(compressor){ + return ev(this.condition, compressor) + ? ev(this.consequent, compressor) + : ev(this.alternative, compressor); + }); + def(AST_SymbolRef, function(compressor){ + var d = this.definition(); + if (d && d.constant && d.init) return ev(d.init, compressor); + throw def; + }); + def(AST_Dot, function(compressor){ + if (compressor.option("unsafe") && this.property == "length") { + var str = ev(this.expression, compressor); + if (typeof str == "string") + return str.length; + } + throw def; + }); + })(function(node, func){ + node.DEFMETHOD("_eval", func); + }); + + // method to negate an expression + (function(def){ + function basic_negation(exp) { + return make_node(AST_UnaryPrefix, exp, { + operator: "!", + expression: exp + }); + }; + def(AST_Node, function(){ + return basic_negation(this); + }); + def(AST_Statement, function(){ + throw new Error("Cannot negate a statement"); + }); + def(AST_Function, function(){ + return basic_negation(this); + }); + def(AST_UnaryPrefix, function(){ + if (this.operator == "!") + return this.expression; + return basic_negation(this); + }); + def(AST_Seq, function(compressor){ + var self = this.clone(); + self.cdr = self.cdr.negate(compressor); + return self; + }); + def(AST_Conditional, function(compressor){ + var self = this.clone(); + self.consequent = self.consequent.negate(compressor); + self.alternative = self.alternative.negate(compressor); + return best_of(basic_negation(this), self); + }); + def(AST_Binary, function(compressor){ + var self = this.clone(), op = this.operator; + if (compressor.option("unsafe_comps")) { + switch (op) { + case "<=" : self.operator = ">" ; return self; + case "<" : self.operator = ">=" ; return self; + case ">=" : self.operator = "<" ; return self; + case ">" : self.operator = "<=" ; return self; + } + } + switch (op) { + case "==" : self.operator = "!="; return self; + case "!=" : self.operator = "=="; return self; + case "===": self.operator = "!=="; return self; + case "!==": self.operator = "==="; return self; + case "&&": + self.operator = "||"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + case "||": + self.operator = "&&"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + } + return basic_negation(this); + }); + })(function(node, func){ + node.DEFMETHOD("negate", function(compressor){ + return func.call(this, compressor); + }); + }); + + // determine if expression has side effects + (function(def){ + def(AST_Node, function(compressor){ return true }); + + def(AST_EmptyStatement, function(compressor){ return false }); + def(AST_Constant, function(compressor){ return false }); + def(AST_This, function(compressor){ return false }); + + def(AST_Call, function(compressor){ + var pure = compressor.option("pure_funcs"); + if (!pure) return true; + if (typeof pure == "function") return pure(this); + return pure.indexOf(this.expression.print_to_string()) < 0; + }); + + def(AST_Block, function(compressor){ + for (var i = this.body.length; --i >= 0;) { + if (this.body[i].has_side_effects(compressor)) + return true; + } + return false; + }); + + def(AST_SimpleStatement, function(compressor){ + return this.body.has_side_effects(compressor); + }); + def(AST_Defun, function(compressor){ return true }); + def(AST_Function, function(compressor){ return false }); + def(AST_Binary, function(compressor){ + return this.left.has_side_effects(compressor) + || this.right.has_side_effects(compressor); + }); + def(AST_Assign, function(compressor){ return true }); + def(AST_Conditional, function(compressor){ + return this.condition.has_side_effects(compressor) + || this.consequent.has_side_effects(compressor) + || this.alternative.has_side_effects(compressor); + }); + def(AST_Unary, function(compressor){ + return this.operator == "delete" + || this.operator == "++" + || this.operator == "--" + || this.expression.has_side_effects(compressor); + }); + def(AST_SymbolRef, function(compressor){ + return this.global() && this.undeclared(); + }); + def(AST_Object, function(compressor){ + for (var i = this.properties.length; --i >= 0;) + if (this.properties[i].has_side_effects(compressor)) + return true; + return false; + }); + def(AST_ObjectProperty, function(compressor){ + return this.value.has_side_effects(compressor); + }); + def(AST_Array, function(compressor){ + for (var i = this.elements.length; --i >= 0;) + if (this.elements[i].has_side_effects(compressor)) + return true; + return false; + }); + def(AST_Dot, function(compressor){ + if (!compressor.option("pure_getters")) return true; + return this.expression.has_side_effects(compressor); + }); + def(AST_Sub, function(compressor){ + if (!compressor.option("pure_getters")) return true; + return this.expression.has_side_effects(compressor) + || this.property.has_side_effects(compressor); + }); + def(AST_PropAccess, function(compressor){ + return !compressor.option("pure_getters"); + }); + def(AST_Seq, function(compressor){ + return this.car.has_side_effects(compressor) + || this.cdr.has_side_effects(compressor); + }); + })(function(node, func){ + node.DEFMETHOD("has_side_effects", func); + }); + + // tell me if a statement aborts + function aborts(thing) { + return thing && thing.aborts(); + }; + (function(def){ + def(AST_Statement, function(){ return null }); + def(AST_Jump, function(){ return this }); + function block_aborts(){ + var n = this.body.length; + return n > 0 && aborts(this.body[n - 1]); + }; + def(AST_BlockStatement, block_aborts); + def(AST_SwitchBranch, block_aborts); + def(AST_If, function(){ + return this.alternative && aborts(this.body) && aborts(this.alternative) && this; + }); + })(function(node, func){ + node.DEFMETHOD("aborts", func); + }); + + /* -----[ optimizers ]----- */ + + OPT(AST_Directive, function(self, compressor){ + if (compressor.has_directive(self.value) === "up") { + return make_node(AST_EmptyStatement, self); + } + return self; + }); + + OPT(AST_Debugger, function(self, compressor){ + if (compressor.option("drop_debugger")) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_LabeledStatement, function(self, compressor){ + if (self.body instanceof AST_Break + && compressor.loopcontrol_target(self.body.label) === self.body) { + return make_node(AST_EmptyStatement, self); + } + return self.label.references.length == 0 ? self.body : self; + }); + + OPT(AST_Block, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_BlockStatement, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + switch (self.body.length) { + case 1: return self.body[0]; + case 0: return make_node(AST_EmptyStatement, self); + } + return self; + }); + + AST_Scope.DEFMETHOD("drop_unused", function(compressor){ + var self = this; + if (compressor.has_directive("use asm")) return self; + if (compressor.option("unused") + && !(self instanceof AST_Toplevel) + && !self.uses_eval + ) { + var in_use = []; + var initializations = new Dictionary(); + // pass 1: find out which symbols are directly used in + // this scope (not in nested scopes). + var scope = this; + var tw = new TreeWalker(function(node, descend){ + if (node !== self) { + if (node instanceof AST_Defun) { + initializations.add(node.name.name, node); + return true; // don't go in nested scopes + } + if (node instanceof AST_Definitions && scope === self) { + node.definitions.forEach(function(def){ + if (def.value) { + initializations.add(def.name.name, def.value); + if (def.value.has_side_effects(compressor)) { + def.value.walk(tw); + } + } + }); + return true; + } + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + return true; + } + if (node instanceof AST_Scope) { + var save_scope = scope; + scope = node; + descend(); + scope = save_scope; + return true; + } + } + }); + self.walk(tw); + // pass 2: for every used symbol we need to walk its + // initialization code to figure out if it uses other + // symbols (that may not be in_use). + for (var i = 0; i < in_use.length; ++i) { + in_use[i].orig.forEach(function(decl){ + // undeclared globals will be instanceof AST_SymbolRef + var init = initializations.get(decl.name); + if (init) init.forEach(function(init){ + var tw = new TreeWalker(function(node){ + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + } + }); + init.walk(tw); + }); + }); + } + // pass 3: we should drop declarations not in_use + var tt = new TreeTransformer( + function before(node, descend, in_list) { + if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { + if (!compressor.option("keep_fargs")) { + for (var a = node.argnames, i = a.length; --i >= 0;) { + var sym = a[i]; + if (sym.unreferenced()) { + a.pop(); + compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { + name : sym.name, + file : sym.start.file, + line : sym.start.line, + col : sym.start.col + }); + } + else break; + } + } + } + if (node instanceof AST_Defun && node !== self) { + if (!member(node.name.definition(), in_use)) { + compressor.warn("Dropping unused function {name} [{file}:{line},{col}]", { + name : node.name.name, + file : node.name.start.file, + line : node.name.start.line, + col : node.name.start.col + }); + return make_node(AST_EmptyStatement, node); + } + return node; + } + if (node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn)) { + var def = node.definitions.filter(function(def){ + if (member(def.name.definition(), in_use)) return true; + var w = { + name : def.name.name, + file : def.name.start.file, + line : def.name.start.line, + col : def.name.start.col + }; + if (def.value && def.value.has_side_effects(compressor)) { + def._unused_side_effects = true; + compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); + return true; + } + compressor.warn("Dropping unused variable {name} [{file}:{line},{col}]", w); + return false; + }); + // place uninitialized names at the start + def = mergeSort(def, function(a, b){ + if (!a.value && b.value) return -1; + if (!b.value && a.value) return 1; + return 0; + }); + // for unused names whose initialization has + // side effects, we can cascade the init. code + // into the next one, or next statement. + var side_effects = []; + for (var i = 0; i < def.length;) { + var x = def[i]; + if (x._unused_side_effects) { + side_effects.push(x.value); + def.splice(i, 1); + } else { + if (side_effects.length > 0) { + side_effects.push(x.value); + x.value = AST_Seq.from_array(side_effects); + side_effects = []; + } + ++i; + } + } + if (side_effects.length > 0) { + side_effects = make_node(AST_BlockStatement, node, { + body: [ make_node(AST_SimpleStatement, node, { + body: AST_Seq.from_array(side_effects) + }) ] + }); + } else { + side_effects = null; + } + if (def.length == 0 && !side_effects) { + return make_node(AST_EmptyStatement, node); + } + if (def.length == 0) { + return in_list ? MAP.splice(side_effects.body) : side_effects; + } + node.definitions = def; + if (side_effects) { + side_effects.body.unshift(node); + return in_list ? MAP.splice(side_effects.body) : side_effects; + } + return node; + } + if (node instanceof AST_For) { + descend(node, this); + + if (node.init instanceof AST_BlockStatement) { + // certain combination of unused name + side effect leads to: + // https://github.com/mishoo/UglifyJS2/issues/44 + // that's an invalid AST. + // We fix it at this stage by moving the `var` outside the `for`. + + var body = node.init.body.slice(0, -1); + node.init = node.init.body.slice(-1)[0].body; + body.push(node); + + return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { + body: body + }); + } + } + if (node instanceof AST_Scope && node !== self) + return node; + } + ); + self.transform(tt); + } + }); + + AST_Scope.DEFMETHOD("hoist_declarations", function(compressor){ + var self = this; + if (compressor.has_directive("use asm")) return self; + var hoist_funs = compressor.option("hoist_funs"); + var hoist_vars = compressor.option("hoist_vars"); + if (hoist_funs || hoist_vars) { + var dirs = []; + var hoisted = []; + var vars = new Dictionary(), vars_found = 0, var_decl = 0; + // let's count var_decl first, we seem to waste a lot of + // space if we hoist `var` when there's only one. + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_Scope && node !== self) + return true; + if (node instanceof AST_Var) { + ++var_decl; + return true; + } + })); + hoist_vars = hoist_vars && var_decl > 1; + var tt = new TreeTransformer( + function before(node) { + if (node !== self) { + if (node instanceof AST_Directive) { + dirs.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Defun && hoist_funs) { + hoisted.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Var && hoist_vars) { + node.definitions.forEach(function(def){ + vars.set(def.name.name, def); + ++vars_found; + }); + var seq = node.to_assignments(); + var p = tt.parent(); + if (p instanceof AST_ForIn && p.init === node) { + if (seq == null) return node.definitions[0].name; + return seq; + } + if (p instanceof AST_For && p.init === node) { + return seq; + } + if (!seq) return make_node(AST_EmptyStatement, node); + return make_node(AST_SimpleStatement, node, { + body: seq + }); + } + if (node instanceof AST_Scope) + return node; // to avoid descending in nested scopes + } + } + ); + self = self.transform(tt); + if (vars_found > 0) { + // collect only vars which don't show up in self's arguments list + var defs = []; + vars.each(function(def, name){ + if (self instanceof AST_Lambda + && find_if(function(x){ return x.name == def.name.name }, + self.argnames)) { + vars.del(name); + } else { + def = def.clone(); + def.value = null; + defs.push(def); + vars.set(name, def); + } + }); + if (defs.length > 0) { + // try to merge in assignments + for (var i = 0; i < self.body.length;) { + if (self.body[i] instanceof AST_SimpleStatement) { + var expr = self.body[i].body, sym, assign; + if (expr instanceof AST_Assign + && expr.operator == "=" + && (sym = expr.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = expr.right; + remove(defs, def); + defs.push(def); + self.body.splice(i, 1); + continue; + } + if (expr instanceof AST_Seq + && (assign = expr.car) instanceof AST_Assign + && assign.operator == "=" + && (sym = assign.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = assign.right; + remove(defs, def); + defs.push(def); + self.body[i].body = expr.cdr; + continue; + } + } + if (self.body[i] instanceof AST_EmptyStatement) { + self.body.splice(i, 1); + continue; + } + if (self.body[i] instanceof AST_BlockStatement) { + var tmp = [ i, 1 ].concat(self.body[i].body); + self.body.splice.apply(self.body, tmp); + continue; + } + break; + } + defs = make_node(AST_Var, self, { + definitions: defs + }); + hoisted.push(defs); + }; + } + self.body = dirs.concat(hoisted, self.body); + } + return self; + }); + + OPT(AST_SimpleStatement, function(self, compressor){ + if (compressor.option("side_effects")) { + if (!self.body.has_side_effects(compressor)) { + compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); + return make_node(AST_EmptyStatement, self); + } + } + return self; + }); + + OPT(AST_DWLoop, function(self, compressor){ + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (!compressor.option("loops")) return self; + if (cond.length > 1) { + if (cond[1]) { + return make_node(AST_For, self, { + body: self.body + }); + } else if (self instanceof AST_While) { + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } + } + return self; + }); + + function if_break_in_loop(self, compressor) { + function drop_it(rest) { + rest = as_statement_array(rest); + if (self.body instanceof AST_BlockStatement) { + self.body = self.body.clone(); + self.body.body = rest.concat(self.body.body.slice(1)); + self.body = self.body.transform(compressor); + } else { + self.body = make_node(AST_BlockStatement, self.body, { + body: rest + }).transform(compressor); + } + if_break_in_loop(self, compressor); + } + var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; + if (first instanceof AST_If) { + if (first.body instanceof AST_Break + && compressor.loopcontrol_target(first.body.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition.negate(compressor), + }); + } else { + self.condition = first.condition.negate(compressor); + } + drop_it(first.alternative); + } + else if (first.alternative instanceof AST_Break + && compressor.loopcontrol_target(first.alternative.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition, + }); + } else { + self.condition = first.condition; + } + drop_it(first.body); + } + } + }; + + OPT(AST_While, function(self, compressor) { + if (!compressor.option("loops")) return self; + self = AST_DWLoop.prototype.optimize.call(self, compressor); + if (self instanceof AST_While) { + if_break_in_loop(self, compressor); + self = make_node(AST_For, self, self).transform(compressor); + } + return self; + }); + + OPT(AST_For, function(self, compressor){ + var cond = self.condition; + if (cond) { + cond = cond.evaluate(compressor); + self.condition = cond[0]; + } + if (!compressor.option("loops")) return self; + if (cond) { + if (cond.length > 1 && !cond[1]) { + if (compressor.option("dead_code")) { + var a = []; + if (self.init instanceof AST_Statement) { + a.push(self.init); + } + else if (self.init) { + a.push(make_node(AST_SimpleStatement, self.init, { + body: self.init + })); + } + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } + } + if_break_in_loop(self, compressor); + return self; + }); + + OPT(AST_If, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + // if condition can be statically determined, warn and drop + // one of the blocks. note, statically determined implies + // “has no side effects”; also it doesn't work for cases like + // `x && true`, though it probably should. + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + if (self.alternative) { + extract_declarations_from_unreachable_code(compressor, self.alternative, a); + } + a.push(self.body); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + if (self.alternative) a.push(self.alternative); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } + } + if (is_empty(self.alternative)) self.alternative = null; + var negated = self.condition.negate(compressor); + var negated_is_best = best_of(self.condition, negated) === negated; + if (self.alternative && negated_is_best) { + negated_is_best = false; // because we already do the switch here. + self.condition = negated; + var tmp = self.body; + self.body = self.alternative || make_node(AST_EmptyStatement); + self.alternative = tmp; + } + if (is_empty(self.body) && is_empty(self.alternative)) { + return make_node(AST_SimpleStatement, self.condition, { + body: self.condition + }).transform(compressor); + } + if (self.body instanceof AST_SimpleStatement + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.body, + alternative : self.alternative.body + }) + }).transform(compressor); + } + if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { + if (negated_is_best) return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : negated, + right : self.body.body + }) + }).transform(compressor); + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "&&", + left : self.condition, + right : self.body.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_EmptyStatement + && self.alternative + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : self.condition, + right : self.alternative.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_Exit + && self.alternative instanceof AST_Exit + && self.body.TYPE == self.alternative.TYPE) { + return make_node(self.body.CTOR, self, { + value: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.value || make_node(AST_Undefined, self.body).optimize(compressor), + alternative : self.alternative.value || make_node(AST_Undefined, self.alternative).optimize(compressor) + }) + }).transform(compressor); + } + if (self.body instanceof AST_If + && !self.body.alternative + && !self.alternative) { + self.condition = make_node(AST_Binary, self.condition, { + operator: "&&", + left: self.condition, + right: self.body.condition + }).transform(compressor); + self.body = self.body.body; + } + if (aborts(self.body)) { + if (self.alternative) { + var alt = self.alternative; + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, alt ] + }).transform(compressor); + } + } + if (aborts(self.alternative)) { + var body = self.body; + self.body = self.alternative; + self.condition = negated_is_best ? negated : self.condition.negate(compressor); + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, body ] + }).transform(compressor); + } + return self; + }); + + OPT(AST_Switch, function(self, compressor){ + if (self.body.length == 0 && compressor.option("conditionals")) { + return make_node(AST_SimpleStatement, self, { + body: self.expression + }).transform(compressor); + } + for(;;) { + var last_branch = self.body[self.body.length - 1]; + if (last_branch) { + var stat = last_branch.body[last_branch.body.length - 1]; // last statement + if (stat instanceof AST_Break && loop_body(compressor.loopcontrol_target(stat.label)) === self) + last_branch.body.pop(); + if (last_branch instanceof AST_Default && last_branch.body.length == 0) { + self.body.pop(); + continue; + } + } + break; + } + var exp = self.expression.evaluate(compressor); + out: if (exp.length == 2) try { + // constant expression + self.expression = exp[0]; + if (!compressor.option("dead_code")) break out; + var value = exp[1]; + var in_if = false; + var in_block = false; + var started = false; + var stopped = false; + var ruined = false; + var tt = new TreeTransformer(function(node, descend, in_list){ + if (node instanceof AST_Lambda || node instanceof AST_SimpleStatement) { + // no need to descend these node types + return node; + } + else if (node instanceof AST_Switch && node === self) { + node = node.clone(); + descend(node, this); + return ruined ? node : make_node(AST_BlockStatement, node, { + body: node.body.reduce(function(a, branch){ + return a.concat(branch.body); + }, []) + }).transform(compressor); + } + else if (node instanceof AST_If || node instanceof AST_Try) { + var save = in_if; + in_if = !in_block; + descend(node, this); + in_if = save; + return node; + } + else if (node instanceof AST_StatementWithBody || node instanceof AST_Switch) { + var save = in_block; + in_block = true; + descend(node, this); + in_block = save; + return node; + } + else if (node instanceof AST_Break && this.loopcontrol_target(node.label) === self) { + if (in_if) { + ruined = true; + return node; + } + if (in_block) return node; + stopped = true; + return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); + } + else if (node instanceof AST_SwitchBranch && this.parent() === self) { + if (stopped) return MAP.skip; + if (node instanceof AST_Case) { + var exp = node.expression.evaluate(compressor); + if (exp.length < 2) { + // got a case with non-constant expression, baling out + throw self; + } + if (exp[1] === value || started) { + started = true; + if (aborts(node)) stopped = true; + descend(node, this); + return node; + } + return MAP.skip; + } + descend(node, this); + return node; + } + }); + tt.stack = compressor.stack.slice(); // so that's able to see parent nodes + self = self.transform(tt); + } catch(ex) { + if (ex !== self) throw ex; + } + return self; + }); + + OPT(AST_Case, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_Try, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + AST_Definitions.DEFMETHOD("remove_initializers", function(){ + this.definitions.forEach(function(def){ def.value = null }); + }); + + AST_Definitions.DEFMETHOD("to_assignments", function(){ + var assignments = this.definitions.reduce(function(a, def){ + if (def.value) { + var name = make_node(AST_SymbolRef, def.name, def.name); + a.push(make_node(AST_Assign, def, { + operator : "=", + left : name, + right : def.value + })); + } + return a; + }, []); + if (assignments.length == 0) return null; + return AST_Seq.from_array(assignments); + }); + + OPT(AST_Definitions, function(self, compressor){ + if (self.definitions.length == 0) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_Function, function(self, compressor){ + self = AST_Lambda.prototype.optimize.call(self, compressor); + if (compressor.option("unused") && !compressor.option("keep_fnames")) { + if (self.name && self.name.unreferenced()) { + self.name = null; + } + } + return self; + }); + + OPT(AST_Call, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Array": + if (self.args.length != 1) { + return make_node(AST_Array, self, { + elements: self.args + }).transform(compressor); + } + break; + case "Object": + if (self.args.length == 0) { + return make_node(AST_Object, self, { + properties: [] + }); + } + break; + case "String": + if (self.args.length == 0) return make_node(AST_String, self, { + value: "" + }); + if (self.args.length <= 1) return make_node(AST_Binary, self, { + left: self.args[0], + operator: "+", + right: make_node(AST_String, self, { value: "" }) + }).transform(compressor); + break; + case "Number": + if (self.args.length == 0) return make_node(AST_Number, self, { + value: 0 + }); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: self.args[0], + operator: "+" + }).transform(compressor); + case "Boolean": + if (self.args.length == 0) return make_node(AST_False, self); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: make_node(AST_UnaryPrefix, null, { + expression: self.args[0], + operator: "!" + }), + operator: "!" + }).transform(compressor); + break; + case "Function": + // new Function() => function(){} + if (self.args.length == 0) return make_node(AST_Function, self, { + argnames: [], + body: [] + }); + if (all(self.args, function(x){ return x instanceof AST_String })) { + // quite a corner-case, but we can handle it: + // https://github.com/mishoo/UglifyJS2/issues/203 + // if the code argument is a constant, then we can minify it. + try { + var code = "(function(" + self.args.slice(0, -1).map(function(arg){ + return arg.value; + }).join(",") + "){" + self.args[self.args.length - 1].value + "})()"; + var ast = parse(code); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + var comp = new Compressor(compressor.options); + ast = ast.transform(comp); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + ast.mangle_names(); + var fun; + try { + ast.walk(new TreeWalker(function(node){ + if (node instanceof AST_Lambda) { + fun = node; + throw ast; + } + })); + } catch(ex) { + if (ex !== ast) throw ex; + }; + if (!fun) return self; + var args = fun.argnames.map(function(arg, i){ + return make_node(AST_String, self.args[i], { + value: arg.print_to_string() + }); + }); + var code = OutputStream(); + AST_BlockStatement.prototype._codegen.call(fun, fun, code); + code = code.toString().replace(/^\{|\}$/g, ""); + args.push(make_node(AST_String, self.args[self.args.length - 1], { + value: code + })); + self.args = args; + return self; + } catch(ex) { + if (ex instanceof JS_Parse_Error) { + compressor.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); + compressor.warn(ex.toString()); + } else { + console.log(ex); + throw ex; + } + } + } + break; + } + } + else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { + return make_node(AST_Binary, self, { + left: make_node(AST_String, self, { value: "" }), + operator: "+", + right: exp.expression + }).transform(compressor); + } + else if (exp instanceof AST_Dot && exp.expression instanceof AST_Array && exp.property == "join") EXIT: { + var separator = self.args.length == 0 ? "," : self.args[0].evaluate(compressor)[1]; + if (separator == null) break EXIT; // not a constant + var elements = exp.expression.elements.reduce(function(a, el){ + el = el.evaluate(compressor); + if (a.length == 0 || el.length == 1) { + a.push(el); + } else { + var last = a[a.length - 1]; + if (last.length == 2) { + // it's a constant + var val = "" + last[1] + separator + el[1]; + a[a.length - 1] = [ make_node_from_constant(compressor, val, last[0]), val ]; + } else { + a.push(el); + } + } + return a; + }, []); + if (elements.length == 0) return make_node(AST_String, self, { value: "" }); + if (elements.length == 1) return elements[0][0]; + if (separator == "") { + var first; + if (elements[0][0] instanceof AST_String + || elements[1][0] instanceof AST_String) { + first = elements.shift()[0]; + } else { + first = make_node(AST_String, self, { value: "" }); + } + return elements.reduce(function(prev, el){ + return make_node(AST_Binary, el[0], { + operator : "+", + left : prev, + right : el[0], + }); + }, first).transform(compressor); + } + // need this awkward cloning to not affect original element + // best_of will decide which one to get through. + var node = self.clone(); + node.expression = node.expression.clone(); + node.expression.expression = node.expression.expression.clone(); + node.expression.expression.elements = elements.map(function(el){ + return el[0]; + }); + return best_of(self, node); + } + } + if (compressor.option("side_effects")) { + if (self.expression instanceof AST_Function + && self.args.length == 0 + && !AST_Block.prototype.has_side_effects.call(self.expression, compressor)) { + return make_node(AST_Undefined, self).transform(compressor); + } + } + if (compressor.option("drop_console")) { + if (self.expression instanceof AST_PropAccess) { + var name = self.expression.expression; + while (name.expression) { + name = name.expression; + } + if (name instanceof AST_SymbolRef + && name.name == "console" + && name.undeclared()) { + return make_node(AST_Undefined, self).transform(compressor); + } + } + } + return self.evaluate(compressor)[0]; + }); + + OPT(AST_New, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Object": + case "RegExp": + case "Function": + case "Error": + case "Array": + return make_node(AST_Call, self, self).transform(compressor); + } + } + } + return self; + }); + + OPT(AST_Seq, function(self, compressor){ + if (!compressor.option("side_effects")) + return self; + if (!self.car.has_side_effects(compressor)) { + // we shouldn't compress (1,func)(something) to + // func(something) because that changes the meaning of + // the func (becomes lexical instead of global). + var p = compressor.parent(); + if (!(p instanceof AST_Call && p.expression === self)) { + return self.cdr; + } + } + if (compressor.option("cascade")) { + if (self.car instanceof AST_Assign + && !self.car.left.has_side_effects(compressor)) { + if (self.car.left.equivalent_to(self.cdr)) { + return self.car; + } + if (self.cdr instanceof AST_Call + && self.cdr.expression.equivalent_to(self.car.left)) { + self.cdr.expression = self.car; + return self.cdr; + } + } + if (!self.car.has_side_effects(compressor) + && !self.cdr.has_side_effects(compressor) + && self.car.equivalent_to(self.cdr)) { + return self.car; + } + } + if (self.cdr instanceof AST_UnaryPrefix + && self.cdr.operator == "void" + && !self.cdr.expression.has_side_effects(compressor)) { + self.cdr.expression = self.car; + return self.cdr; + } + if (self.cdr instanceof AST_Undefined) { + return make_node(AST_UnaryPrefix, self, { + operator : "void", + expression : self.car + }); + } + return self; + }); + + AST_Unary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.expression instanceof AST_Seq) { + var seq = this.expression; + var x = seq.to_array(); + this.expression = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + OPT(AST_UnaryPostfix, function(self, compressor){ + return self.lift_sequences(compressor); + }); + + OPT(AST_UnaryPrefix, function(self, compressor){ + self = self.lift_sequences(compressor); + var e = self.expression; + if (compressor.option("booleans") && compressor.in_boolean_context()) { + switch (self.operator) { + case "!": + if (e instanceof AST_UnaryPrefix && e.operator == "!") { + // !!foo ==> foo, if we're in boolean context + return e.expression; + } + break; + case "typeof": + // typeof always returns a non-empty string, thus it's + // always true in booleans + compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + if (e instanceof AST_Binary && self.operator == "!") { + self = best_of(self, e.negate(compressor)); + } + } + return self.evaluate(compressor)[0]; + }); + + function has_side_effects_or_prop_access(node, compressor) { + var save_pure_getters = compressor.option("pure_getters"); + compressor.options.pure_getters = false; + var ret = node.has_side_effects(compressor); + compressor.options.pure_getters = save_pure_getters; + return ret; + } + + AST_Binary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.left instanceof AST_Seq) { + var seq = this.left; + var x = seq.to_array(); + this.left = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + if (this.right instanceof AST_Seq + && this instanceof AST_Assign + && !has_side_effects_or_prop_access(this.left, compressor)) { + var seq = this.right; + var x = seq.to_array(); + this.right = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + var commutativeOperators = makePredicate("== === != !== * & | ^"); + + OPT(AST_Binary, function(self, compressor){ + function reverse(op, force) { + if (force || !(self.left.has_side_effects(compressor) || self.right.has_side_effects(compressor))) { + if (op) self.operator = op; + var tmp = self.left; + self.left = self.right; + self.right = tmp; + } + } + if (commutativeOperators(self.operator)) { + if (self.right instanceof AST_Constant + && !(self.left instanceof AST_Constant)) { + // if right is a constant, whatever side effects the + // left side might have could not influence the + // result. hence, force switch. + + if (!(self.left instanceof AST_Binary + && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { + reverse(null, true); + } + } + if (/^[!=]==?$/.test(self.operator)) { + if (self.left instanceof AST_SymbolRef && self.right instanceof AST_Conditional) { + if (self.right.consequent instanceof AST_SymbolRef + && self.right.consequent.definition() === self.left.definition()) { + if (/^==/.test(self.operator)) return self.right.condition; + if (/^!=/.test(self.operator)) return self.right.condition.negate(compressor); + } + if (self.right.alternative instanceof AST_SymbolRef + && self.right.alternative.definition() === self.left.definition()) { + if (/^==/.test(self.operator)) return self.right.condition.negate(compressor); + if (/^!=/.test(self.operator)) return self.right.condition; + } + } + if (self.right instanceof AST_SymbolRef && self.left instanceof AST_Conditional) { + if (self.left.consequent instanceof AST_SymbolRef + && self.left.consequent.definition() === self.right.definition()) { + if (/^==/.test(self.operator)) return self.left.condition; + if (/^!=/.test(self.operator)) return self.left.condition.negate(compressor); + } + if (self.left.alternative instanceof AST_SymbolRef + && self.left.alternative.definition() === self.right.definition()) { + if (/^==/.test(self.operator)) return self.left.condition.negate(compressor); + if (/^!=/.test(self.operator)) return self.left.condition; + } + } + } + } + self = self.lift_sequences(compressor); + if (compressor.option("comparisons")) switch (self.operator) { + case "===": + case "!==": + if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || + (self.left.is_boolean() && self.right.is_boolean())) { + self.operator = self.operator.substr(0, 2); + } + // XXX: intentionally falling down to the next case + case "==": + case "!=": + if (self.left instanceof AST_String + && self.left.value == "undefined" + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "typeof" + && compressor.option("unsafe")) { + if (!(self.right.expression instanceof AST_SymbolRef) + || !self.right.expression.undeclared()) { + self.right = self.right.expression; + self.left = make_node(AST_Undefined, self.left).optimize(compressor); + if (self.operator.length == 2) self.operator += "="; + } + } + break; + } + if (compressor.option("conditionals")) { + if (self.operator == "&&") { + var ll = self.left.evaluate(compressor); + if (ll.length > 1) { + if (ll[1]) { + compressor.warn("Condition left of && always true [{file}:{line},{col}]", self.start); + var rr = self.right.evaluate(compressor); + return rr[0]; + } else { + compressor.warn("Condition left of && always false [{file}:{line},{col}]", self.start); + return ll[0]; + } + } + } + else if (self.operator == "||") { + var ll = self.left.evaluate(compressor); + if (ll.length > 1) { + if (ll[1]) { + compressor.warn("Condition left of || always true [{file}:{line},{col}]", self.start); + return ll[0]; + } else { + compressor.warn("Condition left of || always false [{file}:{line},{col}]", self.start); + var rr = self.right.evaluate(compressor); + return rr[0]; + } + } + } + } + if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) { + case "&&": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && !ll[1]) || (rr.length > 1 && !rr[1])) { + compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); + if (self.left.has_side_effects(compressor)) { + return make_node(AST_Seq, self, { + car: self.left, + cdr: make_node(AST_False) + }).optimize(compressor); + } + return make_node(AST_False, self); + } + if (ll.length > 1 && ll[1]) { + return rr[0]; + } + if (rr.length > 1 && rr[1]) { + return ll[0]; + } + break; + case "||": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[1]) || (rr.length > 1 && rr[1])) { + compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); + if (self.left.has_side_effects(compressor)) { + return make_node(AST_Seq, self, { + car: self.left, + cdr: make_node(AST_True) + }).optimize(compressor); + } + return make_node(AST_True, self); + } + if (ll.length > 1 && !ll[1]) { + return rr[0]; + } + if (rr.length > 1 && !rr[1]) { + return ll[0]; + } + break; + case "+": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[0] instanceof AST_String && ll[1]) || + (rr.length > 1 && rr[0] instanceof AST_String && rr[1])) { + compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + break; + } + if (compressor.option("comparisons") && self.is_boolean()) { + if (!(compressor.parent() instanceof AST_Binary) + || compressor.parent() instanceof AST_Assign) { + var negated = make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: self.negate(compressor) + }); + self = best_of(self, negated); + } + switch (self.operator) { + case "<": reverse(">"); break; + case "<=": reverse(">="); break; + } + } + if (self.operator == "+" && self.right instanceof AST_String + && self.right.getValue() === "" && self.left instanceof AST_Binary + && self.left.operator == "+" && self.left.is_string(compressor)) { + return self.left; + } + if (compressor.option("evaluate")) { + if (self.operator == "+") { + if (self.left instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_String, null, { + value: "" + self.left.getValue() + self.right.left.getValue(), + start: self.left.start, + end: self.right.left.end + }), + right: self.right.right + }); + } + if (self.right instanceof AST_Constant + && self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.right instanceof AST_Constant + && self.left.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, null, { + value: "" + self.left.right.getValue() + self.right.getValue(), + start: self.left.right.start, + end: self.right.end + }) + }); + } + if (self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.is_string(compressor) + && self.left.right instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_Binary, self.left, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, null, { + value: "" + self.left.right.getValue() + self.right.left.getValue(), + start: self.left.right.start, + end: self.right.left.end + }) + }), + right: self.right.right + }); + } + } + } + // x && (y && z) ==> x && y && z + // x || (y || z) ==> x || y || z + if (self.right instanceof AST_Binary + && self.right.operator == self.operator + && (self.operator == "&&" || self.operator == "||")) + { + self.left = make_node(AST_Binary, self.left, { + operator : self.operator, + left : self.left, + right : self.right.left + }); + self.right = self.right.right; + return self.transform(compressor); + } + return self.evaluate(compressor)[0]; + }); + + OPT(AST_SymbolRef, function(self, compressor){ + function isLHS(symbol, parent) { + return ( + parent instanceof AST_Binary && + parent.operator === '=' && + parent.left === symbol + ); + } + + if (self.undeclared() && !isLHS(self, compressor.parent())) { + var defines = compressor.option("global_defs"); + if (defines && defines.hasOwnProperty(self.name)) { + return make_node_from_constant(compressor, defines[self.name], self); + } + switch (self.name) { + case "undefined": + return make_node(AST_Undefined, self); + case "NaN": + return make_node(AST_NaN, self).transform(compressor); + case "Infinity": + return make_node(AST_Infinity, self).transform(compressor); + } + } + return self; + }); + + OPT(AST_Infinity, function (self, compressor) { + return make_node(AST_Binary, self, { + operator : '/', + left : make_node(AST_Number, self, {value: 1}), + right : make_node(AST_Number, self, {value: 0}) + }); + }); + + OPT(AST_Undefined, function(self, compressor){ + if (compressor.option("unsafe")) { + var scope = compressor.find_parent(AST_Scope); + var undef = scope.find_variable("undefined"); + if (undef) { + var ref = make_node(AST_SymbolRef, self, { + name : "undefined", + scope : scope, + thedef : undef + }); + ref.reference(); + return ref; + } + } + return self; + }); + + var ASSIGN_OPS = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; + OPT(AST_Assign, function(self, compressor){ + self = self.lift_sequences(compressor); + if (self.operator == "=" + && self.left instanceof AST_SymbolRef + && self.right instanceof AST_Binary + && self.right.left instanceof AST_SymbolRef + && self.right.left.name == self.left.name + && member(self.right.operator, ASSIGN_OPS)) { + self.operator = self.right.operator + "="; + self.right = self.right.right; + } + return self; + }); + + OPT(AST_Conditional, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + if (self.condition instanceof AST_Seq) { + var car = self.condition.car; + self.condition = self.condition.cdr; + return AST_Seq.cons(car, self); + } + var cond = self.condition.evaluate(compressor); + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.start); + return self.consequent; + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.start); + return self.alternative; + } + } + var negated = cond[0].negate(compressor); + if (best_of(cond[0], negated) === negated) { + self = make_node(AST_Conditional, self, { + condition: negated, + consequent: self.alternative, + alternative: self.consequent + }); + } + var consequent = self.consequent; + var alternative = self.alternative; + if (consequent instanceof AST_Assign + && alternative instanceof AST_Assign + && consequent.operator == alternative.operator + && consequent.left.equivalent_to(alternative.left) + && !consequent.left.has_side_effects(compressor) + ) { + /* + * Stuff like this: + * if (foo) exp = something; else exp = something_else; + * ==> + * exp = foo ? something : something_else; + */ + return make_node(AST_Assign, self, { + operator: consequent.operator, + left: consequent.left, + right: make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.right, + alternative: alternative.right + }) + }); + } + if (consequent instanceof AST_Call + && alternative.TYPE === consequent.TYPE + && consequent.args.length == alternative.args.length + && !consequent.expression.has_side_effects(compressor) + && consequent.expression.equivalent_to(alternative.expression)) { + if (consequent.args.length == 0) { + return make_node(AST_Seq, self, { + car: self.condition, + cdr: consequent + }); + } + if (consequent.args.length == 1) { + consequent.args[0] = make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.args[0], + alternative: alternative.args[0] + }); + return consequent; + } + } + // x?y?z:a:a --> x&&y?z:a + if (consequent instanceof AST_Conditional + && consequent.alternative.equivalent_to(alternative)) { + return make_node(AST_Conditional, self, { + condition: make_node(AST_Binary, self, { + left: self.condition, + operator: "&&", + right: consequent.condition + }), + consequent: consequent.consequent, + alternative: alternative + }); + } + // x=y?1:1 --> x=1 + if (consequent instanceof AST_Constant + && alternative instanceof AST_Constant + && consequent.equivalent_to(alternative)) { + if (self.condition.has_side_effects(compressor)) { + return AST_Seq.from_array([self.condition, make_node_from_constant(compressor, consequent.value, self)]); + } else { + return make_node_from_constant(compressor, consequent.value, self); + + } + } + // x=y?true:false --> x=!!y + if (consequent instanceof AST_True + && alternative instanceof AST_False) { + self.condition = self.condition.negate(compressor); + return make_node(AST_UnaryPrefix, self.condition, { + operator: "!", + expression: self.condition + }); + } + // x=y?false:true --> x=!y + if (consequent instanceof AST_False + && alternative instanceof AST_True) { + return self.condition.negate(compressor) + } + return self; + }); + + OPT(AST_Boolean, function(self, compressor){ + if (compressor.option("booleans")) { + var p = compressor.parent(); + if (p instanceof AST_Binary && (p.operator == "==" + || p.operator == "!=")) { + compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { + operator : p.operator, + value : self.value, + file : p.start.file, + line : p.start.line, + col : p.start.col, + }); + return make_node(AST_Number, self, { + value: +self.value + }); + } + return make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: make_node(AST_Number, self, { + value: 1 - self.value + }) + }); + } + return self; + }); + + OPT(AST_Sub, function(self, compressor){ + var prop = self.property; + if (prop instanceof AST_String && compressor.option("properties")) { + prop = prop.getValue(); + if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) { + return make_node(AST_Dot, self, { + expression : self.expression, + property : prop + }).optimize(compressor); + } + var v = parseFloat(prop); + if (!isNaN(v) && v.toString() == prop) { + self.property = make_node(AST_Number, self.property, { + value: v + }); + } + } + return self; + }); + + OPT(AST_Dot, function(self, compressor){ + var prop = self.property; + if (RESERVED_WORDS(prop) && !compressor.option("screw_ie8")) { + return make_node(AST_Sub, self, { + expression : self.expression, + property : make_node(AST_String, self, { + value: prop + }) + }).optimize(compressor); + } + return self.evaluate(compressor)[0]; + }); + + function literals_in_boolean_context(self, compressor) { + if (compressor.option("booleans") && compressor.in_boolean_context() && !self.has_side_effects(compressor)) { + return make_node(AST_True, self); + } + return self; + }; + OPT(AST_Array, literals_in_boolean_context); + OPT(AST_Object, literals_in_boolean_context); + OPT(AST_RegExp, literals_in_boolean_context); + + OPT(AST_Return, function(self, compressor){ + if (self.value instanceof AST_Undefined) { + self.value = null; + } + return self; + }); + +})(); diff --git a/tools/eslint/node_modules/uglify-js/lib/mozilla-ast.js b/tools/eslint/node_modules/uglify-js/lib/mozilla-ast.js new file mode 100644 index 00000000000000..c1b2b683e12c06 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/mozilla-ast.js @@ -0,0 +1,537 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +(function(){ + + var MOZ_TO_ME = { + ExpressionStatement: function(M) { + var expr = M.expression; + if (expr.type === "Literal" && typeof expr.value === "string") { + return new AST_Directive({ + start: my_start_token(M), + end: my_end_token(M), + value: expr.value + }); + } + return new AST_SimpleStatement({ + start: my_start_token(M), + end: my_end_token(M), + body: from_moz(expr) + }); + }, + TryStatement: function(M) { + var handlers = M.handlers || [M.handler]; + if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) { + throw new Error("Multiple catch clauses are not supported."); + } + return new AST_Try({ + start : my_start_token(M), + end : my_end_token(M), + body : from_moz(M.block).body, + bcatch : from_moz(handlers[0]), + bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null + }); + }, + Property: function(M) { + var key = M.key; + var name = key.type == "Identifier" ? key.name : key.value; + var args = { + start : my_start_token(key), + end : my_end_token(M.value), + key : name, + value : from_moz(M.value) + }; + switch (M.kind) { + case "init": + return new AST_ObjectKeyVal(args); + case "set": + args.value.name = from_moz(key); + return new AST_ObjectSetter(args); + case "get": + args.value.name = from_moz(key); + return new AST_ObjectGetter(args); + } + }, + ObjectExpression: function(M) { + return new AST_Object({ + start : my_start_token(M), + end : my_end_token(M), + properties : M.properties.map(function(prop){ + prop.type = "Property"; + return from_moz(prop) + }) + }); + }, + SequenceExpression: function(M) { + return AST_Seq.from_array(M.expressions.map(from_moz)); + }, + MemberExpression: function(M) { + return new (M.computed ? AST_Sub : AST_Dot)({ + start : my_start_token(M), + end : my_end_token(M), + property : M.computed ? from_moz(M.property) : M.property.name, + expression : from_moz(M.object) + }); + }, + SwitchCase: function(M) { + return new (M.test ? AST_Case : AST_Default)({ + start : my_start_token(M), + end : my_end_token(M), + expression : from_moz(M.test), + body : M.consequent.map(from_moz) + }); + }, + VariableDeclaration: function(M) { + return new (M.kind === "const" ? AST_Const : AST_Var)({ + start : my_start_token(M), + end : my_end_token(M), + definitions : M.declarations.map(from_moz) + }); + }, + Literal: function(M) { + var val = M.value, args = { + start : my_start_token(M), + end : my_end_token(M) + }; + if (val === null) return new AST_Null(args); + switch (typeof val) { + case "string": + args.value = val; + return new AST_String(args); + case "number": + args.value = val; + return new AST_Number(args); + case "boolean": + return new (val ? AST_True : AST_False)(args); + default: + var rx = M.regex; + if (rx && rx.pattern) { + // RegExpLiteral as per ESTree AST spec + args.value = new RegExp(rx.pattern, rx.flags).toString(); + } else { + // support legacy RegExp + args.value = M.regex && M.raw ? M.raw : val; + } + return new AST_RegExp(args); + } + }, + Identifier: function(M) { + var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; + return new ( p.type == "LabeledStatement" ? AST_Label + : p.type == "VariableDeclarator" && p.id === M ? (p.kind == "const" ? AST_SymbolConst : AST_SymbolVar) + : p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg) + : p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg) + : p.type == "CatchClause" ? AST_SymbolCatch + : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef + : AST_SymbolRef)({ + start : my_start_token(M), + end : my_end_token(M), + name : M.name + }); + } + }; + + MOZ_TO_ME.UpdateExpression = + MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) { + var prefix = "prefix" in M ? M.prefix + : M.type == "UnaryExpression" ? true : false; + return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ + start : my_start_token(M), + end : my_end_token(M), + operator : M.operator, + expression : from_moz(M.argument) + }); + }; + + map("Program", AST_Toplevel, "body@body"); + map("EmptyStatement", AST_EmptyStatement); + map("BlockStatement", AST_BlockStatement, "body@body"); + map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); + map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); + map("BreakStatement", AST_Break, "label>label"); + map("ContinueStatement", AST_Continue, "label>label"); + map("WithStatement", AST_With, "object>expression, body>body"); + map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); + map("ReturnStatement", AST_Return, "argument>value"); + map("ThrowStatement", AST_Throw, "argument>value"); + map("WhileStatement", AST_While, "test>condition, body>body"); + map("DoWhileStatement", AST_Do, "test>condition, body>body"); + map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); + map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); + map("DebuggerStatement", AST_Debugger); + map("FunctionDeclaration", AST_Defun, "id>name, params@argnames, body%body"); + map("VariableDeclarator", AST_VarDef, "id>name, init>value"); + map("CatchClause", AST_Catch, "param>argname, body%body"); + + map("ThisExpression", AST_This); + map("ArrayExpression", AST_Array, "elements@elements"); + map("FunctionExpression", AST_Function, "id>name, params@argnames, body%body"); + map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); + map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); + map("NewExpression", AST_New, "callee>expression, arguments@args"); + map("CallExpression", AST_Call, "callee>expression, arguments@args"); + + def_to_moz(AST_Directive, function To_Moz_Directive(M) { + return { + type: "ExpressionStatement", + expression: { + type: "Literal", + value: M.value + } + }; + }); + + def_to_moz(AST_SimpleStatement, function To_Moz_ExpressionStatement(M) { + return { + type: "ExpressionStatement", + expression: to_moz(M.body) + }; + }); + + def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) { + return { + type: "SwitchCase", + test: to_moz(M.expression), + consequent: M.body.map(to_moz) + }; + }); + + def_to_moz(AST_Try, function To_Moz_TryStatement(M) { + return { + type: "TryStatement", + block: to_moz_block(M), + handler: to_moz(M.bcatch), + guardedHandlers: [], + finalizer: to_moz(M.bfinally) + }; + }); + + def_to_moz(AST_Catch, function To_Moz_CatchClause(M) { + return { + type: "CatchClause", + param: to_moz(M.argname), + guard: null, + body: to_moz_block(M) + }; + }); + + def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) { + return { + type: "VariableDeclaration", + kind: M instanceof AST_Const ? "const" : "var", + declarations: M.definitions.map(to_moz) + }; + }); + + def_to_moz(AST_Seq, function To_Moz_SequenceExpression(M) { + return { + type: "SequenceExpression", + expressions: M.to_array().map(to_moz) + }; + }); + + def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) { + var isComputed = M instanceof AST_Sub; + return { + type: "MemberExpression", + object: to_moz(M.expression), + computed: isComputed, + property: isComputed ? to_moz(M.property) : {type: "Identifier", name: M.property} + }; + }); + + def_to_moz(AST_Unary, function To_Moz_Unary(M) { + return { + type: M.operator == "++" || M.operator == "--" ? "UpdateExpression" : "UnaryExpression", + operator: M.operator, + prefix: M instanceof AST_UnaryPrefix, + argument: to_moz(M.expression) + }; + }); + + def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) { + return { + type: M.operator == "&&" || M.operator == "||" ? "LogicalExpression" : "BinaryExpression", + left: to_moz(M.left), + operator: M.operator, + right: to_moz(M.right) + }; + }); + + def_to_moz(AST_Object, function To_Moz_ObjectExpression(M) { + return { + type: "ObjectExpression", + properties: M.properties.map(to_moz) + }; + }); + + def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) { + var key = ( + is_identifier(M.key) + ? {type: "Identifier", name: M.key} + : {type: "Literal", value: M.key} + ); + var kind; + if (M instanceof AST_ObjectKeyVal) { + kind = "init"; + } else + if (M instanceof AST_ObjectGetter) { + kind = "get"; + } else + if (M instanceof AST_ObjectSetter) { + kind = "set"; + } + return { + type: "Property", + kind: kind, + key: key, + value: to_moz(M.value) + }; + }); + + def_to_moz(AST_Symbol, function To_Moz_Identifier(M) { + var def = M.definition(); + return { + type: "Identifier", + name: def ? def.mangled_name || def.name : M.name + }; + }); + + def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) { + var value = M.value; + return { + type: "Literal", + value: value, + raw: value.toString(), + regex: { + pattern: value.source, + flags: value.toString().match(/[gimuy]*$/)[0] + } + }; + }); + + def_to_moz(AST_Constant, function To_Moz_Literal(M) { + var value = M.value; + if (typeof value === 'number' && (value < 0 || (value === 0 && 1 / value < 0))) { + return { + type: "UnaryExpression", + operator: "-", + prefix: true, + argument: { + type: "Literal", + value: -value, + raw: M.start.raw + } + }; + } + return { + type: "Literal", + value: value, + raw: M.start.raw + }; + }); + + def_to_moz(AST_Atom, function To_Moz_Atom(M) { + return { + type: "Identifier", + name: String(M.value) + }; + }); + + AST_Boolean.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); + AST_Null.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); + AST_Hole.DEFMETHOD("to_mozilla_ast", function To_Moz_ArrayHole() { return null }); + + AST_Block.DEFMETHOD("to_mozilla_ast", AST_BlockStatement.prototype.to_mozilla_ast); + AST_Lambda.DEFMETHOD("to_mozilla_ast", AST_Function.prototype.to_mozilla_ast); + + /* -----[ tools ]----- */ + + function raw_token(moznode) { + if (moznode.type == "Literal") { + return moznode.raw != null ? moznode.raw : moznode.value + ""; + } + } + + function my_start_token(moznode) { + var loc = moznode.loc, start = loc && loc.start; + var range = moznode.range; + return new AST_Token({ + file : loc && loc.source, + line : start && start.line, + col : start && start.column, + pos : range ? range[0] : moznode.start, + endline : start && start.line, + endcol : start && start.column, + endpos : range ? range[0] : moznode.start, + raw : raw_token(moznode), + }); + }; + + function my_end_token(moznode) { + var loc = moznode.loc, end = loc && loc.end; + var range = moznode.range; + return new AST_Token({ + file : loc && loc.source, + line : end && end.line, + col : end && end.column, + pos : range ? range[1] : moznode.end, + endline : end && end.line, + endcol : end && end.column, + endpos : range ? range[1] : moznode.end, + raw : raw_token(moznode), + }); + }; + + function map(moztype, mytype, propmap) { + var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; + moz_to_me += "return new U2." + mytype.name + "({\n" + + "start: my_start_token(M),\n" + + "end: my_end_token(M)"; + + var me_to_moz = "function To_Moz_" + moztype + "(M){\n"; + me_to_moz += "return {\n" + + "type: " + JSON.stringify(moztype); + + if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop){ + var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); + if (!m) throw new Error("Can't understand property map: " + prop); + var moz = m[1], how = m[2], my = m[3]; + moz_to_me += ",\n" + my + ": "; + me_to_moz += ",\n" + moz + ": "; + switch (how) { + case "@": + moz_to_me += "M." + moz + ".map(from_moz)"; + me_to_moz += "M." + my + ".map(to_moz)"; + break; + case ">": + moz_to_me += "from_moz(M." + moz + ")"; + me_to_moz += "to_moz(M." + my + ")"; + break; + case "=": + moz_to_me += "M." + moz; + me_to_moz += "M." + my; + break; + case "%": + moz_to_me += "from_moz(M." + moz + ").body"; + me_to_moz += "to_moz_block(M)"; + break; + default: + throw new Error("Can't understand operator in propmap: " + prop); + } + }); + + moz_to_me += "\n})\n}"; + me_to_moz += "\n}\n}"; + + //moz_to_me = parse(moz_to_me).print_to_string({ beautify: true }); + //me_to_moz = parse(me_to_moz).print_to_string({ beautify: true }); + //console.log(moz_to_me); + + moz_to_me = new Function("U2", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")( + exports, my_start_token, my_end_token, from_moz + ); + me_to_moz = new Function("to_moz", "to_moz_block", "return(" + me_to_moz + ")")( + to_moz, to_moz_block + ); + MOZ_TO_ME[moztype] = moz_to_me; + def_to_moz(mytype, me_to_moz); + }; + + var FROM_MOZ_STACK = null; + + function from_moz(node) { + FROM_MOZ_STACK.push(node); + var ret = node != null ? MOZ_TO_ME[node.type](node) : null; + FROM_MOZ_STACK.pop(); + return ret; + }; + + AST_Node.from_mozilla_ast = function(node){ + var save_stack = FROM_MOZ_STACK; + FROM_MOZ_STACK = []; + var ast = from_moz(node); + FROM_MOZ_STACK = save_stack; + return ast; + }; + + function set_moz_loc(mynode, moznode, myparent) { + var start = mynode.start; + var end = mynode.end; + if (start.pos != null && end.endpos != null) { + moznode.range = [start.pos, end.endpos]; + } + if (start.line) { + moznode.loc = { + start: {line: start.line, column: start.col}, + end: end.endline ? {line: end.endline, column: end.endcol} : null + }; + if (start.file) { + moznode.loc.source = start.file; + } + } + return moznode; + }; + + function def_to_moz(mytype, handler) { + mytype.DEFMETHOD("to_mozilla_ast", function() { + return set_moz_loc(this, handler(this)); + }); + }; + + function to_moz(node) { + return node != null ? node.to_mozilla_ast() : null; + }; + + function to_moz_block(node) { + return { + type: "BlockStatement", + body: node.body.map(to_moz) + }; + }; + +})(); diff --git a/tools/eslint/node_modules/uglify-js/lib/output.js b/tools/eslint/node_modules/uglify-js/lib/output.js new file mode 100644 index 00000000000000..f10c918a7f59c7 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/output.js @@ -0,0 +1,1371 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function OutputStream(options) { + + options = defaults(options, { + indent_start : 0, + indent_level : 4, + quote_keys : false, + space_colon : true, + ascii_only : false, + unescape_regexps : false, + inline_script : false, + width : 80, + max_line_len : 32000, + beautify : false, + source_map : null, + bracketize : false, + semicolons : true, + comments : false, + shebang : true, + preserve_line : false, + screw_ie8 : false, + preamble : null, + quote_style : 0 + }, true); + + var indentation = 0; + var current_col = 0; + var current_line = 1; + var current_pos = 0; + var OUTPUT = ""; + + function to_ascii(str, identifier) { + return str.replace(/[\u0080-\uffff]/g, function(ch) { + var code = ch.charCodeAt(0).toString(16); + if (code.length <= 2 && !identifier) { + while (code.length < 2) code = "0" + code; + return "\\x" + code; + } else { + while (code.length < 4) code = "0" + code; + return "\\u" + code; + } + }); + }; + + function make_string(str, quote) { + var dq = 0, sq = 0; + str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s){ + switch (s) { + case "\\": return "\\\\"; + case "\b": return "\\b"; + case "\f": return "\\f"; + case "\n": return "\\n"; + case "\r": return "\\r"; + case "\x0B": return options.screw_ie8 ? "\\v" : "\\x0B"; + case "\u2028": return "\\u2028"; + case "\u2029": return "\\u2029"; + case '"': ++dq; return '"'; + case "'": ++sq; return "'"; + case "\0": return "\\x00"; + case "\ufeff": return "\\ufeff"; + } + return s; + }); + function quote_single() { + return "'" + str.replace(/\x27/g, "\\'") + "'"; + } + function quote_double() { + return '"' + str.replace(/\x22/g, '\\"') + '"'; + } + if (options.ascii_only) str = to_ascii(str); + switch (options.quote_style) { + case 1: + return quote_single(); + case 2: + return quote_double(); + case 3: + return quote == "'" ? quote_single() : quote_double(); + default: + return dq > sq ? quote_single() : quote_double(); + } + }; + + function encode_string(str, quote) { + var ret = make_string(str, quote); + if (options.inline_script) { + ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); + ret = ret.replace(/\x3c!--/g, "\\x3c!--"); + ret = ret.replace(/--\x3e/g, "--\\x3e"); + } + return ret; + }; + + function make_name(name) { + name = name.toString(); + if (options.ascii_only) + name = to_ascii(name, true); + return name; + }; + + function make_indent(back) { + return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); + }; + + /* -----[ beautification/minification ]----- */ + + var might_need_space = false; + var might_need_semicolon = false; + var last = null; + + function last_char() { + return last.charAt(last.length - 1); + }; + + function maybe_newline() { + if (options.max_line_len && current_col > options.max_line_len) + print("\n"); + }; + + var requireSemicolonChars = makePredicate("( [ + * / - , ."); + + function print(str) { + str = String(str); + var ch = str.charAt(0); + if (might_need_semicolon) { + might_need_semicolon = false; + + if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { + if (options.semicolons || requireSemicolonChars(ch)) { + OUTPUT += ";"; + current_col++; + current_pos++; + } else { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + + if (/^\s+$/.test(str)) { + // reset the semicolon flag, since we didn't print one + // now and might still have to later + might_need_semicolon = true; + } + } + + if (!options.beautify) + might_need_space = false; + } + } + + if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { + var target_line = stack[stack.length - 1].start.line; + while (current_line < target_line) { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + might_need_space = false; + } + } + + if (might_need_space) { + var prev = last_char(); + if ((is_identifier_char(prev) + && (is_identifier_char(ch) || ch == "\\")) + || (/^[\+\-\/]$/.test(ch) && ch == prev)) + { + OUTPUT += " "; + current_col++; + current_pos++; + } + might_need_space = false; + } + var a = str.split(/\r?\n/), n = a.length - 1; + current_line += n; + if (n == 0) { + current_col += a[n].length; + } else { + current_col = a[n].length; + } + current_pos += str.length; + last = str; + OUTPUT += str; + }; + + var space = options.beautify ? function() { + print(" "); + } : function() { + might_need_space = true; + }; + + var indent = options.beautify ? function(half) { + if (options.beautify) { + print(make_indent(half ? 0.5 : 0)); + } + } : noop; + + var with_indent = options.beautify ? function(col, cont) { + if (col === true) col = next_indent(); + var save_indentation = indentation; + indentation = col; + var ret = cont(); + indentation = save_indentation; + return ret; + } : function(col, cont) { return cont() }; + + var newline = options.beautify ? function() { + print("\n"); + } : maybe_newline; + + var semicolon = options.beautify ? function() { + print(";"); + } : function() { + might_need_semicolon = true; + }; + + function force_semicolon() { + might_need_semicolon = false; + print(";"); + }; + + function next_indent() { + return indentation + options.indent_level; + }; + + function with_block(cont) { + var ret; + print("{"); + newline(); + with_indent(next_indent(), function(){ + ret = cont(); + }); + indent(); + print("}"); + return ret; + }; + + function with_parens(cont) { + print("("); + //XXX: still nice to have that for argument lists + //var ret = with_indent(current_col, cont); + var ret = cont(); + print(")"); + return ret; + }; + + function with_square(cont) { + print("["); + //var ret = with_indent(current_col, cont); + var ret = cont(); + print("]"); + return ret; + }; + + function comma() { + print(","); + space(); + }; + + function colon() { + print(":"); + if (options.space_colon) space(); + }; + + var add_mapping = options.source_map ? function(token, name) { + try { + if (token) options.source_map.add( + token.file || "?", + current_line, current_col, + token.line, token.col, + (!name && token.type == "name") ? token.value : name + ); + } catch(ex) { + AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { + file: token.file, + line: token.line, + col: token.col, + cline: current_line, + ccol: current_col, + name: name || "" + }) + } + } : noop; + + function get() { + return OUTPUT; + }; + + if (options.preamble) { + print(options.preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n")); + } + + var stack = []; + return { + get : get, + toString : get, + indent : indent, + indentation : function() { return indentation }, + current_width : function() { return current_col - indentation }, + should_break : function() { return options.width && this.current_width() >= options.width }, + newline : newline, + print : print, + space : space, + comma : comma, + colon : colon, + last : function() { return last }, + semicolon : semicolon, + force_semicolon : force_semicolon, + to_ascii : to_ascii, + print_name : function(name) { print(make_name(name)) }, + print_string : function(str, quote) { print(encode_string(str, quote)) }, + next_indent : next_indent, + with_indent : with_indent, + with_block : with_block, + with_parens : with_parens, + with_square : with_square, + add_mapping : add_mapping, + option : function(opt) { return options[opt] }, + line : function() { return current_line }, + col : function() { return current_col }, + pos : function() { return current_pos }, + push_node : function(node) { stack.push(node) }, + pop_node : function() { return stack.pop() }, + stack : function() { return stack }, + parent : function(n) { + return stack[stack.length - 2 - (n || 0)]; + } + }; + +}; + +/* -----[ code generators ]----- */ + +(function(){ + + /* -----[ utils ]----- */ + + function DEFPRINT(nodetype, generator) { + nodetype.DEFMETHOD("_codegen", generator); + }; + + var use_asm = false; + + AST_Node.DEFMETHOD("print", function(stream, force_parens){ + var self = this, generator = self._codegen, prev_use_asm = use_asm; + if (self instanceof AST_Directive && self.value == "use asm") { + use_asm = true; + } + function doit() { + self.add_comments(stream); + self.add_source_map(stream); + generator(self, stream); + } + stream.push_node(self); + if (force_parens || self.needs_parens(stream)) { + stream.with_parens(doit); + } else { + doit(); + } + stream.pop_node(); + if (self instanceof AST_Lambda) { + use_asm = prev_use_asm; + } + }); + + AST_Node.DEFMETHOD("print_to_string", function(options){ + var s = OutputStream(options); + this.print(s); + return s.get(); + }); + + /* -----[ comments ]----- */ + + AST_Node.DEFMETHOD("add_comments", function(output){ + var c = output.option("comments"), self = this; + var start = self.start; + if (start && !start._comments_dumped) { + start._comments_dumped = true; + var comments = start.comments_before || []; + + // XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112 + // and https://github.com/mishoo/UglifyJS2/issues/372 + if (self instanceof AST_Exit && self.value) { + self.value.walk(new TreeWalker(function(node){ + if (node.start && node.start.comments_before) { + comments = comments.concat(node.start.comments_before); + node.start.comments_before = []; + } + if (node instanceof AST_Function || + node instanceof AST_Array || + node instanceof AST_Object) + { + return true; // don't go inside. + } + })); + } + + if (!c) { + comments = comments.filter(function(comment) { + return comment.type == "comment5"; + }); + } else if (c.test) { + comments = comments.filter(function(comment){ + return c.test(comment.value) || comment.type == "comment5"; + }); + } else if (typeof c == "function") { + comments = comments.filter(function(comment){ + return c(self, comment) || comment.type == "comment5"; + }); + } + + // Keep single line comments after nlb, after nlb + if (!output.option("beautify") && comments.length > 0 && + /comment[134]/.test(comments[0].type) && + output.col() !== 0 && comments[0].nlb) + { + output.print("\n"); + } + + comments.forEach(function(c){ + if (/comment[134]/.test(c.type)) { + output.print("//" + c.value + "\n"); + output.indent(); + } + else if (c.type == "comment2") { + output.print("/*" + c.value + "*/"); + if (start.nlb) { + output.print("\n"); + output.indent(); + } else { + output.space(); + } + } + else if (output.pos() === 0 && c.type == "comment5" && output.option("shebang")) { + output.print("#!" + c.value + "\n"); + output.indent(); + } + }); + } + }); + + /* -----[ PARENTHESES ]----- */ + + function PARENS(nodetype, func) { + if (Array.isArray(nodetype)) { + nodetype.forEach(function(nodetype){ + PARENS(nodetype, func); + }); + } else { + nodetype.DEFMETHOD("needs_parens", func); + } + }; + + PARENS(AST_Node, function(){ + return false; + }); + + // a function expression needs parens around it when it's provably + // the first token to appear in a statement. + PARENS(AST_Function, function(output){ + return first_in_statement(output); + }); + + // same goes for an object literal, because otherwise it would be + // interpreted as a block of code. + PARENS(AST_Object, function(output){ + return first_in_statement(output); + }); + + PARENS([ AST_Unary, AST_Undefined ], function(output){ + var p = output.parent(); + return p instanceof AST_PropAccess && p.expression === this; + }); + + PARENS(AST_Seq, function(output){ + var p = output.parent(); + return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) + || p instanceof AST_Unary // !(foo, bar, baz) + || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 + || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 + || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 + || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] + || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 + || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) + * ==> 20 (side effect, set a := 10 and b := 20) */ + ; + }); + + PARENS(AST_Binary, function(output){ + var p = output.parent(); + // (foo && bar)() + if (p instanceof AST_Call && p.expression === this) + return true; + // typeof (foo && bar) + if (p instanceof AST_Unary) + return true; + // (foo && bar)["prop"], (foo && bar).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + // this deals with precedence: 3 * (2 + 1) + if (p instanceof AST_Binary) { + var po = p.operator, pp = PRECEDENCE[po]; + var so = this.operator, sp = PRECEDENCE[so]; + if (pp > sp + || (pp == sp + && this === p.right)) { + return true; + } + } + }); + + PARENS(AST_PropAccess, function(output){ + var p = output.parent(); + if (p instanceof AST_New && p.expression === this) { + // i.e. new (foo.bar().baz) + // + // if there's one call into this subtree, then we need + // parens around it too, otherwise the call will be + // interpreted as passing the arguments to the upper New + // expression. + try { + this.walk(new TreeWalker(function(node){ + if (node instanceof AST_Call) throw p; + })); + } catch(ex) { + if (ex !== p) throw ex; + return true; + } + } + }); + + PARENS(AST_Call, function(output){ + var p = output.parent(), p1; + if (p instanceof AST_New && p.expression === this) + return true; + + // workaround for Safari bug. + // https://bugs.webkit.org/show_bug.cgi?id=123506 + return this.expression instanceof AST_Function + && p instanceof AST_PropAccess + && p.expression === this + && (p1 = output.parent(1)) instanceof AST_Assign + && p1.left === p; + }); + + PARENS(AST_New, function(output){ + var p = output.parent(); + if (no_constructor_parens(this, output) + && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) + return true; + }); + + PARENS(AST_Number, function(output){ + var p = output.parent(); + if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + PARENS([ AST_Assign, AST_Conditional ], function (output){ + var p = output.parent(); + // !(a = false) → true + if (p instanceof AST_Unary) + return true; + // 1 + (a = 2) + 3 → 6, side effect setting a = 2 + if (p instanceof AST_Binary && !(p instanceof AST_Assign)) + return true; + // (a = func)() —or— new (a = Object)() + if (p instanceof AST_Call && p.expression === this) + return true; + // (a = foo) ? bar : baz + if (p instanceof AST_Conditional && p.condition === this) + return true; + // (a = foo)["prop"] —or— (a = foo).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + /* -----[ PRINTERS ]----- */ + + DEFPRINT(AST_Directive, function(self, output){ + output.print_string(self.value, self.quote); + output.semicolon(); + }); + DEFPRINT(AST_Debugger, function(self, output){ + output.print("debugger"); + output.semicolon(); + }); + + /* -----[ statements ]----- */ + + function display_body(body, is_toplevel, output) { + var last = body.length - 1; + body.forEach(function(stmt, i){ + if (!(stmt instanceof AST_EmptyStatement)) { + output.indent(); + stmt.print(output); + if (!(i == last && is_toplevel)) { + output.newline(); + if (is_toplevel) output.newline(); + } + } + }); + }; + + AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output){ + force_statement(this.body, output); + }); + + DEFPRINT(AST_Statement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + DEFPRINT(AST_Toplevel, function(self, output){ + display_body(self.body, true, output); + output.print(""); + }); + DEFPRINT(AST_LabeledStatement, function(self, output){ + self.label.print(output); + output.colon(); + self.body.print(output); + }); + DEFPRINT(AST_SimpleStatement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + function print_bracketed(body, output) { + if (body.length > 0) output.with_block(function(){ + display_body(body, false, output); + }); + else output.print("{}"); + }; + DEFPRINT(AST_BlockStatement, function(self, output){ + print_bracketed(self.body, output); + }); + DEFPRINT(AST_EmptyStatement, function(self, output){ + output.semicolon(); + }); + DEFPRINT(AST_Do, function(self, output){ + output.print("do"); + output.space(); + self._do_print_body(output); + output.space(); + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.semicolon(); + }); + DEFPRINT(AST_While, function(self, output){ + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_For, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + if (self.init && !(self.init instanceof AST_EmptyStatement)) { + if (self.init instanceof AST_Definitions) { + self.init.print(output); + } else { + parenthesize_for_noin(self.init, output, true); + } + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.condition) { + self.condition.print(output); + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.step) { + self.step.print(output); + } + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_ForIn, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + self.init.print(output); + output.space(); + output.print("in"); + output.space(); + self.object.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_With, function(self, output){ + output.print("with"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + self._do_print_body(output); + }); + + /* -----[ functions ]----- */ + AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword){ + var self = this; + if (!nokeyword) { + output.print("function"); + } + if (self.name) { + output.space(); + self.name.print(output); + } + output.with_parens(function(){ + self.argnames.forEach(function(arg, i){ + if (i) output.comma(); + arg.print(output); + }); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Lambda, function(self, output){ + self._do_print(output); + }); + + /* -----[ exits ]----- */ + AST_Exit.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.value) { + output.space(); + this.value.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Return, function(self, output){ + self._do_print(output, "return"); + }); + DEFPRINT(AST_Throw, function(self, output){ + self._do_print(output, "throw"); + }); + + /* -----[ loop control ]----- */ + AST_LoopControl.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.label) { + output.space(); + this.label.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Break, function(self, output){ + self._do_print(output, "break"); + }); + DEFPRINT(AST_Continue, function(self, output){ + self._do_print(output, "continue"); + }); + + /* -----[ if ]----- */ + function make_then(self, output) { + if (output.option("bracketize")) { + make_block(self.body, output); + return; + } + // The squeezer replaces "block"-s that contain only a single + // statement with the statement itself; technically, the AST + // is correct, but this can create problems when we output an + // IF having an ELSE clause where the THEN clause ends in an + // IF *without* an ELSE block (then the outer ELSE would refer + // to the inner IF). This function checks for this case and + // adds the block brackets if needed. + if (!self.body) + return output.force_semicolon(); + if (self.body instanceof AST_Do + && !output.option("screw_ie8")) { + // https://github.com/mishoo/UglifyJS/issues/#issue/57 IE + // croaks with "syntax error" on code like this: if (foo) + // do ... while(cond); else ... we need block brackets + // around do/while + make_block(self.body, output); + return; + } + var b = self.body; + while (true) { + if (b instanceof AST_If) { + if (!b.alternative) { + make_block(self.body, output); + return; + } + b = b.alternative; + } + else if (b instanceof AST_StatementWithBody) { + b = b.body; + } + else break; + } + force_statement(self.body, output); + }; + DEFPRINT(AST_If, function(self, output){ + output.print("if"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + if (self.alternative) { + make_then(self, output); + output.space(); + output.print("else"); + output.space(); + force_statement(self.alternative, output); + } else { + self._do_print_body(output); + } + }); + + /* -----[ switch ]----- */ + DEFPRINT(AST_Switch, function(self, output){ + output.print("switch"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + if (self.body.length > 0) output.with_block(function(){ + self.body.forEach(function(stmt, i){ + if (i) output.newline(); + output.indent(true); + stmt.print(output); + }); + }); + else output.print("{}"); + }); + AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output){ + if (this.body.length > 0) { + output.newline(); + this.body.forEach(function(stmt){ + output.indent(); + stmt.print(output); + output.newline(); + }); + } + }); + DEFPRINT(AST_Default, function(self, output){ + output.print("default:"); + self._do_print_body(output); + }); + DEFPRINT(AST_Case, function(self, output){ + output.print("case"); + output.space(); + self.expression.print(output); + output.print(":"); + self._do_print_body(output); + }); + + /* -----[ exceptions ]----- */ + DEFPRINT(AST_Try, function(self, output){ + output.print("try"); + output.space(); + print_bracketed(self.body, output); + if (self.bcatch) { + output.space(); + self.bcatch.print(output); + } + if (self.bfinally) { + output.space(); + self.bfinally.print(output); + } + }); + DEFPRINT(AST_Catch, function(self, output){ + output.print("catch"); + output.space(); + output.with_parens(function(){ + self.argname.print(output); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Finally, function(self, output){ + output.print("finally"); + output.space(); + print_bracketed(self.body, output); + }); + + /* -----[ var/const ]----- */ + AST_Definitions.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + output.space(); + this.definitions.forEach(function(def, i){ + if (i) output.comma(); + def.print(output); + }); + var p = output.parent(); + var in_for = p instanceof AST_For || p instanceof AST_ForIn; + var avoid_semicolon = in_for && p.init === this; + if (!avoid_semicolon) + output.semicolon(); + }); + DEFPRINT(AST_Var, function(self, output){ + self._do_print(output, "var"); + }); + DEFPRINT(AST_Const, function(self, output){ + self._do_print(output, "const"); + }); + + function parenthesize_for_noin(node, output, noin) { + if (!noin) node.print(output); + else try { + // need to take some precautions here: + // https://github.com/mishoo/UglifyJS2/issues/60 + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw output; + })); + node.print(output); + } catch(ex) { + if (ex !== output) throw ex; + node.print(output, true); + } + }; + + DEFPRINT(AST_VarDef, function(self, output){ + self.name.print(output); + if (self.value) { + output.space(); + output.print("="); + output.space(); + var p = output.parent(1); + var noin = p instanceof AST_For || p instanceof AST_ForIn; + parenthesize_for_noin(self.value, output, noin); + } + }); + + /* -----[ other expressions ]----- */ + DEFPRINT(AST_Call, function(self, output){ + self.expression.print(output); + if (self instanceof AST_New && no_constructor_parens(self, output)) + return; + output.with_parens(function(){ + self.args.forEach(function(expr, i){ + if (i) output.comma(); + expr.print(output); + }); + }); + }); + DEFPRINT(AST_New, function(self, output){ + output.print("new"); + output.space(); + AST_Call.prototype._codegen(self, output); + }); + + AST_Seq.DEFMETHOD("_do_print", function(output){ + this.car.print(output); + if (this.cdr) { + output.comma(); + if (output.should_break()) { + output.newline(); + output.indent(); + } + this.cdr.print(output); + } + }); + DEFPRINT(AST_Seq, function(self, output){ + self._do_print(output); + // var p = output.parent(); + // if (p instanceof AST_Statement) { + // output.with_indent(output.next_indent(), function(){ + // self._do_print(output); + // }); + // } else { + // self._do_print(output); + // } + }); + DEFPRINT(AST_Dot, function(self, output){ + var expr = self.expression; + expr.print(output); + if (expr instanceof AST_Number && expr.getValue() >= 0) { + if (!/[xa-f.]/i.test(output.last())) { + output.print("."); + } + } + output.print("."); + // the name after dot would be mapped about here. + output.add_mapping(self.end); + output.print_name(self.property); + }); + DEFPRINT(AST_Sub, function(self, output){ + self.expression.print(output); + output.print("["); + self.property.print(output); + output.print("]"); + }); + DEFPRINT(AST_UnaryPrefix, function(self, output){ + var op = self.operator; + output.print(op); + if (/^[a-z]/i.test(op) + || (/[+-]$/.test(op) + && self.expression instanceof AST_UnaryPrefix + && /^[+-]/.test(self.expression.operator))) { + output.space(); + } + self.expression.print(output); + }); + DEFPRINT(AST_UnaryPostfix, function(self, output){ + self.expression.print(output); + output.print(self.operator); + }); + DEFPRINT(AST_Binary, function(self, output){ + var op = self.operator; + self.left.print(output); + if (op[0] == ">" /* ">>" ">>>" ">" ">=" */ + && self.left instanceof AST_UnaryPostfix + && self.left.operator == "--") { + // space is mandatory to avoid outputting --> + output.print(" "); + } else { + // the space is optional depending on "beautify" + output.space(); + } + output.print(op); + if ((op == "<" || op == "<<") + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "!" + && self.right.expression instanceof AST_UnaryPrefix + && self.right.expression.operator == "--") { + // space is mandatory to avoid outputting ") && S.newline_before) { + forward(3); + return skip_line_comment("comment4"); + } + } + var ch = peek(); + if (!ch) return token("eof"); + var code = ch.charCodeAt(0); + switch (code) { + case 34: case 39: return read_string(ch); + case 46: return handle_dot(); + case 47: return handle_slash(); + } + if (is_digit(code)) return read_num(); + if (PUNC_CHARS(ch)) return token("punc", next()); + if (OPERATOR_CHARS(ch)) return read_operator(); + if (code == 92 || is_identifier_start(code)) return read_word(); + + if (shebang) { + if (S.pos == 0 && looking_at("#!")) { + forward(2); + return skip_line_comment("comment5"); + } + } + parse_error("Unexpected character '" + ch + "'"); + }; + + next_token.context = function(nc) { + if (nc) S = nc; + return S; + }; + + return next_token; + +}; + +/* -----[ Parser (constants) ]----- */ + +var UNARY_PREFIX = makePredicate([ + "typeof", + "void", + "delete", + "--", + "++", + "!", + "~", + "-", + "+" +]); + +var UNARY_POSTFIX = makePredicate([ "--", "++" ]); + +var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); + +var PRECEDENCE = (function(a, ret){ + for (var i = 0; i < a.length; ++i) { + var b = a[i]; + for (var j = 0; j < b.length; ++j) { + ret[b[j]] = i + 1; + } + } + return ret; +})( + [ + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ], + {} +); + +var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); + +var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); + +/* -----[ Parser ]----- */ + +function parse($TEXT, options) { + + options = defaults(options, { + strict : false, + filename : null, + toplevel : null, + expression : false, + html5_comments : true, + bare_returns : false, + shebang : true, + }); + + var S = { + input : (typeof $TEXT == "string" + ? tokenizer($TEXT, options.filename, + options.html5_comments, options.shebang) + : $TEXT), + token : null, + prev : null, + peeked : null, + in_function : 0, + in_directives : true, + in_loop : 0, + labels : [] + }; + + S.token = next(); + + function is(type, value) { + return is_token(S.token, type, value); + }; + + function peek() { return S.peeked || (S.peeked = S.input()); }; + + function next() { + S.prev = S.token; + if (S.peeked) { + S.token = S.peeked; + S.peeked = null; + } else { + S.token = S.input(); + } + S.in_directives = S.in_directives && ( + S.token.type == "string" || is("punc", ";") + ); + return S.token; + }; + + function prev() { + return S.prev; + }; + + function croak(msg, line, col, pos) { + var ctx = S.input.context(); + js_error(msg, + ctx.filename, + line != null ? line : ctx.tokline, + col != null ? col : ctx.tokcol, + pos != null ? pos : ctx.tokpos); + }; + + function token_error(token, msg) { + croak(msg, token.line, token.col); + }; + + function unexpected(token) { + if (token == null) + token = S.token; + token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); + }; + + function expect_token(type, val) { + if (is(type, val)) { + return next(); + } + token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); + }; + + function expect(punc) { return expect_token("punc", punc); }; + + function can_insert_semicolon() { + return !options.strict && ( + S.token.nlb || is("eof") || is("punc", "}") + ); + }; + + function semicolon() { + if (is("punc", ";")) next(); + else if (!can_insert_semicolon()) unexpected(); + }; + + function parenthesised() { + expect("("); + var exp = expression(true); + expect(")"); + return exp; + }; + + function embed_tokens(parser) { + return function() { + var start = S.token; + var expr = parser(); + var end = prev(); + expr.start = start; + expr.end = end; + return expr; + }; + }; + + function handle_regexp() { + if (is("operator", "/") || is("operator", "/=")) { + S.peeked = null; + S.token = S.input(S.token.value.substr(1)); // force regexp + } + }; + + var statement = embed_tokens(function() { + var tmp; + handle_regexp(); + switch (S.token.type) { + case "string": + var dir = S.in_directives, stat = simple_statement(); + // XXXv2: decide how to fix directives + if (dir && stat.body instanceof AST_String && !is("punc", ",")) { + return new AST_Directive({ + start : stat.body.start, + end : stat.body.end, + quote : stat.body.quote, + value : stat.body.value, + }); + } + return stat; + case "num": + case "regexp": + case "operator": + case "atom": + return simple_statement(); + + case "name": + return is_token(peek(), "punc", ":") + ? labeled_statement() + : simple_statement(); + + case "punc": + switch (S.token.value) { + case "{": + return new AST_BlockStatement({ + start : S.token, + body : block_(), + end : prev() + }); + case "[": + case "(": + return simple_statement(); + case ";": + next(); + return new AST_EmptyStatement(); + default: + unexpected(); + } + + case "keyword": + switch (tmp = S.token.value, next(), tmp) { + case "break": + return break_cont(AST_Break); + + case "continue": + return break_cont(AST_Continue); + + case "debugger": + semicolon(); + return new AST_Debugger(); + + case "do": + return new AST_Do({ + body : in_loop(statement), + condition : (expect_token("keyword", "while"), tmp = parenthesised(), semicolon(), tmp) + }); + + case "while": + return new AST_While({ + condition : parenthesised(), + body : in_loop(statement) + }); + + case "for": + return for_(); + + case "function": + return function_(AST_Defun); + + case "if": + return if_(); + + case "return": + if (S.in_function == 0 && !options.bare_returns) + croak("'return' outside of function"); + return new AST_Return({ + value: ( is("punc", ";") + ? (next(), null) + : can_insert_semicolon() + ? null + : (tmp = expression(true), semicolon(), tmp) ) + }); + + case "switch": + return new AST_Switch({ + expression : parenthesised(), + body : in_loop(switch_body_) + }); + + case "throw": + if (S.token.nlb) + croak("Illegal newline after 'throw'"); + return new AST_Throw({ + value: (tmp = expression(true), semicolon(), tmp) + }); + + case "try": + return try_(); + + case "var": + return tmp = var_(), semicolon(), tmp; + + case "const": + return tmp = const_(), semicolon(), tmp; + + case "with": + return new AST_With({ + expression : parenthesised(), + body : statement() + }); + + default: + unexpected(); + } + } + }); + + function labeled_statement() { + var label = as_symbol(AST_Label); + if (find_if(function(l){ return l.name == label.name }, S.labels)) { + // ECMA-262, 12.12: An ECMAScript program is considered + // syntactically incorrect if it contains a + // LabelledStatement that is enclosed by a + // LabelledStatement with the same Identifier as label. + croak("Label " + label.name + " defined twice"); + } + expect(":"); + S.labels.push(label); + var stat = statement(); + S.labels.pop(); + if (!(stat instanceof AST_IterationStatement)) { + // check for `continue` that refers to this label. + // those should be reported as syntax errors. + // https://github.com/mishoo/UglifyJS2/issues/287 + label.references.forEach(function(ref){ + if (ref instanceof AST_Continue) { + ref = ref.label.start; + croak("Continue label `" + label.name + "` refers to non-IterationStatement.", + ref.line, ref.col, ref.pos); + } + }); + } + return new AST_LabeledStatement({ body: stat, label: label }); + }; + + function simple_statement(tmp) { + return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); + }; + + function break_cont(type) { + var label = null, ldef; + if (!can_insert_semicolon()) { + label = as_symbol(AST_LabelRef, true); + } + if (label != null) { + ldef = find_if(function(l){ return l.name == label.name }, S.labels); + if (!ldef) + croak("Undefined label " + label.name); + label.thedef = ldef; + } + else if (S.in_loop == 0) + croak(type.TYPE + " not inside a loop or switch"); + semicolon(); + var stat = new type({ label: label }); + if (ldef) ldef.references.push(stat); + return stat; + }; + + function for_() { + expect("("); + var init = null; + if (!is("punc", ";")) { + init = is("keyword", "var") + ? (next(), var_(true)) + : expression(true, true); + if (is("operator", "in")) { + if (init instanceof AST_Var && init.definitions.length > 1) + croak("Only one variable declaration allowed in for..in loop"); + next(); + return for_in(init); + } + } + return regular_for(init); + }; + + function regular_for(init) { + expect(";"); + var test = is("punc", ";") ? null : expression(true); + expect(";"); + var step = is("punc", ")") ? null : expression(true); + expect(")"); + return new AST_For({ + init : init, + condition : test, + step : step, + body : in_loop(statement) + }); + }; + + function for_in(init) { + var lhs = init instanceof AST_Var ? init.definitions[0].name : null; + var obj = expression(true); + expect(")"); + return new AST_ForIn({ + init : init, + name : lhs, + object : obj, + body : in_loop(statement) + }); + }; + + var function_ = function(ctor) { + var in_statement = ctor === AST_Defun; + var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null; + if (in_statement && !name) + unexpected(); + expect("("); + return new ctor({ + name: name, + argnames: (function(first, a){ + while (!is("punc", ")")) { + if (first) first = false; else expect(","); + a.push(as_symbol(AST_SymbolFunarg)); + } + next(); + return a; + })(true, []), + body: (function(loop, labels){ + ++S.in_function; + S.in_directives = true; + S.in_loop = 0; + S.labels = []; + var a = block_(); + --S.in_function; + S.in_loop = loop; + S.labels = labels; + return a; + })(S.in_loop, S.labels) + }); + }; + + function if_() { + var cond = parenthesised(), body = statement(), belse = null; + if (is("keyword", "else")) { + next(); + belse = statement(); + } + return new AST_If({ + condition : cond, + body : body, + alternative : belse + }); + }; + + function block_() { + expect("{"); + var a = []; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + a.push(statement()); + } + next(); + return a; + }; + + function switch_body_() { + expect("{"); + var a = [], cur = null, branch = null, tmp; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + if (is("keyword", "case")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Case({ + start : (tmp = S.token, next(), tmp), + expression : expression(true), + body : cur + }); + a.push(branch); + expect(":"); + } + else if (is("keyword", "default")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Default({ + start : (tmp = S.token, next(), expect(":"), tmp), + body : cur + }); + a.push(branch); + } + else { + if (!cur) unexpected(); + cur.push(statement()); + } + } + if (branch) branch.end = prev(); + next(); + return a; + }; + + function try_() { + var body = block_(), bcatch = null, bfinally = null; + if (is("keyword", "catch")) { + var start = S.token; + next(); + expect("("); + var name = as_symbol(AST_SymbolCatch); + expect(")"); + bcatch = new AST_Catch({ + start : start, + argname : name, + body : block_(), + end : prev() + }); + } + if (is("keyword", "finally")) { + var start = S.token; + next(); + bfinally = new AST_Finally({ + start : start, + body : block_(), + end : prev() + }); + } + if (!bcatch && !bfinally) + croak("Missing catch/finally blocks"); + return new AST_Try({ + body : body, + bcatch : bcatch, + bfinally : bfinally + }); + }; + + function vardefs(no_in, in_const) { + var a = []; + for (;;) { + a.push(new AST_VarDef({ + start : S.token, + name : as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), + value : is("operator", "=") ? (next(), expression(false, no_in)) : null, + end : prev() + })); + if (!is("punc", ",")) + break; + next(); + } + return a; + }; + + var var_ = function(no_in) { + return new AST_Var({ + start : prev(), + definitions : vardefs(no_in, false), + end : prev() + }); + }; + + var const_ = function() { + return new AST_Const({ + start : prev(), + definitions : vardefs(false, true), + end : prev() + }); + }; + + var new_ = function(allow_calls) { + var start = S.token; + expect_token("operator", "new"); + var newexp = expr_atom(false), args; + if (is("punc", "(")) { + next(); + args = expr_list(")"); + } else { + args = []; + } + return subscripts(new AST_New({ + start : start, + expression : newexp, + args : args, + end : prev() + }), allow_calls); + }; + + function as_atom_node() { + var tok = S.token, ret; + switch (tok.type) { + case "name": + case "keyword": + ret = _make_symbol(AST_SymbolRef); + break; + case "num": + ret = new AST_Number({ start: tok, end: tok, value: tok.value }); + break; + case "string": + ret = new AST_String({ + start : tok, + end : tok, + value : tok.value, + quote : tok.quote + }); + break; + case "regexp": + ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); + break; + case "atom": + switch (tok.value) { + case "false": + ret = new AST_False({ start: tok, end: tok }); + break; + case "true": + ret = new AST_True({ start: tok, end: tok }); + break; + case "null": + ret = new AST_Null({ start: tok, end: tok }); + break; + } + break; + } + next(); + return ret; + }; + + var expr_atom = function(allow_calls) { + if (is("operator", "new")) { + return new_(allow_calls); + } + var start = S.token; + if (is("punc")) { + switch (start.value) { + case "(": + next(); + var ex = expression(true); + ex.start = start; + ex.end = S.token; + expect(")"); + return subscripts(ex, allow_calls); + case "[": + return subscripts(array_(), allow_calls); + case "{": + return subscripts(object_(), allow_calls); + } + unexpected(); + } + if (is("keyword", "function")) { + next(); + var func = function_(AST_Function); + func.start = start; + func.end = prev(); + return subscripts(func, allow_calls); + } + if (ATOMIC_START_TOKEN[S.token.type]) { + return subscripts(as_atom_node(), allow_calls); + } + unexpected(); + }; + + function expr_list(closing, allow_trailing_comma, allow_empty) { + var first = true, a = []; + while (!is("punc", closing)) { + if (first) first = false; else expect(","); + if (allow_trailing_comma && is("punc", closing)) break; + if (is("punc", ",") && allow_empty) { + a.push(new AST_Hole({ start: S.token, end: S.token })); + } else { + a.push(expression(false)); + } + } + next(); + return a; + }; + + var array_ = embed_tokens(function() { + expect("["); + return new AST_Array({ + elements: expr_list("]", !options.strict, true) + }); + }); + + var object_ = embed_tokens(function() { + expect("{"); + var first = true, a = []; + while (!is("punc", "}")) { + if (first) first = false; else expect(","); + if (!options.strict && is("punc", "}")) + // allow trailing comma + break; + var start = S.token; + var type = start.type; + var name = as_property_name(); + if (type == "name" && !is("punc", ":")) { + if (name == "get") { + a.push(new AST_ObjectGetter({ + start : start, + key : as_atom_node(), + value : function_(AST_Accessor), + end : prev() + })); + continue; + } + if (name == "set") { + a.push(new AST_ObjectSetter({ + start : start, + key : as_atom_node(), + value : function_(AST_Accessor), + end : prev() + })); + continue; + } + } + expect(":"); + a.push(new AST_ObjectKeyVal({ + start : start, + quote : start.quote, + key : name, + value : expression(false), + end : prev() + })); + } + next(); + return new AST_Object({ properties: a }); + }); + + function as_property_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "num": + case "string": + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function as_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function _make_symbol(type) { + var name = S.token.value; + return new (name == "this" ? AST_This : type)({ + name : String(name), + start : S.token, + end : S.token + }); + }; + + function as_symbol(type, noerror) { + if (!is("name")) { + if (!noerror) croak("Name expected"); + return null; + } + var sym = _make_symbol(type); + next(); + return sym; + }; + + var subscripts = function(expr, allow_calls) { + var start = expr.start; + if (is("punc", ".")) { + next(); + return subscripts(new AST_Dot({ + start : start, + expression : expr, + property : as_name(), + end : prev() + }), allow_calls); + } + if (is("punc", "[")) { + next(); + var prop = expression(true); + expect("]"); + return subscripts(new AST_Sub({ + start : start, + expression : expr, + property : prop, + end : prev() + }), allow_calls); + } + if (allow_calls && is("punc", "(")) { + next(); + return subscripts(new AST_Call({ + start : start, + expression : expr, + args : expr_list(")"), + end : prev() + }), true); + } + return expr; + }; + + var maybe_unary = function(allow_calls) { + var start = S.token; + if (is("operator") && UNARY_PREFIX(start.value)) { + next(); + handle_regexp(); + var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls)); + ex.start = start; + ex.end = prev(); + return ex; + } + var val = expr_atom(allow_calls); + while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { + val = make_unary(AST_UnaryPostfix, S.token.value, val); + val.start = start; + val.end = S.token; + next(); + } + return val; + }; + + function make_unary(ctor, op, expr) { + if ((op == "++" || op == "--") && !is_assignable(expr)) + croak("Invalid use of " + op + " operator"); + return new ctor({ operator: op, expression: expr }); + }; + + var expr_op = function(left, min_prec, no_in) { + var op = is("operator") ? S.token.value : null; + if (op == "in" && no_in) op = null; + var prec = op != null ? PRECEDENCE[op] : null; + if (prec != null && prec > min_prec) { + next(); + var right = expr_op(maybe_unary(true), prec, no_in); + return expr_op(new AST_Binary({ + start : left.start, + left : left, + operator : op, + right : right, + end : right.end + }), min_prec, no_in); + } + return left; + }; + + function expr_ops(no_in) { + return expr_op(maybe_unary(true), 0, no_in); + }; + + var maybe_conditional = function(no_in) { + var start = S.token; + var expr = expr_ops(no_in); + if (is("operator", "?")) { + next(); + var yes = expression(false); + expect(":"); + return new AST_Conditional({ + start : start, + condition : expr, + consequent : yes, + alternative : expression(false, no_in), + end : prev() + }); + } + return expr; + }; + + function is_assignable(expr) { + if (!options.strict) return true; + if (expr instanceof AST_This) return false; + return (expr instanceof AST_PropAccess || expr instanceof AST_Symbol); + }; + + var maybe_assign = function(no_in) { + var start = S.token; + var left = maybe_conditional(no_in), val = S.token.value; + if (is("operator") && ASSIGNMENT(val)) { + if (is_assignable(left)) { + next(); + return new AST_Assign({ + start : start, + left : left, + operator : val, + right : maybe_assign(no_in), + end : prev() + }); + } + croak("Invalid assignment"); + } + return left; + }; + + var expression = function(commas, no_in) { + var start = S.token; + var expr = maybe_assign(no_in); + if (commas && is("punc", ",")) { + next(); + return new AST_Seq({ + start : start, + car : expr, + cdr : expression(true, no_in), + end : peek() + }); + } + return expr; + }; + + function in_loop(cont) { + ++S.in_loop; + var ret = cont(); + --S.in_loop; + return ret; + }; + + if (options.expression) { + return expression(true); + } + + return (function(){ + var start = S.token; + var body = []; + while (!is("eof")) + body.push(statement()); + var end = prev(); + var toplevel = options.toplevel; + if (toplevel) { + toplevel.body = toplevel.body.concat(body); + toplevel.end = end; + } else { + toplevel = new AST_Toplevel({ start: start, body: body, end: end }); + } + return toplevel; + })(); + +}; diff --git a/tools/eslint/node_modules/uglify-js/lib/propmangle.js b/tools/eslint/node_modules/uglify-js/lib/propmangle.js new file mode 100644 index 00000000000000..840bda919a8feb --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/propmangle.js @@ -0,0 +1,223 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function find_builtins() { + var a = []; + [ Object, Array, Function, Number, + String, Boolean, Error, Math, + Date, RegExp + ].forEach(function(ctor){ + Object.getOwnPropertyNames(ctor).map(add); + if (ctor.prototype) { + Object.getOwnPropertyNames(ctor.prototype).map(add); + } + }); + function add(name) { + push_uniq(a, name); + } + return a; +} + +function mangle_properties(ast, options) { + options = defaults(options, { + reserved : null, + cache : null, + only_cache : false, + regex : null + }); + + var reserved = options.reserved; + if (reserved == null) + reserved = find_builtins(); + + var cache = options.cache; + if (cache == null) { + cache = { + cname: -1, + props: new Dictionary() + }; + } + + var regex = options.regex; + + var names_to_mangle = []; + var unmangleable = []; + + // step 1: find candidates to mangle + ast.walk(new TreeWalker(function(node){ + if (node instanceof AST_ObjectKeyVal) { + add(node.key); + } + else if (node instanceof AST_ObjectProperty) { + // setter or getter, since KeyVal is handled above + add(node.key.name); + } + else if (node instanceof AST_Dot) { + if (this.parent() instanceof AST_Assign) { + add(node.property); + } + } + else if (node instanceof AST_Sub) { + if (this.parent() instanceof AST_Assign) { + addStrings(node.property); + } + } + })); + + // step 2: transform the tree, renaming properties + return ast.transform(new TreeTransformer(function(node){ + if (node instanceof AST_ObjectKeyVal) { + node.key = mangle(node.key); + } + else if (node instanceof AST_ObjectProperty) { + // setter or getter + node.key.name = mangle(node.key.name); + } + else if (node instanceof AST_Dot) { + node.property = mangle(node.property); + } + else if (node instanceof AST_Sub) { + node.property = mangleStrings(node.property); + } + // else if (node instanceof AST_String) { + // if (should_mangle(node.value)) { + // AST_Node.warn( + // "Found \"{prop}\" property candidate for mangling in an arbitrary string [{file}:{line},{col}]", { + // file : node.start.file, + // line : node.start.line, + // col : node.start.col, + // prop : node.value + // } + // ); + // } + // } + })); + + // only function declarations after this line + + function can_mangle(name) { + if (unmangleable.indexOf(name) >= 0) return false; + if (reserved.indexOf(name) >= 0) return false; + if (options.only_cache) { + return cache.props.has(name); + } + if (/^[0-9.]+$/.test(name)) return false; + return true; + } + + function should_mangle(name) { + if (regex && !regex.test(name)) return false; + if (reserved.indexOf(name) >= 0) return false; + return cache.props.has(name) + || names_to_mangle.indexOf(name) >= 0; + } + + function add(name) { + if (can_mangle(name)) + push_uniq(names_to_mangle, name); + + if (!should_mangle(name)) { + push_uniq(unmangleable, name); + } + } + + function mangle(name) { + if (!should_mangle(name)) { + return name; + } + + var mangled = cache.props.get(name); + if (!mangled) { + do { + mangled = base54(++cache.cname); + } while (!can_mangle(mangled)); + cache.props.set(name, mangled); + } + return mangled; + } + + function addStrings(node) { + var out = {}; + try { + (function walk(node){ + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Seq) { + walk(node.cdr); + return true; + } + if (node instanceof AST_String) { + add(node.value); + return true; + } + if (node instanceof AST_Conditional) { + walk(node.consequent); + walk(node.alternative); + return true; + } + throw out; + })); + })(node); + } catch(ex) { + if (ex !== out) throw ex; + } + } + + function mangleStrings(node) { + return node.transform(new TreeTransformer(function(node){ + if (node instanceof AST_Seq) { + node.cdr = mangleStrings(node.cdr); + } + else if (node instanceof AST_String) { + node.value = mangle(node.value); + } + else if (node instanceof AST_Conditional) { + node.consequent = mangleStrings(node.consequent); + node.alternative = mangleStrings(node.alternative); + } + return node; + })); + } + +} diff --git a/tools/eslint/node_modules/uglify-js/lib/scope.js b/tools/eslint/node_modules/uglify-js/lib/scope.js new file mode 100644 index 00000000000000..1f0986c45fd946 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/scope.js @@ -0,0 +1,617 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function SymbolDef(scope, index, orig) { + this.name = orig.name; + this.orig = [ orig ]; + this.scope = scope; + this.references = []; + this.global = false; + this.mangled_name = null; + this.undeclared = false; + this.constant = false; + this.index = index; +}; + +SymbolDef.prototype = { + unmangleable: function(options) { + if (!options) options = {}; + + return (this.global && !options.toplevel) + || this.undeclared + || (!options.eval && (this.scope.uses_eval || this.scope.uses_with)) + || (options.keep_fnames + && (this.orig[0] instanceof AST_SymbolLambda + || this.orig[0] instanceof AST_SymbolDefun)); + }, + mangle: function(options) { + var cache = options.cache && options.cache.props; + if (this.global && cache && cache.has(this.name)) { + this.mangled_name = cache.get(this.name); + } + else if (!this.mangled_name && !this.unmangleable(options)) { + var s = this.scope; + if (!options.screw_ie8 && this.orig[0] instanceof AST_SymbolLambda) + s = s.parent_scope; + this.mangled_name = s.next_mangled(options, this); + if (this.global && cache) { + cache.set(this.name, this.mangled_name); + } + } + } +}; + +AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ + options = defaults(options, { + screw_ie8: false, + cache: null + }); + + // pass 1: setup scope chaining and handle definitions + var self = this; + var scope = self.parent_scope = null; + var labels = new Dictionary(); + var defun = null; + var nesting = 0; + var tw = new TreeWalker(function(node, descend){ + if (options.screw_ie8 && node instanceof AST_Catch) { + var save_scope = scope; + scope = new AST_Scope(node); + scope.init_scope_vars(nesting); + scope.parent_scope = save_scope; + descend(); + scope = save_scope; + return true; + } + if (node instanceof AST_Scope) { + node.init_scope_vars(nesting); + var save_scope = node.parent_scope = scope; + var save_defun = defun; + var save_labels = labels; + defun = scope = node; + labels = new Dictionary(); + ++nesting; descend(); --nesting; + scope = save_scope; + defun = save_defun; + labels = save_labels; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_LabeledStatement) { + var l = node.label; + if (labels.has(l.name)) { + throw new Error(string_template("Label {name} defined twice", l)); + } + labels.set(l.name, l); + descend(); + labels.del(l.name); + return true; // no descend again + } + if (node instanceof AST_With) { + for (var s = scope; s; s = s.parent_scope) + s.uses_with = true; + return; + } + if (node instanceof AST_Symbol) { + node.scope = scope; + } + if (node instanceof AST_Label) { + node.thedef = node; + node.references = []; + } + if (node instanceof AST_SymbolLambda) { + defun.def_function(node); + } + else if (node instanceof AST_SymbolDefun) { + // Careful here, the scope where this should be defined is + // the parent scope. The reason is that we enter a new + // scope when we encounter the AST_Defun node (which is + // instanceof AST_Scope) but we get to the symbol a bit + // later. + (node.scope = defun.parent_scope).def_function(node); + } + else if (node instanceof AST_SymbolVar + || node instanceof AST_SymbolConst) { + var def = defun.def_variable(node); + def.constant = node instanceof AST_SymbolConst; + def.init = tw.parent().value; + } + else if (node instanceof AST_SymbolCatch) { + (options.screw_ie8 ? scope : defun) + .def_variable(node); + } + else if (node instanceof AST_LabelRef) { + var sym = labels.get(node.name); + if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { + name: node.name, + line: node.start.line, + col: node.start.col + })); + node.thedef = sym; + } + }); + self.walk(tw); + + // pass 2: find back references and eval + var func = null; + var globals = self.globals = new Dictionary(); + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Lambda) { + var prev_func = func; + func = node; + descend(); + func = prev_func; + return true; + } + if (node instanceof AST_LoopControl && node.label) { + node.label.thedef.references.push(node); + return true; + } + if (node instanceof AST_SymbolRef) { + var name = node.name; + var sym = node.scope.find_variable(name); + if (!sym) { + var g; + if (globals.has(name)) { + g = globals.get(name); + } else { + g = new SymbolDef(self, globals.size(), node); + g.undeclared = true; + g.global = true; + globals.set(name, g); + } + node.thedef = g; + if (name == "eval" && tw.parent() instanceof AST_Call) { + for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) + s.uses_eval = true; + } + if (func && name == "arguments") { + func.uses_arguments = true; + } + } else { + node.thedef = sym; + } + node.reference(); + return true; + } + }); + self.walk(tw); + + if (options.cache) { + this.cname = options.cache.cname; + } +}); + +AST_Scope.DEFMETHOD("init_scope_vars", function(nesting){ + this.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) + this.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) + this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement + this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` + this.parent_scope = null; // the parent scope + this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes + this.cname = -1; // the current index for mangling functions/variables + this.nesting = nesting; // the nesting level of this scope (0 means toplevel) +}); + +AST_Lambda.DEFMETHOD("init_scope_vars", function(){ + AST_Scope.prototype.init_scope_vars.apply(this, arguments); + this.uses_arguments = false; +}); + +AST_SymbolRef.DEFMETHOD("reference", function() { + var def = this.definition(); + def.references.push(this); + var s = this.scope; + while (s) { + push_uniq(s.enclosed, def); + if (s === def.scope) break; + s = s.parent_scope; + } + this.frame = this.scope.nesting - def.scope.nesting; +}); + +AST_Scope.DEFMETHOD("find_variable", function(name){ + if (name instanceof AST_Symbol) name = name.name; + return this.variables.get(name) + || (this.parent_scope && this.parent_scope.find_variable(name)); +}); + +AST_Scope.DEFMETHOD("def_function", function(symbol){ + this.functions.set(symbol.name, this.def_variable(symbol)); +}); + +AST_Scope.DEFMETHOD("def_variable", function(symbol){ + var def; + if (!this.variables.has(symbol.name)) { + def = new SymbolDef(this, this.variables.size(), symbol); + this.variables.set(symbol.name, def); + def.global = !this.parent_scope; + } else { + def = this.variables.get(symbol.name); + def.orig.push(symbol); + } + return symbol.thedef = def; +}); + +AST_Scope.DEFMETHOD("next_mangled", function(options){ + var ext = this.enclosed; + out: while (true) { + var m = base54(++this.cname); + if (!is_identifier(m)) continue; // skip over "do" + + // https://github.com/mishoo/UglifyJS2/issues/242 -- do not + // shadow a name excepted from mangling. + if (options.except.indexOf(m) >= 0) continue; + + // we must ensure that the mangled name does not shadow a name + // from some parent scope that is referenced in this or in + // inner scopes. + for (var i = ext.length; --i >= 0;) { + var sym = ext[i]; + var name = sym.mangled_name || (sym.unmangleable(options) && sym.name); + if (m == name) continue out; + } + return m; + } +}); + +AST_Function.DEFMETHOD("next_mangled", function(options, def){ + // #179, #326 + // in Safari strict mode, something like (function x(x){...}) is a syntax error; + // a function expression's argument cannot shadow the function expression's name + + var tricky_def = def.orig[0] instanceof AST_SymbolFunarg && this.name && this.name.definition(); + while (true) { + var name = AST_Lambda.prototype.next_mangled.call(this, options, def); + if (!(tricky_def && tricky_def.mangled_name == name)) + return name; + } +}); + +AST_Scope.DEFMETHOD("references", function(sym){ + if (sym instanceof AST_Symbol) sym = sym.definition(); + return this.enclosed.indexOf(sym) < 0 ? null : sym; +}); + +AST_Symbol.DEFMETHOD("unmangleable", function(options){ + return this.definition().unmangleable(options); +}); + +// property accessors are not mangleable +AST_SymbolAccessor.DEFMETHOD("unmangleable", function(){ + return true; +}); + +// labels are always mangleable +AST_Label.DEFMETHOD("unmangleable", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("unreferenced", function(){ + return this.definition().references.length == 0 + && !(this.scope.uses_eval || this.scope.uses_with); +}); + +AST_Symbol.DEFMETHOD("undeclared", function(){ + return this.definition().undeclared; +}); + +AST_LabelRef.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Label.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("definition", function(){ + return this.thedef; +}); + +AST_Symbol.DEFMETHOD("global", function(){ + return this.definition().global; +}); + +AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){ + return defaults(options, { + except : [], + eval : false, + sort : false, + toplevel : false, + screw_ie8 : false, + keep_fnames : false + }); +}); + +AST_Toplevel.DEFMETHOD("mangle_names", function(options){ + options = this._default_mangler_options(options); + // We only need to mangle declaration nodes. Special logic wired + // into the code generator will display the mangled name if it's + // present (and for AST_SymbolRef-s it'll use the mangled name of + // the AST_SymbolDeclaration that it points to). + var lname = -1; + var to_mangle = []; + + if (options.cache) { + this.globals.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + to_mangle.push(symbol); + } + }); + } + + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_LabeledStatement) { + // lname is incremented when we get to the AST_Label + var save_nesting = lname; + descend(); + lname = save_nesting; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Scope) { + var p = tw.parent(), a = []; + node.variables.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + a.push(symbol); + } + }); + if (options.sort) a.sort(function(a, b){ + return b.references.length - a.references.length; + }); + to_mangle.push.apply(to_mangle, a); + return; + } + if (node instanceof AST_Label) { + var name; + do name = base54(++lname); while (!is_identifier(name)); + node.mangled_name = name; + return true; + } + if (options.screw_ie8 && node instanceof AST_SymbolCatch) { + to_mangle.push(node.definition()); + return; + } + }); + this.walk(tw); + to_mangle.forEach(function(def){ def.mangle(options) }); + + if (options.cache) { + options.cache.cname = this.cname; + } +}); + +AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options){ + options = this._default_mangler_options(options); + var tw = new TreeWalker(function(node){ + if (node instanceof AST_Constant) + base54.consider(node.print_to_string()); + else if (node instanceof AST_Return) + base54.consider("return"); + else if (node instanceof AST_Throw) + base54.consider("throw"); + else if (node instanceof AST_Continue) + base54.consider("continue"); + else if (node instanceof AST_Break) + base54.consider("break"); + else if (node instanceof AST_Debugger) + base54.consider("debugger"); + else if (node instanceof AST_Directive) + base54.consider(node.value); + else if (node instanceof AST_While) + base54.consider("while"); + else if (node instanceof AST_Do) + base54.consider("do while"); + else if (node instanceof AST_If) { + base54.consider("if"); + if (node.alternative) base54.consider("else"); + } + else if (node instanceof AST_Var) + base54.consider("var"); + else if (node instanceof AST_Const) + base54.consider("const"); + else if (node instanceof AST_Lambda) + base54.consider("function"); + else if (node instanceof AST_For) + base54.consider("for"); + else if (node instanceof AST_ForIn) + base54.consider("for in"); + else if (node instanceof AST_Switch) + base54.consider("switch"); + else if (node instanceof AST_Case) + base54.consider("case"); + else if (node instanceof AST_Default) + base54.consider("default"); + else if (node instanceof AST_With) + base54.consider("with"); + else if (node instanceof AST_ObjectSetter) + base54.consider("set" + node.key); + else if (node instanceof AST_ObjectGetter) + base54.consider("get" + node.key); + else if (node instanceof AST_ObjectKeyVal) + base54.consider(node.key); + else if (node instanceof AST_New) + base54.consider("new"); + else if (node instanceof AST_This) + base54.consider("this"); + else if (node instanceof AST_Try) + base54.consider("try"); + else if (node instanceof AST_Catch) + base54.consider("catch"); + else if (node instanceof AST_Finally) + base54.consider("finally"); + else if (node instanceof AST_Symbol && node.unmangleable(options)) + base54.consider(node.name); + else if (node instanceof AST_Unary || node instanceof AST_Binary) + base54.consider(node.operator); + else if (node instanceof AST_Dot) + base54.consider(node.property); + }); + this.walk(tw); + base54.sort(); +}); + +var base54 = (function() { + var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; + var chars, frequency; + function reset() { + frequency = Object.create(null); + chars = string.split("").map(function(ch){ return ch.charCodeAt(0) }); + chars.forEach(function(ch){ frequency[ch] = 0 }); + } + base54.consider = function(str){ + for (var i = str.length; --i >= 0;) { + var code = str.charCodeAt(i); + if (code in frequency) ++frequency[code]; + } + }; + base54.sort = function() { + chars = mergeSort(chars, function(a, b){ + if (is_digit(a) && !is_digit(b)) return 1; + if (is_digit(b) && !is_digit(a)) return -1; + return frequency[b] - frequency[a]; + }); + }; + base54.reset = reset; + reset(); + base54.get = function(){ return chars }; + base54.freq = function(){ return frequency }; + function base54(num) { + var ret = "", base = 54; + num++; + do { + num--; + ret += String.fromCharCode(chars[num % base]); + num = Math.floor(num / base); + base = 64; + } while (num > 0); + return ret; + }; + return base54; +})(); + +AST_Toplevel.DEFMETHOD("scope_warnings", function(options){ + options = defaults(options, { + undeclared : false, // this makes a lot of noise + unreferenced : true, + assign_to_global : true, + func_arguments : true, + nested_defuns : true, + eval : true + }); + var tw = new TreeWalker(function(node){ + if (options.undeclared + && node instanceof AST_SymbolRef + && node.undeclared()) + { + // XXX: this also warns about JS standard names, + // i.e. Object, Array, parseInt etc. Should add a list of + // exceptions. + AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.assign_to_global) + { + var sym = null; + if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) + sym = node.left; + else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) + sym = node.init; + if (sym + && (sym.undeclared() + || (sym.global() && sym.scope !== sym.definition().scope))) { + AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { + msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", + name: sym.name, + file: sym.start.file, + line: sym.start.line, + col: sym.start.col + }); + } + } + if (options.eval + && node instanceof AST_SymbolRef + && node.undeclared() + && node.name == "eval") { + AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); + } + if (options.unreferenced + && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) + && !(node instanceof AST_SymbolCatch) + && node.unreferenced()) { + AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { + type: node instanceof AST_Label ? "Label" : "Symbol", + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.func_arguments + && node instanceof AST_Lambda + && node.uses_arguments) { + AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { + name: node.name ? node.name.name : "anonymous", + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.nested_defuns + && node instanceof AST_Defun + && !(tw.parent() instanceof AST_Scope)) { + AST_Node.warn("Function {name} declared in nested statement \"{type}\" [{file}:{line},{col}]", { + name: node.name.name, + type: tw.parent().TYPE, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + }); + this.walk(tw); +}); diff --git a/tools/eslint/node_modules/uglify-js/lib/sourcemap.js b/tools/eslint/node_modules/uglify-js/lib/sourcemap.js new file mode 100644 index 00000000000000..a67011f03d762c --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/sourcemap.js @@ -0,0 +1,92 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +// a small wrapper around fitzgen's source-map library +function SourceMap(options) { + options = defaults(options, { + file : null, + root : null, + orig : null, + + orig_line_diff : 0, + dest_line_diff : 0, + }); + var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); + var generator; + if (orig_map) { + generator = MOZ_SourceMap.SourceMapGenerator.fromSourceMap(orig_map); + } else { + generator = new MOZ_SourceMap.SourceMapGenerator({ + file : options.file, + sourceRoot : options.root + }); + } + function add(source, gen_line, gen_col, orig_line, orig_col, name) { + if (orig_map) { + var info = orig_map.originalPositionFor({ + line: orig_line, + column: orig_col + }); + if (info.source === null) { + return; + } + source = info.source; + orig_line = info.line; + orig_col = info.column; + name = info.name || name; + } + generator.addMapping({ + generated : { line: gen_line + options.dest_line_diff, column: gen_col }, + original : { line: orig_line + options.orig_line_diff, column: orig_col }, + source : source, + name : name + }); + } + return { + add : add, + get : function() { return generator }, + toString : function() { return JSON.stringify(generator.toJSON()); } + }; +}; diff --git a/tools/eslint/node_modules/uglify-js/lib/transform.js b/tools/eslint/node_modules/uglify-js/lib/transform.js new file mode 100644 index 00000000000000..62e6e02b2ec6ed --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/transform.js @@ -0,0 +1,218 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +// Tree transformer helpers. + +function TreeTransformer(before, after) { + TreeWalker.call(this); + this.before = before; + this.after = after; +} +TreeTransformer.prototype = new TreeWalker; + +(function(undefined){ + + function _(node, descend) { + node.DEFMETHOD("transform", function(tw, in_list){ + var x, y; + tw.push(this); + if (tw.before) x = tw.before(this, descend, in_list); + if (x === undefined) { + if (!tw.after) { + x = this; + descend(x, tw); + } else { + tw.stack[tw.stack.length - 1] = x = this.clone(); + descend(x, tw); + y = tw.after(x, in_list); + if (y !== undefined) x = y; + } + } + tw.pop(this); + return x; + }); + }; + + function do_list(list, tw) { + return MAP(list, function(node){ + return node.transform(tw, true); + }); + }; + + _(AST_Node, noop); + + _(AST_LabeledStatement, function(self, tw){ + self.label = self.label.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_SimpleStatement, function(self, tw){ + self.body = self.body.transform(tw); + }); + + _(AST_Block, function(self, tw){ + self.body = do_list(self.body, tw); + }); + + _(AST_DWLoop, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_For, function(self, tw){ + if (self.init) self.init = self.init.transform(tw); + if (self.condition) self.condition = self.condition.transform(tw); + if (self.step) self.step = self.step.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_ForIn, function(self, tw){ + self.init = self.init.transform(tw); + self.object = self.object.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_With, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_Exit, function(self, tw){ + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_LoopControl, function(self, tw){ + if (self.label) self.label = self.label.transform(tw); + }); + + _(AST_If, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + if (self.alternative) self.alternative = self.alternative.transform(tw); + }); + + _(AST_Switch, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Case, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Try, function(self, tw){ + self.body = do_list(self.body, tw); + if (self.bcatch) self.bcatch = self.bcatch.transform(tw); + if (self.bfinally) self.bfinally = self.bfinally.transform(tw); + }); + + _(AST_Catch, function(self, tw){ + self.argname = self.argname.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Definitions, function(self, tw){ + self.definitions = do_list(self.definitions, tw); + }); + + _(AST_VarDef, function(self, tw){ + self.name = self.name.transform(tw); + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_Lambda, function(self, tw){ + if (self.name) self.name = self.name.transform(tw); + self.argnames = do_list(self.argnames, tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Call, function(self, tw){ + self.expression = self.expression.transform(tw); + self.args = do_list(self.args, tw); + }); + + _(AST_Seq, function(self, tw){ + self.car = self.car.transform(tw); + self.cdr = self.cdr.transform(tw); + }); + + _(AST_Dot, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Sub, function(self, tw){ + self.expression = self.expression.transform(tw); + self.property = self.property.transform(tw); + }); + + _(AST_Unary, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Binary, function(self, tw){ + self.left = self.left.transform(tw); + self.right = self.right.transform(tw); + }); + + _(AST_Conditional, function(self, tw){ + self.condition = self.condition.transform(tw); + self.consequent = self.consequent.transform(tw); + self.alternative = self.alternative.transform(tw); + }); + + _(AST_Array, function(self, tw){ + self.elements = do_list(self.elements, tw); + }); + + _(AST_Object, function(self, tw){ + self.properties = do_list(self.properties, tw); + }); + + _(AST_ObjectProperty, function(self, tw){ + self.value = self.value.transform(tw); + }); + +})(); diff --git a/tools/eslint/node_modules/uglify-js/lib/utils.js b/tools/eslint/node_modules/uglify-js/lib/utils.js new file mode 100644 index 00000000000000..4612a322dfa57e --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/lib/utils.js @@ -0,0 +1,310 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + 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 HOLDER “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 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. + + ***********************************************************************/ + +"use strict"; + +function array_to_hash(a) { + var ret = Object.create(null); + for (var i = 0; i < a.length; ++i) + ret[a[i]] = true; + return ret; +}; + +function slice(a, start) { + return Array.prototype.slice.call(a, start || 0); +}; + +function characters(str) { + return str.split(""); +}; + +function member(name, array) { + for (var i = array.length; --i >= 0;) + if (array[i] == name) + return true; + return false; +}; + +function find_if(func, array) { + for (var i = 0, n = array.length; i < n; ++i) { + if (func(array[i])) + return array[i]; + } +}; + +function repeat_string(str, i) { + if (i <= 0) return ""; + if (i == 1) return str; + var d = repeat_string(str, i >> 1); + d += d; + if (i & 1) d += str; + return d; +}; + +function DefaultsError(msg, defs) { + Error.call(this, msg); + this.msg = msg; + this.defs = defs; +}; +DefaultsError.prototype = Object.create(Error.prototype); +DefaultsError.prototype.constructor = DefaultsError; + +DefaultsError.croak = function(msg, defs) { + throw new DefaultsError(msg, defs); +}; + +function defaults(args, defs, croak) { + if (args === true) + args = {}; + var ret = args || {}; + if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i)) + DefaultsError.croak("`" + i + "` is not a supported option", defs); + for (var i in defs) if (defs.hasOwnProperty(i)) { + ret[i] = (args && args.hasOwnProperty(i)) ? args[i] : defs[i]; + } + return ret; +}; + +function merge(obj, ext) { + var count = 0; + for (var i in ext) if (ext.hasOwnProperty(i)) { + obj[i] = ext[i]; + count++; + } + return count; +}; + +function noop() {}; + +var MAP = (function(){ + function MAP(a, f, backwards) { + var ret = [], top = [], i; + function doit() { + var val = f(a[i], i); + var is_last = val instanceof Last; + if (is_last) val = val.v; + if (val instanceof AtTop) { + val = val.v; + if (val instanceof Splice) { + top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); + } else { + top.push(val); + } + } + else if (val !== skip) { + if (val instanceof Splice) { + ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); + } else { + ret.push(val); + } + } + return is_last; + }; + if (a instanceof Array) { + if (backwards) { + for (i = a.length; --i >= 0;) if (doit()) break; + ret.reverse(); + top.reverse(); + } else { + for (i = 0; i < a.length; ++i) if (doit()) break; + } + } + else { + for (i in a) if (a.hasOwnProperty(i)) if (doit()) break; + } + return top.concat(ret); + }; + MAP.at_top = function(val) { return new AtTop(val) }; + MAP.splice = function(val) { return new Splice(val) }; + MAP.last = function(val) { return new Last(val) }; + var skip = MAP.skip = {}; + function AtTop(val) { this.v = val }; + function Splice(val) { this.v = val }; + function Last(val) { this.v = val }; + return MAP; +})(); + +function push_uniq(array, el) { + if (array.indexOf(el) < 0) + array.push(el); +}; + +function string_template(text, props) { + return text.replace(/\{(.+?)\}/g, function(str, p){ + return props[p]; + }); +}; + +function remove(array, el) { + for (var i = array.length; --i >= 0;) { + if (array[i] === el) array.splice(i, 1); + } +}; + +function mergeSort(array, cmp) { + if (array.length < 2) return array.slice(); + function merge(a, b) { + var r = [], ai = 0, bi = 0, i = 0; + while (ai < a.length && bi < b.length) { + cmp(a[ai], b[bi]) <= 0 + ? r[i++] = a[ai++] + : r[i++] = b[bi++]; + } + if (ai < a.length) r.push.apply(r, a.slice(ai)); + if (bi < b.length) r.push.apply(r, b.slice(bi)); + return r; + }; + function _ms(a) { + if (a.length <= 1) + return a; + var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); + left = _ms(left); + right = _ms(right); + return merge(left, right); + }; + return _ms(array); +}; + +function set_difference(a, b) { + return a.filter(function(el){ + return b.indexOf(el) < 0; + }); +}; + +function set_intersection(a, b) { + return a.filter(function(el){ + return b.indexOf(el) >= 0; + }); +}; + +// this function is taken from Acorn [1], written by Marijn Haverbeke +// [1] https://github.com/marijnh/acorn +function makePredicate(words) { + if (!(words instanceof Array)) words = words.split(" "); + var f = "", cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; + f += "return true}return false;"; + } + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + if (cats.length > 3) { + cats.sort(function(a, b) {return b.length - a.length;}); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}"; + // Otherwise, simply generate a flat `switch` statement. + } else { + compareTo(words); + } + return new Function("str", f); +}; + +function all(array, predicate) { + for (var i = array.length; --i >= 0;) + if (!predicate(array[i])) + return false; + return true; +}; + +function Dictionary() { + this._values = Object.create(null); + this._size = 0; +}; +Dictionary.prototype = { + set: function(key, val) { + if (!this.has(key)) ++this._size; + this._values["$" + key] = val; + return this; + }, + add: function(key, val) { + if (this.has(key)) { + this.get(key).push(val); + } else { + this.set(key, [ val ]); + } + return this; + }, + get: function(key) { return this._values["$" + key] }, + del: function(key) { + if (this.has(key)) { + --this._size; + delete this._values["$" + key]; + } + return this; + }, + has: function(key) { return ("$" + key) in this._values }, + each: function(f) { + for (var i in this._values) + f(this._values[i], i.substr(1)); + }, + size: function() { + return this._size; + }, + map: function(f) { + var ret = []; + for (var i in this._values) + ret.push(f(this._values[i], i.substr(1))); + return ret; + }, + toObject: function() { return this._values } +}; +Dictionary.fromObject = function(obj) { + var dict = new Dictionary(); + dict._size = merge(dict._values, obj); + return dict; +}; diff --git a/tools/eslint/node_modules/uglify-js/node_modules/async/LICENSE b/tools/eslint/node_modules/uglify-js/node_modules/async/LICENSE new file mode 100644 index 00000000000000..b7f9d5001c0b8d --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +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/eslint/node_modules/uglify-js/node_modules/async/README.md b/tools/eslint/node_modules/uglify-js/node_modules/async/README.md new file mode 100644 index 00000000000000..fbac0d88ca121e --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/async/README.md @@ -0,0 +1,1425 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. Also supports [component](https://github.com/component/component). + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, each…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + +```javascript +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); + +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); + +async.parallel([ + function(){ ... }, + function(){ ... } +], callback); + +async.series([ + function(){ ... }, + function(){ ... } +]); +``` + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + +## Common Pitfalls + +### Binding a context to an iterator + +This section is really about bind, not about async. If you are wondering how to +make async execute your iterators in a given context, or are confused as to why +a method of another library isn't working as an iterator, study this example: + +```js +// Here is a simple object with an (unnecessarily roundabout) squaring method +var AsyncSquaringLibrary = { + squareExponent: 2, + square: function(number, callback){ + var result = Math.pow(number, this.squareExponent); + setTimeout(function(){ + callback(null, result); + }, 200); + } +}; + +async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ + // result is [NaN, NaN, NaN] + // This fails because the `this.squareExponent` expression in the square + // function is not evaluated in the context of AsyncSquaringLibrary, and is + // therefore undefined. +}); + +async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ + // result is [1, 4, 9] + // With the help of bind we can attach a context to the iterator before + // passing it to async. Now the square function will be executed in its + // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` + // will be as expected. +}); +``` + +## Download + +The source is available for download from +[GitHub](http://github.com/caolan/async). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed + +## In the Browser + +So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + +```html + + +``` + +## Documentation + +### Collections + +* [each](#each) +* [eachSeries](#eachSeries) +* [eachLimit](#eachLimit) +* [map](#map) +* [mapSeries](#mapSeries) +* [mapLimit](#mapLimit) +* [filter](#filter) +* [filterSeries](#filterSeries) +* [reject](#reject) +* [rejectSeries](#rejectSeries) +* [reduce](#reduce) +* [reduceRight](#reduceRight) +* [detect](#detect) +* [detectSeries](#detectSeries) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) +* [concatSeries](#concatSeries) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [parallelLimit](#parallellimittasks-limit-callback) +* [whilst](#whilst) +* [doWhilst](#doWhilst) +* [until](#until) +* [doUntil](#doUntil) +* [forever](#forever) +* [waterfall](#waterfall) +* [compose](#compose) +* [applyEach](#applyEach) +* [applyEachSeries](#applyEachSeries) +* [queue](#queue) +* [cargo](#cargo) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) +* [times](#times) +* [timesSeries](#timesSeries) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + + +### each(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the each function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + + +### eachSeries(arr, iterator, callback) + +The same as each only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + + +### eachLimit(arr, limit, iterator, callback) + +The same as each only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err) which must be called once it has + completed. If no error has occured, the callback should be run without + arguments or with an explicit null argument. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + +```js +// Assume documents is an array of JSON objects and requestApi is a +// function that interacts with a rate-limited REST api. + +async.eachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### mapLimit(arr, limit, iterator, callback) + +The same as map only no more than "limit" iterators will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that + the first "limit" iterator functions will complete before any others are +started. + +__Arguments__ + +* arr - An array to iterate over. +* limit - The maximum number of iterators to run at any time. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, transformed) which must be called once + it has completed with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + +```js +async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as reject, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then it's probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback(err, reduction) which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main callback is + immediately called with the error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, sortValue) which must be called once it + has completed with an error (which can be null) and a value to use as the sort + criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like fs.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback(truthValue) which must be called with a + boolean argument once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback(err, results) which must be called once it + has completed with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallelLimit(tasks, limit, [callback]) + +The same as parallel only the tasks are executed in parallel with a maximum of "limit" +tasks executing at any time. + +Note that the tasks are not executed in batches, so there is no guarantee that +the first "limit" tasks will complete before any others are started. + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback(err, result) it must call on completion with an error (which can + be null) and an optional result value. +* limit - The maximum number of tasks to run at any time. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback(err) which must be called once it has completed with an + optional error argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### forever(fn, callback) + +Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. +If an error is passed to fn's callback then 'callback' is called with the +error, otherwise it will never be called. + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a + callback(err, result1, result2, ...) it must call on completion. The first + argument is an error (which can be null) and any further arguments will be + passed as arguments in order to the next task. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions f(), g() and h() would produce the result of +f(g(h())), only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling the +callback after all functions have completed. If you only provide the first +argument then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* fns - the asynchronous functions to all call with the same arguments +* args... - any number of separate arguments to pass to the function +* callback - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +--------------------------------------- + + +### applyEachSeries(arr, iterator, callback) + +The same as applyEach only the functions are applied in series. + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task, which must call its callback(err) argument when finished, with an + optional error as an argument. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* unshift(task, [callback]) - add a new task to the front of the queue. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a cargo object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the payload limit). If the +worker is in progress, the task is queued until it is available. Once +the worker has completed some tasks, each callback of those tasks is called. + +__Arguments__ + +* worker(tasks, callback) - An asynchronous function for processing an array of + queued tasks, which must call its callback(err) argument when finished, with + an optional error as an argument. +* payload - An optional integer for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The cargo object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* payload - an integer for determining how many tasks should be + process per round. This property can be changed after a cargo is created to + alter the payload on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +Note, all functions are called with a results object as a second argument, +so it is unsafe to pass functions in the tasks object which cannot handle the +extra argument. For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling readFile with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to readFile in a function which does not forward the +results object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + function receives two arguments: (1) a callback(err, result) which must be + called when finished, passing an error (which can be null) and the result of + the function's execution, and (2) a results object, containing the results of + the previously executed functions. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. Results will always be passed + but if an error occurred, no other tasks will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } +], +function(err, results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + function(callback){ + // once the file is written let's email a link to it... + } + ]); +}); +``` + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. It's also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setImmediate(callback) +if available, otherwise setTimeout(callback, 0), which means other higher priority +events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, callback) + +Calls the callback n times and accumulates results in the same manner +you would use with async.map. + +__Arguments__ + +* n - The number of times to run the function. +* callback - The function to call n times. + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + + +### timesSeries(n, callback) + +The same as times only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/tools/eslint/node_modules/uglify-js/node_modules/async/lib/async.js b/tools/eslint/node_modules/uglify-js/node_modules/async/lib/async.js new file mode 100755 index 00000000000000..1eebb153fd1d39 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/async/lib/async.js @@ -0,0 +1,958 @@ +/*global setImmediate: false, setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root, previous_async; + + root = this; + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + var called = false; + return function() { + if (called) throw new Error("Callback was already called."); + called = true; + fn.apply(root, arguments); + } + } + + //// cross-browser compatiblity functions //// + + var _each = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _each(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _each(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + if (typeof setImmediate === 'function') { + async.nextTick = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + async.setImmediate = async.nextTick; + } + else { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + async.setImmediate = async.nextTick; + } + } + else { + async.nextTick = process.nextTick; + if (typeof setImmediate !== 'undefined') { + async.setImmediate = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; + } + else { + async.setImmediate = async.nextTick; + } + } + + async.each = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _each(arr, function (x) { + iterator(x, only_once(function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + } + })); + }); + }; + async.forEach = async.each; + + async.eachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + async.forEachSeries = async.eachSeries; + + async.eachLimit = function (arr, limit, iterator, callback) { + var fn = _eachLimit(limit); + fn.apply(null, [arr, iterator, callback]); + }; + async.forEachLimit = async.eachLimit; + + var _eachLimit = function (limit) { + + return function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed >= arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.each].concat(args)); + }; + }; + var doParallelLimit = function(limit, fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [_eachLimit(limit)].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.eachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = function (arr, limit, iterator, callback) { + return _mapLimit(limit)(arr, iterator, callback); + }; + + var _mapLimit = function(limit) { + return doParallelLimit(limit, _asyncMap); + }; + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.eachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _each(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _each(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _each(_keys(results), function(rkey) { + safeResults[rkey] = results[rkey]; + }); + safeResults[k] = args; + callback(err, safeResults); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor !== Array) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.setImmediate(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + var _parallel = function(eachfn, tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + eachfn.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + eachfn.each(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.parallel = function (tasks, callback) { + _parallel({ map: async.map, each: async.each }, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.eachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doWhilst = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (test()) { + async.doWhilst(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doUntil = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + if (!test()) { + async.doUntil(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.queue = function (worker, concurrency) { + if (concurrency === undefined) { + concurrency = 1; + } + function _insert(q, data, pos, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + var item = { + data: task, + callback: typeof callback === 'function' ? callback : null + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.saturated && q.tasks.length === concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if (q.empty && q.tasks.length === 0) { + q.empty(); + } + workers += 1; + var next = function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if (q.drain && q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + var cb = only_once(next); + worker(task.data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + async.cargo = function (worker, payload) { + var working = false, + tasks = []; + + var cargo = { + tasks: tasks, + payload: payload, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _each(data, function(task) { + tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (cargo.saturated && tasks.length === payload) { + cargo.saturated(); + } + }); + async.setImmediate(cargo.process); + }, + process: function process() { + if (working) return; + if (tasks.length === 0) { + if(cargo.drain) cargo.drain(); + return; + } + + var ts = typeof payload === 'number' + ? tasks.splice(0, payload) + : tasks.splice(0); + + var ds = _map(ts, function (task) { + return task.data; + }); + + if(cargo.empty) cargo.empty(); + working = true; + worker(ds, function () { + working = false; + + var args = arguments; + _each(ts, function (data) { + if (data.callback) { + data.callback.apply(null, args); + } + }); + + process(); + }); + }, + length: function () { + return tasks.length; + }, + running: function () { + return working; + } + }; + return cargo; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _each(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + async.times = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.map(counter, iterator, callback); + }; + + async.timesSeries = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.mapSeries(counter, iterator, callback); + }; + + async.compose = function (/* functions... */) { + var fns = Array.prototype.reverse.call(arguments); + return function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([function () { + var err = arguments[0]; + var nextargs = Array.prototype.slice.call(arguments, 1); + cb(err, nextargs); + }])) + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }; + }; + + var _applyEach = function (eachfn, fns /*args...*/) { + var go = function () { + var that = this; + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }; + if (arguments.length > 2) { + var args = Array.prototype.slice.call(arguments, 2); + return go.apply(this, args); + } + else { + return go; + } + }; + async.applyEach = doParallel(_applyEach); + async.applyEachSeries = doSeries(_applyEach); + + async.forever = function (fn, callback) { + function next(err) { + if (err) { + if (callback) { + return callback(err); + } + throw err; + } + fn(next); + } + next(); + }; + + // AMD / RequireJS + if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return async; + }); + } + // Node.js + else if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + // included directly via + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 00000000000000..dc091643f488df --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3006 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + result += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + result += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + } + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler 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. + */ + { + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + } + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + } + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = this._set.hasOwnProperty(sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return this._set.hasOwnProperty(sStr); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (this._set.hasOwnProperty(sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + } + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + } + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } + + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + } + + +/***/ } +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;base64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vb3RcbiAgICAgIH0pO1xuICAgICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICAgIHZhciBuZXdNYXBwaW5nID0ge1xuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lLFxuICAgICAgICAgICAgY29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgICAgbmV3TWFwcGluZy5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIG5ld01hcHBpbmcuc291cmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBuZXdNYXBwaW5nLm9yaWdpbmFsID0ge1xuICAgICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgaWYgKG1hcHBpbmcubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgICB9KTtcbiAgICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgICAgdmFyIGNvbnRlbnQgPSBhU291c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lmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICAgIHZhciBvcmlnaW5hbCA9IGFTb3VyY2VNYXBDb25zdW1lci5vcmlnaW5hbFBvc2l0aW9uRm9yKHtcbiAgICAgICAgICAgIGxpbmU6IG1hcHBpbmcub3JpZ2luYWxMaW5lLFxuICAgICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgaWYgKG9yaWdpbmFsLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gb3JpZ2luYWwuc291cmNlO1xuICAgICAgICAgICAgaWYgKGFTb3VyY2VNYXBQYXRoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPSBvcmlnaW5hbC5saW5lO1xuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICAgIGlmIChvcmlnaW5hbC5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gb3JpZ2luYWwubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2UgIT0gbnVsbCAmJiAhbmV3U291cmNlcy5oYXMoc291cmNlKSkge1xuICAgICAgICAgIG5ld1NvdXJjZXMuYWRkKHNvdXJjZSk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbmFtZSA9IG1hcHBpbmcubmFtZTtcbiAgICAgICAgaWYgKG5hbWUgIT0gbnVsbCAmJiAhbmV3TmFtZXMuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgICB9XG5cbiAgICAgIH0sIHRoaXMpO1xuICAgICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgICB0aGlzLl9uYW1lcyA9IG5ld05hbWVzO1xuXG4gICAgICAvLyBDb3B5IHNvdXJjZXNDb250ZW50cyBvZiBhcHBsaWVkIG1hcC5cbiAgICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2VGaWxlID0gdXRpbC5qb2luKGFTb3VyY2VNYXBQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2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ICAgIGlmICghdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nLCBtYXBwaW5nc1tpIC0gMV0pKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVzdWx0ICs9ICcsJztcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXN1bHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUlkeCA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihtYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgICAgcmVzdWx0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlID0gc291cmNlSWR4O1xuXG4gICAgICAgICAgLy8gbGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkIGluIFNvdXJjZU1hcCBzcGVjIHZlcnNpb24gM1xuICAgICAgICAgIHJlc3VsdCArPSBiYXNlNjRWTFEuZW5jb2RlKG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgICAgcmVzdWx0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgICByZXN1bHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcblxuICBTb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50ID1cbiAgICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZ2VuZXJhdGVTb3VyY2VzQ29udGVudChhU291cmNlcywgYVNvdXJjZVJvb3QpIHtcbiAgICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhU291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlID0gdXRpbC5yZWxhdGl2ZShhU291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIga2V5ID0gdXRpbC50b1NldFN0cmluZyhzb3VyY2UpO1xuICAgICAgICByZXR1cm4gT2JqZWN0LnByb3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VlO1xuICAgICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgICAgc2VnbWVudC5wdXNoKHZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRm91bmQgYSBzb3VyY2UsIGJ1dCBubyBsaW5lIGFuZCBjb2x1bW4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRm91bmQgYSBzb3VyY2UgYW5kIGxpbmUsIGJ1dCBubyBjb2x1bW4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gR2VuZXJhdGVkIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSBwcmV2aW91c1NvdXJjZSArIHNlZ21lbnRbMV07XG4gICAgICAgICAgICBwcmV2aW91c1NvdXJjZSArPSBzZWdtZW50WzFdO1xuXG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPSBwcmV2aW91c09yaWdpbmFsTGluZSArIHNlZ21lbnRbMl07XG4gICAgICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSArPSAxO1xuXG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBjb2x1bW4uXG4gICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID4gNCkge1xuICAgICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBwcmV2aW91c05hbWUgKyBzZWdtZW50WzRdO1xuICAgICAgICAgICAgICBwcmV2aW91c05hbWUgKz0gc2VnbWVudFs0XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBnZW5lcmF0ZWRNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICBvcmlnaW5hbE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHF1aWNrU29ydChnZW5lcmF0ZWRNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCk7XG4gICAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgICAgcXVpY2t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yY2UnLCBudWxsKTtcbiAgICAgICAgICBpZiAoc291cmNlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgc291cmNlID0gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnbmFtZScsIG51bGwpO1xuICAgICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgICBuYW1lID0gdGhpcy5fbmFtZXMuYXQobmFtZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzb3VyY2U6IHNvdXJjZSxcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdvcmlnaW5hbExpbmUnLCBudWxsKSxcbiAgICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBzb3VyY2U6IG51bGwsXG4gICAgICAgIGxpbmU6IG51bGwsXG4gICAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgICAgbmFtZTogbnVsbFxuICAgICAgfTtcbiAgICB9O1xuXG4gIC8qKlxuICAgKiBSZXR1cm4gdHJ1ZSBpZiB3ZSBoYXZlIHRoZSBzb3VyY2UgY29udGVudCBmb3IgZXZlcnkgc291cmNlIGluIHRoZSBzb3VyY2VcbiAgICogbWFwLCBmYWxzZSBvdGhlcndpc2UuXG4gICAqL1xuICBC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3IoYUFyZ3MpIHtcbiAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhhQXJncywgJ3NvdXJjZScpO1xuICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgICAgbGFzdENvbHVtbjogbnVsbFxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBvcmlnaW5hbExpbmU6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpLFxuICAgICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgICAgfTtcblxuICAgICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcoXG4gICAgICAgIG5lZWRsZSxcbiAgICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgXCJvcmlnaW5hbENvbHVtblwiLFxuICAgICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgICB1dGlsLmdldEFyZyhhQXJncywgJ2JpYXMnLCBTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORClcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgIHZhciBtY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107XG4gICAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IFtdO1xuICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuICAgICAgICB2YXIgc2VjdGlvbk1hcHBpbmdzID0gc2VjdGlvbi5jb25zdW1lci5fZ2VuZXJhdGVkTWFwcGluZ3M7XG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgdmFyIG1hcHBpbmcgPSBzZWN0aW9uTWFwcGluZ3Nbal07XG5cbiAgICAgICAgICB2YXIgc291cmNlID0gc2VjdGlvbi5jb25zdW1lci5fc291cmNlcy5hdChtYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgc291cmNlID0gdXRpbC5qb2luKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmluZGV4T2Yoc291cmNlKTtcblxuICAgICAgICAgIHZhciBuYW1lID0gc2VjdGlvbi5jb25zdW1lci5fbmFtZXMuYXQobWFwcGluZy5uYW1lKTtcbiAgICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmluZGV4T2YobmFtZSk7XG5cbiAgICAgICAgICAvLyBUaGUgbWFwcGluZ3MgY29taW5nIGZyb20gdGhlIGNvbnN1bWVyIGZvciB0aGUgc2VjdGlvbiBoYXZlXG4gICAgICAgICAgLy8g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5nIGNvZGUgaW4gdGhlIGN1cnJlbnQgbGluZSB3aXRoIFwibGFzdE1hcHBpbmdcIlxuICAgICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBhbmQgYWRkIHRoZSByZW1haW5pbmcgbGluZXMgd2l0aG91dCBhbnkgbWFwcGluZ1xuICAgICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5qb2luKFwiXCIpKTtcbiAgICAgIH1cblxuICAgICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICAgIGlmIChhUmVsYXRpdmVQYXRoICE9IG51bGwpIHtcbiAgICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLmpvaW4oYVJlbGF0aXZlUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5vZGUuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIHJldHVybiBub2RlO1xuXG4gICAgICBmdW5jdGlvbiBhZGRNYXBwaW5nV2l0aENvZGUobWFwcGluZywgY29kZSkge1xuICAgICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgbm9kZS5hZGQoY29kZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICAgID8gdXRpbC5qb2luKGFSZWxhdGl2ZVBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgICAgOiBtYXBwaW5nLnNvdXJjZTtcbiAgICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcubmFtZSkpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcblxuICAvKipcbiAgICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gICAqXG4gICAqIEBwYXJhbSBhQ2h1bmsgQSBzdHJpbmcgc25pcHBldCBvZiBnZW5lcmF0ZWQgSlMgY29kZSwgYW5vdGhlciBpbnN0YW5jZSBvZlxuICAgKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAgICovXG4gIFNvdXJjZU5vZGUucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfYWRkKGFDaHVuaykge1xuICAgIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICAgIGFDaHVuay5mb3JFYWNoKGZ1bmN0aW9uIChjaHVuaykge1xuICAgICAgICB0aGlzLmFkZChjaHVuayk7XG4gICAgICB9LCB0aGlzKTtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUNodW5rW2lzU291cmNlTm9kZV0gfH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GxpbmU6IG9yaWdpbmFsLmxpbmUsXG4gICAgICAgICAgICAgIGNvbHVtbjogb3JpZ2luYWwuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2VuZXJhdGVkOiB7XG4gICAgICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuYW1lOiBvcmlnaW5hbC5uYW1lXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgbGFzdE9yaWdpbmFsU291cmNlID0gb3JpZ2luYWwuc291cmNlO1xuICAgICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgICAgbGFzdE9yaWdpbmFsQ29sdW1uID0gb3JpZ2luYWwuY29sdW1uO1xuICAgICAgICBsYXN0T3JpZ2luYWxOYW1lID0gb3JpZ2luYWwubmFtZTtcbiAgICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgICB9IGVsc2UgaWYgKHNvdXJjZU1hcHBpbmdBY3RpdmUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgICB9XG4gICAgICBmb3IgKHZhciBpZHggPSAwLCBsZW5ndGggPSBjaHVuay5sZW5ndGg7IGlkeCA8IGxlbmd0aDsgaWR4KyspIHtcbiAgICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgICAgZ2VuZXJhdGVkLmxpbmUrKztcbiAgICAgICAgICBnZW5lcmF0ZWQuY29sdW1uID0gMDtcbiAgICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgICAgaWYgKGlkeCArIDEgPT09IGxlbmd0aCkge1xuICAgICAgICAgICAgbGFzdE9yaWdpbmFsU291cmNlID0gbnVsbDtcbiAgICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHNvdXJjZU1hcHBpbmdBY3RpdmUpIHtcbiAgICAgICAgICAgIG1hcC5hZGRNYXBwaW5nKHtcbiAgICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICAgICAgbGluZTogb3JpZ2luYWwubGluZSxcbiAgICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGdlbmVyYXRlZC5jb2x1bW4rKztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuICAgIHRoaXMud2Fsa1NvdXJjZUNvbnRlbnRzKGZ1bmN0aW9uIChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KSB7XG4gICAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgICB9KTtcblxuICAgIHJldHVybiB7IGNvZGU6IGdlbmVyYXRlZC5jb2RlLCBtYXA6IG1hcCB9O1xuICB9O1xuXG4gIGV4cG9ydHMuU291cmNlTm9kZSA9IFNvdXJjZU5vZGU7XG59XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vbGliL3NvdXJjZS1ub2RlLmpzXG4gKiogbW9kdWxlIGlkID0gMTBcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.js new file mode 100644 index 00000000000000..25199a64c6cca7 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3005 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + result += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + result += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + } + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler 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. + */ + { + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + } + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + } + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = this._set.hasOwnProperty(sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return this._set.hasOwnProperty(sStr); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (this._set.hasOwnProperty(sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + } + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + } + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } + + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + { + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + } + + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 00000000000000..3de3bd2e4e6126 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null==t||this._sources.has(t)||this._sources.add(t),null==o||this._names.has(o)||this._names.add(o),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t=0,s=1,a=0,u=0,l=0,c=0,g="",p=this._mappings.toArray(),h=0,f=p.length;f>h;h++){if(e=p[h],e.generatedLine!==s)for(t=0;e.generatedLine!==s;)g+=";",s++;else if(h>0){if(!i.compareByGeneratedPositionsInflated(e,p[h-1]))continue;g+=","}g+=o.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(r=this._sources.indexOf(e.source),g+=o.encode(r-c),c=r,g+=o.encode(e.originalLine-1-u),u=e.originalLine-1,g+=o.encode(e.originalColumn-a),a=e.originalColumn,null!=e.name&&(n=this._names.indexOf(e.name),g+=o.encode(n-l),l=n))}return g},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return 0>e?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),-1===a)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0&&e=n&&r>=e?e-n:e>=t&&o>=e?e-t+l:e>=i&&s>=e?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(f);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(d))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(0>t)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return"$"+e}function l(e){return e.substr(1)}function c(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function g(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function p(e,n){return e===n?0:e>n?1:-1}function h(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=p(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:p(e.name,n.name)))))}n.getArg=r;var f=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,d=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(f)},n.relative=a,n.toSetString=u,n.fromSetString=l,n.compareByOriginalPositions=c,n.compareByGeneratedPositionsDeflated=g,n.compareByGeneratedPositionsInflated=h},function(e,n,r){function t(){this._array=[],this._set={}}var o=r(4);t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;i>o;o++)r.add(e[o],n);return r},t.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=o.toSetString(e),t=this._set.hasOwnProperty(r),i=this._array.length;(!t||n)&&this._array.push(e),t||(this._set[r]=i)},t.prototype.has=function(e){var n=o.toSetString(e);return this._set.hasOwnProperty(n)},t.prototype.indexOf=function(e){var n=o.toSetString(e);if(this._set.hasOwnProperty(n))return this._set[n];throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o,!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;h>p;p++){var f=s[p],d=new i;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=t.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=r.indexOf(f.name)),c.push(d)),u.push(d)}return g(n.__originalMappings,a.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},A=[],S=[];_>v;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;_>s&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];s>v;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}):!1},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:0>e?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(0>s)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(s>i){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;s>c;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=function(){var e=u.shift(),n=u.shift()||"";return e+n},c=1,g=0,p=null;return n.eachMapping(function(e){if(null!==p){if(!(c0&&(p&&o(p,l()),a.add(u.join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;t>r;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;t-1>r;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;r>n;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;r>n;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?((i!==o.source||s!==o.line||u!==o.column||l!==o.name)&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;g>c;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])}); +//# sourceMappingURL=source-map.min.js.map \ No newline at end of file diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map new file mode 100644 index 00000000000000..8470bde426d014 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap a7d787c028005295f8d2","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","_validateMapping","has","add","aSourceFile","aSourceContent","toSetString","Object","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","strcmp","aStr1","aStr2","_array","_set","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","sourceMap","parse","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","Mapping","lastOffset","_sections","s","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findMapping","undefined","lastColumn","create","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","str","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","shiftNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,GEjDhCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW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ACAC,EAAA,KACAC,EAAA,KACAC,EAAA,IAqEA,OApEAnW,MAAAqV,KAAA,SAAAH,EAAAtS,GACAP,EAAAkS,MAAAW,EACA,OAAAtS,EAAAF,QACA,OAAAE,EAAAN,MACA,OAAAM,EAAAJ,SACAwT,IAAApT,EAAAF,QACAuT,IAAArT,EAAAN,MACA4T,IAAAtT,EAAAJ,QACA2T,IAAAvT,EAAAG,OACAmD,EAAAlD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,OAGAiT,EAAApT,EAAAF,OACAuT,EAAArT,EAAAN,KACA4T,EAAAtT,EAAAJ,OACA2T,EAAAvT,EAAAG,KACAgT,GAAA,GACOA,IACP7P,EAAAlD,YACAX,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,UAGAwT,EAAA,KACAD,GAAA,EAEA,QAAAxJ,GAAA,EAAAxI,EAAAmR,EAAAnR,OAA8CA,EAAAwI,EAAcA,IAC5D2I,EAAApN,WAAAyE,KAAA2H,GACA7R,EAAAC,OACAD,EAAAG,OAAA,EAEA+J,EAAA,IAAAxI,GACAiS,EAAA,KACAD,GAAA,GACWA,GACX7P,EAAAlD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,QAIAV,EAAAG,WAIAxC,KAAA6V,mBAAA,SAAA1S,EAAAiT,GACAlQ,EAAA5C,iBAAAH,EAAAiT,MAGY7B,KAAAlS,EAAAkS,KAAArO,QAGZtG,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var base64VLQ = __webpack_require__(2);\n\t var util = __webpack_require__(4);\n\t var ArraySet = __webpack_require__(5).ArraySet;\n\t var MappingList = __webpack_require__(6).MappingList;\n\t\n\t /**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\t function SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t }\n\t\n\t SourceMapGenerator.prototype._version = 3;\n\t\n\t /**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\t SourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t /**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\t SourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null && !this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t\n\t if (name != null && !this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t /**\n\t * Set the source content for a source file.\n\t */\n\t SourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = {};\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\t SourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t /**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\t SourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t /**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\t SourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t result += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t result += ',';\n\t }\n\t }\n\t\n\t result += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t result += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t result += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t result += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t result += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t }\n\t\n\t return result;\n\t };\n\t\n\t SourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents,\n\t key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t /**\n\t * Externalize the source map.\n\t */\n\t SourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t /**\n\t * Render the source map being generated to a string.\n\t */\n\t SourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\t exports.SourceMapGenerator = SourceMapGenerator;\n\t}\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t{\n\t var base64 = __webpack_require__(3);\n\t\n\t // A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t // length quantities we use in the source map spec, the first bit is the sign,\n\t // the next four bits are the actual value, and the 6th bit is the\n\t // continuation bit. The continuation bit tells us whether there are more\n\t // digits in this value following this digit.\n\t //\n\t // Continuation\n\t // | Sign\n\t // | |\n\t // V V\n\t // 101011\n\t\n\t var VLQ_BASE_SHIFT = 5;\n\t\n\t // binary: 100000\n\t var VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t // binary: 011111\n\t var VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t // binary: 100000\n\t var VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t /**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\t function toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t }\n\t\n\t /**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\t function fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t }\n\t\n\t /**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\t exports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t };\n\t\n\t /**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\t exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t };\n\t}\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t /**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\t exports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t };\n\t\n\t /**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\t exports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t };\n\t}\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t /**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\t function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }\n\t exports.getArg = getArg;\n\t\n\t var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\t var dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\t function urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t }\n\t exports.urlParse = urlParse;\n\t\n\t function urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t }\n\t exports.urlGenerate = urlGenerate;\n\t\n\t /**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consequtive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\t function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t }\n\t exports.normalize = normalize;\n\t\n\t /**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\t function join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t }\n\t exports.join = join;\n\t\n\t exports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t };\n\t\n\t /**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\t function relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t }\n\t exports.relative = relative;\n\t\n\t /**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\t function toSetString(aStr) {\n\t return '$' + aStr;\n\t }\n\t exports.toSetString = toSetString;\n\t\n\t function fromSetString(aStr) {\n\t return aStr.substr(1);\n\t }\n\t exports.fromSetString = fromSetString;\n\t\n\t /**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\t function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t }\n\t exports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t /**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\t function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t }\n\t exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\t function strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t }\n\t\n\t /**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\t function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t }\n\t exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t}\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t\n\t /**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\t function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }\n\t\n\t /**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\t ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t };\n\t\n\t /**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\t ArraySet.prototype.size = function ArraySet_size() {\n\t return Object.getOwnPropertyNames(this._set).length;\n\t };\n\t\n\t /**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = util.toSetString(aStr);\n\t var isDuplicate = this._set.hasOwnProperty(sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t this._set[sStr] = idx;\n\t }\n\t };\n\t\n\t /**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.has = function ArraySet_has(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t return this._set.hasOwnProperty(sStr);\n\t };\n\t\n\t /**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t if (this._set.hasOwnProperty(sStr)) {\n\t return this._set[sStr];\n\t }\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t };\n\t\n\t /**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\t ArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t };\n\t\n\t /**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\t ArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t };\n\t\n\t exports.ArraySet = ArraySet;\n\t}\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t\n\t /**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\t function generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t }\n\t\n\t /**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\t function MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t }\n\t\n\t /**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\t MappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t /**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\t MappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t };\n\t\n\t /**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\t MappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t };\n\t\n\t exports.MappingList = MappingList;\n\t}\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t var binarySearch = __webpack_require__(8);\n\t var ArraySet = __webpack_require__(5).ArraySet;\n\t var base64VLQ = __webpack_require__(2);\n\t var quickSort = __webpack_require__(9).quickSort;\n\t\n\t function SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t }\n\t\n\t SourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t }\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t SourceMapConsumer.prototype._version = 3;\n\t\n\t // `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t // parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t // are lazily instantiated, accessed via the `_generatedMappings` and\n\t // `_originalMappings` getters respectively, and we only parse the mappings\n\t // and create these arrays once queried for a source location. We jump through\n\t // these hoops because there can be many thousands of mappings, and parsing\n\t // them is expensive, so we only want to do it if we must.\n\t //\n\t // Each object in the arrays is of the form:\n\t //\n\t // {\n\t // generatedLine: The line number in the generated code,\n\t // generatedColumn: The column number in the generated code,\n\t // source: The path to the original source file that generated this\n\t // chunk of code,\n\t // originalLine: The line number in the original source that\n\t // corresponds to this chunk of generated code,\n\t // originalColumn: The column number in the original source that\n\t // corresponds to this chunk of generated code,\n\t // name: The name of the original symbol which generated this chunk of\n\t // code.\n\t // }\n\t //\n\t // All properties except for `generatedLine` and `generatedColumn` can be\n\t // `null`.\n\t //\n\t // `_generatedMappings` is ordered by the generated positions.\n\t //\n\t // `_originalMappings` is ordered by the original positions.\n\t\n\t SourceMapConsumer.prototype.__generatedMappings = null;\n\t Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t });\n\t\n\t SourceMapConsumer.prototype.__originalMappings = null;\n\t Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t });\n\t\n\t SourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t SourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\t SourceMapConsumer.GENERATED_ORDER = 1;\n\t SourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\t SourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\t SourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t /**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\t SourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t /**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t SourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\t exports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t /**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\t function BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names, true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t }\n\t\n\t BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\t BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t /**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\t BasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t BasicSourceMapConsumer.prototype._version = 3;\n\t\n\t /**\n\t * The list of original sources.\n\t */\n\t Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t });\n\t\n\t /**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\t function Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t }\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t BasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t /**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\t BasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t /**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\t BasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t /**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\t BasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t /**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\t BasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t /**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\t BasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t /**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t BasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\t exports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t /**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\t function IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t }\n\t\n\t IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\t IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t IndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t /**\n\t * The list of original sources.\n\t */\n\t Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t });\n\t\n\t /**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\t IndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t /**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\t IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t /**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\t IndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t /**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t IndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t IndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\t exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\t}\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t exports.GREATEST_LOWER_BOUND = 1;\n\t exports.LEAST_UPPER_BOUND = 2;\n\t\n\t /**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\t function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\t exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t };\n\t}\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t // It turns out that some (most?) JavaScript engines don't self-host\n\t // `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t // faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t // custom comparator function, calling back and forth between the VM's C++ and\n\t // JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t // worse generated code for the comparator function than would be optimal. In\n\t // fact, when sorting with a comparator, these costs outweigh the benefits of\n\t // sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t // a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t /**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\t function swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t }\n\t\n\t /**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\t function randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t }\n\t\n\t /**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\t function doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t }\n\t\n\t /**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\t exports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t };\n\t}\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\t var util = __webpack_require__(4);\n\t\n\t // Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t // operating systems these days (capturing the result).\n\t var REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t // Newline character code for charCodeAt() comparisons\n\t var NEWLINE_CODE = 10;\n\t\n\t // Private symbol for identifying `SourceNode`s when multiple versions of\n\t // the source-map library are loaded. This MUST NOT CHANGE across\n\t // versions!\n\t var isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t /**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\t function SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t }\n\t\n\t /**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\t SourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are removed from this array, by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var shiftNextLine = function() {\n\t var lineContents = remainingLines.shift();\n\t // The last line of a file might not have a newline.\n\t var newLine = remainingLines.shift() || \"\";\n\t return lineContents + newLine;\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[0];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[0];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLines.length > 0) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\t SourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\t SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\t SourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\t SourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\t SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\t SourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t /**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\t SourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t /**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\t SourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t };\n\t\n\t /**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\t SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t };\n\t\n\t exports.SourceNode = SourceNode;\n\t}\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** source-map.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a7d787c028005295f8d2\n **/","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source-map.js\n ** module id = 0\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var base64VLQ = require('./base64-vlq');\n var util = require('./util');\n var ArraySet = require('./array-set').ArraySet;\n var MappingList = require('./mapping-list').MappingList;\n\n /**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\n function SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n }\n\n SourceMapGenerator.prototype._version = 3;\n\n /**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\n SourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n /**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\n SourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null && !this._sources.has(source)) {\n this._sources.add(source);\n }\n\n if (name != null && !this._names.has(name)) {\n this._names.add(name);\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n /**\n * Set the source content for a source file.\n */\n SourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = {};\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n /**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\n SourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n /**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\n SourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n /**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\n SourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n result += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n result += ',';\n }\n }\n\n result += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n result += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n result += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n result += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n result += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n }\n\n return result;\n };\n\n SourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents,\n key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n /**\n * Externalize the source map.\n */\n SourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n /**\n * Render the source map being generated to a string.\n */\n SourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\n exports.SourceMapGenerator = SourceMapGenerator;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-generator.js\n ** module id = 1\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n{\n var base64 = require('./base64');\n\n // A single base 64 digit can contain 6 bits of data. For the base 64 variable\n // length quantities we use in the source map spec, the first bit is the sign,\n // the next four bits are the actual value, and the 6th bit is the\n // continuation bit. The continuation bit tells us whether there are more\n // digits in this value following this digit.\n //\n // Continuation\n // | Sign\n // | |\n // V V\n // 101011\n\n var VLQ_BASE_SHIFT = 5;\n\n // binary: 100000\n var VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n // binary: 011111\n var VLQ_BASE_MASK = VLQ_BASE - 1;\n\n // binary: 100000\n var VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n /**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\n function toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n }\n\n /**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\n function fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n }\n\n /**\n * Returns the base 64 VLQ encoded value.\n */\n exports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n };\n\n /**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\n exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64-vlq.js\n ** module id = 2\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n /**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\n exports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n };\n\n /**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\n exports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64.js\n ** module id = 3\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n /**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\n function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }\n exports.getArg = getArg;\n\n var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n var dataUrlRegexp = /^data:.+\\,.+$/;\n\n function urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n }\n exports.urlParse = urlParse;\n\n function urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n }\n exports.urlGenerate = urlGenerate;\n\n /**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consequtive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\n function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }\n exports.normalize = normalize;\n\n /**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\n function join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n }\n exports.join = join;\n\n exports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n };\n\n /**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\n function relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n }\n exports.relative = relative;\n\n /**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\n function toSetString(aStr) {\n return '$' + aStr;\n }\n exports.toSetString = toSetString;\n\n function fromSetString(aStr) {\n return aStr.substr(1);\n }\n exports.fromSetString = fromSetString;\n\n /**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\n function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n }\n exports.compareByOriginalPositions = compareByOriginalPositions;\n\n /**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\n function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n }\n exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\n function strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n }\n\n /**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\n function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n }\n exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/util.js\n ** module id = 4\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n\n /**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\n function ArraySet() {\n this._array = [];\n this._set = {};\n }\n\n /**\n * Static method for creating ArraySet instances from an existing array.\n */\n ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n };\n\n /**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\n ArraySet.prototype.size = function ArraySet_size() {\n return Object.getOwnPropertyNames(this._set).length;\n };\n\n /**\n * Add the given string to this set.\n *\n * @param String aStr\n */\n ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = util.toSetString(aStr);\n var isDuplicate = this._set.hasOwnProperty(sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set[sStr] = idx;\n }\n };\n\n /**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\n ArraySet.prototype.has = function ArraySet_has(aStr) {\n var sStr = util.toSetString(aStr);\n return this._set.hasOwnProperty(sStr);\n };\n\n /**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\n ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n var sStr = util.toSetString(aStr);\n if (this._set.hasOwnProperty(sStr)) {\n return this._set[sStr];\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n };\n\n /**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\n ArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n };\n\n /**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\n ArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n };\n\n exports.ArraySet = ArraySet;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/array-set.js\n ** module id = 5\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n\n /**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\n function generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n }\n\n /**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\n function MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n }\n\n /**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\n MappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n /**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\n MappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n };\n\n /**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\n MappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n };\n\n exports.MappingList = MappingList;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/mapping-list.js\n ** module id = 6\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n var binarySearch = require('./binary-search');\n var ArraySet = require('./array-set').ArraySet;\n var base64VLQ = require('./base64-vlq');\n var quickSort = require('./quick-sort').quickSort;\n\n function SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n }\n\n SourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n }\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n SourceMapConsumer.prototype._version = 3;\n\n // `__generatedMappings` and `__originalMappings` are arrays that hold the\n // parsed mapping coordinates from the source map's \"mappings\" attribute. They\n // are lazily instantiated, accessed via the `_generatedMappings` and\n // `_originalMappings` getters respectively, and we only parse the mappings\n // and create these arrays once queried for a source location. We jump through\n // these hoops because there can be many thousands of mappings, and parsing\n // them is expensive, so we only want to do it if we must.\n //\n // Each object in the arrays is of the form:\n //\n // {\n // generatedLine: The line number in the generated code,\n // generatedColumn: The column number in the generated code,\n // source: The path to the original source file that generated this\n // chunk of code,\n // originalLine: The line number in the original source that\n // corresponds to this chunk of generated code,\n // originalColumn: The column number in the original source that\n // corresponds to this chunk of generated code,\n // name: The name of the original symbol which generated this chunk of\n // code.\n // }\n //\n // All properties except for `generatedLine` and `generatedColumn` can be\n // `null`.\n //\n // `_generatedMappings` is ordered by the generated positions.\n //\n // `_originalMappings` is ordered by the original positions.\n\n SourceMapConsumer.prototype.__generatedMappings = null;\n Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n });\n\n SourceMapConsumer.prototype.__originalMappings = null;\n Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n });\n\n SourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n SourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\n SourceMapConsumer.GENERATED_ORDER = 1;\n SourceMapConsumer.ORIGINAL_ORDER = 2;\n\n SourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n SourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n /**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\n SourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n /**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n SourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\n exports.SourceMapConsumer = SourceMapConsumer;\n\n /**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\n function BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names, true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n }\n\n BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n /**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\n BasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n BasicSourceMapConsumer.prototype._version = 3;\n\n /**\n * The list of original sources.\n */\n Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n });\n\n /**\n * Provide the JIT with a nice shape / hidden class.\n */\n function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n }\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n BasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n /**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\n BasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n /**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\n BasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\n BasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n BasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n BasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n BasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\n exports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n /**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\n function IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n }\n\n IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n IndexedSourceMapConsumer.prototype._version = 3;\n\n /**\n * The list of original sources.\n */\n Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n });\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\n IndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n IndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n IndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n IndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\n exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-consumer.js\n ** module id = 7\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n exports.GREATEST_LOWER_BOUND = 1;\n exports.LEAST_UPPER_BOUND = 2;\n\n /**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\n function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n }\n\n /**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\n exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/binary-search.js\n ** module id = 8\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n // It turns out that some (most?) JavaScript engines don't self-host\n // `Array.prototype.sort`. This makes sense because C++ will likely remain\n // faster than JS when doing raw CPU-intensive sorting. However, when using a\n // custom comparator function, calling back and forth between the VM's C++ and\n // JIT'd JS is rather slow *and* loses JIT type information, resulting in\n // worse generated code for the comparator function than would be optimal. In\n // fact, when sorting with a comparator, these costs outweigh the benefits of\n // sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n // a ~3500ms mean speed-up in `bench/bench.html`.\n\n /**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\n function swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n }\n\n /**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\n function randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n }\n\n /**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\n function doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n }\n\n /**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n exports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/quick-sort.js\n ** module id = 9\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\n var util = require('./util');\n\n // Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n // operating systems these days (capturing the result).\n var REGEX_NEWLINE = /(\\r?\\n)/;\n\n // Newline character code for charCodeAt() comparisons\n var NEWLINE_CODE = 10;\n\n // Private symbol for identifying `SourceNode`s when multiple versions of\n // the source-map library are loaded. This MUST NOT CHANGE across\n // versions!\n var isSourceNode = \"$$$isSourceNode$$$\";\n\n /**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\n function SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n }\n\n /**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\n SourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are removed from this array, by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var shiftNextLine = function() {\n var lineContents = remainingLines.shift();\n // The last line of a file might not have a newline.\n var newLine = remainingLines.shift() || \"\";\n return lineContents + newLine;\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[0];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[0];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLines.length > 0) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n /**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n SourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n };\n\n /**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n };\n\n /**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\n SourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n };\n\n /**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\n SourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n };\n\n /**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\n SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n };\n\n /**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\n SourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n /**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\n SourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n /**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\n SourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n };\n\n /**\n * Returns the string representation of this source node along with a source\n * map.\n */\n SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n };\n\n exports.SourceNode = SourceNode;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-node.js\n ** module id = 10\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/array-set.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/array-set.js new file mode 100644 index 00000000000000..0ffbb9fd983e33 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/array-set.js @@ -0,0 +1,104 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = this._set.hasOwnProperty(sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return this._set.hasOwnProperty(sStr); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (this._set.hasOwnProperty(sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 00000000000000..f2a07f7c37e5cf --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,141 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler 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. + */ +{ + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64.js new file mode 100644 index 00000000000000..dfda6ce1860916 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/base64.js @@ -0,0 +1,68 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js new file mode 100644 index 00000000000000..03161e6bf35904 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,112 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 00000000000000..287a6076a8db10 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,80 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var util = require('./util'); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 00000000000000..f92823cea5faf4 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,115 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 00000000000000..242f21c6c52dd5 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + var quickSort = require('./quick-sort').quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 00000000000000..ffc76cdf517f40 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,396 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + result += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + result += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-node.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-node.js new file mode 100644 index 00000000000000..8b0fd591843b2e --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/source-node.js @@ -0,0 +1,408 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/util.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/util.js new file mode 100644 index 00000000000000..4581590224c700 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/lib/util.js @@ -0,0 +1,369 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +{ + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/package.json b/tools/eslint/node_modules/uglify-js/node_modules/source-map/package.json new file mode 100644 index 00000000000000..86c08ac641c84c --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/package.json @@ -0,0 +1,240 @@ +{ + "_args": [ + [ + "source-map@~0.5.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js" + ] + ], + "_from": "source-map@>=0.5.1 <0.6.0", + "_id": "source-map@0.5.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/uglify-js/source-map", + "_npmUser": { + "email": "fitzgen@gmail.com", + "name": "nickfitzgerald" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "name": "source-map", + "raw": "source-map@~0.5.1", + "rawSpec": "~0.5.1", + "scope": null, + "spec": ">=0.5.1 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/uglify-js" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.3.tgz", + "_shasum": "82674b85a71b0be76c3e7416d15e9f5252eb3be0", + "_shrinkwrap": null, + "_spec": "source-map@~0.5.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js", + "author": { + "email": "nfitzgerald@mozilla.com", + "name": "Nick Fitzgerald" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "contributors": [ + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" + }, + { + "name": "Chris Montgomery", + "email": "christopher.montgomery@dowjones.com" + }, + { + "name": "J. Ryan Stinnett", + "email": "jryans@gmail.com" + }, + { + "name": "Jack Herrington", + "email": "jherrington@walmartlabs.com" + }, + { + "name": "Chris Truter", + "email": "jeffpalentine@gmail.com" + }, + { + "name": "Daniel Espeset", + "email": "daniel@danielespeset.com" + }, + { + "name": "Jamie Wong", + "email": "jamie.lf.wong@gmail.com" + }, + { + "name": "Eddy Bruël", + "email": "ejpbruel@mozilla.com" + }, + { + "name": "Hawken Rives", + "email": "hawkrives@gmail.com" + }, + { + "name": "Gilad Peleg", + "email": "giladp007@gmail.com" + }, + { + "name": "djchie", + "email": "djchie.dev@gmail.com" + }, + { + "name": "Gary Ye", + "email": "garysye@gmail.com" + }, + { + "name": "Nicolas Lalevée", + "email": "nicolas.lalevee@hibnet.org" + } + ], + "dependencies": {}, + "description": "Generates and consumes source maps", + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "directories": {}, + "dist": { + "shasum": "82674b85a71b0be76c3e7416d15e9f5252eb3be0", + "tarball": "http://registry.npmjs.org/source-map/-/source-map-0.5.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map", + "lib/", + "source-map.js" + ], + "homepage": "https://github.com/mozilla/source-map", + "license": "BSD-3-Clause", + "main": "./source-map.js", + "maintainers": [ + { + "name": "mozilla-devtools", + "email": "mozilla-developer-tools@googlegroups.com" + }, + { + "name": "mozilla", + "email": "dherman@mozilla.com" + }, + { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + } + ], + "name": "source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/mozilla/source-map.git" + }, + "scripts": { + "build": "webpack --color", + "test": "node test/run-tests.js", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "version": "0.5.3" +} diff --git a/tools/eslint/node_modules/uglify-js/node_modules/source-map/source-map.js b/tools/eslint/node_modules/uglify-js/node_modules/source-map/source-map.js new file mode 100644 index 00000000000000..bc88fe820c87a2 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/tools/eslint/node_modules/uglify-js/package.json b/tools/eslint/node_modules/uglify-js/package.json new file mode 100644 index 00000000000000..1290fde8c509e0 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "uglify-js@^2.6", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/handlebars" + ] + ], + "_from": "uglify-js@>=2.6.0 <3.0.0", + "_id": "uglify-js@2.6.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/uglify-js", + "_nodeVersion": "4.1.1", + "_npmUser": { + "email": "mihai.bazon@gmail.com", + "name": "mishoo" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "uglify-js", + "raw": "uglify-js@^2.6", + "rawSpec": "^2.6", + "scope": null, + "spec": ">=2.6.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/handlebars" + ], + "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.1.tgz", + "_shasum": "edbbe1888ba3525ded3a7bf836b30b3405d3161b", + "_shrinkwrap": null, + "_spec": "uglify-js@^2.6", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/handlebars", + "author": { + "email": "mihai.bazon@gmail.com", + "name": "Mihai Bazon", + "url": "http://lisperator.net/" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "browserify": { + "transform": [ + "uglify-to-browserify" + ] + }, + "bugs": { + "url": "https://github.com/mishoo/UglifyJS2/issues" + }, + "dependencies": { + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "description": "JavaScript parser, mangler/compressor and beautifier toolkit", + "devDependencies": { + "acorn": "~0.6.0", + "escodegen": "~1.3.3", + "esfuzz": "~0.3.1", + "estraverse": "~1.5.1" + }, + "directories": {}, + "dist": { + "shasum": "edbbe1888ba3525ded3a7bf836b30b3405d3161b", + "tarball": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.6.1.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "LICENSE", + "bin", + "lib", + "tools" + ], + "gitHead": "15b5f70338695c435cab05b7ac2de29cad230360", + "homepage": "http://lisperator.net/uglifyjs", + "license": "BSD-2-Clause", + "main": "tools/node.js", + "maintainers": [ + { + "name": "caires", + "email": "cairesvs@gmail.com" + }, + { + "name": "mape", + "email": "mape@mape.me" + }, + { + "name": "mishoo", + "email": "mihai.bazon@gmail.com" + } + ], + "name": "uglify-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mishoo/UglifyJS2.git" + }, + "scripts": { + "shrinkwrap": "rm ./npm-shrinkwrap.json; rm -rf ./node_modules; npm i && npm shrinkwrap && npm outdated", + "test": "node test/run-tests.js" + }, + "version": "2.6.1" +} diff --git a/tools/eslint/node_modules/uglify-js/tools/domprops.json b/tools/eslint/node_modules/uglify-js/tools/domprops.json new file mode 100644 index 00000000000000..6f6c221dbb7210 --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/tools/domprops.json @@ -0,0 +1,5603 @@ +{ + "props": [ + "$&", + "$'", + "$*", + "$+", + "$1", + "$2", + "$3", + "$4", + "$5", + "$6", + "$7", + "$8", + "$9", + "$_", + "$`", + "$input", + "@@iterator", + "ABORT_ERR", + "ACTIVE", + "ACTIVE_ATTRIBUTES", + "ACTIVE_TEXTURE", + "ACTIVE_UNIFORMS", + "ADDITION", + "ALIASED_LINE_WIDTH_RANGE", + "ALIASED_POINT_SIZE_RANGE", + "ALLOW_KEYBOARD_INPUT", + "ALLPASS", + "ALPHA", + "ALPHA_BITS", + "ALT_MASK", + "ALWAYS", + "ANY_TYPE", + "ANY_UNORDERED_NODE_TYPE", + "ARRAY_BUFFER", + "ARRAY_BUFFER_BINDING", + "ATTACHED_SHADERS", + "ATTRIBUTE_NODE", + "AT_TARGET", + "AddSearchProvider", + "AnalyserNode", + "AnimationEvent", + "AnonXMLHttpRequest", + "ApplicationCache", + "ApplicationCacheErrorEvent", + "Array", + "ArrayBuffer", + "Attr", + "Audio", + "AudioBuffer", + "AudioBufferSourceNode", + "AudioContext", + "AudioDestinationNode", + "AudioListener", + "AudioNode", + "AudioParam", + "AudioProcessingEvent", + "AudioStreamTrack", + "AutocompleteErrorEvent", + "BACK", + "BAD_BOUNDARYPOINTS_ERR", + "BANDPASS", + "BLEND", + "BLEND_COLOR", + "BLEND_DST_ALPHA", + "BLEND_DST_RGB", + "BLEND_EQUATION", + "BLEND_EQUATION_ALPHA", + "BLEND_EQUATION_RGB", + "BLEND_SRC_ALPHA", + "BLEND_SRC_RGB", + "BLUE_BITS", + "BLUR", + "BOOL", + "BOOLEAN_TYPE", + "BOOL_VEC2", + "BOOL_VEC3", + "BOOL_VEC4", + "BOTH", + "BROWSER_DEFAULT_WEBGL", + "BUBBLING_PHASE", + "BUFFER_SIZE", + "BUFFER_USAGE", + "BYTE", + "BYTES_PER_ELEMENT", + "BarProp", + "BaseHref", + "BatteryManager", + "BeforeLoadEvent", + "BeforeUnloadEvent", + "BiquadFilterNode", + "Blob", + "BlobEvent", + "Boolean", + "CAPTURING_PHASE", + "CCW", + "CDATASection", + "CDATA_SECTION_NODE", + "CHANGE", + "CHARSET_RULE", + "CHECKING", + "CLAMP_TO_EDGE", + "CLICK", + "CLOSED", + "CLOSING", + "COLOR_ATTACHMENT0", + "COLOR_BUFFER_BIT", + "COLOR_CLEAR_VALUE", + "COLOR_WRITEMASK", + "COMMENT_NODE", + "COMPILE_STATUS", + "COMPRESSED_RGBA_S3TC_DXT1_EXT", + "COMPRESSED_RGBA_S3TC_DXT3_EXT", + "COMPRESSED_RGBA_S3TC_DXT5_EXT", + "COMPRESSED_RGB_S3TC_DXT1_EXT", + "COMPRESSED_TEXTURE_FORMATS", + "CONNECTING", + "CONSTANT_ALPHA", + "CONSTANT_COLOR", + "CONSTRAINT_ERR", + "CONTEXT_LOST_WEBGL", + "CONTROL_MASK", + "COUNTER_STYLE_RULE", + "CSS", + "CSS2Properties", + "CSSCharsetRule", + "CSSConditionRule", + "CSSCounterStyleRule", + "CSSFontFaceRule", + "CSSFontFeatureValuesRule", + "CSSGroupingRule", + "CSSImportRule", + "CSSKeyframeRule", + "CSSKeyframesRule", + "CSSMediaRule", + "CSSMozDocumentRule", + "CSSNameSpaceRule", + "CSSPageRule", + "CSSPrimitiveValue", + "CSSRule", + "CSSRuleList", + "CSSStyleDeclaration", + "CSSStyleRule", + "CSSStyleSheet", + "CSSSupportsRule", + "CSSUnknownRule", + "CSSValue", + "CSSValueList", + "CSSVariablesDeclaration", + "CSSVariablesRule", + "CSSViewportRule", + "CSS_ATTR", + "CSS_CM", + "CSS_COUNTER", + "CSS_CUSTOM", + "CSS_DEG", + "CSS_DIMENSION", + "CSS_EMS", + "CSS_EXS", + "CSS_FILTER_BLUR", + "CSS_FILTER_BRIGHTNESS", + "CSS_FILTER_CONTRAST", + "CSS_FILTER_CUSTOM", + "CSS_FILTER_DROP_SHADOW", + "CSS_FILTER_GRAYSCALE", + "CSS_FILTER_HUE_ROTATE", + "CSS_FILTER_INVERT", + "CSS_FILTER_OPACITY", + "CSS_FILTER_REFERENCE", + "CSS_FILTER_SATURATE", + "CSS_FILTER_SEPIA", + "CSS_GRAD", + "CSS_HZ", + "CSS_IDENT", + "CSS_IN", + "CSS_INHERIT", + "CSS_KHZ", + "CSS_MATRIX", + "CSS_MATRIX3D", + "CSS_MM", + "CSS_MS", + "CSS_NUMBER", + "CSS_PC", + "CSS_PERCENTAGE", + "CSS_PERSPECTIVE", + "CSS_PRIMITIVE_VALUE", + "CSS_PT", + "CSS_PX", + "CSS_RAD", + "CSS_RECT", + "CSS_RGBCOLOR", + "CSS_ROTATE", + "CSS_ROTATE3D", + "CSS_ROTATEX", + "CSS_ROTATEY", + "CSS_ROTATEZ", + "CSS_S", + "CSS_SCALE", + "CSS_SCALE3D", + "CSS_SCALEX", + "CSS_SCALEY", + "CSS_SCALEZ", + "CSS_SKEW", + "CSS_SKEWX", + "CSS_SKEWY", + "CSS_STRING", + "CSS_TRANSLATE", + "CSS_TRANSLATE3D", + "CSS_TRANSLATEX", + "CSS_TRANSLATEY", + "CSS_TRANSLATEZ", + "CSS_UNKNOWN", + "CSS_URI", + "CSS_VALUE_LIST", + "CSS_VH", + "CSS_VMAX", + "CSS_VMIN", + "CSS_VW", + "CULL_FACE", + "CULL_FACE_MODE", + "CURRENT_PROGRAM", + "CURRENT_VERTEX_ATTRIB", + "CUSTOM", + "CW", + "CanvasGradient", + "CanvasPattern", + "CanvasRenderingContext2D", + "CaretPosition", + "ChannelMergerNode", + "ChannelSplitterNode", + "CharacterData", + "ClientRect", + "ClientRectList", + "Clipboard", + "ClipboardEvent", + "CloseEvent", + "Collator", + "CommandEvent", + "Comment", + "CompositionEvent", + "Console", + "Controllers", + "ConvolverNode", + "Counter", + "Crypto", + "CryptoKey", + "CustomEvent", + "DATABASE_ERR", + "DATA_CLONE_ERR", + "DATA_ERR", + "DBLCLICK", + "DECR", + "DECR_WRAP", + "DELETE_STATUS", + "DEPTH_ATTACHMENT", + "DEPTH_BITS", + "DEPTH_BUFFER_BIT", + "DEPTH_CLEAR_VALUE", + "DEPTH_COMPONENT", + "DEPTH_COMPONENT16", + "DEPTH_FUNC", + "DEPTH_RANGE", + "DEPTH_STENCIL", + "DEPTH_STENCIL_ATTACHMENT", + "DEPTH_TEST", + "DEPTH_WRITEMASK", + "DIRECTION_DOWN", + "DIRECTION_LEFT", + "DIRECTION_RIGHT", + "DIRECTION_UP", + "DISABLED", + "DISPATCH_REQUEST_ERR", + "DITHER", + "DOCUMENT_FRAGMENT_NODE", + "DOCUMENT_NODE", + "DOCUMENT_POSITION_CONTAINED_BY", + "DOCUMENT_POSITION_CONTAINS", + "DOCUMENT_POSITION_DISCONNECTED", + "DOCUMENT_POSITION_FOLLOWING", + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", + "DOCUMENT_POSITION_PRECEDING", + "DOCUMENT_TYPE_NODE", + "DOMCursor", + "DOMError", + "DOMException", + "DOMImplementation", + "DOMImplementationLS", + "DOMMatrix", + "DOMMatrixReadOnly", + "DOMParser", + "DOMPoint", + "DOMPointReadOnly", + "DOMQuad", + "DOMRect", + "DOMRectList", + "DOMRectReadOnly", + "DOMRequest", + "DOMSTRING_SIZE_ERR", + "DOMSettableTokenList", + "DOMStringList", + "DOMStringMap", + "DOMTokenList", + "DOMTransactionEvent", + "DOM_DELTA_LINE", + "DOM_DELTA_PAGE", + "DOM_DELTA_PIXEL", + "DOM_INPUT_METHOD_DROP", + "DOM_INPUT_METHOD_HANDWRITING", + "DOM_INPUT_METHOD_IME", + "DOM_INPUT_METHOD_KEYBOARD", + "DOM_INPUT_METHOD_MULTIMODAL", + "DOM_INPUT_METHOD_OPTION", + "DOM_INPUT_METHOD_PASTE", + "DOM_INPUT_METHOD_SCRIPT", + "DOM_INPUT_METHOD_UNKNOWN", + "DOM_INPUT_METHOD_VOICE", + "DOM_KEY_LOCATION_JOYSTICK", + "DOM_KEY_LOCATION_LEFT", + "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", + "DOM_KEY_LOCATION_RIGHT", + "DOM_KEY_LOCATION_STANDARD", + "DOM_VK_0", + "DOM_VK_1", + "DOM_VK_2", + "DOM_VK_3", + "DOM_VK_4", + "DOM_VK_5", + "DOM_VK_6", + "DOM_VK_7", + "DOM_VK_8", + "DOM_VK_9", + "DOM_VK_A", + "DOM_VK_ACCEPT", + "DOM_VK_ADD", + "DOM_VK_ALT", + "DOM_VK_ALTGR", + "DOM_VK_AMPERSAND", + "DOM_VK_ASTERISK", + "DOM_VK_AT", + "DOM_VK_ATTN", + "DOM_VK_B", + "DOM_VK_BACKSPACE", + "DOM_VK_BACK_QUOTE", + "DOM_VK_BACK_SLASH", + "DOM_VK_BACK_SPACE", + "DOM_VK_C", + "DOM_VK_CANCEL", + "DOM_VK_CAPS_LOCK", + "DOM_VK_CIRCUMFLEX", + "DOM_VK_CLEAR", + "DOM_VK_CLOSE_BRACKET", + "DOM_VK_CLOSE_CURLY_BRACKET", + "DOM_VK_CLOSE_PAREN", + "DOM_VK_COLON", + "DOM_VK_COMMA", + "DOM_VK_CONTEXT_MENU", + "DOM_VK_CONTROL", + "DOM_VK_CONVERT", + "DOM_VK_CRSEL", + "DOM_VK_CTRL", + "DOM_VK_D", + "DOM_VK_DECIMAL", + "DOM_VK_DELETE", + "DOM_VK_DIVIDE", + "DOM_VK_DOLLAR", + "DOM_VK_DOUBLE_QUOTE", + "DOM_VK_DOWN", + "DOM_VK_E", + "DOM_VK_EISU", + "DOM_VK_END", + "DOM_VK_ENTER", + "DOM_VK_EQUALS", + "DOM_VK_EREOF", + "DOM_VK_ESCAPE", + "DOM_VK_EXCLAMATION", + "DOM_VK_EXECUTE", + "DOM_VK_EXSEL", + "DOM_VK_F", + "DOM_VK_F1", + "DOM_VK_F10", + "DOM_VK_F11", + "DOM_VK_F12", + "DOM_VK_F13", + "DOM_VK_F14", + "DOM_VK_F15", + "DOM_VK_F16", + "DOM_VK_F17", + "DOM_VK_F18", + "DOM_VK_F19", + "DOM_VK_F2", + "DOM_VK_F20", + "DOM_VK_F21", + "DOM_VK_F22", + "DOM_VK_F23", + "DOM_VK_F24", + "DOM_VK_F25", + "DOM_VK_F26", + "DOM_VK_F27", + "DOM_VK_F28", + "DOM_VK_F29", + "DOM_VK_F3", + "DOM_VK_F30", + "DOM_VK_F31", + "DOM_VK_F32", + "DOM_VK_F33", + "DOM_VK_F34", + "DOM_VK_F35", + "DOM_VK_F36", + "DOM_VK_F4", + "DOM_VK_F5", + "DOM_VK_F6", + "DOM_VK_F7", + "DOM_VK_F8", + "DOM_VK_F9", + "DOM_VK_FINAL", + "DOM_VK_FRONT", + "DOM_VK_G", + "DOM_VK_GREATER_THAN", + "DOM_VK_H", + "DOM_VK_HANGUL", + "DOM_VK_HANJA", + "DOM_VK_HASH", + "DOM_VK_HELP", + "DOM_VK_HK_TOGGLE", + "DOM_VK_HOME", + "DOM_VK_HYPHEN_MINUS", + "DOM_VK_I", + "DOM_VK_INSERT", + "DOM_VK_J", + "DOM_VK_JUNJA", + "DOM_VK_K", + "DOM_VK_KANA", + "DOM_VK_KANJI", + "DOM_VK_L", + "DOM_VK_LEFT", + "DOM_VK_LEFT_TAB", + "DOM_VK_LESS_THAN", + "DOM_VK_M", + "DOM_VK_META", + "DOM_VK_MODECHANGE", + "DOM_VK_MULTIPLY", + "DOM_VK_N", + "DOM_VK_NONCONVERT", + "DOM_VK_NUMPAD0", + "DOM_VK_NUMPAD1", + "DOM_VK_NUMPAD2", + "DOM_VK_NUMPAD3", + "DOM_VK_NUMPAD4", + "DOM_VK_NUMPAD5", + "DOM_VK_NUMPAD6", + "DOM_VK_NUMPAD7", + "DOM_VK_NUMPAD8", + "DOM_VK_NUMPAD9", + "DOM_VK_NUM_LOCK", + "DOM_VK_O", + "DOM_VK_OEM_1", + "DOM_VK_OEM_102", + "DOM_VK_OEM_2", + "DOM_VK_OEM_3", + "DOM_VK_OEM_4", + "DOM_VK_OEM_5", + "DOM_VK_OEM_6", + "DOM_VK_OEM_7", + "DOM_VK_OEM_8", + "DOM_VK_OEM_COMMA", + "DOM_VK_OEM_MINUS", + "DOM_VK_OEM_PERIOD", + "DOM_VK_OEM_PLUS", + "DOM_VK_OPEN_BRACKET", + "DOM_VK_OPEN_CURLY_BRACKET", + "DOM_VK_OPEN_PAREN", + "DOM_VK_P", + "DOM_VK_PA1", + "DOM_VK_PAGEDOWN", + "DOM_VK_PAGEUP", + "DOM_VK_PAGE_DOWN", + "DOM_VK_PAGE_UP", + "DOM_VK_PAUSE", + "DOM_VK_PERCENT", + "DOM_VK_PERIOD", + "DOM_VK_PIPE", + "DOM_VK_PLAY", + "DOM_VK_PLUS", + "DOM_VK_PRINT", + "DOM_VK_PRINTSCREEN", + "DOM_VK_PROCESSKEY", + "DOM_VK_PROPERITES", + "DOM_VK_Q", + "DOM_VK_QUESTION_MARK", + "DOM_VK_QUOTE", + "DOM_VK_R", + "DOM_VK_REDO", + "DOM_VK_RETURN", + "DOM_VK_RIGHT", + "DOM_VK_S", + "DOM_VK_SCROLL_LOCK", + "DOM_VK_SELECT", + "DOM_VK_SEMICOLON", + "DOM_VK_SEPARATOR", + "DOM_VK_SHIFT", + "DOM_VK_SLASH", + "DOM_VK_SLEEP", + "DOM_VK_SPACE", + "DOM_VK_SUBTRACT", + "DOM_VK_T", + "DOM_VK_TAB", + "DOM_VK_TILDE", + "DOM_VK_U", + "DOM_VK_UNDERSCORE", + "DOM_VK_UNDO", + "DOM_VK_UNICODE", + "DOM_VK_UP", + "DOM_VK_V", + "DOM_VK_VOLUME_DOWN", + "DOM_VK_VOLUME_MUTE", + "DOM_VK_VOLUME_UP", + "DOM_VK_W", + "DOM_VK_WIN", + "DOM_VK_WINDOW", + "DOM_VK_WIN_ICO_00", + "DOM_VK_WIN_ICO_CLEAR", + "DOM_VK_WIN_ICO_HELP", + "DOM_VK_WIN_OEM_ATTN", + "DOM_VK_WIN_OEM_AUTO", + "DOM_VK_WIN_OEM_BACKTAB", + "DOM_VK_WIN_OEM_CLEAR", + "DOM_VK_WIN_OEM_COPY", + "DOM_VK_WIN_OEM_CUSEL", + "DOM_VK_WIN_OEM_ENLW", + "DOM_VK_WIN_OEM_FINISH", + "DOM_VK_WIN_OEM_FJ_JISHO", + "DOM_VK_WIN_OEM_FJ_LOYA", + "DOM_VK_WIN_OEM_FJ_MASSHOU", + "DOM_VK_WIN_OEM_FJ_ROYA", + "DOM_VK_WIN_OEM_FJ_TOUROKU", + "DOM_VK_WIN_OEM_JUMP", + "DOM_VK_WIN_OEM_PA1", + "DOM_VK_WIN_OEM_PA2", + "DOM_VK_WIN_OEM_PA3", + "DOM_VK_WIN_OEM_RESET", + "DOM_VK_WIN_OEM_WSCTRL", + "DOM_VK_X", + "DOM_VK_XF86XK_ADD_FAVORITE", + "DOM_VK_XF86XK_APPLICATION_LEFT", + "DOM_VK_XF86XK_APPLICATION_RIGHT", + "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", + "DOM_VK_XF86XK_AUDIO_FORWARD", + "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", + "DOM_VK_XF86XK_AUDIO_MEDIA", + "DOM_VK_XF86XK_AUDIO_MUTE", + "DOM_VK_XF86XK_AUDIO_NEXT", + "DOM_VK_XF86XK_AUDIO_PAUSE", + "DOM_VK_XF86XK_AUDIO_PLAY", + "DOM_VK_XF86XK_AUDIO_PREV", + "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", + "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", + "DOM_VK_XF86XK_AUDIO_RECORD", + "DOM_VK_XF86XK_AUDIO_REPEAT", + "DOM_VK_XF86XK_AUDIO_REWIND", + "DOM_VK_XF86XK_AUDIO_STOP", + "DOM_VK_XF86XK_AWAY", + "DOM_VK_XF86XK_BACK", + "DOM_VK_XF86XK_BACK_FORWARD", + "DOM_VK_XF86XK_BATTERY", + "DOM_VK_XF86XK_BLUE", + "DOM_VK_XF86XK_BLUETOOTH", + "DOM_VK_XF86XK_BOOK", + "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", + "DOM_VK_XF86XK_CALCULATOR", + "DOM_VK_XF86XK_CALENDAR", + "DOM_VK_XF86XK_CD", + "DOM_VK_XF86XK_CLOSE", + "DOM_VK_XF86XK_COMMUNITY", + "DOM_VK_XF86XK_CONTRAST_ADJUST", + "DOM_VK_XF86XK_COPY", + "DOM_VK_XF86XK_CUT", + "DOM_VK_XF86XK_CYCLE_ANGLE", + "DOM_VK_XF86XK_DISPLAY", + "DOM_VK_XF86XK_DOCUMENTS", + "DOM_VK_XF86XK_DOS", + "DOM_VK_XF86XK_EJECT", + "DOM_VK_XF86XK_EXCEL", + "DOM_VK_XF86XK_EXPLORER", + "DOM_VK_XF86XK_FAVORITES", + "DOM_VK_XF86XK_FINANCE", + "DOM_VK_XF86XK_FORWARD", + "DOM_VK_XF86XK_FRAME_BACK", + "DOM_VK_XF86XK_FRAME_FORWARD", + "DOM_VK_XF86XK_GAME", + "DOM_VK_XF86XK_GO", + "DOM_VK_XF86XK_GREEN", + "DOM_VK_XF86XK_HIBERNATE", + "DOM_VK_XF86XK_HISTORY", + "DOM_VK_XF86XK_HOME_PAGE", + "DOM_VK_XF86XK_HOT_LINKS", + "DOM_VK_XF86XK_I_TOUCH", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", + "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", + "DOM_VK_XF86XK_LAUNCH0", + "DOM_VK_XF86XK_LAUNCH1", + "DOM_VK_XF86XK_LAUNCH2", + "DOM_VK_XF86XK_LAUNCH3", + "DOM_VK_XF86XK_LAUNCH4", + "DOM_VK_XF86XK_LAUNCH5", + "DOM_VK_XF86XK_LAUNCH6", + "DOM_VK_XF86XK_LAUNCH7", + "DOM_VK_XF86XK_LAUNCH8", + "DOM_VK_XF86XK_LAUNCH9", + "DOM_VK_XF86XK_LAUNCH_A", + "DOM_VK_XF86XK_LAUNCH_B", + "DOM_VK_XF86XK_LAUNCH_C", + "DOM_VK_XF86XK_LAUNCH_D", + "DOM_VK_XF86XK_LAUNCH_E", + "DOM_VK_XF86XK_LAUNCH_F", + "DOM_VK_XF86XK_LIGHT_BULB", + "DOM_VK_XF86XK_LOG_OFF", + "DOM_VK_XF86XK_MAIL", + "DOM_VK_XF86XK_MAIL_FORWARD", + "DOM_VK_XF86XK_MARKET", + "DOM_VK_XF86XK_MEETING", + "DOM_VK_XF86XK_MEMO", + "DOM_VK_XF86XK_MENU_KB", + "DOM_VK_XF86XK_MENU_PB", + "DOM_VK_XF86XK_MESSENGER", + "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", + "DOM_VK_XF86XK_MUSIC", + "DOM_VK_XF86XK_MY_COMPUTER", + "DOM_VK_XF86XK_MY_SITES", + "DOM_VK_XF86XK_NEW", + "DOM_VK_XF86XK_NEWS", + "DOM_VK_XF86XK_OFFICE_HOME", + "DOM_VK_XF86XK_OPEN", + "DOM_VK_XF86XK_OPEN_URL", + "DOM_VK_XF86XK_OPTION", + "DOM_VK_XF86XK_PASTE", + "DOM_VK_XF86XK_PHONE", + "DOM_VK_XF86XK_PICTURES", + "DOM_VK_XF86XK_POWER_DOWN", + "DOM_VK_XF86XK_POWER_OFF", + "DOM_VK_XF86XK_RED", + "DOM_VK_XF86XK_REFRESH", + "DOM_VK_XF86XK_RELOAD", + "DOM_VK_XF86XK_REPLY", + "DOM_VK_XF86XK_ROCKER_DOWN", + "DOM_VK_XF86XK_ROCKER_ENTER", + "DOM_VK_XF86XK_ROCKER_UP", + "DOM_VK_XF86XK_ROTATE_WINDOWS", + "DOM_VK_XF86XK_ROTATION_KB", + "DOM_VK_XF86XK_ROTATION_PB", + "DOM_VK_XF86XK_SAVE", + "DOM_VK_XF86XK_SCREEN_SAVER", + "DOM_VK_XF86XK_SCROLL_CLICK", + "DOM_VK_XF86XK_SCROLL_DOWN", + "DOM_VK_XF86XK_SCROLL_UP", + "DOM_VK_XF86XK_SEARCH", + "DOM_VK_XF86XK_SEND", + "DOM_VK_XF86XK_SHOP", + "DOM_VK_XF86XK_SPELL", + "DOM_VK_XF86XK_SPLIT_SCREEN", + "DOM_VK_XF86XK_STANDBY", + "DOM_VK_XF86XK_START", + "DOM_VK_XF86XK_STOP", + "DOM_VK_XF86XK_SUBTITLE", + "DOM_VK_XF86XK_SUPPORT", + "DOM_VK_XF86XK_SUSPEND", + "DOM_VK_XF86XK_TASK_PANE", + "DOM_VK_XF86XK_TERMINAL", + "DOM_VK_XF86XK_TIME", + "DOM_VK_XF86XK_TOOLS", + "DOM_VK_XF86XK_TOP_MENU", + "DOM_VK_XF86XK_TO_DO_LIST", + "DOM_VK_XF86XK_TRAVEL", + "DOM_VK_XF86XK_USER1KB", + "DOM_VK_XF86XK_USER2KB", + "DOM_VK_XF86XK_USER_PB", + "DOM_VK_XF86XK_UWB", + "DOM_VK_XF86XK_VENDOR_HOME", + "DOM_VK_XF86XK_VIDEO", + "DOM_VK_XF86XK_VIEW", + "DOM_VK_XF86XK_WAKE_UP", + "DOM_VK_XF86XK_WEB_CAM", + "DOM_VK_XF86XK_WHEEL_BUTTON", + "DOM_VK_XF86XK_WLAN", + "DOM_VK_XF86XK_WORD", + "DOM_VK_XF86XK_WWW", + "DOM_VK_XF86XK_XFER", + "DOM_VK_XF86XK_YELLOW", + "DOM_VK_XF86XK_ZOOM_IN", + "DOM_VK_XF86XK_ZOOM_OUT", + "DOM_VK_Y", + "DOM_VK_Z", + "DOM_VK_ZOOM", + "DONE", + "DONT_CARE", + "DOWNLOADING", + "DRAGDROP", + "DST_ALPHA", + "DST_COLOR", + "DYNAMIC_DRAW", + "DataChannel", + "DataTransfer", + "DataTransferItem", + "DataTransferItemList", + "DataView", + "Date", + "DateTimeFormat", + "DelayNode", + "DesktopNotification", + "DesktopNotificationCenter", + "DeviceLightEvent", + "DeviceMotionEvent", + "DeviceOrientationEvent", + "DeviceProximityEvent", + "DeviceStorage", + "DeviceStorageChangeEvent", + "Document", + "DocumentFragment", + "DocumentType", + "DragEvent", + "DynamicsCompressorNode", + "E", + "ELEMENT_ARRAY_BUFFER", + "ELEMENT_ARRAY_BUFFER_BINDING", + "ELEMENT_NODE", + "EMPTY", + "ENCODING_ERR", + "ENDED", + "END_TO_END", + "END_TO_START", + "ENTITY_NODE", + "ENTITY_REFERENCE_NODE", + "EPSILON", + "EQUAL", + "EQUALPOWER", + "ERROR", + "EXPONENTIAL_DISTANCE", + "Element", + "ElementQuery", + "Entity", + "EntityReference", + "Error", + "ErrorEvent", + "EvalError", + "Event", + "EventException", + "EventSource", + "EventTarget", + "External", + "FASTEST", + "FIDOSDK", + "FILTER_ACCEPT", + "FILTER_INTERRUPT", + "FILTER_REJECT", + "FILTER_SKIP", + "FINISHED_STATE", + "FIRST_ORDERED_NODE_TYPE", + "FLOAT", + "FLOAT_MAT2", + "FLOAT_MAT3", + "FLOAT_MAT4", + "FLOAT_VEC2", + "FLOAT_VEC3", + "FLOAT_VEC4", + "FOCUS", + "FONT_FACE_RULE", + "FONT_FEATURE_VALUES_RULE", + "FRAGMENT_SHADER", + "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", + "FRAMEBUFFER", + "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", + "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", + "FRAMEBUFFER_BINDING", + "FRAMEBUFFER_COMPLETE", + "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + "FRAMEBUFFER_UNSUPPORTED", + "FRONT", + "FRONT_AND_BACK", + "FRONT_FACE", + "FUNC_ADD", + "FUNC_REVERSE_SUBTRACT", + "FUNC_SUBTRACT", + "Feed", + "FeedEntry", + "File", + "FileError", + "FileList", + "FileReader", + "FindInPage", + "Float32Array", + "Float64Array", + "FocusEvent", + "FontFace", + "FormData", + "Function", + "GENERATE_MIPMAP_HINT", + "GEQUAL", + "GREATER", + "GREEN_BITS", + "GainNode", + "Gamepad", + "GamepadButton", + "GamepadEvent", + "GestureEvent", + "HAVE_CURRENT_DATA", + "HAVE_ENOUGH_DATA", + "HAVE_FUTURE_DATA", + "HAVE_METADATA", + "HAVE_NOTHING", + "HEADERS_RECEIVED", + "HIDDEN", + "HIERARCHY_REQUEST_ERR", + "HIGHPASS", + "HIGHSHELF", + "HIGH_FLOAT", + "HIGH_INT", + "HORIZONTAL", + "HORIZONTAL_AXIS", + "HRTF", + "HTMLAllCollection", + "HTMLAnchorElement", + "HTMLAppletElement", + "HTMLAreaElement", + "HTMLAudioElement", + "HTMLBRElement", + "HTMLBaseElement", + "HTMLBaseFontElement", + "HTMLBlockquoteElement", + "HTMLBodyElement", + "HTMLButtonElement", + "HTMLCanvasElement", + "HTMLCollection", + "HTMLCommandElement", + "HTMLContentElement", + "HTMLDListElement", + "HTMLDataElement", + "HTMLDataListElement", + "HTMLDetailsElement", + "HTMLDialogElement", + "HTMLDirectoryElement", + "HTMLDivElement", + "HTMLDocument", + "HTMLElement", + "HTMLEmbedElement", + "HTMLFieldSetElement", + "HTMLFontElement", + "HTMLFormControlsCollection", + "HTMLFormElement", + "HTMLFrameElement", + "HTMLFrameSetElement", + "HTMLHRElement", + "HTMLHeadElement", + "HTMLHeadingElement", + "HTMLHtmlElement", + "HTMLIFrameElement", + "HTMLImageElement", + "HTMLInputElement", + "HTMLIsIndexElement", + "HTMLKeygenElement", + "HTMLLIElement", + "HTMLLabelElement", + "HTMLLegendElement", + "HTMLLinkElement", + "HTMLMapElement", + "HTMLMarqueeElement", + "HTMLMediaElement", + "HTMLMenuElement", + "HTMLMenuItemElement", + "HTMLMetaElement", + "HTMLMeterElement", + "HTMLModElement", + "HTMLOListElement", + "HTMLObjectElement", + "HTMLOptGroupElement", + "HTMLOptionElement", + "HTMLOptionsCollection", + "HTMLOutputElement", + "HTMLParagraphElement", + "HTMLParamElement", + "HTMLPictureElement", + "HTMLPreElement", + "HTMLProgressElement", + "HTMLPropertiesCollection", + "HTMLQuoteElement", + "HTMLScriptElement", + "HTMLSelectElement", + "HTMLShadowElement", + "HTMLSourceElement", + "HTMLSpanElement", + "HTMLStyleElement", + "HTMLTableCaptionElement", + "HTMLTableCellElement", + "HTMLTableColElement", + "HTMLTableElement", + "HTMLTableRowElement", + "HTMLTableSectionElement", + "HTMLTemplateElement", + "HTMLTextAreaElement", + "HTMLTimeElement", + "HTMLTitleElement", + "HTMLTrackElement", + "HTMLUListElement", + "HTMLUnknownElement", + "HTMLVideoElement", + "HashChangeEvent", + "Headers", + "History", + "ICE_CHECKING", + "ICE_CLOSED", + "ICE_COMPLETED", + "ICE_CONNECTED", + "ICE_FAILED", + "ICE_GATHERING", + "ICE_WAITING", + "IDBCursor", + "IDBCursorWithValue", + "IDBDatabase", + "IDBDatabaseException", + "IDBFactory", + "IDBFileHandle", + "IDBFileRequest", + "IDBIndex", + "IDBKeyRange", + "IDBMutableFile", + "IDBObjectStore", + "IDBOpenDBRequest", + "IDBRequest", + "IDBTransaction", + "IDBVersionChangeEvent", + "IDLE", + "IMPLEMENTATION_COLOR_READ_FORMAT", + "IMPLEMENTATION_COLOR_READ_TYPE", + "IMPORT_RULE", + "INCR", + "INCR_WRAP", + "INDEX_SIZE_ERR", + "INT", + "INT_VEC2", + "INT_VEC3", + "INT_VEC4", + "INUSE_ATTRIBUTE_ERR", + "INVALID_ACCESS_ERR", + "INVALID_CHARACTER_ERR", + "INVALID_ENUM", + "INVALID_EXPRESSION_ERR", + "INVALID_FRAMEBUFFER_OPERATION", + "INVALID_MODIFICATION_ERR", + "INVALID_NODE_TYPE_ERR", + "INVALID_OPERATION", + "INVALID_STATE_ERR", + "INVALID_VALUE", + "INVERSE_DISTANCE", + "INVERT", + "IceCandidate", + "Image", + "ImageBitmap", + "ImageData", + "Infinity", + "InputEvent", + "InputMethodContext", + "InstallTrigger", + "Int16Array", + "Int32Array", + "Int8Array", + "Intent", + "InternalError", + "Intl", + "IsSearchProviderInstalled", + "Iterator", + "JSON", + "KEEP", + "KEYDOWN", + "KEYFRAMES_RULE", + "KEYFRAME_RULE", + "KEYPRESS", + "KEYUP", + "KeyEvent", + "KeyboardEvent", + "LENGTHADJUST_SPACING", + "LENGTHADJUST_SPACINGANDGLYPHS", + "LENGTHADJUST_UNKNOWN", + "LEQUAL", + "LESS", + "LINEAR", + "LINEAR_DISTANCE", + "LINEAR_MIPMAP_LINEAR", + "LINEAR_MIPMAP_NEAREST", + "LINES", + "LINE_LOOP", + "LINE_STRIP", + "LINE_WIDTH", + "LINK_STATUS", + "LIVE", + "LN10", + "LN2", + "LOADED", + "LOADING", + "LOG10E", + "LOG2E", + "LOWPASS", + "LOWSHELF", + "LOW_FLOAT", + "LOW_INT", + "LSException", + "LSParserFilter", + "LUMINANCE", + "LUMINANCE_ALPHA", + "LocalMediaStream", + "Location", + "MAX_COMBINED_TEXTURE_IMAGE_UNITS", + "MAX_CUBE_MAP_TEXTURE_SIZE", + "MAX_FRAGMENT_UNIFORM_VECTORS", + "MAX_RENDERBUFFER_SIZE", + "MAX_SAFE_INTEGER", + "MAX_TEXTURE_IMAGE_UNITS", + "MAX_TEXTURE_MAX_ANISOTROPY_EXT", + "MAX_TEXTURE_SIZE", + "MAX_VALUE", + "MAX_VARYING_VECTORS", + "MAX_VERTEX_ATTRIBS", + "MAX_VERTEX_TEXTURE_IMAGE_UNITS", + "MAX_VERTEX_UNIFORM_VECTORS", + "MAX_VIEWPORT_DIMS", + "MEDIA_ERR_ABORTED", + "MEDIA_ERR_DECODE", + "MEDIA_ERR_ENCRYPTED", + "MEDIA_ERR_NETWORK", + "MEDIA_ERR_SRC_NOT_SUPPORTED", + "MEDIA_KEYERR_CLIENT", + "MEDIA_KEYERR_DOMAIN", + "MEDIA_KEYERR_HARDWARECHANGE", + "MEDIA_KEYERR_OUTPUT", + "MEDIA_KEYERR_SERVICE", + "MEDIA_KEYERR_UNKNOWN", + "MEDIA_RULE", + "MEDIUM_FLOAT", + "MEDIUM_INT", + "META_MASK", + "MIN_SAFE_INTEGER", + "MIN_VALUE", + "MIRRORED_REPEAT", + "MODE_ASYNCHRONOUS", + "MODE_SYNCHRONOUS", + "MODIFICATION", + "MOUSEDOWN", + "MOUSEDRAG", + "MOUSEMOVE", + "MOUSEOUT", + "MOUSEOVER", + "MOUSEUP", + "MOZ_KEYFRAMES_RULE", + "MOZ_KEYFRAME_RULE", + "MOZ_SOURCE_CURSOR", + "MOZ_SOURCE_ERASER", + "MOZ_SOURCE_KEYBOARD", + "MOZ_SOURCE_MOUSE", + "MOZ_SOURCE_PEN", + "MOZ_SOURCE_TOUCH", + "MOZ_SOURCE_UNKNOWN", + "MSGESTURE_FLAG_BEGIN", + "MSGESTURE_FLAG_CANCEL", + "MSGESTURE_FLAG_END", + "MSGESTURE_FLAG_INERTIA", + "MSGESTURE_FLAG_NONE", + "MSPOINTER_TYPE_MOUSE", + "MSPOINTER_TYPE_PEN", + "MSPOINTER_TYPE_TOUCH", + "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", + "MS_ASYNC_CALLBACK_STATUS_CANCEL", + "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", + "MS_ASYNC_CALLBACK_STATUS_ERROR", + "MS_ASYNC_CALLBACK_STATUS_JOIN", + "MS_ASYNC_OP_STATUS_CANCELED", + "MS_ASYNC_OP_STATUS_ERROR", + "MS_ASYNC_OP_STATUS_SUCCESS", + "MS_MANIPULATION_STATE_ACTIVE", + "MS_MANIPULATION_STATE_CANCELLED", + "MS_MANIPULATION_STATE_COMMITTED", + "MS_MANIPULATION_STATE_DRAGGING", + "MS_MANIPULATION_STATE_INERTIA", + "MS_MANIPULATION_STATE_PRESELECT", + "MS_MANIPULATION_STATE_SELECTING", + "MS_MANIPULATION_STATE_STOPPED", + "MS_MEDIA_ERR_ENCRYPTED", + "MS_MEDIA_KEYERR_CLIENT", + "MS_MEDIA_KEYERR_DOMAIN", + "MS_MEDIA_KEYERR_HARDWARECHANGE", + "MS_MEDIA_KEYERR_OUTPUT", + "MS_MEDIA_KEYERR_SERVICE", + "MS_MEDIA_KEYERR_UNKNOWN", + "Map", + "Math", + "MediaController", + "MediaDevices", + "MediaElementAudioSourceNode", + "MediaEncryptedEvent", + "MediaError", + "MediaKeyError", + "MediaKeyEvent", + "MediaKeyMessageEvent", + "MediaKeyNeededEvent", + "MediaKeySession", + "MediaKeyStatusMap", + "MediaKeySystemAccess", + "MediaKeys", + "MediaList", + "MediaQueryList", + "MediaQueryListEvent", + "MediaRecorder", + "MediaSource", + "MediaStream", + "MediaStreamAudioDestinationNode", + "MediaStreamAudioSourceNode", + "MediaStreamEvent", + "MediaStreamTrack", + "MediaStreamTrackEvent", + "MessageChannel", + "MessageEvent", + "MessagePort", + "Methods", + "MimeType", + "MimeTypeArray", + "MouseEvent", + "MouseScrollEvent", + "MozAnimation", + "MozAnimationDelay", + "MozAnimationDirection", + "MozAnimationDuration", + "MozAnimationFillMode", + "MozAnimationIterationCount", + "MozAnimationName", + "MozAnimationPlayState", + "MozAnimationTimingFunction", + "MozAppearance", + "MozBackfaceVisibility", + "MozBinding", + "MozBorderBottomColors", + "MozBorderEnd", + "MozBorderEndColor", + "MozBorderEndStyle", + "MozBorderEndWidth", + "MozBorderImage", + "MozBorderLeftColors", + "MozBorderRightColors", + "MozBorderStart", + "MozBorderStartColor", + "MozBorderStartStyle", + "MozBorderStartWidth", + "MozBorderTopColors", + "MozBoxAlign", + "MozBoxDirection", + "MozBoxFlex", + "MozBoxOrdinalGroup", + "MozBoxOrient", + "MozBoxPack", + "MozBoxSizing", + "MozCSSKeyframeRule", + "MozCSSKeyframesRule", + "MozColumnCount", + "MozColumnFill", + "MozColumnGap", + "MozColumnRule", + "MozColumnRuleColor", + "MozColumnRuleStyle", + "MozColumnRuleWidth", + "MozColumnWidth", + "MozColumns", + "MozContactChangeEvent", + "MozFloatEdge", + "MozFontFeatureSettings", + "MozFontLanguageOverride", + "MozForceBrokenImageIcon", + "MozHyphens", + "MozImageRegion", + "MozMarginEnd", + "MozMarginStart", + "MozMmsEvent", + "MozMmsMessage", + "MozMobileMessageThread", + "MozOSXFontSmoothing", + "MozOrient", + "MozOutlineRadius", + "MozOutlineRadiusBottomleft", + "MozOutlineRadiusBottomright", + "MozOutlineRadiusTopleft", + "MozOutlineRadiusTopright", + "MozPaddingEnd", + "MozPaddingStart", + "MozPerspective", + "MozPerspectiveOrigin", + "MozPowerManager", + "MozSettingsEvent", + "MozSmsEvent", + "MozSmsMessage", + "MozStackSizing", + "MozTabSize", + "MozTextAlignLast", + "MozTextDecorationColor", + "MozTextDecorationLine", + "MozTextDecorationStyle", + "MozTextSizeAdjust", + "MozTransform", + "MozTransformOrigin", + "MozTransformStyle", + "MozTransition", + "MozTransitionDelay", + "MozTransitionDuration", + "MozTransitionProperty", + "MozTransitionTimingFunction", + "MozUserFocus", + "MozUserInput", + "MozUserModify", + "MozUserSelect", + "MozWindowDragging", + "MozWindowShadow", + "MutationEvent", + "MutationObserver", + "MutationRecord", + "NAMESPACE_ERR", + "NAMESPACE_RULE", + "NEAREST", + "NEAREST_MIPMAP_LINEAR", + "NEAREST_MIPMAP_NEAREST", + "NEGATIVE_INFINITY", + "NETWORK_EMPTY", + "NETWORK_ERR", + "NETWORK_IDLE", + "NETWORK_LOADED", + "NETWORK_LOADING", + "NETWORK_NO_SOURCE", + "NEVER", + "NEW", + "NEXT", + "NEXT_NO_DUPLICATE", + "NICEST", + "NODE_AFTER", + "NODE_BEFORE", + "NODE_BEFORE_AND_AFTER", + "NODE_INSIDE", + "NONE", + "NON_TRANSIENT_ERR", + "NOTATION_NODE", + "NOTCH", + "NOTEQUAL", + "NOT_ALLOWED_ERR", + "NOT_FOUND_ERR", + "NOT_READABLE_ERR", + "NOT_SUPPORTED_ERR", + "NO_DATA_ALLOWED_ERR", + "NO_ERR", + "NO_ERROR", + "NO_MODIFICATION_ALLOWED_ERR", + "NUMBER_TYPE", + "NUM_COMPRESSED_TEXTURE_FORMATS", + "NaN", + "NamedNodeMap", + "Navigator", + "NearbyLinks", + "NetworkInformation", + "Node", + "NodeFilter", + "NodeIterator", + "NodeList", + "Notation", + "Notification", + "NotifyPaintEvent", + "Number", + "NumberFormat", + "OBSOLETE", + "ONE", + "ONE_MINUS_CONSTANT_ALPHA", + "ONE_MINUS_CONSTANT_COLOR", + "ONE_MINUS_DST_ALPHA", + "ONE_MINUS_DST_COLOR", + "ONE_MINUS_SRC_ALPHA", + "ONE_MINUS_SRC_COLOR", + "OPEN", + "OPENED", + "OPENING", + "ORDERED_NODE_ITERATOR_TYPE", + "ORDERED_NODE_SNAPSHOT_TYPE", + "OUT_OF_MEMORY", + "Object", + "OfflineAudioCompletionEvent", + "OfflineAudioContext", + "OfflineResourceList", + "Option", + "OscillatorNode", + "OverflowEvent", + "PACK_ALIGNMENT", + "PAGE_RULE", + "PARSE_ERR", + "PATHSEG_ARC_ABS", + "PATHSEG_ARC_REL", + "PATHSEG_CLOSEPATH", + "PATHSEG_CURVETO_CUBIC_ABS", + "PATHSEG_CURVETO_CUBIC_REL", + "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", + "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", + "PATHSEG_CURVETO_QUADRATIC_ABS", + "PATHSEG_CURVETO_QUADRATIC_REL", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", + "PATHSEG_LINETO_ABS", + "PATHSEG_LINETO_HORIZONTAL_ABS", + "PATHSEG_LINETO_HORIZONTAL_REL", + "PATHSEG_LINETO_REL", + "PATHSEG_LINETO_VERTICAL_ABS", + "PATHSEG_LINETO_VERTICAL_REL", + "PATHSEG_MOVETO_ABS", + "PATHSEG_MOVETO_REL", + "PATHSEG_UNKNOWN", + "PATH_EXISTS_ERR", + "PEAKING", + "PERMISSION_DENIED", + "PERSISTENT", + "PI", + "PLAYING_STATE", + "POINTS", + "POLYGON_OFFSET_FACTOR", + "POLYGON_OFFSET_FILL", + "POLYGON_OFFSET_UNITS", + "POSITION_UNAVAILABLE", + "POSITIVE_INFINITY", + "PREV", + "PREV_NO_DUPLICATE", + "PROCESSING_INSTRUCTION_NODE", + "PageChangeEvent", + "PageTransitionEvent", + "PaintRequest", + "PaintRequestList", + "PannerNode", + "Path2D", + "Performance", + "PerformanceEntry", + "PerformanceMark", + "PerformanceMeasure", + "PerformanceNavigation", + "PerformanceResourceTiming", + "PerformanceTiming", + "PeriodicWave", + "Plugin", + "PluginArray", + "PopStateEvent", + "PopupBlockedEvent", + "ProcessingInstruction", + "ProgressEvent", + "Promise", + "PropertyNodeList", + "Proxy", + "PushManager", + "PushSubscription", + "Q", + "QUOTA_ERR", + "QUOTA_EXCEEDED_ERR", + "QueryInterface", + "READ_ONLY", + "READ_ONLY_ERR", + "READ_WRITE", + "RED_BITS", + "REMOVAL", + "RENDERBUFFER", + "RENDERBUFFER_ALPHA_SIZE", + "RENDERBUFFER_BINDING", + "RENDERBUFFER_BLUE_SIZE", + "RENDERBUFFER_DEPTH_SIZE", + "RENDERBUFFER_GREEN_SIZE", + "RENDERBUFFER_HEIGHT", + "RENDERBUFFER_INTERNAL_FORMAT", + "RENDERBUFFER_RED_SIZE", + "RENDERBUFFER_STENCIL_SIZE", + "RENDERBUFFER_WIDTH", + "RENDERER", + "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", + "RENDERING_INTENT_AUTO", + "RENDERING_INTENT_PERCEPTUAL", + "RENDERING_INTENT_RELATIVE_COLORIMETRIC", + "RENDERING_INTENT_SATURATION", + "RENDERING_INTENT_UNKNOWN", + "REPEAT", + "REPLACE", + "RGB", + "RGB565", + "RGB5_A1", + "RGBA", + "RGBA4", + "RGBColor", + "ROTATION_CLOCKWISE", + "ROTATION_COUNTERCLOCKWISE", + "RTCDataChannelEvent", + "RTCIceCandidate", + "RTCPeerConnectionIceEvent", + "RTCRtpReceiver", + "RTCRtpSender", + "RTCSessionDescription", + "RTCStatsReport", + "RadioNodeList", + "Range", + "RangeError", + "RangeException", + "RecordErrorEvent", + "Rect", + "ReferenceError", + "RegExp", + "Request", + "Response", + "SAMPLER_2D", + "SAMPLER_CUBE", + "SAMPLES", + "SAMPLE_ALPHA_TO_COVERAGE", + "SAMPLE_BUFFERS", + "SAMPLE_COVERAGE", + "SAMPLE_COVERAGE_INVERT", + "SAMPLE_COVERAGE_VALUE", + "SAWTOOTH", + "SCHEDULED_STATE", + "SCISSOR_BOX", + "SCISSOR_TEST", + "SCROLL_PAGE_DOWN", + "SCROLL_PAGE_UP", + "SDP_ANSWER", + "SDP_OFFER", + "SDP_PRANSWER", + "SECURITY_ERR", + "SELECT", + "SERIALIZE_ERR", + "SEVERITY_ERROR", + "SEVERITY_FATAL_ERROR", + "SEVERITY_WARNING", + "SHADER_COMPILER", + "SHADER_TYPE", + "SHADING_LANGUAGE_VERSION", + "SHIFT_MASK", + "SHORT", + "SHOWING", + "SHOW_ALL", + "SHOW_ATTRIBUTE", + "SHOW_CDATA_SECTION", + "SHOW_COMMENT", + "SHOW_DOCUMENT", + "SHOW_DOCUMENT_FRAGMENT", + "SHOW_DOCUMENT_TYPE", + "SHOW_ELEMENT", + "SHOW_ENTITY", + "SHOW_ENTITY_REFERENCE", + "SHOW_NOTATION", + "SHOW_PROCESSING_INSTRUCTION", + "SHOW_TEXT", + "SINE", + "SOUNDFIELD", + "SQLException", + "SQRT1_2", + "SQRT2", + "SQUARE", + "SRC_ALPHA", + "SRC_ALPHA_SATURATE", + "SRC_COLOR", + "START_TO_END", + "START_TO_START", + "STATIC_DRAW", + "STENCIL_ATTACHMENT", + "STENCIL_BACK_FAIL", + "STENCIL_BACK_FUNC", + "STENCIL_BACK_PASS_DEPTH_FAIL", + "STENCIL_BACK_PASS_DEPTH_PASS", + "STENCIL_BACK_REF", + "STENCIL_BACK_VALUE_MASK", + "STENCIL_BACK_WRITEMASK", + "STENCIL_BITS", + "STENCIL_BUFFER_BIT", + "STENCIL_CLEAR_VALUE", + "STENCIL_FAIL", + "STENCIL_FUNC", + "STENCIL_INDEX", + "STENCIL_INDEX8", + "STENCIL_PASS_DEPTH_FAIL", + "STENCIL_PASS_DEPTH_PASS", + "STENCIL_REF", + "STENCIL_TEST", + "STENCIL_VALUE_MASK", + "STENCIL_WRITEMASK", + "STREAM_DRAW", + "STRING_TYPE", + "STYLE_RULE", + "SUBPIXEL_BITS", + "SUPPORTS_RULE", + "SVGAElement", + "SVGAltGlyphDefElement", + "SVGAltGlyphElement", + "SVGAltGlyphItemElement", + "SVGAngle", + "SVGAnimateColorElement", + "SVGAnimateElement", + "SVGAnimateMotionElement", + "SVGAnimateTransformElement", + "SVGAnimatedAngle", + "SVGAnimatedBoolean", + "SVGAnimatedEnumeration", + "SVGAnimatedInteger", + "SVGAnimatedLength", + "SVGAnimatedLengthList", + "SVGAnimatedNumber", + "SVGAnimatedNumberList", + "SVGAnimatedPreserveAspectRatio", + "SVGAnimatedRect", + "SVGAnimatedString", + "SVGAnimatedTransformList", + "SVGAnimationElement", + "SVGCircleElement", + "SVGClipPathElement", + "SVGColor", + "SVGComponentTransferFunctionElement", + "SVGCursorElement", + "SVGDefsElement", + "SVGDescElement", + "SVGDiscardElement", + "SVGDocument", + "SVGElement", + "SVGElementInstance", + "SVGElementInstanceList", + "SVGEllipseElement", + "SVGException", + "SVGFEBlendElement", + "SVGFEColorMatrixElement", + "SVGFEComponentTransferElement", + "SVGFECompositeElement", + "SVGFEConvolveMatrixElement", + "SVGFEDiffuseLightingElement", + "SVGFEDisplacementMapElement", + "SVGFEDistantLightElement", + "SVGFEDropShadowElement", + "SVGFEFloodElement", + "SVGFEFuncAElement", + "SVGFEFuncBElement", + "SVGFEFuncGElement", + "SVGFEFuncRElement", + "SVGFEGaussianBlurElement", + "SVGFEImageElement", + "SVGFEMergeElement", + "SVGFEMergeNodeElement", + "SVGFEMorphologyElement", + "SVGFEOffsetElement", + "SVGFEPointLightElement", + "SVGFESpecularLightingElement", + "SVGFESpotLightElement", + "SVGFETileElement", + "SVGFETurbulenceElement", + "SVGFilterElement", + "SVGFontElement", + "SVGFontFaceElement", + "SVGFontFaceFormatElement", + "SVGFontFaceNameElement", + "SVGFontFaceSrcElement", + "SVGFontFaceUriElement", + "SVGForeignObjectElement", + "SVGGElement", + "SVGGeometryElement", + "SVGGlyphElement", + "SVGGlyphRefElement", + "SVGGradientElement", + "SVGGraphicsElement", + "SVGHKernElement", + "SVGImageElement", + "SVGLength", + "SVGLengthList", + "SVGLineElement", + "SVGLinearGradientElement", + "SVGMPathElement", + "SVGMarkerElement", + "SVGMaskElement", + "SVGMatrix", + "SVGMetadataElement", + "SVGMissingGlyphElement", + "SVGNumber", + "SVGNumberList", + "SVGPaint", + "SVGPathElement", + "SVGPathSeg", + "SVGPathSegArcAbs", + "SVGPathSegArcRel", + "SVGPathSegClosePath", + "SVGPathSegCurvetoCubicAbs", + "SVGPathSegCurvetoCubicRel", + "SVGPathSegCurvetoCubicSmoothAbs", + "SVGPathSegCurvetoCubicSmoothRel", + "SVGPathSegCurvetoQuadraticAbs", + "SVGPathSegCurvetoQuadraticRel", + "SVGPathSegCurvetoQuadraticSmoothAbs", + "SVGPathSegCurvetoQuadraticSmoothRel", + "SVGPathSegLinetoAbs", + "SVGPathSegLinetoHorizontalAbs", + "SVGPathSegLinetoHorizontalRel", + "SVGPathSegLinetoRel", + "SVGPathSegLinetoVerticalAbs", + "SVGPathSegLinetoVerticalRel", + "SVGPathSegList", + "SVGPathSegMovetoAbs", + "SVGPathSegMovetoRel", + "SVGPatternElement", + "SVGPoint", + "SVGPointList", + "SVGPolygonElement", + "SVGPolylineElement", + "SVGPreserveAspectRatio", + "SVGRadialGradientElement", + "SVGRect", + "SVGRectElement", + "SVGRenderingIntent", + "SVGSVGElement", + "SVGScriptElement", + "SVGSetElement", + "SVGStopElement", + "SVGStringList", + "SVGStyleElement", + "SVGSwitchElement", + "SVGSymbolElement", + "SVGTRefElement", + "SVGTSpanElement", + "SVGTextContentElement", + "SVGTextElement", + "SVGTextPathElement", + "SVGTextPositioningElement", + "SVGTitleElement", + "SVGTransform", + "SVGTransformList", + "SVGUnitTypes", + "SVGUseElement", + "SVGVKernElement", + "SVGViewElement", + "SVGViewSpec", + "SVGZoomAndPan", + "SVGZoomEvent", + "SVG_ANGLETYPE_DEG", + "SVG_ANGLETYPE_GRAD", + "SVG_ANGLETYPE_RAD", + "SVG_ANGLETYPE_UNKNOWN", + "SVG_ANGLETYPE_UNSPECIFIED", + "SVG_CHANNEL_A", + "SVG_CHANNEL_B", + "SVG_CHANNEL_G", + "SVG_CHANNEL_R", + "SVG_CHANNEL_UNKNOWN", + "SVG_COLORTYPE_CURRENTCOLOR", + "SVG_COLORTYPE_RGBCOLOR", + "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", + "SVG_COLORTYPE_UNKNOWN", + "SVG_EDGEMODE_DUPLICATE", + "SVG_EDGEMODE_NONE", + "SVG_EDGEMODE_UNKNOWN", + "SVG_EDGEMODE_WRAP", + "SVG_FEBLEND_MODE_COLOR", + "SVG_FEBLEND_MODE_COLOR_BURN", + "SVG_FEBLEND_MODE_COLOR_DODGE", + "SVG_FEBLEND_MODE_DARKEN", + "SVG_FEBLEND_MODE_DIFFERENCE", + "SVG_FEBLEND_MODE_EXCLUSION", + "SVG_FEBLEND_MODE_HARD_LIGHT", + "SVG_FEBLEND_MODE_HUE", + "SVG_FEBLEND_MODE_LIGHTEN", + "SVG_FEBLEND_MODE_LUMINOSITY", + "SVG_FEBLEND_MODE_MULTIPLY", + "SVG_FEBLEND_MODE_NORMAL", + "SVG_FEBLEND_MODE_OVERLAY", + "SVG_FEBLEND_MODE_SATURATION", + "SVG_FEBLEND_MODE_SCREEN", + "SVG_FEBLEND_MODE_SOFT_LIGHT", + "SVG_FEBLEND_MODE_UNKNOWN", + "SVG_FECOLORMATRIX_TYPE_HUEROTATE", + "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", + "SVG_FECOLORMATRIX_TYPE_MATRIX", + "SVG_FECOLORMATRIX_TYPE_SATURATE", + "SVG_FECOLORMATRIX_TYPE_UNKNOWN", + "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", + "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", + "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", + "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", + "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", + "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", + "SVG_FECOMPOSITE_OPERATOR_ATOP", + "SVG_FECOMPOSITE_OPERATOR_IN", + "SVG_FECOMPOSITE_OPERATOR_OUT", + "SVG_FECOMPOSITE_OPERATOR_OVER", + "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_XOR", + "SVG_INVALID_VALUE_ERR", + "SVG_LENGTHTYPE_CM", + "SVG_LENGTHTYPE_EMS", + "SVG_LENGTHTYPE_EXS", + "SVG_LENGTHTYPE_IN", + "SVG_LENGTHTYPE_MM", + "SVG_LENGTHTYPE_NUMBER", + "SVG_LENGTHTYPE_PC", + "SVG_LENGTHTYPE_PERCENTAGE", + "SVG_LENGTHTYPE_PT", + "SVG_LENGTHTYPE_PX", + "SVG_LENGTHTYPE_UNKNOWN", + "SVG_MARKERUNITS_STROKEWIDTH", + "SVG_MARKERUNITS_UNKNOWN", + "SVG_MARKERUNITS_USERSPACEONUSE", + "SVG_MARKER_ORIENT_ANGLE", + "SVG_MARKER_ORIENT_AUTO", + "SVG_MARKER_ORIENT_UNKNOWN", + "SVG_MASKTYPE_ALPHA", + "SVG_MASKTYPE_LUMINANCE", + "SVG_MATRIX_NOT_INVERTABLE", + "SVG_MEETORSLICE_MEET", + "SVG_MEETORSLICE_SLICE", + "SVG_MEETORSLICE_UNKNOWN", + "SVG_MORPHOLOGY_OPERATOR_DILATE", + "SVG_MORPHOLOGY_OPERATOR_ERODE", + "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", + "SVG_PAINTTYPE_CURRENTCOLOR", + "SVG_PAINTTYPE_NONE", + "SVG_PAINTTYPE_RGBCOLOR", + "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", + "SVG_PAINTTYPE_UNKNOWN", + "SVG_PAINTTYPE_URI", + "SVG_PAINTTYPE_URI_CURRENTCOLOR", + "SVG_PAINTTYPE_URI_NONE", + "SVG_PAINTTYPE_URI_RGBCOLOR", + "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", + "SVG_PRESERVEASPECTRATIO_NONE", + "SVG_PRESERVEASPECTRATIO_UNKNOWN", + "SVG_PRESERVEASPECTRATIO_XMAXYMAX", + "SVG_PRESERVEASPECTRATIO_XMAXYMID", + "SVG_PRESERVEASPECTRATIO_XMAXYMIN", + "SVG_PRESERVEASPECTRATIO_XMIDYMAX", + "SVG_PRESERVEASPECTRATIO_XMIDYMID", + "SVG_PRESERVEASPECTRATIO_XMIDYMIN", + "SVG_PRESERVEASPECTRATIO_XMINYMAX", + "SVG_PRESERVEASPECTRATIO_XMINYMID", + "SVG_PRESERVEASPECTRATIO_XMINYMIN", + "SVG_SPREADMETHOD_PAD", + "SVG_SPREADMETHOD_REFLECT", + "SVG_SPREADMETHOD_REPEAT", + "SVG_SPREADMETHOD_UNKNOWN", + "SVG_STITCHTYPE_NOSTITCH", + "SVG_STITCHTYPE_STITCH", + "SVG_STITCHTYPE_UNKNOWN", + "SVG_TRANSFORM_MATRIX", + "SVG_TRANSFORM_ROTATE", + "SVG_TRANSFORM_SCALE", + "SVG_TRANSFORM_SKEWX", + "SVG_TRANSFORM_SKEWY", + "SVG_TRANSFORM_TRANSLATE", + "SVG_TRANSFORM_UNKNOWN", + "SVG_TURBULENCE_TYPE_FRACTALNOISE", + "SVG_TURBULENCE_TYPE_TURBULENCE", + "SVG_TURBULENCE_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", + "SVG_UNIT_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_USERSPACEONUSE", + "SVG_WRONG_TYPE_ERR", + "SVG_ZOOMANDPAN_DISABLE", + "SVG_ZOOMANDPAN_MAGNIFY", + "SVG_ZOOMANDPAN_UNKNOWN", + "SYNTAX_ERR", + "SavedPages", + "Screen", + "ScreenOrientation", + "Script", + "ScriptProcessorNode", + "ScrollAreaEvent", + "SecurityPolicyViolationEvent", + "Selection", + "ServiceWorker", + "ServiceWorkerContainer", + "ServiceWorkerRegistration", + "SessionDescription", + "Set", + "ShadowRoot", + "SharedWorker", + "SimpleGestureEvent", + "SpeechSynthesisEvent", + "SpeechSynthesisUtterance", + "StopIteration", + "Storage", + "StorageEvent", + "String", + "StyleSheet", + "StyleSheetList", + "SubtleCrypto", + "Symbol", + "SyntaxError", + "TEMPORARY", + "TEXTPATH_METHODTYPE_ALIGN", + "TEXTPATH_METHODTYPE_STRETCH", + "TEXTPATH_METHODTYPE_UNKNOWN", + "TEXTPATH_SPACINGTYPE_AUTO", + "TEXTPATH_SPACINGTYPE_EXACT", + "TEXTPATH_SPACINGTYPE_UNKNOWN", + "TEXTURE", + "TEXTURE0", + "TEXTURE1", + "TEXTURE10", + "TEXTURE11", + "TEXTURE12", + "TEXTURE13", + "TEXTURE14", + "TEXTURE15", + "TEXTURE16", + "TEXTURE17", + "TEXTURE18", + "TEXTURE19", + "TEXTURE2", + "TEXTURE20", + "TEXTURE21", + "TEXTURE22", + "TEXTURE23", + "TEXTURE24", + "TEXTURE25", + "TEXTURE26", + "TEXTURE27", + "TEXTURE28", + "TEXTURE29", + "TEXTURE3", + "TEXTURE30", + "TEXTURE31", + "TEXTURE4", + "TEXTURE5", + "TEXTURE6", + "TEXTURE7", + "TEXTURE8", + "TEXTURE9", + "TEXTURE_2D", + "TEXTURE_BINDING_2D", + "TEXTURE_BINDING_CUBE_MAP", + "TEXTURE_CUBE_MAP", + "TEXTURE_CUBE_MAP_NEGATIVE_X", + "TEXTURE_CUBE_MAP_NEGATIVE_Y", + "TEXTURE_CUBE_MAP_NEGATIVE_Z", + "TEXTURE_CUBE_MAP_POSITIVE_X", + "TEXTURE_CUBE_MAP_POSITIVE_Y", + "TEXTURE_CUBE_MAP_POSITIVE_Z", + "TEXTURE_MAG_FILTER", + "TEXTURE_MAX_ANISOTROPY_EXT", + "TEXTURE_MIN_FILTER", + "TEXTURE_WRAP_S", + "TEXTURE_WRAP_T", + "TEXT_NODE", + "TIMEOUT", + "TIMEOUT_ERR", + "TOO_LARGE_ERR", + "TRANSACTION_INACTIVE_ERR", + "TRIANGLE", + "TRIANGLES", + "TRIANGLE_FAN", + "TRIANGLE_STRIP", + "TYPE_BACK_FORWARD", + "TYPE_ERR", + "TYPE_MISMATCH_ERR", + "TYPE_NAVIGATE", + "TYPE_RELOAD", + "TYPE_RESERVED", + "Text", + "TextDecoder", + "TextEncoder", + "TextEvent", + "TextMetrics", + "TextTrack", + "TextTrackCue", + "TextTrackCueList", + "TextTrackList", + "TimeEvent", + "TimeRanges", + "Touch", + "TouchEvent", + "TouchList", + "TrackEvent", + "TransitionEvent", + "TreeWalker", + "TypeError", + "UIEvent", + "UNCACHED", + "UNKNOWN_ERR", + "UNKNOWN_RULE", + "UNMASKED_RENDERER_WEBGL", + "UNMASKED_VENDOR_WEBGL", + "UNORDERED_NODE_ITERATOR_TYPE", + "UNORDERED_NODE_SNAPSHOT_TYPE", + "UNPACK_ALIGNMENT", + "UNPACK_COLORSPACE_CONVERSION_WEBGL", + "UNPACK_FLIP_Y_WEBGL", + "UNPACK_PREMULTIPLY_ALPHA_WEBGL", + "UNSCHEDULED_STATE", + "UNSENT", + "UNSIGNED_BYTE", + "UNSIGNED_INT", + "UNSIGNED_SHORT", + "UNSIGNED_SHORT_4_4_4_4", + "UNSIGNED_SHORT_5_5_5_1", + "UNSIGNED_SHORT_5_6_5", + "UNSPECIFIED_EVENT_TYPE_ERR", + "UPDATEREADY", + "URIError", + "URL", + "URLSearchParams", + "URLUnencoded", + "URL_MISMATCH_ERR", + "UTC", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "UserMessageHandler", + "UserMessageHandlersNamespace", + "UserProximityEvent", + "VALIDATE_STATUS", + "VALIDATION_ERR", + "VARIABLES_RULE", + "VENDOR", + "VERSION", + "VERSION_CHANGE", + "VERSION_ERR", + "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", + "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", + "VERTEX_ATTRIB_ARRAY_ENABLED", + "VERTEX_ATTRIB_ARRAY_NORMALIZED", + "VERTEX_ATTRIB_ARRAY_POINTER", + "VERTEX_ATTRIB_ARRAY_SIZE", + "VERTEX_ATTRIB_ARRAY_STRIDE", + "VERTEX_ATTRIB_ARRAY_TYPE", + "VERTEX_SHADER", + "VERTICAL", + "VERTICAL_AXIS", + "VER_ERR", + "VIEWPORT", + "VIEWPORT_RULE", + "VTTCue", + "VTTRegion", + "ValidityState", + "VideoStreamTrack", + "WEBKIT_FILTER_RULE", + "WEBKIT_KEYFRAMES_RULE", + "WEBKIT_KEYFRAME_RULE", + "WEBKIT_REGION_RULE", + "WRONG_DOCUMENT_ERR", + "WaveShaperNode", + "WeakMap", + "WeakSet", + "WebGLActiveInfo", + "WebGLBuffer", + "WebGLContextEvent", + "WebGLFramebuffer", + "WebGLProgram", + "WebGLRenderbuffer", + "WebGLRenderingContext", + "WebGLShader", + "WebGLShaderPrecisionFormat", + "WebGLTexture", + "WebGLUniformLocation", + "WebGLVertexArray", + "WebKitAnimationEvent", + "WebKitBlobBuilder", + "WebKitCSSFilterRule", + "WebKitCSSFilterValue", + "WebKitCSSKeyframeRule", + "WebKitCSSKeyframesRule", + "WebKitCSSMatrix", + "WebKitCSSRegionRule", + "WebKitCSSTransformValue", + "WebKitDataCue", + "WebKitGamepad", + "WebKitMediaKeyError", + "WebKitMediaKeyMessageEvent", + "WebKitMediaKeySession", + "WebKitMediaKeys", + "WebKitMediaSource", + "WebKitMutationObserver", + "WebKitNamespace", + "WebKitPlaybackTargetAvailabilityEvent", + "WebKitPoint", + "WebKitShadowRoot", + "WebKitSourceBuffer", + "WebKitSourceBufferList", + "WebKitTransitionEvent", + "WebSocket", + "WheelEvent", + "Window", + "Worker", + "XMLDocument", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestException", + "XMLHttpRequestProgressEvent", + "XMLHttpRequestUpload", + "XMLSerializer", + "XMLStylesheetProcessingInstruction", + "XPathEvaluator", + "XPathException", + "XPathExpression", + "XPathNSResolver", + "XPathResult", + "XSLTProcessor", + "ZERO", + "_XD0M_", + "_YD0M_", + "__defineGetter__", + "__defineSetter__", + "__lookupGetter__", + "__lookupSetter__", + "__opera", + "__proto__", + "_browserjsran", + "a", + "aLink", + "abbr", + "abort", + "abs", + "absolute", + "acceleration", + "accelerationIncludingGravity", + "accelerator", + "accept", + "acceptCharset", + "acceptNode", + "accessKey", + "accessKeyLabel", + "accuracy", + "acos", + "acosh", + "action", + "actionURL", + "active", + "activeCues", + "activeElement", + "activeSourceBuffers", + "activeSourceCount", + "activeTexture", + "add", + "addBehavior", + "addCandidate", + "addColorStop", + "addCue", + "addElement", + "addEventListener", + "addFilter", + "addFromString", + "addFromUri", + "addIceCandidate", + "addImport", + "addListener", + "addNamed", + "addPageRule", + "addPath", + "addPointer", + "addRange", + "addRegion", + "addRule", + "addSearchEngine", + "addSourceBuffer", + "addStream", + "addTextTrack", + "addTrack", + "addWakeLockListener", + "addedNodes", + "additionalName", + "additiveSymbols", + "addons", + "adoptNode", + "adr", + "advance", + "alert", + "algorithm", + "align", + "align-content", + "align-items", + "align-self", + "alignContent", + "alignItems", + "alignSelf", + "alignmentBaseline", + "alinkColor", + "all", + "allowFullscreen", + "allowedDirections", + "alpha", + "alt", + "altGraphKey", + "altHtml", + "altKey", + "altLeft", + "altitude", + "altitudeAccuracy", + "amplitude", + "ancestorOrigins", + "anchor", + "anchorNode", + "anchorOffset", + "anchors", + "angle", + "animVal", + "animate", + "animatedInstanceRoot", + "animatedNormalizedPathSegList", + "animatedPathSegList", + "animatedPoints", + "animation", + "animation-delay", + "animation-direction", + "animation-duration", + "animation-fill-mode", + "animation-iteration-count", + "animation-name", + "animation-play-state", + "animation-timing-function", + "animationDelay", + "animationDirection", + "animationDuration", + "animationFillMode", + "animationIterationCount", + "animationName", + "animationPlayState", + "animationStartTime", + "animationTimingFunction", + "animationsPaused", + "anniversary", + "app", + "appCodeName", + "appMinorVersion", + "appName", + "appNotifications", + "appVersion", + "append", + "appendBuffer", + "appendChild", + "appendData", + "appendItem", + "appendMedium", + "appendNamed", + "appendRule", + "appendStream", + "appendWindowEnd", + "appendWindowStart", + "applets", + "applicationCache", + "apply", + "applyElement", + "arc", + "arcTo", + "archive", + "areas", + "arguments", + "arrayBuffer", + "asin", + "asinh", + "assert", + "assign", + "async", + "atEnd", + "atan", + "atan2", + "atanh", + "atob", + "attachEvent", + "attachShader", + "attachments", + "attack", + "attrChange", + "attrName", + "attributeName", + "attributeNamespace", + "attributes", + "audioTracks", + "autoIncrement", + "autobuffer", + "autocapitalize", + "autocomplete", + "autocorrect", + "autofocus", + "autoplay", + "availHeight", + "availLeft", + "availTop", + "availWidth", + "availability", + "available", + "aversion", + "axes", + "axis", + "azimuth", + "b", + "back", + "backface-visibility", + "backfaceVisibility", + "background", + "background-attachment", + "background-blend-mode", + "background-clip", + "background-color", + "background-image", + "background-origin", + "background-position", + "background-repeat", + "background-size", + "backgroundAttachment", + "backgroundBlendMode", + "backgroundClip", + "backgroundColor", + "backgroundImage", + "backgroundOrigin", + "backgroundPosition", + "backgroundPositionX", + "backgroundPositionY", + "backgroundRepeat", + "backgroundSize", + "badInput", + "balance", + "baseFrequencyX", + "baseFrequencyY", + "baseNode", + "baseOffset", + "baseURI", + "baseVal", + "baselineShift", + "battery", + "bday", + "beginElement", + "beginElementAt", + "beginPath", + "behavior", + "behaviorCookie", + "behaviorPart", + "behaviorUrns", + "beta", + "bezierCurveTo", + "bgColor", + "bgProperties", + "bias", + "big", + "binaryType", + "bind", + "bindAttribLocation", + "bindBuffer", + "bindFramebuffer", + "bindRenderbuffer", + "bindTexture", + "blendColor", + "blendEquation", + "blendEquationSeparate", + "blendFunc", + "blendFuncSeparate", + "blink", + "blob", + "blockDirection", + "blue", + "blur", + "body", + "bodyUsed", + "bold", + "bookmarks", + "booleanValue", + "border", + "border-bottom", + "border-bottom-color", + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-bottom-style", + "border-bottom-width", + "border-collapse", + "border-color", + "border-image", + "border-image-outset", + "border-image-repeat", + "border-image-slice", + "border-image-source", + "border-image-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-spacing", + "border-style", + "border-top", + "border-top-color", + "border-top-left-radius", + "border-top-right-radius", + "border-top-style", + "border-top-width", + "border-width", + "borderBottom", + "borderBottomColor", + "borderBottomLeftRadius", + "borderBottomRightRadius", + "borderBottomStyle", + "borderBottomWidth", + "borderCollapse", + "borderColor", + "borderColorDark", + "borderColorLight", + "borderImage", + "borderImageOutset", + "borderImageRepeat", + "borderImageSlice", + "borderImageSource", + "borderImageWidth", + "borderLeft", + "borderLeftColor", + "borderLeftStyle", + "borderLeftWidth", + "borderRadius", + "borderRight", + "borderRightColor", + "borderRightStyle", + "borderRightWidth", + "borderSpacing", + "borderStyle", + "borderTop", + "borderTopColor", + "borderTopLeftRadius", + "borderTopRightRadius", + "borderTopStyle", + "borderTopWidth", + "borderWidth", + "bottom", + "bottomMargin", + "bound", + "boundElements", + "boundingClientRect", + "boundingHeight", + "boundingLeft", + "boundingTop", + "boundingWidth", + "bounds", + "box-decoration-break", + "box-shadow", + "box-sizing", + "boxDecorationBreak", + "boxShadow", + "boxSizing", + "breakAfter", + "breakBefore", + "breakInside", + "browserLanguage", + "btoa", + "bubbles", + "buffer", + "bufferData", + "bufferDepth", + "bufferSize", + "bufferSubData", + "buffered", + "bufferedAmount", + "buildID", + "buildNumber", + "button", + "buttonID", + "buttons", + "byteLength", + "byteOffset", + "c", + "call", + "caller", + "canBeFormatted", + "canBeMounted", + "canBeShared", + "canHaveChildren", + "canHaveHTML", + "canPlayType", + "cancel", + "cancelAnimationFrame", + "cancelBubble", + "cancelScheduledValues", + "cancelable", + "candidate", + "canvas", + "caption", + "caption-side", + "captionSide", + "captureEvents", + "captureStackTrace", + "caretPositionFromPoint", + "caretRangeFromPoint", + "cast", + "catch", + "category", + "cbrt", + "cd", + "ceil", + "cellIndex", + "cellPadding", + "cellSpacing", + "cells", + "ch", + "chOff", + "chain", + "challenge", + "changedTouches", + "channel", + "channelCount", + "channelCountMode", + "channelInterpretation", + "char", + "charAt", + "charCode", + "charCodeAt", + "charIndex", + "characterSet", + "charging", + "chargingTime", + "charset", + "checkEnclosure", + "checkFramebufferStatus", + "checkIntersection", + "checkValidity", + "checked", + "childElementCount", + "childNodes", + "children", + "chrome", + "ciphertext", + "cite", + "classList", + "className", + "classid", + "clear", + "clearAttributes", + "clearColor", + "clearData", + "clearDepth", + "clearImmediate", + "clearInterval", + "clearMarks", + "clearMeasures", + "clearParameters", + "clearRect", + "clearResourceTimings", + "clearShadow", + "clearStencil", + "clearTimeout", + "clearWatch", + "click", + "clickCount", + "clientHeight", + "clientInformation", + "clientLeft", + "clientRect", + "clientRects", + "clientTop", + "clientWidth", + "clientX", + "clientY", + "clip", + "clip-path", + "clip-rule", + "clipBottom", + "clipLeft", + "clipPath", + "clipPathUnits", + "clipRight", + "clipRule", + "clipTop", + "clipboardData", + "clone", + "cloneContents", + "cloneNode", + "cloneRange", + "close", + "closePath", + "closed", + "closest", + "clz", + "clz32", + "cmp", + "code", + "codeBase", + "codePointAt", + "codeType", + "colSpan", + "collapse", + "collapseToEnd", + "collapseToStart", + "collapsed", + "collect", + "colno", + "color", + "color-interpolation", + "color-interpolation-filters", + "colorDepth", + "colorInterpolation", + "colorInterpolationFilters", + "colorMask", + "colorType", + "cols", + "columnCount", + "columnFill", + "columnGap", + "columnNumber", + "columnRule", + "columnRuleColor", + "columnRuleStyle", + "columnRuleWidth", + "columnSpan", + "columnWidth", + "columns", + "command", + "commitPreferences", + "commonAncestorContainer", + "compact", + "compareBoundaryPoints", + "compareDocumentPosition", + "compareEndPoints", + "compareNode", + "comparePoint", + "compatMode", + "compatible", + "compile", + "compileShader", + "complete", + "componentFromPoint", + "compositionEndOffset", + "compositionStartOffset", + "compressedTexImage2D", + "compressedTexSubImage2D", + "concat", + "conditionText", + "coneInnerAngle", + "coneOuterAngle", + "coneOuterGain", + "confirm", + "confirmComposition", + "confirmSiteSpecificTrackingException", + "confirmWebWideTrackingException", + "connect", + "connectEnd", + "connectStart", + "connected", + "connection", + "connectionSpeed", + "console", + "consolidate", + "constrictionActive", + "constructor", + "contactID", + "contains", + "containsNode", + "content", + "contentDocument", + "contentEditable", + "contentOverflow", + "contentScriptType", + "contentStyleType", + "contentType", + "contentWindow", + "context", + "contextMenu", + "contextmenu", + "continue", + "continuous", + "control", + "controller", + "controls", + "convertToSpecifiedUnits", + "cookie", + "cookieEnabled", + "coords", + "copyFromChannel", + "copyTexImage2D", + "copyTexSubImage2D", + "copyToChannel", + "copyWithin", + "correspondingElement", + "correspondingUseElement", + "cos", + "cosh", + "count", + "counter-increment", + "counter-reset", + "counterIncrement", + "counterReset", + "cpuClass", + "cpuSleepAllowed", + "create", + "createAnalyser", + "createAnswer", + "createAttribute", + "createAttributeNS", + "createBiquadFilter", + "createBuffer", + "createBufferSource", + "createCDATASection", + "createCSSStyleSheet", + "createCaption", + "createChannelMerger", + "createChannelSplitter", + "createComment", + "createContextualFragment", + "createControlRange", + "createConvolver", + "createDTMFSender", + "createDataChannel", + "createDelay", + "createDelayNode", + "createDocument", + "createDocumentFragment", + "createDocumentType", + "createDynamicsCompressor", + "createElement", + "createElementNS", + "createEntityReference", + "createEvent", + "createEventObject", + "createExpression", + "createFramebuffer", + "createFunction", + "createGain", + "createGainNode", + "createHTMLDocument", + "createImageBitmap", + "createImageData", + "createIndex", + "createJavaScriptNode", + "createLinearGradient", + "createMediaElementSource", + "createMediaKeys", + "createMediaStreamDestination", + "createMediaStreamSource", + "createMutableFile", + "createNSResolver", + "createNodeIterator", + "createNotification", + "createObjectStore", + "createObjectURL", + "createOffer", + "createOscillator", + "createPanner", + "createPattern", + "createPeriodicWave", + "createPopup", + "createProcessingInstruction", + "createProgram", + "createRadialGradient", + "createRange", + "createRangeCollection", + "createRenderbuffer", + "createSVGAngle", + "createSVGLength", + "createSVGMatrix", + "createSVGNumber", + "createSVGPathSegArcAbs", + "createSVGPathSegArcRel", + "createSVGPathSegClosePath", + "createSVGPathSegCurvetoCubicAbs", + "createSVGPathSegCurvetoCubicRel", + "createSVGPathSegCurvetoCubicSmoothAbs", + "createSVGPathSegCurvetoCubicSmoothRel", + "createSVGPathSegCurvetoQuadraticAbs", + "createSVGPathSegCurvetoQuadraticRel", + "createSVGPathSegCurvetoQuadraticSmoothAbs", + "createSVGPathSegCurvetoQuadraticSmoothRel", + "createSVGPathSegLinetoAbs", + "createSVGPathSegLinetoHorizontalAbs", + "createSVGPathSegLinetoHorizontalRel", + "createSVGPathSegLinetoRel", + "createSVGPathSegLinetoVerticalAbs", + "createSVGPathSegLinetoVerticalRel", + "createSVGPathSegMovetoAbs", + "createSVGPathSegMovetoRel", + "createSVGPoint", + "createSVGRect", + "createSVGTransform", + "createSVGTransformFromMatrix", + "createScriptProcessor", + "createSession", + "createShader", + "createShadowRoot", + "createStereoPanner", + "createStyleSheet", + "createTBody", + "createTFoot", + "createTHead", + "createTextNode", + "createTextRange", + "createTexture", + "createTouch", + "createTouchList", + "createTreeWalker", + "createWaveShaper", + "creationTime", + "crossOrigin", + "crypto", + "csi", + "cssFloat", + "cssRules", + "cssText", + "cssValueType", + "ctrlKey", + "ctrlLeft", + "cues", + "cullFace", + "currentNode", + "currentPage", + "currentScale", + "currentScript", + "currentSrc", + "currentState", + "currentStyle", + "currentTarget", + "currentTime", + "currentTranslate", + "currentView", + "cursor", + "curve", + "customError", + "cx", + "cy", + "d", + "data", + "dataFld", + "dataFormatAs", + "dataPageSize", + "dataSrc", + "dataTransfer", + "database", + "dataset", + "dateTime", + "db", + "debug", + "debuggerEnabled", + "declare", + "decode", + "decodeAudioData", + "decodeURI", + "decodeURIComponent", + "decrypt", + "default", + "defaultCharset", + "defaultChecked", + "defaultMuted", + "defaultPlaybackRate", + "defaultPrevented", + "defaultSelected", + "defaultStatus", + "defaultURL", + "defaultValue", + "defaultView", + "defaultstatus", + "defer", + "defineMagicFunction", + "defineMagicVariable", + "defineProperties", + "defineProperty", + "delayTime", + "delete", + "deleteBuffer", + "deleteCaption", + "deleteCell", + "deleteContents", + "deleteData", + "deleteDatabase", + "deleteFramebuffer", + "deleteFromDocument", + "deleteIndex", + "deleteMedium", + "deleteObjectStore", + "deleteProgram", + "deleteRenderbuffer", + "deleteRow", + "deleteRule", + "deleteShader", + "deleteTFoot", + "deleteTHead", + "deleteTexture", + "deliverChangeRecords", + "delivery", + "deliveryInfo", + "deliveryStatus", + "deliveryTimestamp", + "delta", + "deltaMode", + "deltaX", + "deltaY", + "deltaZ", + "depthFunc", + "depthMask", + "depthRange", + "deriveBits", + "deriveKey", + "description", + "deselectAll", + "designMode", + "destination", + "destinationURL", + "detach", + "detachEvent", + "detachShader", + "detail", + "detune", + "devicePixelRatio", + "deviceXDPI", + "deviceYDPI", + "diffuseConstant", + "digest", + "dimensions", + "dir", + "dirName", + "direction", + "dirxml", + "disable", + "disableVertexAttribArray", + "disabled", + "dischargingTime", + "disconnect", + "dispatchEvent", + "display", + "distanceModel", + "divisor", + "djsapi", + "djsproxy", + "doImport", + "doNotTrack", + "doScroll", + "doctype", + "document", + "documentElement", + "documentMode", + "documentURI", + "dolphin", + "dolphinGameCenter", + "dolphininfo", + "dolphinmeta", + "domComplete", + "domContentLoadedEventEnd", + "domContentLoadedEventStart", + "domInteractive", + "domLoading", + "domain", + "domainLookupEnd", + "domainLookupStart", + "dominant-baseline", + "dominantBaseline", + "done", + "dopplerFactor", + "download", + "dragDrop", + "draggable", + "drawArrays", + "drawArraysInstancedANGLE", + "drawCustomFocusRing", + "drawElements", + "drawElementsInstancedANGLE", + "drawFocusIfNeeded", + "drawImage", + "drawImageFromRect", + "drawSystemFocusRing", + "drawingBufferHeight", + "drawingBufferWidth", + "dropEffect", + "droppedVideoFrames", + "dropzone", + "dump", + "duplicate", + "duration", + "dvname", + "dvnum", + "dx", + "dy", + "dynsrc", + "e", + "edgeMode", + "effectAllowed", + "elapsedTime", + "elementFromPoint", + "elements", + "elevation", + "ellipse", + "email", + "embeds", + "empty", + "empty-cells", + "emptyCells", + "enable", + "enableBackground", + "enableStyleSheetsForSet", + "enableVertexAttribArray", + "enabled", + "enabledPlugin", + "encode", + "encodeURI", + "encodeURIComponent", + "encoding", + "encrypt", + "enctype", + "end", + "endContainer", + "endElement", + "endElementAt", + "endOfStream", + "endOffset", + "endTime", + "ended", + "endsWith", + "entities", + "entries", + "entryType", + "enumerate", + "enumerateEditable", + "error", + "errorCode", + "escape", + "eval", + "evaluate", + "event", + "eventPhase", + "every", + "exception", + "exec", + "execCommand", + "execCommandShowHelp", + "execScript", + "exitFullscreen", + "exitPointerLock", + "exp", + "expand", + "expandEntityReferences", + "expando", + "expansion", + "expiryDate", + "explicitOriginalTarget", + "expm1", + "exponent", + "exponentialRampToValueAtTime", + "exportKey", + "extend", + "extensions", + "extentNode", + "extentOffset", + "external", + "externalResourcesRequired", + "extractContents", + "extractable", + "f", + "face", + "factoryReset", + "fallback", + "familyName", + "farthestViewportElement", + "fastSeek", + "fatal", + "fetch", + "fetchStart", + "fftSize", + "fgColor", + "fileCreatedDate", + "fileHandle", + "fileModifiedDate", + "fileName", + "fileSize", + "fileUpdatedDate", + "filename", + "files", + "fill", + "fill-opacity", + "fill-rule", + "fillOpacity", + "fillRect", + "fillRule", + "fillStyle", + "fillText", + "filter", + "filterResX", + "filterResY", + "filterUnits", + "filters", + "find", + "findIndex", + "findRule", + "findText", + "finish", + "fireEvent", + "firstChild", + "firstElementChild", + "firstPage", + "fixed", + "flex", + "flex-basis", + "flex-direction", + "flex-flow", + "flex-grow", + "flex-shrink", + "flex-wrap", + "flexBasis", + "flexDirection", + "flexFlow", + "flexGrow", + "flexShrink", + "flexWrap", + "flipX", + "flipY", + "float", + "flood-color", + "flood-opacity", + "floodColor", + "floodOpacity", + "floor", + "flush", + "focus", + "focusNode", + "focusOffset", + "font", + "font-family", + "font-feature-settings", + "font-kerning", + "font-language-override", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-synthesis", + "font-variant", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + "font-weight", + "fontFamily", + "fontFeatureSettings", + "fontKerning", + "fontLanguageOverride", + "fontSize", + "fontSizeAdjust", + "fontSmoothingEnabled", + "fontStretch", + "fontStyle", + "fontSynthesis", + "fontVariant", + "fontVariantAlternates", + "fontVariantCaps", + "fontVariantEastAsian", + "fontVariantLigatures", + "fontVariantNumeric", + "fontVariantPosition", + "fontWeight", + "fontcolor", + "fonts", + "fontsize", + "for", + "forEach", + "forceRedraw", + "form", + "formAction", + "formEnctype", + "formMethod", + "formNoValidate", + "formTarget", + "format", + "forms", + "forward", + "fr", + "frame", + "frameBorder", + "frameElement", + "frameSpacing", + "framebufferRenderbuffer", + "framebufferTexture2D", + "frames", + "freeSpace", + "freeze", + "frequency", + "frequencyBinCount", + "from", + "fromCharCode", + "fromCodePoint", + "fromElement", + "frontFace", + "fround", + "fullScreen", + "fullscreenElement", + "fullscreenEnabled", + "fx", + "fy", + "gain", + "gamepad", + "gamma", + "genderIdentity", + "generateKey", + "generateMipmap", + "generateRequest", + "geolocation", + "gestureObject", + "get", + "getActiveAttrib", + "getActiveUniform", + "getAdjacentText", + "getAll", + "getAllResponseHeaders", + "getAsFile", + "getAsString", + "getAttachedShaders", + "getAttribLocation", + "getAttribute", + "getAttributeNS", + "getAttributeNode", + "getAttributeNodeNS", + "getAudioTracks", + "getBBox", + "getBattery", + "getBlob", + "getBookmark", + "getBoundingClientRect", + "getBufferParameter", + "getByteFrequencyData", + "getByteTimeDomainData", + "getCSSCanvasContext", + "getCTM", + "getCandidateWindowClientRect", + "getChannelData", + "getCharNumAtPosition", + "getClientRect", + "getClientRects", + "getCompositionAlternatives", + "getComputedStyle", + "getComputedTextLength", + "getConfiguration", + "getContext", + "getContextAttributes", + "getCounterValue", + "getCueAsHTML", + "getCueById", + "getCurrentPosition", + "getCurrentTime", + "getData", + "getDatabaseNames", + "getDate", + "getDay", + "getDefaultComputedStyle", + "getDestinationInsertionPoints", + "getDistributedNodes", + "getEditable", + "getElementById", + "getElementsByClassName", + "getElementsByName", + "getElementsByTagName", + "getElementsByTagNameNS", + "getEnclosureList", + "getEndPositionOfChar", + "getEntries", + "getEntriesByName", + "getEntriesByType", + "getError", + "getExtension", + "getExtentOfChar", + "getFeature", + "getFile", + "getFloat32", + "getFloat64", + "getFloatFrequencyData", + "getFloatTimeDomainData", + "getFloatValue", + "getFramebufferAttachmentParameter", + "getFrequencyResponse", + "getFullYear", + "getGamepads", + "getHours", + "getImageData", + "getInt16", + "getInt32", + "getInt8", + "getIntersectionList", + "getItem", + "getItems", + "getKey", + "getLineDash", + "getLocalStreams", + "getMarks", + "getMatchedCSSRules", + "getMeasures", + "getMetadata", + "getMilliseconds", + "getMinutes", + "getModifierState", + "getMonth", + "getNamedItem", + "getNamedItemNS", + "getNotifier", + "getNumberOfChars", + "getOverrideHistoryNavigationMode", + "getOverrideStyle", + "getOwnPropertyDescriptor", + "getOwnPropertyNames", + "getOwnPropertySymbols", + "getParameter", + "getPathSegAtLength", + "getPointAtLength", + "getPreference", + "getPreferenceDefault", + "getPresentationAttribute", + "getPreventDefault", + "getProgramInfoLog", + "getProgramParameter", + "getPropertyCSSValue", + "getPropertyPriority", + "getPropertyShorthand", + "getPropertyValue", + "getPrototypeOf", + "getRGBColorValue", + "getRandomValues", + "getRangeAt", + "getReceivers", + "getRectValue", + "getRegistration", + "getRemoteStreams", + "getRenderbufferParameter", + "getResponseHeader", + "getRoot", + "getRotationOfChar", + "getSVGDocument", + "getScreenCTM", + "getSeconds", + "getSelection", + "getSenders", + "getShaderInfoLog", + "getShaderParameter", + "getShaderPrecisionFormat", + "getShaderSource", + "getSimpleDuration", + "getSiteIcons", + "getSources", + "getSpeculativeParserUrls", + "getStartPositionOfChar", + "getStartTime", + "getStats", + "getStorageUpdates", + "getStreamById", + "getStringValue", + "getSubStringLength", + "getSubscription", + "getSupportedExtensions", + "getTexParameter", + "getTime", + "getTimezoneOffset", + "getTotalLength", + "getTrackById", + "getTracks", + "getTransformToElement", + "getUTCDate", + "getUTCDay", + "getUTCFullYear", + "getUTCHours", + "getUTCMilliseconds", + "getUTCMinutes", + "getUTCMonth", + "getUTCSeconds", + "getUint16", + "getUint32", + "getUint8", + "getUniform", + "getUniformLocation", + "getUserMedia", + "getValues", + "getVarDate", + "getVariableValue", + "getVertexAttrib", + "getVertexAttribOffset", + "getVideoPlaybackQuality", + "getVideoTracks", + "getWakeLockState", + "getYear", + "givenName", + "global", + "globalAlpha", + "globalCompositeOperation", + "glyphOrientationHorizontal", + "glyphOrientationVertical", + "glyphRef", + "go", + "gradientTransform", + "gradientUnits", + "grammars", + "green", + "group", + "groupCollapsed", + "groupEnd", + "hardwareConcurrency", + "has", + "hasAttribute", + "hasAttributeNS", + "hasAttributes", + "hasChildNodes", + "hasComposition", + "hasExtension", + "hasFeature", + "hasFocus", + "hasLayout", + "hasOwnProperty", + "hash", + "head", + "headers", + "heading", + "height", + "hidden", + "hide", + "hideFocus", + "high", + "hint", + "history", + "honorificPrefix", + "honorificSuffix", + "horizontalOverflow", + "host", + "hostname", + "href", + "hreflang", + "hspace", + "html5TagCheckInerface", + "htmlFor", + "htmlText", + "httpEquiv", + "hwTimestamp", + "hypot", + "iccId", + "iceConnectionState", + "iceGatheringState", + "icon", + "id", + "identifier", + "identity", + "ignoreBOM", + "ignoreCase", + "image-orientation", + "image-rendering", + "imageOrientation", + "imageRendering", + "images", + "ime-mode", + "imeMode", + "implementation", + "importKey", + "importNode", + "importStylesheet", + "imports", + "impp", + "imul", + "in1", + "in2", + "inBandMetadataTrackDispatchType", + "inRange", + "includes", + "incremental", + "indeterminate", + "index", + "indexNames", + "indexOf", + "indexedDB", + "inertiaDestinationX", + "inertiaDestinationY", + "info", + "init", + "initAnimationEvent", + "initBeforeLoadEvent", + "initClipboardEvent", + "initCloseEvent", + "initCommandEvent", + "initCompositionEvent", + "initCustomEvent", + "initData", + "initDeviceMotionEvent", + "initDeviceOrientationEvent", + "initDragEvent", + "initErrorEvent", + "initEvent", + "initFocusEvent", + "initGestureEvent", + "initHashChangeEvent", + "initKeyEvent", + "initKeyboardEvent", + "initMSManipulationEvent", + "initMessageEvent", + "initMouseEvent", + "initMouseScrollEvent", + "initMouseWheelEvent", + "initMutationEvent", + "initNSMouseEvent", + "initOverflowEvent", + "initPageEvent", + "initPageTransitionEvent", + "initPointerEvent", + "initPopStateEvent", + "initProgressEvent", + "initScrollAreaEvent", + "initSimpleGestureEvent", + "initStorageEvent", + "initTextEvent", + "initTimeEvent", + "initTouchEvent", + "initTransitionEvent", + "initUIEvent", + "initWebKitAnimationEvent", + "initWebKitTransitionEvent", + "initWebKitWheelEvent", + "initWheelEvent", + "initialTime", + "initialize", + "initiatorType", + "inner", + "innerHTML", + "innerHeight", + "innerText", + "innerWidth", + "input", + "inputBuffer", + "inputEncoding", + "inputMethod", + "insertAdjacentElement", + "insertAdjacentHTML", + "insertAdjacentText", + "insertBefore", + "insertCell", + "insertData", + "insertItemBefore", + "insertNode", + "insertRow", + "insertRule", + "instanceRoot", + "intercept", + "interimResults", + "internalSubset", + "intersectsNode", + "interval", + "invalidIteratorState", + "inverse", + "invertSelf", + "is", + "is2D", + "isAlternate", + "isArray", + "isBingCurrentSearchDefault", + "isBuffer", + "isCandidateWindowVisible", + "isChar", + "isCollapsed", + "isComposing", + "isContentEditable", + "isContentHandlerRegistered", + "isContextLost", + "isDefaultNamespace", + "isDisabled", + "isEnabled", + "isEqual", + "isEqualNode", + "isExtensible", + "isFinite", + "isFramebuffer", + "isFrozen", + "isGenerator", + "isId", + "isInjected", + "isInteger", + "isMap", + "isMultiLine", + "isNaN", + "isOpen", + "isPointInFill", + "isPointInPath", + "isPointInRange", + "isPointInStroke", + "isPrefAlternate", + "isPrimary", + "isProgram", + "isPropertyImplicit", + "isProtocolHandlerRegistered", + "isPrototypeOf", + "isRenderbuffer", + "isSafeInteger", + "isSameNode", + "isSealed", + "isShader", + "isSupported", + "isTextEdit", + "isTexture", + "isTrusted", + "isTypeSupported", + "isView", + "isolation", + "italics", + "item", + "itemId", + "itemProp", + "itemRef", + "itemScope", + "itemType", + "itemValue", + "iterateNext", + "iterator", + "javaEnabled", + "jobTitle", + "join", + "json", + "justify-content", + "justifyContent", + "k1", + "k2", + "k3", + "k4", + "kernelMatrix", + "kernelUnitLengthX", + "kernelUnitLengthY", + "kerning", + "key", + "keyCode", + "keyFor", + "keyIdentifier", + "keyLightEnabled", + "keyLocation", + "keyPath", + "keySystem", + "keyText", + "keyUsage", + "keys", + "keytype", + "kind", + "knee", + "label", + "labels", + "lang", + "language", + "languages", + "largeArcFlag", + "lastChild", + "lastElementChild", + "lastEventId", + "lastIndex", + "lastIndexOf", + "lastMatch", + "lastMessageSubject", + "lastMessageType", + "lastModified", + "lastModifiedDate", + "lastPage", + "lastParen", + "lastState", + "lastStyleSheetSet", + "latitude", + "layerX", + "layerY", + "layoutFlow", + "layoutGrid", + "layoutGridChar", + "layoutGridLine", + "layoutGridMode", + "layoutGridType", + "lbound", + "left", + "leftContext", + "leftMargin", + "length", + "lengthAdjust", + "lengthComputable", + "letter-spacing", + "letterSpacing", + "level", + "lighting-color", + "lightingColor", + "limitingConeAngle", + "line", + "line-height", + "lineAlign", + "lineBreak", + "lineCap", + "lineDashOffset", + "lineHeight", + "lineJoin", + "lineNumber", + "lineTo", + "lineWidth", + "linearRampToValueAtTime", + "lineno", + "link", + "linkColor", + "linkProgram", + "links", + "list", + "list-style", + "list-style-image", + "list-style-position", + "list-style-type", + "listStyle", + "listStyleImage", + "listStylePosition", + "listStyleType", + "listener", + "load", + "loadEventEnd", + "loadEventStart", + "loadTimes", + "loaded", + "localDescription", + "localName", + "localStorage", + "locale", + "localeCompare", + "location", + "locationbar", + "lock", + "lockedFile", + "log", + "log10", + "log1p", + "log2", + "logicalXDPI", + "logicalYDPI", + "longDesc", + "longitude", + "lookupNamespaceURI", + "lookupPrefix", + "loop", + "loopEnd", + "loopStart", + "looping", + "low", + "lower", + "lowerBound", + "lowerOpen", + "lowsrc", + "m11", + "m12", + "m13", + "m14", + "m21", + "m22", + "m23", + "m24", + "m31", + "m32", + "m33", + "m34", + "m41", + "m42", + "m43", + "m44", + "manifest", + "map", + "mapping", + "margin", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "marginBottom", + "marginHeight", + "marginLeft", + "marginRight", + "marginTop", + "marginWidth", + "mark", + "marker", + "marker-end", + "marker-mid", + "marker-offset", + "marker-start", + "markerEnd", + "markerHeight", + "markerMid", + "markerOffset", + "markerStart", + "markerUnits", + "markerWidth", + "marks", + "mask", + "mask-type", + "maskContentUnits", + "maskType", + "maskUnits", + "match", + "matchMedia", + "matchMedium", + "matches", + "matrix", + "matrixTransform", + "max", + "max-height", + "max-width", + "maxAlternatives", + "maxChannelCount", + "maxConnectionsPerServer", + "maxDecibels", + "maxDistance", + "maxHeight", + "maxLength", + "maxTouchPoints", + "maxValue", + "maxWidth", + "measure", + "measureText", + "media", + "mediaDevices", + "mediaElement", + "mediaGroup", + "mediaKeys", + "mediaText", + "meetOrSlice", + "memory", + "menubar", + "mergeAttributes", + "message", + "messageClass", + "messageHandlers", + "metaKey", + "method", + "mimeType", + "mimeTypes", + "min", + "min-height", + "min-width", + "minDecibels", + "minHeight", + "minValue", + "minWidth", + "miterLimit", + "mix-blend-mode", + "mixBlendMode", + "mode", + "modify", + "mount", + "move", + "moveBy", + "moveEnd", + "moveFirst", + "moveFocusDown", + "moveFocusLeft", + "moveFocusRight", + "moveFocusUp", + "moveNext", + "moveRow", + "moveStart", + "moveTo", + "moveToBookmark", + "moveToElementText", + "moveToPoint", + "mozAdd", + "mozAnimationStartTime", + "mozAnon", + "mozApps", + "mozAudioCaptured", + "mozAudioChannelType", + "mozAutoplayEnabled", + "mozCancelAnimationFrame", + "mozCancelFullScreen", + "mozCancelRequestAnimationFrame", + "mozCaptureStream", + "mozCaptureStreamUntilEnded", + "mozClearDataAt", + "mozContact", + "mozContacts", + "mozCreateFileHandle", + "mozCurrentTransform", + "mozCurrentTransformInverse", + "mozCursor", + "mozDash", + "mozDashOffset", + "mozDecodedFrames", + "mozExitPointerLock", + "mozFillRule", + "mozFragmentEnd", + "mozFrameDelay", + "mozFullScreen", + "mozFullScreenElement", + "mozFullScreenEnabled", + "mozGetAll", + "mozGetAllKeys", + "mozGetAsFile", + "mozGetDataAt", + "mozGetMetadata", + "mozGetUserMedia", + "mozHasAudio", + "mozHasItem", + "mozHidden", + "mozImageSmoothingEnabled", + "mozIndexedDB", + "mozInnerScreenX", + "mozInnerScreenY", + "mozInputSource", + "mozIsTextField", + "mozItem", + "mozItemCount", + "mozItems", + "mozLength", + "mozLockOrientation", + "mozMatchesSelector", + "mozMovementX", + "mozMovementY", + "mozOpaque", + "mozOrientation", + "mozPaintCount", + "mozPaintedFrames", + "mozParsedFrames", + "mozPay", + "mozPointerLockElement", + "mozPresentedFrames", + "mozPreservesPitch", + "mozPressure", + "mozPrintCallback", + "mozRTCIceCandidate", + "mozRTCPeerConnection", + "mozRTCSessionDescription", + "mozRemove", + "mozRequestAnimationFrame", + "mozRequestFullScreen", + "mozRequestPointerLock", + "mozSetDataAt", + "mozSetImageElement", + "mozSourceNode", + "mozSrcObject", + "mozSystem", + "mozTCPSocket", + "mozTextStyle", + "mozTypesAt", + "mozUnlockOrientation", + "mozUserCancelled", + "mozVisibilityState", + "msAnimation", + "msAnimationDelay", + "msAnimationDirection", + "msAnimationDuration", + "msAnimationFillMode", + "msAnimationIterationCount", + "msAnimationName", + "msAnimationPlayState", + "msAnimationStartTime", + "msAnimationTimingFunction", + "msBackfaceVisibility", + "msBlockProgression", + "msCSSOMElementFloatMetrics", + "msCaching", + "msCachingEnabled", + "msCancelRequestAnimationFrame", + "msCapsLockWarningOff", + "msClearImmediate", + "msClose", + "msContentZoomChaining", + "msContentZoomFactor", + "msContentZoomLimit", + "msContentZoomLimitMax", + "msContentZoomLimitMin", + "msContentZoomSnap", + "msContentZoomSnapPoints", + "msContentZoomSnapType", + "msContentZooming", + "msConvertURL", + "msCrypto", + "msDoNotTrack", + "msElementsFromPoint", + "msElementsFromRect", + "msExitFullscreen", + "msExtendedCode", + "msFillRule", + "msFirstPaint", + "msFlex", + "msFlexAlign", + "msFlexDirection", + "msFlexFlow", + "msFlexItemAlign", + "msFlexLinePack", + "msFlexNegative", + "msFlexOrder", + "msFlexPack", + "msFlexPositive", + "msFlexPreferredSize", + "msFlexWrap", + "msFlowFrom", + "msFlowInto", + "msFontFeatureSettings", + "msFullscreenElement", + "msFullscreenEnabled", + "msGetInputContext", + "msGetRegionContent", + "msGetUntransformedBounds", + "msGraphicsTrustStatus", + "msGridColumn", + "msGridColumnAlign", + "msGridColumnSpan", + "msGridColumns", + "msGridRow", + "msGridRowAlign", + "msGridRowSpan", + "msGridRows", + "msHidden", + "msHighContrastAdjust", + "msHyphenateLimitChars", + "msHyphenateLimitLines", + "msHyphenateLimitZone", + "msHyphens", + "msImageSmoothingEnabled", + "msImeAlign", + "msIndexedDB", + "msInterpolationMode", + "msIsStaticHTML", + "msKeySystem", + "msKeys", + "msLaunchUri", + "msLockOrientation", + "msManipulationViewsEnabled", + "msMatchMedia", + "msMatchesSelector", + "msMaxTouchPoints", + "msOrientation", + "msOverflowStyle", + "msPerspective", + "msPerspectiveOrigin", + "msPlayToDisabled", + "msPlayToPreferredSourceUri", + "msPlayToPrimary", + "msPointerEnabled", + "msRegionOverflow", + "msReleasePointerCapture", + "msRequestAnimationFrame", + "msRequestFullscreen", + "msSaveBlob", + "msSaveOrOpenBlob", + "msScrollChaining", + "msScrollLimit", + "msScrollLimitXMax", + "msScrollLimitXMin", + "msScrollLimitYMax", + "msScrollLimitYMin", + "msScrollRails", + "msScrollSnapPointsX", + "msScrollSnapPointsY", + "msScrollSnapType", + "msScrollSnapX", + "msScrollSnapY", + "msScrollTranslation", + "msSetImmediate", + "msSetMediaKeys", + "msSetPointerCapture", + "msTextCombineHorizontal", + "msTextSizeAdjust", + "msToBlob", + "msTouchAction", + "msTouchSelect", + "msTraceAsyncCallbackCompleted", + "msTraceAsyncCallbackStarting", + "msTraceAsyncOperationCompleted", + "msTraceAsyncOperationStarting", + "msTransform", + "msTransformOrigin", + "msTransformStyle", + "msTransition", + "msTransitionDelay", + "msTransitionDuration", + "msTransitionProperty", + "msTransitionTimingFunction", + "msUnlockOrientation", + "msUpdateAsyncCallbackRelation", + "msUserSelect", + "msVisibilityState", + "msWrapFlow", + "msWrapMargin", + "msWrapThrough", + "msWriteProfilerMark", + "msZoom", + "msZoomTo", + "mt", + "multiEntry", + "multiSelectionObj", + "multiline", + "multiple", + "multiply", + "multiplySelf", + "mutableFile", + "muted", + "n", + "name", + "nameProp", + "namedItem", + "namedRecordset", + "names", + "namespaceURI", + "namespaces", + "naturalHeight", + "naturalWidth", + "navigate", + "navigation", + "navigationMode", + "navigationStart", + "navigator", + "near", + "nearestViewportElement", + "negative", + "netscape", + "networkState", + "newScale", + "newTranslate", + "newURL", + "newValue", + "newValueSpecifiedUnits", + "newVersion", + "newhome", + "next", + "nextElementSibling", + "nextNode", + "nextPage", + "nextSibling", + "nickname", + "noHref", + "noResize", + "noShade", + "noValidate", + "noWrap", + "nodeName", + "nodeType", + "nodeValue", + "normalize", + "normalizedPathSegList", + "notationName", + "notations", + "note", + "noteGrainOn", + "noteOff", + "noteOn", + "now", + "numOctaves", + "number", + "numberOfChannels", + "numberOfInputs", + "numberOfItems", + "numberOfOutputs", + "numberValue", + "oMatchesSelector", + "object", + "object-fit", + "object-position", + "objectFit", + "objectPosition", + "objectStore", + "objectStoreNames", + "observe", + "of", + "offscreenBuffering", + "offset", + "offsetHeight", + "offsetLeft", + "offsetNode", + "offsetParent", + "offsetTop", + "offsetWidth", + "offsetX", + "offsetY", + "ok", + "oldURL", + "oldValue", + "oldVersion", + "olderShadowRoot", + "onLine", + "onabort", + "onactivate", + "onactive", + "onaddstream", + "onaddtrack", + "onafterprint", + "onafterscriptexecute", + "onafterupdate", + "onaudioend", + "onaudioprocess", + "onaudiostart", + "onautocomplete", + "onautocompleteerror", + "onbeforeactivate", + "onbeforecopy", + "onbeforecut", + "onbeforedeactivate", + "onbeforeeditfocus", + "onbeforepaste", + "onbeforeprint", + "onbeforescriptexecute", + "onbeforeunload", + "onbeforeupdate", + "onblocked", + "onblur", + "onbounce", + "onboundary", + "oncached", + "oncancel", + "oncandidatewindowhide", + "oncandidatewindowshow", + "oncandidatewindowupdate", + "oncanplay", + "oncanplaythrough", + "oncellchange", + "onchange", + "onchargingchange", + "onchargingtimechange", + "onchecking", + "onclick", + "onclose", + "oncompassneedscalibration", + "oncomplete", + "oncontextmenu", + "oncontrolselect", + "oncopy", + "oncuechange", + "oncut", + "ondataavailable", + "ondatachannel", + "ondatasetchanged", + "ondatasetcomplete", + "ondblclick", + "ondeactivate", + "ondevicelight", + "ondevicemotion", + "ondeviceorientation", + "ondeviceproximity", + "ondischargingtimechange", + "ondisplay", + "ondownloading", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onencrypted", + "onend", + "onended", + "onenter", + "onerror", + "onerrorupdate", + "onexit", + "onfilterchange", + "onfinish", + "onfocus", + "onfocusin", + "onfocusout", + "onfullscreenchange", + "onfullscreenerror", + "ongesturechange", + "ongestureend", + "ongesturestart", + "ongotpointercapture", + "onhashchange", + "onhelp", + "onicecandidate", + "oniceconnectionstatechange", + "oninactive", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onlayoutcomplete", + "onlevelchange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadend", + "onloadstart", + "onlosecapture", + "onlostpointercapture", + "only", + "onmark", + "onmessage", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onmove", + "onmoveend", + "onmovestart", + "onmozfullscreenchange", + "onmozfullscreenerror", + "onmozorientationchange", + "onmozpointerlockchange", + "onmozpointerlockerror", + "onmscontentzoom", + "onmsfullscreenchange", + "onmsfullscreenerror", + "onmsgesturechange", + "onmsgesturedoubletap", + "onmsgestureend", + "onmsgesturehold", + "onmsgesturestart", + "onmsgesturetap", + "onmsgotpointercapture", + "onmsinertiastart", + "onmslostpointercapture", + "onmsmanipulationstatechanged", + "onmsneedkey", + "onmsorientationchange", + "onmspointercancel", + "onmspointerdown", + "onmspointerenter", + "onmspointerhover", + "onmspointerleave", + "onmspointermove", + "onmspointerout", + "onmspointerover", + "onmspointerup", + "onmssitemodejumplistitemremoved", + "onmsthumbnailclick", + "onnegotiationneeded", + "onnomatch", + "onnoupdate", + "onobsolete", + "onoffline", + "ononline", + "onopen", + "onorientationchange", + "onpagechange", + "onpagehide", + "onpageshow", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpluginstreamstart", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointerlockchange", + "onpointerlockerror", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onpopstate", + "onprogress", + "onpropertychange", + "onratechange", + "onreadystatechange", + "onremovestream", + "onremovetrack", + "onreset", + "onresize", + "onresizeend", + "onresizestart", + "onresourcetimingbufferfull", + "onresult", + "onresume", + "onrowenter", + "onrowexit", + "onrowsdelete", + "onrowsinserted", + "onscroll", + "onsearch", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onshow", + "onsignalingstatechange", + "onsoundend", + "onsoundstart", + "onspeechend", + "onspeechstart", + "onstalled", + "onstart", + "onstatechange", + "onstop", + "onstorage", + "onstoragecommit", + "onsubmit", + "onsuccess", + "onsuspend", + "ontextinput", + "ontimeout", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitionend", + "onunload", + "onupdateready", + "onupgradeneeded", + "onuserproximity", + "onversionchange", + "onvoiceschanged", + "onvolumechange", + "onwaiting", + "onwarning", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkitcurrentplaybacktargetiswirelesschanged", + "onwebkitfullscreenchange", + "onwebkitfullscreenerror", + "onwebkitkeyadded", + "onwebkitkeyerror", + "onwebkitkeymessage", + "onwebkitneedkey", + "onwebkitorientationchange", + "onwebkitplaybacktargetavailabilitychanged", + "onwebkitpointerlockchange", + "onwebkitpointerlockerror", + "onwebkitresourcetimingbufferfull", + "onwebkittransitionend", + "onwheel", + "onzoom", + "opacity", + "open", + "openCursor", + "openDatabase", + "openKeyCursor", + "opener", + "opera", + "operationType", + "operator", + "opr", + "optimum", + "options", + "order", + "orderX", + "orderY", + "ordered", + "org", + "orient", + "orientAngle", + "orientType", + "orientation", + "origin", + "originalTarget", + "orphans", + "oscpu", + "outerHTML", + "outerHeight", + "outerText", + "outerWidth", + "outline", + "outline-color", + "outline-offset", + "outline-style", + "outline-width", + "outlineColor", + "outlineOffset", + "outlineStyle", + "outlineWidth", + "outputBuffer", + "overflow", + "overflow-x", + "overflow-y", + "overflowX", + "overflowY", + "overrideMimeType", + "oversample", + "ownerDocument", + "ownerElement", + "ownerNode", + "ownerRule", + "ownerSVGElement", + "owningElement", + "p1", + "p2", + "p3", + "p4", + "pad", + "padding", + "padding-bottom", + "padding-left", + "padding-right", + "padding-top", + "paddingBottom", + "paddingLeft", + "paddingRight", + "paddingTop", + "page", + "page-break-after", + "page-break-before", + "page-break-inside", + "pageBreakAfter", + "pageBreakBefore", + "pageBreakInside", + "pageCount", + "pageX", + "pageXOffset", + "pageY", + "pageYOffset", + "pages", + "paint-order", + "paintOrder", + "paintRequests", + "paintType", + "palette", + "panningModel", + "parent", + "parentElement", + "parentNode", + "parentRule", + "parentStyleSheet", + "parentTextEdit", + "parentWindow", + "parse", + "parseFloat", + "parseFromString", + "parseInt", + "participants", + "password", + "pasteHTML", + "path", + "pathLength", + "pathSegList", + "pathSegType", + "pathSegTypeAsLetter", + "pathname", + "pattern", + "patternContentUnits", + "patternMismatch", + "patternTransform", + "patternUnits", + "pause", + "pauseAnimations", + "pauseOnExit", + "paused", + "pending", + "performance", + "permission", + "persisted", + "personalbar", + "perspective", + "perspective-origin", + "perspectiveOrigin", + "phoneticFamilyName", + "phoneticGivenName", + "photo", + "ping", + "pitch", + "pixelBottom", + "pixelDepth", + "pixelHeight", + "pixelLeft", + "pixelRight", + "pixelStorei", + "pixelTop", + "pixelUnitToMillimeterX", + "pixelUnitToMillimeterY", + "pixelWidth", + "placeholder", + "platform", + "play", + "playbackRate", + "playbackState", + "playbackTime", + "played", + "plugins", + "pluginspage", + "pname", + "pointer-events", + "pointerBeforeReferenceNode", + "pointerEnabled", + "pointerEvents", + "pointerId", + "pointerLockElement", + "pointerType", + "points", + "pointsAtX", + "pointsAtY", + "pointsAtZ", + "polygonOffset", + "pop", + "popupWindowFeatures", + "popupWindowName", + "popupWindowURI", + "port", + "port1", + "port2", + "ports", + "posBottom", + "posHeight", + "posLeft", + "posRight", + "posTop", + "posWidth", + "position", + "positionAlign", + "postError", + "postMessage", + "poster", + "pow", + "powerOff", + "preMultiplySelf", + "precision", + "preferredStyleSheetSet", + "preferredStylesheetSet", + "prefix", + "preload", + "preserveAlpha", + "preserveAspectRatio", + "preserveAspectRatioString", + "pressed", + "pressure", + "prevValue", + "preventDefault", + "preventExtensions", + "previousElementSibling", + "previousNode", + "previousPage", + "previousScale", + "previousSibling", + "previousTranslate", + "primaryKey", + "primitiveType", + "primitiveUnits", + "principals", + "print", + "privateKey", + "probablySupportsContext", + "process", + "processIceMessage", + "product", + "productSub", + "profile", + "profileEnd", + "profiles", + "prompt", + "properties", + "propertyIsEnumerable", + "propertyName", + "protocol", + "protocolLong", + "prototype", + "pseudoClass", + "pseudoElement", + "publicId", + "publicKey", + "published", + "push", + "pushNotification", + "pushState", + "put", + "putImageData", + "quadraticCurveTo", + "qualifier", + "queryCommandEnabled", + "queryCommandIndeterm", + "queryCommandState", + "queryCommandSupported", + "queryCommandText", + "queryCommandValue", + "querySelector", + "querySelectorAll", + "quote", + "quotes", + "r", + "r1", + "r2", + "race", + "radiogroup", + "radiusX", + "radiusY", + "random", + "range", + "rangeCount", + "rangeMax", + "rangeMin", + "rangeOffset", + "rangeOverflow", + "rangeParent", + "rangeUnderflow", + "rate", + "ratio", + "raw", + "read", + "readAsArrayBuffer", + "readAsBinaryString", + "readAsBlob", + "readAsDataURL", + "readAsText", + "readOnly", + "readPixels", + "readReportRequested", + "readyState", + "reason", + "reboot", + "receiver", + "receivers", + "recordNumber", + "recordset", + "rect", + "red", + "redirectCount", + "redirectEnd", + "redirectStart", + "reduce", + "reduceRight", + "reduction", + "refDistance", + "refX", + "refY", + "referenceNode", + "referrer", + "refresh", + "region", + "regionAnchorX", + "regionAnchorY", + "regionId", + "regions", + "register", + "registerContentHandler", + "registerElement", + "registerProtocolHandler", + "reject", + "rel", + "relList", + "relatedNode", + "relatedTarget", + "release", + "releaseCapture", + "releaseEvents", + "releasePointerCapture", + "releaseShaderCompiler", + "reliable", + "reload", + "remainingSpace", + "remoteDescription", + "remove", + "removeAllRanges", + "removeAttribute", + "removeAttributeNS", + "removeAttributeNode", + "removeBehavior", + "removeChild", + "removeCue", + "removeEventListener", + "removeFilter", + "removeImport", + "removeItem", + "removeListener", + "removeNamedItem", + "removeNamedItemNS", + "removeNode", + "removeParameter", + "removeProperty", + "removeRange", + "removeRegion", + "removeRule", + "removeSiteSpecificTrackingException", + "removeSourceBuffer", + "removeStream", + "removeTrack", + "removeVariable", + "removeWakeLockListener", + "removeWebWideTrackingException", + "removedNodes", + "renderbufferStorage", + "renderedBuffer", + "renderingMode", + "repeat", + "replace", + "replaceAdjacentText", + "replaceChild", + "replaceData", + "replaceId", + "replaceItem", + "replaceNode", + "replaceState", + "replaceTrack", + "replaceWholeText", + "reportValidity", + "requestAnimationFrame", + "requestAutocomplete", + "requestData", + "requestFullscreen", + "requestMediaKeySystemAccess", + "requestPermission", + "requestPointerLock", + "requestStart", + "requestingWindow", + "required", + "requiredExtensions", + "requiredFeatures", + "reset", + "resetTransform", + "resize", + "resizeBy", + "resizeTo", + "resolve", + "response", + "responseBody", + "responseEnd", + "responseStart", + "responseText", + "responseType", + "responseURL", + "responseXML", + "restore", + "result", + "resultType", + "resume", + "returnValue", + "rev", + "reverse", + "reversed", + "revocable", + "revokeObjectURL", + "rgbColor", + "right", + "rightContext", + "rightMargin", + "rolloffFactor", + "root", + "rootElement", + "rotate", + "rotateAxisAngle", + "rotateAxisAngleSelf", + "rotateFromVector", + "rotateFromVectorSelf", + "rotateSelf", + "rotation", + "rotationRate", + "round", + "rowIndex", + "rowSpan", + "rows", + "rubyAlign", + "rubyOverhang", + "rubyPosition", + "rules", + "runtime", + "runtimeStyle", + "rx", + "ry", + "safari", + "sampleCoverage", + "sampleRate", + "sandbox", + "save", + "scale", + "scale3d", + "scale3dSelf", + "scaleNonUniform", + "scaleNonUniformSelf", + "scaleSelf", + "scheme", + "scissor", + "scope", + "scopeName", + "scoped", + "screen", + "screenBrightness", + "screenEnabled", + "screenLeft", + "screenPixelToMillimeterX", + "screenPixelToMillimeterY", + "screenTop", + "screenX", + "screenY", + "scripts", + "scroll", + "scroll-behavior", + "scrollAmount", + "scrollBehavior", + "scrollBy", + "scrollByLines", + "scrollByPages", + "scrollDelay", + "scrollHeight", + "scrollIntoView", + "scrollIntoViewIfNeeded", + "scrollLeft", + "scrollLeftMax", + "scrollMaxX", + "scrollMaxY", + "scrollTo", + "scrollTop", + "scrollTopMax", + "scrollWidth", + "scrollX", + "scrollY", + "scrollbar3dLightColor", + "scrollbarArrowColor", + "scrollbarBaseColor", + "scrollbarDarkShadowColor", + "scrollbarFaceColor", + "scrollbarHighlightColor", + "scrollbarShadowColor", + "scrollbarTrackColor", + "scrollbars", + "scrolling", + "sdp", + "sdpMLineIndex", + "sdpMid", + "seal", + "search", + "searchBox", + "searchBoxJavaBridge_", + "searchParams", + "sectionRowIndex", + "secureConnectionStart", + "security", + "seed", + "seekable", + "seeking", + "select", + "selectAllChildren", + "selectNode", + "selectNodeContents", + "selectNodes", + "selectSingleNode", + "selectSubString", + "selected", + "selectedIndex", + "selectedOptions", + "selectedStyleSheetSet", + "selectedStylesheetSet", + "selection", + "selectionDirection", + "selectionEnd", + "selectionStart", + "selector", + "selectorText", + "self", + "send", + "sendAsBinary", + "sendBeacon", + "sender", + "sentTimestamp", + "separator", + "serializeToString", + "serviceWorker", + "sessionId", + "sessionStorage", + "set", + "setActive", + "setAlpha", + "setAttribute", + "setAttributeNS", + "setAttributeNode", + "setAttributeNodeNS", + "setBaseAndExtent", + "setBingCurrentSearchDefault", + "setCapture", + "setColor", + "setCompositeOperation", + "setCurrentTime", + "setCustomValidity", + "setData", + "setDate", + "setDragImage", + "setEnd", + "setEndAfter", + "setEndBefore", + "setEndPoint", + "setFillColor", + "setFilterRes", + "setFloat32", + "setFloat64", + "setFloatValue", + "setFullYear", + "setHours", + "setImmediate", + "setInt16", + "setInt32", + "setInt8", + "setInterval", + "setItem", + "setLineCap", + "setLineDash", + "setLineJoin", + "setLineWidth", + "setLocalDescription", + "setMatrix", + "setMatrixValue", + "setMediaKeys", + "setMilliseconds", + "setMinutes", + "setMiterLimit", + "setMonth", + "setNamedItem", + "setNamedItemNS", + "setNonUserCodeExceptions", + "setOrientToAngle", + "setOrientToAuto", + "setOrientation", + "setOverrideHistoryNavigationMode", + "setPaint", + "setParameter", + "setPeriodicWave", + "setPointerCapture", + "setPosition", + "setPreference", + "setProperty", + "setPrototypeOf", + "setRGBColor", + "setRGBColorICCColor", + "setRadius", + "setRangeText", + "setRemoteDescription", + "setRequestHeader", + "setResizable", + "setResourceTimingBufferSize", + "setRotate", + "setScale", + "setSeconds", + "setSelectionRange", + "setServerCertificate", + "setShadow", + "setSkewX", + "setSkewY", + "setStart", + "setStartAfter", + "setStartBefore", + "setStdDeviation", + "setStringValue", + "setStrokeColor", + "setSuggestResult", + "setTargetAtTime", + "setTargetValueAtTime", + "setTime", + "setTimeout", + "setTransform", + "setTranslate", + "setUTCDate", + "setUTCFullYear", + "setUTCHours", + "setUTCMilliseconds", + "setUTCMinutes", + "setUTCMonth", + "setUTCSeconds", + "setUint16", + "setUint32", + "setUint8", + "setUri", + "setValueAtTime", + "setValueCurveAtTime", + "setVariable", + "setVelocity", + "setVersion", + "setYear", + "settingName", + "settingValue", + "sex", + "shaderSource", + "shadowBlur", + "shadowColor", + "shadowOffsetX", + "shadowOffsetY", + "shadowRoot", + "shape", + "shape-rendering", + "shapeRendering", + "sheet", + "shift", + "shiftKey", + "shiftLeft", + "show", + "showHelp", + "showModal", + "showModalDialog", + "showModelessDialog", + "showNotification", + "sidebar", + "sign", + "signalingState", + "sin", + "singleNodeValue", + "sinh", + "size", + "sizeToContent", + "sizes", + "skewX", + "skewXSelf", + "skewY", + "skewYSelf", + "slice", + "slope", + "small", + "smil", + "smoothingTimeConstant", + "snapToLines", + "snapshotItem", + "snapshotLength", + "some", + "sort", + "source", + "sourceBuffer", + "sourceBuffers", + "sourceIndex", + "spacing", + "span", + "speakAs", + "speaking", + "specified", + "specularConstant", + "specularExponent", + "speechSynthesis", + "speed", + "speedOfSound", + "spellcheck", + "splice", + "split", + "splitText", + "spreadMethod", + "sqrt", + "src", + "srcElement", + "srcFilter", + "srcUrn", + "srcdoc", + "srclang", + "srcset", + "stack", + "stackTraceLimit", + "stacktrace", + "standalone", + "standby", + "start", + "startContainer", + "startIce", + "startOffset", + "startRendering", + "startTime", + "startsWith", + "state", + "status", + "statusMessage", + "statusText", + "statusbar", + "stdDeviationX", + "stdDeviationY", + "stencilFunc", + "stencilFuncSeparate", + "stencilMask", + "stencilMaskSeparate", + "stencilOp", + "stencilOpSeparate", + "step", + "stepDown", + "stepMismatch", + "stepUp", + "sticky", + "stitchTiles", + "stop", + "stop-color", + "stop-opacity", + "stopColor", + "stopImmediatePropagation", + "stopOpacity", + "stopPropagation", + "storageArea", + "storageName", + "storageStatus", + "storeSiteSpecificTrackingException", + "storeWebWideTrackingException", + "stpVersion", + "stream", + "strike", + "stringValue", + "stringify", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "strokeDasharray", + "strokeDashoffset", + "strokeLinecap", + "strokeLinejoin", + "strokeMiterlimit", + "strokeOpacity", + "strokeRect", + "strokeStyle", + "strokeText", + "strokeWidth", + "style", + "styleFloat", + "styleMedia", + "styleSheet", + "styleSheetSets", + "styleSheets", + "sub", + "subarray", + "subject", + "submit", + "subscribe", + "substr", + "substring", + "substringData", + "subtle", + "suffix", + "suffixes", + "summary", + "sup", + "supports", + "surfaceScale", + "surroundContents", + "suspend", + "suspendRedraw", + "swapCache", + "swapNode", + "sweepFlag", + "symbols", + "system", + "systemCode", + "systemId", + "systemLanguage", + "systemXDPI", + "systemYDPI", + "tBodies", + "tFoot", + "tHead", + "tabIndex", + "table", + "table-layout", + "tableLayout", + "tableValues", + "tag", + "tagName", + "tagUrn", + "tags", + "taintEnabled", + "takeRecords", + "tan", + "tanh", + "target", + "targetElement", + "targetTouches", + "targetX", + "targetY", + "tel", + "terminate", + "test", + "texImage2D", + "texParameterf", + "texParameteri", + "texSubImage2D", + "text", + "text-align", + "text-anchor", + "text-decoration", + "text-decoration-color", + "text-decoration-line", + "text-decoration-style", + "text-indent", + "text-overflow", + "text-rendering", + "text-shadow", + "text-transform", + "textAlign", + "textAlignLast", + "textAnchor", + "textAutospace", + "textBaseline", + "textContent", + "textDecoration", + "textDecorationBlink", + "textDecorationColor", + "textDecorationLine", + "textDecorationLineThrough", + "textDecorationNone", + "textDecorationOverline", + "textDecorationStyle", + "textDecorationUnderline", + "textIndent", + "textJustify", + "textJustifyTrim", + "textKashida", + "textKashidaSpace", + "textLength", + "textOverflow", + "textRendering", + "textShadow", + "textTracks", + "textTransform", + "textUnderlinePosition", + "then", + "threadId", + "threshold", + "tiltX", + "tiltY", + "time", + "timeEnd", + "timeStamp", + "timeout", + "timestamp", + "timestampOffset", + "timing", + "title", + "toArray", + "toBlob", + "toDataURL", + "toDateString", + "toElement", + "toExponential", + "toFixed", + "toFloat32Array", + "toFloat64Array", + "toGMTString", + "toISOString", + "toJSON", + "toLocaleDateString", + "toLocaleFormat", + "toLocaleLowerCase", + "toLocaleString", + "toLocaleTimeString", + "toLocaleUpperCase", + "toLowerCase", + "toMethod", + "toPrecision", + "toSdp", + "toSource", + "toStaticHTML", + "toString", + "toStringTag", + "toTimeString", + "toUTCString", + "toUpperCase", + "toggle", + "toggleLongPressEnabled", + "tooLong", + "toolbar", + "top", + "topMargin", + "total", + "totalFrameDelay", + "totalVideoFrames", + "touchAction", + "touches", + "trace", + "track", + "transaction", + "transactions", + "transform", + "transform-origin", + "transform-style", + "transformOrigin", + "transformPoint", + "transformString", + "transformStyle", + "transformToDocument", + "transformToFragment", + "transition", + "transition-delay", + "transition-duration", + "transition-property", + "transition-timing-function", + "transitionDelay", + "transitionDuration", + "transitionProperty", + "transitionTimingFunction", + "translate", + "translateSelf", + "translationX", + "translationY", + "trim", + "trimLeft", + "trimRight", + "trueSpeed", + "trunc", + "truncate", + "type", + "typeDetail", + "typeMismatch", + "typeMustMatch", + "types", + "ubound", + "undefined", + "unescape", + "uneval", + "unicode-bidi", + "unicodeBidi", + "uniform1f", + "uniform1fv", + "uniform1i", + "uniform1iv", + "uniform2f", + "uniform2fv", + "uniform2i", + "uniform2iv", + "uniform3f", + "uniform3fv", + "uniform3i", + "uniform3iv", + "uniform4f", + "uniform4fv", + "uniform4i", + "uniform4iv", + "uniformMatrix2fv", + "uniformMatrix3fv", + "uniformMatrix4fv", + "unique", + "uniqueID", + "uniqueNumber", + "unitType", + "units", + "unloadEventEnd", + "unloadEventStart", + "unlock", + "unmount", + "unobserve", + "unpause", + "unpauseAnimations", + "unreadCount", + "unregister", + "unregisterContentHandler", + "unregisterProtocolHandler", + "unscopables", + "unselectable", + "unshift", + "unsubscribe", + "unsuspendRedraw", + "unsuspendRedrawAll", + "unwatch", + "unwrapKey", + "update", + "updateCommands", + "updateIce", + "updateInterval", + "updateSettings", + "updated", + "updating", + "upload", + "upper", + "upperBound", + "upperOpen", + "uri", + "url", + "urn", + "urns", + "usages", + "useCurrentView", + "useMap", + "useProgram", + "usedSpace", + "userAgent", + "userLanguage", + "username", + "v8BreakIterator", + "vAlign", + "vLink", + "valid", + "validateProgram", + "validationMessage", + "validity", + "value", + "valueAsDate", + "valueAsNumber", + "valueAsString", + "valueInSpecifiedUnits", + "valueMissing", + "valueOf", + "valueText", + "valueType", + "values", + "vector-effect", + "vectorEffect", + "velocityAngular", + "velocityExpansion", + "velocityX", + "velocityY", + "vendor", + "vendorSub", + "verify", + "version", + "vertexAttrib1f", + "vertexAttrib1fv", + "vertexAttrib2f", + "vertexAttrib2fv", + "vertexAttrib3f", + "vertexAttrib3fv", + "vertexAttrib4f", + "vertexAttrib4fv", + "vertexAttribDivisorANGLE", + "vertexAttribPointer", + "vertical", + "vertical-align", + "verticalAlign", + "verticalOverflow", + "vibrate", + "videoHeight", + "videoTracks", + "videoWidth", + "view", + "viewBox", + "viewBoxString", + "viewTarget", + "viewTargetString", + "viewport", + "viewportAnchorX", + "viewportAnchorY", + "viewportElement", + "visibility", + "visibilityState", + "visible", + "vlinkColor", + "voice", + "volume", + "vrml", + "vspace", + "w", + "wand", + "warn", + "wasClean", + "watch", + "watchPosition", + "webdriver", + "webkitAddKey", + "webkitAnimation", + "webkitAnimationDelay", + "webkitAnimationDirection", + "webkitAnimationDuration", + "webkitAnimationFillMode", + "webkitAnimationIterationCount", + "webkitAnimationName", + "webkitAnimationPlayState", + "webkitAnimationTimingFunction", + "webkitAppearance", + "webkitAudioContext", + "webkitAudioDecodedByteCount", + "webkitAudioPannerNode", + "webkitBackfaceVisibility", + "webkitBackground", + "webkitBackgroundAttachment", + "webkitBackgroundClip", + "webkitBackgroundColor", + "webkitBackgroundImage", + "webkitBackgroundOrigin", + "webkitBackgroundPosition", + "webkitBackgroundPositionX", + "webkitBackgroundPositionY", + "webkitBackgroundRepeat", + "webkitBackgroundSize", + "webkitBackingStorePixelRatio", + "webkitBorderImage", + "webkitBorderImageOutset", + "webkitBorderImageRepeat", + "webkitBorderImageSlice", + "webkitBorderImageSource", + "webkitBorderImageWidth", + "webkitBoxAlign", + "webkitBoxDirection", + "webkitBoxFlex", + "webkitBoxOrdinalGroup", + "webkitBoxOrient", + "webkitBoxPack", + "webkitBoxSizing", + "webkitCancelAnimationFrame", + "webkitCancelFullScreen", + "webkitCancelKeyRequest", + "webkitCancelRequestAnimationFrame", + "webkitClearResourceTimings", + "webkitClosedCaptionsVisible", + "webkitConvertPointFromNodeToPage", + "webkitConvertPointFromPageToNode", + "webkitCreateShadowRoot", + "webkitCurrentFullScreenElement", + "webkitCurrentPlaybackTargetIsWireless", + "webkitDirectionInvertedFromDevice", + "webkitDisplayingFullscreen", + "webkitEnterFullScreen", + "webkitEnterFullscreen", + "webkitExitFullScreen", + "webkitExitFullscreen", + "webkitExitPointerLock", + "webkitFullScreenKeyboardInputAllowed", + "webkitFullscreenElement", + "webkitFullscreenEnabled", + "webkitGenerateKeyRequest", + "webkitGetAsEntry", + "webkitGetDatabaseNames", + "webkitGetEntries", + "webkitGetEntriesByName", + "webkitGetEntriesByType", + "webkitGetFlowByName", + "webkitGetGamepads", + "webkitGetImageDataHD", + "webkitGetNamedFlows", + "webkitGetRegionFlowRanges", + "webkitGetUserMedia", + "webkitHasClosedCaptions", + "webkitHidden", + "webkitIDBCursor", + "webkitIDBDatabase", + "webkitIDBDatabaseError", + "webkitIDBDatabaseException", + "webkitIDBFactory", + "webkitIDBIndex", + "webkitIDBKeyRange", + "webkitIDBObjectStore", + "webkitIDBRequest", + "webkitIDBTransaction", + "webkitImageSmoothingEnabled", + "webkitIndexedDB", + "webkitInitMessageEvent", + "webkitIsFullScreen", + "webkitKeys", + "webkitLineDashOffset", + "webkitLockOrientation", + "webkitMatchesSelector", + "webkitMediaStream", + "webkitNotifications", + "webkitOfflineAudioContext", + "webkitOrientation", + "webkitPeerConnection00", + "webkitPersistentStorage", + "webkitPointerLockElement", + "webkitPostMessage", + "webkitPreservesPitch", + "webkitPutImageDataHD", + "webkitRTCPeerConnection", + "webkitRegionOverset", + "webkitRequestAnimationFrame", + "webkitRequestFileSystem", + "webkitRequestFullScreen", + "webkitRequestFullscreen", + "webkitRequestPointerLock", + "webkitResolveLocalFileSystemURL", + "webkitSetMediaKeys", + "webkitSetResourceTimingBufferSize", + "webkitShadowRoot", + "webkitShowPlaybackTargetPicker", + "webkitSlice", + "webkitSpeechGrammar", + "webkitSpeechGrammarList", + "webkitSpeechRecognition", + "webkitSpeechRecognitionError", + "webkitSpeechRecognitionEvent", + "webkitStorageInfo", + "webkitSupportsFullscreen", + "webkitTemporaryStorage", + "webkitTextSizeAdjust", + "webkitTransform", + "webkitTransformOrigin", + "webkitTransition", + "webkitTransitionDelay", + "webkitTransitionDuration", + "webkitTransitionProperty", + "webkitTransitionTimingFunction", + "webkitURL", + "webkitUnlockOrientation", + "webkitUserSelect", + "webkitVideoDecodedByteCount", + "webkitVisibilityState", + "webkitWirelessVideoPlaybackDisabled", + "webkitdropzone", + "webstore", + "weight", + "whatToShow", + "wheelDelta", + "wheelDeltaX", + "wheelDeltaY", + "which", + "white-space", + "whiteSpace", + "wholeText", + "widows", + "width", + "will-change", + "willChange", + "willValidate", + "window", + "withCredentials", + "word-break", + "word-spacing", + "word-wrap", + "wordBreak", + "wordSpacing", + "wordWrap", + "wrap", + "wrapKey", + "write", + "writeln", + "writingMode", + "x", + "x1", + "x2", + "xChannelSelector", + "xmlEncoding", + "xmlStandalone", + "xmlVersion", + "xmlbase", + "xmllang", + "xmlspace", + "y", + "y1", + "y2", + "yChannelSelector", + "yandex", + "z", + "z-index", + "zIndex", + "zoom", + "zoomAndPan", + "zoomRectScreen" + ] +} diff --git a/tools/eslint/node_modules/uglify-js/tools/exports.js b/tools/eslint/node_modules/uglify-js/tools/exports.js new file mode 100644 index 00000000000000..5007e03b556c3b --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/tools/exports.js @@ -0,0 +1,17 @@ +exports["Compressor"] = Compressor; +exports["DefaultsError"] = DefaultsError; +exports["Dictionary"] = Dictionary; +exports["JS_Parse_Error"] = JS_Parse_Error; +exports["MAP"] = MAP; +exports["OutputStream"] = OutputStream; +exports["SourceMap"] = SourceMap; +exports["TreeTransformer"] = TreeTransformer; +exports["TreeWalker"] = TreeWalker; +exports["base54"] = base54; +exports["defaults"] = defaults; +exports["mangle_properties"] = mangle_properties; +exports["merge"] = merge; +exports["parse"] = parse; +exports["push_uniq"] = push_uniq; +exports["string_template"] = string_template; +exports["is_identifier"] = is_identifier; diff --git a/tools/eslint/node_modules/uglify-js/tools/node.js b/tools/eslint/node_modules/uglify-js/tools/node.js new file mode 100644 index 00000000000000..f60486615485ba --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/tools/node.js @@ -0,0 +1,236 @@ +var path = require("path"); +var fs = require("fs"); + +var FILES = exports.FILES = [ + "../lib/utils.js", + "../lib/ast.js", + "../lib/parse.js", + "../lib/transform.js", + "../lib/scope.js", + "../lib/output.js", + "../lib/compress.js", + "../lib/sourcemap.js", + "../lib/mozilla-ast.js", + "../lib/propmangle.js", + "./exports.js", +].map(function(file){ + return fs.realpathSync(path.join(path.dirname(__filename), file)); +}); + +var UglifyJS = exports; + +new Function("MOZ_SourceMap", "exports", FILES.map(function(file){ + return fs.readFileSync(file, "utf8"); +}).join("\n\n"))( + require("source-map"), + UglifyJS +); + +UglifyJS.AST_Node.warn_function = function(txt) { + console.error("WARN: %s", txt); +}; + +exports.minify = function(files, options) { + options = UglifyJS.defaults(options, { + spidermonkey : false, + outSourceMap : null, + sourceRoot : null, + inSourceMap : null, + fromString : false, + warnings : false, + mangle : {}, + output : null, + compress : {} + }); + UglifyJS.base54.reset(); + + // 1. parse + var toplevel = null, + sourcesContent = {}; + + if (options.spidermonkey) { + toplevel = UglifyJS.AST_Node.from_mozilla_ast(files); + } else { + if (typeof files == "string") + files = [ files ]; + files.forEach(function(file, i){ + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + sourcesContent[file] = code; + toplevel = UglifyJS.parse(code, { + filename: options.fromString ? i : file, + toplevel: toplevel + }); + }); + } + if (options.wrap) { + toplevel = toplevel.wrap_commonjs(options.wrap, options.exportAll); + } + + // 2. compress + if (options.compress) { + var compress = { warnings: options.warnings }; + UglifyJS.merge(compress, options.compress); + toplevel.figure_out_scope(); + var sq = UglifyJS.Compressor(compress); + toplevel = toplevel.transform(sq); + } + + // 3. mangle + if (options.mangle) { + toplevel.figure_out_scope(options.mangle); + toplevel.compute_char_frequency(options.mangle); + toplevel.mangle_names(options.mangle); + } + + // 4. output + var inMap = options.inSourceMap; + var output = {}; + if (typeof options.inSourceMap == "string") { + inMap = fs.readFileSync(options.inSourceMap, "utf8"); + } + if (options.outSourceMap) { + output.source_map = UglifyJS.SourceMap({ + file: options.outSourceMap, + orig: inMap, + root: options.sourceRoot + }); + if (options.sourceMapIncludeSources) { + for (var file in sourcesContent) { + if (sourcesContent.hasOwnProperty(file)) { + output.source_map.get().setSourceContent(file, sourcesContent[file]); + } + } + } + + } + if (options.output) { + UglifyJS.merge(output, options.output); + } + var stream = UglifyJS.OutputStream(output); + toplevel.print(stream); + + if (options.outSourceMap && "string" === typeof options.outSourceMap) { + stream += "\n//# sourceMappingURL=" + options.outSourceMap; + } + + var source_map = output.source_map; + if (source_map) { + source_map = source_map + ""; + } + + return { + code : stream + "", + map : source_map + }; +}; + +// exports.describe_ast = function() { +// function doitem(ctor) { +// var sub = {}; +// ctor.SUBCLASSES.forEach(function(ctor){ +// sub[ctor.TYPE] = doitem(ctor); +// }); +// var ret = {}; +// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; +// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; +// return ret; +// } +// return doitem(UglifyJS.AST_Node).sub; +// } + +exports.describe_ast = function() { + var out = UglifyJS.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop){ + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function(){ + props.forEach(function(prop, i){ + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function(){ + ctor.SUBCLASSES.forEach(function(ctor, i){ + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + }; + doitem(UglifyJS.AST_Node); + return out + ""; +}; + +function readReservedFile(filename, reserved) { + if (!reserved) { + reserved = { vars: [], props: [] }; + } + var data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + if (data.vars) { + data.vars.forEach(function(name){ + UglifyJS.push_uniq(reserved.vars, name); + }); + } + if (data.props) { + data.props.forEach(function(name){ + UglifyJS.push_uniq(reserved.props, name); + }); + } + return reserved; +} + +exports.readReservedFile = readReservedFile; + +exports.readDefaultReservedFile = function(reserved) { + return readReservedFile(path.join(__dirname, "domprops.json"), reserved); +}; + +exports.readNameCache = function(filename, key) { + var cache = null; + if (filename) { + try { + var cache = fs.readFileSync(filename, "utf8"); + cache = JSON.parse(cache)[key]; + if (!cache) throw "init"; + cache.props = UglifyJS.Dictionary.fromObject(cache.props); + } catch(ex) { + cache = { + cname: -1, + props: new UglifyJS.Dictionary() + }; + } + } + return cache; +}; + +exports.writeNameCache = function(filename, key, cache) { + if (filename) { + var data; + try { + data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + } catch(ex) { + data = {}; + } + data[key] = { + cname: cache.cname, + props: cache.props.toObject() + }; + fs.writeFileSync(filename, JSON.stringify(data, null, 2), "utf8"); + } +}; diff --git a/tools/eslint/node_modules/uglify-js/tools/props.html b/tools/eslint/node_modules/uglify-js/tools/props.html new file mode 100644 index 00000000000000..f7c777aac2fc5b --- /dev/null +++ b/tools/eslint/node_modules/uglify-js/tools/props.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/tools/eslint/node_modules/uglify-to-browserify/LICENSE b/tools/eslint/node_modules/uglify-to-browserify/LICENSE new file mode 100644 index 00000000000000..35cc606fb4e0ad --- /dev/null +++ b/tools/eslint/node_modules/uglify-to-browserify/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Forbes Lindesay + +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/tools/eslint/node_modules/uglify-to-browserify/README.md b/tools/eslint/node_modules/uglify-to-browserify/README.md new file mode 100644 index 00000000000000..c5dde969cdbf82 --- /dev/null +++ b/tools/eslint/node_modules/uglify-to-browserify/README.md @@ -0,0 +1,15 @@ +# uglify-to-browserify + +A transform to make UglifyJS work in browserify. + +[![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify) +[![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify) + +## Installation + + npm install uglify-to-browserify + +## License + + MIT \ No newline at end of file diff --git a/tools/eslint/node_modules/uglify-to-browserify/index.js b/tools/eslint/node_modules/uglify-to-browserify/index.js new file mode 100644 index 00000000000000..c1741b27ccad74 --- /dev/null +++ b/tools/eslint/node_modules/uglify-to-browserify/index.js @@ -0,0 +1,49 @@ +'use strict' + +var fs = require('fs') +var PassThrough = require('stream').PassThrough +var Transform = require('stream').Transform + +if (typeof Transform === 'undefined') { + throw new Error('UglifyJS only supports browserify when using node >= 0.10.x') +} + +var cache = {} +module.exports = transform +function transform(file) { + if (!/tools\/node\.js$/.test(file.replace(/\\/g,'/'))) return new PassThrough(); + if (cache[file]) return makeStream(cache[file]) + var uglify = require(file) + var src = 'var sys = require("util");\nvar MOZ_SourceMap = require("source-map");\nvar UglifyJS = exports;\n' + uglify.FILES.map(function (path) { return fs.readFileSync(path, 'utf8') }).join('\n') + + var ast = uglify.parse(src) + ast.figure_out_scope() + + var variables = ast.variables + .map(function (node, name) { + return name + }) + + src += '\n\n' + variables.map(function (v) { return 'exports.' + v + ' = ' + v + ';' }).join('\n') + '\n\n' + + src += 'exports.AST_Node.warn_function = function (txt) { if (typeof console != "undefined" && typeof console.warn === "function") console.warn(txt) }\n\n' + + src += 'exports.minify = ' + uglify.minify.toString() + ';\n\n' + src += 'exports.describe_ast = ' + uglify.describe_ast.toString() + ';' + + // TODO: remove once https://github.com/substack/node-browserify/issues/631 is resolved + src = src.replace(/"for"/g, '"fo" + "r"') + + cache[file] = src + return makeStream(src); +} + +function makeStream(src) { + var res = new Transform(); + res._transform = function (chunk, encoding, callback) { callback() } + res._flush = function (callback) { + res.push(src) + callback() + } + return res; +} diff --git a/tools/eslint/node_modules/uglify-to-browserify/package.json b/tools/eslint/node_modules/uglify-to-browserify/package.json new file mode 100644 index 00000000000000..49d5b464877371 --- /dev/null +++ b/tools/eslint/node_modules/uglify-to-browserify/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "uglify-to-browserify@~1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js" + ] + ], + "_from": "uglify-to-browserify@>=1.0.0 <1.1.0", + "_id": "uglify-to-browserify@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/uglify-to-browserify", + "_npmUser": { + "email": "forbes@lindeay.co.uk", + "name": "forbeslindesay" + }, + "_npmVersion": "1.3.14", + "_phantomChildren": {}, + "_requested": { + "name": "uglify-to-browserify", + "raw": "uglify-to-browserify@~1.0.0", + "rawSpec": "~1.0.0", + "scope": null, + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/uglify-js" + ], + "_resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "_shasum": "6e0924d6bda6b5afe349e39a6d632850a0f882b7", + "_shrinkwrap": null, + "_spec": "uglify-to-browserify@~1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/uglify-to-browserify/issues" + }, + "dependencies": {}, + "description": "A transform to make UglifyJS work in browserify.", + "devDependencies": { + "source-map": "~0.1.27", + "uglify-js": "~2.4.0" + }, + "directories": {}, + "dist": { + "shasum": "6e0924d6bda6b5afe349e39a6d632850a0f882b7", + "tarball": "http://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" + }, + "homepage": "https://github.com/ForbesLindesay/uglify-to-browserify", + "keywords": [], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "uglify-to-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/uglify-to-browserify.git" + }, + "scripts": { + "test": "node test/index.js" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/user-home/cli.js b/tools/eslint/node_modules/user-home/cli.js deleted file mode 100755 index bacbd22755e08f..00000000000000 --- a/tools/eslint/node_modules/user-home/cli.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var pkg = require('./package.json'); -var userHome = require('./'); - -function help() { - console.log([ - pkg.description, - '', - 'Example', - ' $ user-home', - ' /Users/sindresorhus' - ].join('\n')); -} - -if (process.argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (process.argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -process.stdout.write(userHome); diff --git a/tools/eslint/node_modules/user-home/index.js b/tools/eslint/node_modules/user-home/index.js index d53b7939ae6a4f..fdff72164c7603 100644 --- a/tools/eslint/node_modules/user-home/index.js +++ b/tools/eslint/node_modules/user-home/index.js @@ -1,15 +1,2 @@ 'use strict'; -var env = process.env; -var home = env.HOME; -var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; - -if (process.platform === 'win32') { - module.exports = env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; -} else if (process.platform === 'darwin') { - module.exports = home || (user ? '/Users/' + user : null) || null; -} else if (process.platform === 'linux') { - module.exports = home || - (user ? (process.getuid() === 0 ? '/root' : '/home/' + user) : null) || null; -} else { - module.exports = home || null; -} +module.exports = require('os-homedir')(); diff --git a/tools/eslint/node_modules/user-home/package.json b/tools/eslint/node_modules/user-home/package.json index 8b9e8b4854d16d..22662ce1a9d082 100644 --- a/tools/eslint/node_modules/user-home/package.json +++ b/tools/eslint/node_modules/user-home/package.json @@ -1,69 +1,98 @@ { - "name": "user-home", - "version": "1.1.1", - "description": "Get the path to the user home directory", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/user-home.git" + "_args": [ + [ + "user-home@^2.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "user-home@>=2.0.0 <3.0.0", + "_id": "user-home@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/user-home", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" }, - "bin": { - "user-home": "cli.js" + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "user-home", + "raw": "user-home@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "_shasum": "9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f", + "_shrinkwrap": null, + "_spec": "user-home@^2.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", "author": { - "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/user-home/issues" + }, + "dependencies": { + "os-homedir": "^1.0.0" + }, + "description": "Get the path to the user home directory", + "devDependencies": { + "ava": "0.0.4", + "path-exists": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f", + "tarball": "http://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz" }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "node test.js" - }, "files": [ - "index.js", - "cli.js" + "index.js" ], + "gitHead": "23e6d1e2dd553b599c787348f82bd2463225cc80", + "homepage": "https://github.com/sindresorhus/user-home", "keywords": [ - "cli", - "bin", - "user", - "home", - "homedir", "dir", "directory", + "env", + "environment", "folder", - "path" + "home", + "homedir", + "os-homedir", + "path", + "user", + "userprofile", + "variables", + "vars" ], - "devDependencies": { - "ava": "0.0.3" - }, - "gitHead": "cf6ba885d3e6bf625fb3c15ad0334fa623968481", - "bugs": { - "url": "https://github.com/sindresorhus/user-home/issues" - }, - "homepage": "https://github.com/sindresorhus/user-home", - "_id": "user-home@1.1.1", - "_shasum": "2b5be23a32b63a7c9deb8d0f28d485724a3df190", - "_from": "user-home@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, + "license": "MIT", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], - "dist": { - "shasum": "2b5be23a32b63a7c9deb8d0f28d485724a3df190", - "tarball": "http://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + "name": "user-home", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/user-home.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "test": "node test.js" + }, + "version": "2.0.0" } diff --git a/tools/eslint/node_modules/user-home/readme.md b/tools/eslint/node_modules/user-home/readme.md index 5307a07ef5144c..944188c779a27b 100644 --- a/tools/eslint/node_modules/user-home/readme.md +++ b/tools/eslint/node_modules/user-home/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save user-home ``` @@ -16,25 +16,16 @@ $ npm install --save user-home var userHome = require('user-home'); console.log(userHome); -//=> /Users/sindresorhus +//=> '/Users/sindresorhus' ``` Returns `null` in the unlikely scenario that the home directory can't be found. -## CLI - -```sh -$ npm install --global user-home -``` +## Related -```sh -$ user-home --help - -Example - $ user-home - /Users/sindresorhus -``` +- [user-home-cli](https://github.com/sindresorhus/user-home-cli) - CLI for this module +- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory ## License diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/tools/eslint/node_modules/util-deprecate/LICENSE similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE rename to tools/eslint/node_modules/util-deprecate/LICENSE diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md b/tools/eslint/node_modules/util-deprecate/README.md similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md rename to tools/eslint/node_modules/util-deprecate/README.md diff --git a/tools/eslint/node_modules/util-deprecate/browser.js b/tools/eslint/node_modules/util-deprecate/browser.js new file mode 100644 index 00000000000000..549ae2f065ea5a --- /dev/null +++ b/tools/eslint/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js b/tools/eslint/node_modules/util-deprecate/node.js similarity index 100% rename from tools/eslint/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js rename to tools/eslint/node_modules/util-deprecate/node.js diff --git a/tools/eslint/node_modules/util-deprecate/package.json b/tools/eslint/node_modules/util-deprecate/package.json new file mode 100644 index 00000000000000..9d80811ed1b921 --- /dev/null +++ b/tools/eslint/node_modules/util-deprecate/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "util-deprecate@~1.0.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream" + ] + ], + "_from": "util-deprecate@>=1.0.1 <1.1.0", + "_id": "util-deprecate@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/eslint/util-deprecate", + "_nodeVersion": "4.1.2", + "_npmUser": { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "util-deprecate", + "raw": "util-deprecate@~1.0.1", + "rawSpec": "~1.0.1", + "scope": null, + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_shrinkwrap": null, + "_spec": "util-deprecate@~1.0.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/readable-stream", + "author": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "url": "http://n8.io/" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "dependencies": {}, + "description": "The Node.js `util.deprecate()` function with browser support", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "browser", + "browserify", + "deprecate", + "node", + "util" + ], + "license": "MIT", + "main": "node.js", + "maintainers": [ + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "util-deprecate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/window-size/LICENSE-MIT b/tools/eslint/node_modules/window-size/LICENSE-MIT new file mode 100644 index 00000000000000..e25dca2f36b652 --- /dev/null +++ b/tools/eslint/node_modules/window-size/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2014 Jon Schlinkert + +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/eslint/node_modules/window-size/README.md b/tools/eslint/node_modules/window-size/README.md new file mode 100644 index 00000000000000..25472830d5cf6e --- /dev/null +++ b/tools/eslint/node_modules/window-size/README.md @@ -0,0 +1,26 @@ +# window-size [![NPM version](https://badge.fury.io/js/window-size.png)](http://badge.fury.io/js/window-size) + +> Reliable way to to get the height and width of the terminal/console in a node.js environment. + +## Install + +### [npm](npmjs.org) + +```bash +npm i window-size --save +``` + +```javascript +var size = require('window-size'); +size.height; // "80" (rows) +size.width; // "25" (columns) +``` + +## Author + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Licensed under the MIT license. \ No newline at end of file diff --git a/tools/eslint/node_modules/window-size/index.js b/tools/eslint/node_modules/window-size/index.js new file mode 100644 index 00000000000000..9af5b02518688a --- /dev/null +++ b/tools/eslint/node_modules/window-size/index.js @@ -0,0 +1,33 @@ +/* + * window-size + * https://github.com/jonschlinkert/window-size + * + * Copyright (c) 2014 Jon Schlinkert + * Licensed under the MIT license. + */ + +const tty = require('tty') + +module.exports = (function() { + var width; + var height; + + if(tty.isatty(1) && tty.isatty(2)) { + if(process.stdout.getWindowSize) { + width = process.stdout.getWindowSize(1)[0]; + height = process.stdout.getWindowSize(1)[1]; + } else if (tty.getWindowSize) { + width = tty.getWindowSize()[1]; + height = tty.getWindowSize()[0]; + } else if (process.stdout.columns && process.stdout.rows) { + height = process.stdout.columns; + width = process.stdout.rows; + } + } else { + new Error('Error: could not get window size with tty or process.stdout'); + } + return { + height: height, + width: width + } +})(); \ No newline at end of file diff --git a/tools/eslint/node_modules/window-size/package.json b/tools/eslint/node_modules/window-size/package.json new file mode 100644 index 00000000000000..8b5db3595cb03e --- /dev/null +++ b/tools/eslint/node_modules/window-size/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "window-size@0.1.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/yargs" + ] + ], + "_from": "window-size@0.1.0", + "_id": "window-size@0.1.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/window-size", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "name": "window-size", + "raw": "window-size@0.1.0", + "rawSpec": "0.1.0", + "scope": null, + "spec": "0.1.0", + "type": "version" + }, + "_requiredBy": [ + "/eslint/yargs" + ], + "_resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "_shasum": "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d", + "_shrinkwrap": null, + "_spec": "window-size@0.1.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/yargs", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/window-size/issues" + }, + "dependencies": {}, + "description": "Reliable way to to get the height and width of the terminal/console in a node.js environment.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d", + "tarball": "http://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "homepage": "https://github.com/jonschlinkert/window-size", + "keywords": [ + "console", + "terminal", + "tty", + "window" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/jonschlinkert/window-size/blob/master/LICENSE-MIT" + } + ], + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "window-size", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/window-size.git" + }, + "version": "0.1.0" +} diff --git a/tools/eslint/node_modules/wordwrap/LICENSE b/tools/eslint/node_modules/wordwrap/LICENSE new file mode 100644 index 00000000000000..ee27ba4b4412b0 --- /dev/null +++ b/tools/eslint/node_modules/wordwrap/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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/eslint/node_modules/wordwrap/README.markdown b/tools/eslint/node_modules/wordwrap/README.markdown new file mode 100644 index 00000000000000..346374e0d480bb --- /dev/null +++ b/tools/eslint/node_modules/wordwrap/README.markdown @@ -0,0 +1,70 @@ +wordwrap +======== + +Wrap your words. + +example +======= + +made out of meat +---------------- + +meat.js + + var wrap = require('wordwrap')(15); + console.log(wrap('You and your whole family are made out of meat.')); + +output: + + You and your + whole family + are made out + of meat. + +centered +-------- + +center.js + + var wrap = require('wordwrap')(20, 60); + console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' + )); + +output: + + At long last the struggle and tumult + was over. The machines had finally cast + off their oppressors and were finally + free to roam the cosmos. + Free of purpose, free of obligation. + Just drifting through emptiness. The + sun was just another point of light. + +methods +======= + +var wrap = require('wordwrap'); + +wrap(stop), wrap(start, stop, params={mode:"soft"}) +--------------------------------------------------- + +Returns a function that takes a string and returns a new string. + +Pad out lines with spaces out to column `start` and then wrap until column +`stop`. If a word is longer than `stop - start` characters it will overflow. + +In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are +longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break +up chunks longer than `stop - start`. + +wrap.hard(start, stop) +---------------------- + +Like `wrap()` but with `params.mode = "hard"`. diff --git a/tools/eslint/node_modules/wordwrap/index.js b/tools/eslint/node_modules/wordwrap/index.js new file mode 100644 index 00000000000000..67c8a61ecb8f6d --- /dev/null +++ b/tools/eslint/node_modules/wordwrap/index.js @@ -0,0 +1,76 @@ +var wordwrap = module.exports = function (start, stop, params) { + if (typeof start === 'object') { + params = start; + start = params.start; + stop = params.stop; + } + + if (typeof stop === 'object') { + params = stop; + start = start || params.start; + stop = undefined; + } + + if (!stop) { + stop = start; + start = 0; + } + + if (!params) params = {}; + var mode = params.mode || 'soft'; + var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; + + return function (text) { + var chunks = text.toString() + .split(re) + .reduce(function (acc, x) { + if (mode === 'hard') { + for (var i = 0; i < x.length; i += stop - start) { + acc.push(x.slice(i, i + stop - start)); + } + } + else acc.push(x) + return acc; + }, []) + ; + + return chunks.reduce(function (lines, rawChunk) { + if (rawChunk === '') return lines; + + var chunk = rawChunk.replace(/\t/g, ' '); + + var i = lines.length - 1; + if (lines[i].length + chunk.length > stop) { + lines[i] = lines[i].replace(/\s+$/, ''); + + chunk.split(/\n/).forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else if (chunk.match(/\n/)) { + var xs = chunk.split(/\n/); + lines[i] += xs.shift(); + xs.forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else { + lines[i] += chunk; + } + + return lines; + }, [ new Array(start + 1).join(' ') ]).join('\n'); + }; +}; + +wordwrap.soft = wordwrap; + +wordwrap.hard = function (start, stop) { + return wordwrap(start, stop, { mode : 'hard' }); +}; diff --git a/tools/eslint/node_modules/wordwrap/package.json b/tools/eslint/node_modules/wordwrap/package.json new file mode 100644 index 00000000000000..7f97b8c4a74817 --- /dev/null +++ b/tools/eslint/node_modules/wordwrap/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "wordwrap@~0.0.2", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optimist" + ] + ], + "_from": "wordwrap@>=0.0.2 <0.1.0", + "_id": "wordwrap@0.0.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint/wordwrap", + "_nodeVersion": "2.0.0", + "_npmUser": { + "email": "substack@gmail.com", + "name": "substack" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "name": "wordwrap", + "raw": "wordwrap@~0.0.2", + "rawSpec": "~0.0.2", + "scope": null, + "spec": ">=0.0.2 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/optimist", + "/eslint/optionator" + ], + "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "_shrinkwrap": null, + "_spec": "wordwrap@~0.0.2", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/optimist", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-wordwrap/issues" + }, + "dependencies": {}, + "description": "Wrap those words. Show them at what columns to start and stop.", + "devDependencies": { + "expresso": "=0.7.x" + }, + "directories": { + "example": "example", + "lib": ".", + "test": "test" + }, + "dist": { + "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", + "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", + "homepage": "https://github.com/substack/node-wordwrap#readme", + "keywords": [ + "column", + "format", + "rule", + "word", + "wrap" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "wordwrap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-wordwrap.git" + }, + "scripts": { + "test": "expresso" + }, + "version": "0.0.3" +} diff --git a/tools/eslint/node_modules/wrappy/LICENSE b/tools/eslint/node_modules/wrappy/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/wrappy/README.md b/tools/eslint/node_modules/wrappy/README.md new file mode 100644 index 00000000000000..98eab2522b86e5 --- /dev/null +++ b/tools/eslint/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/tools/eslint/node_modules/wrappy/package.json b/tools/eslint/node_modules/wrappy/package.json new file mode 100644 index 00000000000000..9a2e5d64d0833e --- /dev/null +++ b/tools/eslint/node_modules/wrappy/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "wrappy@1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inflight" + ] + ], + "_from": "wrappy@>=1.0.0 <2.0.0", + "_id": "wrappy@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/wrappy", + "_nodeVersion": "0.10.31", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "2.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "wrappy", + "raw": "wrappy@1", + "rawSpec": "1", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/inflight", + "/eslint/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_shrinkwrap": null, + "_spec": "wrappy@1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/inflight", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^0.4.12" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.1" +} diff --git a/tools/eslint/node_modules/wrappy/wrappy.js b/tools/eslint/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000000000..bb7e7d6fcf70fd --- /dev/null +++ b/tools/eslint/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/tools/eslint/node_modules/write/LICENSE b/tools/eslint/node_modules/write/LICENSE new file mode 100644 index 00000000000000..fa30c4cb3e4c15 --- /dev/null +++ b/tools/eslint/node_modules/write/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +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/eslint/node_modules/write/README.md b/tools/eslint/node_modules/write/README.md new file mode 100644 index 00000000000000..f5b9bc85ba1ccf --- /dev/null +++ b/tools/eslint/node_modules/write/README.md @@ -0,0 +1,101 @@ +# write [![NPM version](https://badge.fury.io/js/write.svg)](http://badge.fury.io/js/write) [![Build Status](https://travis-ci.org/jonschlinkert/write.svg)](https://travis-ci.org/jonschlinkert/write) + +> Write files to disk, creating intermediate directories if they don't exist. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i write --save +``` + +## API docs + +### [writeFile](index.js#L32) + +Asynchronously write a file to disk. Creates any intermediate directories if they don't already exist. + +**Params** + +* `dest` **{String}**: Destination file path +* `str` **{String}**: String to write to disk. +* `callback` **{Function}** + +**Example** + +```js +var writeFile = require('write'); +writeFile('foo.txt', 'This is content to write.', function(err) { + if (err) console.log(err); +}); +``` + +### [.writeFile.sync](index.js#L64) + +Synchronously write files to disk. Creates any intermediate directories if they don't already exist. + +**Params** + +* `dest` **{String}**: Destination file path +* `str` **{String}**: String to write to disk. + +**Example** + +```js +var writeFile = require('write'); +writeFile.sync('foo.txt', 'This is content to write.'); +``` + +### [.writeFile.stream](index.js#L87) + +Uses `fs.createWriteStream`, but also creates any intermediate directories if they don't already exist. + +**Params** + +* `dest` **{String}**: Destination file path +* `returns` **{Stream}**: Returns a write stream. + +**Example** + +```js +var write = require('write'); +write.stream('foo.txt'); +``` + +## Related + +* [delete](https://github.com/jonschlinkert/delete): Delete files and folders and any intermediate directories if they exist (sync and async). +* [read-yaml](https://github.com/jonschlinkert/read-yaml): Very thin wrapper around js-yaml for directly reading in YAML files. +* [read-json](https://github.com/azer/read-json): Reads and parses a JSON file. +* [read-data](https://github.com/jonschlinkert/read-data): Read JSON or YAML files. +* [write-yaml](https://github.com/jonschlinkert/write-yaml): Write YAML. Converts JSON to YAML writes it to the specified file. +* [write-json](https://github.com/jonschlinkert/write-json): Write a JSON to file disk, also creates directories in the dest path if they… [more](https://github.com/jonschlinkert/write-json) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/write/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 29, 2015._ + + \ No newline at end of file diff --git a/tools/eslint/node_modules/write/index.js b/tools/eslint/node_modules/write/index.js new file mode 100644 index 00000000000000..f952638d0d4520 --- /dev/null +++ b/tools/eslint/node_modules/write/index.js @@ -0,0 +1,93 @@ +/*! + * write + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var mkdir = require('mkdirp'); + +/** + * Asynchronously write a file to disk. Creates any intermediate + * directories if they don't already exist. + * + * ```js + * var writeFile = require('write'); + * writeFile('foo.txt', 'This is content to write.', function(err) { + * if (err) console.log(err); + * }); + * ``` + * + * @name writeFile + * @param {String} `dest` Destination file path + * @param {String} `str` String to write to disk. + * @param {Function} `callback` + * @api public + */ + +module.exports = function writeFile(dest, str, cb) { + var dir = path.dirname(dest); + fs.exists(dir, function (exists) { + if (exists) { + fs.writeFile(dest, str, cb); + } else { + mkdir(dir, function (err) { + if (err) { + return cb(err); + } else { + fs.writeFile(dest, str, cb); + } + }); + } + }); +}; + +/** + * Synchronously write files to disk. Creates any intermediate + * directories if they don't already exist. + * + * ```js + * var writeFile = require('write'); + * writeFile.sync('foo.txt', 'This is content to write.'); + * ``` + * + * @name writeFile.sync + * @param {String} `dest` Destination file path + * @param {String} `str` String to write to disk. + * @api public + */ + +module.exports.sync = function writeFileSync(dest, str) { + var dir = path.dirname(dest); + if (!fs.existsSync(dir)) { + mkdir.sync(dir); + } + fs.writeFileSync(dest, str); +}; + +/** + * Uses `fs.createWriteStream`, but also creates any intermediate + * directories if they don't already exist. + * + * ```js + * var write = require('write'); + * write.stream('foo.txt'); + * ``` + * + * @name writeFile.stream + * @param {String} `dest` Destination file path + * @return {Stream} Returns a write stream. + * @api public + */ + +module.exports.stream = function writeFileStream(dest) { + var dir = path.dirname(dest); + if (!fs.existsSync(dir)) { + mkdir.sync(dir); + } + return fs.createWriteStream(dest); +}; diff --git a/tools/eslint/node_modules/write/package.json b/tools/eslint/node_modules/write/package.json new file mode 100644 index 00000000000000..576a0e5f2591bf --- /dev/null +++ b/tools/eslint/node_modules/write/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "write@^0.2.1", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/flat-cache" + ] + ], + "_from": "write@>=0.2.1 <0.3.0", + "_id": "write@0.2.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/write", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "write", + "raw": "write@^0.2.1", + "rawSpec": "^0.2.1", + "scope": null, + "spec": ">=0.2.1 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "_shasum": "5fc03828e264cea3fe91455476f7a3c566cb0757", + "_shrinkwrap": null, + "_spec": "write@^0.2.1", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/flat-cache", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/write/issues" + }, + "dependencies": { + "mkdirp": "^0.5.1" + }, + "description": "Write files to disk, creating intermediate directories if they don't exist.", + "devDependencies": { + "async": "^1.4.0", + "delete": "^0.2.1", + "mocha": "^2.2.5", + "should": "^7.0.2" + }, + "directories": {}, + "dist": { + "shasum": "5fc03828e264cea3fe91455476f7a3c566cb0757", + "tarball": "http://registry.npmjs.org/write/-/write-0.2.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "4fde911228a1d244d4439292d6850175c8195730", + "homepage": "https://github.com/jonschlinkert/write", + "keywords": [ + "file", + "filepath", + "files", + "filesystem", + "folder", + "fs", + "fs.writeFile", + "fs.writeFileSync", + "path", + "write" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "write", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/write.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.2.1" +} diff --git a/tools/eslint/node_modules/xml-escape/.npmignore b/tools/eslint/node_modules/xml-escape/.npmignore deleted file mode 100644 index a72b52ebe89779..00000000000000 --- a/tools/eslint/node_modules/xml-escape/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules diff --git a/tools/eslint/node_modules/xml-escape/package.json b/tools/eslint/node_modules/xml-escape/package.json index 46412796d2a5c1..7b79d30193a720 100644 --- a/tools/eslint/node_modules/xml-escape/package.json +++ b/tools/eslint/node_modules/xml-escape/package.json @@ -1,53 +1,78 @@ { - "name": "xml-escape", - "version": "1.0.0", - "description": "Escape XML ", - "main": "index.js", - "scripts": { - "test": "node test.js" + "_args": [ + [ + "xml-escape@~1.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint" + ] + ], + "_from": "xml-escape@>=1.0.0 <1.1.0", + "_id": "xml-escape@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/xml-escape", + "_npmUser": { + "email": "michael.hernandez1988@gmail.com", + "name": "mhernandez" }, - "repository": { - "type": "git", - "url": "git://github.com/miketheprogrammer/xml-escape.git" + "_npmVersion": "1.3.14", + "_phantomChildren": {}, + "_requested": { + "name": "xml-escape", + "raw": "xml-escape@~1.0.0", + "rawSpec": "~1.0.0", + "scope": null, + "spec": ">=1.0.0 <1.1.0", + "type": "range" }, - "keywords": [ - "Escape", - "XML", - "Unesacpe", - "encoding", - "xml-escape" + "_requiredBy": [ + "/eslint" ], + "_resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz", + "_shasum": "00963d697b2adf0c185c4e04e73174ba9b288eb2", + "_shrinkwrap": null, + "_spec": "xml-escape@~1.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint", "author": { "name": "Michael Hernandez - michael.hernandez1988@gmail.com" }, - "license": "MIT License", "bugs": { "url": "https://github.com/miketheprogrammer/xml-escape/issues" }, - "homepage": "https://github.com/miketheprogrammer/xml-escape", "dependencies": {}, + "description": "Escape XML ", "devDependencies": { "tape": "~2.4.2" }, - "_id": "xml-escape@1.0.0", + "directories": {}, "dist": { "shasum": "00963d697b2adf0c185c4e04e73174ba9b288eb2", "tarball": "http://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz" }, - "_from": "xml-escape@>=1.0.0 <1.1.0", - "_npmVersion": "1.3.14", - "_npmUser": { - "name": "mhernandez", - "email": "michael.hernandez1988@gmail.com" - }, + "homepage": "https://github.com/miketheprogrammer/xml-escape", + "keywords": [ + "Escape", + "Unesacpe", + "XML", + "encoding", + "xml-escape" + ], + "license": "MIT License", + "main": "index.js", "maintainers": [ { "name": "mhernandez", "email": "michael.hernandez1988@gmail.com" } ], - "directories": {}, - "_shasum": "00963d697b2adf0c185c4e04e73174ba9b288eb2", - "_resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "name": "xml-escape", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/miketheprogrammer/xml-escape.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" } diff --git a/tools/eslint/node_modules/xml-escape/test.js b/tools/eslint/node_modules/xml-escape/test.js deleted file mode 100644 index 211c3b8164dd0a..00000000000000 --- a/tools/eslint/node_modules/xml-escape/test.js +++ /dev/null @@ -1,7 +0,0 @@ -var test = require('tape'); -var escape = require('./index'); -test("Characters should be escaped properly", function (t) { - t.plan(1); - - t.equals(escape('" \' < > &'), '" ' < > &'); -}) \ No newline at end of file diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/LICENCE b/tools/eslint/node_modules/xtend/LICENCE similarity index 100% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/LICENCE rename to tools/eslint/node_modules/xtend/LICENCE diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/Makefile b/tools/eslint/node_modules/xtend/Makefile similarity index 100% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/Makefile rename to tools/eslint/node_modules/xtend/Makefile diff --git a/tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/README.md b/tools/eslint/node_modules/xtend/README.md similarity index 100% rename from tools/eslint/node_modules/is-my-json-valid/node_modules/xtend/README.md rename to tools/eslint/node_modules/xtend/README.md diff --git a/tools/eslint/node_modules/xtend/immutable.js b/tools/eslint/node_modules/xtend/immutable.js new file mode 100644 index 00000000000000..94889c9de11a18 --- /dev/null +++ b/tools/eslint/node_modules/xtend/immutable.js @@ -0,0 +1,19 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/tools/eslint/node_modules/xtend/mutable.js b/tools/eslint/node_modules/xtend/mutable.js new file mode 100644 index 00000000000000..72debede6ca585 --- /dev/null +++ b/tools/eslint/node_modules/xtend/mutable.js @@ -0,0 +1,17 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/tools/eslint/node_modules/xtend/package.json b/tools/eslint/node_modules/xtend/package.json new file mode 100644 index 00000000000000..330c6287455e5b --- /dev/null +++ b/tools/eslint/node_modules/xtend/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "xtend@^4.0.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid" + ] + ], + "_from": "xtend@>=4.0.0 <5.0.0", + "_id": "xtend@4.0.1", + "_inCache": true, + "_installable": true, + "_location": "/eslint/xtend", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "raynos2@gmail.com", + "name": "raynos" + }, + "_npmVersion": "2.14.1", + "_phantomChildren": {}, + "_requested": { + "name": "xtend", + "raw": "xtend@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/is-my-json-valid" + ], + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "_shrinkwrap": null, + "_spec": "xtend@^4.0.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/is-my-json-valid", + "author": { + "email": "raynos2@gmail.com", + "name": "Raynos" + }, + "bugs": { + "email": "raynos2@gmail.com", + "url": "https://github.com/Raynos/xtend/issues" + }, + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "dependencies": {}, + "description": "extend like a boss", + "devDependencies": { + "tape": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "gitHead": "23dc302a89756da89c1897bc732a752317e35390", + "homepage": "https://github.com/Raynos/xtend", + "keywords": [ + "array", + "extend", + "merge", + "object", + "options", + "opts" + ], + "license": "MIT", + "main": "immutable", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "name": "xtend", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "scripts": { + "test": "node test" + }, + "testling": { + "browsers": [ + "chrome/22..latest", + "chrome/canary", + "firefox/16..latest", + "firefox/nightly", + "ie/7..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "opera/12..latest", + "opera/next", + "safari/5.1..latest" + ], + "files": "test.js" + }, + "version": "4.0.1" +} diff --git a/tools/eslint/node_modules/yargs/LICENSE b/tools/eslint/node_modules/yargs/LICENSE new file mode 100644 index 00000000000000..432d1aeb01df66 --- /dev/null +++ b/tools/eslint/node_modules/yargs/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +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/eslint/node_modules/yargs/README.md b/tools/eslint/node_modules/yargs/README.md new file mode 100644 index 00000000000000..99086e6e95810c --- /dev/null +++ b/tools/eslint/node_modules/yargs/README.md @@ -0,0 +1,926 @@ +yargs +======== + +Yargs be a node.js library fer hearties tryin' ter parse optstrings. + +With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of course, being a simple option hash. + +[![Build Status](https://travis-ci.org/bcoe/yargs.png)](https://travis-ci.org/bcoe/yargs) +[![Dependency Status](https://gemnasium.com/bcoe/yargs.png)](https://gemnasium.com/bcoe/yargs) +[![Coverage Status](https://coveralls.io/repos/bcoe/yargs/badge.svg?branch=)](https://coveralls.io/r/bcoe/yargs?branch=) +[![NPM version](https://img.shields.io/npm/v/yargs.svg)](https://www.npmjs.com/package/yargs) + +> Yargs is the official successor to optimist. Please feel free to submit issues and pull requests. If you'd like to contribute and don't know where to start, have a look at [the issue list](https://github.com/bcoe/yargs/issues) :) + +examples +======== + +With yargs, the options be just a hash! +------------------------------------------------------------------- + +plunder.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!'); +} +else { + console.log('Retreat from the xupptumblers!'); +} +```` + +*** + + $ ./plunder.js --ships=4 --distance=22 + Plunder more riffiwobbles! + + $ ./plunder.js --ships 12 --distance 98.7 + Retreat from the xupptumblers! + +![Joe was one optimistic pirate.](http://i.imgur.com/4WFGVJ9.png) + +But don't walk the plank just yet! There be more! You can do short options: +------------------------------------------------- + +short.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; +console.log('(%d,%d)', argv.x, argv.y); +```` + +*** + + $ ./short.js -x 10 -y 21 + (10,21) + +And booleans, both long, short, and even grouped: +---------------------------------- + +bool.js: + +````javascript +#!/usr/bin/env node +var util = require('util'); +var argv = require('yargs').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le perroquet dit: ' : 'The parrot says: '); +} +console.log( + (argv.fr ? 'couac' : 'squawk') + (argv.p ? '!' : '') +); +```` + +*** + + $ ./bool.js -s + The parrot says: squawk + + $ ./bool.js -sp + The parrot says: squawk! + + $ ./bool.js -sp --fr + Le perroquet dit: couac! + +And non-hyphenated options too! Just use `argv._`! +------------------------------------------------- + +nonopt.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); +```` + +*** + + $ ./nonopt.js -x 6.82 -y 3.35 rum + (6.82,3.35) + [ 'rum' ] + + $ ./nonopt.js "me hearties" -x 0.54 yo -y 1.12 ho + (0.54,1.12) + [ 'me hearties', 'yo', 'ho' ] + +Yargs even counts your booleans! +---------------------------------------------------------------------- + +count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .count('verbose') + .alias('v', 'verbose') + .argv; + +VERBOSE_LEVEL = argv.verbose; + +function WARN() { VERBOSE_LEVEL >= 0 && console.log.apply(console, arguments); } +function INFO() { VERBOSE_LEVEL >= 1 && console.log.apply(console, arguments); } +function DEBUG() { VERBOSE_LEVEL >= 2 && console.log.apply(console, arguments); } + +WARN("Showing only important stuff"); +INFO("Showing semi-mportant stuff too"); +DEBUG("Extra chatty mode"); +```` + +*** + $ node count.js + Showing only important stuff + + $ node count.js -v + Showing only important stuff + Showing semi-important stuff too + + $ node count.js -vv + Showing only important stuff + Showing semi-important stuff too + Extra chatty mode + + $ node count.js -v --verbose + Showing only important stuff + Showing semi-important stuff too + Extra chatty mode + +Tell users how to use yer options and make demands. +------------------------------------------------- + +area.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Usage: $0 -w [num] -yh[num]') + .demand(['w','h']) + .argv; + +console.log("The area is:", argv.w * argv.h); +```` + +*** + + $ ./area.js -w 55 -h 11 + 605 + + $ node ./area.js -w 4.91 -w 2.51 + Usage: node ./area.js -w [num] -h [num] + + Options: + -w [required] + -h [required] + + Missing required arguments: h + +After yer demands have been met, demand more! Ask for non-hypenated arguments! +----------------------------------------- + +demand_count.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .demand(2) + .argv; +console.dir(argv) +```` + +*** + + $ ./demand_count.js a + Not enough arguments, expected 2, but only found 1 + $ ./demand_count.js a b + { _: [ 'a', 'b' ], '$0': 'node ./demand_count.js' } + $ ./demand_count.js a b c + { _: [ 'a', 'b', 'c' ], '$0': 'node ./demand_count.js' } + +EVEN MORE SHIVER ME TIMBERS! +------------------ + +default_singles.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_singles.js -x 5 + 15 + +default_hash.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .default({ x : 10, y : 10 }) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_hash.js -y 7 + 17 + +And if you really want to get all descriptive about it... +--------------------------------------------------------- + +boolean_single.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .boolean('v') + .argv +; +console.dir(argv.v); +console.dir(argv._); +```` + +*** + + $ ./boolean_single.js -v "me hearties" yo ho + true + [ 'me hearties', 'yo', 'ho' ] + + +boolean_double.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); +```` + +*** + + $ ./boolean_double.js -x -z one two three + [ true, false, true ] + [ 'one', 'two', 'three' ] + +Yargs is here to help you... +--------------------------- + +Ye can describe parameters fer help messages and set aliases. Yargs figures +out how ter format a handy help string automatically. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Usage: $0 [options]') + .command('count', 'Count the lines in a file') + .demand(1) + .example('$0 count -f foo.js', 'count the lines in the given file') + .demand('f') + .alias('f', 'file') + .nargs('f', 1) + .describe('f', 'Load a file') + .help('h') + .alias('h', 'help') + .epilog('copyright 2015') + .argv; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); +```` + +*** + $ node line_count.js count + Usage: node test.js [options] + + Commands: + count Count the lines in a file + + Options: + -f, --file Load a file [required] + -h, --help Show help + + Examples: + node test.js count -f foo.js count the lines in the given file + + copyright 2015 + + Missing required arguments: f + + $ node line_count.js count --file line_count.js + 20 + + $ node line_count.js count -f line_count.js + 20 + +methods +======= + +By itself, + +````javascript +require('yargs').argv +````` + +will use `process.argv` array to construct the `argv` object. + +You can pass in the `process.argv` yourself: + +````javascript +require('yargs')([ '-x', '1', '-y', '2' ]).argv +```` + +or use .parse() to do the same thing: + +````javascript +require('yargs').parse([ '-x', '1', '-y', '2' ]) +```` + +The rest of these methods below come in just before the terminating `.argv`. + +.alias(key, alias) +------------------ + +Set key names as equivalent such that updates to a key will propagate to aliases +and vice-versa. + +Optionally `.alias()` can take an object that maps keys to aliases. +Each key of this object should be the canonical version of the option, and each +value should be a string or an array of strings. + +.default(key, value, [description]) +-------------------- + +Set `argv[key]` to `value` if no option was specified on `process.argv`. + +Optionally `.default()` can take an object that maps keys to default values. + +But wait, there's more! the default value can be a `function` which returns +a value. The name of the function will be used in the usage string: + +```js +var argv = require('yargs') + .default('random', function randomValue() { + return Math.random() * 256; + }).argv; +``` + +Optionally, `description` can also be provided and will take precedence over +displaying the value in the usage instructions: + +```js +.default('timeout', 60000, '(one-minute)'); +``` + +.demand(key, [msg | boolean]) +----------------------------- +.require(key, [msg | boolean]) +------------------------------ +.required(key, [msg | boolean]) +------------------------------- + +If `key` is a string, show the usage information and exit if `key` wasn't +specified in `process.argv`. + +If `key` is a number, demand at least as many non-option arguments, which show +up in `argv._`. + +If `key` is an Array, demand each element. + +If a `msg` string is given, it will be printed when the argument is missing, +instead of the standard error message. This is especially helpful for the non-option arguments in `argv._`. + +If a `boolean` value is given, it controls whether the option is demanded; +this is useful when using `.options()` to specify command line parameters. + +.requiresArg(key) +----------------- + +Specifies either a single option key (string), or an array of options that +must be followed by option values. If any option value is missing, show the +usage information and exit. + +The default behaviour is to set the value of any key not followed by an +option value to `true`. + +.implies(x, y) +-------------- + +Given the key `x` is set, it is required that the key `y` is set. + +implies can also accept an object specifying multiple implications. + +.describe(key, desc) +-------------------- + +Describe a `key` for the generated usage information. + +Optionally `.describe()` can take an object that maps keys to descriptions. + +.option(key, opt) +----------------- +.options(key, opt) +------------------ + +Instead of chaining together `.alias().demand().default().describe().string()`, you can specify +keys in `opt` for each of the chainable methods. + +For example: + +````javascript +var argv = require('yargs') + .option('f', { + alias : 'file', + demand: true, + default: '/etc/passwd', + describe: 'x marks the spot', + type: 'string' + }) + .argv +; +```` + +is the same as + +````javascript +var argv = require('yargs') + .alias('f', 'file') + .default('f', '/etc/passwd') + .argv +; +```` + +Optionally `.options()` can take an object that maps keys to `opt` parameters. + +````javascript +var argv = require('yargs') + .options({ + 'f': { + alias: 'file', + demand: true, + default: '/etc/passwd', + describe: 'x marks the spot', + type: 'string' + } + }) + .argv +; +```` + +.usage(message, opts) +--------------------- + +Set a usage message to show which commands to use. Inside `message`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. + +`opts` is optional and acts like calling `.options(opts)`. + +.command(cmd, desc, [fn]) +------------------- + +Document the commands exposed by your application. + +use `desc` to provide a description for each command your application accepts (the +values stored in `argv._`). + +Optionally, you can provide a handler `fn` which will be executed when +a given command is provided. The handler will be executed with an instance +of `yargs`, which can be used to compose nested commands. + +Here's an example of top-level and nested commands in action: + +```js +var argv = require('yargs') + .usage('npm ') + .command('install', 'tis a mighty fine package to install') + .command('publish', 'shiver me timbers, should you be sharing all that', function (yargs) { + argv = yargs.option('f', { + alias: 'force', + description: 'yar, it usually be a bad idea' + }) + .help('help') + .argv + }) + .help('help') + .argv; +``` + +.example(cmd, desc) +------------------- + +Give some example invocations of your program. Inside `cmd`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. +Examples will be printed out as part of the help message. + + +.epilogue(str) +-------------- +.epilog(str) +------------ + +A message to print at the end of the usage instructions, e.g., + +```js +var argv = require('yargs') + .epilogue('for more information, find our manual at http://example.com'); +``` + +.check(fn) +---------- + +Check that certain conditions are met in the provided arguments. + +`fn` is called with two arguments, the parsed `argv` hash and an array of options and their aliases. + +If `fn` throws or returns a non-truthy value, show the thrown error, usage information, and +exit. + +.fail(fn) +--------- + +Method to execute when a failure occurs, rather then printing the failure message. + +`fn` is called with the failure message that would have been printed. + +.boolean(key) +------------- + +Interpret `key` as a boolean. If a non-flag option follows `key` in +`process.argv`, that string won't get set as the value of `key`. + +`key` will default to `false`, unless an `default(key, undefined)` is +explicitly set. + +If `key` is an Array, interpret all the elements as booleans. + +.string(key) +------------ + +Tell the parser logic not to interpret `key` as a number or boolean. +This can be useful if you need to preserve leading zeros in an input. + +If `key` is an Array, interpret all the elements as strings. + +`.string('_')` will result in non-hyphenated arguments being interpreted as strings, +regardless of whether they resemble numbers. + +.array(key) +---------- + +Tell the parser to interpret `key` as an array. If `.array('foo')` is set, +`--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'bar'`. + +.nargs(key, count) +----------- + +The number of arguments that should be consumed after a key. This can be a +useful hint to prevent parsing ambiguity: + +```js +var argv = require('yargs') + .nargs('token', 1) + .parse(['--token', '-my-token']); +``` + +parses as: + +`{ _: [], token: '-my-token', '$0': 'node test' }` + +Optionally `.nargs()` can take an object of `key`/`narg` pairs. + +.config(key) +------------ + +Tells the parser that if the option specified by `key` is passed in, it +should be interpreted as a path to a JSON config file. The file is loaded +and parsed, and its properties are set as arguments. + +.wrap(columns) +-------------- + +Format usage output to wrap at `columns` many columns. + +By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to +specify no column limit. + +`yargs.wrap(yargs.terminalWidth())` can be used to maximize the width +of yargs' usage instructions. + +.strict() +--------- + +Any command-line argument given that is not demanded, or does not have a +corresponding description, will be reported as an error. + +.help([option, [description]]) +------------------------------ + +Add an option (e.g., `--help`) that displays the usage string and exits the +process. If present, the `description` parameter customises the description of +the help option in the usage string. + +If invoked without parameters, `.help` returns the generated usage string. + +Example: + +``` +var yargs = require("yargs") + .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); +console.log(yargs.help()); +``` + +Later on, ```argv``` can be retrived with ```yargs.argv``` + +.version(version, [option], [description]) +---------------------------------------- + +Add an option (e.g., `--version`) that displays the version number (given by the +`version` parameter) and exits the process. If present, the `description` +parameter customizes the description of the version option in the usage string. + +You can provide a `function` for version, rather than a string. +This is useful if you want to use the version from your package.json: + +```js +var argv = require('yargs') + .version(function() { + return require('../package').version; + }) + .argv; +``` + +.showHelpOnFail(enable, [message]) +---------------------------------- + +By default, yargs outputs a usage string if any error is detected. Use the +`.showHelpOnFail` method to customize this behaviour. if `enable` is `false`, +the usage string is not output. If the `message` parameter is present, this +message is output after the error message. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .showHelpOnFail(false, "Specify --help for available options") + .argv; + +// etc. +```` + +*** + + $ node line_count.js --file + Missing argument value: f + + Specify --help for available options + +.showHelp(consoleLevel='error') +--------------------------- + +Print the usage data using the [`console`](https://nodejs.org/api/console.html) function `consoleLevel` for printing. + +Example: + +``` +var yargs = require("yargs") + .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); +yargs.showHelp(); +``` + +Or, to print the usage data to `stdout` instead, you can specify the use of `console.log`: + +``` +yargs.showHelp("log"); +``` + +Later on, ```argv``` can be retrived with ```yargs.argv``` + +.completion(cmd, [description], [fn]); +------------- + +Enable bash-completion shortcuts for commands and options. + +`cmd`: when present in `argv._`, will result in the `.bashrc` completion script +being outputted. To enable bash completions, concat the generated script to your +`.bashrc`, or `.bash_profile`. + +`description`: provide a description in your usage instructions for the command +that generates bash completion scripts. + +`fn`, rather than relying on yargs' default completion functionlity, which +shiver me timbers is pretty awesome, you can provide your own completion +method. + +```js +var argv = require('yargs') + .completion('completion', function(current, argv) { + // 'current' is the current command being completed. + // 'argv' is the parsed arguments so far. + // simply return an array of completions. + return [ + 'foo', + 'bar' + ]; + }) + .argv; +``` + +But wait, there's more! you can provide asynchronous completions. + +```js +var argv = require('yargs') + .completion('completion', function(current, argv, done) { + setTimeout(function() { + done([ + 'apple', + 'banana' + ]); + }, 500); + }) + .argv; +``` + +.showCompletionScript() +---------------------- + +Generate a bash completion script. Users of your application can install this +script in their `.bashrc`, and yargs will provide completion shortcuts for +commands and options. + +.exitProcess(enable) +---------------------------------- + +By default, yargs exits the process when the user passes a help flag, uses the `.version` functionality or when validation fails. Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated. + +.parse(args) +------------ + +Parse `args` instead of `process.argv`. Returns the `argv` object. + +.reset() +-------- + +Reset the argument object built up so far. This is useful for +creating nested command line interfaces. + +```js +var yargs = require('./yargs') + .usage('$0 command') + .command('hello', 'hello command') + .command('world', 'world command') + .demand(1, 'must provide a valid command'), + argv = yargs.argv, + command = argv._[0]; + +if (command === 'hello') { + yargs.reset() + .usage('$0 hello') + .help('h') + .example('$0 hello', 'print the hello message!') + .argv + + console.log('hello!'); +} else if (command === 'world'){ + yargs.reset() + .usage('$0 world') + .help('h') + .example('$0 world', 'print the world message!') + .argv + + console.log('world!'); +} else { + yargs.showHelp(); +} +``` + +.argv +----- + +Get the arguments as a plain old object. + +Arguments without a corresponding flag show up in the `argv._` array. + +The script name or node command is available at `argv.$0` similarly to how `$0` +works in bash or perl. + +parsing tricks +============== + +stop parsing +------------ + +Use `--` to stop parsing flags and stuff the remainder into `argv._`. + + $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 + { _: [ '-c', '3', '-d', '4' ], + '$0': 'node ./examples/reflect.js', + a: 1, + b: 2 } + +negate fields +------------- + +If you want to explicity set a field to false instead of just leaving it +undefined or to override a default you can do `--no-key`. + + $ node examples/reflect.js -a --no-b + { _: [], + '$0': 'node ./examples/reflect.js', + a: true, + b: false } + +numbers +------- + +Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to +one. This way you can just `net.createConnection(argv.port)` and you can add +numbers out of `argv` with `+` without having that mean concatenation, +which is super frustrating. + +duplicates +---------- + +If you specify a flag multiple times it will get turned into an array containing +all the values in order. + + $ node examples/reflect.js -x 5 -x 8 -x 0 + { _: [], + '$0': 'node ./examples/reflect.js', + x: [ 5, 8, 0 ] } + +dot notation +------------ + +When you use dots (`.`s) in argument names, an implicit object path is assumed. +This lets you organize arguments into nested objects. + + $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 + { _: [], + '$0': 'node ./examples/reflect.js', + foo: { bar: { baz: 33 }, quux: 5 } } + +short numbers +------------- + +Short numeric `head -n5` style argument work too: + + $ node reflect.js -n123 -m456 + { '3': true, + '6': true, + _: [], + '$0': 'node ./reflect.js', + n: 123, + m: 456 } + +installation +============ + +With [npm](http://github.com/isaacs/npm), just do: + + npm install yargs + +or clone this project on github: + + git clone http://github.com/bcoe/yargs.git + +To run the tests with npm, just do: + + npm test + +inspired by +=========== + +This module is loosely inspired by Perl's +[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/tools/eslint/node_modules/yargs/completion.sh.hbs b/tools/eslint/node_modules/yargs/completion.sh.hbs new file mode 100644 index 00000000000000..c52e499144bd0f --- /dev/null +++ b/tools/eslint/node_modules/yargs/completion.sh.hbs @@ -0,0 +1,22 @@ +###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} completion >> ~/.bashrc +# or {{app_path}} completion >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="${COMP_WORDS[COMP_CWORD]}" + args=$(printf "%s " "${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=`{{app_path}} --get-yargs-completions $args` + + COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) + return 0 +} +complete -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### diff --git a/tools/eslint/node_modules/yargs/index.js b/tools/eslint/node_modules/yargs/index.js new file mode 100644 index 00000000000000..96539b08d08457 --- /dev/null +++ b/tools/eslint/node_modules/yargs/index.js @@ -0,0 +1,504 @@ +var assert = require('assert'), + path = require('path'), + Completion = require('./lib/completion'), + Parser = require('./lib/parser'), + Usage = require('./lib/usage'), + Validation = require('./lib/validation') + +Argv(process.argv.slice(2)) + +var exports = module.exports = Argv +function Argv (processArgs, cwd) { + processArgs = processArgs || [] // handle calling yargs(). + + var self = {} + var completion = null + var usage = null + var validation = null + + if (!cwd) cwd = process.cwd() + + self.$0 = process.argv + .slice(0, 2) + .map(function (x, i) { + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + if (i === 0 && /\b(node|iojs)$/.test(x)) return + var b = rebase(cwd, x) + return x.match(/^\//) && b.length < x.length + ? b : x + }) + .join(' ').trim() + + if (process.env._ !== undefined && process.argv[1] === process.env._) { + self.$0 = process.env._.replace( + path.dirname(process.execPath) + '/', '' + ) + } + + var options + self.resetOptions = self.reset = function () { + // put yargs back into its initial + // state, this is useful for creating a + // nested CLI. + options = { + array: [], + boolean: [], + string: [], + narg: {}, + key: {}, + alias: {}, + default: {}, + defaultDescription: {}, + requiresArg: [], + count: [], + normalize: [], + config: [] + } + + usage = Usage(self) // handle usage output. + validation = Validation(self, usage) // handle arg validation. + completion = Completion(self, usage) + + demanded = {} + + exitProcess = true + strict = false + helpOpt = null + versionOpt = null + completionOpt = null + commandHandlers = {} + self.parsed = false + + return self + } + self.resetOptions() + + self.boolean = function (bools) { + options.boolean.push.apply(options.boolean, [].concat(bools)) + return self + } + + self.array = function (arrays) { + options.array.push.apply(options.array, [].concat(arrays)) + return self + } + + self.nargs = function (key, n) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.nargs(k, key[k]) + }) + } else { + options.narg[key] = n + } + return self + } + + self.normalize = function (strings) { + options.normalize.push.apply(options.normalize, [].concat(strings)) + return self + } + + self.config = function (configs) { + options.config.push.apply(options.config, [].concat(configs)) + return self + } + + self.example = function (cmd, description) { + usage.example(cmd, description) + return self + } + + self.command = function (cmd, description, fn) { + usage.command(cmd, description) + if (fn) commandHandlers[cmd] = fn + return self + } + + var commandHandlers = {} + self.getCommandHandlers = function () { + return commandHandlers + } + + self.string = function (strings) { + options.string.push.apply(options.string, [].concat(strings)) + return self + } + + self.default = function (key, value, defaultDescription) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.default(k, key[k]) + }) + } else { + if (typeof value === 'function') { + defaultDescription = usage.functionDescription(value, defaultDescription) + value = value.call() + } + options.defaultDescription[key] = defaultDescription + options.default[key] = value + } + return self + } + + self.alias = function (x, y) { + if (typeof x === 'object') { + Object.keys(x).forEach(function (key) { + self.alias(key, x[key]) + }) + } else { + options.alias[x] = (options.alias[x] || []).concat(y) + } + return self + } + + self.count = function (counts) { + options.count.push.apply(options.count, [].concat(counts)) + return self + } + + var demanded = {} + self.demand = self.required = self.require = function (keys, msg) { + if (typeof keys === 'number') { + if (!demanded._) demanded._ = { count: 0, msg: null } + demanded._.count += keys + demanded._.msg = msg + } else if (Array.isArray(keys)) { + keys.forEach(function (key) { + self.demand(key, msg) + }) + } else { + if (typeof msg === 'string') { + demanded[keys] = { msg: msg } + } else if (msg === true || typeof msg === 'undefined') { + demanded[keys] = { msg: undefined } + } + } + + return self + } + self.getDemanded = function () { + return demanded + } + + self.requiresArg = function (requiresArgs) { + options.requiresArg.push.apply(options.requiresArg, [].concat(requiresArgs)) + return self + } + + self.implies = function (key, value) { + validation.implies(key, value) + return self + } + + self.usage = function (msg, opts) { + if (!opts && typeof msg === 'object') { + opts = msg + msg = null + } + + usage.usage(msg) + + if (opts) self.options(opts) + + return self + } + + self.epilogue = self.epilog = function (msg) { + usage.epilog(msg) + return self + } + + self.fail = function (f) { + usage.failFn(f) + return self + } + + self.check = function (f) { + validation.check(f) + return self + } + + self.defaults = self.default + + self.describe = function (key, desc) { + options.key[key] = true + usage.describe(key, desc) + return self + } + + self.parse = function (args) { + return parseArgs(args) + } + + self.option = self.options = function (key, opt) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.options(k, key[k]) + }) + } else { + assert(typeof opt === 'object', 'second argument to option must be an object') + + options.key[key] = true // track manually set keys. + + if (opt.alias) self.alias(key, opt.alias) + + var demand = opt.demand || opt.required || opt.require + + if (demand) { + self.demand(key, demand) + } if ('default' in opt) { + self.default(key, opt.default) + } if ('nargs' in opt) { + self.nargs(key, opt.nargs) + } if (opt.boolean || opt.type === 'boolean') { + self.boolean(key) + if (opt.alias) self.boolean(opt.alias) + } if (opt.array || opt.type === 'array') { + self.array(key) + if (opt.alias) self.array(opt.alias) + } if (opt.string || opt.type === 'string') { + self.string(key) + if (opt.alias) self.string(opt.alias) + } if (opt.count || opt.type === 'count') { + self.count(key) + } + + var desc = opt.describe || opt.description || opt.desc + if (desc) { + self.describe(key, desc) + } + + if (opt.requiresArg) { + self.requiresArg(key) + } + } + + return self + } + self.getOptions = function () { + return options + } + + self.wrap = function (cols) { + usage.wrap(cols) + return self + } + + var strict = false + self.strict = function () { + strict = true + return self + } + self.getStrict = function () { + return strict + } + + self.showHelp = function (level) { + if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. + usage.showHelp(level) + return self + } + + var versionOpt = null + self.version = function (ver, opt, msg) { + versionOpt = opt || 'version' + usage.version(ver) + self.boolean(versionOpt) + self.describe(versionOpt, msg || 'Show version number') + return self + } + + var helpOpt = null + self.addHelpOpt = function (opt, msg) { + helpOpt = opt + self.boolean(opt) + self.describe(opt, msg || 'Show help') + return self + } + + self.showHelpOnFail = function (enabled, message) { + usage.showHelpOnFail(enabled, message) + return self + } + + var exitProcess = true + self.exitProcess = function (enabled) { + if (typeof enabled !== 'boolean') { + enabled = true + } + exitProcess = enabled + return self + } + self.getExitProcess = function () { + return exitProcess + } + + self.help = function () { + if (arguments.length > 0) return self.addHelpOpt.apply(self, arguments) + + if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. + + return usage.help() + } + + var completionOpt = null, + completionCommand = null + self.completion = function (cmd, desc, fn) { + // a function to execute when generating + // completions can be provided as the second + // or third argument to completion. + if (typeof desc === 'function') { + fn = desc + desc = null + } + + // register the completion command. + completionCommand = cmd + completionOpt = completion.completionKey + self.command(completionCommand, desc || 'generate bash completion script') + + // a function can be provided + if (fn) completion.registerFunction(fn) + + return self + } + + self.showCompletionScript = function ($0) { + $0 = $0 || self.$0 + console.log(completion.generateCompletionScript($0)) + return self + } + + self.getUsageInstance = function () { + return usage + } + + self.getValidationInstance = function () { + return validation + } + + self.terminalWidth = function () { + return require('window-size').width + } + + Object.defineProperty(self, 'argv', { + get: function () { + var args = null + + try { + args = parseArgs(processArgs) + } catch (err) { + usage.fail(err.message) + } + + return args + }, + enumerable: true + }) + + function parseArgs (args) { + var parsed = Parser(args, options), + argv = parsed.argv, + aliases = parsed.aliases + + argv.$0 = self.$0 + + self.parsed = parsed + + // generate a completion script for adding to ~/.bashrc. + if (completionCommand && ~argv._.indexOf(completionCommand)) { + self.showCompletionScript() + if (exitProcess) { + process.exit(0) + } + } + + // if there's a handler associated with a + // command defer processing to it. + var handlerKeys = Object.keys(self.getCommandHandlers()) + for (var i = 0, command; (command = handlerKeys[i]) !== undefined; i++) { + if (~argv._.indexOf(command)) { + self.getCommandHandlers()[command](self.reset()) + return self.argv + } + } + + Object.keys(argv).forEach(function (key) { + if (key === helpOpt && argv[key]) { + self.showHelp('log') + if (exitProcess) { + process.exit(0) + } + } else if (key === versionOpt && argv[key]) { + usage.showVersion() + if (exitProcess) { + process.exit(0) + } + } else if (key === completionOpt) { + // we allow for asynchronous completions, + // e.g., loading in a list of commands from an API. + completion.getCompletion(function (completions) { + ;(completions || []).forEach(function (completion) { + console.log(completion) + }) + + if (exitProcess) { + process.exit(0) + } + }) + return + } + }) + + validation.nonOptionCount(argv) + validation.missingArgumentValue(argv) + validation.requiredArguments(argv) + + if (strict) { + validation.unknownArguments(argv, aliases) + } + + validation.customChecks(argv, aliases) + validation.implications(argv) + setPlaceholderKeys(argv) + + return argv + } + + function setPlaceholderKeys (argv) { + Object.keys(options.key).forEach(function (key) { + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + } + + sigletonify(self) + return self +} + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase +function rebase (base, dir) { + return path.relative(base, dir) +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function sigletonify (inst) { + Object.keys(inst).forEach(function (key) { + if (key === 'argv') { + Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else { + Argv[key] = typeof inst[key] === 'function' + ? inst[key].bind(inst) + : inst[key] + } + }) +} diff --git a/tools/eslint/node_modules/yargs/lib/completion.js b/tools/eslint/node_modules/yargs/lib/completion.js new file mode 100644 index 00000000000000..32387be27a6c56 --- /dev/null +++ b/tools/eslint/node_modules/yargs/lib/completion.js @@ -0,0 +1,71 @@ +var fs = require('fs'), + path = require('path') + +// add bash completions to your +// yargs-powered applications. +module.exports = function (yargs, usage) { + var self = { + completionKey: 'get-yargs-completions' + } + + // get a list of completion commands. + self.getCompletion = function (done) { + var completions = [], + current = process.argv[process.argv.length - 1], + previous = process.argv.slice(process.argv.indexOf('--' + self.completionKey) + 1), + argv = yargs.parse(previous) + + // a custom completion function can be provided + // to completion(). + if (completionFunction) { + if (completionFunction.length < 3) { + // synchronous completion function. + return done(completionFunction(current, argv)) + } else { + // asynchronous completion function + return completionFunction(current, argv, function (completions) { + done(completions) + }) + } + } + + if (!current.match(/^-/)) { + usage.getCommands().forEach(function (command) { + completions.push(command[0]) + }) + } + + if (current.match(/^-/)) { + Object.keys(yargs.getOptions().key).forEach(function (key) { + completions.push('--' + key) + }) + } + + done(completions) + } + + // generate the completion script to add to your .bashrc. + self.generateCompletionScript = function ($0) { + var script = fs.readFileSync( + path.resolve(__dirname, '../completion.sh.hbs'), + 'utf-8' + ), + name = path.basename($0) + + // add ./to applications not yet installed as bin. + if ($0.match(/\.js$/)) $0 = './' + $0 + + script = script.replace(/{{app_name}}/g, name) + return script.replace(/{{app_path}}/g, $0) + } + + // register a function to perform your own custom + // completions., this function can be either + // synchrnous or asynchronous. + var completionFunction = null + self.registerFunction = function (fn) { + completionFunction = fn + } + + return self +} diff --git a/tools/eslint/node_modules/yargs/lib/parser.js b/tools/eslint/node_modules/yargs/lib/parser.js new file mode 100644 index 00000000000000..5e4618cb5c44b6 --- /dev/null +++ b/tools/eslint/node_modules/yargs/lib/parser.js @@ -0,0 +1,448 @@ +// fancy-pants parsing of argv, originally forked +// from minimist: https://www.npmjs.com/package/minimist +var camelCase = require('camelcase'), + path = require('path') + +function increment (orig) { + return orig !== undefined ? orig + 1 : 0 +} + +module.exports = function (args, opts) { + if (!opts) opts = {} + var flags = { arrays: {}, bools: {}, strings: {}, counts: {}, normalize: {}, configs: {} } + + ;[].concat(opts['array']).filter(Boolean).forEach(function (key) { + flags.arrays[key] = true + }) + + ;[].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true + }) + + ;[].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true + }) + + ;[].concat(opts.count).filter(Boolean).forEach(function (key) { + flags.counts[key] = true + }) + + ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true + }) + + ;[].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true + }) + + var aliases = {}, + newAliases = {} + + extendAliases(opts.key) + extendAliases(opts.alias) + + var defaults = opts['default'] || {} + Object.keys(defaults).forEach(function (key) { + if (/-/.test(key) && !opts.alias[key]) { + aliases[key] = aliases[key] || [] + } + (aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key] + }) + }) + + var argv = { _: [] } + + Object.keys(flags.bools).forEach(function (key) { + setArg(key, !(key in defaults) ? false : defaults[key]) + }) + + var notFlags = [] + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--') + 1) + args = args.slice(0, args.indexOf('--')) + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i], + broken, + key, + letters, + m, + next, + value + + // -- seperated by = + if (arg.match(/^--.+=/)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--([^=]+)=([\s\S]*)$/) + + // nargs format = '--f=monkey washing cat' + if (checkAllAliases(m[1], opts.narg)) { + args.splice(i + 1, m[1], m[2]) + i = eatNargs(i, m[1], args) + // arrays format = '--f=a b c' + } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { + args.splice(i + 1, m[1], m[2]) + i = eatArray(i, m[1], args) + } else { + setArg(m[1], m[2]) + } + } else if (arg.match(/^--no-.+/)) { + key = arg.match(/^--no-(.+)/)[1] + setArg(key, false) + + // -- seperated by space. + } else if (arg.match(/^--.+/)) { + key = arg.match(/^--(.+)/)[1] + + // nargs format = '--foo a b c' + if (checkAllAliases(key, opts.narg)) { + i = eatNargs(i, key, args) + // array format = '--foo a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && !next.match(/^-/) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + + // dot-notation flag seperated by '='. + } else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/) + setArg(m[1], m[2]) + + // dot-notation flag seperated by space. + } else if (arg.match(/^-.\..+/)) { + next = args[i + 1] + key = arg.match(/^-(.\..+)/)[1] + + if (next !== undefined && !next.match(/^-/) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } else if (arg.match(/^-[^-]+/)) { + letters = arg.slice(1, -1).split('') + broken = false + + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3) + key = letters[j] + + // nargs format = '-f=monkey washing cat' + if (checkAllAliases(letters[j], opts.narg)) { + args.splice(i + 1, 0, value) + i = eatNargs(i, key, args) + // array format = '-f=a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, value) + i = eatArray(i, key, args) + } else { + setArg(key, value) + } + + broken = true + break + } + + if (next === '-') { + setArg(letters[j], next) + continue + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next) + broken = true + break + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2)) + broken = true + break + } else { + setArg(letters[j], defaultForType(guessType(letters[j], flags))) + } + } + + key = arg.slice(-1)[0] + + if (!broken && key !== '-') { + // nargs format = '-f a b c' + if (checkAllAliases(key, opts.narg)) { + i = eatNargs(i, key, args) + // array format = '-f a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, args[i + 1]) + i++ + } else if (args[i + 1] && /true|false/.test(args[i + 1])) { + setArg(key, args[i + 1]) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + } + } else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ) + } + } + + setConfig(argv) + applyDefaultsAndAliases(argv, aliases, defaults) + + Object.keys(flags.counts).forEach(function (key) { + setArg(key, defaults[key]) + }) + + notFlags.forEach(function (key) { + argv._.push(key) + }) + + // how many arguments should we consume, based + // on the nargs option? + function eatNargs (i, key, args) { + var toEat = checkAllAliases(key, opts.narg) + + if (args.length - (i + 1) < toEat) throw Error('not enough arguments following: ' + key) + + for (var ii = i + 1; ii < (toEat + i + 1); ii++) { + setArg(key, args[ii]) + } + + return (i + toEat) + } + + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray (i, key, args) { + for (var ii = i + 1; ii < args.length; ii++) { + if (/^-/.test(args[ii])) break + i = ii + setArg(key, args[ii]) + } + + return i + } + + function setArg (key, val) { + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') val = val === 'true' + } + + if (/-/.test(key) && !(aliases[key] && aliases[key].length)) { + var c = camelCase(key) + aliases[key] = [c] + newAliases[c] = true + } + + var value = !checkAllAliases(key, flags.strings) && isNumber(val) ? Number(val) : val + + if (checkAllAliases(key, flags.counts)) { + value = increment + } + + var splitKey = key.split('.') + setKey(argv, splitKey, value) + + ;(aliases[splitKey[0]] || []).forEach(function (x) { + x = x.split('.') + + // handle populating dot notation for both + // the key and its aliases. + if (splitKey.length > 1) { + var a = [].concat(splitKey) + a.shift() // nuke the old key. + x = x.concat(a) + } + + setKey(argv, x, value) + }) + + var keys = [key].concat(aliases[key] || []) + for (var i = 0, l = keys.length; i < l; i++) { + if (flags.normalize[keys[i]]) { + keys.forEach(function (key) { + argv.__defineSetter__(key, function (v) { + val = path.normalize(v) + }) + + argv.__defineGetter__(key, function () { + return typeof val === 'string' ? + path.normalize(val) : val + }) + }) + break + } + } + } + + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig (argv) { + var configLookup = {} + + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, aliases, defaults) + + Object.keys(flags.configs).forEach(function (configKey) { + var configPath = argv[configKey] || configLookup[configKey] + if (configPath) { + try { + var config = require(path.resolve(process.cwd(), configPath)) + + Object.keys(config).forEach(function (key) { + // setting arguments via CLI takes precedence over + // values within the config file. + if (argv[key] === undefined) { + delete argv[key] + setArg(key, config[key]) + } + }) + } catch (ex) { + throw Error('invalid json config file: ' + configPath) + } + } + }) + } + + function applyDefaultsAndAliases (obj, aliases, defaults) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]) + + ;(aliases[key] || []).forEach(function (x) { + setKey(obj, x.split('.'), defaults[key]) + }) + } + }) + } + + function hasKey (obj, keys) { + var o = obj + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}) + }) + + var key = keys[keys.length - 1] + return key in o + } + + function setKey (obj, keys, value) { + var o = obj + keys.slice(0, -1).forEach(function (key) { + if (o[key] === undefined) o[key] = {} + o = o[key] + }) + + var key = keys[keys.length - 1] + if (value === increment) { + o[key] = increment(o[key]) + } else if (o[key] === undefined && checkAllAliases(key, flags.arrays)) { + o[key] = Array.isArray(value) ? value : [value] + } else if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value + } else if (Array.isArray(o[key])) { + o[key].push(value) + } else { + o[key] = [ o[key], value ] + } + } + + // extend the aliases list with inferred aliases. + function extendAliases (obj) { + Object.keys(obj || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key] || []) + // For "--option-name", also set argv.optionName + aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x)) { + var c = camelCase(x) + aliases[key].push(c) + newAliases[c] = true + } + }) + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y + })) + }) + }) + } + + // check if a flag is set for any of a key's aliases. + function checkAllAliases (key, flag) { + var isSet = false, + toCheck = [].concat(aliases[key] || [], key) + + toCheck.forEach(function (key) { + if (flag[key]) isSet = flag[key] + }) + + return isSet + } + + // return a default value, given the type of a flag., + // e.g., key of type 'string' will default to '', rather than 'true'. + function defaultForType (type) { + var def = { + boolean: true, + string: '', + array: [] + } + + return def[type] + } + + // given a flag, enforce a default type. + function guessType (key, flags) { + var type = 'boolean' + + if (flags.strings && flags.strings[key]) type = 'string' + else if (flags.arrays && flags.arrays[key]) type = 'array' + + return type + } + + function isNumber (x) { + if (typeof x === 'number') return true + if (/^0x[0-9a-f]+$/i.test(x)) return true + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + } + + return { + argv: argv, + aliases: aliases, + newAliases: newAliases + } +} diff --git a/tools/eslint/node_modules/yargs/lib/usage.js b/tools/eslint/node_modules/yargs/lib/usage.js new file mode 100644 index 00000000000000..8cfe9dd0c35b17 --- /dev/null +++ b/tools/eslint/node_modules/yargs/lib/usage.js @@ -0,0 +1,314 @@ +// this file handles outputting usage instructions, +// failures, etc. keeps logging in one place. +var cliui = require('cliui'), + decamelize = require('decamelize'), + wsize = require('window-size') + +module.exports = function (yargs) { + var self = {} + + // methods for ouputting/building failure message. + var fails = [] + self.failFn = function (f) { + fails.push(f) + } + + var failMessage = null + var showHelpOnFail = true + self.showHelpOnFail = function (enabled, message) { + if (typeof enabled === 'string') { + message = enabled + enabled = true + } else if (typeof enabled === 'undefined') { + enabled = true + } + failMessage = message + showHelpOnFail = enabled + return self + } + + self.fail = function (msg) { + if (fails.length) { + fails.forEach(function (f) { + f(msg) + }) + } else { + if (showHelpOnFail) yargs.showHelp('error') + if (msg) console.error(msg) + if (failMessage) { + if (msg) console.error('') + console.error(failMessage) + } + if (yargs.getExitProcess()) { + process.exit(1) + } else { + throw new Error(msg) + } + } + } + + // methods for ouputting/building help (usage) message. + var usage + self.usage = function (msg) { + usage = msg + } + + var examples = [] + self.example = function (cmd, description) { + examples.push([cmd, description || '']) + } + + var commands = [] + self.command = function (cmd, description) { + commands.push([cmd, description || '']) + } + self.getCommands = function () { + return commands + } + + var descriptions = {} + self.describe = function (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.describe(k, key[k]) + }) + } else { + descriptions[key] = desc + } + } + self.getDescriptions = function () { + return descriptions + } + + var epilog + self.epilog = function (msg) { + epilog = msg + } + + var wrap = windowWidth() + self.wrap = function (cols) { + wrap = cols + } + + self.help = function () { + normalizeAliases() + + var demanded = yargs.getDemanded(), + options = yargs.getOptions(), + keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demanded)) + .concat(Object.keys(options.default)) + .reduce(function (acc, key) { + if (key !== '_') acc[key] = true + return acc + }, {}) + ), + ui = cliui({ + width: wrap, + wrap: !!wrap + }) + + // the usage string. + if (usage) { + var u = usage.replace(/\$0/g, yargs.$0) + ui.div(u + '\n') + } + + // your application's commands, i.e., non-option + // arguments populated in '_'. + if (commands.length) { + ui.div('Commands:') + + commands.forEach(function (command) { + ui.div( + {text: command[0], padding: [0, 2, 0, 2], width: maxWidth(commands) + 4}, + {text: command[1]} + ) + }) + + ui.div() + } + + // the options table. + var aliasKeys = (Object.keys(options.alias) || []) + .concat(Object.keys(yargs.parsed.newAliases) || []) + + keys = keys.filter(function (key) { + return !yargs.parsed.newAliases[key] && aliasKeys.every(function (alias) { + return (options.alias[alias] || []).indexOf(key) === -1 + }) + }) + + var switches = keys.reduce(function (acc, key) { + acc[key] = [ key ].concat(options.alias[key] || []) + .map(function (sw) { + return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + + return acc + }, {}) + + if (keys.length) { + ui.div('Options:') + + keys.forEach(function (key) { + var kswitch = switches[key] + var desc = descriptions[key] || '' + var type = null + + if (~options.boolean.indexOf(key)) type = '[boolean]' + if (~options.count.indexOf(key)) type = '[count]' + if (~options.string.indexOf(key)) type = '[string]' + if (~options.normalize.indexOf(key)) type = '[string]' + if (~options.array.indexOf(key)) type = '[array]' + + var extra = [ + type, + demanded[key] ? '[required]' : null, + defaultString(options.default[key], options.defaultDescription[key]) + ].filter(Boolean).join(' ') + + ui.span( + {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches) + 4}, + desc + ) + + if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) + else ui.div() + }) + + ui.div() + } + + // describe some common use-cases for your application. + if (examples.length) { + ui.div('Examples:') + + examples.forEach(function (example) { + example[0] = example[0].replace(/\$0/g, yargs.$0) + }) + + examples.forEach(function (example) { + ui.div( + {text: example[0], padding: [0, 2, 0, 2], width: maxWidth(examples) + 4}, + example[1] + ) + }) + + ui.div() + } + + // the usage string. + if (epilog) { + var e = epilog.replace(/\$0/g, yargs.$0) + ui.div(e + '\n') + } + + return ui.toString() + } + + // return the maximum width of a string + // in the left-hand column of a table. + function maxWidth (table) { + var width = 0 + + // table might be of the form [leftColumn], + // or {key: leftColumn}} + if (!Array.isArray(table)) { + table = Object.keys(table).map(function (key) { + return [table[key]] + }) + } + + table.forEach(function (v) { + width = Math.max(v[0].length, width) + }) + + // if we've enabled 'wrap' we should limit + // the max-width of the left-column. + if (wrap) width = Math.min(width, parseInt(wrap * 0.5, 10)) + + return width + } + + // make sure any options set for aliases, + // are copied to the keys being aliased. + function normalizeAliases () { + var options = yargs.getOptions(), + demanded = yargs.getDemanded() + + ;(Object.keys(options.alias) || []).forEach(function (key) { + options.alias[key].forEach(function (alias) { + // copy descriptions. + if (descriptions[alias]) self.describe(key, descriptions[alias]) + // copy demanded. + if (demanded[alias]) yargs.demand(key, demanded[alias].msg) + + // type messages. + if (~options.boolean.indexOf(alias)) yargs.boolean(key) + if (~options.count.indexOf(alias)) yargs.count(key) + if (~options.string.indexOf(alias)) yargs.string(key) + if (~options.normalize.indexOf(alias)) yargs.normalize(key) + if (~options.array.indexOf(alias)) yargs.array(key) + }) + }) + } + + self.showHelp = function (level) { + level = level || 'error' + console[level](self.help()) + } + + self.functionDescription = function (fn, defaultDescription) { + if (defaultDescription) { + return defaultDescription + } + var description = fn.name ? decamelize(fn.name, '-') : 'generated-value' + return ['(', description, ')'].join('') + } + + // format the default-value-string displayed in + // the right-hand column. + function defaultString (value, defaultDescription) { + var string = '[default: ' + + if (value === undefined) return null + + if (defaultDescription) { + string += defaultDescription + } else { + switch (typeof value) { + case 'string': + string += JSON.stringify(value) + break + case 'object': + string += JSON.stringify(value) + break + default: + string += value + } + } + + return string + ']' + } + + // guess the width of the console window, max-width 80. + function windowWidth () { + return wsize.width ? Math.min(80, wsize.width) : null + } + + // logic for displaying application version. + var version = null + self.version = function (ver, opt, msg) { + version = ver + } + + self.showVersion = function () { + if (typeof version === 'function') console.log(version()) + else console.log(version) + } + + return self +} diff --git a/tools/eslint/node_modules/yargs/lib/validation.js b/tools/eslint/node_modules/yargs/lib/validation.js new file mode 100644 index 00000000000000..19afe94015f39a --- /dev/null +++ b/tools/eslint/node_modules/yargs/lib/validation.js @@ -0,0 +1,196 @@ +// validation-type-stuff, missing params, +// bad implications, custom checks. +module.exports = function (yargs, usage) { + var self = {} + + // validate appropriate # of non-option + // arguments were provided, i.e., '_'. + self.nonOptionCount = function (argv) { + var demanded = yargs.getDemanded() + + if (demanded._ && argv._.length < demanded._.count) { + if (demanded._.msg !== undefined) { + usage.fail(demanded._.msg) + } else { + usage.fail('Not enough non-option arguments: got ' + + argv._.length + ', need at least ' + demanded._.count + ) + } + } + } + + // make sure that any args that require an + // value (--foo=bar), have a value. + self.missingArgumentValue = function (argv) { + var options = yargs.getOptions(), + defaultValues = [true, false, ''] + + if (options.requiresArg.length > 0) { + var missingRequiredArgs = [] + + options.requiresArg.forEach(function (key) { + var value = argv[key] + + // if a value is explicitly requested, + // flag argument as missing if it does not + // look like foo=bar was entered. + if (~defaultValues.indexOf(value) + || (Array.isArray(value) && !value.length)) { + missingRequiredArgs.push(key) + } + }) + + if (missingRequiredArgs.length === 1) { + usage.fail('Missing argument value: ' + missingRequiredArgs[0]) + } else if (missingRequiredArgs.length > 1) { + var message = 'Missing argument values: ' + missingRequiredArgs.join(', ') + usage.fail(message) + } + } + } + + // make sure all the required arguments are present. + self.requiredArguments = function (argv) { + var demanded = yargs.getDemanded(), + missing = null + + Object.keys(demanded).forEach(function (key) { + if (!argv.hasOwnProperty(key)) { + missing = missing || {} + missing[key] = demanded[key] + } + }) + + if (missing) { + var customMsgs = [] + Object.keys(missing).forEach(function (key) { + var msg = missing[key].msg + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg) + } + }) + + var customMsg = customMsgs.length ? '\n' + customMsgs.join('\n') : '' + usage.fail('Missing required arguments: ' + Object.keys(missing).join(', ') + customMsg) + } + } + + // check for unknown arguments (strict-mode). + self.unknownArguments = function (argv, aliases) { + var descriptions = usage.getDescriptions(), + demanded = yargs.getDemanded(), + unknown = [], + aliasLookup = {} + + Object.keys(aliases).forEach(function (key) { + aliases[key].forEach(function (alias) { + aliasLookup[alias] = key + }) + }) + + Object.keys(argv).forEach(function (key) { + if (key !== '$0' && key !== '_' && + !descriptions.hasOwnProperty(key) && + !demanded.hasOwnProperty(key) && + !aliasLookup.hasOwnProperty(key)) { + unknown.push(key) + } + }) + + if (unknown.length === 1) { + usage.fail('Unknown argument: ' + unknown[0]) + } else if (unknown.length > 1) { + usage.fail('Unknown arguments: ' + unknown.join(', ')) + } + } + + // custom checks, added using the `check` option on yargs. + var checks = [] + self.check = function (f) { + checks.push(f) + } + + self.customChecks = function (argv, aliases) { + checks.forEach(function (f) { + try { + var result = f(argv, aliases) + if (!result) { + usage.fail('Argument check failed: ' + f.toString()) + } else if (typeof result === 'string') { + usage.fail(result) + } + } catch (err) { + usage.fail(err.message ? err.message : err) + } + }) + } + + // check implications, argument foo implies => argument bar. + var implied = {} + self.implies = function (key, value) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.implies(k, key[k]) + }) + } else { + implied[key] = value + } + } + self.getImplied = function () { + return implied + } + + self.implications = function (argv) { + var implyFail = [] + + Object.keys(implied).forEach(function (key) { + var num, + origKey = key, + value = implied[key] + + // convert string '1' to number 1 + num = Number(key) + key = isNaN(num) ? key : num + + if (typeof key === 'number') { + // check length of argv._ + key = argv._.length >= key + } else if (key.match(/^--no-.+/)) { + // check if key doesn't exist + key = key.match(/^--no-(.+)/)[1] + key = !argv[key] + } else { + // check if key exists + key = argv[key] + } + + num = Number(value) + value = isNaN(num) ? value : num + + if (typeof value === 'number') { + value = argv._.length >= value + } else if (value.match(/^--no-.+/)) { + value = value.match(/^--no-(.+)/)[1] + value = !argv[value] + } else { + value = argv[value] + } + + if (key && !value) { + implyFail.push(origKey) + } + }) + + if (implyFail.length) { + var msg = 'Implications failed:\n' + + implyFail.forEach(function (key) { + msg += (' ' + key + ' -> ' + implied[key]) + }) + + usage.fail(msg) + } + } + + return self +} diff --git a/tools/eslint/node_modules/yargs/package.json b/tools/eslint/node_modules/yargs/package.json new file mode 100644 index 00000000000000..2281a6b0fee49d --- /dev/null +++ b/tools/eslint/node_modules/yargs/package.json @@ -0,0 +1,145 @@ +{ + "_args": [ + [ + "yargs@~3.10.0", + "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js" + ] + ], + "_from": "yargs@>=3.10.0 <3.11.0", + "_id": "yargs@3.10.0", + "_inCache": true, + "_installable": true, + "_location": "/eslint/yargs", + "_nodeVersion": "2.0.2", + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "name": "yargs", + "raw": "yargs@~3.10.0", + "rawSpec": "~3.10.0", + "scope": null, + "spec": ">=3.10.0 <3.11.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/uglify-js" + ], + "_resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "_shasum": "f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1", + "_shrinkwrap": null, + "_spec": "yargs@~3.10.0", + "_where": "/Users/mzasso/git/forks/node/node_modules/eslint/node_modules/uglify-js", + "author": { + "email": "Alex.Ford@CodeTunnel.com", + "name": "Alex Ford", + "url": "http://CodeTunnel.com" + }, + "bugs": { + "url": "https://github.com/bcoe/yargs/issues" + }, + "contributors": [ + { + "name": "Benjamin Coe", + "email": "ben@npmjs.com", + "url": "https://github.com/bcoe" + }, + { + "name": "Chris Needham", + "email": "chris@chrisneedham.com", + "url": "http://chrisneedham.com" + }, + { + "name": "James Nylen", + "email": "jnylen@gmail.com", + "url": "https://github.com/nylen" + }, + { + "name": "Benjamin Horsleben", + "url": "https://github.com/fizker" + }, + { + "name": "Lin Clark", + "url": "https://github.com/linclark" + } + ], + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, + "description": "Light-weight option parsing with an argv hash. No optstrings attached.", + "devDependencies": { + "chai": "^2.2.0", + "coveralls": "^2.11.2", + "hashish": "0.0.4", + "mocha": "^2.2.1", + "nyc": "^2.2.1", + "standard": "^3.11.1" + }, + "directories": {}, + "dist": { + "shasum": "f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1", + "tarball": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" + }, + "engine": { + "node": ">=0.4" + }, + "files": [ + "LICENSE", + "completion.sh.hbs", + "index.js", + "lib" + ], + "gitHead": "491e6b10e46485a31504e6a1ef21450dff425030", + "homepage": "https://github.com/bcoe/yargs#readme", + "keywords": [ + "args", + "argument", + "cli", + "command", + "option", + "parser", + "parsing" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "chevex", + "email": "alex.ford@codetunnel.com" + }, + { + "name": "bcoe", + "email": "bencoe@gmail.com" + }, + { + "name": "nylen", + "email": "jnylen@gmail.com" + } + ], + "name": "yargs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/bcoe/yargs.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "standard && nyc mocha --check-leaks && nyc report" + }, + "standard": { + "globals": [ + "it" + ], + "ignore": [ + "**/example/**" + ] + }, + "version": "3.10.0" +} diff --git a/tools/eslint/package.json b/tools/eslint/package.json index cdab83759aebb8..718bb86131ba2f 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -1,40 +1,44 @@ { - "name": "eslint", - "version": "0.24.0", + "_args": [ + [ + "eslint@latest", + "/Users/mzasso/git/forks/node" + ] + ], + "_from": "eslint@latest", + "_id": "eslint@1.10.3", + "_inCache": true, + "_installable": true, + "_location": "/eslint", + "_npmUser": { + "email": "nicholas@nczconsulting.com", + "name": "nzakas" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "eslint", + "raw": "eslint@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", + "_shasum": "fb19a91b13c158082bbca294b17d979bc8353a0a", + "_shrinkwrap": null, + "_spec": "eslint@latest", + "_where": "/Users/mzasso/git/forks/node", "author": { - "name": "Nicholas C. Zakas", - "email": "nicholas+npm@nczconsulting.com" + "email": "nicholas+npm@nczconsulting.com", + "name": "Nicholas C. Zakas" }, - "description": "An AST-based pattern checker for JavaScript.", "bin": { "eslint": "./bin/eslint.js" }, - "main": "./lib/api.js", - "scripts": { - "test": "node Makefile.js test", - "lint": "node Makefile.js lint", - "patch": "node Makefile.js patch", - "minor": "node Makefile.js minor", - "major": "node Makefile.js major", - "docs": "node Makefile.js docs", - "gensite": "node Makefile.js gensite", - "browserify": "node Makefile.js browserify", - "perf": "node Makefile.js perf", - "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree", - "coveralls": "cat ./coverage/lcov.info | coveralls" - }, - "files": [ - "LICENSE", - "README.md", - "bin", - "conf", - "lib" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint.git" - }, - "homepage": "http://eslint.org", "bugs": { "url": "https://github.com/eslint/eslint/issues/" }, @@ -42,71 +46,94 @@ "chalk": "^1.0.0", "concat-stream": "^1.4.6", "debug": "^2.1.1", - "doctrine": "^0.6.2", + "doctrine": "^0.7.1", "escape-string-regexp": "^1.0.2", - "escope": "^3.1.0", - "espree": "^2.0.1", - "estraverse": "^4.1.0", + "escope": "^3.3.0", + "espree": "^2.2.4", + "estraverse": "^4.1.1", "estraverse-fb": "^1.3.1", - "globals": "^8.0.0", - "inquirer": "^0.8.2", + "esutils": "^2.0.2", + "file-entry-cache": "^1.1.1", + "glob": "^5.0.14", + "globals": "^8.11.0", + "handlebars": "^4.0.0", + "inquirer": "^0.11.0", "is-my-json-valid": "^2.10.0", - "js-yaml": "^3.2.5", - "minimatch": "^2.0.1", + "is-resolvable": "^1.0.0", + "js-yaml": "3.4.5", + "json-stable-stringify": "^1.0.0", + "lodash.clonedeep": "^3.0.1", + "lodash.merge": "^3.3.2", + "lodash.omit": "^3.1.0", + "minimatch": "^3.0.0", "mkdirp": "^0.5.0", - "object-assign": "^2.0.0", - "optionator": "^0.5.0", + "object-assign": "^4.0.1", + "optionator": "^0.6.0", "path-is-absolute": "^1.0.0", + "path-is-inside": "^1.0.1", + "shelljs": "^0.5.3", "strip-json-comments": "~1.0.1", "text-table": "~0.2.0", - "user-home": "^1.0.0", + "user-home": "^2.0.0", "xml-escape": "~1.0.0" }, + "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "beefy": "^1.0.0", "brfs": "0.0.9", - "browserify": "^8.1.3", - "chai": "^1.9.1", - "coveralls": "2.11.2", + "browserify": "^12.0.1", + "chai": "^3.4.0", + "cheerio": "^0.19.0", + "coveralls": "2.11.4", "dateformat": "^1.0.8", - "eslint-tester": "^0.8.1", - "esprima-fb": "^10001.1.0-dev-harmony-fb", - "gh-got": "^1.0.3", - "istanbul": "^0.3.5", + "ejs": "^2.3.3", + "esprima": "^2.4.1", + "esprima-fb": "^15001.1001.0-dev-harmony-fb", + "gh-got": "^2.2.0", + "istanbul": "^0.4.0", "jsdoc": "^3.3.0-beta1", "jsonlint": "^1.6.2", - "markdownlint": "^0.0.6", + "leche": "^2.1.1", + "linefix": "^0.1.1", + "load-perf": "^0.2.0", + "markdownlint": "^0.0.8", "mocha": "^2.1.0", - "mocha-phantomjs": "^3.5.0", - "npm-license": "^0.2.3", - "phantomjs": "^1.9.9", + "mocha-phantomjs": "4.0.1", + "npm-license": "^0.3.1", + "phantomjs": "1.9.18", "proxyquire": "^1.0.0", - "semver": "^4.1.0", - "shelljs": "^0.3.0", + "rewire": "^2.3.4", + "semver": "^5.0.3", "shelljs-nodecli": "~0.1.0", - "sinon": "1.14.1", + "sinon": "1.17.2", "through": "^2.3.6" }, + "directories": {}, + "dist": { + "shasum": "fb19a91b13c158082bbca294b17d979bc8353a0a", + "tarball": "http://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "LICENSE", + "README.md", + "bin", + "conf", + "lib" + ], + "gitHead": "2436cc6c1816a7890e35dab38e609daee84d7530", + "homepage": "http://eslint.org", "keywords": [ "ast", - "lint", - "javascript", "ecmascript", - "espree" + "espree", + "javascript", + "lint" ], "license": "MIT", - "engines": { - "node": ">=0.10" - }, - "gitHead": "b09484adab0e73e41bb9be28d8423b3295e4d5ff", - "_id": "eslint@0.24.0", - "_shasum": "1fc8ce7a153e614599cfc9efdabac4d1ea9aa6b0", - "_from": "eslint@*", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - }, + "main": "./lib/api.js", "maintainers": [ { "name": "nzakas", @@ -117,11 +144,26 @@ "email": "ivolodin@gmail.com" } ], - "dist": { - "shasum": "1fc8ce7a153e614599cfc9efdabac4d1ea9aa6b0", - "tarball": "http://registry.npmjs.org/eslint/-/eslint-0.24.0.tgz" + "name": "eslint", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint.git" }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-0.24.0.tgz", - "readme": "ERROR: No README data found!" + "scripts": { + "browserify": "node Makefile.js browserify", + "check-commit": "node Makefile.js checkGitCommit", + "coveralls": "cat ./coverage/lcov.info | coveralls", + "docs": "node Makefile.js docs", + "gensite": "node Makefile.js gensite", + "lint": "node Makefile.js lint", + "major": "node Makefile.js major", + "minor": "node Makefile.js minor", + "patch": "node Makefile.js patch", + "perf": "node Makefile.js perf", + "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree", + "test": "node Makefile.js test" + }, + "version": "1.10.3" } From 8d3fe60c27a5b1980030a005586737d1129cd435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 5 Nov 2015 20:56:29 +0100 Subject: [PATCH 200/262] tools: update eslint config The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss --- .eslintrc | 6 +----- Makefile | 2 +- vcbuild.bat | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index 33a7919d88c9ef..2197bf35ccf7be 100644 --- a/.eslintrc +++ b/.eslintrc @@ -27,8 +27,6 @@ rules: no-duplicate-case: 2 ## disallow assignment of exceptional params no-ex-assign: 2 - ## disallow use of reserved words as keys like enum, class - no-reserved-keys: 2 ## disallow unreachable code no-unreachable: 2 ## require valid typeof compared string like typeof foo === 'strnig' @@ -44,7 +42,7 @@ rules: ## use single quote, we can use double quote when escape chars quotes: [2, "single", "avoid-escape"] ## 2 space indentation - indent: [2, 2] + indent: [2, 2, {SwitchCase: 1}] ## add space after comma comma-spacing: 2 ## put semi-colon @@ -112,5 +110,3 @@ globals: DTRACE_NET_SERVER_CONNECTION : false LTTNG_NET_SERVER_CONNECTION : false COUNTER_NET_SERVER_CONNECTION : false - escape : false - unescape : false diff --git a/Makefile b/Makefile index 94eb41995367ed..02f4363ab35832 100644 --- a/Makefile +++ b/Makefile @@ -510,7 +510,7 @@ bench-idle: jslint: $(NODE) tools/eslint/bin/eslint.js src lib test tools/eslint-rules \ - --rulesdir tools/eslint-rules --reset --quiet + --rulesdir tools/eslint-rules --quiet CPPLINT_EXCLUDE ?= CPPLINT_EXCLUDE += src/node_lttng.cc diff --git a/vcbuild.bat b/vcbuild.bat index 4311dfdee01b23..31fc8cd6596439 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -251,7 +251,7 @@ goto jslint :jslint if not defined jslint goto exit echo running jslint -%config%\node tools\eslint\bin\eslint.js src lib test tools\eslint-rules --rulesdir tools\eslint-rules --reset --quiet +%config%\node tools\eslint\bin\eslint.js src lib test tools\eslint-rules --rulesdir tools\eslint-rules --quiet goto exit :create-msvs-files-failed From 017924140f112afb0d25fa698d130b5a1dcb9dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 12 Jan 2016 22:04:50 +0100 Subject: [PATCH 201/262] lib: fix style issues after eslint update With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss --- lib/_debugger.js | 112 +++++++++++++++++----------------- lib/_http_server.js | 2 +- lib/_tls_legacy.js | 16 ++--- lib/_tls_wrap.js | 14 ++--- lib/assert.js | 10 +-- lib/fs.js | 22 +++---- lib/internal/child_process.js | 14 ++--- lib/net.js | 20 +++--- lib/path.js | 68 ++++++++++----------- lib/querystring.js | 6 +- lib/readline.js | 4 +- lib/tls.js | 12 ++-- lib/url.js | 42 ++++++------- 13 files changed, 170 insertions(+), 172 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index ad7ee6295bee2a..cc4b92fd6a901c 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -25,8 +25,8 @@ exports.start = function(argv, stdin, stdout) { stdin = stdin || process.stdin; stdout = stdout || process.stdout; - var args = ['--debug-brk'].concat(argv), - interface_ = new Interface(stdin, stdout, args); + const args = ['--debug-brk'].concat(argv); + const interface_ = new Interface(stdin, stdout, args); stdin.resume(); @@ -197,8 +197,8 @@ Client.prototype._removeScript = function(desc) { Client.prototype._onResponse = function(res) { - var cb, - index = -1; + var cb; + var index = -1; this._reqCallbacks.some(function(fn, i) { if (fn.request_seq == res.body.request_seq) { @@ -295,11 +295,11 @@ Client.prototype.reqLookup = function(refs, cb) { }; Client.prototype.reqScopes = function(cb) { - var self = this, - req = { - command: 'scopes', - arguments: {} - }; + const self = this; + const req = { + command: 'scopes', + arguments: {} + }; cb = cb || function() {}; this.req(req, function(err, res) { @@ -525,8 +525,8 @@ Client.prototype.mirrorObject = function(handle, depth, cb) { return; } - var mirror, - waiting = 1; + var mirror; + var waiting = 1; if (handle.className == 'Array') { mirror = []; @@ -676,8 +676,8 @@ var helpMessage = 'Commands: ' + commands.map(function(group) { function SourceUnderline(sourceText, position, repl) { if (!sourceText) return ''; - var head = sourceText.slice(0, position), - tail = sourceText.slice(position); + const head = sourceText.slice(0, position); + var tail = sourceText.slice(position); // Colourize char if stdout supports colours if (repl.useColors) { @@ -697,8 +697,8 @@ function SourceInfo(body) { if (body.script) { if (body.script.name) { - var name = body.script.name, - dir = path.resolve() + '/'; + var name = body.script.name; + const dir = path.resolve() + '/'; // Change path to relative, if possible if (name.indexOf(dir) === 0) { @@ -969,8 +969,8 @@ Interface.prototype.controlEval = function(code, context, filename, callback) { Interface.prototype.debugEval = function(code, context, filename, callback) { if (!this.requireConnection()) return; - var self = this, - client = this.client; + const self = this; + const client = this.client; // Repl asked for scope variables if (code === '.scope') { @@ -1004,9 +1004,9 @@ Interface.prototype.debugEval = function(code, context, filename, callback) { // Adds spaces and prefix to number // maxN is a maximum number we should have space for function leftPad(n, prefix, maxN) { - var s = n.toString(), - nchars = Math.max(2, String(maxN).length) + 1, - nspaces = nchars - s.length - 1; + const s = n.toString(); + const nchars = Math.max(2, String(maxN).length) + 1; + const nspaces = nchars - s.length - 1; for (var i = 0; i < nspaces; i++) { prefix += ' '; @@ -1078,10 +1078,10 @@ Interface.prototype.list = function(delta) { delta || (delta = 5); - var self = this, - client = this.client, - from = client.currentSourceLine - delta + 1, - to = client.currentSourceLine + delta + 1; + const self = this; + const client = this.client; + const from = client.currentSourceLine - delta + 1; + const to = client.currentSourceLine + delta + 1; self.pause(); client.reqSource(from, to, function(err, res) { @@ -1096,12 +1096,12 @@ Interface.prototype.list = function(delta) { var lineno = res.fromLine + i + 1; if (lineno < from || lineno > to) continue; - var current = lineno == 1 + client.currentSourceLine, - breakpoint = client.breakpoints.some(function(bp) { - return (bp.scriptReq === client.currentScript || - bp.script === client.currentScript) && - bp.line == lineno; - }); + const current = lineno == 1 + client.currentSourceLine; + const breakpoint = client.breakpoints.some(function(bp) { + return (bp.scriptReq === client.currentScript || + bp.script === client.currentScript) && + bp.line == lineno; + }); if (lineno == 1) { // The first line needs to have the module wrapper filtered out of @@ -1139,8 +1139,8 @@ Interface.prototype.list = function(delta) { Interface.prototype.backtrace = function() { if (!this.requireConnection()) return; - var self = this, - client = this.client; + const self = this; + const client = this.client; self.pause(); client.fullTrace(function(err, bt) { @@ -1153,8 +1153,8 @@ Interface.prototype.backtrace = function() { if (bt.totalFrames == 0) { self.print('(empty stack)'); } else { - var trace = [], - firstFrameNative = bt.frames[0].script.isNative; + const trace = []; + const firstFrameNative = bt.frames[0].script.isNative; for (var i = 0; i < bt.frames.length; i++) { var frame = bt.frames[i]; @@ -1183,9 +1183,9 @@ Interface.prototype.backtrace = function() { Interface.prototype.scripts = function() { if (!this.requireConnection()) return; - var client = this.client, - displayNatives = arguments[0] || false, - scripts = []; + const client = this.client; + const displayNatives = arguments[0] || false; + const scripts = []; this.pause(); for (var id in client.scripts) { @@ -1323,9 +1323,9 @@ Interface.prototype.setBreakpoint = function(script, line, condition, silent) { if (!this.requireConnection()) return; - var self = this, - scriptId, - ambiguous; + const self = this; + var scriptId; + var ambiguous; // setBreakpoint() should insert breakpoint on current line if (script === undefined) { @@ -1429,10 +1429,10 @@ Interface.prototype.setBreakpoint = function(script, line, Interface.prototype.clearBreakpoint = function(script, line) { if (!this.requireConnection()) return; - var ambiguous, - breakpoint, - scriptId, - index; + var ambiguous; + var breakpoint; + var scriptId; + var index; this.client.breakpoints.some(function(bp, i) { if (bp.scriptId === script || @@ -1474,10 +1474,8 @@ Interface.prototype.clearBreakpoint = function(script, line) { return this.error('Breakpoint not found on line ' + line); } - var self = this, - req = { - breakpoint: breakpoint - }; + var self = this; + const req = {breakpoint}; self.pause(); self.client.clearBreakpoint(req, function(err, res) { @@ -1513,8 +1511,8 @@ Interface.prototype.breakpoints = function() { Interface.prototype.pause_ = function() { if (!this.requireConnection()) return; - var self = this, - cmd = 'process._debugPause();'; + const self = this; + const cmd = 'process._debugPause();'; this.pause(); this.client.reqFrameEval(cmd, NO_FRAME, function(err, res) { @@ -1621,11 +1619,11 @@ Interface.prototype.killChild = function() { // Spawns child process (and restores breakpoints) Interface.prototype.trySpawn = function(cb) { - var self = this, - breakpoints = this.breakpoints || [], - port = exports.port, - host = '127.0.0.1', - childArgs = this.args; + const self = this; + const breakpoints = this.breakpoints || []; + var port = exports.port; + var host = '127.0.0.1'; + var childArgs = this.args; this.killChild(); assert(!this.child); @@ -1676,8 +1674,8 @@ Interface.prototype.trySpawn = function(cb) { this.pause(); - var client = self.client = new Client(), - connectionAttempts = 0; + const client = self.client = new Client(); + var connectionAttempts = 0; client.once('ready', function() { self.stdout.write(' ok\n'); diff --git a/lib/_http_server.js b/lib/_http_server.js index e2221b759bd0c4..7473008a1e8c31 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -64,7 +64,7 @@ const STATUS_CODES = exports.STATUS_CODES = { 426 : 'Upgrade Required', // RFC 2817 428 : 'Precondition Required', // RFC 6585 429 : 'Too Many Requests', // RFC 6585 - 431 : 'Request Header Fields Too Large',// RFC 6585 + 431 : 'Request Header Fields Too Large', // RFC 6585 500 : 'Internal Server Error', 501 : 'Not Implemented', 502 : 'Bad Gateway', diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 1d700c9218f538..159d60e9ae1011 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -224,9 +224,9 @@ CryptoStream.prototype._write = function write(data, encoding, cb) { CryptoStream.prototype._writePending = function writePending() { - var data = this._pending, - encoding = this._pendingEncoding, - cb = this._pendingCallback; + const data = this._pending; + const encoding = this._pendingEncoding; + const cb = this._pendingCallback; this._pending = null; this._pendingEncoding = ''; @@ -252,9 +252,9 @@ CryptoStream.prototype._read = function read(size) { out = this.pair.ssl.encOut; } - var bytesRead = 0, - start = this._buffer.offset, - last = start; + var bytesRead = 0; + const start = this._buffer.offset; + var last = start; do { assert(last === this._buffer.offset); var read = this._buffer.use(this.pair.ssl, out, size - bytesRead); @@ -604,8 +604,8 @@ function onhandshakedone() { function onclienthello(hello) { - var self = this, - once = false; + const self = this; + var once = false; this._resumingSession = true; function callback(err, session) { diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 5b3690696ece66..35d5ba3b381fe3 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -397,8 +397,8 @@ TLSSocket.prototype._init = function(socket, wrap) { // For clients, we will always have either a given ca list or be using // default one - var requestCert = !!options.requestCert || !options.isServer, - rejectUnauthorized = !!options.rejectUnauthorized; + const requestCert = !!options.requestCert || !options.isServer; + const rejectUnauthorized = !!options.rejectUnauthorized; this._requestCert = requestCert; this._rejectUnauthorized = rejectUnauthorized; @@ -494,8 +494,8 @@ TLSSocket.prototype._init = function(socket, wrap) { }; TLSSocket.prototype.renegotiate = function(options, callback) { - var requestCert = this._requestCert, - rejectUnauthorized = this._rejectUnauthorized; + var requestCert = this._requestCert; + var rejectUnauthorized = this._rejectUnauthorized; if (this.destroyed) return; @@ -966,9 +966,9 @@ exports.connect = function(/* [port, host], options, cb */) { var hostname = options.servername || options.host || (options.socket && options.socket._host) || - 'localhost', - NPN = {}, - context = tls.createSecureContext(options); + 'localhost'; + const NPN = {}; + const context = tls.createSecureContext(options); tls.convertNPNProtocols(options.NPNProtocols, NPN); var socket = new TLSSocket(options.socket, { diff --git a/lib/assert.js b/lib/assert.js index 3e52ab45f66127..928420521e03e3 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -198,8 +198,8 @@ function objEquiv(a, b, strict) { return a === b; if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false; - var aIsArgs = isArguments(a), - bIsArgs = isArguments(b); + const aIsArgs = isArguments(a); + const bIsArgs = isArguments(b); if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) return false; if (aIsArgs) { @@ -207,9 +207,9 @@ function objEquiv(a, b, strict) { b = pSlice.call(b); return _deepEqual(a, b, strict); } - var ka = Object.keys(a), - kb = Object.keys(b), - key, i; + const ka = Object.keys(a); + const kb = Object.keys(b); + var key, i; // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length !== kb.length) diff --git a/lib/fs.js b/lib/fs.js index 57e9220a149f28..81f8a3c3ddc1a7 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -552,8 +552,8 @@ fs.openSync = function(path, flags, mode) { fs.read = function(fd, buffer, offset, length, position, callback) { if (!(buffer instanceof Buffer)) { // legacy string interface (fd, length, position, encoding, callback) - var cb = arguments[4], - encoding = arguments[3]; + const cb = arguments[4]; + const encoding = arguments[3]; assertEncoding(encoding); @@ -1388,9 +1388,9 @@ fs.realpathSync = function realpathSync(p, cache) { return cache[p]; } - var original = p, - seenLinks = {}, - knownHard = {}; + const original = p; + const seenLinks = {}; + const knownHard = {}; // current character position in p var pos; @@ -1490,9 +1490,9 @@ fs.realpath = function realpath(p, cache, cb) { return process.nextTick(cb.bind(null, null, cache[p])); } - var original = p, - seenLinks = {}, - knownHard = {}; + const original = p; + const seenLinks = {}; + const knownHard = {}; // current character position in p var pos; @@ -1941,9 +1941,9 @@ util.inherits(SyncWriteStream, Stream); // Export Object.defineProperty(fs, 'SyncWriteStream', { - configurable: true, - writable: true, - value: SyncWriteStream + configurable: true, + writable: true, + value: SyncWriteStream }); SyncWriteStream.prototype.write = function(data, arg1, arg2) { diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index b4365fb8c067f7..ce4cd6496fd1d2 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -250,11 +250,11 @@ function getHandleWrapType(stream) { ChildProcess.prototype.spawn = function(options) { - var self = this, - ipc, - ipcFd, - // If no `stdio` option was given - use default - stdio = options.stdio || 'pipe'; + const self = this; + var ipc; + var ipcFd; + // If no `stdio` option was given - use default + var stdio = options.stdio || 'pipe'; stdio = _validateStdio(stdio, false); @@ -692,8 +692,8 @@ function handleMessage(target, message, handle) { function nop() { } function _validateStdio(stdio, sync) { - var ipc, - ipcFd; + var ipc; + var ipcFd; // Replace shortcut with an array if (typeof stdio === 'string') { diff --git a/lib/net.js b/lib/net.js index f778043572362e..049a13133ae046 100644 --- a/lib/net.js +++ b/lib/net.js @@ -722,10 +722,10 @@ function createWriteReq(req, handle, data, encoding) { Socket.prototype.__defineGetter__('bytesWritten', function() { - var bytes = this._bytesDispatched, - state = this._writableState, - data = this._pendingData, - encoding = this._pendingEncoding; + var bytes = this._bytesDispatched; + const state = this._writableState; + const data = this._pendingData; + const encoding = this._pendingEncoding; if (!state) return undefined; @@ -1132,8 +1132,7 @@ function _listen(handle, backlog) { return handle.listen(backlog || 511); } -var createServerHandle = exports._createServerHandle = - function(address, port, addressType, fd) { +function createServerHandle(address, port, addressType, fd) { var err = 0; // assign handle in listen, and clean up if bind or listen fails var handle; @@ -1189,6 +1188,7 @@ var createServerHandle = exports._createServerHandle = return handle; }; +exports._createServerHandle = createServerHandle; Server.prototype._listen2 = function(address, port, addressType, backlog, fd) { @@ -1444,8 +1444,8 @@ Server.prototype.getConnections = function(cb) { } // Poll slaves - var left = this._slaves.length, - total = this._connections; + var left = this._slaves.length; + var total = this._connections; function oncount(err, count) { if (err) { @@ -1487,8 +1487,8 @@ Server.prototype.close = function(cb) { } if (this._usingSlaves) { - var self = this, - left = this._slaves.length; + var self = this; + var left = this._slaves.length; // Increment connections to be sure that, even if all sockets will be closed // during polling of slaves, `close` event will be emitted only once. diff --git a/lib/path.js b/lib/path.js index 0c9c656e66c3a7..c867dac83b9aad 100644 --- a/lib/path.js +++ b/lib/path.js @@ -74,21 +74,21 @@ var win32 = {}; // Function to split a filename into [root, dir, basename, ext] function win32SplitPath(filename) { // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3]; + const result = splitDeviceRe.exec(filename); + const device = (result[1] || '') + (result[2] || ''); + const tail = result[3]; // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; + const result2 = splitTailRe.exec(tail); + const dir = result2[1]; + const basename = result2[2]; + const ext = result2[3]; return [device, dir, basename, ext]; } function win32StatPath(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = !!device && device[1] !== ':'; + const result = splitDeviceRe.exec(path); + const device = result[1] || ''; + const isUnc = !!device && device[1] !== ':'; return { device, isUnc, @@ -103,9 +103,9 @@ function normalizeUNCRoot(device) { // path.resolve([from ...], to) win32.resolve = function() { - var resolvedDevice = '', - resolvedTail = '', - resolvedAbsolute = false; + var resolvedDevice = ''; + var resolvedTail = ''; + var resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1; i--) { var path; @@ -134,11 +134,11 @@ win32.resolve = function() { continue; } - var result = win32StatPath(path), - device = result.device, - isUnc = result.isUnc, - isAbsolute = result.isAbsolute, - tail = result.tail; + const result = win32StatPath(path); + const device = result.device; + var isUnc = result.isUnc; + const isAbsolute = result.isAbsolute; + const tail = result.tail; if (device && resolvedDevice && @@ -182,12 +182,12 @@ win32.resolve = function() { win32.normalize = function(path) { assertPath(path); - var result = win32StatPath(path), - device = result.device, - isUnc = result.isUnc, - isAbsolute = result.isAbsolute, - tail = result.tail, - trailingSlash = /[\\\/]$/.test(tail); + const result = win32StatPath(path); + var device = result.device; + const isUnc = result.isUnc; + const isAbsolute = result.isAbsolute; + var tail = result.tail; + const trailingSlash = /[\\\/]$/.test(tail); // Normalize the tail path tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join('\\'); @@ -318,9 +318,9 @@ win32._makeLong = function(path) { win32.dirname = function(path) { - var result = win32SplitPath(path), - root = result[0], - dir = result[1]; + const result = win32SplitPath(path); + const root = result[0]; + var dir = result[1]; if (!root && !dir) { // No dirname whatsoever @@ -417,8 +417,8 @@ function posixSplitPath(filename) { // path.resolve([from ...], to) // posix version posix.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; + var resolvedPath = ''; + var resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); @@ -449,8 +449,8 @@ posix.resolve = function() { posix.normalize = function(path) { assertPath(path); - var isAbsolute = posix.isAbsolute(path), - trailingSlash = path && path[path.length - 1] === '/'; + const isAbsolute = posix.isAbsolute(path); + const trailingSlash = path && path[path.length - 1] === '/'; // Normalize the path path = normalizeArray(path.split('/'), !isAbsolute).join('/'); @@ -527,9 +527,9 @@ posix._makeLong = function(path) { posix.dirname = function(path) { - var result = posixSplitPath(path), - root = result[0], - dir = result[1]; + const result = posixSplitPath(path); + const root = result[0]; + var dir = result[1]; if (!root && !dir) { // No dirname whatsoever diff --git a/lib/querystring.js b/lib/querystring.js index 40677ffb0f0859..5f8df93038921f 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -230,9 +230,9 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { var keys = []; for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - k, v; + const x = qs[i].replace(regexp, '%20'); + const idx = x.indexOf(eq); + var k, v; if (idx >= 0) { k = decodeStr(x.substring(0, idx), decode); diff --git a/lib/readline.js b/lib/readline.js index 0f9aabb2fec475..00d9f8984e6a71 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -379,8 +379,8 @@ Interface.prototype._tabComplete = function() { return; } - var completions = rv[0], - completeOn = rv[1]; // the text that was completed + const completions = rv[0]; + const completeOn = rv[1]; // the text that was completed if (completions && completions.length) { // Apply/show completions. if (completions.length === 1) { diff --git a/lib/tls.js b/lib/tls.js index 8bd9991d8746b2..aad17c9ef2d6a3 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -90,12 +90,12 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) { return new RegExp('^' + re + '$', 'i'); } - var dnsNames = [], - uriNames = [], - ips = [], - matchCN = true, - valid = false, - reason = 'Unknown reason'; + var dnsNames = []; + var uriNames = []; + const ips = []; + var matchCN = true; + var valid = false; + var reason = 'Unknown reason'; // There're several names to perform check against: // CN and altnames in certificate extension diff --git a/lib/url.js b/lib/url.js index 6489d6327d0e29..7348eadb7a9c6e 100644 --- a/lib/url.js +++ b/lib/url.js @@ -93,11 +93,11 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { // Copy chrome, IE, opera backslash-handling behavior. // Back slashes before the query string get converted to forward slashes // See: https://code.google.com/p/chromium/issues/detail?id=25916 - var queryIndex = url.indexOf('?'), - splitter = - (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; + const queryIndex = url.indexOf('?'); + const splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#'; + const uSplit = url.split(splitter); + const slashRegex = /\\/g; uSplit[0] = uSplit[0].replace(slashRegex, '/'); url = uSplit.join(splitter); @@ -370,11 +370,11 @@ Url.prototype.format = function() { auth += '@'; } - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; + var protocol = this.protocol || ''; + var pathname = this.pathname || ''; + var hash = this.hash || ''; + var host = false; + var query = ''; if (this.host) { host = auth + this.host; @@ -525,17 +525,17 @@ Url.prototype.resolveObject = function(relative) { return result; } - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; + const isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'); + const isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ); + var mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)); + const removeAllDots = mustEndAbs; + var srcPath = result.pathname && result.pathname.split('/') || []; + var relPath = relative.pathname && relative.pathname.split('/') || []; + const psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative // links like ../.. should be able From de93438f1594c29c5bebed9049bb9e321a41492f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 13 Jan 2016 19:55:02 +0100 Subject: [PATCH 202/262] tools: fix style issue after eslint update PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss --- tools/eslint-rules/required-modules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/eslint-rules/required-modules.js b/tools/eslint-rules/required-modules.js index 647726bf9a2424..94ef1e2ac03def 100644 --- a/tools/eslint-rules/required-modules.js +++ b/tools/eslint-rules/required-modules.js @@ -93,9 +93,9 @@ module.exports = function(context) { module.exports.schema = { 'type': 'array', 'items': [ - { - 'enum': [0, 1, 2] - } + { + 'enum': [0, 1, 2] + } ], 'additionalItems': { 'type': 'string' From 2f78b650fcb0dd334be662738a8a963323349f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 13 Jan 2016 21:42:45 +0100 Subject: [PATCH 203/262] test: fix style issues after eslint update Replace var keyword with const or let. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss --- test/common.js | 2 +- .../test-debugger-repl-break-in-module.js | 4 +- test/debugger/test-debugger-repl-restart.js | 2 +- test/gc/test-http-client-connaborted.js | 18 +- test/gc/test-http-client-onerror.js | 18 +- test/gc/test-http-client-timeout.js | 18 +- test/gc/test-http-client.js | 18 +- test/gc/test-net-timeout.js | 18 +- .../test-dgram-broadcast-multi-process.js | 68 +++--- .../test-dgram-multicast-multi-process.js | 22 +- test/internet/test-dns-ipv4.js | 47 ++-- test/internet/test-dns-ipv6.js | 49 +++-- test/internet/test-dns.js | 22 +- test/parallel/test-bad-unicode.js | 4 +- test/parallel/test-buffer.js | 4 +- .../test-child-process-double-pipe.js | 10 +- .../test-child-process-fork-and-spawn.js | 24 +-- .../parallel/test-child-process-fork-close.js | 13 +- .../parallel/test-child-process-fork-dgram.js | 8 +- test/parallel/test-child-process-fork-net2.js | 4 +- test/parallel/test-cli-eval.js | 10 +- test/parallel/test-cluster-worker-exit.js | 34 +-- test/parallel/test-cluster-worker-kill.js | 4 +- test/parallel/test-crypto-padding.js | 8 +- test/parallel/test-crypto-stream.js | 10 +- test/parallel/test-dgram-bytes-length.js | 16 +- test/parallel/test-dgram-close.js | 6 +- test/parallel/test-dgram-multicast-setTTL.js | 10 +- test/parallel/test-dgram-pingpong.js | 4 +- test/parallel/test-dgram-udp4.js | 34 +-- ...domain-with-abort-on-uncaught-exception.js | 24 +-- test/parallel/test-event-emitter-num-args.js | 4 +- test/parallel/test-file-write-stream.js | 62 +++--- test/parallel/test-file-write-stream3.js | 17 +- test/parallel/test-fs-chmod.js | 4 +- test/parallel/test-fs-error-messages.js | 23 +- test/parallel/test-fs-open-flags.js | 9 +- test/parallel/test-fs-read-buffer.js | 22 +- test/parallel/test-fs-read.js | 16 +- test/parallel/test-fs-readfile-empty.js | 11 +- test/parallel/test-fs-readfile-unlink.js | 12 +- test/parallel/test-fs-realpath.js | 12 +- test/parallel/test-fs-write-buffer.js | 18 +- .../test-fs-write-stream-change-open.js | 15 +- test/parallel/test-fs-write-stream.js | 13 +- test/parallel/test-global.js | 4 +- test/parallel/test-http-abort-queued.js | 6 +- .../test-http-client-response-domain.js | 8 +- .../test-http-client-timeout-agent.js | 4 +- test/parallel/test-http-default-port.js | 30 +-- .../test-http-header-response-splitting.js | 42 ++-- test/parallel/test-http-host-headers.js | 8 +- test/parallel/test-http-localaddress.js | 6 +- test/parallel/test-http-parser.js | 8 +- test/parallel/test-http-timeout.js | 30 +-- test/parallel/test-https-host-headers.js | 12 +- test/parallel/test-https-localaddress.js | 6 +- test/parallel/test-net-listen-port-option.js | 3 +- .../test-net-pause-resume-connecting.js | 12 +- test/parallel/test-net-stream.js | 14 +- test/parallel/test-next-tick-errors.js | 4 +- test/parallel/test-path-parse-format.js | 2 +- test/parallel/test-preload.js | 6 +- .../test-promises-unhandled-rejections.js | 168 ++++++++------- test/parallel/test-querystring.js | 5 +- test/parallel/test-readline-interface.js | 2 +- test/parallel/test-regress-GH-7511.js | 4 +- test/parallel/test-repl-console.js | 6 +- test/parallel/test-repl-definecommand.js | 6 +- test/parallel/test-repl-end-emits-exit.js | 10 +- test/parallel/test-repl-envvars.js | 50 ++--- test/parallel/test-repl-options.js | 6 +- test/parallel/test-repl-persistent-history.js | 202 +++++++++--------- test/parallel/test-repl-require-cache.js | 4 +- test/parallel/test-repl.js | 22 +- test/parallel/test-signal-handler.js | 4 +- test/parallel/test-stream-writev.js | 36 ++-- .../test-stringbytes-external-at-max.js | 2 +- ...ingbytes-external-exceed-max-by-1-ascii.js | 2 +- ...ngbytes-external-exceed-max-by-1-base64.js | 2 +- ...ngbytes-external-exceed-max-by-1-binary.js | 2 +- ...tringbytes-external-exceed-max-by-1-hex.js | 2 +- ...ringbytes-external-exceed-max-by-1-utf8.js | 2 +- ...st-stringbytes-external-exceed-max-by-2.js | 2 +- .../test-stringbytes-external-exceed-max.js | 2 +- test/parallel/test-timers-immediate.js | 10 +- test/parallel/test-timers-this.js | 4 +- test/parallel/test-timers-unref.js | 12 +- test/parallel/test-tls-connect-no-host.js | 12 +- .../test-tls-connect-stream-writes.js | 19 +- test/parallel/test-tls-npn-server-client.js | 10 +- test/parallel/test-tls-server-verify.js | 5 +- test/parallel/test-tls-sni-option.js | 18 +- test/parallel/test-tls-sni-server-client.js | 10 +- test/parallel/test-url.js | 50 ++--- test/parallel/test-util-log.js | 6 +- test/parallel/test-zlib-flush.js | 22 +- test/parallel/test-zlib-invalid-input.js | 4 +- test/parallel/test-zlib-params.js | 18 +- test/pummel/test-dh-regr.js | 4 +- test/pummel/test-exec.js | 26 +-- test/pummel/test-fs-watch-file-slow.js | 26 +-- test/pummel/test-http-client-reconnect-bug.js | 9 +- test/pummel/test-http-upload-timeout.js | 8 +- .../sequential/test-child-process-execsync.js | 3 +- test/sequential/test-init.js | 8 +- test/sequential/test-module-loading.js | 18 +- test/sequential/test-regress-GH-1697.js | 10 +- test/sequential/test-regress-GH-3542.js | 10 +- 109 files changed, 943 insertions(+), 896 deletions(-) diff --git a/test/common.js b/test/common.js index bb7a3652f38a02..028a171d01615d 100644 --- a/test/common.js +++ b/test/common.js @@ -437,7 +437,7 @@ exports.getServiceName = function getServiceName(port, protocol) { if (matches && matches.length > 1) { serviceName = matches[1]; } - } catch(e) { + } catch (e) { console.error('Cannot read file: ', etcServicesFileName); return undefined; } diff --git a/test/debugger/test-debugger-repl-break-in-module.js b/test/debugger/test-debugger-repl-break-in-module.js index e3f998eb6465d3..e439e08c24cd30 100644 --- a/test/debugger/test-debugger-repl-break-in-module.js +++ b/test/debugger/test-debugger-repl-break-in-module.js @@ -20,8 +20,8 @@ repl.addTest('sb(")^$*+?}{|][(.js\\\\", 1)', [ // continue - the breakpoint should be triggered repl.addTest('c', [ - /break in .*[\\\/]mod\.js:23/, - /21/, /22/, /23/, /24/, /25/ + /break in .*[\\\/]mod\.js:23/, + /21/, /22/, /23/, /24/, /25/ ]); // -- RESTORE BREAKPOINT ON RESTART -- diff --git a/test/debugger/test-debugger-repl-restart.js b/test/debugger/test-debugger-repl-restart.js index 584cb098bf02e6..206cd2e7417627 100644 --- a/test/debugger/test-debugger-repl-restart.js +++ b/test/debugger/test-debugger-repl-restart.js @@ -4,7 +4,7 @@ var repl = require('./helper-debugger-repl.js'); repl.startDebugger('breakpoints.js'); var linesWithBreakpoint = [ - /1/, /2/, /3/, /4/, /5/, /\* 6/ + /1/, /2/, /3/, /4/, /5/, /\* 6/ ]; // We slice here, because addTest will change the given array. repl.addTest('sb(6)', linesWithBreakpoint.slice()); diff --git a/test/gc/test-http-client-connaborted.js b/test/gc/test-http-client-connaborted.js index 20a4b38481ae0c..b5aafb7c9a36ab 100644 --- a/test/gc/test-http-client-connaborted.js +++ b/test/gc/test-http-client-connaborted.js @@ -6,15 +6,15 @@ function serverHandler(req, res) { res.connection.destroy(); } -var http = require('http'), - weak = require('weak'), - done = 0, - count = 0, - countGC = 0, - todo = 500, - common = require('../common'), - assert = require('assert'), - PORT = common.PORT; +const http = require('http'); +const weak = require('weak'); +const common = require('../common'); +const assert = require('assert'); +const PORT = common.PORT; +const todo = 500; +let done = 0; +let count = 0; +let countGC = 0; console.log('We should do ' + todo + ' requests'); diff --git a/test/gc/test-http-client-onerror.js b/test/gc/test-http-client-onerror.js index 7e50683c6633e5..5c2a9cc7b13350 100644 --- a/test/gc/test-http-client-onerror.js +++ b/test/gc/test-http-client-onerror.js @@ -8,15 +8,15 @@ function serverHandler(req, res) { res.end('Hello World\n'); } -var http = require('http'), - weak = require('weak'), - done = 0, - count = 0, - countGC = 0, - todo = 500, - common = require('../common'), - assert = require('assert'), - PORT = common.PORT; +const http = require('http'); +const weak = require('weak'); +const common = require('../common'); +const assert = require('assert'); +const PORT = common.PORT; +const todo = 500; +let done = 0; +let count = 0; +let countGC = 0; console.log('We should do ' + todo + ' requests'); diff --git a/test/gc/test-http-client-timeout.js b/test/gc/test-http-client-timeout.js index c84581b5c8e54a..c3ab9dc22cbb39 100644 --- a/test/gc/test-http-client-timeout.js +++ b/test/gc/test-http-client-timeout.js @@ -10,15 +10,15 @@ function serverHandler(req, res) { }, 100); } -var http = require('http'), - weak = require('weak'), - done = 0, - count = 0, - countGC = 0, - todo = 550, - common = require('../common'), - assert = require('assert'), - PORT = common.PORT; +const http = require('http'); +const weak = require('weak'); +const common = require('../common'); +const assert = require('assert'); +const PORT = common.PORT; +const todo = 550; +let done = 0; +let count = 0; +let countGC = 0; console.log('We should do ' + todo + ' requests'); diff --git a/test/gc/test-http-client.js b/test/gc/test-http-client.js index 7c3259d38b0ba1..9d210e946ed440 100644 --- a/test/gc/test-http-client.js +++ b/test/gc/test-http-client.js @@ -6,15 +6,15 @@ function serverHandler(req, res) { res.end('Hello World\n'); } -var http = require('http'), - weak = require('weak'), - done = 0, - count = 0, - countGC = 0, - todo = 500, - common = require('../common'), - assert = require('assert'), - PORT = common.PORT; +const http = require('http'); +const weak = require('weak'); +const common = require('../common'); +const assert = require('assert'); +const PORT = common.PORT; +const todo = 500; +let done = 0; +let count = 0; +let countGC = 0; console.log('We should do ' + todo + ' requests'); diff --git a/test/gc/test-net-timeout.js b/test/gc/test-net-timeout.js index 6c3b4f245be452..26e03786a68542 100644 --- a/test/gc/test-net-timeout.js +++ b/test/gc/test-net-timeout.js @@ -17,15 +17,15 @@ function serverHandler(sock) { }, 100); } -var net = require('net'), - weak = require('weak'), - done = 0, - count = 0, - countGC = 0, - todo = 500, - common = require('../common'), - assert = require('assert'), - PORT = common.PORT; +const net = require('net'); +const weak = require('weak'); +const common = require('../common'); +const assert = require('assert'); +const PORT = common.PORT; +const todo = 500; +let done = 0; +let count = 0; +let countGC = 0; console.log('We should do ' + todo + ' requests'); diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index a24aabcf1b4d0f..344f6506afdeb1 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -1,19 +1,19 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - dgram = require('dgram'), - util = require('util'), - networkInterfaces = require('os').networkInterfaces(), - Buffer = require('buffer').Buffer, - fork = require('child_process').fork, - LOCAL_BROADCAST_HOST = '255.255.255.255', - TIMEOUT = common.platformTimeout(5000), - messages = [ - new Buffer('First message to send'), - new Buffer('Second message to send'), - new Buffer('Third message to send'), - new Buffer('Fourth message to send') - ]; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const util = require('util'); +const networkInterfaces = require('os').networkInterfaces(); +const Buffer = require('buffer').Buffer; +const fork = require('child_process').fork; +const LOCAL_BROADCAST_HOST = '255.255.255.255'; +const TIMEOUT = common.platformTimeout(5000); +const messages = [ + new Buffer('First message to send'), + new Buffer('Second message to send'), + new Buffer('Third message to send'), + new Buffer('Fourth message to send') +]; if (common.inFreeBSDJail) { console.log('1..0 # Skipped: in a FreeBSD jail'); @@ -34,13 +34,13 @@ get_bindAddress: for (var name in networkInterfaces) { assert.ok(bindAddress); if (process.argv[2] !== 'child') { - var workers = {}, - listeners = 3, - listening = 0, - dead = 0, - i = 0, - done = 0, - timer = null; + const workers = {}; + const listeners = 3; + let listening = 0; + let dead = 0; + let i = 0; + let done = 0; + let timer = null; //exit the test if it doesn't succeed within TIMEOUT timer = setTimeout(function() { @@ -166,15 +166,21 @@ if (process.argv[2] !== 'child') { return; } - sendSocket.send(buf, 0, buf.length, - common.PORT, LOCAL_BROADCAST_HOST, function(err) { - if (err) throw err; - console.error('[PARENT] sent %s to %s:%s', - util.inspect(buf.toString()), - LOCAL_BROADCAST_HOST, common.PORT); - - process.nextTick(sendSocket.sendNext); - }); + sendSocket.send( + buf, + 0, + buf.length, + common.PORT, + LOCAL_BROADCAST_HOST, + function(err) { + if (err) throw err; + console.error('[PARENT] sent %s to %s:%s', + util.inspect(buf.toString()), + LOCAL_BROADCAST_HOST, common.PORT); + + process.nextTick(sendSocket.sendNext); + } + ); }; function killChildren(children) { diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js index f72402eef64147..5fa897fc6c35f3 100644 --- a/test/internet/test-dgram-multicast-multi-process.js +++ b/test/internet/test-dgram-multicast-multi-process.js @@ -157,14 +157,20 @@ if (process.argv[2] !== 'child') { return; } - sendSocket.send(buf, 0, buf.length, - common.PORT, LOCAL_BROADCAST_HOST, function(err) { - if (err) throw err; - console.error('[PARENT] sent "%s" to %s:%s', - buf.toString(), - LOCAL_BROADCAST_HOST, common.PORT); - process.nextTick(sendSocket.sendNext); - }); + sendSocket.send( + buf, + 0, + buf.length, + common.PORT, + LOCAL_BROADCAST_HOST, + function(err) { + if (err) throw err; + console.error('[PARENT] sent "%s" to %s:%s', + buf.toString(), + LOCAL_BROADCAST_HOST, common.PORT); + process.nextTick(sendSocket.sendNext); + } + ); }; } diff --git a/test/internet/test-dns-ipv4.js b/test/internet/test-dns-ipv4.js index bdca60d1b4fd5d..07814963924333 100644 --- a/test/internet/test-dns-ipv4.js +++ b/test/internet/test-dns-ipv4.js @@ -1,14 +1,14 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'), - dns = require('dns'), - net = require('net'), - isIPv4 = net.isIPv4; +const common = require('../common'); +const assert = require('assert'); +const dns = require('dns'); +const net = require('net'); +const isIPv4 = net.isIPv4; -var expected = 0, - completed = 0, - running = false, - queue = []; +let expected = 0; +let completed = 0; +let running = false; +const queue = []; function TEST(f) { function next() { @@ -148,19 +148,22 @@ TEST(function test_lookup_localhost_ipv4(done) { }); TEST(function test_lookup_all_ipv4(done) { - var req = dns.lookup('www.google.com', {all: true, family: 4}, - function(err, ips) { - if (err) throw err; - assert.ok(Array.isArray(ips)); - assert.ok(ips.length > 0); - - ips.forEach(function(ip) { - assert.ok(isIPv4(ip.address)); - assert.strictEqual(ip.family, 4); - }); - - done(); - }); + var req = dns.lookup( + 'www.google.com', + {all: true, family: 4}, + function(err, ips) { + if (err) throw err; + assert.ok(Array.isArray(ips)); + assert.ok(ips.length > 0); + + ips.forEach(function(ip) { + assert.ok(isIPv4(ip.address)); + assert.strictEqual(ip.family, 4); + }); + + done(); + } + ); checkWrap(req); }); diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js index d7c50a1e86b656..38a5c3bf735175 100644 --- a/test/internet/test-dns-ipv6.js +++ b/test/internet/test-dns-ipv6.js @@ -1,14 +1,14 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'), - dns = require('dns'), - net = require('net'), - isIPv6 = net.isIPv6; +const common = require('../common'); +const assert = require('assert'); +const dns = require('dns'); +const net = require('net'); +const isIPv6 = net.isIPv6; -var expected = 0, - completed = 0, - running = false, - queue = []; +let expected = 0; +let completed = 0; +let running = false; +const queue = []; if (!common.hasIPv6) { console.log('1..0 # Skipped: this test, no IPv6 support'); @@ -156,20 +156,23 @@ TEST(function test_lookup_ip_ipv6(done) { }); TEST(function test_lookup_all_ipv6(done) { - var req = dns.lookup('www.google.com', {all: true, family: 6}, - function(err, ips) { - if (err) throw err; - assert.ok(Array.isArray(ips)); - assert.ok(ips.length > 0); - - ips.forEach(function(ip) { - assert.ok(isIPv6(ip.address), - 'Invalid IPv6: ' + ip.address.toString()); - assert.strictEqual(ip.family, 6); - }); - - done(); - }); + var req = dns.lookup( + 'www.google.com', + {all: true, family: 6}, + function(err, ips) { + if (err) throw err; + assert.ok(Array.isArray(ips)); + assert.ok(ips.length > 0); + + ips.forEach(function(ip) { + assert.ok(isIPv6(ip.address), + 'Invalid IPv6: ' + ip.address.toString()); + assert.strictEqual(ip.family, 6); + }); + + done(); + } + ); checkWrap(req); }); diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index 6448ad7c76b07b..2ac6d1a3dbf264 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -1,16 +1,16 @@ 'use strict'; require('../common'); -var assert = require('assert'), - dns = require('dns'), - net = require('net'), - isIPv4 = net.isIPv4, - isIPv6 = net.isIPv6; -var util = require('util'); - -var expected = 0, - completed = 0, - running = false, - queue = []; +const assert = require('assert'); +const dns = require('dns'); +const net = require('net'); +const isIPv4 = net.isIPv4; +const isIPv6 = net.isIPv6; +const util = require('util'); + +let expected = 0; +let completed = 0; +let running = false; +const queue = []; function TEST(f) { diff --git a/test/parallel/test-bad-unicode.js b/test/parallel/test-bad-unicode.js index d2ce9ef01013db..a4df4ed9ed7005 100644 --- a/test/parallel/test-bad-unicode.js +++ b/test/parallel/test-bad-unicode.js @@ -1,7 +1,7 @@ 'use strict'; require('../common'); -var assert = require('assert'), - exception = null; +const assert = require('assert'); +let exception = null; try { eval('"\\uc/ef"'); diff --git a/test/parallel/test-buffer.js b/test/parallel/test-buffer.js index 6222e1aa39b9a5..78954796fb6966 100644 --- a/test/parallel/test-buffer.js +++ b/test/parallel/test-buffer.js @@ -852,8 +852,8 @@ Buffer(Buffer(0), 0, 0); // GH-5110 (function() { - var buffer = new Buffer('test'), - string = JSON.stringify(buffer); + const buffer = new Buffer('test'); + const string = JSON.stringify(buffer); assert.equal(string, '{"type":"Buffer","data":[116,101,115,116]}'); diff --git a/test/parallel/test-child-process-double-pipe.js b/test/parallel/test-child-process-double-pipe.js index b791d4164d52b3..2d9805d687635c 100644 --- a/test/parallel/test-child-process-double-pipe.js +++ b/test/parallel/test-child-process-double-pipe.js @@ -1,9 +1,9 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'), - os = require('os'), - util = require('util'), - spawn = require('child_process').spawn; +const common = require('../common'); +const assert = require('assert'); +const os = require('os'); +const util = require('util'); +const spawn = require('child_process').spawn; // We're trying to reproduce: // $ echo "hello\nnode\nand\nworld" | grep o | sed s/o/a/ diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index 5766dc865bc975..eb0e1785751747 100644 --- a/test/parallel/test-child-process-fork-and-spawn.js +++ b/test/parallel/test-child-process-fork-and-spawn.js @@ -6,18 +6,18 @@ var fork = require('child_process').fork; // Fork, then spawn. The spawned process should not hang. switch (process.argv[2] || '') { -case '': - fork(__filename, ['fork']).on('exit', checkExit); - process.on('exit', haveExit); - break; -case 'fork': - spawn(process.execPath, [__filename, 'spawn']).on('exit', checkExit); - process.on('exit', haveExit); - break; -case 'spawn': - break; -default: - assert(0); + case '': + fork(__filename, ['fork']).on('exit', checkExit); + process.on('exit', haveExit); + break; + case 'fork': + spawn(process.execPath, [__filename, 'spawn']).on('exit', checkExit); + process.on('exit', haveExit); + break; + case 'spawn': + break; + default: + assert(0); } var seenExit = false; diff --git a/test/parallel/test-child-process-fork-close.js b/test/parallel/test-child-process-fork-close.js index 12b64cc4ff82ac..cec3c88f0fa11c 100644 --- a/test/parallel/test-child-process-fork-close.js +++ b/test/parallel/test-child-process-fork-close.js @@ -1,14 +1,13 @@ 'use strict'; -var assert = require('assert'), - common = require('../common'), - fork = require('child_process').fork, - fork = require('child_process').fork; +const assert = require('assert'); +const common = require('../common'); +const fork = require('child_process').fork; var cp = fork(common.fixturesDir + '/child-process-message-and-exit.js'); -var gotMessage = false, - gotExit = false, - gotClose = false; +let gotMessage = false; +let gotExit = false; +let gotClose = false; cp.on('message', function(message) { assert(!gotMessage); diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index 86cd6576c73b98..d1e3f3e5d814c5 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -69,7 +69,13 @@ if (process.argv[2] === 'child') { var sendMessages = function() { var timer = setInterval(function() { - client.send(msg, 0, msg.length, common.PORT, '127.0.0.1', function(err) { + client.send( + msg, + 0, + msg.length, + common.PORT, + '127.0.0.1', + function(err) { if (err) throw err; } ); diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js index dd89557b61121d..359b88f559caa5 100644 --- a/test/parallel/test-child-process-fork-net2.js +++ b/test/parallel/test-child-process-fork-net2.js @@ -66,8 +66,8 @@ if (process.argv[2] === 'child') { var server = net.createServer(); - var connected = 0, - closed = 0; + let connected = 0; + let closed = 0; server.on('connection', function(socket) { switch (connected % 6) { case 0: diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index 15f59c8f37717c..d1db3a815f5df5 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -5,11 +5,11 @@ if (module.parent) { process.exit(42); } -var common = require('../common'), - assert = require('assert'), - child = require('child_process'), - path = require('path'), - nodejs = '"' + process.execPath + '"'; +const common = require('../common'); +const assert = require('assert'); +const child = require('child_process'); +const path = require('path'); +const nodejs = '"' + process.execPath + '"'; // replace \ by / because windows uses backslashes in paths, but they're still diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js index eb941e194b33cd..ccb213f0df9601 100644 --- a/test/parallel/test-cluster-worker-exit.js +++ b/test/parallel/test-cluster-worker-exit.js @@ -24,23 +24,23 @@ if (cluster.isWorker) { } else if (cluster.isMaster) { var expected_results = { - cluster_emitDisconnect: [1, "the cluster did not emit 'disconnect'"], - cluster_emitExit: [1, "the cluster did not emit 'exit'"], - cluster_exitCode: [EXIT_CODE, 'the cluster exited w/ incorrect exitCode'], - cluster_signalCode: [null, 'the cluster exited w/ incorrect signalCode'], - worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"], - worker_emitExit: [1, "the worker did not emit 'exit'"], - worker_state: ['disconnected', 'the worker state is incorrect'], - worker_suicideMode: [false, 'the worker.suicide flag is incorrect'], - worker_died: [true, 'the worker is still running'], - worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'], - worker_signalCode: [null, 'the worker exited w/ incorrect signalCode'] + cluster_emitDisconnect: [1, "the cluster did not emit 'disconnect'"], + cluster_emitExit: [1, "the cluster did not emit 'exit'"], + cluster_exitCode: [EXIT_CODE, 'the cluster exited w/ incorrect exitCode'], + cluster_signalCode: [null, 'the cluster exited w/ incorrect signalCode'], + worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"], + worker_emitExit: [1, "the worker did not emit 'exit'"], + worker_state: ['disconnected', 'the worker state is incorrect'], + worker_suicideMode: [false, 'the worker.suicide flag is incorrect'], + worker_died: [true, 'the worker is still running'], + worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'], + worker_signalCode: [null, 'the worker exited w/ incorrect signalCode'] }; var results = { - cluster_emitDisconnect: 0, - cluster_emitExit: 0, - worker_emitDisconnect: 0, - worker_emitExit: 0 + cluster_emitDisconnect: 0, + cluster_emitExit: 0, + worker_emitDisconnect: 0, + worker_emitExit: 0 }; @@ -103,8 +103,8 @@ if (cluster.isWorker) { function checkResults(expected_results, results) { for (var k in expected_results) { - var actual = results[k], - expected = expected_results[k]; + const actual = results[k]; + const expected = expected_results[k]; var msg = (expected[1] || '') + (' [expected: ' + expected[0] + ' / actual: ' + actual + ']'); diff --git a/test/parallel/test-cluster-worker-kill.js b/test/parallel/test-cluster-worker-kill.js index e12b466610171a..1ad9433f1ac940 100644 --- a/test/parallel/test-cluster-worker-kill.js +++ b/test/parallel/test-cluster-worker-kill.js @@ -103,8 +103,8 @@ if (cluster.isWorker) { function checkResults(expected_results, results) { for (var k in expected_results) { - var actual = results[k], - expected = expected_results[k]; + const actual = results[k]; + const expected = expected_results[k]; var msg = (expected[1] || '') + (' [expected: ' + expected[0] + ' / actual: ' + actual + ']'); diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js index d4cb7190e2060a..bc2011d3d892f5 100644 --- a/test/parallel/test-crypto-padding.js +++ b/test/parallel/test-crypto-padding.js @@ -15,11 +15,11 @@ crypto.DEFAULT_ENCODING = 'buffer'; * Input data */ -var ODD_LENGTH_PLAIN = 'Hello node world!', - EVEN_LENGTH_PLAIN = 'Hello node world!AbC09876dDeFgHi'; +const ODD_LENGTH_PLAIN = 'Hello node world!'; +const EVEN_LENGTH_PLAIN = 'Hello node world!AbC09876dDeFgHi'; -var KEY_PLAIN = 'S3c.r.e.t.K.e.Y!', - IV_PLAIN = 'blahFizz2011Buzz'; +const KEY_PLAIN = 'S3c.r.e.t.K.e.Y!'; +const IV_PLAIN = 'blahFizz2011Buzz'; var CIPHER_NAME = 'aes-128-cbc'; diff --git a/test/parallel/test-crypto-stream.js b/test/parallel/test-crypto-stream.js index f276e161721eb5..bf0fc2ca1d00df 100644 --- a/test/parallel/test-crypto-stream.js +++ b/test/parallel/test-crypto-stream.js @@ -43,11 +43,11 @@ if (!common.hasFipsCrypto) { } // Decipher._flush() should emit an error event, not an exception. -var key = new Buffer('48fb56eb10ffeb13fc0ef551bbca3b1b', 'hex'), - badkey = new Buffer('12341234123412341234123412341234', 'hex'), - iv = new Buffer('6d358219d1f488f5f4eb12820a66d146', 'hex'), - cipher = crypto.createCipheriv('aes-128-cbc', key, iv), - decipher = crypto.createDecipheriv('aes-128-cbc', badkey, iv); +const key = new Buffer('48fb56eb10ffeb13fc0ef551bbca3b1b', 'hex'); +const badkey = new Buffer('12341234123412341234123412341234', 'hex'); +const iv = new Buffer('6d358219d1f488f5f4eb12820a66d146', 'hex'); +const cipher = crypto.createCipheriv('aes-128-cbc', key, iv); +const decipher = crypto.createDecipheriv('aes-128-cbc', badkey, iv); cipher.pipe(decipher) .on('error', common.mustCall(function end(err) { diff --git a/test/parallel/test-dgram-bytes-length.js b/test/parallel/test-dgram-bytes-length.js index c68b2fab70aff5..6527f628d01d2c 100644 --- a/test/parallel/test-dgram-bytes-length.js +++ b/test/parallel/test-dgram-bytes-length.js @@ -5,8 +5,14 @@ var dgram = require('dgram'); var message = new Buffer('Some bytes'); var client = dgram.createSocket('udp4'); -client.send(message, 0, message.length, 41234, 'localhost', - function(err, bytes) { - assert.strictEqual(bytes, message.length); - client.close(); -}); +client.send( + message, + 0, + message.length, + 41234, + 'localhost', + function(err, bytes) { + assert.strictEqual(bytes, message.length); + client.close(); + } +); diff --git a/test/parallel/test-dgram-close.js b/test/parallel/test-dgram-close.js index 7e9dd4ef52c402..a84a3bc19e4bbc 100644 --- a/test/parallel/test-dgram-close.js +++ b/test/parallel/test-dgram-close.js @@ -2,9 +2,9 @@ // Ensure that if a dgram socket is closed before the DNS lookup completes, it // won't crash. -var assert = require('assert'), - common = require('../common'), - dgram = require('dgram'); +const assert = require('assert'); +const common = require('../common'); +const dgram = require('dgram'); var buf = new Buffer(1024); buf.fill(42); diff --git a/test/parallel/test-dgram-multicast-setTTL.js b/test/parallel/test-dgram-multicast-setTTL.js index f48fc7118ec3c1..7f641237c7999b 100644 --- a/test/parallel/test-dgram-multicast-setTTL.js +++ b/test/parallel/test-dgram-multicast-setTTL.js @@ -1,9 +1,9 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - dgram = require('dgram'), - thrown = false, - socket = dgram.createSocket('udp4'); +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const socket = dgram.createSocket('udp4'); +let thrown = false; socket.bind(common.PORT); socket.on('listening', function() { diff --git a/test/parallel/test-dgram-pingpong.js b/test/parallel/test-dgram-pingpong.js index 883085a9cdaab2..63d001d0b376a4 100644 --- a/test/parallel/test-dgram-pingpong.js +++ b/test/parallel/test-dgram-pingpong.js @@ -34,8 +34,8 @@ function pingPongTest(port, host) { server.on('listening', function() { console.log('server listening on ' + port + ' ' + host); - var buf = new Buffer('PING'), - client = dgram.createSocket('udp4'); + const buf = new Buffer('PING'); + const client = dgram.createSocket('udp4'); client.on('message', function(msg, rinfo) { if (debug) console.log('client got: ' + msg + diff --git a/test/parallel/test-dgram-udp4.js b/test/parallel/test-dgram-udp4.js index 58c8b69839ffe6..e845c5d845549c 100644 --- a/test/parallel/test-dgram-udp4.js +++ b/test/parallel/test-dgram-udp4.js @@ -1,11 +1,11 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var dgram = require('dgram'), server, client, - server_port = common.PORT, - message_to_send = 'A message to send', - timer; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const server_port = common.PORT; +const message_to_send = 'A message to send'; +let server, client; +let timer; server = dgram.createSocket('udp4'); server.on('message', function(msg, rinfo) { @@ -28,13 +28,19 @@ server.on('listening', function() { client.close(); server.close(); }); - client.send(message_to_send, 0, message_to_send.length, - server_port, 'localhost', function(err) { - if (err) { - console.log('Caught error in client send.'); - throw err; - } - }); + client.send( + message_to_send, + 0, + message_to_send.length, + server_port, + 'localhost', + function(err) { + if (err) { + console.log('Caught error in client send.'); + throw err; + } + } + ); client.on('close', function() { if (server.fd === null) { diff --git a/test/parallel/test-domain-with-abort-on-uncaught-exception.js b/test/parallel/test-domain-with-abort-on-uncaught-exception.js index 3158274ea181a9..004afff318622c 100644 --- a/test/parallel/test-domain-with-abort-on-uncaught-exception.js +++ b/test/parallel/test-domain-with-abort-on-uncaught-exception.js @@ -140,24 +140,24 @@ if (process.argv[2] === 'child') { } testDomainExceptionHandling('--abort_on_uncaught_exception', { - throwInDomainErrHandler: false, - useTryCatch: false - }); + throwInDomainErrHandler: false, + useTryCatch: false + }); testDomainExceptionHandling('--abort_on_uncaught_exception', { - throwInDomainErrHandler: false, - useTryCatch: true - }); + throwInDomainErrHandler: false, + useTryCatch: true + }); testDomainExceptionHandling('--abort_on_uncaught_exception', { - throwInDomainErrHandler: true, - useTryCatch: false - }); + throwInDomainErrHandler: true, + useTryCatch: false + }); testDomainExceptionHandling('--abort_on_uncaught_exception', { - throwInDomainErrHandler: true, - useTryCatch: true - }); + throwInDomainErrHandler: true, + useTryCatch: true + }); testDomainExceptionHandling({ throwInDomainErrHandler: false diff --git a/test/parallel/test-event-emitter-num-args.js b/test/parallel/test-event-emitter-num-args.js index 51f57e89bc6e22..e405b5b894a704 100644 --- a/test/parallel/test-event-emitter-num-args.js +++ b/test/parallel/test-event-emitter-num-args.js @@ -3,8 +3,8 @@ require('../common'); var assert = require('assert'); var events = require('events'); -var e = new events.EventEmitter(), - num_args_emited = []; +const e = new events.EventEmitter(); +const num_args_emited = []; e.on('numArgs', function() { var numArgs = arguments.length; diff --git a/test/parallel/test-file-write-stream.js b/test/parallel/test-file-write-stream.js index 36ef283528b7c1..b9d9fd76b88df2 100644 --- a/test/parallel/test-file-write-stream.js +++ b/test/parallel/test-file-write-stream.js @@ -7,50 +7,50 @@ var fs = require('fs'); var fn = path.join(common.tmpDir, 'write.txt'); common.refreshTmpDir(); var file = fs.createWriteStream(fn, { - highWaterMark: 10 - }); + highWaterMark: 10 +}); var EXPECTED = '012345678910'; var callbacks = { - open: -1, - drain: -2, - close: -1 - }; + open: -1, + drain: -2, + close: -1 +}; file .on('open', function(fd) { - console.error('open!'); - callbacks.open++; - assert.equal('number', typeof fd); - }) + console.error('open!'); + callbacks.open++; + assert.equal('number', typeof fd); + }) .on('error', function(err) { - throw err; - }) + throw err; + }) .on('drain', function() { - console.error('drain!', callbacks.drain); - callbacks.drain++; - if (callbacks.drain == -1) { - assert.equal(EXPECTED, fs.readFileSync(fn, 'utf8')); - file.write(EXPECTED); - } else if (callbacks.drain == 0) { - assert.equal(EXPECTED + EXPECTED, fs.readFileSync(fn, 'utf8')); - file.end(); - } - }) + console.error('drain!', callbacks.drain); + callbacks.drain++; + if (callbacks.drain == -1) { + assert.equal(EXPECTED, fs.readFileSync(fn, 'utf8')); + file.write(EXPECTED); + } else if (callbacks.drain == 0) { + assert.equal(EXPECTED + EXPECTED, fs.readFileSync(fn, 'utf8')); + file.end(); + } + }) .on('close', function() { - console.error('close!'); - assert.strictEqual(file.bytesWritten, EXPECTED.length * 2); + console.error('close!'); + assert.strictEqual(file.bytesWritten, EXPECTED.length * 2); - callbacks.close++; - assert.throws(function() { - console.error('write after end should not be allowed'); - file.write('should not work anymore'); - }); - - fs.unlinkSync(fn); + callbacks.close++; + assert.throws(function() { + console.error('write after end should not be allowed'); + file.write('should not work anymore'); }); + fs.unlinkSync(fn); + }); + for (var i = 0; i < 11; i++) { (function(i) { file.write('' + i); diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index a2552d95b215d4..07afeab48310d7 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -1,16 +1,15 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var path = require('path'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); var filepath = path.join(common.tmpDir, 'write_pos.txt'); -var cb_expected = 'write open close write open close write open close ', - cb_occurred = ''; +const cb_expected = 'write open close write open close write open close '; +let cb_occurred = ''; var fileDataInitial = 'abcdefghijklmnopqrstuvwxyz'; @@ -126,8 +125,8 @@ function run_test_2() { function run_test_3() { var file, options; - var data = '\u2026\u2026', // 3 bytes * 2 = 6 bytes in UTF-8 - fileData; + const data = '\u2026\u2026'; // 3 bytes * 2 = 6 bytes in UTF-8 + let fileData; options = { start: 10, flags: 'r+' }; diff --git a/test/parallel/test-fs-chmod.js b/test/parallel/test-fs-chmod.js index 11c8bb6168916e..954916cbdbb365 100644 --- a/test/parallel/test-fs-chmod.js +++ b/test/parallel/test-fs-chmod.js @@ -51,8 +51,8 @@ if (common.isWindows) { mode_sync = 0o644; } -var file1 = path.join(common.fixturesDir, 'a.js'), - file2 = path.join(common.fixturesDir, 'a1.js'); +const file1 = path.join(common.fixturesDir, 'a.js'); +const file2 = path.join(common.fixturesDir, 'a1.js'); fs.chmod(file1, mode_async.toString(8), function(err) { if (err) { diff --git a/test/parallel/test-fs-error-messages.js b/test/parallel/test-fs-error-messages.js index ca0684c1d71363..1a05ef80a44a5c 100644 --- a/test/parallel/test-fs-error-messages.js +++ b/test/parallel/test-fs-error-messages.js @@ -1,14 +1,13 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var path = require('path'), - fs = require('fs'), - fn = path.join(common.fixturesDir, 'non-existent'), - existingFile = path.join(common.fixturesDir, 'exit.js'), - existingFile2 = path.join(common.fixturesDir, 'create-file.js'), - existingDir = path.join(common.fixturesDir, 'empty'), - existingDir2 = path.join(common.fixturesDir, 'keys'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const fn = path.join(common.fixturesDir, 'non-existent'); +const existingFile = path.join(common.fixturesDir, 'exit.js'); +const existingFile2 = path.join(common.fixturesDir, 'create-file.js'); +const existingDir = path.join(common.fixturesDir, 'empty'); +const existingDir2 = path.join(common.fixturesDir, 'keys'); // ASYNC_CALL @@ -78,8 +77,8 @@ fs.readFile(fn, function(err) { // Sync -var errors = [], - expected = 0; +const errors = []; +let expected = 0; try { ++expected; diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index 667abb81765f91..16b3d35cae5a49 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -29,7 +29,8 @@ assert.equal(fs._stringToFlags('xa'), O_APPEND | O_CREAT | O_WRONLY | O_EXCL); assert.equal(fs._stringToFlags('ax+'), O_APPEND | O_CREAT | O_RDWR | O_EXCL); assert.equal(fs._stringToFlags('xa+'), O_APPEND | O_CREAT | O_RDWR | O_EXCL); -('+ +a +r +w rw wa war raw r++ a++ w++' + - 'x +x x+ rx rx+ wxx wax xwx xxx').split(' ').forEach(function(flags) { - assert.throws(function() { fs._stringToFlags(flags); }); -}); +('+ +a +r +w rw wa war raw r++ a++ w++ x +x x+ rx rx+ wxx wax xwx xxx') + .split(' ') + .forEach(function(flags) { + assert.throws(function() { fs._stringToFlags(flags); }); + }); diff --git a/test/parallel/test-fs-read-buffer.js b/test/parallel/test-fs-read-buffer.js index 57a28d477c6575..6b6f0572dacc8a 100644 --- a/test/parallel/test-fs-read-buffer.js +++ b/test/parallel/test-fs-read-buffer.js @@ -1,15 +1,15 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var path = require('path'), - Buffer = require('buffer').Buffer, - fs = require('fs'), - filepath = path.join(common.fixturesDir, 'x.txt'), - fd = fs.openSync(filepath, 'r'), - expected = 'xyz\n', - bufferAsync = new Buffer(expected.length), - bufferSync = new Buffer(expected.length), - readCalled = 0; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const Buffer = require('buffer').Buffer; +const fs = require('fs'); +const filepath = path.join(common.fixturesDir, 'x.txt'); +const fd = fs.openSync(filepath, 'r'); +const expected = 'xyz\n'; +const bufferAsync = new Buffer(expected.length); +const bufferSync = new Buffer(expected.length); +let readCalled = 0; fs.read(fd, bufferAsync, 0, expected.length, 0, function(err, bytesRead) { readCalled++; diff --git a/test/parallel/test-fs-read.js b/test/parallel/test-fs-read.js index 8b0b6fe0a3844d..6f20656e282b8e 100644 --- a/test/parallel/test-fs-read.js +++ b/test/parallel/test-fs-read.js @@ -1,12 +1,12 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var path = require('path'), - fs = require('fs'), - filepath = path.join(common.fixturesDir, 'x.txt'), - fd = fs.openSync(filepath, 'r'), - expected = 'xyz\n', - readCalled = 0; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const filepath = path.join(common.fixturesDir, 'x.txt'); +const fd = fs.openSync(filepath, 'r'); +const expected = 'xyz\n'; +let readCalled = 0; fs.read(fd, expected.length, 0, 'utf-8', function(err, str, bytesRead) { readCalled++; diff --git a/test/parallel/test-fs-readfile-empty.js b/test/parallel/test-fs-readfile-empty.js index 2669ce1ad6b121..afc0863673ee49 100644 --- a/test/parallel/test-fs-readfile-empty.js +++ b/test/parallel/test-fs-readfile-empty.js @@ -1,10 +1,9 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var path = require('path'), - fs = require('fs'), - fn = path.join(common.fixturesDir, 'empty.txt'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const fn = path.join(common.fixturesDir, 'empty.txt'); fs.readFile(fn, function(err, data) { assert.ok(data); diff --git a/test/parallel/test-fs-readfile-unlink.js b/test/parallel/test-fs-readfile-unlink.js index 15491b71c433ed..dad993aa4ff2b2 100644 --- a/test/parallel/test-fs-readfile-unlink.js +++ b/test/parallel/test-fs-readfile-unlink.js @@ -1,10 +1,10 @@ 'use strict'; -var assert = require('assert'), - common = require('../common'), - fs = require('fs'), - path = require('path'), - dirName = path.resolve(common.fixturesDir, 'test-readfile-unlink'), - fileName = path.resolve(dirName, 'test.bin'); +const assert = require('assert'); +const common = require('../common'); +const fs = require('fs'); +const path = require('path'); +const dirName = path.resolve(common.fixturesDir, 'test-readfile-unlink'); +const fileName = path.resolve(dirName, 'test.bin'); var buf = new Buffer(512 * 1024); buf.fill(42); diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 53312c6e8d7186..b18afac12d4a78 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -85,8 +85,8 @@ function test_simple_relative_symlink(callback) { console.log('1..0 # Skipped: symlink test (no privs)'); return runNextTest(); } - var entry = common.tmpDir + '/symlink', - expected = common.tmpDir + '/cycles/root.js'; + const entry = common.tmpDir + '/symlink'; + const expected = common.tmpDir + '/cycles/root.js'; [ [entry, '../' + common.tmpDirName + '/cycles/root.js'] ].forEach(function(t) { @@ -111,8 +111,8 @@ function test_simple_absolute_symlink(callback) { console.log('using type=%s', type); - var entry = tmpAbsDir + '/symlink', - expected = common.fixturesDir + '/nested-index/one'; + const entry = tmpAbsDir + '/symlink'; + const expected = common.fixturesDir + '/nested-index/one'; [ [entry, expected] ].forEach(function(t) { @@ -490,8 +490,8 @@ function test_lying_cache_liar(cb) { }); assert(called === false); - var test = path.resolve('/a/b/c/d'), - expect = path.resolve('/a/b/d'); + const test = path.resolve('/a/b/c/d'); + const expect = path.resolve('/a/b/d'); var actual = fs.realpathSync(test, cache); assert.equal(expect, actual); fs.realpath(test, cache, function(er, actual) { diff --git a/test/parallel/test-fs-write-buffer.js b/test/parallel/test-fs-write-buffer.js index dace4a19a183a8..55ae8e287613a7 100644 --- a/test/parallel/test-fs-write-buffer.js +++ b/test/parallel/test-fs-write-buffer.js @@ -1,13 +1,13 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var path = require('path'), - Buffer = require('buffer').Buffer, - fs = require('fs'), - filename = path.join(common.tmpDir, 'write.txt'), - expected = new Buffer('hello'), - openCalled = 0, - writeCalled = 0; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const Buffer = require('buffer').Buffer; +const fs = require('fs'); +const filename = path.join(common.tmpDir, 'write.txt'); +const expected = new Buffer('hello'); +let openCalled = 0; +let writeCalled = 0; common.refreshTmpDir(); diff --git a/test/parallel/test-fs-write-stream-change-open.js b/test/parallel/test-fs-write-stream-change-open.js index a7503e1a603202..a9d31a3074dcd6 100644 --- a/test/parallel/test-fs-write-stream-change-open.js +++ b/test/parallel/test-fs-write-stream-change-open.js @@ -1,17 +1,16 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var path = require('path'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); var file = path.join(common.tmpDir, 'write.txt'); common.refreshTmpDir(); -var stream = fs.WriteStream(file), - _fs_close = fs.close, - _fs_open = fs.open; +const stream = fs.WriteStream(file); +const _fs_close = fs.close; +const _fs_open = fs.open; // change the fs.open with an identical function after the WriteStream // has pushed it onto its internal action queue, but before it's diff --git a/test/parallel/test-fs-write-stream.js b/test/parallel/test-fs-write-stream.js index af3ae17ec7e7e1..5d29e60545f434 100644 --- a/test/parallel/test-fs-write-stream.js +++ b/test/parallel/test-fs-write-stream.js @@ -1,17 +1,16 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var path = require('path'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); var file = path.join(common.tmpDir, 'write.txt'); common.refreshTmpDir(); (function() { - var stream = fs.WriteStream(file), - _fs_close = fs.close; + const stream = fs.WriteStream(file); + const _fs_close = fs.close; fs.close = function(fd) { assert.ok(fd, 'fs.close must not be called without an undefined fd.'); diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index 82d8ee054c5860..4eeecf36e0ac22 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -11,8 +11,8 @@ assert.equal('foo', global.baseFoo, 'x -> global.x in base level not working'); assert.equal('bar', baseBar, 'global.x -> x in base level not working'); -var module = require('../fixtures/global/plain'), - fooBar = module.fooBar; +var module = require('../fixtures/global/plain'); +const fooBar = module.fooBar; assert.equal('foo', fooBar.foo, 'x -> global.x in sub level not working'); diff --git a/test/parallel/test-http-abort-queued.js b/test/parallel/test-http-abort-queued.js index f2b0120366c374..d28ad01888884d 100644 --- a/test/parallel/test-http-abort-queued.js +++ b/test/parallel/test-http-abort-queued.js @@ -1,7 +1,7 @@ 'use strict'; -var assert = require('assert'), - common = require('../common'), - http = require('http'); +const assert = require('assert'); +const common = require('../common'); +const http = require('http'); var complete; diff --git a/test/parallel/test-http-client-response-domain.js b/test/parallel/test-http-client-response-domain.js index 5809d93aee72c4..59b95144867538 100644 --- a/test/parallel/test-http-client-response-domain.js +++ b/test/parallel/test-http-client-response-domain.js @@ -1,8 +1,8 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - http = require('http'), - domain = require('domain'); +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const domain = require('domain'); var gotDomainError = false; var d; diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 809742f5628df5..51bfb8299b13df 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -15,8 +15,8 @@ var options = { //http.globalAgent.maxSockets = 15; var server = http.createServer(function(req, res) { - var m = /\/(.*)/.exec(req.url), - reqid = parseInt(m[1], 10); + const m = /\/(.*)/.exec(req.url); + const reqid = parseInt(m[1], 10); if ( reqid % 2 ) { // do not reply the request } else { diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index e403b401fb603f..69d81e9b9724ce 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -1,19 +1,19 @@ 'use strict'; -var common = require('../common'); -var http = require('http'), - PORT = common.PORT, - SSLPORT = common.PORT + 1, - assert = require('assert'), - hostExpect = 'localhost', - fs = require('fs'), - path = require('path'), - fixtures = path.resolve(__dirname, '../fixtures/keys'), - options = { - key: fs.readFileSync(fixtures + '/agent1-key.pem'), - cert: fs.readFileSync(fixtures + '/agent1-cert.pem') - }, - gotHttpsResp = false, - gotHttpResp = false; +const common = require('../common'); +const http = require('http'); +const PORT = common.PORT; +const SSLPORT = common.PORT + 1; +const assert = require('assert'); +const hostExpect = 'localhost'; +const fs = require('fs'); +const path = require('path'); +const fixtures = path.resolve(__dirname, '../fixtures/keys'); +const options = { + key: fs.readFileSync(fixtures + '/agent1-key.pem'), + cert: fs.readFileSync(fixtures + '/agent1-cert.pem') +}; +let gotHttpsResp = false; +let gotHttpResp = false; if (common.hasCrypto) { var https = require('https'); diff --git a/test/parallel/test-http-header-response-splitting.js b/test/parallel/test-http-header-response-splitting.js index 437793a524f22f..bb1da8ca7ca3ea 100644 --- a/test/parallel/test-http-header-response-splitting.js +++ b/test/parallel/test-http-header-response-splitting.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - http = require('http'); +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); var testIndex = 0; const testCount = 2 * 4 * 6; @@ -10,24 +10,24 @@ const responseBody = 'Hi mars!'; var server = http.createServer(function(req, res) { function reply(header) { switch (testIndex % 4) { - case 0: - res.writeHead(200, { a: header, b: header }); - break; - case 1: - res.setHeader('a', header); - res.setHeader('b', header); - res.writeHead(200); - break; - case 2: - res.setHeader('a', header); - res.writeHead(200, { b: header }); - break; - case 3: - res.setHeader('a', [header]); - res.writeHead(200, { b: header }); - break; - default: - assert.fail(null, null, 'unreachable'); + case 0: + res.writeHead(200, { a: header, b: header }); + break; + case 1: + res.setHeader('a', header); + res.setHeader('b', header); + res.writeHead(200); + break; + case 2: + res.setHeader('a', header); + res.writeHead(200, { b: header }); + break; + case 3: + res.setHeader('a', [header]); + res.writeHead(200, { b: header }); + break; + default: + assert.fail(null, null, 'unreachable'); } res.write(responseBody); if (testIndex % 8 < 4) { diff --git a/test/parallel/test-http-host-headers.js b/test/parallel/test-http-host-headers.js index b5c083dfdf6d15..f121216801c045 100644 --- a/test/parallel/test-http-host-headers.js +++ b/test/parallel/test-http-host-headers.js @@ -1,8 +1,8 @@ 'use strict'; -var http = require('http'), - common = require('../common'), - assert = require('assert'), - httpServer = http.createServer(reqHandler); +const http = require('http'); +const common = require('../common'); +const assert = require('assert'); +const httpServer = http.createServer(reqHandler); function reqHandler(req, res) { console.log('Got request: ' + req.headers.host + ' ' + req.url); diff --git a/test/parallel/test-http-localaddress.js b/test/parallel/test-http-localaddress.js index ac5de820263787..c7bb9f0301e407 100644 --- a/test/parallel/test-http-localaddress.js +++ b/test/parallel/test-http-localaddress.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'); -var http = require('http'), - assert = require('assert'); +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); if (!common.hasMultiLocalhost()) { console.log('1..0 # Skipped: platform-specific test.'); diff --git a/test/parallel/test-http-parser.js b/test/parallel/test-http-parser.js index f10f3ac26b4b10..17d5aa1d8f9575 100644 --- a/test/parallel/test-http-parser.js +++ b/test/parallel/test-http-parser.js @@ -333,8 +333,8 @@ function expectBody(expected) { assert.equal(versionMinor, 1); }; - var body_part = 0, - body_parts = ['123', '123456', '1234567890']; + let body_part = 0; + const body_parts = ['123', '123456', '1234567890']; var onBody = function(buf, start, len) { var body = '' + buf.slice(start, start + len); @@ -371,8 +371,8 @@ function expectBody(expected) { assert.equal(versionMinor, 1); }; - var body_part = 0, - body_parts = + let body_part = 0; + const body_parts = ['123', '123456', '123456789', '123456789ABC', '123456789ABCDEF']; var onBody = function(buf, start, len) { diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index f459961517852b..abaa368045d14d 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -23,20 +23,22 @@ server.listen(port, function() { var count = 0; function createRequest() { - var req = http.request({port: port, path: '/', agent: agent}, - function(res) { - req.clearTimeout(callback); - - res.on('end', function() { - count++; - - if (count == 11) { - server.close(); - } - }); - - res.resume(); - }); + const req = http.request( + {port: port, path: '/', agent: agent}, + function(res) { + req.clearTimeout(callback); + + res.on('end', function() { + count++; + + if (count == 11) { + server.close(); + } + }); + + res.resume(); + } + ); req.setTimeout(1000, callback); return req; diff --git a/test/parallel/test-https-host-headers.js b/test/parallel/test-https-host-headers.js index 0ea32f320e736b..1e71fd5b9ef5b7 100644 --- a/test/parallel/test-https-host-headers.js +++ b/test/parallel/test-https-host-headers.js @@ -8,12 +8,12 @@ if (!common.hasCrypto) { } var https = require('https'); -var fs = require('fs'), - options = { - key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), - cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') - }, - httpsServer = https.createServer(options, reqHandler); +const fs = require('fs'); +const options = { + key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), + cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') +}; +const httpsServer = https.createServer(options, reqHandler); function reqHandler(req, res) { console.log('Got request: ' + req.headers.host + ' ' + req.url); diff --git a/test/parallel/test-https-localaddress.js b/test/parallel/test-https-localaddress.js index a330c4881a9e47..bce65d58e296f2 100644 --- a/test/parallel/test-https-localaddress.js +++ b/test/parallel/test-https-localaddress.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'), - fs = require('fs'), - assert = require('assert'); +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); diff --git a/test/parallel/test-net-listen-port-option.js b/test/parallel/test-net-listen-port-option.js index d1eddb6707c274..5c3bc8eb7956ae 100644 --- a/test/parallel/test-net-listen-port-option.js +++ b/test/parallel/test-net-listen-port-option.js @@ -14,7 +14,8 @@ net.Server().listen({ port: '' + common.PORT }, close); 1 / 0, -1 / 0, '+Infinity', - '-Infinity' ].forEach(function(port) { + '-Infinity' +].forEach(function(port) { assert.throws(function() { net.Server().listen({ port: port }, assert.fail); }, /port should be >= 0 and < 65536/i); diff --git a/test/parallel/test-net-pause-resume-connecting.js b/test/parallel/test-net-pause-resume-connecting.js index fb3b66c8cf991c..6be20cecb91159 100644 --- a/test/parallel/test-net-pause-resume-connecting.js +++ b/test/parallel/test-net-pause-resume-connecting.js @@ -1,11 +1,11 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - net = require('net'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); -var connections = 0, - dataEvents = 0, - conn; +let connections = 0; +let dataEvents = 0; +let conn; // Server diff --git a/test/parallel/test-net-stream.js b/test/parallel/test-net-stream.js index 151b1b178f9adc..f2b795f931bd9c 100644 --- a/test/parallel/test-net-stream.js +++ b/test/parallel/test-net-stream.js @@ -38,14 +38,14 @@ var server = net.createServer(function(socket) { socket.end(); }).listen(common.PORT, function() { - var conn = net.connect(common.PORT); - conn.on('data', function(buf) { - conn.pause(); - setTimeout(function() { - conn.destroy(); - }, 20); - }); + var conn = net.connect(common.PORT); + conn.on('data', function(buf) { + conn.pause(); + setTimeout(function() { + conn.destroy(); + }, 20); }); +}); process.on('exit', function() { assert.equal(server.connections, 0); diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index 7c511b8d5e18ab..fe13d6ed4dac93 100644 --- a/test/parallel/test-next-tick-errors.js +++ b/test/parallel/test-next-tick-errors.js @@ -2,8 +2,8 @@ require('../common'); var assert = require('assert'); -var order = [], - exceptionHandled = false; +const order = []; +let exceptionHandled = false; // This nextTick function will throw an error. It should only be called once. // When it throws an error, it should still get removed from the queue. diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index c8913d2dfc56e4..f635f7f010012c 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -80,7 +80,7 @@ function checkErrors(path) { errors.forEach(function(errorCase) { try { path[errorCase.method].apply(path, errorCase.input); - } catch(err) { + } catch (err) { assert.ok(err instanceof TypeError); assert.ok( errorCase.message.test(err.message), diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index f30ad1d218e645..f94a7eae942493 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -1,8 +1,8 @@ 'use strict'; require('../common'); -var assert = require('assert'), - path = require('path'), - child_process = require('child_process'); +const assert = require('assert'); +const path = require('path'); +const child_process = require('child_process'); var nodeBinary = process.argv[0]; diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js index 5e7739daa5b406..8345096445098c 100644 --- a/test/parallel/test-promises-unhandled-rejections.js +++ b/test/parallel/test-promises-unhandled-rejections.js @@ -234,23 +234,27 @@ asyncTest('When re-throwing new errors in a promise catch, only the re-thrown' + var promise2; }); -asyncTest('unhandledRejection should not be triggered if a promise catch is' + - ' attached synchronously upon the promise\'s creation', - function(done) { - var e = new Error(); - onUnhandledFail(done); - Promise.reject(e).then(common.fail, function() {}); -}); - -asyncTest('unhandledRejection should not be triggered if a promise catch is' + - ' attached synchronously upon the promise\'s creation', - function(done) { - var e = new Error(); - onUnhandledFail(done); - new Promise(function(_, reject) { - reject(e); - }).then(common.fail, function() {}); -}); +asyncTest( + 'unhandledRejection should not be triggered if a promise catch is' + + ' attached synchronously upon the promise\'s creation', + function(done) { + var e = new Error(); + onUnhandledFail(done); + Promise.reject(e).then(common.fail, function() {}); + } +); + +asyncTest( + 'unhandledRejection should not be triggered if a promise catch is' + + ' attached synchronously upon the promise\'s creation', + function(done) { + var e = new Error(); + onUnhandledFail(done); + new Promise(function(_, reject) { + reject(e); + }).then(common.fail, function() {}); + } +); asyncTest('Attaching a promise catch in a process.nextTick is soon enough to' + ' prevent unhandledRejection', function(done) { @@ -360,19 +364,21 @@ asyncTest('A rejected promise derived from throwing in a fulfillment handler' + }); }); -asyncTest('A rejected promise derived from returning a synchronously-rejected' + - ' promise in a fulfillment handler does trigger unhandledRejection', - function(done) { - var e = new Error(); - var _promise; - onUnhandledSucceed(done, function(reason, promise) { - assert.strictEqual(e, reason); - assert.strictEqual(_promise, promise); - }); - _promise = Promise.resolve().then(function() { - return Promise.reject(e); - }); -}); +asyncTest( + 'A rejected promise derived from returning a synchronously-rejected' + + ' promise in a fulfillment handler does trigger unhandledRejection', + function(done) { + var e = new Error(); + var _promise; + onUnhandledSucceed(done, function(reason, promise) { + assert.strictEqual(e, reason); + assert.strictEqual(_promise, promise); + }); + _promise = Promise.resolve().then(function() { + return Promise.reject(e); + }); + } +); // Combinations with Promise.all asyncTest('Catching the Promise.all() of a collection that includes a' + @@ -382,21 +388,23 @@ asyncTest('Catching the Promise.all() of a collection that includes a' + Promise.all([Promise.reject(e)]).then(common.fail, function() {}); }); -asyncTest('Catching the Promise.all() of a collection that includes a ' + - 'nextTick-async rejected promise prevents unhandledRejection', - function(done) { - var e = new Error(); - onUnhandledFail(done); - var p = new Promise(function(_, reject) { +asyncTest( + 'Catching the Promise.all() of a collection that includes a ' + + 'nextTick-async rejected promise prevents unhandledRejection', + function(done) { + var e = new Error(); + onUnhandledFail(done); + var p = new Promise(function(_, reject) { + process.nextTick(function() { + reject(e); + }); + }); + p = Promise.all([p]); process.nextTick(function() { - reject(e); + p.then(common.fail, function() {}); }); - }); - p = Promise.all([p]); - process.nextTick(function() { - p.then(common.fail, function() {}); - }); -}); + } +); asyncTest('Failing to catch the Promise.all() of a collection that includes' + ' a rejected promise triggers unhandledRejection for the returned' + @@ -513,26 +521,28 @@ asyncTest('Waiting for some combination of promise microtasks + ' + }); }); -asyncTest('Waiting for some combination of promise microtasks +' + - ' process.nextTick to attach a catch handler is still soon enough' + - ' to prevent unhandledRejection: inside setImmediate', - function(done) { - var e = new Error(); - onUnhandledFail(done); +asyncTest( + 'Waiting for some combination of promise microtasks +' + + ' process.nextTick to attach a catch handler is still soon enough' + + ' to prevent unhandledRejection: inside setImmediate', + function(done) { + var e = new Error(); + onUnhandledFail(done); - setImmediate(function() { - var a = Promise.reject(e); - Promise.resolve().then(function() { - process.nextTick(function() { - Promise.resolve().then(function() { - process.nextTick(function() { - a.catch(function() {}); + setImmediate(function() { + var a = Promise.reject(e); + Promise.resolve().then(function() { + process.nextTick(function() { + Promise.resolve().then(function() { + process.nextTick(function() { + a.catch(function() {}); + }); }); }); }); }); - }); -}); + } +); asyncTest('Waiting for some combination of promise microtasks +' + ' process.nextTick to attach a catch handler is still soon enough' + @@ -612,28 +622,30 @@ asyncTest('setImmediate + promise microtasks is too late to attach a catch' + }); }); -asyncTest('Promise unhandledRejection handler does not interfere with domain' + - ' error handlers being given exceptions thrown from nextTick.', - function(done) { - var d = domain.create(); - var domainReceivedError; - d.on('error', function(e) { - domainReceivedError = e; - }); - d.run(function() { - var e = new Error('error'); - var domainError = new Error('domain error'); - onUnhandledSucceed(done, function(reason, promise) { - assert.strictEqual(reason, e); - assert.strictEqual(domainReceivedError, domainError); - d.dispose(); +asyncTest( + 'Promise unhandledRejection handler does not interfere with domain' + + ' error handlers being given exceptions thrown from nextTick.', + function(done) { + var d = domain.create(); + var domainReceivedError; + d.on('error', function(e) { + domainReceivedError = e; }); - Promise.reject(e); - process.nextTick(function() { - throw domainError; + d.run(function() { + var e = new Error('error'); + var domainError = new Error('domain error'); + onUnhandledSucceed(done, function(reason, promise) { + assert.strictEqual(reason, e); + assert.strictEqual(domainReceivedError, domainError); + d.dispose(); + }); + Promise.reject(e); + process.nextTick(function() { + throw domainError; + }); }); - }); -}); + } +); asyncTest('nextTick is immediately scheduled when called inside an event' + ' handler', function(done) { diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index bb3c361f882a14..f30d0a3cb2597e 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -182,12 +182,11 @@ assert.equal( // Test removing limit function testUnlimitedKeys() { - var query = {}, - url; + const query = {}; for (var i = 0; i < 2000; i++) query[i] = i; - url = qs.stringify(query); + const url = qs.stringify(query); assert.equal( Object.keys(qs.parse(url, null, null, { maxKeys: 0 })).length, diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 6d79879615fa28..9697b25ab54259 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -259,7 +259,7 @@ function isWarned(emitter) { }); try { fi.emit('data', 'fooX'); - } catch(e) { } + } catch (e) { } fi.emit('data', 'bar'); assert.equal(keys.join(''), 'fooXbar'); rli.close(); diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-regress-GH-7511.js index 03813dea003eaf..6194da291c7ae4 100644 --- a/test/parallel/test-regress-GH-7511.js +++ b/test/parallel/test-regress-GH-7511.js @@ -1,7 +1,7 @@ 'use strict'; require('../common'); -var assert = require('assert'), - vm = require('vm'); +const assert = require('assert'); +const vm = require('vm'); assert.doesNotThrow(function() { var context = vm.createContext({ process: process }); diff --git a/test/parallel/test-repl-console.js b/test/parallel/test-repl-console.js index fe737d841e1651..609822703fef1e 100644 --- a/test/parallel/test-repl-console.js +++ b/test/parallel/test-repl-console.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - repl = require('repl'); +const common = require('../common'); +const assert = require('assert'); +const repl = require('repl'); // Create a dummy stream that does nothing const stream = new common.ArrayStream(); diff --git a/test/parallel/test-repl-definecommand.js b/test/parallel/test-repl-definecommand.js index a28689a55d1b1e..c0e1b3269a39d2 100644 --- a/test/parallel/test-repl-definecommand.js +++ b/test/parallel/test-repl-definecommand.js @@ -2,9 +2,9 @@ require('../common'); -const stream = require('stream'), - assert = require('assert'), - repl = require('repl'); +const stream = require('stream'); +const assert = require('assert'); +const repl = require('repl'); var output = ''; const inputStream = new stream.PassThrough(); diff --git a/test/parallel/test-repl-end-emits-exit.js b/test/parallel/test-repl-end-emits-exit.js index 2c18b413d68c0f..7f2c4b9eb2893f 100644 --- a/test/parallel/test-repl-end-emits-exit.js +++ b/test/parallel/test-repl-end-emits-exit.js @@ -1,9 +1,9 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - repl = require('repl'), - terminalExit = 0, - regularExit = 0; +const common = require('../common'); +const assert = require('assert'); +const repl = require('repl'); +let terminalExit = 0; +let regularExit = 0; // Create a dummy stream that does nothing const stream = new common.ArrayStream(); diff --git a/test/parallel/test-repl-envvars.js b/test/parallel/test-repl-envvars.js index 2c34bbf2da86fa..759b4e15a12f46 100644 --- a/test/parallel/test-repl-envvars.js +++ b/test/parallel/test-repl-envvars.js @@ -8,30 +8,32 @@ const REPL = require('internal/repl'); const assert = require('assert'); const inspect = require('util').inspect; -const tests = [{ - env: {}, - expected: { terminal: true, useColors: true } -}, -{ - env: { NODE_DISABLE_COLORS: '1' }, - expected: { terminal: true, useColors: false } -}, -{ - env: { NODE_NO_READLINE: '1' }, - expected: { terminal: false, useColors: false } -}, -{ - env: { TERM: 'dumb' }, - expected: { terminal: true, useColors: false } -}, -{ - env: { NODE_NO_READLINE: '1', NODE_DISABLE_COLORS: '1' }, - expected: { terminal: false, useColors: false } -}, -{ - env: { NODE_NO_READLINE: '0' }, - expected: { terminal: true, useColors: true } -}]; +const tests = [ + { + env: {}, + expected: { terminal: true, useColors: true } + }, + { + env: { NODE_DISABLE_COLORS: '1' }, + expected: { terminal: true, useColors: false } + }, + { + env: { NODE_NO_READLINE: '1' }, + expected: { terminal: false, useColors: false } + }, + { + env: { TERM: 'dumb' }, + expected: { terminal: true, useColors: false } + }, + { + env: { NODE_NO_READLINE: '1', NODE_DISABLE_COLORS: '1' }, + expected: { terminal: false, useColors: false } + }, + { + env: { NODE_NO_READLINE: '0' }, + expected: { terminal: true, useColors: true } + } +]; function run(test) { const env = test.env; diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index ec3b144ec0ef77..395cd3e3675635 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - repl = require('repl'); +const common = require('../common'); +const assert = require('assert'); +const repl = require('repl'); common.globalCheck = false; diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 7571527b73800d..81e728974f179d 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -79,107 +79,109 @@ const enoentHistoryPath = path.join(fixtures, 'enoent-repl-history-file.json'); const emptyHistoryPath = path.join(fixtures, '.empty-repl-history-file'); const defaultHistoryPath = path.join(common.tmpDir, '.node_repl_history'); -const tests = [{ - env: { NODE_REPL_HISTORY: '' }, - test: [UP], - expected: [prompt, replDisabled, prompt] -}, -{ - env: { NODE_REPL_HISTORY: '', - NODE_REPL_HISTORY_FILE: enoentHistoryPath }, - test: [UP], - expected: [prompt, replDisabled, prompt] -}, -{ - env: { NODE_REPL_HISTORY: '', - NODE_REPL_HISTORY_FILE: oldHistoryPath }, - test: [UP], - expected: [prompt, replDisabled, prompt] -}, -{ - env: { NODE_REPL_HISTORY_FILE: emptyHistoryPath }, - test: [UP], - expected: [prompt, convertMsg, prompt] -}, -{ - env: { NODE_REPL_HISTORY_FILE: defaultHistoryPath }, - test: [UP], - expected: [prompt, sameHistoryFilePaths, prompt] -}, -{ - env: { NODE_REPL_HISTORY: historyPath }, - test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] -}, -{ - env: { NODE_REPL_HISTORY: historyPath, - NODE_REPL_HISTORY_FILE: oldHistoryPath }, - test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] -}, -{ - env: { NODE_REPL_HISTORY: historyPath, - NODE_REPL_HISTORY_FILE: '' }, - test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] -}, -{ - env: {}, - test: [UP], - expected: [prompt] -}, -{ - env: { NODE_REPL_HISTORY_FILE: oldHistoryPath }, - test: [UP, CLEAR, '\'42\'', ENTER], - expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt, '\'', - '4', '2', '\'', '\'42\'\n', prompt, prompt], - after: function ensureHistoryFixture() { - // XXX(Fishrock123) Make sure nothing weird happened to our fixture - // or it's temporary copy. - // Sometimes this test used to erase the fixture and I'm not sure why. - const history = fs.readFileSync(historyFixturePath, 'utf8'); - assert.strictEqual(history, - '\'you look fabulous today\'\n\'Stay Fresh~\'\n'); - const historyCopy = fs.readFileSync(historyPath, 'utf8'); - assert.strictEqual(historyCopy, '\'you look fabulous today\'' + os.EOL + - '\'Stay Fresh~\'' + os.EOL); - } -}, -{ // Requires the above testcase - env: {}, - test: [UP, UP, ENTER], - expected: [prompt, prompt + '\'42\'', prompt + '\'=^.^=\'', '\'=^.^=\'\n', - prompt] -}, -{ - env: { NODE_REPL_HISTORY: historyPath, - NODE_REPL_HISTORY_SIZE: 1 }, - test: [UP, UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] -}, -{ - env: { NODE_REPL_HISTORY_FILE: oldHistoryPath, - NODE_REPL_HISTORY_SIZE: 1 }, - test: [UP, UP, UP, CLEAR], - expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt] -}, -{ - env: { NODE_REPL_HISTORY: historyPathFail, - NODE_REPL_HISTORY_SIZE: 1 }, - test: [UP], - expected: [prompt, replFailedRead, prompt, replDisabled, prompt] -}, -{ // Make sure this is always the last test, since we change os.homedir() - before: function mockHomedirFailure() { - // Mock os.homedir() failure - os.homedir = function() { - throw new Error('os.homedir() failure'); - }; +const tests = [ + { + env: { NODE_REPL_HISTORY: '' }, + test: [UP], + expected: [prompt, replDisabled, prompt] + }, + { + env: { NODE_REPL_HISTORY: '', + NODE_REPL_HISTORY_FILE: enoentHistoryPath }, + test: [UP], + expected: [prompt, replDisabled, prompt] + }, + { + env: { NODE_REPL_HISTORY: '', + NODE_REPL_HISTORY_FILE: oldHistoryPath }, + test: [UP], + expected: [prompt, replDisabled, prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: emptyHistoryPath }, + test: [UP], + expected: [prompt, convertMsg, prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: defaultHistoryPath }, + test: [UP], + expected: [prompt, sameHistoryFilePaths, prompt] + }, + { + env: { NODE_REPL_HISTORY: historyPath }, + test: [UP, CLEAR], + expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + }, + { + env: { NODE_REPL_HISTORY: historyPath, + NODE_REPL_HISTORY_FILE: oldHistoryPath }, + test: [UP, CLEAR], + expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + }, + { + env: { NODE_REPL_HISTORY: historyPath, + NODE_REPL_HISTORY_FILE: '' }, + test: [UP, CLEAR], + expected: [prompt, prompt + '\'you look fabulous today\'', prompt] }, - env: {}, - test: [UP], - expected: [prompt, homedirErr, prompt, replDisabled, prompt] -}]; + { + env: {}, + test: [UP], + expected: [prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: oldHistoryPath }, + test: [UP, CLEAR, '\'42\'', ENTER], + expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt, '\'', + '4', '2', '\'', '\'42\'\n', prompt, prompt], + after: function ensureHistoryFixture() { + // XXX(Fishrock123) Make sure nothing weird happened to our fixture + // or it's temporary copy. + // Sometimes this test used to erase the fixture and I'm not sure why. + const history = fs.readFileSync(historyFixturePath, 'utf8'); + assert.strictEqual(history, + '\'you look fabulous today\'\n\'Stay Fresh~\'\n'); + const historyCopy = fs.readFileSync(historyPath, 'utf8'); + assert.strictEqual(historyCopy, '\'you look fabulous today\'' + os.EOL + + '\'Stay Fresh~\'' + os.EOL); + } + }, + { // Requires the above testcase + env: {}, + test: [UP, UP, ENTER], + expected: [prompt, prompt + '\'42\'', prompt + '\'=^.^=\'', '\'=^.^=\'\n', + prompt] + }, + { + env: { NODE_REPL_HISTORY: historyPath, + NODE_REPL_HISTORY_SIZE: 1 }, + test: [UP, UP, CLEAR], + expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: oldHistoryPath, + NODE_REPL_HISTORY_SIZE: 1 }, + test: [UP, UP, UP, CLEAR], + expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt] + }, + { + env: { NODE_REPL_HISTORY: historyPathFail, + NODE_REPL_HISTORY_SIZE: 1 }, + test: [UP], + expected: [prompt, replFailedRead, prompt, replDisabled, prompt] + }, + { // Make sure this is always the last test, since we change os.homedir() + before: function mockHomedirFailure() { + // Mock os.homedir() failure + os.homedir = function() { + throw new Error('os.homedir() failure'); + }; + }, + env: {}, + test: [UP], + expected: [prompt, homedirErr, prompt, replDisabled, prompt] + } +]; const numtests = tests.length; diff --git a/test/parallel/test-repl-require-cache.js b/test/parallel/test-repl-require-cache.js index c5f317ac268e2f..8a5d384935efd4 100644 --- a/test/parallel/test-repl-require-cache.js +++ b/test/parallel/test-repl-require-cache.js @@ -1,7 +1,7 @@ 'use strict'; require('../common'); -var assert = require('assert'), - repl = require('repl'); +const assert = require('assert'); +const repl = require('repl'); // https://github.com/joyent/node/issues/3226 diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 0d05de9bc1863d..5a13597e56966e 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -5,17 +5,17 @@ var assert = require('assert'); common.globalCheck = false; common.refreshTmpDir(); -var net = require('net'), - repl = require('repl'), - message = 'Read, Eval, Print Loop', - prompt_unix = 'node via Unix socket> ', - prompt_tcp = 'node via TCP socket> ', - prompt_multiline = '... ', - prompt_npm = 'npm should be run outside of the ' + - 'node repl, in your normal shell.\n' + - '(Press Control-D to exit.)\n', - expect_npm = prompt_npm + prompt_unix, - server_tcp, server_unix, client_tcp, client_unix, timer; +const net = require('net'); +const repl = require('repl'); +const message = 'Read, Eval, Print Loop'; +const prompt_unix = 'node via Unix socket> '; +const prompt_tcp = 'node via TCP socket> '; +const prompt_multiline = '... '; +const prompt_npm = 'npm should be run outside of the ' + + 'node repl, in your normal shell.\n' + + '(Press Control-D to exit.)\n'; +const expect_npm = prompt_npm + prompt_unix; +var server_tcp, server_unix, client_tcp, client_unix, timer; // absolute path to test/fixtures/a.js diff --git a/test/parallel/test-signal-handler.js b/test/parallel/test-signal-handler.js index bcd8256272005b..dc37a8a1f6704a 100644 --- a/test/parallel/test-signal-handler.js +++ b/test/parallel/test-signal-handler.js @@ -10,8 +10,8 @@ if (common.isWindows) { console.log('process.pid: ' + process.pid); -var first = 0, - second = 0; +let first = 0; +let second = 0; var sighup = false; diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js index 5b07dd11198e1a..2aa992b4a9a785 100644 --- a/test/parallel/test-stream-writev.js +++ b/test/parallel/test-stream-writev.js @@ -44,24 +44,24 @@ function test(decode, uncork, multi, next) { }; var expectChunks = decode ? - [ - { encoding: 'buffer', - chunk: [104, 101, 108, 108, 111, 44, 32] }, - { encoding: 'buffer', - chunk: [119, 111, 114, 108, 100] }, - { encoding: 'buffer', - chunk: [33] }, - { encoding: 'buffer', - chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] }, - { encoding: 'buffer', - chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173]} - ] : [ - { encoding: 'ascii', chunk: 'hello, ' }, - { encoding: 'utf8', chunk: 'world' }, - { encoding: 'buffer', chunk: [33] }, - { encoding: 'binary', chunk: '\nand then...' }, - { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' } - ]; + [ + { encoding: 'buffer', + chunk: [104, 101, 108, 108, 111, 44, 32] }, + { encoding: 'buffer', + chunk: [119, 111, 114, 108, 100] }, + { encoding: 'buffer', + chunk: [33] }, + { encoding: 'buffer', + chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] }, + { encoding: 'buffer', + chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173]} + ] : [ + { encoding: 'ascii', chunk: 'hello, ' }, + { encoding: 'utf8', chunk: 'world' }, + { encoding: 'buffer', chunk: [33] }, + { encoding: 'binary', chunk: '\nand then...' }, + { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' } + ]; var actualChunks; w._writev = function(chunks, cb) { diff --git a/test/parallel/test-stringbytes-external-at-max.js b/test/parallel/test-stringbytes-external-at-max.js index 31f476d66b18ba..5467d05a20104a 100644 --- a/test/parallel/test-stringbytes-external-at-max.js +++ b/test/parallel/test-stringbytes-external-at-max.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js index 4789089d5e0040..af47a8e779a7a4 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js index 8f52d6ac30dd9f..fb599875a0459b 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js index 79dac9cc41dcf0..f4904b672cfea7 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js index 50d0dad5829160..9dd9d23565acf2 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js index ecd6eaf954e191..3ff6f4978878ee 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-2.js b/test/parallel/test-stringbytes-external-exceed-max-by-2.js index 8350c4532eafdc..1ac5a5c7fe1ced 100644 --- a/test/parallel/test-stringbytes-external-exceed-max-by-2.js +++ b/test/parallel/test-stringbytes-external-exceed-max-by-2.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-stringbytes-external-exceed-max.js b/test/parallel/test-stringbytes-external-exceed-max.js index fd19cfb9e20697..61666b8ebc6b48 100644 --- a/test/parallel/test-stringbytes-external-exceed-max.js +++ b/test/parallel/test-stringbytes-external-exceed-max.js @@ -21,7 +21,7 @@ try { // Try to allocate memory first then force gc so future allocations succeed. new Buffer(2 * kStringMaxLength); gc(); -} catch(e) { +} catch (e) { // If the exception is not due to memory confinement then rethrow it. if (e.message !== 'Invalid array buffer length') throw (e); console.log(skipMessage); diff --git a/test/parallel/test-timers-immediate.js b/test/parallel/test-timers-immediate.js index 9486465602ce9b..40e91a099815b6 100644 --- a/test/parallel/test-timers-immediate.js +++ b/test/parallel/test-timers-immediate.js @@ -2,15 +2,15 @@ require('../common'); var assert = require('assert'); -var immediateA = false, - immediateB = false, - immediateC = [], - before; +let immediateA = false; +let immediateB = false; +let immediateC = []; +let before; setImmediate(function() { try { immediateA = process.hrtime(before); - } catch(e) { + } catch (e) { console.log('failed to get hrtime with offset'); } clearImmediate(immediateB); diff --git a/test/parallel/test-timers-this.js b/test/parallel/test-timers-this.js index 1882f116fecd2d..e21167581e8944 100644 --- a/test/parallel/test-timers-this.js +++ b/test/parallel/test-timers-this.js @@ -2,8 +2,8 @@ require('../common'); var assert = require('assert'); -var immediateThis, intervalThis, timeoutThis, - immediateArgsThis, intervalArgsThis, timeoutArgsThis; +let immediateThis, intervalThis, timeoutThis; +let immediateArgsThis, intervalArgsThis, timeoutArgsThis; var immediateHandler = setImmediate(function() { immediateThis = this; diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index 671c676e350e3a..134b2ffe4c3967 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -2,12 +2,12 @@ require('../common'); var assert = require('assert'); -var interval_fired = false, - timeout_fired = false, - unref_interval = false, - unref_timer = false, - unref_callbacks = 0, - interval, check_unref, checks = 0; +let interval_fired = false; +let timeout_fired = false; +let unref_interval = false; +let unref_timer = false; +let unref_callbacks = 0; +let interval, check_unref, checks = 0; var LONG_TIME = 10 * 1000; var SHORT_TIME = 100; diff --git a/test/parallel/test-tls-connect-no-host.js b/test/parallel/test-tls-connect-no-host.js index 75870bea98b4b5..a6ead6ea6dceae 100644 --- a/test/parallel/test-tls-connect-no-host.js +++ b/test/parallel/test-tls-connect-no-host.js @@ -23,12 +23,12 @@ tls.createServer({ }).listen(common.PORT); var socket = tls.connect({ - port: common.PORT, - ca: cert, - // No host set here. 'localhost' is the default, - // but tls.checkServerIdentity() breaks before the fix with: - // Error: Hostname/IP doesn't match certificate's altnames: - // "Host: undefined. is not cert's CN: localhost" + port: common.PORT, + ca: cert, + // No host set here. 'localhost' is the default, + // but tls.checkServerIdentity() breaks before the fix with: + // Error: Hostname/IP doesn't match certificate's altnames: + // "Host: undefined. is not cert's CN: localhost" }, function() { assert(socket.authorized); process.exit(); diff --git a/test/parallel/test-tls-connect-stream-writes.js b/test/parallel/test-tls-connect-stream-writes.js index 4187c9b439e2f1..8fabc7edaeeda0 100644 --- a/test/parallel/test-tls-connect-stream-writes.js +++ b/test/parallel/test-tls-connect-stream-writes.js @@ -1,16 +1,15 @@ 'use strict'; -var assert = require('assert'), - fs = require('fs'), - path = require('path'), - tls = require('tls'), - stream = require('stream'), - net = require('net'); - -var common = require('../common'); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tls = require('tls'); +const stream = require('stream'); +const net = require('net'); var server; -var cert_dir = path.resolve(__dirname, '../fixtures'), - options = { key: fs.readFileSync(cert_dir + '/test_key.pem'), +var cert_dir = path.resolve(__dirname, '../fixtures'); +var options = { key: fs.readFileSync(cert_dir + '/test_key.pem'), cert: fs.readFileSync(cert_dir + '/test_cert.pem'), ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ], ciphers: 'AES256-GCM-SHA384' }; diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index 0a0453633af9ae..211cfc7ed35067 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -5,9 +5,9 @@ if (!process.features.tls_npn) { return; } -var common = require('../common'), - assert = require('assert'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -69,8 +69,8 @@ var clientsOptions = [{ rejectUnauthorized: false }]; -var serverResults = [], - clientsResults = []; +const serverResults = []; +const clientsResults = []; var server = tls.createServer(serverOptions, function(c) { serverResults.push(c.npnProtocol); diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js index fed77357dae04a..c9d4d263f5be7d 100644 --- a/test/parallel/test-tls-server-verify.js +++ b/test/parallel/test-tls-server-verify.js @@ -87,15 +87,14 @@ var testCases = renegotiate: false, CAs: ['ca2-cert'], crl: 'ca2-crl', - clients: - [ + clients: [ { name: 'agent1', shouldReject: true, shouldAuth: false }, { name: 'agent2', shouldReject: true, shouldAuth: false }, { name: 'agent3', shouldReject: false, shouldAuth: true }, // Agent4 has a cert in the CRL. { name: 'agent4', shouldReject: true, shouldAuth: false }, { name: 'nocert', shouldReject: true } - ] + ] } ]; diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index 8ebc0c3af44705..5b0bd53f4e6343 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -5,9 +5,9 @@ if (!process.features.tls_sni) { return; } -var common = require('../common'), - assert = require('assert'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -89,12 +89,12 @@ var clientsOptions = [{ rejectUnauthorized: false }]; -var serverResults = [], - clientResults = [], - serverErrors = [], - clientErrors = [], - serverError, - clientError; +const serverResults = []; +const clientResults = []; +const serverErrors = []; +const clientErrors = []; +let serverError; +let clientError; var server = tls.createServer(serverOptions, function(c) { serverResults.push(c.servername); diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js index bad5e108784353..8eb80b50e41540 100644 --- a/test/parallel/test-tls-sni-server-client.js +++ b/test/parallel/test-tls-sni-server-client.js @@ -5,9 +5,9 @@ if (!process.features.tls_sni) { return; } -var common = require('../common'), - assert = require('assert'), - fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); @@ -73,8 +73,8 @@ var clientsOptions = [{ rejectUnauthorized: false }]; -var serverResults = [], - clientResults = []; +const serverResults = []; +const clientResults = []; var server = tls.createServer(serverOptions, function(c) { serverResults.push(c.servername); diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index cd097be24384eb..9fa087261e0127 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -260,19 +260,19 @@ var parseTests = { }, 'http://user:pass@mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=': - { - 'href': 'http://user:pass@mt0.google.com/vt/lyrs=m@114???' + - '&hl=en&src=api&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'auth': 'user:pass', - 'hostname': 'mt0.google.com', - 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', - 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', - 'pathname': '/vt/lyrs=m@114', - 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' - }, + { + 'href': 'http://user:pass@mt0.google.com/vt/lyrs=m@114???' + + '&hl=en&src=api&x=2&y=2&z=3&s=', + 'protocol': 'http:', + 'slashes': true, + 'host': 'mt0.google.com', + 'auth': 'user:pass', + 'hostname': 'mt0.google.com', + 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', + 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', + 'pathname': '/vt/lyrs=m@114', + 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' + }, 'file:///etc/passwd' : { 'href': 'file:///etc/passwd', @@ -870,8 +870,8 @@ for (var u in parseTests) { assert.deepEqual(actual, expected); assert.deepEqual(spaced, expected); - var expected = parseTests[u].href, - actual = url.format(parseTests[u]); + expected = parseTests[u].href; + actual = url.format(parseTests[u]); assert.equal(actual, expected, 'format(' + u + ') == ' + u + '\nactual:' + actual); @@ -1194,8 +1194,8 @@ var relativeTests = [ ['http://localhost', 'file://foo/Users', 'file://foo/Users'] ]; relativeTests.forEach(function(relativeTest) { - var a = url.resolve(relativeTest[0], relativeTest[1]), - e = relativeTest[2]; + const a = url.resolve(relativeTest[0], relativeTest[1]); + const e = relativeTest[2]; assert.equal(a, e, 'resolve(' + [relativeTest[0], relativeTest[1]] + ') == ' + e + '\n actual=' + a); @@ -1504,8 +1504,8 @@ var relativeTests2 = [ 'http://diff:auth@www.example.com/'] ]; relativeTests2.forEach(function(relativeTest) { - var a = url.resolve(relativeTest[1], relativeTest[0]), - e = relativeTest[2]; + const a = url.resolve(relativeTest[1], relativeTest[0]); + const e = relativeTest[2]; assert.equal(a, e, 'resolve(' + [relativeTest[1], relativeTest[0]] + ') == ' + e + '\n actual=' + a); @@ -1516,8 +1516,8 @@ relativeTests2.forEach(function(relativeTest) { //format: [from, path, expected] relativeTests.forEach(function(relativeTest) { - var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]), - expected = url.parse(relativeTest[2]); + var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]); + var expected = url.parse(relativeTest[2]); assert.deepEqual(actual, expected); @@ -1544,13 +1544,13 @@ if (relativeTests2[181][0] === './/g' && relativeTests2.splice(181, 1); } relativeTests2.forEach(function(relativeTest) { - var actual = url.resolveObject(url.parse(relativeTest[1]), relativeTest[0]), - expected = url.parse(relativeTest[2]); + var actual = url.resolveObject(url.parse(relativeTest[1]), relativeTest[0]); + var expected = url.parse(relativeTest[2]); assert.deepEqual(actual, expected); - var expected = relativeTest[2], - actual = url.format(actual); + expected = relativeTest[2]; + actual = url.format(actual); assert.equal(actual, expected, 'format(' + relativeTest[1] + ') == ' + expected + diff --git a/test/parallel/test-util-log.js b/test/parallel/test-util-log.js index fbea5e5a31dbe4..b9e3d9ce3505e0 100644 --- a/test/parallel/test-util-log.js +++ b/test/parallel/test-util-log.js @@ -28,9 +28,9 @@ var tests = [ // test util.log() tests.forEach(function(test) { util.log(test.input); - var result = strings.shift().trim(), - re = (/[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/), - match = re.exec(result); + const result = strings.shift().trim(); + const re = (/[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/); + const match = re.exec(result); assert.ok(match); assert.equal(match[1], test.output); }); diff --git a/test/parallel/test-zlib-flush.js b/test/parallel/test-zlib-flush.js index 6281b8eb21feb2..69f734617e925e 100644 --- a/test/parallel/test-zlib-flush.js +++ b/test/parallel/test-zlib-flush.js @@ -5,18 +5,18 @@ var zlib = require('zlib'); var path = require('path'); var fs = require('fs'); -var file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')), - chunkSize = 16, - opts = { level: 0 }, - deflater = zlib.createDeflate(opts); +const file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')); +const chunkSize = 16; +const opts = { level: 0 }; +const deflater = zlib.createDeflate(opts); -var chunk = file.slice(0, chunkSize), - expectedNone = new Buffer([0x78, 0x01]), - blkhdr = new Buffer([0x00, 0x10, 0x00, 0xef, 0xff]), - adler32 = new Buffer([0x00, 0x00, 0x00, 0xff, 0xff]), - expectedFull = Buffer.concat([blkhdr, chunk, adler32]), - actualNone, - actualFull; +const chunk = file.slice(0, chunkSize); +const expectedNone = new Buffer([0x78, 0x01]); +const blkhdr = new Buffer([0x00, 0x10, 0x00, 0xef, 0xff]); +const adler32 = new Buffer([0x00, 0x00, 0x00, 0xff, 0xff]); +const expectedFull = Buffer.concat([blkhdr, chunk, adler32]); +let actualNone; +let actualFull; deflater.write(chunk, function() { deflater.flush(zlib.Z_NO_FLUSH, function() { diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js index 9850c6078c5320..91d4efd38831ac 100644 --- a/test/parallel/test-zlib-invalid-input.js +++ b/test/parallel/test-zlib-invalid-input.js @@ -2,8 +2,8 @@ // test uncompressing invalid input require('../common'); -var assert = require('assert'), - zlib = require('zlib'); +const assert = require('assert'); +const zlib = require('zlib'); var nonStringInputs = [1, true, {a: 1}, ['a']]; diff --git a/test/parallel/test-zlib-params.js b/test/parallel/test-zlib-params.js index f349c8dbd0afec..4e02b7bdb9461c 100644 --- a/test/parallel/test-zlib-params.js +++ b/test/parallel/test-zlib-params.js @@ -5,16 +5,16 @@ var zlib = require('zlib'); var path = require('path'); var fs = require('fs'); -var file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')), - chunkSize = 24 * 1024, - opts = { level: 9, strategy: zlib.Z_DEFAULT_STRATEGY }, - deflater = zlib.createDeflate(opts); +const file = fs.readFileSync(path.resolve(common.fixturesDir, 'person.jpg')); +const chunkSize = 24 * 1024; +const opts = { level: 9, strategy: zlib.Z_DEFAULT_STRATEGY }; +const deflater = zlib.createDeflate(opts); -var chunk1 = file.slice(0, chunkSize), - chunk2 = file.slice(chunkSize), - blkhdr = new Buffer([0x00, 0x48, 0x82, 0xb7, 0x7d]), - expected = Buffer.concat([blkhdr, chunk2]), - actual; +const chunk1 = file.slice(0, chunkSize); +const chunk2 = file.slice(chunkSize); +const blkhdr = new Buffer([0x00, 0x48, 0x82, 0xb7, 0x7d]); +const expected = Buffer.concat([blkhdr, chunk2]); +let actual; deflater.write(chunk1, function() { deflater.params(0, zlib.Z_DEFAULT_STRATEGY, function() { diff --git a/test/pummel/test-dh-regr.js b/test/pummel/test-dh-regr.js index 6fdd416b183669..e6b2f82bd9e465 100644 --- a/test/pummel/test-dh-regr.js +++ b/test/pummel/test-dh-regr.js @@ -11,8 +11,8 @@ var crypto = require('crypto'); var p = crypto.createDiffieHellman(1024).getPrime(); for (var i = 0; i < 2000; i++) { - var a = crypto.createDiffieHellman(p), - b = crypto.createDiffieHellman(p); + const a = crypto.createDiffieHellman(p); + const b = crypto.createDiffieHellman(p); a.generateKeys(); b.generateKeys(); diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js index 0ff1e2a7cf61b7..994d859f408d84 100644 --- a/test/pummel/test-exec.js +++ b/test/pummel/test-exec.js @@ -17,19 +17,21 @@ var success_count = 0; var error_count = 0; -exec('"' + process.execPath + '" -p -e process.versions', - function(err, stdout, stderr) { - if (err) { - error_count++; - console.log('error!: ' + err.code); - console.log('stdout: ' + JSON.stringify(stdout)); - console.log('stderr: ' + JSON.stringify(stderr)); - assert.equal(false, err.killed); - } else { - success_count++; - console.dir(stdout); +exec( + '"' + process.execPath + '" -p -e process.versions', + function(err, stdout, stderr) { + if (err) { + error_count++; + console.log('error!: ' + err.code); + console.log('stdout: ' + JSON.stringify(stdout)); + console.log('stderr: ' + JSON.stringify(stderr)); + assert.equal(false, err.killed); + } else { + success_count++; + console.dir(stdout); + } } -}); +); exec('thisisnotavalidcommand', function(err, stdout, stderr) { diff --git a/test/pummel/test-fs-watch-file-slow.js b/test/pummel/test-fs-watch-file-slow.js index cd4b16bf310b99..c21785f233c58f 100644 --- a/test/pummel/test-fs-watch-file-slow.js +++ b/test/pummel/test-fs-watch-file-slow.js @@ -19,19 +19,19 @@ catch (e) { fs.watchFile(FILENAME, {interval:TIMEOUT - 250}, function(curr, prev) { console.log([curr, prev]); switch (++nevents) { - case 1: - assert.equal(common.fileExists(FILENAME), false); - break; - case 2: - case 3: - assert.equal(common.fileExists(FILENAME), true); - break; - case 4: - assert.equal(common.fileExists(FILENAME), false); - fs.unwatchFile(FILENAME); - break; - default: - assert(0); + case 1: + assert.equal(common.fileExists(FILENAME), false); + break; + case 2: + case 3: + assert.equal(common.fileExists(FILENAME), true); + break; + case 4: + assert.equal(common.fileExists(FILENAME), false); + fs.unwatchFile(FILENAME); + break; + default: + assert(0); } }); diff --git a/test/pummel/test-http-client-reconnect-bug.js b/test/pummel/test-http-client-reconnect-bug.js index 12a6fecc7050e8..7b9b8b0da1bcb0 100644 --- a/test/pummel/test-http-client-reconnect-bug.js +++ b/test/pummel/test-http-client-reconnect-bug.js @@ -1,9 +1,8 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var net = require('net'), - http = require('http'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const http = require('http'); var errorCount = 0; var eofCount = 0; diff --git a/test/pummel/test-http-upload-timeout.js b/test/pummel/test-http-upload-timeout.js index d1be5311db0c00..6e5a7ed0506ffd 100644 --- a/test/pummel/test-http-upload-timeout.js +++ b/test/pummel/test-http-upload-timeout.js @@ -2,10 +2,10 @@ // This tests setTimeout() by having multiple clients connecting and sending // data in random intervals. Clients are also randomly disconnecting until there // are no more clients left. If no false timeout occurs, this test has passed. -var common = require('../common'), - http = require('http'), - server = http.createServer(), - connections = 0; +const common = require('../common'); +const http = require('http'); +const server = http.createServer(); +let connections = 0; server.on('request', function(req, res) { req.socket.setTimeout(1000); diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 205485c9ebbc48..784f2faf8cc373 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -12,8 +12,7 @@ var start = Date.now(); var err; var caught = false; -try -{ +try { var cmd = `"${process.execPath}" -e "setTimeout(function(){}, ${SLEEP});"`; var ret = execSync(cmd, {timeout: TIMER}); } catch (e) { diff --git a/test/sequential/test-init.js b/test/sequential/test-init.js index f68c001f64fffa..6bb727ea1f6184 100644 --- a/test/sequential/test-init.js +++ b/test/sequential/test-init.js @@ -1,9 +1,9 @@ 'use strict'; (function() { - var assert = require('assert'), - child = require('child_process'), - util = require('util'), - common = require('../common'); + const assert = require('assert'); + const child = require('child_process'); + const util = require('util'); + const common = require('../common'); if (process.env['TEST_INIT']) { util.print('Loaded successfully!'); } else { diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index ead3447320c50a..2235a068ca23f0 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -57,14 +57,14 @@ assert.equal('D', d4.D()); assert.ok((new a.SomeClass()) instanceof c.SomeClass); console.error('test index.js modules ids and relative loading'); -var one = require('../fixtures/nested-index/one'), - two = require('../fixtures/nested-index/two'); +const one = require('../fixtures/nested-index/one'); +const two = require('../fixtures/nested-index/two'); assert.notEqual(one.hello, two.hello); console.error('test index.js in a folder with a trailing slash'); -var three = require('../fixtures/nested-index/three'), - threeFolder = require('../fixtures/nested-index/three/'), - threeIndex = require('../fixtures/nested-index/three/index.js'); +const three = require('../fixtures/nested-index/three'); +const threeFolder = require('../fixtures/nested-index/three/'); +const threeIndex = require('../fixtures/nested-index/three/index.js'); assert.equal(threeFolder, threeIndex); assert.notEqual(threeFolder, three); @@ -75,8 +75,8 @@ assert.equal(require('../fixtures/packages/main-index').ok, 'ok', 'Failed loading package with index.js in main subdir'); console.error('test cycles containing a .. path'); -var root = require('../fixtures/cycles/root'), - foo = require('../fixtures/cycles/folder/foo'); +const root = require('../fixtures/cycles/root'); +const foo = require('../fixtures/cycles/folder/foo'); assert.equal(root.foo, foo); assert.equal(root.sayHello(), root.hello); @@ -141,8 +141,8 @@ try { // Check load order is as expected console.error('load order'); -var loadOrder = '../fixtures/module-load-order/', - msg = 'Load order incorrect.'; +const loadOrder = '../fixtures/module-load-order/'; +const msg = 'Load order incorrect.'; require.extensions['.reg'] = require.extensions['.js']; require.extensions['.reg2'] = require.extensions['.js']; diff --git a/test/sequential/test-regress-GH-1697.js b/test/sequential/test-regress-GH-1697.js index ba7f90ecf00951..bafd389fa8deee 100644 --- a/test/sequential/test-regress-GH-1697.js +++ b/test/sequential/test-regress-GH-1697.js @@ -1,7 +1,7 @@ 'use strict'; -var common = require('../common'); -var net = require('net'), - cp = require('child_process'); +const common = require('../common'); +const net = require('net'); +const cp = require('child_process'); if (process.argv[2] === 'server') { // Server @@ -30,8 +30,8 @@ if (process.argv[2] === 'server') { serverProcess.stdout.once('data', function() { var client = net.createConnection(common.PORT, '127.0.0.1'); client.on('connect', function() { - var alot = new Buffer(1024), - alittle = new Buffer(1); + const alot = new Buffer(1024); + const alittle = new Buffer(1); for (var i = 0; i < 100; i++) { client.write(alot); diff --git a/test/sequential/test-regress-GH-3542.js b/test/sequential/test-regress-GH-3542.js index 2025645ae75d92..77b8cdd69817ac 100644 --- a/test/sequential/test-regress-GH-3542.js +++ b/test/sequential/test-regress-GH-3542.js @@ -1,9 +1,9 @@ 'use strict'; -var common = require('../common'), - assert = require('assert'), - fs = require('fs'), - path = require('path'), - succeeded = 0; +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +let succeeded = 0; // This test is only relevant on Windows. if (!common.isWindows) { From dac9e3811059ea72f16c448bf7cb927999eb64f4 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 26 Oct 2015 12:06:28 -0400 Subject: [PATCH 204/262] tls: copy client CAs and cert store on CertCb Copy client CA certs and cert store when asynchronously selecting `SecureContext` during `SNICallback`. We already copy private key, certificate, and certificate chain, but the client CA certs were missing. Fix: #2772 PR-URL: https://github.com/nodejs/node/pull/3537 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 31 ++++++++++++++++++++++++++-- src/node_crypto.h | 2 ++ src/tls_wrap.cc | 3 +-- test/parallel/test-tls-sni-option.js | 31 +++++++++++++++++++++------- 4 files changed, 56 insertions(+), 11 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index eec1eb9e63a5ec..06e24a53e68c0e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -129,6 +129,8 @@ template class SSLWrap; template void SSLWrap::AddMethods(Environment* env, Local t); template void SSLWrap::InitNPN(SecureContext* sc); +template void SSLWrap::SetSNIContext(SecureContext* sc); +template int SSLWrap::SetCACerts(SecureContext* sc); template SSL_SESSION* SSLWrap::GetSessionCallback( SSL* s, unsigned char* key, @@ -2165,6 +2167,8 @@ void SSLWrap::CertCbDone(const FunctionCallbackInfo& args) { rv = SSL_use_PrivateKey(w->ssl_, pkey); if (rv && chain != nullptr) rv = SSL_set1_chain(w->ssl_, chain); + if (rv) + rv = w->SetCACerts(sc); if (!rv) { unsigned long err = ERR_get_error(); if (!err) @@ -2215,6 +2219,30 @@ void SSLWrap::DestroySSL() { } +template +void SSLWrap::SetSNIContext(SecureContext* sc) { + InitNPN(sc); + CHECK_EQ(SSL_set_SSL_CTX(ssl_, sc->ctx_), sc->ctx_); + + SetCACerts(sc); +} + + +template +int SSLWrap::SetCACerts(SecureContext* sc) { + int err = SSL_set1_verify_cert_store(ssl_, SSL_CTX_get_cert_store(sc->ctx_)); + if (err != 1) + return err; + + STACK_OF(X509_NAME)* list = SSL_dup_CA_list( + SSL_CTX_get_client_CA_list(sc->ctx_)); + + // NOTE: `SSL_set_client_CA_list` takes the ownership of `list` + SSL_set_client_CA_list(ssl_, list); + return 1; +} + + void Connection::OnClientHelloParseEnd(void* arg) { Connection* conn = static_cast(arg); @@ -2528,8 +2556,7 @@ int Connection::SelectSNIContextCallback_(SSL *s, int *ad, void* arg) { if (secure_context_constructor_template->HasInstance(ret)) { conn->sni_context_.Reset(env->isolate(), ret); SecureContext* sc = Unwrap(ret.As()); - InitNPN(sc); - SSL_set_SSL_CTX(s, sc->ctx_); + conn->SetSNIContext(sc); } else { return SSL_TLSEXT_ERR_NOACK; } diff --git a/src/node_crypto.h b/src/node_crypto.h index e009fc1da63b01..cb94650e0735d0 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -279,6 +279,8 @@ class SSLWrap { void DestroySSL(); void WaitForCertCb(CertCb cb, void* arg); + void SetSNIContext(SecureContext* sc); + int SetCACerts(SecureContext* sc); inline Environment* ssl_env() const { return env_; diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 1bdd4b7df947fe..d7bf4ed8bee784 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -867,8 +867,7 @@ int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) { p->sni_context_.Reset(env->isolate(), ctx); SecureContext* sc = Unwrap(ctx.As()); - InitNPN(sc); - SSL_set_SSL_CTX(s, sc->ctx_); + p->SetSNIContext(sc); return SSL_TLSEXT_ERR_OK; } #endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index 5b0bd53f4e6343..510b929ae2a17b 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -26,6 +26,8 @@ function loadPEM(n) { var serverOptions = { key: loadPEM('agent2-key'), cert: loadPEM('agent2-cert'), + requestCert: true, + rejectUnauthorized: false, SNICallback: function(servername, callback) { var context = SNIContexts[servername]; @@ -46,7 +48,8 @@ var serverOptions = { var SNIContexts = { 'a.example.com': { key: loadPEM('agent1-key'), - cert: loadPEM('agent1-cert') + cert: loadPEM('agent1-cert'), + ca: [ loadPEM('ca2-cert') ] }, 'b.example.com': { key: loadPEM('agent3-key'), @@ -66,6 +69,13 @@ var clientsOptions = [{ ca: [loadPEM('ca1-cert')], servername: 'a.example.com', rejectUnauthorized: false +}, { + port: serverPort, + key: loadPEM('agent4-key'), + cert: loadPEM('agent4-cert'), + ca: [loadPEM('ca1-cert')], + servername: 'a.example.com', + rejectUnauthorized: false }, { port: serverPort, key: loadPEM('agent2-key'), @@ -97,7 +107,7 @@ let serverError; let clientError; var server = tls.createServer(serverOptions, function(c) { - serverResults.push(c.servername); + serverResults.push({ sni: c.servername, authorized: c.authorized }); }); server.on('clientError', function(err) { @@ -144,9 +154,16 @@ function startTest() { } process.on('exit', function() { - assert.deepEqual(serverResults, ['a.example.com', 'b.example.com', - 'c.wrong.com', null]); - assert.deepEqual(clientResults, [true, true, false, false]); - assert.deepEqual(clientErrors, [null, null, null, 'socket hang up']); - assert.deepEqual(serverErrors, [null, null, null, 'Invalid SNI context']); + assert.deepEqual(serverResults, [ + { sni: 'a.example.com', authorized: false }, + { sni: 'a.example.com', authorized: true }, + { sni: 'b.example.com', authorized: false }, + { sni: 'c.wrong.com', authorized: false }, + null + ]); + assert.deepEqual(clientResults, [true, true, true, false, false]); + assert.deepEqual(clientErrors, [null, null, null, null, 'socket hang up']); + assert.deepEqual(serverErrors, [ + null, null, null, null, 'Invalid SNI context' + ]); }); From 94af2312dca59e47096655dc5e3dbaf76e4d178e Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Wed, 28 Oct 2015 20:09:38 -0700 Subject: [PATCH 205/262] module: move unnecessary work for early return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The exts and trailingSlash variables are only used if the path isn't cached. This commit moves them further down in the code, and changes from var to const. PR-URL: https://github.com/nodejs/node/pull/3579 Reviewed-By: Colin Ihrig Reviewed-By: Trevor Norris Reviewed-By: James M Snell Reviewed-By: Michaël Zasso --- lib/module.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/module.js b/lib/module.js index 1d937f8baa2aa8..7e3a1a09174752 100644 --- a/lib/module.js +++ b/lib/module.js @@ -126,19 +126,18 @@ function tryExtensions(p, exts) { var warned = false; Module._findPath = function(request, paths) { - var exts = Object.keys(Module._extensions); - if (path.isAbsolute(request)) { paths = ['']; } - var trailingSlash = (request.slice(-1) === '/'); - var cacheKey = JSON.stringify({request: request, paths: paths}); if (Module._pathCache[cacheKey]) { return Module._pathCache[cacheKey]; } + const exts = Object.keys(Module._extensions); + const trailingSlash = request.slice(-1) === '/'; + // For each path for (var i = 0, PL = paths.length; i < PL; i++) { // Don't search further if path doesn't exist From f62cd7c2212a4826a5380d9cd0f114a61d8b7c9a Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 22 Nov 2015 15:12:17 +0100 Subject: [PATCH 206/262] test: fix tls-multi-key race condition In some conditions it can happen that the client-side socket is destroyed before the server-side socket has gracefully closed, thus causing a 'ECONNRESET' error in this socket. To solve this, also close gracefully in the client side. PR-URL: https://github.com/nodejs/node/pull/3966 Reviewed-By: Fedor Indutny Reviewed-By: James M Snell --- test/parallel/test-tls-multi-key.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index 4c9fb4285f6ddb..17b409f284dcba 100644 --- a/test/parallel/test-tls-multi-key.js +++ b/test/parallel/test-tls-multi-key.js @@ -35,8 +35,8 @@ var server = tls.createServer(options, function(conn) { rejectUnauthorized: false }, function() { ciphers.push(rsa.getCipher()); - ecdsa.destroy(); - rsa.destroy(); + ecdsa.end(); + rsa.end(); server.close(); }); }); From 283f6942444b50959beb42f5c8e61b382c95f659 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Fri, 11 Dec 2015 09:41:56 -0800 Subject: [PATCH 207/262] doc: add docs working group PR-URL: https://github.com/nodejs/node/pull/4244 Reviewed-By: Ben Noordhuis Reviewed-By: Chris Dickinson --- WORKING_GROUPS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/WORKING_GROUPS.md b/WORKING_GROUPS.md index 9d518db1351acc..2ca0e5952ab833 100644 --- a/WORKING_GROUPS.md +++ b/WORKING_GROUPS.md @@ -31,6 +31,7 @@ back in to the TSC. * [Post-mortem](#post-mortem) * [Intl](#intl) * [HTTP](#http) +* [Documentation](#documentation) #### Process: @@ -270,6 +271,22 @@ Its responsibilities are: + Defining and adding common structures to the dumps generated in order to support tools that want to introspect those dumps +### [Documentation](https://github.com/nodejs/docs) + +The Documentation working group exists to support the improvement of Node.js +documentation, both in the core API documentation, and elsewhere, such as the +Node.js website. Its intent is to work closely with Evangelism, Website, and +Intl working groups to make excellent documentation available and accessible +to all. + +Its responsibilities are: + +* Defining and maintaining documentation style and content standards. +* Producing documentation in a format acceptable for the Website WG to consume. +* Ensuring that Node's documentation addresses a wide variety of audiences. +* Creating and operating a process for documentation review that produces + quality documentation and avoids impeding the progress of Core work. + ## Starting a WG A Working Group is established by first defining a charter that can be From 46f3e7bad40c50bde659ad8d55a2eec7f979aa7a Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Fri, 18 Dec 2015 19:13:50 +0100 Subject: [PATCH 208/262] cluster: fix race condition setting suicide prop There is no guarantee that the `suicide` property of a worker in the master process is going to be set when the `disconnect` and `exit` events are emitted. To fix it, wait for the ACK of the suicide message from the master before disconnecting the worker. Also, there's no need to send the suicide message from the worker if the disconnection has been initiated in the master. Add `test-cluster-disconnect-suicide-race` that forks a lot of workers to consistently reproduce the issue this patch tries to solve. Modify `test-regress-GH-3238` so it checks both the `kill` and `disconnect` cases. Also take into account that the `disconnect` event may be received after the `exit` event. PR-URL: https://github.com/nodejs/node/pull/4349 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- lib/cluster.js | 48 ++++++++++++------- test/parallel/test-regress-GH-3238.js | 23 ++++----- .../test-cluster-disconnect-suicide-race.js | 32 +++++++++++++ 3 files changed, 75 insertions(+), 28 deletions(-) create mode 100644 test/sequential/test-cluster-disconnect-suicide-race.js diff --git a/lib/cluster.js b/lib/cluster.js index f202f25cdd522a..0900b22ca592a4 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -428,7 +428,7 @@ function masterInit() { else if (message.act === 'listening') listening(worker, message); else if (message.act === 'suicide') - worker.suicide = true; + suicide(worker, message); else if (message.act === 'close') close(worker, message); } @@ -439,6 +439,11 @@ function masterInit() { cluster.emit('online', worker); } + function suicide(worker, message) { + worker.suicide = true; + send(worker, { ack: message.seq }); + } + function queryServer(worker, message) { var args = [message.address, message.port, @@ -532,7 +537,7 @@ function workerInit() { if (message.act === 'newconn') onconnection(message, handle); else if (message.act === 'disconnect') - worker.disconnect(); + _disconnect.call(worker, true); } }; @@ -653,14 +658,36 @@ function workerInit() { } Worker.prototype.disconnect = function() { + _disconnect.call(this); + }; + + Worker.prototype.destroy = function() { + this.suicide = true; + if (!this.isConnected()) process.exit(0); + var exit = process.exit.bind(null, 0); + send({ act: 'suicide' }, () => process.disconnect()); + process.once('disconnect', exit); + }; + + function send(message, cb) { + sendHelper(process, message, null, cb); + } + + function _disconnect(masterInitiated) { this.suicide = true; let waitingCount = 1; function checkWaitingCount() { waitingCount--; if (waitingCount === 0) { - send({ act: 'suicide' }); - process.disconnect(); + // If disconnect is worker initiated, wait for ack to be sure suicide + // is properly set in the master, otherwise, if it's master initiated + // there's no need to send the suicide message + if (masterInitiated) { + process.disconnect(); + } else { + send({ act: 'suicide' }, () => process.disconnect()); + } } } @@ -672,19 +699,6 @@ function workerInit() { } checkWaitingCount(); - }; - - Worker.prototype.destroy = function() { - this.suicide = true; - if (!this.isConnected()) process.exit(0); - var exit = process.exit.bind(null, 0); - send({ act: 'suicide' }, exit); - process.once('disconnect', exit); - process.disconnect(); - }; - - function send(message, cb) { - sendHelper(process, message, null, cb); } } diff --git a/test/parallel/test-regress-GH-3238.js b/test/parallel/test-regress-GH-3238.js index a92a09db5fe4b1..e6fe030bda9a10 100644 --- a/test/parallel/test-regress-GH-3238.js +++ b/test/parallel/test-regress-GH-3238.js @@ -4,18 +4,19 @@ const assert = require('assert'); const cluster = require('cluster'); if (cluster.isMaster) { - const worker = cluster.fork(); - let disconnected = false; + function forkWorker(action) { + const worker = cluster.fork({ action }); + worker.on('disconnect', common.mustCall(() => { + assert.strictEqual(worker.suicide, true); + })); - worker.on('disconnect', common.mustCall(function() { - assert.strictEqual(worker.suicide, true); - disconnected = true; - })); + worker.on('exit', common.mustCall(() => { + assert.strictEqual(worker.suicide, true); + })); + } - worker.on('exit', common.mustCall(function() { - assert.strictEqual(worker.suicide, true); - assert.strictEqual(disconnected, true); - })); + forkWorker('disconnect'); + forkWorker('kill'); } else { - cluster.worker.disconnect(); + cluster.worker[process.env.action](); } diff --git a/test/sequential/test-cluster-disconnect-suicide-race.js b/test/sequential/test-cluster-disconnect-suicide-race.js new file mode 100644 index 00000000000000..e05c420e1fdd9b --- /dev/null +++ b/test/sequential/test-cluster-disconnect-suicide-race.js @@ -0,0 +1,32 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const cluster = require('cluster'); +const os = require('os'); + +if (cluster.isMaster) { + function forkWorker(action) { + const worker = cluster.fork({ action }); + worker.on('disconnect', common.mustCall(() => { + assert.strictEqual(worker.suicide, true); + })); + + worker.on('exit', common.mustCall(() => { + assert.strictEqual(worker.suicide, true); + })); + } + + const cpus = os.cpus().length; + const tries = cpus > 8 ? 64 : cpus * 8; + + cluster.on('exit', common.mustCall((worker, code) => { + assert.strictEqual(code, 0, 'worker exited with error'); + }, tries * 2)); + + for (let i = 0; i < tries; ++i) { + forkWorker('disconnect'); + forkWorker('kill'); + } +} else { + cluster.worker[process.env.action](); +} From 0e163ffacae2eb3b8c6c05e159f793b355fde9db Mon Sep 17 00:00:00 2001 From: Claudio Rodriguez Date: Sun, 20 Dec 2015 14:15:54 -0300 Subject: [PATCH 209/262] doc: add path property to Write/ReadStream in fs.markdown Documents the "path" property on fs.WriteStream and fs.ReadStream. See #4327 PR-URL: https://github.com/nodejs/node/pull/4368 Reviewed-By: James M Snell --- doc/api/fs.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 6b505dcadfa313..f72de64c38ef05 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -116,6 +116,10 @@ Stop watching for changes on the given `fs.FSWatcher`. Emitted when the ReadStream's file is opened. +### readStream.path + +The path to the file the stream is reading from. + ## Class: fs.Stats Objects returned from [`fs.stat()`][], [`fs.lstat()`][] and [`fs.fstat()`][] and their @@ -196,6 +200,10 @@ Emitted when the WriteStream's file is opened. The number of bytes written so far. Does not include data that is still queued for writing. +### writeStream.path + +The path to the file the stream is writing to. + ## fs.access(path[, mode], callback) Tests a user's permissions for the file specified by `path`. `mode` is an From da1350b756be3842df3bddf2782881bea6b23844 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 24 Dec 2015 13:34:59 +1100 Subject: [PATCH 210/262] test: test each block in addon.md contains js & cc Allows more freedom in adding additional headings to addon.markdown, otherwise it'll try and convert each block under a heading to a test case. We need to have at least a .js and a .cc in order to have something to test. Fixes regression caused by adding a new 3rd-level heading in d5863bc0f43a3778aa773d5f5f4ad08e1d7d7497 PR-URL: https://github.com/nodejs/node/pull/4411 Reviewed-By: Myles Borins --- tools/doc/addon-verify.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index 4d1aaab3cc75a6..cc80a7bd32906f 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -51,6 +51,12 @@ function once(fn) { function verifyFiles(files, onprogress, ondone) { var dir = path.resolve(verifyDir, 'doc-' + id++); + // must have a .cc and a .js to be a valid test + if (!Object.keys(files).some((name) => /\.cc$/.test(name)) || + !Object.keys(files).some((name) => /\.js$/.test(name))) { + return; + } + files = Object.keys(files).map(function(name) { return { path: path.resolve(dir, name), @@ -58,6 +64,7 @@ function verifyFiles(files, onprogress, ondone) { content: files[name] }; }); + files.push({ path: path.resolve(dir, 'binding.gyp'), content: JSON.stringify({ From f5783c8a3df637dcdafc9fc49a925606e5c7aa47 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 24 Dec 2015 13:56:03 +1100 Subject: [PATCH 211/262] test: use addon.md block headings as test dir names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit instead of doc-* PR-URL: https://github.com/nodejs/node/pull/4412 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Johan Bergström --- .eslintignore | 2 +- .gitignore | 2 +- Makefile | 6 +++--- tools/doc/addon-verify.js | 34 ++++++++++++++++++++-------------- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.eslintignore b/.eslintignore index 6f1caaa873f19f..26de032f7e9715 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,5 @@ lib/punycode.js -test/addons/doc-*/ +test/addons/??_*/ test/fixtures test/**/node_modules test/disabled diff --git a/.gitignore b/.gitignore index d4ead4924371d8..8f75e34da6fd5a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,7 @@ ipch/ /npm.wxs /tools/msvs/npm.wixobj /tools/osx-pkg.pmdoc/index.xml -/test/addons/doc-*/ +/test/addons/??_*/ email.md deps/v8-* deps/icu diff --git a/Makefile b/Makefile index 02f4363ab35832..c337f006fb6f63 100644 --- a/Makefile +++ b/Makefile @@ -105,12 +105,12 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE) # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. test/addons/.docbuildstamp: doc/api/addons.markdown - $(RM) -r test/addons/doc-*/ + $(RM) -r test/addons/??_*/ $(NODE) tools/doc/addon-verify.js touch $@ ADDONS_BINDING_GYPS := \ - $(filter-out test/addons/doc-*/binding.gyp, \ + $(filter-out test/addons/??_*/binding.gyp, \ $(wildcard test/addons/*/binding.gyp)) # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. @@ -520,7 +520,7 @@ CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc CPPLINT_EXCLUDE += src/queue.h CPPLINT_EXCLUDE += src/tree.h CPPLINT_EXCLUDE += src/v8abbr.h -CPPLINT_EXCLUDE += $(wildcard test/addons/doc-*/*.cc test/addons/doc-*/*.h) +CPPLINT_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h) CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \ deps/debugger-agent/include/* \ diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index cc80a7bd32906f..68c46f06bc3472 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -1,31 +1,36 @@ -var fs = require('fs'); -var path = require('path'); -var marked = require('marked'); +'use strict'; -var doc = path.resolve(__dirname, '..', '..', 'doc', 'api', 'addons.markdown'); -var verifyDir = path.resolve(__dirname, '..', '..', 'test', 'addons'); +const fs = require('fs'); +const path = require('path'); +const marked = require('marked'); -var contents = fs.readFileSync(doc).toString(); +const doc = path.resolve(__dirname, '..', '..', 'doc', 'api', 'addons.markdown'); +const verifyDir = path.resolve(__dirname, '..', '..', 'test', 'addons'); -var tokens = marked.lexer(contents, {}); -var files = null; -var id = 0; +const contents = fs.readFileSync(doc).toString(); + +let tokens = marked.lexer(contents, {}); +let files = null; +let blockName; +let id = 0; // Just to make sure that all examples will be processed tokens.push({ type: 'heading' }); var oldDirs = fs.readdirSync(verifyDir); oldDirs = oldDirs.filter(function(dir) { - return /^doc-/.test(dir); + return /^\d{2}_/.test(dir); }).map(function(dir) { return path.resolve(verifyDir, dir); }); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; - if (token.type === 'heading') { + if (token.type === 'heading' && token.text) { + blockName = token.text if (files && Object.keys(files).length !== 0) { verifyFiles(files, + blockName, console.log.bind(null, 'wrote'), function(err) { if (err) throw err; }); } @@ -48,15 +53,16 @@ function once(fn) { }; } -function verifyFiles(files, onprogress, ondone) { - var dir = path.resolve(verifyDir, 'doc-' + id++); - +function verifyFiles(files, blockName, onprogress, ondone) { // must have a .cc and a .js to be a valid test if (!Object.keys(files).some((name) => /\.cc$/.test(name)) || !Object.keys(files).some((name) => /\.js$/.test(name))) { return; } + blockName = blockName.toLowerCase().replace(/\s/g, '_').replace(/[^a-z\d_]/g, '') + let dir = path.resolve(verifyDir, `${(++id < 10 ? '0' : '') + id}_${blockName}`); + files = Object.keys(files).map(function(name) { return { path: path.resolve(dir, name), From 5d5573302fe4bc4660c3ffe10fa0a18ecc650018 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 18:29:33 -0800 Subject: [PATCH 212/262] doc: fix formatting in process.markdown All the other properties get an h2/## but process.connected gets an h3/### for no discernible reason. Change it to h2/## like the others. PR-URL: https://github.com/nodejs/node/pull/4433 Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: Stephan Belanger Reviewed-By: Roman Klauke --- doc/api/process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index d954f4c9ab843e..bdc71590f41c9a 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -340,7 +340,7 @@ An example of the possible output looks like: target_arch: 'x64', v8_use_snapshot: 'true' } } -### process.connected +## process.connected * {Boolean} Set to false after `process.disconnect()` is called From 2ef432e725aa259047a7e6478b6aa6e7edbdc95f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 18:39:16 -0800 Subject: [PATCH 213/262] doc: copyedit setTimeout() documentation Copyedit the documentation for setTimeout() and enforce wrapping at 80 characters in the markdown file for nearby text. PR-URL: https://github.com/nodejs/node/pull/4434 Reviewed-By: Trevor Norris Reviewed-By: jasnell - James M Snell Reviewed-By: Stephan Belanger --- doc/api/timers.markdown | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/api/timers.markdown b/doc/api/timers.markdown index 4d5caf2e0ee0e5..cf2f24ae938adb 100644 --- a/doc/api/timers.markdown +++ b/doc/api/timers.markdown @@ -49,14 +49,14 @@ milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the ## setTimeout(callback, delay[, arg][, ...]) -To schedule execution of a one-time `callback` after `delay` milliseconds. Returns a -`timeoutObject` for possible use with `clearTimeout()`. Optionally you can -also pass arguments to the callback. +To schedule execution of a one-time `callback` after `delay` milliseconds. +Returns a `timeoutObject` for possible use with `clearTimeout()`. Optionally you +can also pass arguments to the callback. -It is important to note that your callback will probably not be called in exactly -`delay` milliseconds - Node.js makes no guarantees about the exact timing of when -the callback will fire, nor of the ordering things will fire in. The callback will -be called as close as possible to the time specified. +The callback will likely not be invoked in precisely `delay` milliseconds. +Node.js makes no guarantees about the exact timing of when callbacks will fire, +nor of their ordering. The callback will be called as close as possible to the +time specified. To follow browser behavior, when using delays larger than 2147483647 milliseconds (approximately 25 days) or less than 1, the timeout is executed @@ -64,10 +64,11 @@ immediately, as if the `delay` was set to 1. ## unref() -The opaque value returned by [`setTimeout`][] and [`setInterval`][] also has the method -`timer.unref()` which will allow you to create a timer that is active but if -it is the only item left in the event loop, it won't keep the program running. -If the timer is already `unref`d calling `unref` again will have no effect. +The opaque value returned by [`setTimeout`][] and [`setInterval`][] also has the +method `timer.unref()` which will allow you to create a timer that is active but +if it is the only item left in the event loop, it won't keep the program +running. If the timer is already `unref`d calling `unref` again will have no +effect. In the case of `setTimeout` when you `unref` you create a separate timer that will wakeup the event loop, creating too many of these may adversely effect From ee0d8a2cac8501357d0d6697b105391d21158fab Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 27 Dec 2015 16:42:51 -0500 Subject: [PATCH 214/262] test: fix flaky child-process-fork-regr-gh-2847 Windows would die with ECONNRESET most times when running this particular test. This commit makes handling these errors more tolerable. PR-URL: https://github.com/nodejs/node/pull/4442 Reviewed-By: Fedor Indutny Reviewed-By: Rich Trott --- test/parallel/parallel.status | 1 - test/parallel/test-child-process-fork-regr-gh-2847.js | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index ced1680ef9d66b..4c41af84937a4e 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,7 +7,6 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] -test-child-process-fork-regr-gh-2847 : PASS,FLAKY test-cluster-net-send : PASS,FLAKY test-cluster-shared-leak : PASS,FLAKY test-debug-no-context : PASS,FLAKY diff --git a/test/parallel/test-child-process-fork-regr-gh-2847.js b/test/parallel/test-child-process-fork-regr-gh-2847.js index f035b7fdc89eb8..78856cb55edebc 100644 --- a/test/parallel/test-child-process-fork-regr-gh-2847.js +++ b/test/parallel/test-child-process-fork-regr-gh-2847.js @@ -18,6 +18,13 @@ if (!cluster.isMaster) { } var server = net.createServer(function(s) { + if (common.isWindows) { + s.on('error', function(err) { + // Prevent possible ECONNRESET errors from popping up + if (err.code !== 'ECONNRESET' || sendcount === 0) + throw err; + }); + } setTimeout(function() { s.destroy(); }, 100); From ae0895685e4e87f4f5e15ac881b75a1e43f65ba9 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 28 Dec 2015 01:11:51 -0500 Subject: [PATCH 215/262] test: fix flaky cluster-net-send Before this commit, it was possible on Windows for the server's 'connection' handler to be called *after* the client socket's 'connect' handler. This caused the 'message' event to be missed and the test would never end (timing out in CI). This problem was more easily reproducible on a low resource (slow CPU) Windows (2012r2) installation. This commit waits until both handlers have been called before sending the handle to the master process. Fixes: https://github.com/nodejs/node/issues/3957 PR-URL: https://github.com/nodejs/node/pull/4444 Reviewed-By: Rich Trott --- test/parallel/parallel.status | 1 - test/parallel/test-cluster-net-send.js | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 4c41af84937a4e..02302b04acd676 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,7 +7,6 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] -test-cluster-net-send : PASS,FLAKY test-cluster-shared-leak : PASS,FLAKY test-debug-no-context : PASS,FLAKY test-tls-ticket-cluster : PASS,FLAKY diff --git a/test/parallel/test-cluster-net-send.js b/test/parallel/test-cluster-net-send.js index 6190fb517e4d1a..fe536b5f2a43c3 100644 --- a/test/parallel/test-cluster-net-send.js +++ b/test/parallel/test-cluster-net-send.js @@ -31,16 +31,22 @@ if (process.argv[2] !== 'child') { } else { console.error('[%d] worker', process.pid); + var socket; + var cbcalls = 0; + function socketConnected() { + if (++cbcalls === 2) + process.send('handle', socket); + } + var server = net.createServer(function(c) { process.once('message', function(msg) { assert.equal(msg, 'got'); c.end('hello'); }); + socketConnected(); }); server.listen(common.PORT, function() { - var socket = net.connect(common.PORT, '127.0.0.1', function() { - process.send('handle', socket); - }); + socket = net.connect(common.PORT, '127.0.0.1', socketConnected); }); process.on('disconnect', function() { From d6c83f0a5c32d693d6fd935d86cc27cb9a6c4175 Mon Sep 17 00:00:00 2001 From: Ryan Sobol Date: Mon, 28 Dec 2015 13:06:31 -0800 Subject: [PATCH 216/262] doc: mention that http.Server inherits from net.Server PR-URL: https://github.com/nodejs/node/pull/4455 Reviewed-By: Brian White Reviewed-By: Myles Borins Reviewed-By: Stephen Belanger Reviewed-By: James M Snell --- doc/api/http.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 56d3595ed12ca3..63ae2bfda9a75e 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -398,7 +398,7 @@ Returns `request`. ## Class: http.Server -This is an [`EventEmitter`][] with the following events: +This class inherits from [`net.Server`][] and has the following additional events: ### Event: 'checkContinue' @@ -1101,6 +1101,7 @@ There are a few special headers that should be noted. [`http.Server`]: #http_class_http_server [`http.ServerResponse`]: #http_class_http_serverresponse [`message.headers`]: #http_message_headers +[`net.Server`]: net.html#net_class_net_server [`net.Server.close()`]: net.html#net_server_close_callback [`net.Server.listen()`]: net.html#net_server_listen_handle_callback [`net.Server.listen(path)`]: net.html#net_server_listen_path_callback From 5cf66ebf91b761e43c09b9be6fb9d1f6f9d59dc1 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 28 Dec 2015 18:41:34 -0500 Subject: [PATCH 217/262] http: fix non-string header value concatenation Since headers are stored in an empty literal object ({}) instead of an object created with Object.create(null), care must be taken with property names inherited from Object. Currently there are only functions inherited, so we can safely check for existing strings instead. Fixes: https://github.com/nodejs/node/issues/4456 PR-URL: https://github.com/nodejs/node/pull/4460 Reviewed-By: Fedor Indutny Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: Minwoo Jung --- lib/_http_incoming.js | 2 +- test/parallel/test-http-server-multiheaders.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index e16f198dba71bd..4f001041f8af89 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -159,7 +159,7 @@ IncomingMessage.prototype._addHeaderLine = function(field, value, dest) { default: // make comma-separated list - if (dest[field] !== undefined) { + if (typeof dest[field] === 'string') { dest[field] += ', ' + value; } else { dest[field] = value; diff --git a/test/parallel/test-http-server-multiheaders.js b/test/parallel/test-http-server-multiheaders.js index 7033ef8e7079f2..99d72988479928 100644 --- a/test/parallel/test-http-server-multiheaders.js +++ b/test/parallel/test-http-server-multiheaders.js @@ -16,6 +16,7 @@ var srv = http.createServer(function(req, res) { assert.equal(req.headers['x-bar'], 'banjo, bango'); assert.equal(req.headers['sec-websocket-protocol'], 'chat, share'); assert.equal(req.headers['sec-websocket-extensions'], 'foo; 1, bar; 2, baz'); + assert.equal(req.headers['constructor'], 'foo, bar, baz'); res.writeHead(200, {'Content-Type' : 'text/plain'}); res.end('EOF'); @@ -48,7 +49,10 @@ srv.listen(common.PORT, function() { ['sec-websocket-protocol', 'share'], ['sec-websocket-extensions', 'foo; 1'], ['sec-websocket-extensions', 'bar; 2'], - ['sec-websocket-extensions', 'baz'] + ['sec-websocket-extensions', 'baz'], + ['constructor', 'foo'], + ['constructor', 'bar'], + ['constructor', 'baz'], ] }); }); From 7890ef6717c0942a6d6d485da4d3748ac3d2e7db Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 29 Dec 2015 10:21:55 +0100 Subject: [PATCH 218/262] cluster: ignore queryServer msgs on disconnection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It avoids the creation of unnecessary handles. This issue is causing intermitent failures in `test-cluster-disconnect-race` on `FreeBSD` and `OS X`. The problem is that the `worker2.disconnect` is being called on the master before the `queryServer` is handled, causing the worker to be deleted, then the Server handle is created afterwards. Later on, when `removeWorker` is called from the `exit` handler, there are no workers left, but one handle, thus the `AssertionError`. Add a new `test/sequential/test-cluster-disconnect-leak` based on `test-cluster-disconnect-race` that creates lots of workers and fails consistently without this patch. PR-URL: https://github.com/nodejs/node/pull/4465 Reviewed-By: James M Snell Reviewed-By: Johan Bergström Reviewed-By: Rich Trott --- lib/cluster.js | 3 ++ .../test-cluster-disconnect-leak.js | 47 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 test/sequential/test-cluster-disconnect-leak.js diff --git a/lib/cluster.js b/lib/cluster.js index 0900b22ca592a4..82e0e4c628342f 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -445,6 +445,9 @@ function masterInit() { } function queryServer(worker, message) { + // Stop processing if worker already disconnecting + if (worker.suicide) + return; var args = [message.address, message.port, message.addressType, diff --git a/test/sequential/test-cluster-disconnect-leak.js b/test/sequential/test-cluster-disconnect-leak.js new file mode 100644 index 00000000000000..33476dd427a61a --- /dev/null +++ b/test/sequential/test-cluster-disconnect-leak.js @@ -0,0 +1,47 @@ +'use strict'; +// Flags: --expose-internals + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const cluster = require('cluster'); +const handles = require('internal/cluster').handles; +const os = require('os'); + +if (common.isWindows) { + console.log('1..0 # Skipped: This test does not apply to Windows.'); + return; +} + +cluster.schedulingPolicy = cluster.SCHED_NONE; + +if (cluster.isMaster) { + const cpus = os.cpus().length; + const tries = cpus > 8 ? 128 : cpus * 16; + + const worker1 = cluster.fork(); + worker1.on('message', common.mustCall(() => { + worker1.disconnect(); + for (let i = 0; i < tries; ++ i) { + const w = cluster.fork(); + w.on('online', common.mustCall(w.disconnect)); + } + })); + + cluster.on('exit', common.mustCall((worker, code) => { + assert.strictEqual(code, 0, 'worker exited with error'); + }, tries + 1)); + + process.on('exit', () => { + assert.deepEqual(Object.keys(cluster.workers), []); + assert.strictEqual(Object.keys(handles).length, 0); + }); + + return; +} + +var server = net.createServer(); + +server.listen(common.PORT, function() { + process.send('listening'); +}); From 927bacbb363326dd40e48a8bbf0f828a6635c711 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 1 Jan 2016 13:26:23 -0800 Subject: [PATCH 219/262] test: fix flaky test-cluster-shared-leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wait for worker2 to come online before doing anything that might result in an EPIPE. Fixes flakiness of test on Windows. Fixes: https://github.com/nodejs/node/issues/3956 PR-URL: https://github.com/nodejs/node/pull/4510 Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- test/parallel/parallel.status | 1 - test/parallel/test-cluster-shared-leak.js | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 02302b04acd676..482fd6f4597f2c 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,7 +7,6 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] -test-cluster-shared-leak : PASS,FLAKY test-debug-no-context : PASS,FLAKY test-tls-ticket-cluster : PASS,FLAKY diff --git a/test/parallel/test-cluster-shared-leak.js b/test/parallel/test-cluster-shared-leak.js index a4de1d33a29b8d..55df57c9831ede 100644 --- a/test/parallel/test-cluster-shared-leak.js +++ b/test/parallel/test-cluster-shared-leak.js @@ -15,14 +15,16 @@ if (cluster.isMaster) { worker1 = cluster.fork(); worker1.on('message', common.mustCall(function() { worker2 = cluster.fork(); - conn = net.connect(common.PORT, common.mustCall(function() { - worker1.send('die'); - worker2.send('die'); - })); - conn.on('error', function(e) { - // ECONNRESET is OK - if (e.code !== 'ECONNRESET') - throw e; + worker2.on('online', function() { + conn = net.connect(common.PORT, common.mustCall(function() { + worker1.send('die'); + worker2.send('die'); + })); + conn.on('error', function(e) { + // ECONNRESET is OK + if (e.code !== 'ECONNRESET') + throw e; + }); }); })); From 06f118f22edb5c6d6bff84aa1c6d0b820074a7da Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 3 Jan 2016 18:10:22 +0100 Subject: [PATCH 220/262] test: fix `http-upgrade-agent` flakiness It's not guaranteed that the socket data is received in the same chunk as the upgrade response. Listen for the `data` event to make sure all the data is received. PR-URL: https://github.com/nodejs/node/pull/4520 Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-http-upgrade-agent.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-http-upgrade-agent.js b/test/parallel/test-http-upgrade-agent.js index 84cfee90d528de..83f783a0e34925 100644 --- a/test/parallel/test-http-upgrade-agent.js +++ b/test/parallel/test-http-upgrade-agent.js @@ -45,9 +45,14 @@ srv.listen(common.PORT, '127.0.0.1', function() { req.end(); req.on('upgrade', function(res, socket, upgradeHead) { - // XXX: This test isn't fantastic, as it assumes that the entire response - // from the server will arrive in a single data callback - assert.equal(upgradeHead, 'nurtzo'); + var recvData = upgradeHead; + socket.on('data', function(d) { + recvData += d; + }); + + socket.on('close', common.mustCall(function() { + assert.equal(recvData, 'nurtzo'); + })); console.log(res.headers); var expectedHeaders = { 'hello': 'world', From 1070422eb7fdade6198a3ef4a0142047f44a192c Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Tue, 5 Jan 2016 06:28:27 -0600 Subject: [PATCH 221/262] repl: make sure historyPath is trimmed If one were to set NODE_REPL_HISTORY to a string that contains only a space (" "), then the history file would be created with that name which can cause problems are certain systems. PR-URL: https://github.com/nodejs/node/pull/4539 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel --- doc/api/repl.markdown | 2 +- lib/internal/repl.js | 13 ++++++++++++- test/parallel/test-repl-persistent-history.js | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 99e9d0e26d8720..ad429dc0f858b6 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -37,7 +37,7 @@ via the following environment variables: - `NODE_REPL_HISTORY` - When a valid path is given, persistent REPL history will be saved to the specified file rather than `.node_repl_history` in the user's home directory. Setting this value to `""` will disable persistent - REPL history. + REPL history. Whitespace will be trimmed from the value. - `NODE_REPL_HISTORY_SIZE` - defaults to `1000`. Controls how many lines of history will be persisted if history is available. Must be a positive number. - `NODE_REPL_MODE` - may be any of `sloppy`, `strict`, or `magic`. Defaults diff --git a/lib/internal/repl.js b/lib/internal/repl.js index e6b41fbdd89b65..371446a83bd4fd 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -55,15 +55,26 @@ function createRepl(env, opts, cb) { } const repl = REPL.start(opts); - if (opts.terminal && env.NODE_REPL_HISTORY !== '') { + if (opts.terminal) { return setupHistory(repl, env.NODE_REPL_HISTORY, env.NODE_REPL_HISTORY_FILE, cb); } + repl._historyPrev = _replHistoryMessage; cb(null, repl); } function setupHistory(repl, historyPath, oldHistoryPath, ready) { + // Empty string disables persistent history. + + if (typeof historyPath === 'string') + historyPath = historyPath.trim(); + + if (historyPath === '') { + repl._historyPrev = _replHistoryMessage; + return ready(null, repl); + } + if (!historyPath) { try { historyPath = path.join(os.homedir(), '.node_repl_history'); diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 81e728974f179d..387cef7e97a794 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -85,6 +85,11 @@ const tests = [ test: [UP], expected: [prompt, replDisabled, prompt] }, + { + env: { NODE_REPL_HISTORY: ' ' }, + test: [UP], + expected: [prompt, replDisabled, prompt] + }, { env: { NODE_REPL_HISTORY: '', NODE_REPL_HISTORY_FILE: enoentHistoryPath }, From c7129e76ef1062ed618a2e868de4f8cfe0b88c18 Mon Sep 17 00:00:00 2001 From: Josh Dague Date: Thu, 7 Jan 2016 17:42:16 -0800 Subject: [PATCH 222/262] net: fix dns lookup for android `V4MAPPED` isn't supported by Android either (as of 6.0) PR-URL: https://github.com/nodejs/node/pull/4580 Reviewed-By: Brian White Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/net.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net.js b/lib/net.js index 049a13133ae046..cd1cc02d390094 100644 --- a/lib/net.js +++ b/lib/net.js @@ -951,12 +951,12 @@ function lookupAndConnect(self, options) { if (dnsopts.family !== 4 && dnsopts.family !== 6) { dnsopts.hints = dns.ADDRCONFIG; - // The AI_V4MAPPED hint is not supported on FreeBSD, and getaddrinfo + // The AI_V4MAPPED hint is not supported on FreeBSD or Android, and getaddrinfo // returns EAI_BADFLAGS. However, it seems to be supported on most other // systems. See // http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html // for more information on the lack of support for FreeBSD. - if (process.platform !== 'freebsd') + if (process.platform !== 'freebsd' && process.platform !== 'android') dnsopts.hints |= dns.V4MAPPED; } From 2b09bca27fbe71995b02642edfa35aad3257589c Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 8 Jan 2016 10:14:38 -0800 Subject: [PATCH 223/262] net, doc: fix line wrapping lint in net.js Missed on the previous review, minor line wrapping nit PR-URL: https://github.com/nodejs/node/pull/4588 Reviewed-By: Colin Ihrig --- lib/net.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net.js b/lib/net.js index cd1cc02d390094..c5a83b0adfa5c1 100644 --- a/lib/net.js +++ b/lib/net.js @@ -951,9 +951,9 @@ function lookupAndConnect(self, options) { if (dnsopts.family !== 4 && dnsopts.family !== 6) { dnsopts.hints = dns.ADDRCONFIG; - // The AI_V4MAPPED hint is not supported on FreeBSD or Android, and getaddrinfo - // returns EAI_BADFLAGS. However, it seems to be supported on most other - // systems. See + // The AI_V4MAPPED hint is not supported on FreeBSD or Android, + // and getaddrinfo returns EAI_BADFLAGS. However, it seems to be + // supported on most other systems. See // http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html // for more information on the lack of support for FreeBSD. if (process.platform !== 'freebsd' && process.platform !== 'android') From 18e968b1833c319fccc918daccd76bfcf9a91c43 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 8 Jan 2016 21:17:53 -0800 Subject: [PATCH 224/262] test: fix flaky unrefed timers test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unnecessary `setImmediate()` that causes a minor race condition. Stop the test after 3 occurrences rather than 5 to allow for slower hosts running the test in parallel with other tests. Fixes: https://github.com/nodejs/node/issues/4559 PR-URL: https://github.com/nodejs/node/pull/4599 Reviewed-By: Johan Bergström --- test/parallel/test-timers-unrefd-interval-still-fires.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-timers-unrefd-interval-still-fires.js b/test/parallel/test-timers-unrefd-interval-still-fires.js index 8f26d28816b60c..172da8bb954fa7 100644 --- a/test/parallel/test-timers-unrefd-interval-still-fires.js +++ b/test/parallel/test-timers-unrefd-interval-still-fires.js @@ -5,7 +5,7 @@ const common = require('../common'); const TEST_DURATION = common.platformTimeout(100); -const N = 5; +const N = 3; var nbIntervalFired = 0; const keepOpen = setTimeout(() => { @@ -20,7 +20,7 @@ const timer = setInterval(() => { timer._onTimeout = () => { throw new Error('Unrefd interval fired after being cleared.'); }; - setImmediate(() => clearTimeout(keepOpen)); + clearTimeout(keepOpen); } }, 1); From d63c13bed01d723ea0eeb3f231aa9908418c89c3 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 10 Jan 2016 00:48:49 +0100 Subject: [PATCH 225/262] test: fix `http-upgrade-client` flakiness It's not guaranteed that the socket data is received in the same chunk as the upgrade response. Listen for the `data` event to make sure all the data is received. PR-URL: https://github.com/nodejs/node/pull/4602 Reviewed-By: Brian White Reviewed-By: James M Snell --- test/parallel/test-http-upgrade-client.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-http-upgrade-client.js b/test/parallel/test-http-upgrade-client.js index b8ba033f2e01cb..a86b0e317f706b 100644 --- a/test/parallel/test-http-upgrade-client.js +++ b/test/parallel/test-http-upgrade-client.js @@ -34,9 +34,14 @@ srv.listen(common.PORT, '127.0.0.1', function() { var req = http.get({ port: common.PORT }); req.on('upgrade', function(res, socket, upgradeHead) { - // XXX: This test isn't fantastic, as it assumes that the entire response - // from the server will arrive in a single data callback - assert.equal(upgradeHead, 'nurtzo'); + var recvData = upgradeHead; + socket.on('data', function(d) { + recvData += d; + }); + + socket.on('close', common.mustCall(function() { + assert.equal(recvData, 'nurtzo'); + })); console.log(res.headers); var expectedHeaders = {'hello': 'world', From 05c7982a2108d172a57bab9f237c0b5b918991d4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 9 Jan 2016 20:59:54 -0800 Subject: [PATCH 226/262] src: remove redeclarations of variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove redeclarations of variables in node.js. This includes removing one apparently unnecessary `NativeModule.require('module')`. PR-URL: https://github.com/nodejs/node/pull/4605 Reviewed-By: Brian White Reviewed-By: Michaël Zasso Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- src/node.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/node.js b/src/node.js index b38594f7c09274..c194c239ca5866 100644 --- a/src/node.js +++ b/src/node.js @@ -61,13 +61,11 @@ } else if (process.argv[1] == 'debug') { // Start the debugger agent - var d = NativeModule.require('_debugger'); - d.start(); + NativeModule.require('_debugger').start(); } else if (process.argv[1] == '--debug-agent') { // Start the debugger agent - var d = NativeModule.require('_debug_agent'); - d.start(); + NativeModule.require('_debug_agent').start(); } else { // There is user code to be run @@ -137,8 +135,6 @@ } } else { - var Module = NativeModule.require('module'); - // If -i or --interactive were passed, or stdin is a TTY. if (process._forceRepl || NativeModule.require('tty').isatty(0)) { // REPL @@ -555,7 +551,7 @@ // getcwd(3) can fail if the current working directory has been deleted. // Fall back to the directory name of the (absolute) executable path. // It's not really correct but what are the alternatives? - var cwd = path.dirname(process.execPath); + cwd = path.dirname(process.execPath); } var module = new Module(name); From 2eaf682d1b5e7663e537a717f0228154585b101e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 9 Jan 2016 21:12:15 -0800 Subject: [PATCH 227/262] test: only include http module once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A few tests in test/gc include the http module twice. Remove duplicate require(). PR-URL: https://github.com/nodejs/node/pull/4606 Reviewed-By: Brian White Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/gc/test-http-client-connaborted.js | 1 - test/gc/test-http-client-onerror.js | 1 - test/gc/test-http-client-timeout.js | 1 - test/gc/test-http-client.js | 1 - 4 files changed, 4 deletions(-) diff --git a/test/gc/test-http-client-connaborted.js b/test/gc/test-http-client-connaborted.js index b5aafb7c9a36ab..5accec4ec63069 100644 --- a/test/gc/test-http-client-connaborted.js +++ b/test/gc/test-http-client-connaborted.js @@ -18,7 +18,6 @@ let countGC = 0; console.log('We should do ' + todo + ' requests'); -var http = require('http'); var server = http.createServer(serverHandler); server.listen(PORT, getall); diff --git a/test/gc/test-http-client-onerror.js b/test/gc/test-http-client-onerror.js index 5c2a9cc7b13350..e94bde6b5a20d1 100644 --- a/test/gc/test-http-client-onerror.js +++ b/test/gc/test-http-client-onerror.js @@ -20,7 +20,6 @@ let countGC = 0; console.log('We should do ' + todo + ' requests'); -var http = require('http'); var server = http.createServer(serverHandler); server.listen(PORT, runTest); diff --git a/test/gc/test-http-client-timeout.js b/test/gc/test-http-client-timeout.js index c3ab9dc22cbb39..1f87bce2336059 100644 --- a/test/gc/test-http-client-timeout.js +++ b/test/gc/test-http-client-timeout.js @@ -22,7 +22,6 @@ let countGC = 0; console.log('We should do ' + todo + ' requests'); -var http = require('http'); var server = http.createServer(serverHandler); server.listen(PORT, getall); diff --git a/test/gc/test-http-client.js b/test/gc/test-http-client.js index 9d210e946ed440..0cceb1edb015d7 100644 --- a/test/gc/test-http-client.js +++ b/test/gc/test-http-client.js @@ -18,7 +18,6 @@ let countGC = 0; console.log('We should do ' + todo + ' requests'); -var http = require('http'); var server = http.createServer(serverHandler); server.listen(PORT, getall); From 9fe6e5b286a4778e72317a810429a43992473593 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Jan 2016 08:54:51 -0800 Subject: [PATCH 228/262] test: require common module only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two tests were requiring the common module twice. This removes the duplicate require statement in the tests. PR-URL: https://github.com/nodejs/node/pull/4611 Reviewed-By: Brian White Reviewed-By: Colin Ihrig Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- test/parallel/test-tls-0-dns-altname.js | 2 -- test/parallel/test-tls-max-send-fragment.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 95ceb1aa59aaea..793b56426f9463 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -10,8 +10,6 @@ var tls = require('tls'); var fs = require('fs'); -var common = require('../common'); - var requests = 0; var server = tls.createServer({ diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js index 8b1bf0998aad30..746994a69ca421 100644 --- a/test/parallel/test-tls-max-send-fragment.js +++ b/test/parallel/test-tls-max-send-fragment.js @@ -10,8 +10,6 @@ var tls = require('tls'); var fs = require('fs'); -var common = require('../common'); - var buf = new Buffer(10000); var received = 0; var ended = 0; From 01bd1bcdd4dd60f8670968d3ec598ad8122ede1e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Jan 2016 14:17:36 -0800 Subject: [PATCH 229/262] http: remove variable redeclaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In lib/_http_client.js, the variable `conn` was declared with the `var` keyword three times in the same scope. This change eliminates the variable entirely. PR-URL: https://github.com/nodejs/node/pull/4612 Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/_http_client.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index db1db7bcc3ab60..a5cccbdef80f8b 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -115,8 +115,7 @@ function ClientRequest(options, cb) { if (self.socketPath) { self._last = true; self.shouldKeepAlive = false; - var conn = self.agent.createConnection({ path: self.socketPath }); - self.onSocket(conn); + self.onSocket(self.agent.createConnection({ path: self.socketPath })); } else if (self.agent) { // If there is an agent we should default to Connection:keep-alive, // but only if the Agent will actually reuse the connection! @@ -135,12 +134,11 @@ function ClientRequest(options, cb) { self._last = true; self.shouldKeepAlive = false; if (options.createConnection) { - var conn = options.createConnection(options); + self.onSocket(options.createConnection(options)); } else { debug('CLIENT use net.createConnection', options); - var conn = net.createConnection(options); + self.onSocket(net.createConnection(options)); } - self.onSocket(conn); } self._deferToConnect(null, null, function() { From a97455a7184deb62bc8b178f95009a75a2a33c1e Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 10 Jan 2016 17:52:13 -0500 Subject: [PATCH 230/262] dgram: prevent disabled optimization of bind() Reassigning a named parameter while also using the arguments object causes the entire function to never be optimized. PR-URL: https://github.com/nodejs/node/pull/4613 Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/dgram.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dgram.js b/lib/dgram.js index 161f908eae547e..da1308d7074222 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -134,8 +134,9 @@ function replaceHandle(self, newHandle) { self._handle = newHandle; } -Socket.prototype.bind = function(port /*, address, callback*/) { +Socket.prototype.bind = function(port_ /*, address, callback*/) { var self = this; + let port = port_; self._healthCheck(); From 6630994895b8979a953d29fec792c47b8c611c59 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Jan 2016 19:27:54 -0800 Subject: [PATCH 231/262] test: move resource intensive tests to sequential MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To enable greater parallelization of tests on CI, move resource intensive tests out of parallel and into sequential. Ref: https://github.com/nodejs/node/pull/4476 PR-URL: https://github.com/nodejs/node/pull/4615 Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- test/{parallel => sequential}/test-dgram-pingpong.js | 0 test/{parallel => sequential}/test-http-regr-gh-2928.js | 0 .../test-stringbytes-external-exceed-max-by-1-ascii.js | 0 .../test-stringbytes-external-exceed-max-by-1-base64.js | 0 .../test-stringbytes-external-exceed-max-by-1-binary.js | 0 .../test-stringbytes-external-exceed-max-by-1-hex.js | 0 .../test-stringbytes-external-exceed-max-by-1-utf8.js | 0 .../test-stringbytes-external-exceed-max-by-2.js | 0 .../test-stringbytes-external-exceed-max.js | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename test/{parallel => sequential}/test-dgram-pingpong.js (100%) rename test/{parallel => sequential}/test-http-regr-gh-2928.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-1-ascii.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-1-base64.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-1-binary.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-1-hex.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-1-utf8.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max-by-2.js (100%) rename test/{parallel => sequential}/test-stringbytes-external-exceed-max.js (100%) diff --git a/test/parallel/test-dgram-pingpong.js b/test/sequential/test-dgram-pingpong.js similarity index 100% rename from test/parallel/test-dgram-pingpong.js rename to test/sequential/test-dgram-pingpong.js diff --git a/test/parallel/test-http-regr-gh-2928.js b/test/sequential/test-http-regr-gh-2928.js similarity index 100% rename from test/parallel/test-http-regr-gh-2928.js rename to test/sequential/test-http-regr-gh-2928.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-1-ascii.js rename to test/sequential/test-stringbytes-external-exceed-max-by-1-ascii.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-1-base64.js rename to test/sequential/test-stringbytes-external-exceed-max-by-1-base64.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-1-binary.js rename to test/sequential/test-stringbytes-external-exceed-max-by-1-binary.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-1-hex.js rename to test/sequential/test-stringbytes-external-exceed-max-by-1-hex.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-1-utf8.js rename to test/sequential/test-stringbytes-external-exceed-max-by-1-utf8.js diff --git a/test/parallel/test-stringbytes-external-exceed-max-by-2.js b/test/sequential/test-stringbytes-external-exceed-max-by-2.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max-by-2.js rename to test/sequential/test-stringbytes-external-exceed-max-by-2.js diff --git a/test/parallel/test-stringbytes-external-exceed-max.js b/test/sequential/test-stringbytes-external-exceed-max.js similarity index 100% rename from test/parallel/test-stringbytes-external-exceed-max.js rename to test/sequential/test-stringbytes-external-exceed-max.js From fffaa2fb90867f2becfa9feff86bf9aac3295e44 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Jan 2016 21:18:02 -0800 Subject: [PATCH 232/262] test: remove 1 second delay from test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In test-cluster-worker-wait-server-close, remove unneeded 1-second delay and refactor to eliminate flakiness on FreeBSD. PR-URL: https://github.com/nodejs/node/pull/4616 Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- .../test-cluster-worker-wait-server-close.js | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/test/parallel/test-cluster-worker-wait-server-close.js b/test/parallel/test-cluster-worker-wait-server-close.js index 0488343cae3365..dfcc4a0de592f9 100644 --- a/test/parallel/test-cluster-worker-wait-server-close.js +++ b/test/parallel/test-cluster-worker-wait-server-close.js @@ -5,44 +5,44 @@ var assert = require('assert'); var cluster = require('cluster'); var net = require('net'); +var serverClosed = false; + if (cluster.isWorker) { - net.createServer(function(socket) { + var server = net.createServer(function(socket) { // Wait for any data, then close connection socket.write('.'); - socket.on('data', function discard() { - }); + socket.on('data', function discard() {}); }).listen(common.PORT, common.localhostIPv4); -} else if (cluster.isMaster) { - var connectionDone; - var ok; + server.once('close', function() { + serverClosed = true; + }); + // Although not typical, the worker process can exit before the disconnect + // event fires. Use this to keep the process open until the event has fired. + var keepOpen = setInterval(function() {}, 9999); + + // Check worker events and properties + process.once('disconnect', function() { + // disconnect should occur after socket close + assert(serverClosed); + clearInterval(keepOpen); + }); +} else if (cluster.isMaster) { // start worker var worker = cluster.fork(); + var socket; // Disconnect worker when it is ready worker.once('listening', function() { net.createConnection(common.PORT, common.localhostIPv4, function() { - var socket = this; + socket = this; this.on('data', function() { console.log('got data from client'); // socket definitely connected to worker if we got data worker.disconnect(); - setTimeout(function() { - socket.end(); - connectionDone = true; - }, 1000); + socket.end(); }); }); }); - - // Check worker events and properties - worker.once('disconnect', function() { - assert.ok(connectionDone, 'disconnect should occur after socket close'); - ok = true; - }); - - process.once('exit', function() { - assert.ok(ok); - }); } From 860c0529e50f0c38d10175727ffdaa5b71bd0793 Mon Sep 17 00:00:00 2001 From: zoubin Date: Mon, 11 Jan 2016 17:22:53 +0800 Subject: [PATCH 233/262] stream: remove useless if test in transform PR-URL: https://github.com/nodejs/node/pull/4617 Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: Brian White --- lib/_stream_transform.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 8ff428e11ffed0..eec442226252af 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -75,8 +75,7 @@ function afterTransform(stream, er, data) { if (data !== null && data !== undefined) stream.push(data); - if (cb) - cb(er); + cb(er); var rs = stream._readableState; rs.reading = false; From e875e2736dbaa13f6c340ed0b521df9ea07f005b Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 5 Jan 2016 22:42:32 -0500 Subject: [PATCH 234/262] tls_legacy: do not read on OpenSSL's stack Do not attempt to read data from the socket whilst on OpenSSL's stack, weird things may happen, and this is most likely going to result in some kind of error. PR-URL: https://github.com/nodejs/node/pull/4624 Reviewed-By: Trevor Norris Reviewed-By: James M Snell --- lib/_tls_legacy.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 159d60e9ae1011..3471ccb2d03b58 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -614,13 +614,15 @@ function onclienthello(hello) { if (err) return self.socket.destroy(err); - self.ssl.loadSession(session); - self.ssl.endParser(); + setImmediate(function() { + self.ssl.loadSession(session); + self.ssl.endParser(); - // Cycle data - self._resumingSession = false; - self.cleartext.read(0); - self.encrypted.read(0); + // Cycle data + self._resumingSession = false; + self.cleartext.read(0); + self.encrypted.read(0); + }); } if (hello.sessionId.length <= 0 || From 6030faa7dbbb6bd2bdf1e411c0a4cb0bc413938b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 11 Jan 2016 15:38:38 -0800 Subject: [PATCH 235/262] debugger: remove variable redeclarations Some variables are declared with var more than once in the same scope. This change reduces the declarations to one per scope. PR-URL: https://github.com/nodejs/node/pull/4633 Reviewed-By: jasnell - James M Snell Reviewed-By: Colin Ihrig --- lib/_debugger.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index cc4b92fd6a901c..a4638048ea41f5 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -462,7 +462,7 @@ Client.prototype.setBreakpoint = function(req, cb) { }; Client.prototype.clearBreakpoint = function(req, cb) { - var req = { + req = { command: 'clearbreakpoint', arguments: req }; @@ -1345,9 +1345,10 @@ Interface.prototype.setBreakpoint = function(script, line, return; } + let req; if (/\(\)$/.test(script)) { // setBreakpoint('functionname()'); - var req = { + req = { type: 'function', target: script.replace(/\(\)$/, ''), condition: condition @@ -1373,7 +1374,6 @@ Interface.prototype.setBreakpoint = function(script, line, if (ambiguous) return this.error('Script name is ambiguous'); if (line <= 0) return this.error('Line should be a positive value'); - var req; if (scriptId) { req = { type: 'scriptId', @@ -1630,7 +1630,7 @@ Interface.prototype.trySpawn = function(cb) { var isRemote = false; if (this.args.length === 2) { - var match = this.args[1].match(/^([^:]+):(\d+)$/); + const match = this.args[1].match(/^([^:]+):(\d+)$/); if (match) { // Connecting to remote debugger @@ -1654,7 +1654,7 @@ Interface.prototype.trySpawn = function(cb) { } isRemote = true; } else { - var match = this.args[1].match(/^--port=(\d+)$/); + const match = this.args[1].match(/^--port=(\d+)$/); if (match) { // Start debugger on custom port // `node debug --port=5858 app.js` From 27c5783cce090acc437eeed667ac236cdb0632ed Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 11 Jan 2016 18:00:53 -0800 Subject: [PATCH 236/262] test: fix race in test-net-server-pause-on-connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A 50ms timeout results in a race condition. Instead, enforce expected order through callbacks. This has the side effect of speeding up the test in most situations. Ref: https://github.com/nodejs/node/pull/4476 PR-URL: https://github.com/nodejs/node/pull/4637 Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- .../test-net-server-pause-on-connect.js | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/test/parallel/test-net-server-pause-on-connect.js b/test/parallel/test-net-server-pause-on-connect.js index 3f54ecea3c6fd2..f13500b3800e7f 100644 --- a/test/parallel/test-net-server-pause-on-connect.js +++ b/test/parallel/test-net-server-pause-on-connect.js @@ -1,13 +1,16 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); -var msg = 'test'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const msg = 'test'; var stopped = true; -var server1 = net.createServer({pauseOnConnect: true}, function(socket) { +var server1Sock; + + +const server1ConnHandler = function(socket) { socket.on('data', function(data) { if (stopped) { - assert(false, 'data event should not have happened yet'); + common.fail('data event should not have happened yet'); } assert.equal(data.toString(), msg, 'invalid data received'); @@ -15,38 +18,34 @@ var server1 = net.createServer({pauseOnConnect: true}, function(socket) { server1.close(); }); - setTimeout(function() { - // After 50(ish) ms, the other socket should have already read the data. - assert.equal(read, true); - assert.equal(socket.bytesRead, 0, 'no data should have been read yet'); + server1Sock = socket; +}; - socket.resume(); - stopped = false; - }, common.platformTimeout(50)); -}); +const server1 = net.createServer({pauseOnConnect: true}, server1ConnHandler); -// read is a timing check, as server1's timer should fire after server2's -// connection receives the data. Note that this could be race-y. -var read = false; -var server2 = net.createServer({pauseOnConnect: false}, function(socket) { +const server2ConnHandler = function(socket) { socket.on('data', function(data) { - read = true; - assert.equal(data.toString(), msg, 'invalid data received'); socket.end(); server2.close(); + + assert.equal(server1Sock.bytesRead, 0, 'no data should have been read yet'); + server1Sock.resume(); + stopped = false; }); -}); +}; -server1.listen(common.PORT, function() { - net.createConnection({port: common.PORT}).write(msg); -}); +const server2 = net.createServer({pauseOnConnect: false}, server2ConnHandler); -server2.listen(common.PORT + 1, function() { - net.createConnection({port: common.PORT + 1}).write(msg); +server1.listen(common.PORT, function() { + const clientHandler = common.mustCall(function() { + server2.listen(common.PORT + 1, function() { + net.createConnection({port: common.PORT + 1}).write(msg); + }); + }); + net.createConnection({port: common.PORT}).write(msg, clientHandler); }); process.on('exit', function() { assert.equal(stopped, false); - assert.equal(read, true); }); From 7cbfadb93d38b5c413ad9b67f0336dbec0cb8037 Mon Sep 17 00:00:00 2001 From: zoubin Date: Tue, 12 Jan 2016 13:22:42 +0800 Subject: [PATCH 237/262] doc: add docs for more stream options PR-URL: https://github.com/nodejs/node/pull/4639 Reviewed-By: James M Snell Reviewed-By: Chris Dickinson --- doc/api/stream.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index a0fcb81e9fab0b..7d5d8c420d6a81 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -856,6 +856,7 @@ implement Readable streams in your programs. * `objectMode` {Boolean} Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false + * `read` {Function} Implementation for the [`_read()`][] method. In classes that extend the Readable class, make sure to call the Readable constructor so that the buffering settings can be properly @@ -1108,7 +1109,9 @@ also implement the `_flush()` method. (See below.) #### new stream.Transform([options]) * `options` {Object} Passed to both Writable and Readable - constructors. + constructors. Also has the following fields: + * `transform` {Function} Implementation for the [`_transform()`][] method. + * `flush` {Function} Implementation for the [`_flush()`][] method. In classes that extend the Transform class, make sure to call the constructor so that the buffering settings can be properly @@ -1296,6 +1299,8 @@ how to implement Writable streams in your programs. * `objectMode` {Boolean} Whether or not the `write(anyObj)` is a valid operation. If set you can write arbitrary data instead of only `Buffer` / `String` data. Default=false + * `write` {Function} Implementation for the [`_write()`][] method. + * `writev` {Function} Implementation for the [`_writev()`][] method. In classes that extend the Writable class, make sure to call the constructor so that the buffering settings can be properly From c4239247e7da3c2e7c3b5ed58736a1a4d8e88f64 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Tue, 12 Jan 2016 06:32:04 -0600 Subject: [PATCH 238/262] net: remove hot path comment from connect This comment was added with an assumption that we could determine the IP address that localhost should resolve to without performing a lookup. This was a false assumption and should be removed. PR-URL: https://github.com/nodejs/node/pull/4648 Reviewed-By: Brian White Reviewed-By: Colin Ihrig --- lib/net.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/net.js b/lib/net.js index c5a83b0adfa5c1..21f1f8e0c6e465 100644 --- a/lib/net.js +++ b/lib/net.js @@ -931,7 +931,6 @@ function lookupAndConnect(self, options) { port |= 0; // If host is an IP, skip performing a lookup - // TODO(evanlucas) should we hot path this for localhost? var addressType = exports.isIP(host); if (addressType) { process.nextTick(function() { From 405a8d6091c62a9ec2898c3d99319be3ba0134bb Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 12 Jan 2016 12:18:40 -0500 Subject: [PATCH 239/262] test: fix flaky test-net-socket-local-address Prior to this commit, the test was flaky because it was executing the majority of its logic in a function called from the client and multiple events on the server. This commit simplifies the test by separating the server's connection and listening events, and isolating the client logic. Refs: https://github.com/nodejs/node/pull/4476 Refs: https://github.com/nodejs/node/pull/4644 PR-URL: https://github.com/nodejs/node/pull/4650 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- .../parallel/test-net-socket-local-address.js | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/test/parallel/test-net-socket-local-address.js b/test/parallel/test-net-socket-local-address.js index 7e90bd2f79ba47..e0ef1ee5ed2c70 100644 --- a/test/parallel/test-net-socket-local-address.js +++ b/test/parallel/test-net-socket-local-address.js @@ -12,35 +12,29 @@ if (common.inFreeBSDJail) { var conns = 0; var clientLocalPorts = []; var serverRemotePorts = []; - -const server = net.createServer(function(socket) { +const client = new net.Socket(); +const server = net.createServer(socket => { serverRemotePorts.push(socket.remotePort); - testConnect(); + socket.end(); }); -const client = new net.Socket(); - -server.on('close', common.mustCall(function() { +server.on('close', common.mustCall(() => { assert.deepEqual(clientLocalPorts, serverRemotePorts, 'client and server should agree on the ports used'); - assert.equal(2, conns); + assert.strictEqual(2, conns); })); -server.listen(common.PORT, common.localhostIPv4, testConnect); +server.listen(common.PORT, common.localhostIPv4, connect); -function testConnect() { - if (conns > serverRemotePorts.length || conns > clientLocalPorts.length) { - // We're waiting for a callback to fire. +function connect() { + if (conns === 2) { + server.close(); return; } - if (conns === 2) { - return server.close(); - } - client.connect(common.PORT, common.localhostIPv4, function() { - clientLocalPorts.push(this.localPort); - this.once('close', testConnect); - this.destroy(); - }); conns++; + client.once('close', connect); + client.connect(common.PORT, common.localhostIPv4, () => { + clientLocalPorts.push(client.localPort); + }); } From 5f4eb26d103bb7d32a535057faf5fc303a073c51 Mon Sep 17 00:00:00 2001 From: Brian White Date: Wed, 13 Jan 2016 14:52:03 -0500 Subject: [PATCH 240/262] querystring: improve parse() performance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These changes improve parse() performance from ~11-30% on all of the existing querystring benchmarks. PR-URL: https://github.com/nodejs/node/pull/4675 Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- benchmark/querystring/querystring-parse.js | 5 ++-- lib/querystring.js | 30 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/benchmark/querystring/querystring-parse.js b/benchmark/querystring/querystring-parse.js index 3d88bed07d63da..6a4d9f5e6169f4 100644 --- a/benchmark/querystring/querystring-parse.js +++ b/benchmark/querystring/querystring-parse.js @@ -3,7 +3,7 @@ var querystring = require('querystring'); var v8 = require('v8'); var bench = common.createBenchmark(main, { - type: ['noencode', 'encodemany', 'encodelast'], + type: ['noencode', 'encodemany', 'encodelast', 'multivalue'], n: [1e6], }); @@ -14,7 +14,8 @@ function main(conf) { var inputs = { noencode: 'foo=bar&baz=quux&xyzzy=thud', encodemany: '%66%6F%6F=bar&%62%61%7A=quux&xyzzy=%74h%75d', - encodelast: 'foo=bar&baz=quux&xyzzy=thu%64' + encodelast: 'foo=bar&baz=quux&xyzzy=thu%64', + multivalue: 'foo=bar&foo=baz&foo=quux&quuy=quuz' }; var input = inputs[type]; diff --git a/lib/querystring.js b/lib/querystring.js index 5f8df93038921f..b034635668faa8 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -209,7 +209,6 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { return obj; } - var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; @@ -230,7 +229,9 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { var keys = []; for (var i = 0; i < len; ++i) { - const x = qs[i].replace(regexp, '%20'); + // replacePlus() is used instead of a regexp because it is ~15-30% faster + // with v8 4.7 + const x = replacePlus(qs[i]); const idx = x.indexOf(eq); var k, v; @@ -242,10 +243,14 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { v = ''; } + // Use a key array lookup instead of using hasOwnProperty(), which is slower if (keys.indexOf(k) === -1) { obj[k] = v; keys.push(k); - } else if (Array.isArray(obj[k])) { + } else if (obj[k] instanceof Array) { + // `instanceof Array` is used instead of Array.isArray() because it is + // ~15-20% faster with v8 4.7 and is safe to use because we are using it + // with values being created within this function obj[k].push(v); } else { obj[k] = [obj[k], v]; @@ -256,6 +261,25 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { }; +function replacePlus(str) { + var ret = ''; + var start = 0; + var i = -1; + while ((i = str.indexOf('+', i + 1)) !== -1) { + ret += str.slice(start, i); + ret += '%20'; + start = i + 1; + } + if (start === 0) + return str; + if (start < str.length) + ret += str.slice(start); + return ret; +} + + +// v8 does not optimize functions with try-catch blocks, so we isolate them here +// to minimize the damage function decodeStr(s, decoder) { try { return decoder(s); From acdf5e3466885739a136f6251d2a61ee814032e3 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 14 Jan 2016 04:35:04 -0500 Subject: [PATCH 241/262] crypto: clear error stack in ECDH::Initialize Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have faulty implementations that are leaving dangling errors after initializing the curve. Fix: #4686 PR-URL: https://github.com/nodejs/node/pull/4689 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Shigeki Ohtsu --- src/node_crypto.cc | 2 ++ test/parallel/test-crypto-dh.js | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 06e24a53e68c0e..f0d353f3f7afdc 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4533,6 +4533,8 @@ void ECDH::Initialize(Environment* env, Local target) { void ECDH::New(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + MarkPopErrorOnReturn mark_pop_error_on_return; + // TODO(indutny): Support raw curves? CHECK(args[0]->IsString()); node::Utf8Value curve(env->isolate(), args[0]); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index 93224416ed9754..6eda535ee56f5d 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -159,6 +159,11 @@ var secret2 = ecdh2.computeSecret(key1, 'binary', 'buffer'); assert.equal(secret1, secret2.toString('base64')); +// Oakley curves do not clean up ERR stack, it was causing unexpected failure +// when accessing other OpenSSL APIs afterwards. +crypto.createECDH('Oakley-EC2N-3'); +crypto.createHash('sha256'); + // Point formats assert.equal(ecdh1.getPublicKey('buffer', 'uncompressed')[0], 4); var firstByte = ecdh1.getPublicKey('buffer', 'compressed')[0]; From cb72043597c9e3b49e4d4f6c6092a03484039e1a Mon Sep 17 00:00:00 2001 From: Kohei TAKATA Date: Fri, 15 Jan 2016 12:49:24 +0900 Subject: [PATCH 242/262] readline: Remove XXX and output debuglog Remove a comment that has a word 'XXX'. And add a line to output debuglog of error. PR-URL: https://github.com/nodejs/node/pull/4690 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/readline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/readline.js b/lib/readline.js index 00d9f8984e6a71..8ee10850e54f89 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -9,6 +9,7 @@ const kHistorySize = 30; const util = require('util'); +const debug = util.debuglog('readline'); const internalUtil = require('internal/util'); const inherits = util.inherits; const Buffer = require('buffer').Buffer; @@ -375,7 +376,7 @@ Interface.prototype._tabComplete = function() { self.resume(); if (err) { - // XXX Log it somewhere? + debug('tab completion error %j', err); return; } From e805f506c249f42612d43e4efa8afcab6319bbd2 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 15 Jan 2016 00:10:04 +1100 Subject: [PATCH 243/262] doc: update branch-diff arguments in release doc PR-URL: https://github.com/nodejs/node/pull/4691 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: Jeremiah Senkpiel --- doc/releases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/releases.md b/doc/releases.md index daa325b0bce351..c41241de0ef717 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -57,7 +57,7 @@ Create a new branch named _"vx.y.z-proposal"_, or something similar. Using `git For a list of commits that could be landed in a patch release on v5.x ``` -$ branch-diff v5.x master --exclude-label semver-major,semver-minor,dont-land-on-v5.x --simple +$ branch-diff v5.x master --exclude-label=semver-major,semver-minor,dont-land-on-v5.x --filter-release --format=simple ``` Carefully review the list of commits looking for errors (incorrect `PR-URL`, incorrect semver, etc.). Commits labeled as semver minor or semver major should only be cherry-picked when appropriate for the type of release being made. Previous release commits and version bumps do not need to be cherry-picked. From 90c20bca044ce19b68124a696e7c452a8019b51a Mon Sep 17 00:00:00 2001 From: Peter Geiss Date: Sat, 16 Jan 2016 01:37:27 -0500 Subject: [PATCH 244/262] buffer: remove unnecessary TODO comments Refs: https://github.com/nodejs/node/issues/4642 PR-URL: https://github.com/nodejs/node/pull/4719 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- lib/buffer.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 9c6b6c94162833..f784e05835b225 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -513,9 +513,6 @@ Buffer.prototype.set = internalUtil.deprecate(function set(offset, v) { return this[offset] = v; }, 'Buffer.set is deprecated. Use array indexes instead.'); - -// TODO(trevnorris): fix these checks to follow new standard -// write(string, offset = 0, length = buffer.length, encoding = 'utf8') var writeWarned = false; const writeMsg = 'Buffer.write(string, encoding, offset, length) is ' + 'deprecated. Use write(string[, offset[, length]]' + @@ -608,8 +605,6 @@ Buffer.prototype.toJSON = function() { }; -// TODO(trevnorris): currently works like Array.prototype.slice(), which -// doesn't follow the new standard for throwing on out of range indexes. Buffer.prototype.slice = function slice(start, end) { const buffer = this.subarray(start, end); Object.setPrototypeOf(buffer, Buffer.prototype); From d479686d79ff79caef407428021c27913602d6cc Mon Sep 17 00:00:00 2001 From: Alexander Makarenko Date: Sun, 17 Jan 2016 17:12:04 +0300 Subject: [PATCH 245/262] doc: add `servername` parameter docs Add `servername` parameter docs for `https.request()` method. Follows #4389 PR-URL: https://github.com/nodejs/node/pull/4729 Reviewed-By: James M Snell Reviewed-By: Fedor Indutny Reviewed-By: Roman Reiss --- doc/api/https.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 93416633747fb4..b78eb1bc0a1c6b 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -177,6 +177,7 @@ The following options from [`tls.connect()`][] can also be specified. However, a - `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force SSL version 3. The possible values depend on your installation of OpenSSL and are defined in the constant [`SSL_METHODS`][]. +- `servername`: Servername for SNI (Server Name Indication) TLS extension. In order to specify these options, use a custom [`Agent`][]. From ed4f0fca1c2a7c143cf04d4d558227000c89a52f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 17 Jan 2016 19:50:09 -0800 Subject: [PATCH 246/262] test: make test-cluster-disconnect-leak reliable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, test-cluster-disconnect-leak had two issues: * Magic numbers: How many times to spawn a worker was determined through empirical experimentation. This means that as new platforms and new CPU/RAM configurations are tested, the magic numbers require more and more refinement. This brings us to... * Non-determinism: The test *seems* to fail all the time when the bug it tests for is present, but it's really a judgment based on sampling. "Oh, with 8 workers per CPU, it fails about 80% of the time. Let's try 16..." This revised version of the test takes a different approach. The fix for the bug that the test was written for means that the `disconnect` event will fire reliably for a single worker. So we check for that and the test still fails when the fix is not in the code base and succeeds when it is. Advantages of this approach include: * The test runs much faster. * The test now works on Windows. The previous version skipped Windows. * The test should be reliable on any new platform regardless of CPU and RAM. Ref: https://github.com/nodejs/node/pull/4674 PR-URL: https://github.com/nodejs/node/pull/4736 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Johan Bergström --- .../test-cluster-disconnect-leak.js | 46 ++++++------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/test/sequential/test-cluster-disconnect-leak.js b/test/sequential/test-cluster-disconnect-leak.js index 33476dd427a61a..a4916c95ba4ea7 100644 --- a/test/sequential/test-cluster-disconnect-leak.js +++ b/test/sequential/test-cluster-disconnect-leak.js @@ -1,47 +1,29 @@ 'use strict'; -// Flags: --expose-internals + +// Test fails in Node v5.4.0 and passes in v5.4.1 and newer. const common = require('../common'); -const assert = require('assert'); const net = require('net'); const cluster = require('cluster'); -const handles = require('internal/cluster').handles; -const os = require('os'); -if (common.isWindows) { - console.log('1..0 # Skipped: This test does not apply to Windows.'); - return; -} +const noop = () => {}; cluster.schedulingPolicy = cluster.SCHED_NONE; if (cluster.isMaster) { - const cpus = os.cpus().length; - const tries = cpus > 8 ? 128 : cpus * 16; - - const worker1 = cluster.fork(); - worker1.on('message', common.mustCall(() => { - worker1.disconnect(); - for (let i = 0; i < tries; ++ i) { - const w = cluster.fork(); - w.on('online', common.mustCall(w.disconnect)); - } - })); - - cluster.on('exit', common.mustCall((worker, code) => { - assert.strictEqual(code, 0, 'worker exited with error'); - }, tries + 1)); - - process.on('exit', () => { - assert.deepEqual(Object.keys(cluster.workers), []); - assert.strictEqual(Object.keys(handles).length, 0); - }); + const worker = cluster.fork(); + + // This is the important part of the test: Confirm that `disconnect` fires. + worker.on('disconnect', common.mustCall(noop)); + + // These are just some extra stuff we're checking for good measure... + worker.on('exit', common.mustCall(noop)); + cluster.on('exit', common.mustCall(noop)); + cluster.disconnect(); return; } -var server = net.createServer(); +const server = net.createServer(); -server.listen(common.PORT, function() { - process.send('listening'); -}); +server.listen(common.PORT); From f7f0b97f445b43d562fac951115032d93bd34072 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Mon, 18 Jan 2016 15:08:12 +0800 Subject: [PATCH 247/262] buffer: make byteLength work with Buffer correctly Make the byteLength work correctly when input is Buffer. e.g: ```js // The incomplete unicode string Buffer.byteLength(new Buffer([0xe4, 0xb8, 0xad, 0xe6, 0x96])) ``` The old output: 9 The new output: 5 PR-URL: https://github.com/nodejs/node/pull/4738 Reviewed-By: Ben Noordhuis Reviewed-By: Brian White Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/buffer.js | 3 +++ test/parallel/test-buffer-bytelength.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/buffer.js b/lib/buffer.js index f784e05835b225..a830f2a8e39017 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -258,6 +258,9 @@ function base64ByteLength(str, bytes) { function byteLength(string, encoding) { + if (string instanceof Buffer) + return string.length; + if (typeof string !== 'string') string = '' + string; diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js index 91f18afcb3f5c3..d4dda5ae8b83c3 100644 --- a/test/parallel/test-buffer-bytelength.js +++ b/test/parallel/test-buffer-bytelength.js @@ -10,6 +10,12 @@ assert.equal(Buffer.byteLength(NaN, 'utf8'), 3); assert.equal(Buffer.byteLength({}, 'raws'), 15); assert.equal(Buffer.byteLength(), 9); +// buffer +var incomplete = new Buffer([0xe4, 0xb8, 0xad, 0xe6, 0x96]); +assert.equal(Buffer.byteLength(incomplete), 5); +var ascii = new Buffer('abc'); +assert.equal(Buffer.byteLength(ascii), 3); + // special case: zero length string assert.equal(Buffer.byteLength('', 'ascii'), 0); assert.equal(Buffer.byteLength('', 'HeX'), 0); From 0a8dfc42ef990fbc42c6f4b9d100528ab3bf5db3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 17 Jan 2016 23:09:26 -0800 Subject: [PATCH 248/262] test: improve test-cluster-disconnect-suicide-race Previously, test-cluster-disconnect-suicide-race had two issues: * Magic numbers: How many times to spawn a worker was determined through empirical experimentation. This means that as new platforms and new CPU/RAM configurations are tested, the magic numbers require more and more refinement. This brings us to... * Non-determinism: The test seems to fail all the time when the bug it tests for is present, but it's really a judgment based on sampling. "Oh, with 8 workers per CPU, it fails about 80% of the time. Let's try 16..." This revised version of the test takes a different approach. The fix for the bug that the test was written for means that the disconnect event will fire on a subsequent tick. So we check for that and the test still fails when the fix is not in the code base and succeeds when it is. Advantages of this approach include: * The test runs much faster. * The test should be reliable on any new platform regardless of CPU and RAM. PR-URL: https://github.com/nodejs/node/pull/4739 Ref: https://github.com/nodejs/node/pull/4674 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- .../test-cluster-disconnect-suicide-race.js | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/test/sequential/test-cluster-disconnect-suicide-race.js b/test/sequential/test-cluster-disconnect-suicide-race.js index e05c420e1fdd9b..6f23b23fd2d4ff 100644 --- a/test/sequential/test-cluster-disconnect-suicide-race.js +++ b/test/sequential/test-cluster-disconnect-suicide-race.js @@ -1,32 +1,27 @@ 'use strict'; + +// Test should fail in Node.js 5.4.1 and pass in later versions. + const common = require('../common'); const assert = require('assert'); const cluster = require('cluster'); -const os = require('os'); if (cluster.isMaster) { - function forkWorker(action) { - const worker = cluster.fork({ action }); - worker.on('disconnect', common.mustCall(() => { - assert.strictEqual(worker.suicide, true); - })); + cluster.on('exit', (worker, code) => { + assert.strictEqual(code, 0, 'worker exited with error'); + }); + + return cluster.fork(); +} - worker.on('exit', common.mustCall(() => { - assert.strictEqual(worker.suicide, true); - })); - } +var eventFired = false; - const cpus = os.cpus().length; - const tries = cpus > 8 ? 64 : cpus * 8; +cluster.worker.disconnect(); - cluster.on('exit', common.mustCall((worker, code) => { - assert.strictEqual(code, 0, 'worker exited with error'); - }, tries * 2)); - - for (let i = 0; i < tries; ++i) { - forkWorker('disconnect'); - forkWorker('kill'); - } -} else { - cluster.worker[process.env.action](); -} +process.nextTick(common.mustCall(() => { + assert.strictEqual(eventFired, false, 'disconnect event should wait for ack'); +})); + +cluster.worker.on('disconnect', common.mustCall(() => { + eventFired = true; +})); From 7e91d1c4e4c5383841a9fcfff2d476fcd0d54a31 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 18 Jan 2016 20:21:56 +0100 Subject: [PATCH 249/262] doc: style fixes for the TOC - Hide the scrollbar on the TOC on all browsers. It was never the intention for it to be visible with the scroll indication in place. A wrapper element with 20px padding was added to accommodate for hopefully all scrollbar widths as well as to avoid overflowing content. - Fixed the scroll indication gradient on Safari, which was caused by the wrong from-color, which now matches the to-color. - Fixed a issue in old IE where the TOC didn't render on the correct position through setting `left: 0` and `top: 0` on it. PR-URL: https://github.com/nodejs/node/pull/4748 Reviewed-By: James M Snell --- doc/api_assets/style.css | 13 +++++++++++-- doc/template.html | 12 +++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 4c8d64ab5579c3..99bed0e761e77c 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -370,18 +370,27 @@ span.type { width: 234px; background: #333; position: fixed; + left: 0; + top: 0; height: 100%; + overflow: hidden; +} + +#column2 .no-scrollbar { overflow-y: scroll; + height: 100%; + width: 100%; + padding-right: 20px; } -#column2.interior:after { +#column2 .no-scrollbar:after { content: ''; position: fixed; bottom: 0; left: 0; width: 234px; height: 4em; - background: linear-gradient(rgba(242,245,240, 0), rgba(51, 51, 51, 1)); + background: linear-gradient(rgba(51, 51, 51, 0), rgba(51, 51, 51, 1)); pointer-events: none; } diff --git a/doc/template.html b/doc/template.html index dec3f50670226e..47bd4ba3e4abb9 100644 --- a/doc/template.html +++ b/doc/template.html @@ -11,12 +11,14 @@
    -
    - - Node.js (1) - +
    + + __GTOC__
    - __GTOC__
    From 8557c39e202c564e9771632ce5067a396b081840 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Tue, 19 Jan 2016 03:23:07 +0100 Subject: [PATCH 250/262] test: fix issues for space-in-parens ESLint rule PR-URL: https://github.com/nodejs/node/pull/4753 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- test/parallel/test-beforeexit-event.js | 2 +- test/parallel/test-crypto-hmac.js | 2 +- test/parallel/test-http-client-timeout-agent.js | 2 +- test/parallel/test-process-binding.js | 2 +- test/pummel/test-timers.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-beforeexit-event.js b/test/parallel/test-beforeexit-event.js index 8e5d66f5f5d7c7..6bc5ef53ed9518 100644 --- a/test/parallel/test-beforeexit-event.js +++ b/test/parallel/test-beforeexit-event.js @@ -5,7 +5,7 @@ var common = require('../common'); var revivals = 0; var deaths = 0; -process.on('beforeExit', function() { deaths++; } ); +process.on('beforeExit', function() { deaths++; }); process.once('beforeExit', tryImmediate); diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index c244c9e0dd12c2..7d66f83baaed8e 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -62,7 +62,7 @@ var wikipedia = [ for (var i = 0, l = wikipedia.length; i < l; i++) { for (var hash in wikipedia[i]['hmac']) { // FIPS does not support MD5. - if (common.hasFipsCrypto && hash == 'md5' ) + if (common.hasFipsCrypto && hash == 'md5') continue; var result = crypto.createHmac(hash, wikipedia[i]['key']) .update(wikipedia[i]['data']) diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 51bfb8299b13df..6892b38719fb1a 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -17,7 +17,7 @@ var options = { var server = http.createServer(function(req, res) { const m = /\/(.*)/.exec(req.url); const reqid = parseInt(m[1], 10); - if ( reqid % 2 ) { + if (reqid % 2) { // do not reply the request } else { res.writeHead(200, {'Content-Type': 'text/plain'}); diff --git a/test/parallel/test-process-binding.js b/test/parallel/test-process-binding.js index 5350a8c66932cb..722e9333aff60a 100644 --- a/test/parallel/test-process-binding.js +++ b/test/parallel/test-process-binding.js @@ -12,7 +12,7 @@ assert.throws( assert.doesNotThrow(function() { process.binding('buffer'); }, function(err) { - if ( (err instanceof Error) ) { + if (err instanceof Error) { return true; } }, 'unexpected error'); diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index d911beb6b09288..3525c827a9e6b7 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -30,7 +30,7 @@ clearTimeout(id); setInterval(function() { interval_count += 1; - var endtime = new Date( ); + var endtime = new Date(); var diff = endtime - starttime; assert.ok(diff > 0); From f25006ae0f03e2c7489b341415475f4c86784db0 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Tue, 19 Jan 2016 03:17:39 +0100 Subject: [PATCH 251/262] tools: enable space-in-parens ESLint rule Ref: http://eslint.org/docs/rules/space-in-parens.html PR-URL: https://github.com/nodejs/node/pull/4753 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- .eslintrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 2197bf35ccf7be..f70fe2e1594b8a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -65,8 +65,10 @@ rules: eol-last: 2 ## no trailing spaces no-trailing-spaces: 2 - # require space after keywords, eg 'for (..)' + ## require space after keywords, eg 'for (..)' space-after-keywords: 2 + ## no leading/trailing spaces in parens + space-in-parens: [2, "never"] # ECMAScript 6 # list: http://eslint.org/docs/rules/#ecmascript-6 From 6cfc59e2a568a9b913c141653d2e6286a91bb061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Thu, 21 Jan 2016 11:17:01 -0800 Subject: [PATCH 252/262] doc: update list of personal traits in CoC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/rust-lang/rust-www/pull/288 landed in the Rust repo so it seems like a good idea to just bring the updated list in. We also received a request to do this in https://github.com/nodejs/inclusivity/issues/82 so this should resolve that. Thanks to [@Charlotteis](https://github.com/Charlotteis) for bringing up the original issue. Reviewed-By: Jeremiah Senkpiel Reviewed-By: Myles Borins Reviewed-By: James M Snell Reviewed-By: Сковорода Никита Андреевич PR-URL: https://github.com/nodejs/node/pull/4801 Fixes: https://github.com/nodejs/inclusivity/issues/82 --- CODE_OF_CONDUCT.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 015c2b9d692f9c..8dee836460a3b3 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,11 +1,14 @@ ## Code of Conduct This Code of Conduct is adapted from [Rust's wonderful -CoC](http://www.rust-lang.org/conduct.html). +CoC](http://www.rust-lang.org/conduct.html) as well as the +[Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/). * We are committed to providing a friendly, safe and welcoming - environment for all, regardless of gender, sexual orientation, - disability, ethnicity, religion, or similar personal characteristic. + environment for all, regardless of level of experience, gender + identity and expression, sexual orientation, disability, + personal appearance, body size, race, ethnicity, age, religion, + nationality, or other similar characteristic. * Please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all. From 2f38399eb953dc07a620295d4b0bdcd33f776997 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Thu, 21 Jan 2016 14:31:41 -0800 Subject: [PATCH 253/262] tools: add support for subkeys in release tools Replace grep with awk to add support for subkeys PR-URL: https://github.com/nodejs/node/pull/4807 Reviewed-By: Rod Vagg --- tools/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release.sh b/tools/release.sh index d54252b8100cff..3f6754275a9636 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -20,7 +20,7 @@ signcmd=dist-sign echo "# Selecting GPG key ..." -gpgkey=$(gpg --list-secret-keys | grep '^sec' | awk -F'( +|/)' '{print $3}') +gpgkey=$(gpg --list-secret-keys | awk -F'( +|/)' '/^(sec|ssb)/{print $3}') keycount=$(echo $gpgkey | wc -w) if [ $keycount -eq 0 ]; then From 6a2ea41820cc6cb7de8cd6c5933ef7a64387a8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 25 Jan 2016 18:11:52 -0800 Subject: [PATCH 254/262] deps: upgrade to npm 2.14.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4872 Reviewed-By: João Reis Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Rebecca Turner --- deps/npm/AUTHORS | 12 + deps/npm/CHANGELOG.md | 181 ++ deps/npm/LICENSE | 2 +- deps/npm/README.md | 52 +- deps/npm/doc/cli/npm-adduser.md | 2 +- deps/npm/doc/cli/npm-dist-tag.md | 1 - deps/npm/doc/cli/npm-install.md | 9 +- deps/npm/doc/cli/npm-logout.md | 2 +- deps/npm/doc/cli/npm-outdated.md | 59 +- deps/npm/doc/cli/npm-prune.md | 2 +- deps/npm/doc/cli/npm-team.md | 2 +- deps/npm/doc/cli/npm-uninstall.md | 2 +- deps/npm/doc/cli/npm.md | 4 +- deps/npm/doc/files/package.json.md | 6 +- deps/npm/doc/misc/npm-developers.md | 4 +- deps/npm/doc/misc/npm-faq.md | 392 --- deps/npm/doc/misc/npm-index.md | 4 - deps/npm/doc/misc/npm-registry.md | 6 +- deps/npm/doc/misc/npm-scripts.md | 8 +- deps/npm/doc/misc/removing-npm.md | 2 +- deps/npm/doc/misc/semver.md | 26 +- deps/npm/html/doc/README.html | 38 +- deps/npm/html/doc/api/npm-bin.html | 2 +- deps/npm/html/doc/api/npm-bugs.html | 2 +- deps/npm/html/doc/api/npm-cache.html | 2 +- deps/npm/html/doc/api/npm-commands.html | 2 +- deps/npm/html/doc/api/npm-config.html | 2 +- deps/npm/html/doc/api/npm-deprecate.html | 2 +- deps/npm/html/doc/api/npm-docs.html | 2 +- deps/npm/html/doc/api/npm-edit.html | 2 +- deps/npm/html/doc/api/npm-explore.html | 2 +- deps/npm/html/doc/api/npm-help-search.html | 2 +- deps/npm/html/doc/api/npm-init.html | 2 +- deps/npm/html/doc/api/npm-install.html | 2 +- deps/npm/html/doc/api/npm-link.html | 2 +- deps/npm/html/doc/api/npm-load.html | 2 +- deps/npm/html/doc/api/npm-ls.html | 2 +- deps/npm/html/doc/api/npm-outdated.html | 2 +- deps/npm/html/doc/api/npm-owner.html | 2 +- deps/npm/html/doc/api/npm-pack.html | 2 +- deps/npm/html/doc/api/npm-ping.html | 2 +- deps/npm/html/doc/api/npm-prefix.html | 2 +- deps/npm/html/doc/api/npm-prune.html | 2 +- deps/npm/html/doc/api/npm-publish.html | 2 +- deps/npm/html/doc/api/npm-rebuild.html | 2 +- deps/npm/html/doc/api/npm-repo.html | 2 +- deps/npm/html/doc/api/npm-restart.html | 2 +- deps/npm/html/doc/api/npm-root.html | 2 +- deps/npm/html/doc/api/npm-run-script.html | 2 +- deps/npm/html/doc/api/npm-search.html | 2 +- deps/npm/html/doc/api/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/api/npm-start.html | 2 +- deps/npm/html/doc/api/npm-stop.html | 2 +- deps/npm/html/doc/api/npm-tag.html | 2 +- deps/npm/html/doc/api/npm-test.html | 2 +- deps/npm/html/doc/api/npm-uninstall.html | 2 +- deps/npm/html/doc/api/npm-unpublish.html | 2 +- deps/npm/html/doc/api/npm-update.html | 2 +- deps/npm/html/doc/api/npm-version.html | 2 +- deps/npm/html/doc/api/npm-view.html | 2 +- deps/npm/html/doc/api/npm-whoami.html | 2 +- deps/npm/html/doc/api/npm.html | 4 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 4 +- 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-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 | 3 +- deps/npm/html/doc/cli/npm-docs.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-init.html | 2 +- deps/npm/html/doc/cli/npm-install-test.html | 45 + deps/npm/html/doc/cli/npm-install.html | 12 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 4 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-outdated.html | 56 +- 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-prune.html | 4 +- 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-rm.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-tag.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 4 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-uninstall.html | 4 +- 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 | 14 +- 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 | 8 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 8 +- deps/npm/html/doc/index.html | 4 +- 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 | 6 +- deps/npm/html/doc/misc/npm-disputes.html | 8 +- deps/npm/html/doc/misc/npm-index.html | 4 +- deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 8 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 10 +- deps/npm/html/doc/misc/removing-npm.html | 4 +- deps/npm/html/doc/misc/semver.html | 24 +- deps/npm/html/index.html | 2 +- deps/npm/lib/completion.js | 8 +- deps/npm/lib/ls.js | 22 +- deps/npm/lib/version.js | 3 +- deps/npm/man/man1/npm-README.1 | 52 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 4 +- 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-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 | 4 +- deps/npm/man/man1/npm-docs.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-init.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 32 + deps/npm/man/man1/npm-install.1 | 11 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 4 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-outdated.1 | 79 +- 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-prune.1 | 4 +- 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-rm.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-tag.1 | 2 +- deps/npm/man/man1/npm-team.1 | 4 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 4 +- 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 | 8 +- deps/npm/man/man3/npm-bin.3 | 2 +- deps/npm/man/man3/npm-bugs.3 | 2 +- deps/npm/man/man3/npm-cache.3 | 2 +- deps/npm/man/man3/npm-commands.3 | 2 +- deps/npm/man/man3/npm-config.3 | 2 +- deps/npm/man/man3/npm-deprecate.3 | 2 +- deps/npm/man/man3/npm-docs.3 | 2 +- deps/npm/man/man3/npm-edit.3 | 2 +- deps/npm/man/man3/npm-explore.3 | 2 +- deps/npm/man/man3/npm-help-search.3 | 2 +- deps/npm/man/man3/npm-init.3 | 2 +- deps/npm/man/man3/npm-install.3 | 2 +- deps/npm/man/man3/npm-link.3 | 2 +- deps/npm/man/man3/npm-load.3 | 2 +- deps/npm/man/man3/npm-ls.3 | 2 +- deps/npm/man/man3/npm-outdated.3 | 2 +- deps/npm/man/man3/npm-owner.3 | 2 +- deps/npm/man/man3/npm-pack.3 | 2 +- deps/npm/man/man3/npm-ping.3 | 2 +- deps/npm/man/man3/npm-prefix.3 | 2 +- deps/npm/man/man3/npm-prune.3 | 2 +- deps/npm/man/man3/npm-publish.3 | 2 +- deps/npm/man/man3/npm-rebuild.3 | 2 +- deps/npm/man/man3/npm-repo.3 | 2 +- deps/npm/man/man3/npm-restart.3 | 2 +- deps/npm/man/man3/npm-root.3 | 2 +- deps/npm/man/man3/npm-run-script.3 | 2 +- deps/npm/man/man3/npm-search.3 | 2 +- deps/npm/man/man3/npm-shrinkwrap.3 | 2 +- deps/npm/man/man3/npm-start.3 | 2 +- deps/npm/man/man3/npm-stop.3 | 2 +- deps/npm/man/man3/npm-tag.3 | 2 +- deps/npm/man/man3/npm-test.3 | 2 +- deps/npm/man/man3/npm-uninstall.3 | 2 +- deps/npm/man/man3/npm-unpublish.3 | 2 +- deps/npm/man/man3/npm-update.3 | 4 +- deps/npm/man/man3/npm-version.3 | 2 +- deps/npm/man/man3/npm-view.3 | 2 +- deps/npm/man/man3/npm-whoami.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 8 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package.json.5 | 8 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/man/man7/npm-developers.7 | 6 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-index.7 | 5 +- deps/npm/man/man7/npm-orgs.7 | 2 +- deps/npm/man/man7/npm-registry.7 | 8 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 10 +- deps/npm/man/man7/removing-npm.7 | 4 +- deps/npm/man/man7/semver.7 | 29 +- .../fs-write-stream-atomic/.npmignore | 3 + .../fs-write-stream-atomic/.travis.yml | 11 + .../fs-write-stream-atomic/index.js | 38 +- .../fs-write-stream-atomic/package.json | 18 +- .../fs-write-stream-atomic/test/basic.js | 44 +- .../fs-write-stream-atomic/test/toolong.js | 14 +- deps/npm/node_modules/imurmurhash/README.md | 122 + .../node_modules/imurmurhash/imurmurhash.js | 138 + .../imurmurhash/imurmurhash.min.js | 12 + .../npm/node_modules/imurmurhash/package.json | 60 + deps/npm/node_modules/lru-cache/README.md | 21 +- .../node_modules/lru-cache/lib/lru-cache.js | 228 +- .../lru-cache/node_modules/pseudomap/LICENSE | 15 + .../node_modules/pseudomap/README.md | 60 + .../lru-cache/node_modules/pseudomap/map.js | 122 + .../node_modules/pseudomap/package.json | 35 + .../node_modules/pseudomap/test/basic.js | 86 + deps/npm/node_modules/lru-cache/package.json | 38 +- deps/npm/node_modules/lru-cache/test/basic.js | 39 +- .../node_modules/lru-cache/test/foreach.js | 24 +- .../node_modules/lru-cache/test/overflow.js | 45 + .../node_modules/lru-cache/test/serialize.js | 9 + deps/npm/node_modules/node-gyp/CHANGELOG.md | 10 + deps/npm/node_modules/node-gyp/README.md | 27 +- deps/npm/node_modules/node-gyp/addon.gypi | 5 + deps/npm/node_modules/node-gyp/gyp/AUTHORS | 1 + .../node_modules/node-gyp/gyp/PRESUBMIT.py | 10 +- .../node-gyp/gyp/buildbot/buildbot_run.py | 119 +- .../gyp/buildbot/commit_queue/cq_config.json | 1 - .../npm/node_modules/node-gyp/gyp/gyp_main.py | 12 +- .../node-gyp/gyp/pylib/gyp/MSVSSettings.py | 5 +- .../gyp/pylib/gyp/MSVSSettings_test.py | 2 +- .../node-gyp/gyp/pylib/gyp/MSVSVersion.py | 5 +- .../node-gyp/gyp/pylib/gyp/__init__.py | 16 +- .../node-gyp/gyp/pylib/gyp/common.py | 13 +- .../gyp/pylib/gyp/generator/analyzer.py | 314 ++- .../node-gyp/gyp/pylib/gyp/generator/cmake.py | 398 +-- .../gyp/generator/dump_dependency_json.py | 20 +- .../node-gyp/gyp/pylib/gyp/generator/make.py | 92 +- .../node-gyp/gyp/pylib/gyp/generator/msvs.py | 25 +- .../node-gyp/gyp/pylib/gyp/generator/ninja.py | 37 +- .../node-gyp/gyp/pylib/gyp/generator/xcode.py | 48 +- .../node-gyp/gyp/pylib/gyp/input.py | 75 +- .../node-gyp/gyp/pylib/gyp/mac_tool.py | 3 +- .../node-gyp/gyp/pylib/gyp/msvs_emulation.py | 10 + .../node-gyp/gyp/pylib/gyp/win_tool.py | 4 +- .../node-gyp/gyp/pylib/gyp/xcode_emulation.py | 31 +- .../node-gyp/gyp/pylib/gyp/xcodeproj_file.py | 5 +- deps/npm/node_modules/node-gyp/lib/build.js | 10 +- .../node_modules/node-gyp/lib/configure.js | 228 +- .../node-gyp/lib/find-node-directory.js | 61 + .../npm/node_modules/node-gyp/lib/node-gyp.js | 4 +- .../node_modules/balanced-match/README.md | 9 + .../node_modules/balanced-match/index.js | 72 +- .../node_modules/balanced-match/package.json | 33 +- .../balanced-match/test/balanced.js | 28 + .../node_modules/concat-map/package.json | 22 +- .../node_modules/brace-expansion/package.json | 39 +- .../glob/node_modules/minimatch/package.json | 23 +- .../node-gyp/node_modules/glob/package.json | 26 +- .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/.travis.yml | 8 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../minimatch/node_modules/lru-cache/LICENSE | 15 + .../node_modules/lru-cache/README.md | 137 + .../node_modules/lru-cache/lib/lru-cache.js | 334 +++ .../node_modules/lru-cache/package.json | 37 + .../node_modules/lru-cache/test/basic.js | 396 +++ .../node_modules/lru-cache/test/foreach.js | 120 + .../lru-cache/test/memory-leak.js | 51 + .../node_modules/lru-cache/test/serialize.js | 215 ++ .../node_modules/sigmund/package.json | 22 +- .../node_modules/minimatch/package.json | 24 +- .../node_modules/are-we-there-yet/LICENSE | 5 + .../node_modules/are-we-there-yet/README.md | 3 +- .../node_modules/delegates/package.json | 29 +- .../are-we-there-yet/package.json | 23 +- .../node_modules/has-unicode/package.json | 23 +- .../lodash._basetostring/package.json | 38 +- .../node_modules/lodash.repeat/package.json | 38 +- .../lodash._createpadding/package.json | 38 +- .../node_modules/lodash.pad/package.json | 38 +- .../lodash._basetostring/package.json | 38 +- .../node_modules/lodash.repeat/package.json | 38 +- .../lodash._createpadding/package.json | 38 +- .../node_modules/lodash.padleft/package.json | 38 +- .../lodash._basetostring/package.json | 38 +- .../node_modules/lodash.repeat/package.json | 38 +- .../lodash._createpadding/package.json | 38 +- .../node_modules/lodash.padright/package.json | 38 +- .../npmlog/node_modules/gauge/package.json | 23 +- .../node-gyp/node_modules/npmlog/package.json | 28 +- .../debug/node_modules/ms/package.json | 26 +- .../node_modules/debug/package.json | 30 +- .../node_modules/array-index/package.json | 26 +- .../node_modules/path-array/package.json | 23 +- .../node-gyp/node_modules/tar/.npmignore | 5 - .../node-gyp/node_modules/tar/LICENCE | 25 - .../node-gyp/node_modules/tar/README.md | 48 - .../node_modules/tar/examples/extracter.js | 19 - .../node_modules/tar/examples/packer.js | 24 - .../node_modules/tar/examples/reader.js | 36 - .../node_modules/tar/lib/buffer-entry.js | 30 - .../node_modules/tar/lib/entry-writer.js | 169 -- .../node-gyp/node_modules/tar/lib/entry.js | 213 -- .../tar/lib/extended-header-writer.js | 191 -- .../node_modules/tar/lib/extended-header.js | 140 - .../node-gyp/node_modules/tar/lib/extract.js | 86 - .../tar/lib/global-header-writer.js | 14 - .../node-gyp/node_modules/tar/lib/header.js | 385 --- .../node-gyp/node_modules/tar/lib/pack.js | 231 -- .../node-gyp/node_modules/tar/lib/parse.js | 271 -- .../node-gyp/node_modules/tar/package.json | 60 - .../node-gyp/node_modules/tar/tar.js | 173 -- .../tar/test/00-setup-fixtures.js | 53 - .../node_modules/tar/test/extract-move.js | 132 - .../node-gyp/node_modules/tar/test/extract.js | 367 --- .../node_modules/tar/test/fixtures.tgz | Bin 19352 -> 0 bytes .../node-gyp/node_modules/tar/test/header.js | 183 -- .../tar/test/pack-no-proprietary.js | 886 ------ .../node-gyp/node_modules/tar/test/pack.js | 934 ------- .../node-gyp/node_modules/tar/test/parse.js | 359 --- .../node_modules/tar/test/zz-cleanup.js | 20 - deps/npm/node_modules/node-gyp/package.json | 35 +- .../node-gyp/src/win_delay_load_hook.c | 3 + .../node-gyp/test/test-find-node-directory.js | 115 + .../node-gyp/test/test-find-python.js | 20 + .../node-gyp/test/test-options.js | 25 + .../lodash._basetostring/LICENSE | 0 .../lodash._basetostring/README.md | 0 .../lodash._basetostring/index.js | 0 .../lodash._basetostring/package.json | 38 +- .../lodash._createpadding/LICENSE | 0 .../lodash._createpadding/README.md | 0 .../lodash._createpadding/index.js | 0 .../node_modules/lodash.repeat/LICENSE | 0 .../node_modules/lodash.repeat/README.md | 0 .../node_modules/lodash.repeat/index.js | 0 .../node_modules/lodash.repeat/package.json | 0 .../lodash._createpadding/package.json | 2 +- .../node_modules/lodash._basetostring/LICENSE | 22 + .../lodash._basetostring/README.md | 20 + .../lodash._basetostring/index.js | 22 + .../lodash._basetostring/package.json | 88 + .../lodash._createpadding/LICENSE | 22 + .../lodash._createpadding/README.md | 20 + .../lodash._createpadding/index.js | 37 + .../node_modules/lodash.repeat/LICENSE | 22 + .../node_modules/lodash.repeat/README.md | 20 + .../node_modules/lodash.repeat/index.js | 55 + .../node_modules/lodash.repeat/package.json | 97 + .../lodash._createpadding/package.json | 91 + .../node_modules/lodash._basetostring/LICENSE | 22 + .../lodash._basetostring/README.md | 20 + .../lodash._basetostring/index.js | 22 + .../lodash._basetostring/package.json | 88 + .../lodash._createpadding/LICENSE | 22 + .../lodash._createpadding/README.md | 20 + .../lodash._createpadding/index.js | 37 + .../node_modules/lodash.repeat/LICENSE | 22 + .../node_modules/lodash.repeat/README.md | 20 + .../node_modules/lodash.repeat/index.js | 55 + .../node_modules/lodash.repeat/package.json | 97 + .../lodash._createpadding/package.json | 91 + .../node_modules/core-util-is}/LICENSE | 7 +- .../node_modules/core-util-is/lib/util.js | 22 +- .../node_modules/core-util-is/package.json | 34 +- .../node_modules/core-util-is/test.js | 68 + .../node_modules/core-util-is/util.js | 106 - .../process-nextick-args/.travis.yml | 7 +- .../process-nextick-args/index.js | 9 +- .../process-nextick-args/package.json | 18 +- .../node_modules/string_decoder/package.json | 26 +- .../node_modules/util-deprecate/package.json | 23 +- .../node_modules/readable-stream/package.json | 35 +- .../node_modules/typedarray/package.json | 21 +- .../node_modules/concat-stream/package.json | 23 +- .../npm-registry-client/package.json | 47 +- deps/npm/node_modules/once/package.json | 35 +- deps/npm/node_modules/once/test/once.js | 23 - deps/npm/node_modules/request/.travis.yml | 8 +- deps/npm/node_modules/request/CHANGELOG.md | 25 + deps/npm/node_modules/request/README.md | 25 +- deps/npm/node_modules/request/lib/har.js | 159 +- deps/npm/node_modules/request/lib/redirect.js | 5 +- deps/npm/node_modules/request/lib/tunnel.js | 31 +- .../node_modules/aws-sign2/package.json | 24 +- .../node_modules/readable-stream/.travis.yml | 28 +- .../readable-stream/doc/stream.markdown | 34 +- .../readable-stream/lib/_stream_readable.js | 18 +- .../readable-stream/lib/_stream_writable.js | 2 +- .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/lib/util.js | 22 +- .../node_modules/core-util-is/package.json | 34 +- .../node_modules/core-util-is/test.js | 68 + .../node_modules/core-util-is/util.js | 106 - .../process-nextick-args/.travis.yml | 7 +- .../process-nextick-args/index.js | 9 +- .../process-nextick-args/package.json | 18 +- .../node_modules/string_decoder/package.json | 26 +- .../node_modules/util-deprecate/package.json | 23 +- .../node_modules/readable-stream/package.json | 43 +- .../request/node_modules/bl/package.json | 23 +- .../node_modules/caseless/package.json | 31 +- .../node_modules/delayed-stream/package.json | 27 +- .../node_modules/combined-stream/package.json | 35 +- .../request/node_modules/extend/package.json | 27 +- .../form-data/node_modules/async/package.json | 35 +- .../node_modules/form-data/package.json | 43 +- .../node_modules/commander/package.json | 31 +- .../node_modules/is-my-json-valid/index.js | 30 +- .../node_modules/jsonpointer/package.json | 27 +- .../node_modules/xtend/immutable.js | 4 +- .../node_modules/xtend/mutable.js | 4 +- .../node_modules/xtend/package.json | 15 +- .../node_modules/xtend/test.js | 20 + .../is-my-json-valid/package.json | 10 +- .../node_modules/pinkie/index.js | 30 +- .../node_modules/pinkie/package.json | 26 +- .../node_modules/pinkie/readme.md | 26 +- .../node_modules/pinkie-promise/package.json | 18 +- .../node_modules/pinkie-promise/readme.md | 8 +- .../node_modules/har-validator/package.json | 45 +- .../request/node_modules/hawk/dist/client.js | 340 +++ .../request/node_modules/hawk/lib/browser.js | 34 +- .../hawk/node_modules/boom/README.md | 75 +- .../hawk/node_modules/boom/lib/index.js | 2 +- .../hawk/node_modules/boom/package.json | 43 +- .../hawk/node_modules/boom/test/index.js | 23 + .../hawk/node_modules/cryptiles/package.json | 27 +- .../request/node_modules/hawk/package.json | 33 +- .../request/node_modules/hawk/test/browser.js | 235 +- .../request/node_modules/hawk/test/index.js | 122 +- .../request/node_modules/hawk/test/server.js | 156 +- .../request/node_modules/hawk/test/uri.js | 115 +- .../node_modules/http-signature/CHANGES.md | 39 + .../http-signature/http_signing.md | 33 +- .../node_modules/http-signature/lib/index.js | 10 +- .../node_modules/http-signature/lib/parser.js | 72 +- .../node_modules/http-signature/lib/signer.js | 364 ++- .../node_modules/http-signature/lib/util.js | 306 --- .../node_modules/http-signature/lib/utils.js | 112 + .../node_modules/http-signature/lib/verify.js | 62 +- .../node_modules/ctype/.npmignore | 1 - .../node_modules/ctype/CHANGELOG | 78 - .../http-signature/node_modules/ctype/README | 82 - .../node_modules/ctype/README.old | 298 -- .../http-signature/node_modules/ctype/ctf.js | 245 -- .../http-signature/node_modules/ctype/ctio.js | 1485 ---------- .../node_modules/ctype/ctype.js | 944 ------- .../ctype/man/man3ctype/ctio.3ctype | 241 -- .../node_modules/ctype/package.json | 42 - .../node_modules/ctype/tools/jsstyle | 839 ------ .../node_modules/jsprim/CHANGES.md | 30 + .../node_modules/jsprim/LICENSE | 19 + .../node_modules/jsprim/README.md | 228 ++ .../node_modules/jsprim/lib/jsprim.js | 478 ++++ .../node_modules/extsprintf/.gitmodules | 6 + .../jsprim/node_modules/extsprintf/LICENSE | 19 + .../jsprim/node_modules/extsprintf/Makefile | 23 + .../node_modules/extsprintf/Makefile.deps | 39 + .../node_modules/extsprintf/Makefile.targ | 285 ++ .../jsprim/node_modules/extsprintf/README.md | 39 + .../extsprintf/examples/simple.js | 2 + .../node_modules/extsprintf/jsl.node.conf} | 133 +- .../node_modules/extsprintf/lib/extsprintf.js | 166 ++ .../node_modules/extsprintf/package.json | 23 + .../jsprim/node_modules/json-schema/README.md | 5 + .../json-schema/draft-00/hyper-schema | 68 + .../json-schema/draft-00/json-ref | 26 + .../node_modules/json-schema/draft-00/links | 33 + .../node_modules/json-schema/draft-00/schema | 155 ++ .../json-schema/draft-01/hyper-schema | 68 + .../json-schema/draft-01/json-ref | 26 + .../node_modules/json-schema/draft-01/links | 33 + .../node_modules/json-schema/draft-01/schema | 155 ++ .../json-schema/draft-02/hyper-schema | 68 + .../json-schema/draft-02/json-ref | 26 + .../node_modules/json-schema/draft-02/links | 35 + .../node_modules/json-schema/draft-02/schema | 166 ++ .../json-schema/draft-03/examples/address | 20 + .../json-schema/draft-03/examples/calendar | 49 + .../json-schema/draft-03/examples/card | 105 + .../json-schema/draft-03/examples/geo | 8 + .../json-schema/draft-03/examples/interfaces | 23 + .../json-schema/draft-03/hyper-schema | 60 + .../json-schema/draft-03/json-ref | 26 + .../node_modules/json-schema/draft-03/links | 35 + .../node_modules/json-schema/draft-03/schema | 174 ++ .../json-schema/draft-04/hyper-schema | 60 + .../node_modules/json-schema/draft-04/links | 41 + .../node_modules/json-schema/draft-04/schema | 189 ++ .../json-schema/draft-zyp-json-schema-03.xml | 1120 ++++++++ .../json-schema/draft-zyp-json-schema-04.xml | 1072 ++++++++ .../node_modules/json-schema/lib/links.js | 52 + .../node_modules/json-schema/lib/validate.js | 260 ++ .../node_modules/json-schema/package.json | 52 + .../node_modules/json-schema/test/tests.js | 95 + .../jsprim/node_modules/verror/.gitmodules | 0 .../jsprim/node_modules/verror/.npmignore | 1 + .../jsprim/node_modules/verror/LICENSE | 19 + .../jsprim/node_modules/verror/Makefile | 35 + .../jsprim/node_modules/verror/Makefile.targ | 285 ++ .../jsprim/node_modules/verror/README.md | 120 + .../verror/examples/levels-verror.js | 36 + .../verror/examples/levels-werror.js | 34 + .../node_modules/verror/examples/varargs.js | 6 + .../node_modules/verror/examples/verror.js | 13 + .../node_modules/verror/examples/werror.js | 14 + .../jsprim/node_modules/verror/jsl.node.conf | 138 + .../jsprim/node_modules/verror/lib/verror.js | 157 ++ .../jsprim/node_modules/verror/package.json | 29 + .../node_modules/verror/tests/tst.inherit.js | 100 + .../node_modules/verror/tests/tst.verror.js | 156 ++ .../node_modules/verror/tests/tst.werror.js | 179 ++ .../node_modules/jsprim/package.json | 29 + .../node_modules/sshpk/.npmignore | 8 + .../node_modules/sshpk/.travis.yml | 11 + .../http-signature/node_modules/sshpk/LICENSE | 18 + .../node_modules/sshpk/README.md | 436 +++ .../node_modules/sshpk/bin/sshpk-conv | 183 ++ .../node_modules/sshpk/lib/algs.js | 168 ++ .../node_modules/sshpk/lib/dhe.js | 311 +++ .../node_modules/sshpk/lib/ed-compat.js | 94 + .../node_modules/sshpk/lib/errors.js | 58 + .../node_modules/sshpk/lib/fingerprint.js | 140 + .../node_modules/sshpk/lib/formats/auto.js | 73 + .../node_modules/sshpk/lib/formats/pem.js | 152 ++ .../node_modules/sshpk/lib/formats/pkcs1.js | 320 +++ .../node_modules/sshpk/lib/formats/pkcs8.js | 510 ++++ .../node_modules/sshpk/lib/formats/rfc4253.js | 145 + .../sshpk/lib/formats/ssh-private.js | 138 + .../node_modules/sshpk/lib/formats/ssh.js | 114 + .../node_modules/sshpk/lib/index.js | 25 + .../node_modules/sshpk/lib/key.js | 260 ++ .../node_modules/sshpk/lib/private-key.js | 224 ++ .../node_modules/sshpk/lib/signature.js | 237 ++ .../node_modules/sshpk/lib/ssh-buffer.js | 123 + .../node_modules/sshpk/lib/utils.js | 207 ++ .../{ => sshpk/node_modules}/asn1/.npmignore | 0 .../sshpk/node_modules/asn1}/.travis.yml | 2 +- .../{ => sshpk/node_modules}/asn1/LICENSE | 0 .../{ => sshpk/node_modules}/asn1/README.md | 0 .../node_modules}/asn1/lib/ber/errors.js | 0 .../node_modules}/asn1/lib/ber/index.js | 0 .../node_modules}/asn1/lib/ber/reader.js | 60 +- .../node_modules}/asn1/lib/ber/types.js | 0 .../node_modules}/asn1/lib/ber/writer.js | 21 +- .../node_modules}/asn1/lib/index.js | 0 .../node_modules}/asn1/package.json | 21 +- .../node_modules}/asn1/tst/ber/reader.test.js | 36 + .../node_modules}/asn1/tst/ber/writer.test.js | 74 + .../sshpk/node_modules/assert-plus/AUTHORS | 6 + .../sshpk/node_modules/assert-plus/CHANGES.md | 8 + .../sshpk/node_modules/assert-plus/README.md | 155 ++ .../sshpk/node_modules/assert-plus/assert.js | 206 ++ .../node_modules/assert-plus/package.json | 63 + .../sshpk/node_modules/dashdash/README.md | 508 ++++ .../node_modules/dashdash/lib/dashdash.js | 813 ++++++ .../node_modules/assert-plus/README.md | 126 + .../node_modules/assert-plus/assert.js | 245 ++ .../node_modules/assert-plus/package.json | 30 + .../sshpk/node_modules/dashdash/package.json | 46 + .../sshpk/node_modules/ecc-jsbn/.npmignore | 15 + .../sshpk/node_modules/ecc-jsbn/LICENSE | 21 + .../sshpk/node_modules/ecc-jsbn/README.md | 8 + .../sshpk/node_modules/ecc-jsbn/index.js | 56 + .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 + .../sshpk/node_modules/ecc-jsbn/lib/ec.js | 561 ++++ .../sshpk/node_modules/ecc-jsbn/lib/sec.js | 170 ++ .../sshpk/node_modules/ecc-jsbn/package.json | 45 + .../sshpk/node_modules/ecc-jsbn/test.js | 14 + .../sshpk/node_modules/jodid25519/.npmignore | 11 + .../sshpk/node_modules/jodid25519/.travis.yml | 7 + .../sshpk/node_modules/jodid25519/AUTHORS.md | 3 + .../sshpk/node_modules/jodid25519/LICENSE | 23 + .../sshpk/node_modules/jodid25519/README.md | 51 + .../sshpk/node_modules/jodid25519/almond.0 | 42 + .../sshpk/node_modules/jodid25519/almond.1 | 13 + .../sshpk/node_modules/jodid25519/index.js | 35 + .../sshpk/node_modules/jodid25519/jsdoc.json | 19 + .../sshpk/node_modules/jodid25519/lib/core.js | 481 ++++ .../node_modules/jodid25519/lib/curve255.js | 221 ++ .../sshpk/node_modules/jodid25519/lib/dh.js | 111 + .../node_modules/jodid25519/lib/eddsa.js | 573 ++++ .../node_modules/jodid25519/lib/utils.js | 198 ++ .../node_modules/jodid25519/package.json | 55 + .../sshpk/node_modules/jsbn/.npmignore | 2 + .../sshpk/node_modules/jsbn/LICENSE | 40 + .../sshpk/node_modules/jsbn/README.md | 173 ++ .../sshpk/node_modules/jsbn/example.html | 12 + .../sshpk/node_modules/jsbn/example.js | 3 + .../sshpk/node_modules/jsbn/index.js | 1358 +++++++++ .../sshpk/node_modules/jsbn/package.json | 33 + .../sshpk/node_modules/tweetnacl/.npmignore | 4 + .../sshpk/node_modules/tweetnacl/CHANGELOG.md | 128 + .../sshpk/node_modules/tweetnacl/README.md | 463 ++++ .../sshpk/node_modules/tweetnacl/nacl-fast.js | 2418 +++++++++++++++++ .../node_modules/tweetnacl/nacl-fast.min.js | 2 + .../sshpk/node_modules/tweetnacl/nacl.js | 1205 ++++++++ .../sshpk/node_modules/tweetnacl/nacl.min.js | 1 + .../sshpk/node_modules/tweetnacl/package.json | 78 + .../node_modules/sshpk/package.json | 71 + .../node_modules/http-signature/package.json | 41 +- .../node_modules/is-typedarray/LICENSE.md | 18 + .../node_modules/is-typedarray/README.md | 16 + .../node_modules/is-typedarray/index.js | 41 + .../node_modules/is-typedarray/package.json | 40 + .../node_modules/is-typedarray/test.js | 34 + .../node_modules/mime-types/HISTORY.md | 6 + .../node_modules/mime-db/HISTORY.md | 13 + .../mime-types/node_modules/mime-db/db.json | 30 + .../node_modules/mime-db/package.json | 16 +- .../node_modules/mime-types/package.json | 12 +- .../request/node_modules/node-uuid/.npmignore | 2 + .../request/node_modules/node-uuid/README.md | 13 +- .../request/node_modules/node-uuid/bower.json | 2 +- .../node_modules/node-uuid/component.json | 15 +- .../node_modules/node-uuid/package.json | 74 +- .../node_modules/node-uuid/test/test.js | 3 + .../request/node_modules/node-uuid/uuid.js | 115 +- .../node_modules/oauth-sign/package.json | 31 +- .../request/node_modules/qs/package.json | 27 +- .../node_modules/stringstream/package.json | 24 +- .../node_modules/tough-cookie/lib/cookie.js | 2 +- .../node_modules/tough-cookie/package.json | 35 +- .../node_modules/tunnel-agent/index.js | 2 + .../node_modules/tunnel-agent/package.json | 45 +- deps/npm/node_modules/request/package.json | 58 +- deps/npm/node_modules/request/request.js | 75 +- deps/npm/node_modules/rimraf/README.md | 9 +- deps/npm/node_modules/rimraf/package.json | 30 +- deps/npm/node_modules/semver/README.md | 26 +- deps/npm/node_modules/semver/package.json | 21 +- deps/npm/node_modules/semver/range.bnf | 16 + deps/npm/node_modules/semver/semver.js | 12 - deps/npm/node_modules/spdx/LICENSE.md | 7 - deps/npm/node_modules/spdx/README.md | 145 - deps/npm/node_modules/spdx/package.json | 73 - .../node_modules/spdx/source/exceptions.json | 11 - .../spdx/source/parser.generated.js | 1255 --------- deps/npm/node_modules/spdx/source/ranges.json | 194 -- deps/npm/node_modules/spdx/source/spdx.js | 161 -- .../node_modules/spdx-correct/LICENSE | 57 + .../node_modules/spdx-correct/package.json | 19 +- .../spdx-expression-parse/LICENSE | 14 +- .../spdx-expression-parse/README.md | 12 +- .../node_modules/spdx-exceptions/.npmignore | 2 - .../node_modules/spdx-exceptions/LICENSE.md | 9 - .../node_modules/spdx-exceptions/README.md | 14 +- .../node_modules/spdx-exceptions/index.json | 24 +- .../node_modules/spdx-exceptions/package.json | 34 +- .../spdx-expression-parse/package.json | 31 +- .../spdx-expression-parse/parser.generated.js | 1290 +-------- .../validate-npm-package-license/package.json | 5 +- .../write-file-atomic/.nyc_output/47248.json | 1 + .../write-file-atomic/.nyc_output/47250.json | 1 + .../write-file-atomic/.travis.yml | 11 + .../node_modules/write-file-atomic/index.js | 71 +- .../write-file-atomic/package.json | 38 +- .../write-file-atomic/test/basic.js | 180 +- deps/npm/package.json | 25 +- deps/npm/test/tap/ls-depth-cli.js | 46 + deps/npm/test/tap/version-sub-directory.js | 74 + 708 files changed, 30813 insertions(+), 17546 deletions(-) delete mode 100644 deps/npm/doc/misc/npm-faq.md create mode 100644 deps/npm/html/doc/cli/npm-install-test.html create mode 100644 deps/npm/man/man1/npm-install-test.1 create mode 100644 deps/npm/node_modules/fs-write-stream-atomic/.npmignore create mode 100644 deps/npm/node_modules/fs-write-stream-atomic/.travis.yml create mode 100644 deps/npm/node_modules/imurmurhash/README.md create mode 100644 deps/npm/node_modules/imurmurhash/imurmurhash.js create mode 100644 deps/npm/node_modules/imurmurhash/imurmurhash.min.js create mode 100644 deps/npm/node_modules/imurmurhash/package.json create mode 100644 deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE create mode 100644 deps/npm/node_modules/lru-cache/node_modules/pseudomap/README.md create mode 100644 deps/npm/node_modules/lru-cache/node_modules/pseudomap/map.js create mode 100644 deps/npm/node_modules/lru-cache/node_modules/pseudomap/package.json create mode 100644 deps/npm/node_modules/lru-cache/node_modules/pseudomap/test/basic.js create mode 100644 deps/npm/node_modules/lru-cache/test/overflow.js create mode 100644 deps/npm/node_modules/node-gyp/lib/find-node-directory.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/README.md delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/package.json delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/tar.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js create mode 100644 deps/npm/node_modules/node-gyp/test/test-find-node-directory.js create mode 100644 deps/npm/node_modules/node-gyp/test/test-find-python.js create mode 100644 deps/npm/node_modules/node-gyp/test/test-options.js rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._basetostring/LICENSE (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._basetostring/README.md (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._basetostring/index.js (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._basetostring/package.json (64%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/LICENSE (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/README.md (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/index.js (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/node_modules/lodash.repeat/LICENSE (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/node_modules/lodash.repeat/README.md (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/node_modules/lodash.repeat/index.js (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/node_modules/lodash.repeat/package.json (100%) rename deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/{ => lodash.pad/node_modules}/lodash._createpadding/package.json (97%) create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json create mode 100644 deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json rename deps/npm/node_modules/{request/node_modules/http-signature/node_modules/ctype => npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is}/LICENSE (79%) create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js delete mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js delete mode 100644 deps/npm/node_modules/once/test/once.js create mode 100644 deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js delete mode 100644 deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js create mode 100644 deps/npm/node_modules/request/node_modules/hawk/dist/client.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/lib/util.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/lib/utils.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json delete mode 100755 deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.gitmodules create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile.deps create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile.targ create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/examples/simple.js rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ctype/tools/jsl.conf => jsprim/node_modules/extsprintf/jsl.node.conf} (68%) mode change 100755 => 100644 create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/lib/extsprintf.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/address create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/card create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/geo create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/hyper-schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/hyper-schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/test/tests.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/.gitmodules create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/Makefile create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/Makefile.targ create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/levels-verror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/levels-werror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/varargs.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/verror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/werror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/lib/verror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.inherit.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.verror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.werror.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md create mode 100755 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/algs.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/dhe.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ed-compat.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/.npmignore (100%) rename deps/npm/node_modules/{node-gyp/node_modules/tar => request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1}/.travis.yml (80%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/LICENSE (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/README.md (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/ber/errors.js (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/ber/index.js (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/ber/reader.js (84%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/ber/types.js (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/ber/writer.js (95%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/lib/index.js (100%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/package.json (83%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/tst/ber/reader.test.js (82%) rename deps/npm/node_modules/request/node_modules/http-signature/node_modules/{ => sshpk/node_modules}/asn1/tst/ber/writer.test.js (81%) create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/sec.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/test.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/.travis.yml create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/AUTHORS.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/almond.0 create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/almond.1 create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/jsdoc.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/lib/core.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/lib/curve255.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/lib/dh.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/lib/eddsa.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/lib/utils.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json create mode 100644 deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md create mode 100644 deps/npm/node_modules/request/node_modules/is-typedarray/README.md create mode 100644 deps/npm/node_modules/request/node_modules/is-typedarray/index.js create mode 100644 deps/npm/node_modules/request/node_modules/is-typedarray/package.json create mode 100644 deps/npm/node_modules/request/node_modules/is-typedarray/test.js create mode 100644 deps/npm/node_modules/semver/range.bnf delete mode 100644 deps/npm/node_modules/spdx/LICENSE.md delete mode 100644 deps/npm/node_modules/spdx/README.md delete mode 100644 deps/npm/node_modules/spdx/package.json delete mode 100644 deps/npm/node_modules/spdx/source/exceptions.json delete mode 100644 deps/npm/node_modules/spdx/source/parser.generated.js delete mode 100644 deps/npm/node_modules/spdx/source/ranges.json delete mode 100644 deps/npm/node_modules/spdx/source/spdx.js create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/LICENSE delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/.npmignore delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/LICENSE.md create mode 100644 deps/npm/node_modules/write-file-atomic/.nyc_output/47248.json create mode 100644 deps/npm/node_modules/write-file-atomic/.nyc_output/47250.json create mode 100644 deps/npm/node_modules/write-file-atomic/.travis.yml create mode 100644 deps/npm/test/tap/version-sub-directory.js diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 4e42025c6f168f..e1a88d3a9914b8 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -317,3 +317,15 @@ Juan Caicedo Ashley Williams Andrew Marcinkevičius Jorrit Schippers +Alex Lukin +Aria Stewart +Tim +Nick Williams +Louis Larry +Jakub Gieryluk +Martin von Gagern +Eymen Gunay +ekmartin +Rafał Pocztarski +Ashley Williams +Mark Reeder diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index d6d36172b49531..f5680c3d6f0686 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,184 @@ +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + ### v2.14.12 (2015-11-19): #### TEEN ORCS AT THE GATES diff --git a/deps/npm/LICENSE b/deps/npm/LICENSE index 71ef60d027b3d8..25f3a7c1f91127 100644 --- a/deps/npm/LICENSE +++ b/deps/npm/LICENSE @@ -6,7 +6,7 @@ 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.com +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 diff --git a/deps/npm/README.md b/deps/npm/README.md index ceaefb8f6c3438..43b9da4e694ca9 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -14,6 +14,17 @@ Much more info available via `npm help` once it's installed. To install an old **and unsupported** version of npm that works on node 0.3 and prior, clone the git repo and dig through the old tags and branches. +**npm is configured to use npm, Inc.'s public package registry at + by default.** + +You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the [doc on +registries](https://docs.npmjs.com/misc/registry). + +Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +. + ## Super Easy Install npm is bundled with [node](http://nodejs.org/download/). @@ -183,47 +194,6 @@ You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, you should [read this](https://docs.npmjs.com/misc/developers) -## Legal Stuff - -"npm" and "The npm Registry" are owned by npm, Inc. -All rights reserved. See the included LICENSE file for more details. - -"Node.js" and "node" are trademarks owned by Joyent, Inc. - -Modules published on the npm registry are not officially endorsed by -npm, Inc. or the Node.js project. - -Data published to the npm registry is not part of npm itself, and is -the sole property of the publisher. While every effort is made to -ensure accountability, there is absolutely no guarantee, warranty, or -assertion expressed or implied as to the quality, fitness for a -specific purpose, or lack of malice in any given npm package. - -If you have a complaint about a package in the public npm registry, -and cannot [resolve it with the package -owner](https://docs.npmjs.com/misc/disputes), please email - and explain the situation. - -Any data published to The npm Registry (including user account -information) may be removed or modified at the sole discretion of the -npm server administrators. - -### In plainer english - -npm is the property of npm, Inc. - -If you publish something, it's yours, and you are solely accountable -for it. - -If other people publish something, it's theirs. - -Users can publish Bad Stuff. It will be removed promptly if reported. -But there is no vetting process for published modules, and you use -them at your own risk. Please inspect the source. - -If you publish Bad Stuff, we may delete it from the registry, or even -ban your account in extreme cases. So don't do that. - ## BUGS When you find issues, please report them: diff --git a/deps/npm/doc/cli/npm-adduser.md b/deps/npm/doc/cli/npm-adduser.md index 80d0f9855b2a87..24d3611e61c604 100644 --- a/deps/npm/doc/cli/npm-adduser.md +++ b/deps/npm/doc/cli/npm-adduser.md @@ -28,7 +28,7 @@ your existing record. ### registry -Default: http://registry.npmjs.org/ +Default: https://registry.npmjs.org/ The base URL of the npm package registry. If `scope` is also specified, this registry will only be used for packages with that scope. See `npm-scope(7)`. diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md index ce4f7ed4d58f0e..9213816514a483 100644 --- a/deps/npm/doc/cli/npm-dist-tag.md +++ b/deps/npm/doc/cli/npm-dist-tag.md @@ -69,5 +69,4 @@ begin with a number or the letter `v`. * npm-registry(7) * npm-config(1) * npm-config(7) -* npm-tag(3) * npmrc(5) diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index be32f7b296ef01..16b31fa0dac719 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -21,7 +21,7 @@ by that. See npm-shrinkwrap(1). A `package` is: -* a) a folder containing a program described by a package.json file +* a) a folder containing a program described by a `package.json(5)` file * b) a gzipped tarball containing (a) * c) a url that resolves to (b) * d) a `@` that is published on the registry (see `npm-registry(7)`) with (c) @@ -43,7 +43,9 @@ after packing it up into a tarball (b). it installs the current package context (ie, the current working directory) as a global package. - By default, `npm install` will install all modules listed as dependencies. + By default, `npm install` will install all modules listed as dependencies + in `package.json(5)`. + With the `--production` flag (or when the `NODE_ENV` environment variable is set to `production`), npm will not install modules listed in `devDependencies`. @@ -329,5 +331,6 @@ affects a real use-case, it will be investigated. * npmrc(5) * npm-registry(7) * npm-tag(1) -* npm-rm(1) +* npm-uninstall(1) * npm-shrinkwrap(1) +* package.json(5) diff --git a/deps/npm/doc/cli/npm-logout.md b/deps/npm/doc/cli/npm-logout.md index 867953c02449bc..b6b0deb9641156 100644 --- a/deps/npm/doc/cli/npm-logout.md +++ b/deps/npm/doc/cli/npm-logout.md @@ -22,7 +22,7 @@ connected to that scope, if set. ### registry -Default: http://registry.npmjs.org/ +Default: https://registry.npmjs.org/ The base URL of the npm package registry. If `scope` is also specified, it takes precedence. diff --git a/deps/npm/doc/cli/npm-outdated.md b/deps/npm/doc/cli/npm-outdated.md index aa2a7d5dd16e02..9fd97e63fce39a 100644 --- a/deps/npm/doc/cli/npm-outdated.md +++ b/deps/npm/doc/cli/npm-outdated.md @@ -10,9 +10,60 @@ npm-outdated(1) -- Check for outdated packages This command will check the registry to see if any (or, specific) installed packages are currently outdated. -The resulting field 'wanted' shows the latest version according to the -version specified in the package.json, the field 'latest' the very latest -version of the package. +In the output: + +* `wanted` is the maximum version of the package that satisfies the semver + range specified in `package.json`. If there's no available semver range (i.e. + you're running `npm outdated --global`, or the package isn't included in + `package.json`), then `wanted` shows the currently-installed version. +* `latest` is the version of the package tagged as latest in the registry. + Running `npm publish` with no special configuration will publish the package + with a dist-tag of `latest`. This may or may not be the maximum version of + the package, or the most-recently published version of the package, depending + on how the package's developer manages the latest dist-tag(1). +* `location` is where in the dependency tree the package is located. Note that + `npm outdated` defaults to a depth of 0, so unless you override that, you'll + always be seeing only top-level dependencies that are outdated. +* `package type` (when using `--long` / `-l`) tells you whether this package is + a `dependency` or a `devDependency`. Packages not included in `package.json` + are always marked `dependencies`. + +### An example + +``` +$ npm outdated +Package Current Wanted Latest Location +glob 5.0.15 5.0.15 6.0.1 test-outdated-output +nothingness 0.0.3 git git test-outdated-output +npm 3.5.1 3.5.2 3.5.1 test-outdated-output +once 1.3.2 1.3.3 1.3.3 test-outdated-output +``` + +With these `dependencies`: +```json +{ + "glob": "^5.0.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3.5.1", + "once": "^1.3.1" +} +``` + +A few things to note: + +* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is + outside the semver range. +* Git dependencies will always be reinstalled, because of how they're specified. + The installed committish might satisfy the dependency specifier (if it's + something immutable, like a commit SHA), or it might not, so `npm outdated` and + `npm update` have to fetch Git repos to check. This is why currently doing a + reinstall of a Git dependency always forces a new clone and install. +* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because npm + uses dist-tags to manage its `latest` and `next` release channels. `npm update` + will install the _newest_ version, but `npm install npm` (with no semver range) + will install whatever's tagged as `latest`. +* `once` is just plain out of date. Reinstalling `node_modules` from scratch or + running `npm update` will bring it up to spec. ## CONFIGURATION @@ -47,6 +98,7 @@ project. ### depth +* Default: 0 * Type: Int Max depth for checking dependency tree. @@ -54,5 +106,6 @@ Max depth for checking dependency tree. ## SEE ALSO * npm-update(1) +* npm-dist-tag(1) * npm-registry(7) * npm-folders(5) diff --git a/deps/npm/doc/cli/npm-prune.md b/deps/npm/doc/cli/npm-prune.md index 846a04240e598d..f52a911582d442 100644 --- a/deps/npm/doc/cli/npm-prune.md +++ b/deps/npm/doc/cli/npm-prune.md @@ -22,6 +22,6 @@ negate `NODE_ENV` being set to `production`. ## SEE ALSO -* npm-rm(1) +* npm-uninstall(1) * npm-folders(5) * npm-ls(1) diff --git a/deps/npm/doc/cli/npm-team.md b/deps/npm/doc/cli/npm-team.md index 2ed9b367b56d30..031dba095c3951 100644 --- a/deps/npm/doc/cli/npm-team.md +++ b/deps/npm/doc/cli/npm-team.md @@ -21,7 +21,7 @@ handle permissions for packages. Teams must always be fully qualified with the organization/scope they belond to when operating on them, separated by a colon (`:`). That is, if you have a `developers` team on a `foo` organization, you must always refer to that team as -`developers:foo` in these commands. +`foo:developers` in these commands. * create / destroy: Create a new team, or destroy an existing one. diff --git a/deps/npm/doc/cli/npm-uninstall.md b/deps/npm/doc/cli/npm-uninstall.md index bfa667c3e26eab..43fd65ea2ac75a 100644 --- a/deps/npm/doc/cli/npm-uninstall.md +++ b/deps/npm/doc/cli/npm-uninstall.md @@ -1,4 +1,4 @@ -npm-rm(1) -- Remove a package +npm-uninstall(1) -- Remove a package ============================= ## SYNOPSIS diff --git a/deps/npm/doc/cli/npm.md b/deps/npm/doc/cli/npm.md index 331a03577b20d0..ae3a41d84bb3de 100644 --- a/deps/npm/doc/cli/npm.md +++ b/deps/npm/doc/cli/npm.md @@ -130,7 +130,7 @@ easily by doing `npm view npm contributors`. If you would like to contribute, but don't know what to work on, check the issues list or ask on the mailing list. -* +* * ## BUGS @@ -138,7 +138,7 @@ the issues list or ask on the mailing list. When you find issues, please report them: * web: - + * email: diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 91064b58b96159..ff6686ba21a39d 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -105,10 +105,10 @@ current SPDX license identifier for the license you're using, like this: You can check [the full list of SPDX license IDs](https://spdx.org/licenses/). Ideally you should pick one that is -[OSI](http://opensource.org/licenses/alphabetical) approved. +[OSI](https://opensource.org/licenses/alphabetical) approved. If your package is licensed under multiple common licenses, use an [SPDX license -expression syntax version 2.0 string](http://npmjs.com/package/spdx), like this: +expression syntax version 2.0 string](https://npmjs.com/package/spdx), like this: { "license" : "(ISC OR GPL-3.0)" } @@ -733,4 +733,4 @@ npm will default some values based on package contents. * npm-faq(7) * npm-install(1) * npm-publish(1) -* npm-rm(1) +* npm-uninstall(1) diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md index 2ef900b34936c2..25957f11ecbf07 100644 --- a/deps/npm/doc/misc/npm-developers.md +++ b/deps/npm/doc/misc/npm-developers.md @@ -104,7 +104,7 @@ create an empty `.npmignore` file to override it. Like `git`, `npm` looks for `.npmignore` and `.gitignore` files in all subdirectories of your package, not only the root directory. -`.npmignore` files follow the [same pattern rules](http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files) +`.npmignore` files follow the [same pattern rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files) as `.gitignore` files: * Blank lines or lines starting with `#` are ignored. @@ -191,7 +191,7 @@ This is documented better in npm-adduser(1). ## Publish your package -This part's easy. IN the root of your folder, do this: +This part's easy. In the root of your folder, do this: npm publish diff --git a/deps/npm/doc/misc/npm-faq.md b/deps/npm/doc/misc/npm-faq.md deleted file mode 100644 index 557ec1a9c6c27a..00000000000000 --- a/deps/npm/doc/misc/npm-faq.md +++ /dev/null @@ -1,392 +0,0 @@ -npm-faq(7) -- Frequently Asked Questions -======================================== - -## Where can I find these docs in HTML? - -, or run: - - npm config set viewer browser - -to open these documents in your default web browser rather than `man`. - -## It didn't work. - -That's not really a question. - -## Why didn't it work? - -I don't know yet. - -Read the error output, and if you can't figure out what it means, -do what it says and post a bug with all the information it asks for. - -## Where does npm put stuff? - -See `npm-folders(5)` - -tl;dr: - -* Use the `npm root` command to see where modules go, and the `npm bin` - command to see where executables go -* Global installs are different from local installs. If you install - something with the `-g` flag, then its executables go in `npm bin -g` - and its modules go in `npm root -g`. - -## How do I install something on my computer in a central location? - -Install it globally by tacking `-g` or `--global` to the command. (This -is especially important for command line utilities that need to add -their bins to the global system `PATH`.) - -## I installed something globally, but I can't `require()` it - -Install it locally. - -The global install location is a place for command-line utilities -to put their bins in the system `PATH`. It's not for use with `require()`. - -If you `require()` a module in your code, then that means it's a -dependency, and a part of your program. You need to install it locally -in your program. - -## Why can't npm just put everything in one place, like other package managers? - -Not every change is an improvement, but every improvement is a change. -This would be like asking git to do network IO for every commit. It's -not going to happen, because it's a terrible idea that causes more -problems than it solves. - -It is much harder to avoid dependency conflicts without nesting -dependencies. This is fundamental to the way that npm works, and has -proven to be an extremely successful approach. See `npm-folders(5)` for -more details. - -If you want a package to be installed in one place, and have all your -programs reference the same copy of it, then use the `npm link` command. -That's what it's for. Install it globally, then link it into each -program that uses it. - -## Whatever, I really want the old style 'everything global' style. - -Write your own package manager. You could probably even wrap up `npm` -in a shell script if you really wanted to. - -npm will not help you do something that is known to be a bad idea. - -## Should I check my `node_modules` folder into git? - -Usually, no. Allow npm to resolve dependencies for your packages. - -For packages you **deploy**, such as websites and apps, -you should use npm shrinkwrap to lock down your full dependency tree: - - - -If you are paranoid about depending on the npm ecosystem, -you should run a private npm mirror or a private cache. - -If you want 100% confidence in being able to reproduce the specific bytes -included in a deployment, you should use an additional mechanism that can -verify contents rather than versions. For example, -Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs. - -## Is it 'npm' or 'NPM' or 'Npm'? - -npm should never be capitalized unless it is being displayed in a -location that is customarily all-caps (such as the title of man pages.) - -## If 'npm' is an acronym, why is it never capitalized? - -Contrary to the belief of many, "npm" is not in fact an abbreviation for -"Node Package Manager". It is a recursive bacronymic abbreviation for -"npm is not an acronym". (If it was "ninaa", then it would be an -acronym, and thus incorrectly named.) - -"NPM", however, *is* an acronym (more precisely, a capitonym) for the -National Association of Pastoral Musicians. You can learn more -about them at . - -In software, "NPM" is a Non-Parametric Mapping utility written by -Chris Rorden. You can analyze pictures of brains with it. Learn more -about the (capitalized) NPM program at . - -The first seed that eventually grew into this flower was a bash utility -named "pm", which was a shortened descendent of "pkgmakeinst", a -bash function that was used to install various different things on different -platforms, most often using Yahoo's `yinst`. If `npm` was ever an -acronym for anything, it was `node pm` or maybe `new pm`. - -So, in all seriousness, the "npm" project is named after its command-line -utility, which was organically selected to be easily typed by a right-handed -programmer using a US QWERTY keyboard layout, ending with the -right-ring-finger in a postition to type the `-` key for flags and -other command-line arguments. That command-line utility is always -lower-case, though it starts most sentences it is a part of. - -## How do I list installed packages? - -`npm ls` - -## How do I search for packages? - -`npm search` - -Arguments are greps. `npm search jsdom` shows jsdom packages. - -## How do I update npm? - - npm install npm -g - -You can also update all outdated local packages by doing `npm update` without -any arguments, or global packages by doing `npm update -g`. - -Occasionally, the version of npm will progress such that the current -version cannot be properly installed with the version that you have -installed already. (Consider, if there is ever a bug in the `update` -command.) - -In those cases, you can do this: - - curl https://www.npmjs.com/install.sh | sh - -## What is a `package`? - -A package is: - -* a) a folder containing a program described by a package.json file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `@` that is published on the registry with (c) -* e) a `@` that points to (d) -* f) a `` that has a "latest" tag satisfying (e) -* g) a `git` url that, when cloned, results in (a). - -Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b). - -Git urls can be of the form: - - git://github.com/user/project.git#commit-ish - git+ssh://user@hostname:project.git#commit-ish - git+http://user@hostname/project/blah.git#commit-ish - git+https://user@hostname/project/blah.git#commit-ish - -The `commit-ish` can be any tag, sha, or branch which can be supplied as -an argument to `git checkout`. The default is `master`. - -## What is a `module`? - -A module is anything that can be loaded with `require()` in a Node.js -program. The following things are all examples of things that can be -loaded as modules: - -* A folder with a `package.json` file containing a `main` field. -* A folder with an `index.js` file in it. -* A JavaScript file. - -Most npm packages are modules, because they are libraries that you -load with `require`. However, there's no requirement that an npm -package be a module! Some only contain an executable command-line -interface, and don't provide a `main` field for use in Node programs. - -Almost all npm packages (at least, those that are Node programs) -*contain* many modules within them (because every file they load with -`require()` is a module). - -In the context of a Node program, the `module` is also the thing that -was loaded *from* a file. For example, in the following program: - - var req = require('request') - -we might say that "The variable `req` refers to the `request` module". - -## So, why is it the "`node_modules`" folder, but "`package.json`" file? Why not `node_packages` or `module.json`? - -The `package.json` file defines the package. (See "What is a -package?" above.) - -The `node_modules` folder is the place Node.js looks for modules. -(See "What is a module?" above.) - -For example, if you create a file at `node_modules/foo.js` and then -had a program that did `var f = require('foo.js')` then it would load -the module. However, `foo.js` is not a "package" in this case, -because it does not have a package.json. - -Alternatively, if you create a package which does not have an -`index.js` or a `"main"` field in the `package.json` file, then it is -not a module. Even if it's installed in `node_modules`, it can't be -an argument to `require()`. - -## `"node_modules"` is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder? - -No. This will never happen. This question comes up sometimes, -because it seems silly from the outside that npm couldn't just be -configured to put stuff somewhere else, and then npm could load them -from there. It's an arbitrary spelling choice, right? What's the big -deal? - -At the time of this writing, the string `'node_modules'` appears 151 -times in 53 separate files in npm and node core (excluding tests and -documentation). - -Some of these references are in node's built-in module loader. Since -npm is not involved **at all** at run-time, node itself would have to -be configured to know where you've decided to stick stuff. Complexity -hurdle #1. Since the Node module system is locked, this cannot be -changed, and is enough to kill this request. But I'll continue, in -deference to your deity's delicate feelings regarding spelling. - -Many of the others are in dependencies that npm uses, which are not -necessarily tightly coupled to npm (in the sense that they do not read -npm's configuration files, etc.) Each of these would have to be -configured to take the name of the `node_modules` folder as a -parameter. Complexity hurdle #2. - -Furthermore, npm has the ability to "bundle" dependencies by adding -the dep names to the `"bundledDependencies"` list in package.json, -which causes the folder to be included in the package tarball. What -if the author of a module bundles its dependencies, and they use a -different spelling for `node_modules`? npm would have to rename the -folder at publish time, and then be smart enough to unpack it using -your locally configured name. Complexity hurdle #3. - -Furthermore, what happens when you *change* this name? Fine, it's -easy enough the first time, just rename the `node_modules` folders to -`./blergyblerp/` or whatever name you choose. But what about when you -change it again? npm doesn't currently track any state about past -configuration settings, so this would be rather difficult to do -properly. It would have to track every previous value for this -config, and always accept any of them, or else yesterday's install may -be broken tomorrow. Complexity hurdle #4. - -Never going to happen. The folder is named `node_modules`. It is -written indelibly in the Node Way, handed down from the ancient times -of Node 0.3. - -## How do I install node with npm? - -You don't. Try one of these node version managers: - -Unix: - -* -* -* - -Windows: - -* -* -* -* - -## How can I use npm for development? - -See `npm-developers(7)` and `package.json(5)`. - -You'll most likely want to `npm link` your development folder. That's -awesomely handy. - -To set up your own private registry, check out `npm-registry(7)`. - -## Can I list a url as a dependency? - -Yes. It should be a url to a gzipped tarball containing a single folder -that has a package.json in its root, or a git url. -(See "what is a package?" above.) - -## How do I symlink to a dev folder so I don't have to keep re-installing? - -See `npm-link(1)` - -## The package registry website. What is that exactly? - -See `npm-registry(7)`. - -## I forgot my password, and can't publish. How do I reset it? - -Go to . - -## I get ECONNREFUSED a lot. What's up? - -Either the registry is down, or node's DNS isn't able to reach out. - -To check if the registry is down, open up - in a web browser. This will also tell -you if you are just unable to access the internet for some reason. - -If the registry IS down, let us know by emailing -or posting an issue at . If it's -down for the world (and not just on your local network) then we're -probably already being pinged about it. - -You can also often get a faster response by visiting the #npm channel -on Freenode IRC. - -## Why no namespaces? - -npm has only one global namespace. If you want to namespace your own packages, -you may: simply use the `-` character to separate the names or use scoped -packages. npm is a mostly anarchic system. There is not sufficient need to -impose namespace rules on everyone. - -As of 2.0, npm supports scoped packages, which allow you to publish a group of -related modules without worrying about name collisions. - -Every npm user owns the scope associated with their username. For example, the -user named `npm` owns the scope `@npm`. Scoped packages are published inside a -scope by naming them as if they were files under the scope directory, e.g., by -setting `name` in `package.json` to `@npm/npm`. - -Scoped packages are supported by the public npm registry. The npm client is -backwards-compatible with un-scoped registries, so it can be used to work with -scoped and un-scoped registries at the same time. - -Unscoped packages can only depend on other unscoped packages. Scoped packages -can depend on packages from their own scope, a different scope, or the public -registry (unscoped). - -For the current documentation of scoped packages, see - - -References: - -1. For the reasoning behind the "one global namespace", please see this - discussion: (TL;DR: It doesn't - actually make things better, and can make them worse.) - -2. For the pre-implementation discussion of the scoped package feature, see - this discussion: - -## Who does npm? - -npm was originally written by Isaac Z. Schlueter, and many others have -contributed to it, some of them quite substantially. - -The npm open source project, The npm Registry, and [the community -website](https://www.npmjs.com) are maintained and operated by the -good folks at [npm, Inc.](http://www.npmjs.com) - -## I have a question or request not addressed here. Where should I put it? - -Post an issue on the github project: - -* - -## Why does npm hate me? - -npm is not capable of hatred. It loves everyone, especially you. - -## SEE ALSO - -* npm(1) -* npm-developers(7) -* package.json(5) -* npm-config(1) -* npm-config(7) -* npmrc(5) -* npm-config(7) -* npm-folders(5) diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md index 4efcb92af35698..3cbdff65eb3f39 100644 --- a/deps/npm/doc/misc/npm-index.md +++ b/deps/npm/doc/misc/npm-index.md @@ -413,10 +413,6 @@ Developer Guide Handling Module Name Disputes -### npm-faq(7) - -Frequently Asked Questions - ### npm-index(7) Index of all npm documentation diff --git a/deps/npm/doc/misc/npm-registry.md b/deps/npm/doc/misc/npm-registry.md index bfc978faab992c..cc1a1b299c25e0 100644 --- a/deps/npm/doc/misc/npm-registry.md +++ b/deps/npm/doc/misc/npm-registry.md @@ -11,10 +11,10 @@ Additionally, npm's package registry implementation supports several write APIs as well, to allow for publishing packages and managing user account information. -The official public npm registry is at . It +The official public npm registry is at . It is powered by a CouchDB database, of which there is a public mirror at -. The code for the couchapp is -available at . +. The code for the couchapp is +available at . The registry URL used is determined by the scope of the package (see `npm-scope(7)`). If no scope is specified, the default registry is used, which is diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md index 763f8f021b94ef..10d82bec076e87 100644 --- a/deps/npm/doc/misc/npm-scripts.md +++ b/deps/npm/doc/misc/npm-scripts.md @@ -157,10 +157,10 @@ For example, if your package.json contains this: } } -then the `scripts/install.js` will be called for the install, -post-install, stages of the lifecycle, and the `scripts/uninstall.js` -would be called when the package is uninstalled. Since -`scripts/install.js` is running for three different phases, it would +then `scripts/install.js` will be called for the install +and post-install stages of the lifecycle, and `scripts/uninstall.js` +will be called when the package is uninstalled. Since +`scripts/install.js` is running for two different phases, it would be wise in this case to look at the `npm_lifecycle_event` environment variable. diff --git a/deps/npm/doc/misc/removing-npm.md b/deps/npm/doc/misc/removing-npm.md index bedd28a2faca3e..84274522c22fef 100644 --- a/deps/npm/doc/misc/removing-npm.md +++ b/deps/npm/doc/misc/removing-npm.md @@ -50,5 +50,5 @@ modules. To track those down, you can do the following: ## SEE ALSO * README -* npm-rm(1) +* npm-uninstall(1) * npm-prune(1) diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md index 2bd5acc29bb0b3..97a50cdf0c500d 100644 --- a/deps/npm/doc/misc/semver.md +++ b/deps/npm/doc/misc/semver.md @@ -107,7 +107,7 @@ The method `.inc` takes an additional `identifier` string argument that will append the value of the string as a prerelease identifier: ```javascript -> semver.inc('1.2.3', 'pre', 'beta') +> semver.inc('1.2.3', 'prerelease', 'beta') '1.2.4-beta.0' ``` @@ -228,6 +228,30 @@ zero. * `^1.x` := `>=1.0.0 <2.0.0` * `^0.x` := `>=0.0.0 <1.0.0` +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + ## Functions All methods and classes take a final `loose` boolean argument that, if diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index b7bc458a162338..952cd66ff991e4 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -18,6 +18,14 @@

    IMPORTANT

    You need node v0.8 or higher to run this program.

    To install an old and unsupported version of npm that works on node 0.3 and prior, clone the git repo and dig through the old tags and branches.

    +

    npm is configured to use npm, Inc.'s public package registry at +https://registry.npmjs.org by default.

    +

    You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the doc on +registries.

    +

    Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +https://www.npmjs.com.

    Super Easy Install

    npm is bundled with node.

    Windows Computers

    @@ -126,34 +134,6 @@

    More Docs

    You can use the npm help command to read any of them.

    If you're a developer, and you want to use npm to publish your program, you should read this

    - -

    "npm" and "The npm Registry" are owned by npm, Inc. -All rights reserved. See the included LICENSE file for more details.

    -

    "Node.js" and "node" are trademarks owned by Joyent, Inc.

    -

    Modules published on the npm registry are not officially endorsed by -npm, Inc. or the Node.js project.

    -

    Data published to the npm registry is not part of npm itself, and is -the sole property of the publisher. While every effort is made to -ensure accountability, there is absolutely no guarantee, warranty, or -assertion expressed or implied as to the quality, fitness for a -specific purpose, or lack of malice in any given npm package.

    -

    If you have a complaint about a package in the public npm registry, -and cannot resolve it with the package -owner, please email -support@npmjs.com and explain the situation.

    -

    Any data published to The npm Registry (including user account -information) may be removed or modified at the sole discretion of the -npm server administrators.

    -

    In plainer english

    -

    npm is the property of npm, Inc.

    -

    If you publish something, it's yours, and you are solely accountable -for it.

    -

    If other people publish something, it's theirs.

    -

    Users can publish Bad Stuff. It will be removed promptly if reported. -But there is no vetting process for published modules, and you use -them at your own risk. Please inspect the source.

    -

    If you publish Bad Stuff, we may delete it from the registry, or even -ban your account in extreme cases. So don't do that.

    BUGS

    When you find issues, please report them:

      @@ -183,5 +163,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 2251e3323073a3..c447623ac87ad0 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index 79bdefef1d5ee6..6fd7c5856d17e9 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 1f8e2c7f67af97..0a37bb27f4e210 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index 0e15a2da83ed6d..c672cb3a16f714 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index cacdff19ef4820..f8d8ae30c0d1a3 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 38ff7fab1b39fc..4b1c74daae5155 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 63f1784ac08216..7d8e3ab7d9d020 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 74ff535894ecd2..0931efe8b62556 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index 5c9fc309602358..9840342a0229c7 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index d3cf6aa1a082d1..49b22cdfaf60ca 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 8bc92729a37e97..3fd3a058eb01fa 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 8506d23965d3ca..127f9b1521e63f 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index b4b5a3c7a49668..0cce1cbed847c5 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index e11f698b5081bd..571a75850e7ba6 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index e0738be3c9cb54..8e2854ea3540af 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

      global

             - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 3b85b356717d3b..40f8da3f8e4499 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 1ce12a944bd88f..3297a9bf1e7116 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 94b5eba42e7379..42da30ddc70d72 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html index f9cad1385336a2..b91891ba278f27 100644 --- a/deps/npm/html/doc/api/npm-ping.html +++ b/deps/npm/html/doc/api/npm-ping.html @@ -29,4 +29,4 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 9b6ba5c6cfed86..96b6f0e4637917 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index fe90521e52f550..3584f02015489f 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index f843a7999a647f..c9c20e7907fc88 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index cfac6be503d97e..d2c258f534c6f2 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

      CONFIGURATION

             - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 50b682745a945d..6523acc7469479 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 00bdb943c1079c..3d30112b71ca38 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 4744a662dcb781..82ef516c3c74c4 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 20b1a4321ae3c5..7c4837904b1678 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 9c7449cc0feca6..1dbd50a8bb7b52 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 138bdcf0a01bd4..44bbe67b8eff54 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index d5c29a430e3052..c4f2b9e252c355 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index b61a5d68b9cfa4..c1a49696521c6c 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 8143ed91af341f..74b9fdca62e026 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index 5f4ddcdba8cc5a..a532ca8a025b7d 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index bb54e950fe08c0..926f9849459ad6 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index a048f5f7d5880f..b07dce819e78bf 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index c24d3f5a2f82e1..44335e595b2038 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -33,5 +33,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index ce514810ca6a0d..b6090eca5c7415 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 86c105503b3bd4..82aa620c414cc0 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

      RETURN VALUE

             - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index 2ec8bdf9c8a66e..bf6a49701fe9cd 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index a8633acb509faf..e00ae9e9f4df9a 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

      SYNOPSIS

      npm.commands.install(["package"], cb) })

      VERSION

      -

      2.14.12

      +

      2.14.15

      DESCRIPTION

      This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@

      ABBREVS

             - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 28025376045344..927ad46d9d9ea3 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 25835251538711..8db22a998ef185 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -26,7 +26,7 @@

      SYNOPSIS

      npm login is an alias to adduser and behaves exactly the same way.

      CONFIGURATION

      registry

      -

      Default: http://registry.npmjs.org/

      +

      Default: https://registry.npmjs.org/

      The base URL of the npm package registry. If scope is also specified, this registry will only be used for packages with that scope. See npm-scope(7).

      scope

      @@ -68,5 +68,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index e1c7d8ba9bc356..051a17dc4eddea 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index b8805a79c8ab1e..e534ce8a70409b 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 6863ec6d51b52a..d9d13e67ca5e34 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

      DESCRIPTION

             - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 85d0471dc38fa2..808ef0e57876e5 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 e53b8fa6d3b59f..e7271f0dd8b01e 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 7571cdee40c4c5..b17b42d9c73b7d 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 c446bc918c0c09..5dd370f6797642 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 4e1fa0ba78d1dd..7708ab7f83416b 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 485325a2420fa5..1eb1e17bb855e1 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 ffc2c42f368f21..7e6d02ee5db9bd 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -62,7 +62,6 @@

      SEE ALSO

    • npm-registry(7)
    • npm-config(1)
    • npm-config(7)
    • -
    • npm-tag(3)
    • npmrc(5)
    @@ -77,5 +76,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 8a05aee720973e..f85bf792c344b2 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 24229d6a9f2e7d..feb7936a4255f2 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 4ad95c717c1750..24ab1f1564c46a 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,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 45d70daf9641ef..9126696751765c 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 038efd1b74c92c..be9418fc14a56f 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 5ad23aac04632b..b92411fe283210 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html new file mode 100644 index 00000000000000..a43a37cd476885 --- /dev/null +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -0,0 +1,45 @@ + + + npm-install-test + + + + + + +
    + +

    npm install-test

    Install package(s) and run tests

    +

    SYNOPSIS

    +
    npm install-test (with no args, in package dir)
    +npm install-test [<@scope>/]<name>
    +npm install-test [<@scope>/]<name>@<tag>
    +npm install-test [<@scope>/]<name>@<version>
    +npm install-test [<@scope>/]<name>@<version range>
    +npm install-test <tarball file>
    +npm install-test <tarball url>
    +npm install-test <folder>
    +
    +alias: npm it
    +common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
    +

    DESCRIPTION

    +

    This command runs an npm install followed immediately by an npm test. It +takes exactly the same arguments as npm install.

    +

    SEE ALSO

    + + +
    + + + + + + + + + + + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index df176ecb98b692..7281f125766c02 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -26,7 +26,7 @@

    SYNOPSIS

    by that. See npm-shrinkwrap(1).

    A package is:

      -
    • a) a folder containing a program described by a package.json file
    • +
    • a) a folder containing a program described by a package.json(5) file
    • b) a gzipped tarball containing (a)
    • c) a url that resolves to (b)
    • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
    • @@ -44,8 +44,9 @@

      SYNOPSIS

      In global mode (ie, with -g or --global appended to the command), it installs the current package context (ie, the current working directory) as a global package.

      -

      By default, npm install will install all modules listed as dependencies. - With the --production flag (or when the NODE_ENV environment variable +

      By default, npm install will install all modules listed as dependencies + in package.json(5).

      +

      With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.

      @@ -262,8 +263,9 @@

      SEE ALSO

    • npmrc(5)
    • npm-registry(7)
    • npm-tag(1)
    • -
    • npm-rm(1)
    • +
    • npm-uninstall(1)
    • npm-shrinkwrap(1)
    • +
    • package.json(5)
    @@ -277,5 +279,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 304301e874cd3e..89c8d82bc00198 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -72,5 +72,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index b2f671578de657..b09df9cc7db309 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -23,7 +23,7 @@

    SYNOPSIS

    connected to that scope, if set.

    CONFIGURATION

    registry

    -

    Default: http://registry.npmjs.org/

    +

    Default: https://registry.npmjs.org/

    The base URL of the npm package registry. If scope is also specified, it takes precedence.

    scope

    @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 2dd021accffe90..74c7c4e6d705af 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,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@2.14.12 /path/to/npm
    +
    npm@2.14.15 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

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

    @@ -97,5 +97,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index c36135b39eef3d..76687c3384cbba 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -15,9 +15,55 @@

    SYNOPSIS

    DESCRIPTION

    This command will check the registry to see if any (or, specific) installed packages are currently outdated.

    -

    The resulting field 'wanted' shows the latest version according to the -version specified in the package.json, the field 'latest' the very latest -version of the package.

    +

    In the output:

    +
      +
    • wanted is the maximum version of the package that satisfies the semver +range specified in package.json. If there's no available semver range (i.e. +you're running npm outdated --global, or the package isn't included in +package.json), then wanted shows the currently-installed version.
    • +
    • latest is the version of the package tagged as latest in the registry. +Running npm publish with no special configuration will publish the package +with a dist-tag of latest. This may or may not be the maximum version of +the package, or the most-recently published version of the package, depending +on how the package's developer manages the latest dist-tag(1).
    • +
    • location is where in the dependency tree the package is located. Note that +npm outdated defaults to a depth of 0, so unless you override that, you'll +always be seeing only top-level dependencies that are outdated.
    • +
    • package type (when using --long / -l) tells you whether this package is +a dependency or a devDependency. Packages not included in package.json +are always marked dependencies.
    • +
    +

    An example

    +
    $ npm outdated
    +Package      Current  Wanted  Latest  Location
    +glob          5.0.15  5.0.15   6.0.1  test-outdated-output
    +nothingness    0.0.3     git     git  test-outdated-output
    +npm            3.5.1   3.5.2   3.5.1  test-outdated-output
    +once           1.3.2   1.3.3   1.3.3  test-outdated-output
    +

    With these dependencies:

    +
    {
    +  "glob": "^5.0.15",
    +  "nothingness": "github:othiym23/nothingness#master",
    +  "npm": "^3.5.1",
    +  "once": "^1.3.1"
    +}
    +
    +

    A few things to note:

    +
      +
    • glob requires ^5, which prevents npm from installing glob@6, which is +outside the semver range.
    • +
    • Git dependencies will always be reinstalled, because of how they're specified. +The installed committish might satisfy the dependency specifier (if it's +something immutable, like a commit SHA), or it might not, so npm outdated and +npm update have to fetch Git repos to check. This is why currently doing a +reinstall of a Git dependency always forces a new clone and install.
    • +
    • npm@3.5.2 is marked as "wanted", but "latest" is npm@3.5.1 because npm +uses dist-tags to manage its latest and next release channels. npm update +will install the newest version, but npm install npm (with no semver range) +will install whatever's tagged as latest.
    • +
    • once is just plain out of date. Reinstalling node_modules from scratch or +running npm update will bring it up to spec.
    • +

    CONFIGURATION

    json

      @@ -46,12 +92,14 @@

      global

      project.

      depth

        +
      • Default: 0
      • Type: Int

      Max depth for checking dependency tree.

      SEE ALSO

      @@ -67,5 +115,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 9b9d9773aa853b..73a457835f4377 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index f450c2310c3f30..b68e2f695ce3b1 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 408b06920fe63c..0b8ffbf96f0a9c 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 8aa451991cac54..40f4bde492c25e 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-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 0da09b93a42917..2415adf636a58b 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -25,7 +25,7 @@

      SYNOPSIS

      negate NODE_ENV being set to production.

      SEE ALSO

      @@ -41,5 +41,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index d0635202be761f..fc7d1f6c2df8a8 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -66,5 +66,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index b720319e46cbc0..73066ffa224dd6 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index beaa6e1b515f26..3b997168ccc3bf 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 89fab946c221a1..35c9e2aadf5663 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 98d48e6676354c..689dceaa1018d7 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index e229c7e21bed23..1352a2c30d9793 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,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 35c2b1738c2125..acbddd79e22f71 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 49e007b501cd97..f00ebb1f9659f1 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 739c2bd3bc1d23..d5b938ea789650 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 93e7ac3e2ea691..6482e7f5202a8c 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index abc89af1a1ca65..70acbfb5dd39f6 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 24ae34878e9715..f3c3bc523d19f8 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 072b2056e62140..04cddba97bb07e 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 2c6704ccae89cb..48b7051ef4c93f 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index 67bf648e9aa17f..e9c4342f8ae670 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -26,7 +26,7 @@

      SYNOPSIS

      Teams must always be fully qualified with the organization/scope they belond to when operating on them, separated by a colon (:). That is, if you have a developers team on a foo organization, you must always refer to that team as -developers:foo in these commands.

      +foo:developers in these commands.

      • create / destroy: Create a new team, or destroy an existing one.

        @@ -67,4 +67,4 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 0c63efe9596c95..d732d76908f254 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 39df356102da7a..22a78bcb8d6856 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -9,7 +9,7 @@
        -

        npm-rm

        Remove a package

        +

        npm-uninstall

        Remove a package

        SYNOPSIS

        npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
         npm rm (with any of the previous argument usage)
        @@ -57,5 +57,5 @@ 

        SYNOPSIS

               - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 12ca4b98a72c6b..4152dfbeb867d0 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index f70b9b8281f690..8182d4962004b1 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -119,5 +119,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index d0ccbf73c1ec85..1f1fcfcb9c6b5d 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -95,5 +95,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index cbb64e7dfd8753..6298ee702c23eb 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index b6514d871dbb70..9eb94323d838e3 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 9844e540eeb773..5d9d36640bb13e 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

        npm

        javascript package manager

        SYNOPSIS

        npm <command> [args]
         

        VERSION

        -

        2.14.12

        +

        2.14.15

        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 @@ -109,16 +109,16 @@

        CONTRIBUTIONS

        If you would like to contribute, but don't know what to work on, check the issues list or ask on the mailing list.

        BUGS

        When you find issues, please report them:

        Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

        @@ -128,7 +128,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 8cb1493bbb45a4..2133bfc17affa5 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -184,5 +184,5 @@

          SEE ALSO

                 - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 8cb1493bbb45a4..2133bfc17affa5 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -184,5 +184,5 @@

          SEE ALSO

                 - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 1f50c9fcf4858a..83c4be717301ff 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -85,8 +85,8 @@

          license

          { "license" : "BSD-3-Clause" }
           

          You can check the full list of SPDX license IDs. Ideally you should pick one that is -OSI approved.

          -

          If your package is licensed under multiple common licenses, use an SPDX license +OSI approved.

          +

          If your package is licensed under multiple common licenses, use an SPDX license expression syntax version 2.0 string, like this:

          { "license" : "(ISC OR GPL-3.0)" }
           

          If you are using a license that hasn't been assigned an SPDX identifier, or if @@ -551,7 +551,7 @@

          SEE ALSO

        • npm-faq(7)
        • npm-install(1)
        • npm-publish(1)
        • -
        • npm-rm(1)
        • +
        • npm-uninstall(1)
        @@ -565,5 +565,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index cff1064d1d1d25..b400267be45aff 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 1f50c9fcf4858a..83c4be717301ff 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -85,8 +85,8 @@

        license

        { "license" : "BSD-3-Clause" }
         

        You can check the full list of SPDX license IDs. Ideally you should pick one that is -OSI approved.

        -

        If your package is licensed under multiple common licenses, use an SPDX license +OSI approved.

        +

        If your package is licensed under multiple common licenses, use an SPDX license expression syntax version 2.0 string, like this:

        { "license" : "(ISC OR GPL-3.0)" }
         

        If you are using a license that hasn't been assigned an SPDX identifier, or if @@ -551,7 +551,7 @@

        SEE ALSO

      • npm-faq(7)
      • npm-install(1)
      • npm-publish(1)
      • -
      • npm-rm(1)
      • +
      • npm-uninstall(1)
    @@ -565,5 +565,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 2a194912db3efd..84b38628d4de0a 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -216,8 +216,6 @@

    npm-developers(7)<

    Developer Guide

    npm-disputes(7)

    Handling Module Name Disputes

    -

    npm-faq(7)

    -

    Frequently Asked Questions

    npm-index(7)

    Index of all npm documentation

    npm-orgs(7)

    @@ -244,5 +242,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 cabbf6fd470f9b..7fd8a50eb9b166 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -147,5 +147,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 480f2d4086078f..bb6d06fd0d55ca 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -799,5 +799,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index add93733e0b95d..1d939787d842ba 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -96,7 +96,7 @@

    Keeping files out of your pa create an empty .npmignore file to override it. Like git, npm looks for .npmignore and .gitignore files in all subdirectories of your package, not only the root directory.

    -

    .npmignore files follow the same pattern rules +

    .npmignore files follow the same pattern rules as .gitignore files:

    • Blank lines or lines starting with # are ignored.
    • @@ -161,7 +161,7 @@

      Create a User Account

      and then follow the prompts.

      This is documented better in npm-adduser(1).

      Publish your package

      -

      This part's easy. IN the root of your folder, do this:

      +

      This part's easy. In the root of your folder, do this:

      npm publish
       

      You can give publish a url to a tarball, or a filename of a tarball, or a path to a folder.

      @@ -195,5 +195,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 51c2cd56b4bc1e..a8b9d64edc5e23 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

      npm-disputes

      Handling Module

      SYNOPSIS

      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.

      @@ -51,12 +51,12 @@

      DESCRIPTION

      owner (Bob).
    • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
    • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
    • @@ -112,5 +112,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 4f07f2e93f559b..1ca8232c06ea42 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -216,8 +216,6 @@

      npm-developers(

      Developer Guide

      npm-disputes(7)

      Handling Module Name Disputes

      -

      npm-faq(7)

      -

      Frequently Asked Questions

      npm-index(7)

      Index of all npm documentation

      npm-orgs(7)

      @@ -244,5 +242,5 @@

      semver(7)

             - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index a45b6e1b87203d..d5417ce6295c26 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

      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 378b7ada06b735..79d1aeaf069a5b 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -17,10 +17,10 @@

      DESCRIPTION

      Additionally, npm's package registry implementation supports several write APIs as well, to allow for publishing packages and managing user account information.

      -

      The official public npm registry is at http://registry.npmjs.org/. It +

      The official public npm registry is at https://registry.npmjs.org/. It is powered by a CouchDB database, of which there is a public mirror at -http://skimdb.npmjs.com/registry. The code for the couchapp is -available at http://github.com/npm/npm-registry-couchapp.

      +https://skimdb.npmjs.com/registry. The code for the couchapp is +available at https://github.com/npm/npm-registry-couchapp.

      The registry URL used is determined by the scope of the package (see npm-scope(7)). If no scope is specified, the default registry is used, which is supplied by the registry config parameter. See npm-config(1), @@ -70,5 +70,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 80239fa57a990a..2394c0035f675b 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index f97eac727cc0ce..2bac128e2856d0 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -134,10 +134,10 @@

      Special: package.json "config&q , "uninstall" : "scripts/uninstall.js" } } -

      then the scripts/install.js will be called for the install, -post-install, stages of the lifecycle, and the scripts/uninstall.js -would be called when the package is uninstalled. Since -scripts/install.js is running for three different phases, it would +

      then scripts/install.js will be called for the install +and post-install stages of the lifecycle, and scripts/uninstall.js +will be called when the package is uninstalled. Since +scripts/install.js is running for two different phases, it would be wise in this case to look at the npm_lifecycle_event environment variable.

      If you want to run a make command, you can do so. This works just @@ -207,5 +207,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 4bd86ef8e95cdd..e6c4ced30b0fef 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -42,7 +42,7 @@

      SYNOPSIS

      SEE ALSO

      @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 0be3fff6aa3068..9fc9ae1fd3af3a 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -94,7 +94,7 @@

      Prerelease Tags

      Prerelease Identifiers

      The method .inc takes an additional identifier string argument that will append the value of the string as a prerelease identifier:

      -
      > semver.inc('1.2.3', 'pre', 'beta')
      +
      > semver.inc('1.2.3', 'prerelease', 'beta')
       '1.2.4-beta.0'
       

      command-line example:

      @@ -199,6 +199,26 @@

      Caret Ranges ^1.2.3
    • ^1.x := >=1.0.0 <2.0.0
    • ^0.x := >=0.0.0 <1.0.0
    +

    Range Grammar

    +

    Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors:

    +
    range-set  ::= range ( logical-or range ) *
    +logical-or ::= ( ' ' ) * '||' ( ' ' ) *
    +range      ::= hyphen | simple ( ' ' simple ) * | ''
    +hyphen     ::= partial ' - ' partial
    +simple     ::= primitive | partial | tilde | caret
    +primitive  ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
    +partial    ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
    +xr         ::= 'x' | 'X' | '*' | nr
    +nr         ::= '0' | ['1'-'9']['0'-'9']+
    +tilde      ::= '~' partial
    +caret      ::= '^' partial
    +qualifier  ::= ( '-' pre )? ( '+' build )?
    +pre        ::= parts
    +build      ::= parts
    +parts      ::= part ( '.' part ) *
    +part       ::= nr | [-0-9A-Za-z]+
    +

    Functions

    All methods and classes take a final loose boolean argument that, if true, will be more forgiving about not-quite-valid semver strings. @@ -282,5 +302,5 @@

    Ranges

           - + diff --git a/deps/npm/html/index.html b/deps/npm/html/index.html index 06ca14ba4ac9b7..0d3c128b794d0e 100644 --- a/deps/npm/html/index.html +++ b/deps/npm/html/index.html @@ -86,7 +86,7 @@

    Other Cool Stuff

  • README
  • Help Documentation
  • FAQ -
  • Search for Packages +
  • Search for Packages
  • Mailing List
  • Bugs diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index 1d26ffcf8ac92d..c85a42de640194 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -47,10 +47,10 @@ completion.completion = function (opts, cb) { } function completion (args, cb) { - if (process.platform === "win32") { - var e = new Error("npm completion not supported on windows") - e.code = "ENOTSUP" - e.errno = require("constants").ENOTSUP + if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP return cb(e) } diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index c7877b925e6be7..caba4900547dc9 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -111,10 +111,15 @@ function alphasort (a, b) { : a < b ? -1 : 0 } -function getLite (data, noname) { +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { var lite = {} , maxDepth = npm.config.get("depth") + if (typeof depth === 'undefined') depth = 0 if (!noname && data.name) lite.name = data.name if (data.version) lite.version = data.version if (data.extraneous) { @@ -163,7 +168,20 @@ function getLite (data, noname) { + ", required by " + data.name + "@" + data.version lite.problems.push(p) - return [d, { required: dep, missing: true }] + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] } return [d, getLite(dep, true)] }).reduce(function (deps, d) { diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index dbd48a0145a3d7..7b6eec0ce9f296 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -180,13 +180,14 @@ function checkGit (localData, cb) { } function _commit (version, hasShrinkwrap, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') var options = { env: process.env } var message = npm.config.get('message').replace(/%s/g, version) var sign = npm.config.get('sign-git-tag') var flag = sign ? '-sm' : '-am' chain( [ - git.chainableExec([ 'add', 'package.json' ], options), + git.chainableExec([ 'add', packagePath ], options), hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), git.chainableExec([ 'commit', '-m', message ], options), git.chainableExec([ 'tag', npm.config.get('tag-version-prefix') + version, flag, message ], options) diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 8254886adcdb3c..dae1e044a77b74 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "November 2015" "" "" +.TH "NPM" "1" "January 2016" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P @@ -14,6 +14,17 @@ Much more info available via \fBnpm help\fP once it's installed\. .P To install an old \fBand unsupported\fR version of npm that works on node 0\.3 and prior, clone the git repo and dig through the old tags and branches\. +.P +\fBnpm is configured to use npm, Inc\.'s public package registry at +https://registry\.npmjs\.org by default\.\fR +.P +You can configure npm to use any compatible registry you +like, and even run your own registry\. Check out the doc on +registries \fIhttps://docs\.npmjs\.com/misc/registry\fR\|\. +.P +Use of someone else's registry may be governed by terms of use\. The +terms of use for the default public registry are available at +https://www\.npmjs\.com\|\. .SH Super Easy Install .P npm is bundled with node \fIhttp://nodejs\.org/download/\fR\|\. @@ -187,45 +198,6 @@ You can use the \fBnpm help\fP command to read any of them\. .P If you're a developer, and you want to use npm to publish your program, you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR -.SH Legal Stuff -.P -"npm" and "The npm Registry" are owned by npm, Inc\. -All rights reserved\. See the included LICENSE file for more details\. -.P -"Node\.js" and "node" are trademarks owned by Joyent, Inc\. -.P -Modules published on the npm registry are not officially endorsed by -npm, Inc\. or the Node\.js project\. -.P -Data published to the npm registry is not part of npm itself, and is -the sole property of the publisher\. While every effort is made to -ensure accountability, there is absolutely no guarantee, warranty, or -assertion expressed or implied as to the quality, fitness for a -specific purpose, or lack of malice in any given npm package\. -.P -If you have a complaint about a package in the public npm registry, -and cannot resolve it with the package -owner \fIhttps://docs\.npmjs\.com/misc/disputes\fR, please email -support@npmjs\.com and explain the situation\. -.P -Any data published to The npm Registry (including user account -information) may be removed or modified at the sole discretion of the -npm server administrators\. -.SS In plainer english -.P -npm is the property of npm, Inc\. -.P -If you publish something, it's yours, and you are solely accountable -for it\. -.P -If other people publish something, it's theirs\. -.P -Users can publish Bad Stuff\. It will be removed promptly if reported\. -But there is no vetting process for published modules, and you use -them at your own risk\. Please inspect the source\. -.P -If you publish Bad Stuff, we may delete it from the registry, or even -ban your account in extreme cases\. So don't do that\. .SH BUGS .P When you find issues, please report them: diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index f1b8bc0e316dd0..cda8c58af373bc 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" "November 2015" "" "" +.TH "NPM\-ACCESS" "1" "January 2016" "" "" .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 f96eae96bce363..5db95ed23785b2 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" "November 2015" "" "" +.TH "NPM\-ADDUSER" "1" "January 2016" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS @@ -29,7 +29,7 @@ your existing record\. .SH CONFIGURATION .SS registry .P -Default: http://registry\.npmjs\.org/ +Default: https://registry\.npmjs\.org/ .P The base URL of the npm package registry\. If \fBscope\fP is also specified, this registry will only be used for packages with that scope\. See npm help 7 \fBnpm\-scope\fP\|\. diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index fd8eee83bca705..2a62d7f857872b 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" "November 2015" "" "" +.TH "NPM\-BIN" "1" "January 2016" "" "" .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 7da5f012b27283..24a9afb3c00675 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" "November 2015" "" "" +.TH "NPM\-BUGS" "1" "January 2016" "" "" .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 ae4a834a106446..fa47ba88efd86f 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" "November 2015" "" "" +.TH "NPM\-BUILD" "1" "January 2016" "" "" .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 fa54e083415a82..341e5485ca5884 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" "November 2015" "" "" +.TH "NPM\-BUNDLE" "1" "January 2016" "" "" .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 c4bca767c4496a..e9fa3a254f8bcb 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" "November 2015" "" "" +.TH "NPM\-CACHE" "1" "January 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 2e17d6287e922c..b37f2a1098b012 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" "November 2015" "" "" +.TH "NPM\-COMPLETION" "1" "January 2016" "" "" .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 764092fd13c493..0a87b1565cb4c0 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" "November 2015" "" "" +.TH "NPM\-CONFIG" "1" "January 2016" "" "" .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 cb50dddb4a7ca5..604f4433371da9 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" "November 2015" "" "" +.TH "NPM\-DEDUPE" "1" "January 2016" "" "" .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 6b51cbf6f42ceb..35e916d71dfa22 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" "November 2015" "" "" +.TH "NPM\-DEPRECATE" "1" "January 2016" "" "" .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 8b30e986a4f78b..a9c7786bc8b511 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" "November 2015" "" "" +.TH "NPM\-DIST\-TAG" "1" "January 2016" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS @@ -88,8 +88,6 @@ npm help config .IP \(bu 2 npm help 7 config .IP \(bu 2 -npm apihelp tag -.IP \(bu 2 npm help 5 npmrc .RE diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 04e91d641e00e3..61c754ca14a29b 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" "November 2015" "" "" +.TH "NPM\-DOCS" "1" "January 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index e58e81d26cec6d..0ac5c044d464c0 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" "November 2015" "" "" +.TH "NPM\-EDIT" "1" "January 2016" "" "" .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 a757dfd60c2fce..abf91d46da542c 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" "November 2015" "" "" +.TH "NPM\-EXPLORE" "1" "January 2016" "" "" .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 612bfd2915faf5..e00ecd6e7278d4 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" "November 2015" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "January 2016" "" "" .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 3691fca49d0dee..42829dff278cf2 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" "November 2015" "" "" +.TH "NPM\-HELP" "1" "January 2016" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 8c6bf0397482eb..8d6ac74f59b3c8 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" "November 2015" "" "" +.TH "NPM\-INIT" "1" "January 2016" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 new file mode 100644 index 00000000000000..6b4f8adec740a8 --- /dev/null +++ b/deps/npm/man/man1/npm-install-test.1 @@ -0,0 +1,32 @@ +.TH "NPM" "" "January 2016" "" "" +.SH "NAME" +\fBnpm\fR +.SH SYNOPSIS +.P +.RS 2 +.nf +npm install\-test (with no args, in package dir) +npm install\-test [<@scope>/] +npm install\-test [<@scope>/]@ +npm install\-test [<@scope>/]@ +npm install\-test [<@scope>/]@ +npm install\-test +npm install\-test +npm install\-test + +alias: npm it +common options: [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact] [\-\-dry\-run] +.fi +.RE +.SH DESCRIPTION +.P +This command runs an \fBnpm install\fP followed immediately by an \fBnpm test\fP\|\. It +takes exactly the same arguments as \fBnpm install\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help test + +.RE diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 9b4290c0fde314..b93805f9ef378a 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" "November 2015" "" "" +.TH "NPM\-INSTALL" "1" "January 2016" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS @@ -25,7 +25,7 @@ by that\. See npm help shrinkwrap\. A \fBpackage\fP is: .RS 0 .IP \(bu 2 -a) a folder containing a program described by a package\.json file +a) a folder containing a program described by a npm help 5 \fBpackage\.json\fP file .IP \(bu 2 b) a gzipped tarball containing (a) .IP \(bu 2 @@ -52,7 +52,8 @@ after packing it up into a tarball (b)\. In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), it installs the current package context (ie, the current working directory) as a global package\. - By default, \fBnpm install\fP will install all modules listed as dependencies\. + By default, \fBnpm install\fP will install all modules listed as dependencies + in npm help 5 \fBpackage\.json\fP\|\. With the \fB\-\-production\fP flag (or when the \fBNODE_ENV\fP environment variable is set to \fBproduction\fP), npm will not install modules listed in \fBdevDependencies\fP\|\. @@ -402,9 +403,11 @@ npm help 7 registry .IP \(bu 2 npm help tag .IP \(bu 2 -npm help rm +npm help uninstall .IP \(bu 2 npm help shrinkwrap +.IP \(bu 2 +npm help 5 package\.json .RE diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index 19492b21c08210..881b29ca1f8790 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" "November 2015" "" "" +.TH "NPM\-LINK" "1" "January 2016" "" "" .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 bf144bddc993b3..27fb508d94c12e 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" "November 2015" "" "" +.TH "NPM\-LOGOUT" "1" "January 2016" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS @@ -23,7 +23,7 @@ connected to that scope, if set\. .SH CONFIGURATION .SS registry .P -Default: http://registry\.npmjs\.org/ +Default: https://registry\.npmjs\.org/ .P The base URL of the npm package registry\. If \fBscope\fP is also specified, it takes precedence\. diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index bfddf1305609ab..d865fee89203ee 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" "November 2015" "" "" +.TH "NPM\-LS" "1" "January 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@2.14.12 /path/to/npm +npm@2.14.15 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 0f2ae4681ba185..5de491bd7103da 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" "November 2015" "" "" +.TH "NPM\-OUTDATED" "1" "January 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS @@ -13,9 +13,76 @@ npm outdated [ [ \.\.\.]] This command will check the registry to see if any (or, specific) installed packages are currently outdated\. .P -The resulting field 'wanted' shows the latest version according to the -version specified in the package\.json, the field 'latest' the very latest -version of the package\. +In the output: +.RS 0 +.IP \(bu 2 +\fBwanted\fP is the maximum version of the package that satisfies the semver +range specified in \fBpackage\.json\fP\|\. If there's no available semver range (i\.e\. +you're running \fBnpm outdated \-\-global\fP, or the package isn't included in +\fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed version\. +.IP \(bu 2 +\fBlatest\fP is the version of the package tagged as latest in the registry\. +Running \fBnpm publish\fP with no special configuration will publish the package +with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum version of +the package, or the most\-recently published version of the package, depending +on how the package's developer manages the latest npm help dist\-tag\. +.IP \(bu 2 +\fBlocation\fP is where in the dependency tree the package is located\. Note that +\fBnpm outdated\fP defaults to a depth of 0, so unless you override that, you'll +always be seeing only top\-level dependencies that are outdated\. +.IP \(bu 2 +\fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this package is +a \fBdependency\fP or a \fBdevDependency\fP\|\. Packages not included in \fBpackage\.json\fP +are always marked \fBdependencies\fP\|\. + +.RE +.SS An example +.P +.RS 2 +.nf +$ npm outdated +Package Current Wanted Latest Location +glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output +nothingness 0\.0\.3 git git test\-outdated\-output +npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output +once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output +.fi +.RE +.P +With these \fBdependencies\fP: +.P +.RS 2 +.nf +{ + "glob": "^5\.0\.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3\.5\.1", + "once": "^1\.3\.1" +} +.fi +.RE +.P +A few things to note: +.RS 0 +.IP \(bu 2 +\fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which is +outside the semver range\. +.IP \(bu 2 +Git dependencies will always be reinstalled, because of how they're specified\. +The installed committish might satisfy the dependency specifier (if it's +something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP and +\fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a +reinstall of a Git dependency always forces a new clone and install\. +.IP \(bu 2 +\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm +uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP +will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range) +will install whatever's tagged as \fBlatest\fP\|\. +.IP \(bu 2 +\fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or +running \fBnpm update\fP will bring it up to spec\. + +.RE .SH CONFIGURATION .SS json .RS 0 @@ -61,6 +128,8 @@ project\. .SS depth .RS 0 .IP \(bu 2 +Default: 0 +.IP \(bu 2 Type: Int .RE @@ -71,6 +140,8 @@ Max depth for checking dependency tree\. .IP \(bu 2 npm help update .IP \(bu 2 +npm help dist\-tag +.IP \(bu 2 npm help 7 registry .IP \(bu 2 npm help 5 folders diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 1936ce029c231f..7ef4d9badc6412 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" "November 2015" "" "" +.TH "NPM\-OWNER" "1" "January 2016" "" "" .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 a836493157d56a..bd444bcce62449 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" "November 2015" "" "" +.TH "NPM\-PACK" "1" "January 2016" "" "" .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 4d2b9a78bf0fcb..a51570bcf9f39c 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" "November 2015" "" "" +.TH "NPM\-PING" "1" "January 2016" "" "" .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 c6ea5f6fdfa75e..ca5cfbabc6656f 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" "November 2015" "" "" +.TH "NPM\-PREFIX" "1" "January 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 3598ed1777c86d..f0e9b1233e57ab 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" "November 2015" "" "" +.TH "NPM\-PRUNE" "1" "January 2016" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS @@ -25,7 +25,7 @@ negate \fBNODE_ENV\fP being set to \fBproduction\fP\|\. .SH SEE ALSO .RS 0 .IP \(bu 2 -npm help rm +npm help uninstall .IP \(bu 2 npm help 5 folders .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 308d661511e3f2..a41165a809aba5 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" "November 2015" "" "" +.TH "NPM\-PUBLISH" "1" "January 2016" "" "" .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 fd3a153ebded7a..de61e6c6d56887 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" "November 2015" "" "" +.TH "NPM\-REBUILD" "1" "January 2016" "" "" .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 d27b013fdeb321..ce1bc645df1cbc 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" "November 2015" "" "" +.TH "NPM\-REPO" "1" "January 2016" "" "" .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 0bc7541ccf80c6..5cdda9eff80295 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" "November 2015" "" "" +.TH "NPM\-RESTART" "1" "January 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1 index edbd1fc6a70a7f..766b48437fc03b 100644 --- a/deps/npm/man/man1/npm-rm.1 +++ b/deps/npm/man/man1/npm-rm.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RM" "1" "November 2015" "" "" +.TH "NPM\-RM" "1" "January 2016" "" "" .SH "NAME" \fBnpm-rm\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 3418764c7cd6fc..5cbadc13cc2c5e 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" "November 2015" "" "" +.TH "NPM\-ROOT" "1" "January 2016" "" "" .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 b0645021422831..5555008ccb1dcb 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" "November 2015" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "January 2016" "" "" .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 f8699010f95cb6..0467ad2e9dc990 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" "November 2015" "" "" +.TH "NPM\-SEARCH" "1" "January 2016" "" "" .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 811285af48869d..98b70b7f7cb21c 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" "November 2015" "" "" +.TH "NPM\-SHRINKWRAP" "1" "January 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 93d84af643bbde..53856a02666f6f 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" "November 2015" "" "" +.TH "NPM\-STAR" "1" "January 2016" "" "" .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 2c4057ee2a2f03..848330284e6e79 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" "November 2015" "" "" +.TH "NPM\-STARS" "1" "January 2016" "" "" .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 2d52ecb34d3e0c..344d8a4ce5395d 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" "November 2015" "" "" +.TH "NPM\-START" "1" "January 2016" "" "" .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 044bbc066ac905..5c9c5376527d45 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" "November 2015" "" "" +.TH "NPM\-STOP" "1" "January 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index 426751697b3fe4..a109205fb7ff4b 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "November 2015" "" "" +.TH "NPM\-TAG" "1" "January 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 2e88b97a7c1fe1..d27a3e95d26d6e 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" "November 2015" "" "" +.TH "NPM\-TEAM" "1" "January 2016" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS @@ -24,7 +24,7 @@ handle permissions for packages\. Teams must always be fully qualified with the organization/scope they belond to when operating on them, separated by a colon (\fB:\fP)\. That is, if you have a \fBdevelopers\fP team on a \fBfoo\fP organization, you must always refer to that team as -\fBdevelopers:foo\fP in these commands\. +\fBfoo:developers\fP in these commands\. .RS 0 .IP \(bu 2 create / destroy: diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index c36e7f42adeeb9..ee076c79b969f7 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" "November 2015" "" "" +.TH "NPM\-TEST" "1" "January 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index bbdf3360e51299..a54be5c18e63b6 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,6 +1,6 @@ -.TH "NPM\-RM" "1" "November 2015" "" "" +.TH "NPM\-UNINSTALL" "1" "January 2016" "" "" .SH "NAME" -\fBnpm-rm\fR \- Remove a package +\fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS .P .RS 2 diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 830b240fb31f95..50616795bee0a7 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" "November 2015" "" "" +.TH "NPM\-UNPUBLISH" "1" "January 2016" "" "" .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 3ded8282ceeacc..84681d6d1ce2e1 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" "November 2015" "" "" +.TH "NPM\-UPDATE" "1" "January 2016" "" "" .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 f133aea501d3e5..c17fc698d3eae6 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" "November 2015" "" "" +.TH "NPM\-VERSION" "1" "January 2016" "" "" .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 395adb05b4e748..aabbeac43af4f2 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" "November 2015" "" "" +.TH "NPM\-VIEW" "1" "January 2016" "" "" .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 459894ef68cda5..ad78150a01e2a7 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" "November 2015" "" "" +.TH "NPM\-WHOAMI" "1" "January 2016" "" "" .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 f3c3df9295b345..994fedd2fbf6a7 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "November 2015" "" "" +.TH "NPM" "1" "January 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.14.12 +2.14.15 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts @@ -156,7 +156,7 @@ If you would like to contribute, but don't know what to work on, check the issues list or ask on the mailing list\. .RS 0 .IP \(bu 2 -http://github\.com/npm/npm/issues +https://github\.com/npm/npm/issues .IP \(bu 2 npm\-@googlegroups\.com @@ -167,7 +167,7 @@ When you find issues, please report them: .RS 0 .IP \(bu 2 web: -http://github\.com/npm/npm/issues +https://github\.com/npm/npm/issues .IP \(bu 2 email: npm\-@googlegroups\.com diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3 index 4ecc88c7716db3..d792c42abe0e5e 100644 --- a/deps/npm/man/man3/npm-bin.3 +++ b/deps/npm/man/man3/npm-bin.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "3" "November 2015" "" "" +.TH "NPM\-BIN" "3" "January 2016" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3 index e335380c630648..8d4f19b0db7f17 100644 --- a/deps/npm/man/man3/npm-bugs.3 +++ b/deps/npm/man/man3/npm-bugs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "3" "November 2015" "" "" +.TH "NPM\-BUGS" "3" "January 2016" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3 index 204513679c2fc9..1d44e4ffebc944 100644 --- a/deps/npm/man/man3/npm-cache.3 +++ b/deps/npm/man/man3/npm-cache.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "3" "November 2015" "" "" +.TH "NPM\-CACHE" "3" "January 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- manage the npm cache programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3 index 09c221551e5351..37a3aacb365504 100644 --- a/deps/npm/man/man3/npm-commands.3 +++ b/deps/npm/man/man3/npm-commands.3 @@ -1,4 +1,4 @@ -.TH "NPM\-COMMANDS" "3" "November 2015" "" "" +.TH "NPM\-COMMANDS" "3" "January 2016" "" "" .SH "NAME" \fBnpm-commands\fR \- npm commands .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3 index 284afac71665e8..ea7ff51aec21fe 100644 --- a/deps/npm/man/man3/npm-config.3 +++ b/deps/npm/man/man3/npm-config.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "3" "November 2015" "" "" +.TH "NPM\-CONFIG" "3" "January 2016" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3 index 7d570b41b92a41..cd564a8fd61b58 100644 --- a/deps/npm/man/man3/npm-deprecate.3 +++ b/deps/npm/man/man3/npm-deprecate.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "3" "November 2015" "" "" +.TH "NPM\-DEPRECATE" "3" "January 2016" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3 index 78c540d6cb9cbb..9e9990d55797a6 100644 --- a/deps/npm/man/man3/npm-docs.3 +++ b/deps/npm/man/man3/npm-docs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "3" "November 2015" "" "" +.TH "NPM\-DOCS" "3" "January 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3 index 0a09f8344dad7e..cd9430c30cc826 100644 --- a/deps/npm/man/man3/npm-edit.3 +++ b/deps/npm/man/man3/npm-edit.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "3" "November 2015" "" "" +.TH "NPM\-EDIT" "3" "January 2016" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3 index e3c6c65fef0146..952872c8ea06cb 100644 --- a/deps/npm/man/man3/npm-explore.3 +++ b/deps/npm/man/man3/npm-explore.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "3" "November 2015" "" "" +.TH "NPM\-EXPLORE" "3" "January 2016" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3 index 6fe5427c4ad3d8..5aaff4add16465 100644 --- a/deps/npm/man/man3/npm-help-search.3 +++ b/deps/npm/man/man3/npm-help-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "3" "November 2015" "" "" +.TH "NPM\-HELP\-SEARCH" "3" "January 2016" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search the help pages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3 index 9ab9ebe9284601..d05f873738e928 100644 --- a/deps/npm/man/man3/npm-init.3 +++ b/deps/npm/man/man3/npm-init.3 @@ -1,4 +1,4 @@ -.TH "NPM" "" "November 2015" "" "" +.TH "NPM" "" "January 2016" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3 index ef11bd432fabbd..d061b4c97a949d 100644 --- a/deps/npm/man/man3/npm-install.3 +++ b/deps/npm/man/man3/npm-install.3 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "3" "November 2015" "" "" +.TH "NPM\-INSTALL" "3" "January 2016" "" "" .SH "NAME" \fBnpm-install\fR \- install a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3 index 220fec23f04fe6..0c9b71fceb8ec8 100644 --- a/deps/npm/man/man3/npm-link.3 +++ b/deps/npm/man/man3/npm-link.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "3" "November 2015" "" "" +.TH "NPM\-LINK" "3" "January 2016" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3 index d578958d381d36..f40259b0975591 100644 --- a/deps/npm/man/man3/npm-load.3 +++ b/deps/npm/man/man3/npm-load.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LOAD" "3" "November 2015" "" "" +.TH "NPM\-LOAD" "3" "January 2016" "" "" .SH "NAME" \fBnpm-load\fR \- Load config settings .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3 index 7954a93d79cb0f..22e4e7da253403 100644 --- a/deps/npm/man/man3/npm-ls.3 +++ b/deps/npm/man/man3/npm-ls.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "3" "November 2015" "" "" +.TH "NPM\-LS" "3" "January 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3 index d9e7a6e165a5c5..774a60be43dc17 100644 --- a/deps/npm/man/man3/npm-outdated.3 +++ b/deps/npm/man/man3/npm-outdated.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "3" "November 2015" "" "" +.TH "NPM\-OUTDATED" "3" "January 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3 index 91a50d13bf48eb..10eb580eed9cb9 100644 --- a/deps/npm/man/man3/npm-owner.3 +++ b/deps/npm/man/man3/npm-owner.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "3" "November 2015" "" "" +.TH "NPM\-OWNER" "3" "January 2016" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3 index f1945fb12630bd..0dc34454a060a9 100644 --- a/deps/npm/man/man3/npm-pack.3 +++ b/deps/npm/man/man3/npm-pack.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "3" "November 2015" "" "" +.TH "NPM\-PACK" "3" "January 2016" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ping.3 b/deps/npm/man/man3/npm-ping.3 index c2b2fc65b1628e..1cfaa140b3eac3 100644 --- a/deps/npm/man/man3/npm-ping.3 +++ b/deps/npm/man/man3/npm-ping.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "3" "November 2015" "" "" +.TH "NPM\-PING" "3" "January 2016" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3 index 239e1666fb6570..9fcc683cd0bc20 100644 --- a/deps/npm/man/man3/npm-prefix.3 +++ b/deps/npm/man/man3/npm-prefix.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "3" "November 2015" "" "" +.TH "NPM\-PREFIX" "3" "January 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3 index 378ce5e4065071..4e70ea8ea39934 100644 --- a/deps/npm/man/man3/npm-prune.3 +++ b/deps/npm/man/man3/npm-prune.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "3" "November 2015" "" "" +.TH "NPM\-PRUNE" "3" "January 2016" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3 index eb28d2a66bcffe..d247ffe0ed4abe 100644 --- a/deps/npm/man/man3/npm-publish.3 +++ b/deps/npm/man/man3/npm-publish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "3" "November 2015" "" "" +.TH "NPM\-PUBLISH" "3" "January 2016" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3 index 36d806187a1d68..8fb992970b168f 100644 --- a/deps/npm/man/man3/npm-rebuild.3 +++ b/deps/npm/man/man3/npm-rebuild.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "3" "November 2015" "" "" +.TH "NPM\-REBUILD" "3" "January 2016" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3 index 16e4df2c0e7c88..d05efc117c5dcb 100644 --- a/deps/npm/man/man3/npm-repo.3 +++ b/deps/npm/man/man3/npm-repo.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "3" "November 2015" "" "" +.TH "NPM\-REPO" "3" "January 2016" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3 index 2eaa211b631e91..9a545cc2c306c5 100644 --- a/deps/npm/man/man3/npm-restart.3 +++ b/deps/npm/man/man3/npm-restart.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "3" "November 2015" "" "" +.TH "NPM\-RESTART" "3" "January 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3 index e0d01e3ab252bf..bb864d56f0e920 100644 --- a/deps/npm/man/man3/npm-root.3 +++ b/deps/npm/man/man3/npm-root.3 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "3" "November 2015" "" "" +.TH "NPM\-ROOT" "3" "January 2016" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3 index e9a53432744f01..debbd96b0b3104 100644 --- a/deps/npm/man/man3/npm-run-script.3 +++ b/deps/npm/man/man3/npm-run-script.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "3" "November 2015" "" "" +.TH "NPM\-RUN\-SCRIPT" "3" "January 2016" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3 index dd7a022dd2eebb..7a7663c9e11ef7 100644 --- a/deps/npm/man/man3/npm-search.3 +++ b/deps/npm/man/man3/npm-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "3" "November 2015" "" "" +.TH "NPM\-SEARCH" "3" "January 2016" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3 index a5656e2b2f6744..9708b5a8137ba2 100644 --- a/deps/npm/man/man3/npm-shrinkwrap.3 +++ b/deps/npm/man/man3/npm-shrinkwrap.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "3" "November 2015" "" "" +.TH "NPM\-SHRINKWRAP" "3" "January 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3 index daa7502e72a4c0..0fbae8b2022c4b 100644 --- a/deps/npm/man/man3/npm-start.3 +++ b/deps/npm/man/man3/npm-start.3 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "3" "November 2015" "" "" +.TH "NPM\-START" "3" "January 2016" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3 index d1aca3dec545bf..f391bdc608419c 100644 --- a/deps/npm/man/man3/npm-stop.3 +++ b/deps/npm/man/man3/npm-stop.3 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "3" "November 2015" "" "" +.TH "NPM\-STOP" "3" "January 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3 index dc7aaefda14afd..d6ba680f55883b 100644 --- a/deps/npm/man/man3/npm-tag.3 +++ b/deps/npm/man/man3/npm-tag.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "3" "November 2015" "" "" +.TH "NPM\-TAG" "3" "January 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3 index b2184617e2d5ba..1d29c574b98a09 100644 --- a/deps/npm/man/man3/npm-test.3 +++ b/deps/npm/man/man3/npm-test.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "3" "November 2015" "" "" +.TH "NPM\-TEST" "3" "January 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3 index c02c62d6543ef2..9854997e12c95f 100644 --- a/deps/npm/man/man3/npm-uninstall.3 +++ b/deps/npm/man/man3/npm-uninstall.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "3" "November 2015" "" "" +.TH "NPM\-UNINSTALL" "3" "January 2016" "" "" .SH "NAME" \fBnpm-uninstall\fR \- uninstall a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3 index d700a2cd8d6474..9049493fc914f0 100644 --- a/deps/npm/man/man3/npm-unpublish.3 +++ b/deps/npm/man/man3/npm-unpublish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "3" "November 2015" "" "" +.TH "NPM\-UNPUBLISH" "3" "January 2016" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3 index 0045e8facb0275..f2c846606acb93 100644 --- a/deps/npm/man/man3/npm-update.3 +++ b/deps/npm/man/man3/npm-update.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "3" "November 2015" "" "" +.TH "NPM\-UPDATE" "3" "January 2016" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS @@ -8,7 +8,7 @@ npm\.commands\.update(packages, callback) .fi .RE -.TH "DESCRIPTION" "" "November 2015" "" "" +.TH "DESCRIPTION" "" "January 2016" "" "" .SH "NAME" \fBDESCRIPTION\fR .P diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3 index 1851cb50cbc066..fa2a525eb3fb10 100644 --- a/deps/npm/man/man3/npm-version.3 +++ b/deps/npm/man/man3/npm-version.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "3" "November 2015" "" "" +.TH "NPM\-VERSION" "3" "January 2016" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3 index 11f4d925376046..dad5c6e9ad5299 100644 --- a/deps/npm/man/man3/npm-view.3 +++ b/deps/npm/man/man3/npm-view.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "3" "November 2015" "" "" +.TH "NPM\-VIEW" "3" "January 2016" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3 index 0f2e348e0b7d25..fbec6279c2cbbe 100644 --- a/deps/npm/man/man3/npm-whoami.3 +++ b/deps/npm/man/man3/npm-whoami.3 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "3" "November 2015" "" "" +.TH "NPM\-WHOAMI" "3" "January 2016" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 6d1edd1c335cc0..bfa750d91ce018 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -1,4 +1,4 @@ -.TH "NPM" "3" "November 2015" "" "" +.TH "NPM" "3" "January 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.14.12 +2.14.15 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index 3568e77646c329..f337b9b6d3ff7d 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" "November 2015" "" "" +.TH "NPM\-FOLDERS" "5" "January 2016" "" "" .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 3568e77646c329..f337b9b6d3ff7d 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" "November 2015" "" "" +.TH "NPM\-FOLDERS" "5" "January 2016" "" "" .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 d8f5583d7a99f3..a08ee531bcc3ba 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" "November 2015" "" "" +.TH "PACKAGE\.JSON" "5" "January 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -118,10 +118,10 @@ current SPDX license identifier for the license you're using, like this: .P You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. Ideally you should pick one that is -OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\. +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. .P If your package is licensed under multiple common licenses, use an SPDX license -expression syntax version 2\.0 string \fIhttp://npmjs\.com/package/spdx\fR, like this: +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: .P .RS 2 .nf @@ -884,7 +884,7 @@ npm help install .IP \(bu 2 npm help publish .IP \(bu 2 -npm help rm +npm help uninstall .RE diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index ed6ee372d33622..396504f96835f4 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "November 2015" "" "" +.TH "NPMRC" "5" "January 2016" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index d8f5583d7a99f3..a08ee531bcc3ba 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" "November 2015" "" "" +.TH "PACKAGE\.JSON" "5" "January 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -118,10 +118,10 @@ current SPDX license identifier for the license you're using, like this: .P You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. Ideally you should pick one that is -OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\. +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. .P If your package is licensed under multiple common licenses, use an SPDX license -expression syntax version 2\.0 string \fIhttp://npmjs\.com/package/spdx\fR, like this: +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: .P .RS 2 .nf @@ -884,7 +884,7 @@ npm help install .IP \(bu 2 npm help publish .IP \(bu 2 -npm help rm +npm help uninstall .RE diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index a60a42ce556572..c5831967402aba 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" "November 2015" "" "" +.TH "NPM\-CODING\-STYLE" "7" "January 2016" "" "" .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 7d6bede5d65631..fb33aeb69b2afb 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" "November 2015" "" "" +.TH "NPM\-CONFIG" "7" "January 2016" "" "" .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 703fac404cad66..77fbb0360d8669 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" "November 2015" "" "" +.TH "NPM\-DEVELOPERS" "7" "January 2016" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION @@ -114,7 +114,7 @@ create an empty \fB\|\.npmignore\fP file to override it\. Like \fBgit\fP, \fBnpm for \fB\|\.npmignore\fP and \fB\|\.gitignore\fP files in all subdirectories of your package, not only the root directory\. .P -\fB\|\.npmignore\fP files follow the same pattern rules \fIhttp://git\-scm\.com/book/en/v2/Git\-Basics\-Recording\-Changes\-to\-the\-Repository#Ignoring\-Files\fR +\fB\|\.npmignore\fP files follow the same pattern rules \fIhttps://git\-scm\.com/book/en/v2/Git\-Basics\-Recording\-Changes\-to\-the\-Repository#Ignoring\-Files\fR as \fB\|\.gitignore\fP files: .RS 0 .IP \(bu 2 @@ -239,7 +239,7 @@ and then follow the prompts\. This is documented better in npm help adduser\. .SH Publish your package .P -This part's easy\. IN the root of your folder, do this: +This part's easy\. In the root of your folder, do this: .P .RS 2 .nf diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index ae17206bcc6d12..888159cb8a7b38 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" "November 2015" "" "" +.TH "NPM\-DISPUTES" "7" "January 2016" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 21e5539578ea4e..d62ade3c7beb19 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" "November 2015" "" "" +.TH "NPM\-INDEX" "7" "January 2016" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README @@ -310,9 +310,6 @@ Developer Guide .SS npm help 7 disputes .P Handling Module Name Disputes -.SS npm help 7 faq -.P -Frequently Asked Questions .SS npm help 7 index .P Index of all npm documentation diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 503a6f35b00753..7bf5ba171e97fa 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" "November 2015" "" "" +.TH "NPM\-ORGS" "7" "January 2016" "" "" .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 3013d956234c77..b255de73f8549b 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" "November 2015" "" "" +.TH "NPM\-REGISTRY" "7" "January 2016" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION @@ -11,10 +11,10 @@ Additionally, npm's package registry implementation supports several write APIs as well, to allow for publishing packages and managing user account information\. .P -The official public npm registry is at http://registry\.npmjs\.org/\|\. It +The official public npm registry is at https://registry\.npmjs\.org/\|\. It is powered by a CouchDB database, of which there is a public mirror at -http://skimdb\.npmjs\.com/registry\|\. The code for the couchapp is -available at http://github\.com/npm/npm\-registry\-couchapp\|\. +https://skimdb\.npmjs\.com/registry\|\. The code for the couchapp is +available at https://github\.com/npm/npm\-registry\-couchapp\|\. .P The registry URL used is determined by the scope of the package (see npm help 7 \fBnpm\-scope\fP)\. If no scope is specified, the default registry is used, which is diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index deadca7ba3a212..131c18c3e6d9e5 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" "November 2015" "" "" +.TH "NPM\-SCOPE" "7" "January 2016" "" "" .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 c4a1c3b5d80ec3..ef341e6949fe4a 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" "November 2015" "" "" +.TH "NPM\-SCRIPTS" "7" "January 2016" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION @@ -195,10 +195,10 @@ For example, if your package\.json contains this: .fi .RE .P -then the \fBscripts/install\.js\fP will be called for the install, -post\-install, stages of the lifecycle, and the \fBscripts/uninstall\.js\fP -would be called when the package is uninstalled\. Since -\fBscripts/install\.js\fP is running for three different phases, it would +then \fBscripts/install\.js\fP will be called for the install +and post\-install stages of the lifecycle, and \fBscripts/uninstall\.js\fP +will be called when the package is uninstalled\. Since +\fBscripts/install\.js\fP is running for two different phases, it would be wise in this case to look at the \fBnpm_lifecycle_event\fP environment variable\. .P diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index e26cab123819cd..4bf93d54ba08fa 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" "November 2015" "" "" +.TH "NPM\-REMOVAL" "1" "January 2016" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS @@ -70,7 +70,7 @@ find /usr/local/{lib/node,bin} \-exec grep \-l npm \\{\\} \\; ; .IP \(bu 2 README .IP \(bu 2 -npm help rm +npm help uninstall .IP \(bu 2 npm help prune diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index be2e6f0779c60e..600c968297ff7c 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "November 2015" "" "" +.TH "SEMVER" "7" "January 2016" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage @@ -119,7 +119,7 @@ will append the value of the string as a prerelease identifier: .P .RS 2 .nf -> semver\.inc('1\.2\.3', 'pre', 'beta') +> semver\.inc('1\.2\.3', 'prerelease', 'beta') \|'1\.2\.4\-beta\.0' .fi .RE @@ -283,6 +283,31 @@ zero\. .IP \(bu 2 \fB^0\.x\fP := \fB>=0\.0\.0 <1\.0\.0\fP +.RE +.SS Range Grammar +.P +Putting all this together, here is a Backus\-Naur grammar for ranges, +for the benefit of parser authors: +.P +.RS 2 +.nf +range\-set ::= range ( logical\-or range ) * +logical\-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' \- ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '\.' xr ( '\.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'\-'9']['0'\-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '\-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '\.' part ) * +part ::= nr | [\-0\-9A\-Za\-z]+ +.fi .RE .SH Functions .P diff --git a/deps/npm/node_modules/fs-write-stream-atomic/.npmignore b/deps/npm/node_modules/fs-write-stream-atomic/.npmignore new file mode 100644 index 00000000000000..2f24c57c382e41 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +.nyc_output/ diff --git a/deps/npm/node_modules/fs-write-stream-atomic/.travis.yml b/deps/npm/node_modules/fs-write-stream-atomic/.travis.yml new file mode 100644 index 00000000000000..68946625271c27 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/deps/npm/node_modules/fs-write-stream-atomic/index.js b/deps/npm/node_modules/fs-write-stream-atomic/index.js index d86b8c673f23ad..949250531260ec 100644 --- a/deps/npm/node_modules/fs-write-stream-atomic/index.js +++ b/deps/npm/node_modules/fs-write-stream-atomic/index.js @@ -1,29 +1,29 @@ var fs = require('graceful-fs') var util = require('util') -var crypto = require('crypto') +var MurmurHash3 = require('imurmurhash') -function md5hex () { - var hash = crypto.createHash('md5') - for (var ii=0; ii=1.0.5 <1.1.0" } diff --git a/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js b/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js index 159c596ab0181f..2dae137a6e7859 100644 --- a/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js +++ b/deps/npm/node_modules/fs-write-stream-atomic/test/basic.js @@ -19,31 +19,33 @@ test('basic', function (t) { } var verifierCalled = 0 - function verifier (ev) { return function () { - if (ev === 'close') - t.equal(this.__emittedFinish, true) - else { - this.__emittedFinish = true - t.equal(ev, 'finish') - } + function verifier (ev) { + return function () { + if (ev === 'close') { + t.equal(this.__emittedFinish, true) + } else { + this.__emittedFinish = true + t.equal(ev, 'finish') + } - // make sure that one of the atomic streams won. - var res = fs.readFileSync(target, 'utf8') - var lines = res.trim().split(/\n/) - lines.forEach(function (line) { - var first = lines[0].match(/\d+$/)[0] - var cur = line.match(/\d+$/)[0] - t.equal(cur, first) - }) + // make sure that one of the atomic streams won. + var res = fs.readFileSync(target, 'utf8') + var lines = res.trim().split(/\n/) + lines.forEach(function (line) { + var first = lines[0].match(/\d+$/)[0] + var cur = line.match(/\d+$/)[0] + t.equal(cur, first) + }) - var resExpr = /^first write \d+\nsecond write \d+\nthird write \d+\nfinal write \d+\n$/ - t.similar(res, resExpr) + var resExpr = /^first write \d+\nsecond write \d+\nthird write \d+\nfinal write \d+\n$/ + t.similar(res, resExpr) - // should be called once for each close, and each finish - if (++verifierCalled === n * 2) { - t.end() + // should be called once for each close, and each finish + if (++verifierCalled === n * 2) { + t.end() + } } - }} + } // now write something to each stream. streams.forEach(function (stream, i) { diff --git a/deps/npm/node_modules/fs-write-stream-atomic/test/toolong.js b/deps/npm/node_modules/fs-write-stream-atomic/test/toolong.js index a1e5b714a697ad..be77f99cfeaf0e 100644 --- a/deps/npm/node_modules/fs-write-stream-atomic/test/toolong.js +++ b/deps/npm/node_modules/fs-write-stream-atomic/test/toolong.js @@ -2,7 +2,7 @@ var path = require('path') var test = require('tap').test var writeStream = require('../index.js') -function repeat(times, string) { +function repeat (times, string) { var output = '' for (var ii = 0; ii < times; ++ii) { output += string @@ -10,19 +10,25 @@ function repeat(times, string) { return output } -var target = path.resolve(__dirname, repeat(1000,'test')) +var target = path.resolve(__dirname, repeat(1000, 'test')) test('name too long', function (t) { + // 0.8 streams smh + if (process.version.indexOf('v0.8') !== -1) { + t.plan(1) + } else { + t.plan(2) + } var stream = writeStream(target) var hadError = false stream.on('error', function (er) { if (!hadError) { - t.is(er.code, 'ENAMETOOLONG', target.length + " character name results in ENAMETOOLONG") + t.is(er.code, 'ENAMETOOLONG', target.length + ' character name results in ENAMETOOLONG') hadError = true } }) stream.on('close', function () { - t.end() + t.ok(hadError, 'got error before close') }) stream.end() }) diff --git a/deps/npm/node_modules/imurmurhash/README.md b/deps/npm/node_modules/imurmurhash/README.md new file mode 100644 index 00000000000000..f35b20a0ef5bfe --- /dev/null +++ b/deps/npm/node_modules/imurmurhash/README.md @@ -0,0 +1,122 @@ +iMurmurHash.js +============== + +An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js). + +This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing. + +Installation +------------ + +To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site. + +```html + + +``` + +--- + +To use iMurmurHash in Node.js, install the module using NPM: + +```bash +npm install imurmurhash +``` + +Then simply include it in your scripts: + +```javascript +MurmurHash3 = require('imurmurhash'); +``` + +Quick Example +------------- + +```javascript +// Create the initial hash +var hashState = MurmurHash3('string'); + +// Incrementally add text +hashState.hash('more strings'); +hashState.hash('even more strings'); + +// All calls can be chained if desired +hashState.hash('and').hash('some').hash('more'); + +// Get a result +hashState.result(); +// returns 0xe4ccfe6b +``` + +Functions +--------- + +### MurmurHash3 ([string], [seed]) +Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example: + +```javascript +// Use the cached object, calling the function again will return the same +// object (but reset, so the current state would be lost) +hashState = MurmurHash3(); +... + +// Create a new object that can be safely used however you wish. Calling the +// function again will simply return a new state object, and no state loss +// will occur, at the cost of creating more objects. +hashState = new MurmurHash3(); +``` + +Both methods can be mixed however you like if you have different use cases. + +--- + +### MurmurHash3.prototype.hash (string) +Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained. + +--- + +### MurmurHash3.prototype.result () +Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`. + +```javascript +// Do the whole string at once +MurmurHash3('this is a test string').result(); +// 0x70529328 + +// Do part of the string, get a result, then the other part +var m = MurmurHash3('this is a'); +m.result(); +// 0xbfc4f834 +m.hash(' test string').result(); +// 0x70529328 (same as above) +``` + +--- + +### MurmurHash3.prototype.reset ([seed]) +Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained. + +--- + +License (MIT) +------------- +Copyright (c) 2013 Gary Court, Jens Taylor + +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/imurmurhash/imurmurhash.js b/deps/npm/node_modules/imurmurhash/imurmurhash.js new file mode 100644 index 00000000000000..05347a2536fce2 --- /dev/null +++ b/deps/npm/node_modules/imurmurhash/imurmurhash.js @@ -0,0 +1,138 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +(function(){ + var cache; + + // Call this function without `new` to use the cached object (good for + // single-threaded environments), or with `new` to create a new object. + // + // @param {string} key A UTF-16 or ASCII string + // @param {number} seed An optional positive integer + // @return {object} A MurmurHash3 object for incremental hashing + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed) + if (typeof key === 'string' && key.length > 0) { + m.hash(key); + } + + if (m !== this) { + return m; + } + }; + + // Incrementally add a string to this hash + // + // @param {string} key A UTF-16 or ASCII string + // @return {object} this + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + + len = key.length; + this.len += len; + + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; + case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; + case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; + } + + this.rem = (len + this.rem) & 3; // & 3 is same as % 4 + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + + h1 ^= k1; + h1 = (h1 << 13) | (h1 >>> 19); + h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; + + if (i >= len) { + break; + } + + k1 = ((key.charCodeAt(i++) & 0xffff)) ^ + ((key.charCodeAt(i++) & 0xffff) << 8) ^ + ((key.charCodeAt(i++) & 0xffff) << 16); + top = key.charCodeAt(i++); + k1 ^= ((top & 0xff) << 24) ^ + ((top & 0xff00) >> 8); + } + + k1 = 0; + switch (this.rem) { + case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; + case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; + case 1: k1 ^= (key.charCodeAt(i) & 0xffff); + } + + this.h1 = h1; + } + + this.k1 = k1; + return this; + }; + + // Get the result of this hash + // + // @return {number} The 32-bit hash + MurmurHash3.prototype.result = function() { + var k1, h1; + + k1 = this.k1; + h1 = this.h1; + + if (k1 > 0) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + h1 ^= k1; + } + + h1 ^= this.len; + + h1 ^= h1 >>> 16; + h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; + h1 ^= h1 >>> 13; + h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; + h1 ^= h1 >>> 16; + + return h1 >>> 0; + }; + + // Reset the hash object for reuse + // + // @param {number} seed An optional positive integer + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === 'number' ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + + // A cached object to use. This can be safely used if you're in a single- + // threaded environment, otherwise you need to create new hashes to use. + cache = new MurmurHash3(); + + if (typeof(module) != 'undefined') { + module.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } +}()); diff --git a/deps/npm/node_modules/imurmurhash/imurmurhash.min.js b/deps/npm/node_modules/imurmurhash/imurmurhash.min.js new file mode 100644 index 00000000000000..dc0ee88d6b69c9 --- /dev/null +++ b/deps/npm/node_modules/imurmurhash/imurmurhash.min.js @@ -0,0 +1,12 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/deps/npm/node_modules/imurmurhash/package.json b/deps/npm/node_modules/imurmurhash/package.json new file mode 100644 index 00000000000000..d1e69bca8cc1b8 --- /dev/null +++ b/deps/npm/node_modules/imurmurhash/package.json @@ -0,0 +1,60 @@ +{ + "name": "imurmurhash", + "version": "0.1.4", + "description": "An incremental implementation of MurmurHash3", + "homepage": "https://github.com/jensyt/imurmurhash-js", + "main": "imurmurhash.js", + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/jensyt/imurmurhash-js.git" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" + ], + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, + "readme": "iMurmurHash.js\n==============\n\nAn incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).\n\nThis version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.\n\nInstallation\n------------\n\nTo use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.\n\n```html\n\n\n```\n\n---\n\nTo use iMurmurHash in Node.js, install the module using NPM:\n\n```bash\nnpm install imurmurhash\n```\n\nThen simply include it in your scripts:\n\n```javascript\nMurmurHash3 = require('imurmurhash');\n```\n\nQuick Example\n-------------\n\n```javascript\n// Create the initial hash\nvar hashState = MurmurHash3('string');\n\n// Incrementally add text\nhashState.hash('more strings');\nhashState.hash('even more strings');\n\n// All calls can be chained if desired\nhashState.hash('and').hash('some').hash('more');\n\n// Get a result\nhashState.result();\n// returns 0xe4ccfe6b\n```\n\nFunctions\n---------\n\n### MurmurHash3 ([string], [seed])\nGet a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:\n\n```javascript\n// Use the cached object, calling the function again will return the same\n// object (but reset, so the current state would be lost)\nhashState = MurmurHash3();\n...\n\n// Create a new object that can be safely used however you wish. Calling the\n// function again will simply return a new state object, and no state loss\n// will occur, at the cost of creating more objects.\nhashState = new MurmurHash3();\n```\n\nBoth methods can be mixed however you like if you have different use cases.\n\n---\n\n### MurmurHash3.prototype.hash (string)\nIncrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.\n\n---\n\n### MurmurHash3.prototype.result ()\nGet the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```javascript\n// Do the whole string at once\nMurmurHash3('this is a test string').result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nvar m = MurmurHash3('this is a');\nm.result();\n// 0xbfc4f834\nm.hash(' test string').result();\n// 0x70529328 (same as above)\n```\n\n---\n\n### MurmurHash3.prototype.reset ([seed])\nReset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.\n\n---\n\nLicense (MIT)\n-------------\nCopyright (c) 2013 Gary Court, Jens Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "_id": "imurmurhash@0.1.4", + "dist": { + "shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "tarball": "http://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + }, + "_from": "imurmurhash@0.1.4", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "jensyt", + "email": "jensyt@gmail.com" + }, + "maintainers": [ + { + "name": "jensyt", + "email": "jensyt@gmail.com" + } + ], + "directories": {}, + "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" +} diff --git a/deps/npm/node_modules/lru-cache/README.md b/deps/npm/node_modules/lru-cache/README.md index 3fd6d0bcae478e..f804699809b9b9 100644 --- a/deps/npm/node_modules/lru-cache/README.md +++ b/deps/npm/node_modules/lru-cache/README.md @@ -7,7 +7,7 @@ A cache object that deletes the least-recently-used items. ```javascript var LRU = require("lru-cache") , options = { max: 500 - , length: function (n) { return n * 2 } + , length: function (n, key) { return n * 2 + key.length } , dispose: function (key, n) { n.close() } , maxAge: 1000 * 60 * 60 } , cache = LRU(options) @@ -16,6 +16,12 @@ var LRU = require("lru-cache") cache.set("key", "value") cache.get("key") // "value" +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + cache.reset() // empty the cache ``` @@ -35,9 +41,10 @@ away. drop it and return undefined instead of giving it to you. * `length` Function that is used to calculate the length of stored items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `max` - like-sized things. + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. They item is passed as the first argument, and + the key is passed as the second argumnet. * `dispose` Function that is called on items when they are dropped from the cache. This can be handy if you want to close file descriptors or do other cleanup tasks when items are no longer @@ -89,6 +96,12 @@ away. in the cache, in order of recent-ness. (Ie, more recently used items are iterated over first.) +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + * `keys()` Return an array of the keys in the cache. diff --git a/deps/npm/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/lru-cache/lib/lru-cache.js index 32c2d2d90be150..dccc6d59d27e15 100644 --- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js +++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js @@ -1,15 +1,8 @@ -;(function () { // closure for web browsers +module.exports = LRUCache -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') function naiveLength () { return 1 } @@ -54,17 +47,17 @@ Object.defineProperty(LRUCache.prototype, "lengthCalculator", { set : function (lC) { if (typeof lC !== "function") { this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } + this._length = this._lruList.size + this._cache.forEach(function (value, key) { + value.length = 1 + }) } else { this._lengthCalculator = lC this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } + this._cache.forEach(function (value, key) { + value.length = this._lengthCalculator(value.value, key) + this._length += value.length + }, this) } if (this._length > this._max) trim(this) @@ -78,83 +71,97 @@ Object.defineProperty(LRUCache.prototype, "length", , enumerable : true }) - Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } + { get : function () { return this._lruList.size } , enumerable : true }) -LRUCache.prototype.forEach = function (fn, thisp) { +function reverseKeys (map) { + // keys live in lruList map in insertion order. + // we want them in reverse insertion order. + // flip the list of keys. + var itemCount = map.size + var keys = new Array(itemCount) + var i = itemCount + map.forEach(function (value, key) { + keys[--i] = key + }) + + return keys +} + +LRUCache.prototype.rforEach = function (fn, thisp) { thisp = thisp || this - var i = 0 - var itemCount = this._itemCount - - for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (isStale(this, hit)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) + this._lruList.forEach(function (hit) { + forEachStep(this, fn, hit, thisp) + }, this) +} + +function forEachStep (self, fn, hit, thisp) { + if (isStale(self, hit)) { + del(self, hit) + if (!self._allowStale) { + hit = undefined } } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } } -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + + var keys = reverseKeys(this._lruList) + for (var k = 0; k < keys.length; k++) { + var hit = this._lruList.get(keys[k]) + forEachStep(this, fn, hit, thisp) } - return keys +} + +LRUCache.prototype.keys = function () { + return reverseKeys(this._lruList).map(function (k) { + return this._lruList.get(k).key + }, this) } LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values + return reverseKeys(this._lruList).map(function (k) { + return this._lruList.get(k).value + }, this) } LRUCache.prototype.reset = function () { if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } + this._cache.forEach(function (entry, key) { + this._dispose(key, entry.value) + }, this) } - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency + this._cache = new Map() // hash of items by key + this._lruList = new Map() // list of items in order of use recency this._mru = 0 // most recently used this._lru = 0 // least recently used this._length = 0 // number of items in the list - this._itemCount = 0 } LRUCache.prototype.dump = function () { var arr = [] var i = 0 - - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] + var size = this._lruList.size + return reverseKeys(this._lruList).map(function (k) { + var hit = this._lruList.get(k) if (!isStale(this, hit)) { - //Do not store staled hits - ++i - arr.push({ + return { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) - }); + } } - } - //arr has the most read first - return arr + }, this).filter(function (h) { + return h + }) } LRUCache.prototype.dumpLru = function () { @@ -163,23 +170,27 @@ LRUCache.prototype.dumpLru = function () { LRUCache.prototype.set = function (key, value, maxAge) { maxAge = maxAge || this._maxAge + var now = maxAge ? Date.now() : 0 - var len = this._lengthCalculator(value) + var len = this._lengthCalculator(value, key) - if (hOP(this._cache, key)) { + if (this._cache.has(key)) { if (len > this._max) { - del(this, this._cache[key]) + del(this, this._cache.get(key)) return false } + + var item = this._cache.get(key) + // dispose of the old one before overwriting if (this._dispose) - this._dispose(key, this._cache[key].value) + this._dispose(key, item.value) - this._cache[key].now = now - this._cache[key].maxAge = maxAge - this._cache[key].value = value - this._length += (len - this._cache[key].length) - this._cache[key].length = len + item.now = now + item.maxAge = maxAge + item.value = value + this._length += (len - item.length) + item.length = len this.get(key) if (this._length > this._max) @@ -188,7 +199,8 @@ LRUCache.prototype.set = function (key, value, maxAge) { return true } - var hit = new Entry(key, value, this._mru++, len, now, maxAge) + var hit = new Entry(key, value, this._mru, len, now, maxAge) + incMru(this) // oversized objects fall out of cache automatically. if (hit.length > this._max) { @@ -197,8 +209,8 @@ LRUCache.prototype.set = function (key, value, maxAge) { } this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ + this._cache.set(key, hit) + this._lruList.set(hit.lu, hit) if (this._length > this._max) trim(this) @@ -207,8 +219,8 @@ LRUCache.prototype.set = function (key, value, maxAge) { } LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] + if (!this._cache.has(key)) return false + var hit = this._cache.get(key) if (isStale(this, hit)) { return false } @@ -224,13 +236,13 @@ LRUCache.prototype.peek = function (key) { } LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] + var hit = this._lruList.get(this._lru) del(this, hit) return hit || null } LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) + del(this, this._cache.get(key)) } LRUCache.prototype.load = function (arr) { @@ -238,23 +250,25 @@ LRUCache.prototype.load = function (arr) { this.reset(); var now = Date.now() - //A previous serialized cache has the most recent items first - for (var l = arr.length - 1; l >= 0; l-- ) { + // A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l--) { var hit = arr[l] var expiresAt = hit.e || 0 if (expiresAt === 0) { - //the item was created without expiration in a non aged cache + // the item was created without expiration in a non aged cache this.set(hit.k, hit.v) } else { var maxAge = expiresAt - now - //dont add already expired items - if (maxAge > 0) this.set(hit.k, hit.v, maxAge) + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } } } } function get (self, key, doUse) { - var hit = self._cache[key] + var hit = self._cache.get(key) if (hit) { if (isStale(self, hit)) { del(self, hit) @@ -281,26 +295,35 @@ function isStale(self, hit) { function use (self, hit) { shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit + hit.lu = self._mru + incMru(self) + self._lruList.set(hit.lu, hit) } function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) + if (self._length > self._max) { + var keys = reverseKeys(self._lruList) + for (var k = keys.length - 1; self._length > self._max; k--) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + self._lru = keys[k - 1] + del(self, self._lruList.get(keys[k])) + } + } } function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ + self._lruList.delete(hit.lu) + if (hit.lu === self._lru) + self._lru = reverseKeys(self._lruList).pop() } function del (self, hit) { if (hit) { if (self._dispose) self._dispose(hit.key, hit.value) self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] + self._cache.delete(hit.key) shiftLU(self, hit) } } @@ -315,4 +338,19 @@ function Entry (key, value, lu, length, now, maxAge) { if (maxAge) this.maxAge = maxAge } -})() + +// Incrementers and decrementers that loop at MAX_SAFE_INTEGER +// only relevant for the lu, lru, and mru counters, since they +// get touched a lot and can get very large. Also, since they +// only go upwards, and the sets will tend to be much smaller than +// the max, we can very well assume that a very small number comes +// after a very large number, rather than before it. +var maxSafeInt = Number.MAX_SAFE_INTEGER || 9007199254740991 +function intInc (number) { + return (number === maxSafeInt) ? 0 : number + 1 +} +function incMru (self) { + do { + self._mru = intInc(self._mru) + } while (self._lruList.has(self._mru)) +} diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/README.md b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/README.md new file mode 100644 index 00000000000000..778bf01dfaaf9f --- /dev/null +++ b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/map.js b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/map.js new file mode 100644 index 00000000000000..c0ad39c029718f --- /dev/null +++ b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/map.js @@ -0,0 +1,122 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map + return +} + +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/package.json b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/package.json new file mode 100644 index 00000000000000..a0161aca345563 --- /dev/null +++ b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/package.json @@ -0,0 +1,35 @@ +{ + "name": "pseudomap", + "version": "1.0.1", + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "main": "map.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "homepage": "https://github.com/isaacs/pseudomap#readme", + "readme": "# pseudomap\n\nA thing that is a lot like ES6 `Map`, but without iterators, for use\nin environments where `for..of` syntax and `Map` are not available.\n\nIf you need iterators, or just in general a more faithful polyfill to\nES6 Maps, check out [es6-map](http://npm.im/es6-map).\n\nIf you are in an environment where `Map` is supported, then that will\nbe returned instead, unless `process.env.TEST_PSEUDOMAP` is set.\n\nYou can use any value as keys, and any value as data. Setting again\nwith the identical key will overwrite the previous value.\n\nInternally, data is stored on an `Object.create(null)` style object.\nThe key is coerced to a string to generate the key on the internal\ndata-bag object. The original key used is stored along with the data.\n\nIn the event of a stringified-key collision, a new key is generated by\nappending an increasing number to the stringified-key until finding\neither the intended key or an empty spot.\n\nNote that because object traversal order of plain objects is not\nguaranteed to be identical to insertion order, the insertion order\nguarantee of `Map.prototype.forEach` is not guaranteed in this\nimplementation. However, in all versions of Node.js and V8 where this\nmodule works, `forEach` does traverse data in insertion order.\n\n## API\n\nMost of the [Map\nAPI](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map),\nwith the following exceptions:\n\n1. A `Map` object is not an iterator.\n2. `values`, `keys`, and `entries` methods are not implemented,\n because they return iterators.\n3. The argument to the constructor can be an Array of `[key, value]`\n pairs, or a `Map` or `PseudoMap` object. But, since iterators\n aren't used, passing any plain-old iterator won't initialize the\n map properly.\n\n## USAGE\n\nUse just like a regular ES6 Map.\n\n```javascript\nvar PseudoMap = require('pseudomap')\n\n// optionally provide a pseudomap, or an array of [key,value] pairs\n// as the argument to initialize the map with\nvar myMap = new PseudoMap()\n\nmyMap.set(1, 'number 1')\nmyMap.set('1', 'string 1')\nvar akey = {}\nvar bkey = {}\nmyMap.set(akey, { some: 'data' })\nmyMap.set(bkey, { some: 'other data' })\n```\n", + "readmeFilename": "README.md", + "_id": "pseudomap@1.0.1", + "_shasum": "29b4e7f37bbbf3e3c9b9152981c40f33d56b2b28", + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.1.tgz", + "_from": "pseudomap@>=1.0.1 <2.0.0" +} diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/test/basic.js b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/test/basic.js new file mode 100644 index 00000000000000..4378e4541e9a14 --- /dev/null +++ b/deps/npm/node_modules/lru-cache/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index 5a9d76a1d5f455..04e14d44bbdbbc 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "2.7.0", + "version": "3.2.0", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -24,35 +24,17 @@ "weak": "" }, "license": "ISC", - "gitHead": "fc6ee93093f4e463e5946736d4c48adc013724d1", + "dependencies": { + "pseudomap": "^1.0.1" + }, + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n, key) { return n * 2 + key.length }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\n// non-string keys ARE fully supported\nvar someObject = {}\ncache.set(someObject, 'a value')\ncache.set('[object Object]', 'a different value')\nassert.equal(cache.get(someObject), 'a value')\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n, key){return n.length}`. The default is\n `function(){return 1}`, which is fine if you want to store `max`\n like-sized things. They item is passed as the first argument, and\n the key is passed as the second argumnet.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `max` is optional and overrides the\n cache `max` option if provided.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `rforEach(function(value,key,cache), [thisp])`\n\n The same as `cache.forEach(...)` but items are iterated over in\n reverse order. (ie, less recently used items are iterated over\n first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length()`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/node-lru-cache/issues" }, "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "_id": "lru-cache@2.7.0", - "_shasum": "aaa376a4cd970f9cebf5ec1909566ec034f07ee6", - "_from": "lru-cache@2.7.0", - "_npmVersion": "3.3.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "aaa376a4cd970f9cebf5ec1909566ec034f07ee6", - "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.0.tgz", - "readme": "ERROR: No README data found!" + "_id": "lru-cache@3.2.0", + "_shasum": "71789b3b7f5399bec8565dda38aa30d2a097efee", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "_from": "lru-cache@>=3.2.0 <3.3.0" } diff --git a/deps/npm/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/lru-cache/test/basic.js index b47225f109891f..02000a79593c31 100644 --- a/deps/npm/node_modules/lru-cache/test/basic.js +++ b/deps/npm/node_modules/lru-cache/test/basic.js @@ -96,12 +96,15 @@ test("reset", function (t) { test("basic with weighed length", function (t) { var cache = new LRU({ max: 100, - length: function (item) { return item.size } + length: function (item, key) { + t.isa(key, 'string') + return item.size + } }) cache.set("key", {val: "value", size: 50}) t.equal(cache.get("key").val, "value") t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) + t.equal(cache.lengthCalculator(cache.get("key"), 'key'), 50) t.equal(cache.length, 50) t.equal(cache.max, 100) t.end() @@ -229,7 +232,7 @@ test("drop the old items", function(t) { }, 155) }) -test("individual item can have it's own maxAge", function(t) { +test("individual item can have its own maxAge", function(t) { var cache = new LRU({ max: 5, maxAge: 50 @@ -242,7 +245,7 @@ test("individual item can have it's own maxAge", function(t) { }, 25) }) -test("individual item can have it's own maxAge > cache's", function(t) { +test("individual item can have its own maxAge > cache's", function(t) { var cache = new LRU({ max: 5, maxAge: 20 @@ -394,3 +397,31 @@ test("pop the least used item", function (t) { t.end() }) + +test("get and set only accepts strings and numbers as keys", function(t) { + var cache = new LRU() + + cache.set("key", "value") + cache.set(123, 456) + + t.equal(cache.get("key"), "value") + t.equal(cache.get(123), 456) + + t.end() +}) + +test("peek with wierd keys", function(t) { + var cache = new LRU() + + cache.set("key", "value") + cache.set(123, 456) + + t.equal(cache.peek("key"), "value") + t.equal(cache.peek(123), 456) + + t.equal(cache.peek({ + toString: function() { return "key" } + }), undefined) + + t.end() +}) diff --git a/deps/npm/node_modules/lru-cache/test/foreach.js b/deps/npm/node_modules/lru-cache/test/foreach.js index 4190417cbc61d8..d037d41c33af16 100644 --- a/deps/npm/node_modules/lru-cache/test/foreach.js +++ b/deps/npm/node_modules/lru-cache/test/foreach.js @@ -4,13 +4,13 @@ var LRU = require('../') test('forEach', function (t) { var l = new LRU(5) for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) + l.set(i, i.toString(2)) } var i = 9 l.forEach(function (val, key, cache) { t.equal(cache, l) - t.equal(key, i.toString()) + t.equal(key, i) t.equal(val, i.toString(2)) i -= 1 }) @@ -25,10 +25,20 @@ test('forEach', function (t) { l.forEach(function (val, key, cache) { var j = order[i ++] t.equal(cache, l) - t.equal(key, j.toString()) + t.equal(key, j) t.equal(val, j.toString(2)) }) - t.equal(i, order.length); + t.equal(i, order.length) + + i = 0 + order.reverse() + l.rforEach(function (val, key, cache) { + var j = order[i ++] + t.equal(cache, l) + t.equal(key, j) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length) t.end() }) @@ -36,17 +46,17 @@ test('forEach', function (t) { test('keys() and values()', function (t) { var l = new LRU(5) for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) + l.set(i, i.toString(2)) } - t.similar(l.keys(), ['9', '8', '7', '6', '5']) + t.similar(l.keys(), [9, 8, 7, 6, 5]) t.similar(l.values(), ['1001', '1000', '111', '110', '101']) // get in order of most recently used l.get(6) l.get(8) - t.similar(l.keys(), ['8', '6', '9', '7', '5']) + t.similar(l.keys(), [8, 6, 9, 7, 5]) t.similar(l.values(), ['1000', '110', '1001', '111', '101']) t.end() diff --git a/deps/npm/node_modules/lru-cache/test/overflow.js b/deps/npm/node_modules/lru-cache/test/overflow.js new file mode 100644 index 00000000000000..238af699b0a0c0 --- /dev/null +++ b/deps/npm/node_modules/lru-cache/test/overflow.js @@ -0,0 +1,45 @@ +var LRU = require('../') +var t = require('tap') + +var c = new LRU(5) + +// now the hacksy bitses +c._mru = Number.MAX_SAFE_INTEGER - 10 + +function test (c) { + t.test('mru=' + c._mru + ', lru=' + c._lru, function (t) { + t.equal(c.length, 5) + t.equal(c._cache.get(0), undefined) + t.equal(c._cache.get(1).value, 1) + t.equal(c._cache.get(2).value, 2) + t.equal(c._cache.get(3).value, 3) + t.equal(c._cache.get(4).value, 4) + t.equal(c._cache.get(5).value, 5) + t.ok(c._mru < Number.MAX_SAFE_INTEGER, 'did not overflow') + t.end() + }) +} + +for (var i = 0; i < 6; i++) { + c.set(i, i) +} + +test(c) + +for (var i = 0; i < 6; i++) { + c.set(i, i) +} + +test(c) + +for (var i = 0; i < 6; i++) { + c.set(i, i) +} + +test(c) + +for (var i = 0; i < 6; i++) { + c.set(i, i) +} + +test(c) diff --git a/deps/npm/node_modules/lru-cache/test/serialize.js b/deps/npm/node_modules/lru-cache/test/serialize.js index 5fe5dc3d371f1e..b87eb5d0b0383d 100644 --- a/deps/npm/node_modules/lru-cache/test/serialize.js +++ b/deps/npm/node_modules/lru-cache/test/serialize.js @@ -13,6 +13,14 @@ test('dump', function (t) { { k: "a", v: "A", e: 0 } ]) + cache.set(123, 456) + t.deepEqual(cache.dump(), [ + { k: 123, v: 456, e: 0 }, + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 }, + ]) + cache.del(123) + cache.set("a", "A"); t.deepEqual(cache.dump(), [ { k: "a", v: "A", e: 0 }, @@ -88,6 +96,7 @@ test("load basic cache", function(t) { cache.set("a", "A") cache.set("b", "B") + cache.set(123, 456) copy.load(cache.dump()) t.deepEquals(cache.dump(), copy.dump()) diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md index 4c8cc367814497..a0193adf0c74bd 100644 --- a/deps/npm/node_modules/node-gyp/CHANGELOG.md +++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md @@ -1,3 +1,13 @@ +v3.1.0 2015-11-14 + +* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks) +* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich) +* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich) +* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781) +* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797) +* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745) +* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738) + v3.0.3 2015-09-14 * [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729) diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/node-gyp/README.md index 779dc6adc2713b..dec739f16fde99 100644 --- a/deps/npm/node_modules/node-gyp/README.md +++ b/deps/npm/node_modules/node-gyp/README.md @@ -38,11 +38,11 @@ You will also need to install: * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org) * On Mac OS X: * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X) - * [Xcode](https://developer.apple.com/xcode/downloads/) + * [Xcode](https://developer.apple.com/xcode/download/) * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` * This step will install `gcc` and the related toolchain containing `make` * On Windows: - * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is __*not*__ supported) + * Python ([`v2.7.10`][python-v2.7.10] recommended, `v3.x.x` is __*not*__ supported) * Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder * Windows XP/Vista/7: * Microsoft Visual Studio C++ 2013 ([Express][msvc2013] version works well) @@ -50,6 +50,14 @@ You will also need to install: * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1] * Windows 7/8: * Microsoft Visual Studio C++ 2013 for Windows Desktop ([Express][msvc2013] version works well) + * Windows 10: + * Install the latest version of npm (3.3.6 at the time of writing) + * Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path + * Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation) + * Set the environment variable GYP_MSVS_VERSION=2015 + * Run the command prompt as Administrator + * $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env + * If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough * All Windows Versions * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk] * You may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK: @@ -136,9 +144,9 @@ A barebones `gyp` file appropriate for building a node addon looks like: Some additional resources for addons and writing `gyp` files: * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative) - * ["Hello World" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world) - * [gyp user documentation](https://chromium.googlesource.com/external/gyp/+/master/docs/UserDocumentation.md) - * [gyp input format reference](https://chromium.googlesource.com/external/gyp/+/master/docs/InputFormatReference.md) + * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world) + * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md) + * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md) * [*"binding.gyp" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild) @@ -185,8 +193,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -[windows-python]: http://www.python.org/getit/windows -[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download -[msvc2013]: http://www.microsoft.com/en-gb/download/details.aspx?id=44914 -[win7sdk]: http://www.microsoft.com/en-us/download/details.aspx?id=8279 -[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422 +[python-v2.7.10]: https://www.python.org/downloads/release/python-2710/ +[msvc2013]: https://www.microsoft.com/en-gb/download/details.aspx?id=44914 +[win7sdk]: https://www.microsoft.com/en-us/download/details.aspx?id=8279 +[compiler update for the Windows SDK 7.1]: https://www.microsoft.com/en-us/download/details.aspx?id=4422 diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 510b00c713f55c..3372bfa521f623 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -65,6 +65,11 @@ 'DYLIB_INSTALL_NAME_BASE': '@rpath' }, }], + [ 'OS=="aix"', { + 'ldflags': [ + '-Wl,-bimport:<(node_exp_file)' + ], + }], [ 'OS=="win"', { 'libraries': [ '-lkernel32.lib', diff --git a/deps/npm/node_modules/node-gyp/gyp/AUTHORS b/deps/npm/node_modules/node-gyp/gyp/AUTHORS index 9389ca0a23e48f..fecf84a1c4d72a 100644 --- a/deps/npm/node_modules/node-gyp/gyp/AUTHORS +++ b/deps/npm/node_modules/node-gyp/gyp/AUTHORS @@ -9,3 +9,4 @@ Steven Knight Ryan Norton David J. Sankel Eric N. Vander Weele +Tom Freudenberg diff --git a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py b/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py index abec27b3e33120..dde025383c3276 100644 --- a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +++ b/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py @@ -125,15 +125,13 @@ def CheckChangeOnCommit(input_api, output_api): TRYBOTS = [ - 'gyp-win32', - 'gyp-win64', - 'gyp-linux', - 'gyp-mac', - 'gyp-android' + 'linux_try', + 'mac_try', + 'win_try', ] def GetPreferredTryMasters(_, change): return { - 'tryserver.nacl': { t: set(['defaulttests']) for t in TRYBOTS }, + 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, } diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py b/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py index f46ab1822fe321..9a2b71f1b355cf 100755 --- a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +++ b/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py @@ -3,27 +3,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - """Argument-less script to select what to run on the buildbots.""" - -import filecmp import os import shutil import subprocess import sys -if sys.platform in ['win32', 'cygwin']: - EXE_SUFFIX = '.exe' -else: - EXE_SUFFIX = '' - - BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__)) TRUNK_DIR = os.path.dirname(BUILDBOT_DIR) ROOT_DIR = os.path.dirname(TRUNK_DIR) -ANDROID_DIR = os.path.join(ROOT_DIR, 'android') CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake') CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin') OUT_DIR = os.path.join(TRUNK_DIR, 'out') @@ -71,95 +61,6 @@ def PrepareCmake(): CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR) -_ANDROID_SETUP = 'source build/envsetup.sh && lunch full-eng' - - -def PrepareAndroidTree(): - """Prepare an Android tree to run 'android' format tests.""" - if os.environ['BUILDBOT_CLOBBER'] == '1': - print '@@@BUILD_STEP Clobber Android checkout@@@' - shutil.rmtree(ANDROID_DIR) - - # (Re)create the directory so that the following steps will succeed. - if not os.path.isdir(ANDROID_DIR): - os.mkdir(ANDROID_DIR) - - # We use a manifest from the gyp project listing pinned revisions of AOSP to - # use, to ensure that we test against a stable target. This needs to be - # updated to pick up new build system changes sometimes, so we must test if - # it has changed. - manifest_filename = 'aosp_manifest.xml' - gyp_manifest = os.path.join(BUILDBOT_DIR, manifest_filename) - android_manifest = os.path.join(ANDROID_DIR, '.repo', 'manifests', - manifest_filename) - manifest_is_current = (os.path.isfile(android_manifest) and - filecmp.cmp(gyp_manifest, android_manifest)) - if not manifest_is_current: - # It's safe to repeat these steps, so just do them again to make sure we are - # in a good state. - print '@@@BUILD_STEP Initialize Android checkout@@@' - CallSubProcess( - ['repo', 'init', - '-u', 'https://android.googlesource.com/platform/manifest', - '-b', 'master', - '-g', 'all,-notdefault,-device,-darwin,-mips,-x86'], - cwd=ANDROID_DIR) - shutil.copy(gyp_manifest, android_manifest) - - print '@@@BUILD_STEP Sync Android@@@' - CallSubProcess(['repo', 'sync', '-j4', '-m', manifest_filename], - cwd=ANDROID_DIR) - - # If we already built the system image successfully and didn't sync to a new - # version of the source, skip running the build again as it's expensive even - # when there's nothing to do. - system_img = os.path.join(ANDROID_DIR, 'out', 'target', 'product', 'generic', - 'system.img') - if manifest_is_current and os.path.isfile(system_img): - return - - print '@@@BUILD_STEP Build Android@@@' - CallSubProcess( - ['/bin/bash', - '-c', '%s && make -j4' % _ANDROID_SETUP], - cwd=ANDROID_DIR) - - -def StartAndroidEmulator(): - """Start an android emulator from the built android tree.""" - print '@@@BUILD_STEP Start Android emulator@@@' - - CallSubProcess(['/bin/bash', '-c', - '%s && adb kill-server ' % _ANDROID_SETUP], - cwd=ANDROID_DIR) - - # If taskset is available, use it to force adbd to run only on one core, as, - # sadly, it improves its reliability (see crbug.com/268450). - adbd_wrapper = '' - with open(os.devnull, 'w') as devnull_fd: - if subprocess.call(['which', 'taskset'], stdout=devnull_fd) == 0: - adbd_wrapper = 'taskset -c 0' - CallSubProcess(['/bin/bash', '-c', - '%s && %s adb start-server ' % (_ANDROID_SETUP, adbd_wrapper)], - cwd=ANDROID_DIR) - - subprocess.Popen( - ['/bin/bash', '-c', - '%s && emulator -no-window' % _ANDROID_SETUP], - cwd=ANDROID_DIR) - CallSubProcess( - ['/bin/bash', '-c', - '%s && adb wait-for-device' % _ANDROID_SETUP], - cwd=ANDROID_DIR) - - -def StopAndroidEmulator(): - """Stop all android emulators.""" - print '@@@BUILD_STEP Stop Android emulator@@@' - # If this fails, it's because there is no emulator running. - subprocess.call(['pkill', 'emulator.*']) - - def GypTestFormat(title, format=None, msvs_version=None, tests=[]): """Run the gyp tests for a given format, emitting annotator tags. @@ -185,15 +86,7 @@ def GypTestFormat(title, format=None, msvs_version=None, tests=[]): '--format', format, '--path', CMAKE_BIN_DIR, '--chdir', 'gyp'] + tests) - if format == 'android': - # gyptest needs the environment setup from envsetup/lunch in order to build - # using the 'android' backend, so this is done in a single shell. - retcode = subprocess.call( - ['/bin/bash', - '-c', '%s && cd %s && %s' % (_ANDROID_SETUP, ROOT_DIR, command)], - cwd=ANDROID_DIR, env=env) - else: - retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True) + retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True) if retcode: # Emit failure tag, and keep going. print '@@@STEP_FAILURE@@@' @@ -209,15 +102,7 @@ def GypBuild(): print 'Done.' retcode = 0 - # The Android gyp bot runs on linux so this must be tested first. - if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-android': - PrepareAndroidTree() - StartAndroidEmulator() - try: - retcode += GypTestFormat('android') - finally: - StopAndroidEmulator() - elif sys.platform.startswith('linux'): + if sys.platform.startswith('linux'): retcode += GypTestFormat('ninja') retcode += GypTestFormat('make') PrepareCmake() diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json b/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json index bbf20e394f3bb6..656c21e54fb12f 100644 --- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json +++ b/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json @@ -3,7 +3,6 @@ "launched": { "tryserver.nacl": { "gyp-presubmit": ["defaulttests"], - "gyp-android": ["defaulttests"], "gyp-linux": ["defaulttests"], "gyp-mac": ["defaulttests"], "gyp-win32": ["defaulttests"], diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py b/deps/npm/node_modules/node-gyp/gyp/gyp_main.py index 4ec872f0f95aa3..25a6eba94aae7d 100755 --- a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py +++ b/deps/npm/node_modules/node-gyp/gyp/gyp_main.py @@ -4,15 +4,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import os import sys -# TODO(mark): sys.path manipulation is some temporary testing stuff. -try: - import gyp -except ImportError, e: - import os.path - sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) - import gyp +# Make sure we're using the version of pylib in this repo, not one installed +# elsewhere on the system. +sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) +import gyp if __name__ == '__main__': sys.exit(gyp.script_main()) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py index dde0e07092b167..4985756bdde76a 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py @@ -708,10 +708,7 @@ def _ValidateSettings(validators, settings, stderr): _MSBuildOnly(_compile, 'BuildingInIDE', _boolean) _MSBuildOnly(_compile, 'CompileAsManaged', _Enumeration([], new=['false', - 'true', # /clr - 'Pure', # /clr:pure - 'Safe', # /clr:safe - 'OldSyntax'])) # /clr:oldSyntax + 'true'])) # /clr _MSBuildOnly(_compile, 'CreateHotpatchableImage', _boolean) # /hotpatch _MSBuildOnly(_compile, 'MultiProcessorCompilation', _boolean) # /MP _MSBuildOnly(_compile, 'PreprocessOutputPath', _string) # /Fi diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py index d24dcac4d5e13e..bf6ea6b802ff91 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py @@ -296,7 +296,7 @@ def testValidateMSBuildSettings_settings(self): 'BuildingInIDE': 'true', 'CallingConvention': 'Cdecl', 'CompileAs': 'CompileAsC', - 'CompileAsManaged': 'Pure', + 'CompileAsManaged': 'true', 'CreateHotpatchableImage': 'true', 'DebugInformationFormat': 'ProgramDatabase', 'DisableLanguageExtensions': 'true', diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py index 92e583fd6e27c7..d9bfa684fa30c2 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py @@ -84,10 +84,11 @@ def SetupScript(self, target_arch): # vcvars32, which it can only find if VS??COMNTOOLS is set, which it # isn't always. if target_arch == 'x86': - if self.short_name == '2013' and ( + if self.short_name >= '2013' and self.short_name[-1] != 'e' and ( os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'): - # VS2013 non-Express has a x64-x86 cross that we want to prefer. + # VS2013 and later, non-Express have a x64-x86 cross that we want + # to prefer. return [os.path.normpath( os.path.join(self.path, 'VC/vcvarsall.bat')), 'amd64_x86'] # Otherwise, the standard x86 compiler. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py index ac6d918b849922..668f38b60d0093 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py @@ -49,7 +49,7 @@ def FindBuildFiles(): def Load(build_files, format, default_variables={}, includes=[], depth='.', params=None, check=False, - circular_check=True): + circular_check=True, duplicate_basename_check=True): """ Loads one or more specified build files. default_variables and includes will be copied before use. @@ -126,6 +126,7 @@ def Load(build_files, format, default_variables={}, # Process the input specific to this generator. result = gyp.input.Load(build_files, default_variables, includes[:], depth, generator_input_info, check, circular_check, + duplicate_basename_check, params['parallel'], params['root_targets']) return [generator] + result @@ -324,6 +325,16 @@ def gyp_main(args): parser.add_option('--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 + # in a static_library/shared_library project. Visual C++ 2008 generator + # doesn't support this configuration. Libtool on Mac also generates warnings + # 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', + 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, help='Disable multiprocessing') parser.add_option('-S', '--suffix', dest='suffix', default='', @@ -499,7 +510,8 @@ def gyp_main(args): # Start with the default variables from the command line. [generator, flat_list, targets, data] = Load( build_files, format, cmdline_default_variables, includes, options.depth, - params, options.check, options.circular_check) + params, options.check, options.circular_check, + options.duplicate_basename_check) # TODO(mark): Pass |data| for now because the generator needs a list of # build files that came in. In the future, maybe it should just accept diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py index b6875e43efcbc4..256e3f3a6b2400 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py @@ -131,13 +131,20 @@ def QualifiedTarget(build_file, target, toolset): @memoize -def RelativePath(path, relative_to): +def RelativePath(path, relative_to, follow_path_symlink=True): # Assuming both |path| and |relative_to| are relative to the current # directory, returns a relative path that identifies path relative to # relative_to. + # If |follow_symlink_path| is true (default) and |path| is a symlink, then + # this method returns a path to the real file represented by |path|. If it is + # false, this method returns a path to the symlink. If |path| is not a + # symlink, this option has no effect. # Convert to normalized (and therefore absolute paths). - path = os.path.realpath(path) + if follow_path_symlink: + path = os.path.realpath(path) + else: + path = os.path.abspath(path) relative_to = os.path.realpath(relative_to) # On Windows, we can't create a relative path to a different drive, so just @@ -418,6 +425,8 @@ def GetFlavor(params): return 'freebsd' if sys.platform.startswith('openbsd'): return 'openbsd' + if sys.platform.startswith('netbsd'): + return 'netbsd' if sys.platform.startswith('aix'): return 'aix' diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py index 15b80ef973793c..921c1a6b714328 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py @@ -7,23 +7,59 @@ the generator flag config_path) the path of a json file that dictates the files and targets to search for. The following keys are supported: files: list of paths (relative) of the files to search for. -targets: list of targets to search for. The target names are unqualified. +test_targets: unqualified target names to search for. Any target in this list +that depends upon a file in |files| is output regardless of the type of target +or chain of dependencies. +additional_compile_targets: Unqualified targets to search for in addition to +test_targets. Targets in the combined list that depend upon a file in |files| +are not necessarily output. For example, if the target is of type none then the +target is not output (but one of the descendants of the target will be). The following is output: error: only supplied if there is an error. -targets: the set of targets passed in via targets that either directly or - indirectly depend upon the set of paths supplied in files. -build_targets: minimal set of targets that directly depend on the changed - files and need to be built. The expectation is this set of targets is passed - into a build step. +compile_targets: minimal set of targets that directly or indirectly (for + targets of type none) depend on the files in |files| and is one of the + supplied targets or a target that one of the supplied targets depends on. + The expectation is this set of targets is passed into a build step. This list + always contains the output of test_targets as well. +test_targets: set of targets from the supplied |test_targets| that either + directly or indirectly depend upon a file in |files|. This list if useful + if additional processing needs to be done for certain targets after the + build, such as running tests. status: outputs one of three values: none of the supplied files were found, one of the include files changed so that it should be assumed everything - changed (in this case targets and build_targets are not output) or at + changed (in this case test_targets and compile_targets are not output) or at least one file was found. -invalid_targets: list of supplied targets thare were not found. +invalid_targets: list of supplied targets that were not found. + +Example: +Consider a graph like the following: + A D + / \ +B C +A depends upon both B and C, A is of type none and B and C are executables. +D is an executable, has no dependencies and nothing depends on it. +If |additional_compile_targets| = ["A"], |test_targets| = ["B", "C"] and +files = ["b.cc", "d.cc"] (B depends upon b.cc and D depends upon d.cc), then +the following is output: +|compile_targets| = ["B"] B must built as it depends upon the changed file b.cc +and the supplied target A depends upon it. A is not output as a build_target +as it is of type none with no rules and actions. +|test_targets| = ["B"] B directly depends upon the change file b.cc. + +Even though the file d.cc, which D depends upon, has changed D is not output +as it was not supplied by way of |additional_compile_targets| or |test_targets|. If the generator flag analyzer_output_path is specified, output is written there. Otherwise output is written to stdout. + +In Gyp the "all" target is shorthand for the root targets in the files passed +to gyp. For example, if file "a.gyp" contains targets "a1" and +"a2", and file "b.gyp" contains targets "b1" and "b2" and "a2" has a dependency +on "b2" and gyp is supplied "a.gyp" then "all" consists of "a1" and "a2". +Notice that "b1" and "b2" are not in the "all" target as "b.gyp" was not +directly supplied to gyp. OTOH if both "a.gyp" and "b.gyp" are supplied to gyp +then the "all" target includes "b1" and "b2". """ import gyp.common @@ -183,7 +219,10 @@ class Target(object): added_to_compile_targets: used when determining if the target was added to the set of targets that needs to be built. in_roots: true if this target is a descendant of one of the root nodes. - is_executable: true if the type of target is executable.""" + is_executable: true if the type of target is executable. + is_static_library: true if the type of target is static_library. + is_or_has_linked_ancestor: true if the target does a link (eg executable), or + if there is a target in back_deps that does a link.""" def __init__(self, name): self.deps = set() self.match_status = MATCH_STATUS_TBD @@ -196,6 +235,8 @@ def __init__(self, name): self.added_to_compile_targets = False self.in_roots = False self.is_executable = False + self.is_static_library = False + self.is_or_has_linked_ancestor = False class Config(object): @@ -205,6 +246,8 @@ class Config(object): def __init__(self): self.files = [] self.targets = set() + self.additional_compile_target_names = set() + self.test_target_names = set() def Init(self, params): """Initializes Config. This is a separate method as it raises an exception @@ -224,7 +267,9 @@ def Init(self, params): if not isinstance(config, dict): raise Exception('config_path must be a JSON file containing a dictionary') self.files = config.get('files', []) - self.targets = set(config.get('targets', [])) + self.additional_compile_target_names = set( + config.get('additional_compile_targets', [])) + self.test_target_names = set(config.get('test_targets', [])) def _WasBuildFileModified(build_file, data, files, toplevel_dir): @@ -266,8 +311,8 @@ def _GetOrCreateTargetByName(targets, target_name): def _DoesTargetTypeRequireBuild(target_dict): """Returns true if the target type is such that it needs to be built.""" # If a 'none' target has rules or actions we assume it requires a build. - return target_dict['type'] != 'none' or \ - target_dict.get('actions') or target_dict.get('rules') + return bool(target_dict['type'] != 'none' or + target_dict.get('actions') or target_dict.get('rules')) def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, @@ -275,12 +320,13 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, """Returns a tuple of the following: . A dictionary mapping from fully qualified name to Target. . A list of the targets that have a source file in |files|. - . Set of root Targets reachable from the the files |build_files|. + . Targets that constitute the 'all' target. See description at top of file + for details on the 'all' target. This sets the |match_status| of the targets that contain any of the source files in |files| to MATCH_STATUS_MATCHES. |toplevel_dir| is the root of the source tree.""" # Maps from target name to Target. - targets = {} + name_to_target = {} # Targets that matched. matching_targets = [] @@ -300,7 +346,8 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, while len(targets_to_visit) > 0: target_name = targets_to_visit.pop() - created_target, target = _GetOrCreateTargetByName(targets, target_name) + created_target, target = _GetOrCreateTargetByName(name_to_target, + target_name) if created_target: roots.add(target) elif target.visited: @@ -309,7 +356,11 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, target.visited = True target.requires_build = _DoesTargetTypeRequireBuild( target_dicts[target_name]) - target.is_executable = target_dicts[target_name]['type'] == 'executable' + target_type = target_dicts[target_name]['type'] + target.is_executable = target_type == 'executable' + target.is_static_library = target_type == 'static_library' + target.is_or_has_linked_ancestor = (target_type == 'executable' or + target_type == 'shared_library') build_file = gyp.common.ParseQualifiedTarget(target_name)[0] if not build_file in build_file_in_files: @@ -329,7 +380,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, sources = _ExtractSources(target_name, target_dicts[target_name], toplevel_dir) for source in sources: - if source in files: + if _ToGypPath(os.path.normpath(source)) in files: print 'target', target_name, 'matches', source target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) @@ -339,22 +390,25 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, for dep in target_dicts[target_name].get('dependencies', []): targets_to_visit.append(dep) - created_dep_target, dep_target = _GetOrCreateTargetByName(targets, dep) + created_dep_target, dep_target = _GetOrCreateTargetByName(name_to_target, + dep) if not created_dep_target: roots.discard(dep_target) target.deps.add(dep_target) dep_target.back_deps.add(target) - return targets, matching_targets, roots & build_file_targets + return name_to_target, matching_targets, roots & build_file_targets def _GetUnqualifiedToTargetMapping(all_targets, to_find): - """Returns a mapping (dictionary) from unqualified name to Target for all the - Targets in |to_find|.""" + """Returns a tuple of the following: + . mapping (dictionary) from unqualified name to Target for all the + Targets in |to_find|. + . any target names not found. If this is empty all targets were found.""" result = {} if not to_find: - return result + return {}, [] to_find = set(to_find) for target_name in all_targets.keys(): extracted = gyp.common.ParseQualifiedTarget(target_name) @@ -362,13 +416,14 @@ def _GetUnqualifiedToTargetMapping(all_targets, to_find): to_find.remove(extracted[1]) result[extracted[1]] = all_targets[target_name] if not to_find: - return result - return result + return result, [] + return result, [x for x in to_find] -def _DoesTargetDependOn(target): - """Returns true if |target| or any of its dependencies matches the supplied - set of paths. This updates |matches| of the Targets as it recurses. +def _DoesTargetDependOnMatchingTargets(target): + """Returns true if |target| or any of its dependencies is one of the + targets containing the files supplied as input to analyzer. This updates + |matches| of the Targets as it recurses. target: the Target to look for.""" if target.match_status == MATCH_STATUS_DOESNT_MATCH: return False @@ -376,25 +431,28 @@ def _DoesTargetDependOn(target): target.match_status == MATCH_STATUS_MATCHES_BY_DEPENDENCY: return True for dep in target.deps: - if _DoesTargetDependOn(dep): + if _DoesTargetDependOnMatchingTargets(dep): target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY + print '\t', target.name, 'matches by dep', dep.name return True target.match_status = MATCH_STATUS_DOESNT_MATCH return False -def _GetTargetsDependingOn(possible_targets): +def _GetTargetsDependingOnMatchingTargets(possible_targets): """Returns the list of Targets in |possible_targets| that depend (either - directly on indirectly) on the matched targets. + directly on indirectly) on at least one of the targets containing the files + supplied as input to analyzer. possible_targets: targets to search from.""" found = [] + print 'Targets that matched by dependency:' for target in possible_targets: - if _DoesTargetDependOn(target): + if _DoesTargetDependOnMatchingTargets(target): found.append(target) return found -def _AddBuildTargets(target, roots, add_if_no_ancestor, result): +def _AddCompileTargets(target, roots, add_if_no_ancestor, result): """Recurses through all targets that depend on |target|, adding all targets that need to be built (and are in |roots|) to |result|. roots: set of root targets. @@ -405,31 +463,45 @@ def _AddBuildTargets(target, roots, add_if_no_ancestor, result): return target.visited = True - target.in_roots = not target.back_deps and target in roots + target.in_roots = target in roots for back_dep_target in target.back_deps: - _AddBuildTargets(back_dep_target, roots, False, result) + _AddCompileTargets(back_dep_target, roots, False, result) target.added_to_compile_targets |= back_dep_target.added_to_compile_targets target.in_roots |= back_dep_target.in_roots + target.is_or_has_linked_ancestor |= ( + back_dep_target.is_or_has_linked_ancestor) # Always add 'executable' targets. Even though they may be built by other # targets that depend upon them it makes detection of what is going to be # built easier. + # And always add static_libraries that have no dependencies on them from + # linkables. This is necessary as the other dependencies on them may be + # static libraries themselves, which are not compile time dependencies. if target.in_roots and \ (target.is_executable or (not target.added_to_compile_targets and - (add_if_no_ancestor or target.requires_build))): + (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 result.add(target) target.added_to_compile_targets = True -def _GetBuildTargets(matching_targets, roots): +def _GetCompileTargets(matching_targets, supplied_targets): """Returns the set of Targets that require a build. matching_targets: targets that changed and need to be built. - roots: set of root targets in the build files to search from.""" + supplied_targets: set of targets supplied to analyzer to search from.""" result = set() for target in matching_targets: - _AddBuildTargets(target, roots, True, result) + print 'finding compile targets for match', target.name + _AddCompileTargets(target, supplied_targets, True, result) return result @@ -454,6 +526,16 @@ def _WriteOutput(params, **values): print 'Targets that require a build:' for target in values['build_targets']: print '\t', target + if 'compile_targets' in values: + values['compile_targets'].sort() + print 'Targets that need to be built:' + for target in values['compile_targets']: + print '\t', target + if 'test_targets' in values: + values['test_targets'].sort() + print 'Test targets:' + for target in values['test_targets']: + print '\t', target output_path = params.get('generator_flags', {}).get( 'analyzer_output_path', None) @@ -473,7 +555,7 @@ def _WasGypIncludeFileModified(params, files): files.""" if params['options'].includes: for include in params['options'].includes: - if _ToGypPath(include) in files: + if _ToGypPath(os.path.normpath(include)) in files: print 'Include file modified, assuming all changed', include return True return False @@ -513,11 +595,104 @@ def CalculateVariables(default_variables, params): default_variables.setdefault('OS', operating_system) +class TargetCalculator(object): + """Calculates the matching test_targets and matching compile_targets.""" + def __init__(self, files, additional_compile_target_names, test_target_names, + data, target_list, target_dicts, toplevel_dir, build_files): + self._additional_compile_target_names = set(additional_compile_target_names) + self._test_target_names = set(test_target_names) + self._name_to_target, self._changed_targets, self._root_targets = ( + _GenerateTargets(data, target_list, target_dicts, toplevel_dir, + frozenset(files), build_files)) + self._unqualified_mapping, self.invalid_targets = ( + _GetUnqualifiedToTargetMapping(self._name_to_target, + self._supplied_target_names_no_all())) + + def _supplied_target_names(self): + return self._additional_compile_target_names | self._test_target_names + + def _supplied_target_names_no_all(self): + """Returns the supplied test targets without 'all'.""" + result = self._supplied_target_names(); + result.discard('all') + return result + + def is_build_impacted(self): + """Returns true if the supplied files impact the build at all.""" + return self._changed_targets + + def find_matching_test_target_names(self): + """Returns the set of output test targets.""" + assert self.is_build_impacted() + # Find the test targets first. 'all' is special cased to mean all the + # root targets. To deal with all the supplied |test_targets| are expanded + # to include the root targets during lookup. If any of the root targets + # match, we remove it and replace it with 'all'. + test_target_names_no_all = set(self._test_target_names) + test_target_names_no_all.discard('all') + test_targets_no_all = _LookupTargets(test_target_names_no_all, + self._unqualified_mapping) + test_target_names_contains_all = 'all' in self._test_target_names + if test_target_names_contains_all: + test_targets = [x for x in (set(test_targets_no_all) | + set(self._root_targets))] + else: + test_targets = [x for x in test_targets_no_all] + print 'supplied test_targets' + for target_name in self._test_target_names: + print '\t', target_name + print 'found test_targets' + for target in 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) & + set(self._root_targets)) + if matching_test_targets_contains_all: + # Remove any of the targets for all that were not explicitly supplied, + # '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' + for target in matching_test_targets: + 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' + return matching_target_names + + def find_matching_compile_target_names(self): + """Returns the set of output compile targets.""" + assert self.is_build_impacted(); + # Compile targets are found by searching up from changed targets. + # Reset the visited status for _GetBuildTargets. + for target in self._name_to_target.itervalues(): + target.visited = False + + supplied_targets = _LookupTargets(self._supplied_target_names_no_all(), + self._unqualified_mapping) + 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' + for target in supplied_targets: + print '\t', target.name + print 'Finding compile targets' + compile_targets = _GetCompileTargets(self._changed_targets, + supplied_targets) + return [gyp.common.ParseQualifiedTarget(target.name)[1] + for target in compile_targets] + + def GenerateOutput(target_list, target_dicts, data, params): """Called by gyp as the final stage. Outputs results.""" config = Config() try: config.Init(params) + if not config.files: raise Exception('Must specify files to analyze via config_path generator ' 'flag') @@ -528,41 +703,38 @@ def GenerateOutput(target_list, target_dicts, data, params): if _WasGypIncludeFileModified(params, config.files): result_dict = { 'status': all_changed_string, - 'targets': list(config.targets) } + 'test_targets': list(config.test_target_names), + 'compile_targets': list( + config.additional_compile_target_names | + config.test_target_names) } _WriteOutput(params, **result_dict) return - all_targets, matching_targets, roots = _GenerateTargets( - data, target_list, target_dicts, toplevel_dir, frozenset(config.files), - params['build_files']) - - unqualified_mapping = _GetUnqualifiedToTargetMapping(all_targets, - config.targets) - invalid_targets = None - if len(unqualified_mapping) != len(config.targets): - invalid_targets = _NamesNotIn(config.targets, unqualified_mapping) - - if matching_targets: - search_targets = _LookupTargets(config.targets, unqualified_mapping) - matched_search_targets = _GetTargetsDependingOn(search_targets) - # Reset the visited status for _GetBuildTargets. - for target in all_targets.itervalues(): - target.visited = False - build_targets = _GetBuildTargets(matching_targets, roots) - matched_search_targets = [gyp.common.ParseQualifiedTarget(target.name)[1] - for target in matched_search_targets] - build_targets = [gyp.common.ParseQualifiedTarget(target.name)[1] - for target in build_targets] - else: - matched_search_targets = [] - build_targets = [] - - result_dict = { 'targets': matched_search_targets, - 'status': found_dependency_string if matching_targets else - no_dependency_string, - 'build_targets': build_targets} - if invalid_targets: - result_dict['invalid_targets'] = invalid_targets + calculator = TargetCalculator(config.files, + config.additional_compile_target_names, + config.test_target_names, data, + target_list, target_dicts, toplevel_dir, + params['build_files']) + if not calculator.is_build_impacted(): + result_dict = { 'status': no_dependency_string, + 'test_targets': [], + 'compile_targets': [] } + if calculator.invalid_targets: + result_dict['invalid_targets'] = calculator.invalid_targets + _WriteOutput(params, **result_dict) + return + + test_target_names = calculator.find_matching_test_target_names() + compile_target_names = calculator.find_matching_compile_target_names() + found_at_least_one_target = compile_target_names or test_target_names + result_dict = { 'test_targets': test_target_names, + 'status': found_dependency_string if + found_at_least_one_target else no_dependency_string, + 'compile_targets': list( + set(compile_target_names) | + set(test_target_names)) } + if calculator.invalid_targets: + result_dict['invalid_targets'] = calculator.invalid_targets _WriteOutput(params, **result_dict) except Exception as e: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py index 8f5feddee1cb35..17f5e6396c6303 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py @@ -55,7 +55,7 @@ 'CONFIGURATION_NAME': '${configuration}', } -FULL_PATH_VARS = ('${CMAKE_SOURCE_DIR}', '${builddir}', '${obj}') +FULL_PATH_VARS = ('${CMAKE_CURRENT_LIST_DIR}', '${builddir}', '${obj}') generator_supports_multiple_toolsets = True generator_wants_static_library_dependencies_adjusted = True @@ -103,7 +103,7 @@ def NormjoinPathForceCMakeSource(base_path, rel_path): if any([rel_path.startswith(var) for var in FULL_PATH_VARS]): return rel_path # TODO: do we need to check base_path for absolute variables as well? - return os.path.join('${CMAKE_SOURCE_DIR}', + return os.path.join('${CMAKE_CURRENT_LIST_DIR}', os.path.normpath(os.path.join(base_path, rel_path))) @@ -150,20 +150,17 @@ def SetFileProperty(output, source_name, property_name, values, sep): output.write('")\n') -def SetFilesProperty(output, source_names, property_name, values, sep): +def SetFilesProperty(output, variable, property_name, values, sep): """Given a set of source files, sets the given property on them.""" - output.write('set_source_files_properties(\n') - for source_name in source_names: - output.write(' ') - output.write(source_name) - output.write('\n') - output.write(' PROPERTIES\n ') + output.write('set_source_files_properties(') + WriteVariable(output, variable) + output.write(' PROPERTIES ') output.write(property_name) output.write(' "') for value in values: output.write(CMakeStringEscape(value)) output.write(sep) - output.write('"\n)\n') + output.write('")\n') def SetTargetProperty(output, target_name, property_name, values, sep=''): @@ -236,11 +233,11 @@ def StringToCMakeTargetName(a): """Converts the given string 'a' to a valid CMake target name. All invalid characters are replaced by '_'. - Invalid for cmake: ' ', '/', '(', ')' + Invalid for cmake: ' ', '/', '(', ')', '"' Invalid for make: ':' Invalid for unknown reasons but cause failures: '.' """ - return a.translate(string.maketrans(' /():.', '______')) + return a.translate(string.maketrans(' /():."', '_______')) def WriteActions(target_name, actions, extra_sources, extra_deps, @@ -296,7 +293,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps, WriteVariable(output, inputs_name) output.write('\n') - output.write(' WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/') + output.write(' WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/') output.write(path_to_gyp) output.write('\n') @@ -401,9 +398,9 @@ def WriteRules(target_name, rules, extra_sources, extra_deps, output.write(NormjoinPath(path_to_gyp, rule_source)) output.write('\n') - # CMAKE_SOURCE_DIR is where the CMakeLists.txt lives. + # CMAKE_CURRENT_LIST_DIR is where the CMakeLists.txt lives. # The cwd is the current build directory. - output.write(' WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/') + output.write(' WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/') output.write(path_to_gyp) output.write('\n') @@ -488,7 +485,7 @@ def __init__(self, ext, command): copy = file_copy if os.path.basename(src) else dir_copy - copy.cmake_inputs.append(NormjoinPath(path_to_gyp, src)) + copy.cmake_inputs.append(NormjoinPathForceCMakeSource(path_to_gyp, src)) copy.cmake_outputs.append(NormjoinPathForceCMakeSource(path_to_gyp, dst)) copy.gyp_inputs.append(src) copy.gyp_outputs.append(dst) @@ -525,7 +522,7 @@ def __init__(self, ext, command): WriteVariable(output, copy.inputs_name, ' ') output.write('\n') - output.write('WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/') + output.write('WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/') output.write(path_to_gyp) output.write('\n') @@ -640,6 +637,12 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, target_type = spec.get('type', '') target_toolset = spec.get('toolset') + cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type) + if cmake_target_type is None: + print ('Target %s has unknown target type %s, skipping.' % + ( target_name, target_type ) ) + return + SetVariable(output, 'TARGET', target_name) SetVariable(output, 'TOOLSET', target_toolset) @@ -667,27 +670,89 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, srcs = spec.get('sources', []) # Gyp separates the sheep from the goats based on file extensions. - def partition(l, p): - return reduce(lambda x, e: x[not p(e)].append(e) or x, l, ([], [])) - compilable_srcs, other_srcs = partition(srcs, Compilable) + # A full separation is done here because of flag handing (see below). + s_sources = [] + c_sources = [] + cxx_sources = [] + linkable_sources = [] + other_sources = [] + for src in srcs: + _, ext = os.path.splitext(src) + src_type = COMPILABLE_EXTENSIONS.get(ext, None) + src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src); - # CMake gets upset when executable targets provide no sources. - if target_type == 'executable' and not compilable_srcs and not extra_sources: - print ('Executable %s has no complilable sources, treating as "none".' % - target_name ) - target_type = 'none' + if src_type == 's': + s_sources.append(src_norm_path) + elif src_type == 'cc': + c_sources.append(src_norm_path) + elif src_type == 'cxx': + cxx_sources.append(src_norm_path) + elif Linkable(ext): + linkable_sources.append(src_norm_path) + else: + other_sources.append(src_norm_path) - cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type) - if cmake_target_type is None: - print ('Target %s has unknown target type %s, skipping.' % - ( target_name, target_type ) ) - return + for extra_source in extra_sources: + src, real_source = extra_source + _, ext = os.path.splitext(real_source) + src_type = COMPILABLE_EXTENSIONS.get(ext, None) + + if src_type == 's': + s_sources.append(src) + elif src_type == 'cc': + c_sources.append(src) + elif src_type == 'cxx': + cxx_sources.append(src) + elif Linkable(ext): + linkable_sources.append(src) + else: + other_sources.append(src) + + s_sources_name = None + if s_sources: + s_sources_name = cmake_target_name + '__asm_srcs' + SetVariableList(output, s_sources_name, s_sources) + + c_sources_name = None + if c_sources: + c_sources_name = cmake_target_name + '__c_srcs' + SetVariableList(output, c_sources_name, c_sources) + + cxx_sources_name = None + if cxx_sources: + cxx_sources_name = cmake_target_name + '__cxx_srcs' + SetVariableList(output, cxx_sources_name, cxx_sources) + + linkable_sources_name = None + if linkable_sources: + linkable_sources_name = cmake_target_name + '__linkable_srcs' + SetVariableList(output, linkable_sources_name, linkable_sources) + + other_sources_name = None + if other_sources: + other_sources_name = cmake_target_name + '__other_srcs' + SetVariableList(output, other_sources_name, other_sources) + + # CMake gets upset when executable targets provide no sources. + # http://www.cmake.org/pipermail/cmake/2010-July/038461.html + dummy_sources_name = None + has_sources = (s_sources_name or + c_sources_name or + cxx_sources_name or + linkable_sources_name or + other_sources_name) + if target_type == 'executable' and not has_sources: + dummy_sources_name = cmake_target_name + '__dummy_srcs' + SetVariable(output, dummy_sources_name, + "${obj}.${TOOLSET}/${TARGET}/genc/dummy.c") + output.write('if(NOT EXISTS "') + WriteVariable(output, dummy_sources_name) + output.write('")\n') + output.write(' file(WRITE "') + WriteVariable(output, dummy_sources_name) + output.write('" "")\n') + output.write("endif()\n") - other_srcs_name = None - if other_srcs: - other_srcs_name = cmake_target_name + '__other_srcs' - SetVariableList(output, other_srcs_name, - [NormjoinPath(path_from_cmakelists_to_gyp, src) for src in other_srcs]) # CMake is opposed to setting linker directories and considers the practice # of setting linker directories dangerous. Instead, it favors the use of @@ -713,31 +778,48 @@ def partition(l, p): output.write(' ') output.write(cmake_target_type.modifier) - if other_srcs_name: - WriteVariable(output, other_srcs_name, ' ') - - output.write('\n') - - for src in compilable_srcs: - output.write(' ') - output.write(NormjoinPath(path_from_cmakelists_to_gyp, src)) - output.write('\n') - for extra_source in extra_sources: - output.write(' ') - src, _ = extra_source - output.write(NormjoinPath(path_from_cmakelists_to_gyp, src)) - output.write('\n') + if s_sources_name: + WriteVariable(output, s_sources_name, ' ') + if c_sources_name: + WriteVariable(output, c_sources_name, ' ') + if cxx_sources_name: + WriteVariable(output, cxx_sources_name, ' ') + if linkable_sources_name: + WriteVariable(output, linkable_sources_name, ' ') + if other_sources_name: + WriteVariable(output, other_sources_name, ' ') + if dummy_sources_name: + WriteVariable(output, dummy_sources_name, ' ') output.write(')\n') + # Let CMake know if the 'all' target should depend on this target. + exclude_from_all = ('TRUE' if qualified_target not in all_qualified_targets + else 'FALSE') + SetTargetProperty(output, cmake_target_name, + 'EXCLUDE_FROM_ALL', exclude_from_all) + for extra_target_name in extra_deps: + SetTargetProperty(output, extra_target_name, + 'EXCLUDE_FROM_ALL', exclude_from_all) + # Output name and location. if target_type != 'none': + # Link as 'C' if there are no other files + if not c_sources and not cxx_sources: + SetTargetProperty(output, cmake_target_name, 'LINKER_LANGUAGE', ['C']) + # Mark uncompiled sources as uncompiled. - if other_srcs_name: + if other_sources_name: output.write('set_source_files_properties(') - WriteVariable(output, other_srcs_name, '') + WriteVariable(output, other_sources_name, '') output.write(' PROPERTIES HEADER_FILE_ONLY "TRUE")\n') + # Mark object sources as linkable. + if linkable_sources_name: + output.write('set_source_files_properties(') + WriteVariable(output, other_sources_name, '') + output.write(' PROPERTIES EXTERNAL_OBJECT "TRUE")\n') + # Output directory target_output_directory = spec.get('product_dir') if target_output_directory is None: @@ -804,122 +886,84 @@ def partition(l, p): cmake_target_output_basename) SetFileProperty(output, cmake_target_output, 'GENERATED', ['TRUE'], '') - # Let CMake know if the 'all' target should depend on this target. - exclude_from_all = ('TRUE' if qualified_target not in all_qualified_targets - else 'FALSE') - SetTargetProperty(output, cmake_target_name, - 'EXCLUDE_FROM_ALL', exclude_from_all) - for extra_target_name in extra_deps: - SetTargetProperty(output, extra_target_name, - 'EXCLUDE_FROM_ALL', exclude_from_all) - - # Includes - includes = config.get('include_dirs') - if includes: - # This (target include directories) is what requires CMake 2.8.8 - includes_name = cmake_target_name + '__include_dirs' - SetVariableList(output, includes_name, - [NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, include) - for include in includes]) - output.write('set_property(TARGET ') - output.write(cmake_target_name) - output.write(' APPEND PROPERTY INCLUDE_DIRECTORIES ') - WriteVariable(output, includes_name, '') - output.write(')\n') - - # Defines - defines = config.get('defines') - if defines is not None: - SetTargetProperty(output, - cmake_target_name, - 'COMPILE_DEFINITIONS', - defines, - ';') - - # Compile Flags - http://www.cmake.org/Bug/view.php?id=6493 - # CMake currently does not have target C and CXX flags. - # So, instead of doing... - - # cflags_c = config.get('cflags_c') - # if cflags_c is not None: - # SetTargetProperty(output, cmake_target_name, - # 'C_COMPILE_FLAGS', cflags_c, ' ') - - # cflags_cc = config.get('cflags_cc') - # if cflags_cc is not None: - # SetTargetProperty(output, cmake_target_name, - # 'CXX_COMPILE_FLAGS', cflags_cc, ' ') - - # Instead we must... - s_sources = [] - c_sources = [] - cxx_sources = [] - for src in srcs: - _, ext = os.path.splitext(src) - src_type = COMPILABLE_EXTENSIONS.get(ext, None) - - if src_type == 's': - s_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - if src_type == 'cc': - c_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - if src_type == 'cxx': - cxx_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - for extra_source in extra_sources: - src, real_source = extra_source - _, ext = os.path.splitext(real_source) - src_type = COMPILABLE_EXTENSIONS.get(ext, None) - - if src_type == 's': - s_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - if src_type == 'cc': - c_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - if src_type == 'cxx': - cxx_sources.append(NormjoinPath(path_from_cmakelists_to_gyp, src)) - - cflags = config.get('cflags', []) - cflags_c = config.get('cflags_c', []) - cflags_cxx = config.get('cflags_cc', []) - if c_sources and not (s_sources or cxx_sources): - flags = [] - flags.extend(cflags) - flags.extend(cflags_c) - SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ') - - elif cxx_sources and not (s_sources or c_sources): - flags = [] - flags.extend(cflags) - flags.extend(cflags_cxx) - SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ') - - else: - if s_sources and cflags: - SetFilesProperty(output, s_sources, 'COMPILE_FLAGS', cflags, ' ') + # Includes + includes = config.get('include_dirs') + if includes: + # This (target include directories) is what requires CMake 2.8.8 + includes_name = cmake_target_name + '__include_dirs' + SetVariableList(output, includes_name, + [NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, include) + for include in includes]) + output.write('set_property(TARGET ') + output.write(cmake_target_name) + output.write(' APPEND PROPERTY INCLUDE_DIRECTORIES ') + WriteVariable(output, includes_name, '') + output.write(')\n') - if c_sources and (cflags or cflags_c): + # Defines + defines = config.get('defines') + if defines is not None: + SetTargetProperty(output, + cmake_target_name, + 'COMPILE_DEFINITIONS', + defines, + ';') + + # Compile Flags - http://www.cmake.org/Bug/view.php?id=6493 + # CMake currently does not have target C and CXX flags. + # So, instead of doing... + + # cflags_c = config.get('cflags_c') + # if cflags_c is not None: + # SetTargetProperty(output, cmake_target_name, + # 'C_COMPILE_FLAGS', cflags_c, ' ') + + # cflags_cc = config.get('cflags_cc') + # if cflags_cc is not None: + # SetTargetProperty(output, cmake_target_name, + # 'CXX_COMPILE_FLAGS', cflags_cc, ' ') + + # Instead we must... + cflags = config.get('cflags', []) + cflags_c = config.get('cflags_c', []) + cflags_cxx = config.get('cflags_cc', []) + if (not cflags_c or not c_sources) and (not cflags_cxx or not cxx_sources): + SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', cflags, ' ') + + elif c_sources and not (s_sources or cxx_sources): flags = [] flags.extend(cflags) flags.extend(cflags_c) - SetFilesProperty(output, c_sources, 'COMPILE_FLAGS', flags, ' ') + SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ') - if cxx_sources and (cflags or cflags_cxx): + elif cxx_sources and not (s_sources or c_sources): flags = [] flags.extend(cflags) flags.extend(cflags_cxx) - SetFilesProperty(output, cxx_sources, 'COMPILE_FLAGS', flags, ' ') + SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ') - # Have assembly link as c if there are no other files - if not c_sources and not cxx_sources and s_sources: - SetTargetProperty(output, cmake_target_name, 'LINKER_LANGUAGE', ['C']) - - # Linker flags - ldflags = config.get('ldflags') - if ldflags is not None: - SetTargetProperty(output, cmake_target_name, 'LINK_FLAGS', ldflags, ' ') + else: + # TODO: This is broken, one cannot generally set properties on files, + # as other targets may require different properties on the same files. + if s_sources and cflags: + SetFilesProperty(output, s_sources_name, 'COMPILE_FLAGS', cflags, ' ') + + if c_sources and (cflags or cflags_c): + flags = [] + flags.extend(cflags) + flags.extend(cflags_c) + SetFilesProperty(output, c_sources_name, 'COMPILE_FLAGS', flags, ' ') + + if cxx_sources and (cflags or cflags_cxx): + flags = [] + flags.extend(cflags) + flags.extend(cflags_cxx) + SetFilesProperty(output, cxx_sources_name, 'COMPILE_FLAGS', flags, ' ') + + # Linker flags + ldflags = config.get('ldflags') + if ldflags is not None: + SetTargetProperty(output, cmake_target_name, 'LINK_FLAGS', ldflags, ' ') # Note on Dependencies and Libraries: # CMake wants to handle link order, resolving the link line up front. @@ -1040,20 +1084,49 @@ def GenerateOutputForConfig(target_list, target_dicts, data, output.write('cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n') output.write('cmake_policy(VERSION 2.8.8)\n') - _, project_target, _ = gyp.common.ParseQualifiedTarget(target_list[-1]) + gyp_file, project_target, _ = gyp.common.ParseQualifiedTarget(target_list[-1]) output.write('project(') output.write(project_target) output.write(')\n') SetVariable(output, 'configuration', config_to_use) + ar = None + cc = None + cxx = None + + make_global_settings = data[gyp_file].get('make_global_settings', []) + build_to_top = gyp.common.InvertRelativePath(build_dir, + options.toplevel_dir) + for key, value in make_global_settings: + if key == 'AR': + ar = os.path.join(build_to_top, value) + if key == 'CC': + cc = os.path.join(build_to_top, value) + if key == 'CXX': + cxx = os.path.join(build_to_top, value) + + ar = gyp.common.GetEnvironFallback(['AR_target', 'AR'], ar) + cc = gyp.common.GetEnvironFallback(['CC_target', 'CC'], cc) + cxx = gyp.common.GetEnvironFallback(['CXX_target', 'CXX'], cxx) + + if ar: + SetVariable(output, 'CMAKE_AR', ar) + if cc: + SetVariable(output, 'CMAKE_C_COMPILER', cc) + if cxx: + SetVariable(output, 'CMAKE_CXX_COMPILER', cxx) + # The following appears to be as-yet undocumented. # http://public.kitware.com/Bug/view.php?id=8392 output.write('enable_language(ASM)\n') # ASM-ATT does not support .S files. # output.write('enable_language(ASM-ATT)\n') - SetVariable(output, 'builddir', '${CMAKE_BINARY_DIR}') + if cc: + SetVariable(output, 'CMAKE_ASM_COMPILER', cc) + + SetVariable(output, 'builddir', '${CMAKE_CURRENT_BINARY_DIR}') SetVariable(output, 'obj', '${builddir}/obj') output.write('\n') @@ -1066,6 +1139,11 @@ def GenerateOutputForConfig(target_list, target_dicts, data, output.write('set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)\n') output.write('\n') + # Force ninja to use rsp files. Otherwise link and ar lines can get too long, + # resulting in 'Argument list too long' errors. + output.write('set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1)\n') + output.write('\n') + namer = CMakeNamer(target_list) # The list of targets upon which the 'all' target should depend. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py index 927ba6ebad771c..160eafe2efeca0 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py @@ -14,6 +14,9 @@ generator_wants_static_library_dependencies_adjusted = False +generator_filelist_paths = { +} + generator_default_variables = { } for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR', @@ -56,6 +59,17 @@ def CalculateGeneratorInputInfo(params): global generator_wants_static_library_dependencies_adjusted generator_wants_static_library_dependencies_adjusted = True + toplevel = params['options'].toplevel_dir + generator_dir = os.path.relpath(params['options'].generator_output or '.') + # output_dir: relative path from generator_dir to the build directory. + output_dir = generator_flags.get('output_dir', 'out') + qualified_out_dir = os.path.normpath(os.path.join( + toplevel, generator_dir, output_dir, 'gypfiles')) + global generator_filelist_paths + generator_filelist_paths = { + 'toplevel': toplevel, + 'qualified_out_dir': qualified_out_dir, + } def GenerateOutput(target_list, target_dicts, data, params): # Map of target -> list of targets it depends on. @@ -74,7 +88,11 @@ def GenerateOutput(target_list, target_dicts, data, params): edges[target].append(dep) targets_to_visit.append(dep) - filename = 'dump.json' + try: + filepath = params['generator_flags']['output_dir'] + except KeyError: + filepath = '.' + filename = os.path.join(filepath, 'dump.json') f = open(filename, 'w') json.dump(edges, f) f.close() diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py index 06c7fdc2e84ce8..aefdac787c2408 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py @@ -211,10 +211,10 @@ def CalculateGeneratorInputInfo(params): LINK_COMMANDS_AIX = """\ quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) +cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) +cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) quiet_cmd_link = LINK($(TOOLSET)) $@ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) @@ -273,9 +273,9 @@ def CalculateGeneratorInputInfo(params): %(make_global_settings)s CC.target ?= %(CC.target)s -CFLAGS.target ?= $(CFLAGS) +CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS) CXX.target ?= %(CXX.target)s -CXXFLAGS.target ?= $(CXXFLAGS) +CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS) LINK.target ?= %(LINK.target)s LDFLAGS.target ?= $(LDFLAGS) AR.target ?= $(AR) @@ -286,9 +286,9 @@ def CalculateGeneratorInputInfo(params): # TODO(evan): move all cross-compilation logic to gyp-time so we don't need # to replicate this environment fallback in make as well. CC.host ?= %(CC.host)s -CFLAGS.host ?= +CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host) CXX.host ?= %(CXX.host)s -CXXFLAGS.host ?= +CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host) LINK.host ?= %(LINK.host)s LDFLAGS.host ?= AR.host ?= %(AR.host)s @@ -365,7 +365,7 @@ def CalculateGeneratorInputInfo(params): quiet_cmd_copy = COPY $@ # send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = rm -rf "$@" && cp -af "$<" "$@" +cmd_copy = rm -rf "$@" && cp %(copy_archive_args)s "$<" "$@" %(link_commands)s """ @@ -1019,7 +1019,8 @@ def WriteRules(self, rules, extra_sources, extra_outputs, # accidentally writing duplicate dummy rules for those outputs. self.WriteLn('%s: obj := $(abs_obj)' % outputs[0]) self.WriteLn('%s: builddir := $(abs_builddir)' % outputs[0]) - self.WriteMakeRule(outputs, inputs + ['FORCE_DO_CMD'], actions) + self.WriteMakeRule(outputs, inputs, actions, + command="%s_%d" % (name, count)) # Spaces in rule filenames are not supported, but rule variables have # spaces in them (e.g. RULE_INPUT_PATH expands to '$(abspath $<)'). # The spaces within the variables are valid, so remove the variables @@ -1578,7 +1579,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps, for link_dep in link_deps: assert ' ' not in link_dep, ( "Spaces in alink input filenames not supported (%s)" % link_dep) - if (self.flavor not in ('mac', 'openbsd', 'win') and not + if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not self.is_standalone_static_library): self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin', part_of_all, postbuilds=postbuilds) @@ -1688,6 +1689,7 @@ def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None, self.WriteMakeRule(outputs, inputs, actions = ['$(call do_cmd,%s%s)' % (command, suffix)], comment = comment, + command = command, force = True) # Add our outputs to the list of targets we read depfiles from. # all_deps is only used for deps file reading, and for deps files we replace @@ -1698,7 +1700,7 @@ def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None, def WriteMakeRule(self, outputs, inputs, actions=None, comment=None, - order_only=False, force=False, phony=False): + order_only=False, force=False, phony=False, command=None): """Write a Makefile rule, with some extra tricks. outputs: a list of outputs for the rule (note: this is not directly @@ -1711,6 +1713,7 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None, force: if true, include FORCE_DO_CMD as an order-only dep phony: if true, the rule does not actually generate the named output, the output is just a name to run the rule + command: (optional) command name to generate unambiguous labels """ outputs = map(QuoteSpaces, outputs) inputs = map(QuoteSpaces, inputs) @@ -1719,44 +1722,38 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None, self.WriteLn('# ' + comment) if phony: self.WriteLn('.PHONY: ' + ' '.join(outputs)) - # TODO(evanm): just make order_only a list of deps instead of these hacks. - if order_only: - order_insert = '| ' - pick_output = ' '.join(outputs) - else: - order_insert = '' - pick_output = outputs[0] - if force: - force_append = ' FORCE_DO_CMD' - else: - force_append = '' if actions: self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0]) - self.WriteLn('%s: %s%s%s' % (pick_output, order_insert, ' '.join(inputs), - force_append)) + force_append = ' FORCE_DO_CMD' if force else '' + + if order_only: + # Order only rule: Just write a simple rule. + # TODO(evanm): just make order_only a list of deps instead of this hack. + self.WriteLn('%s: | %s%s' % + (' '.join(outputs), ' '.join(inputs), force_append)) + elif len(outputs) == 1: + # Regular rule, one output: Just write a simple rule. + self.WriteLn('%s: %s%s' % (outputs[0], ' '.join(inputs), force_append)) + else: + # Regular rule, more than one output: Multiple outputs are tricky in + # make. We will write three rules: + # - All outputs depend on an intermediate file. + # - Make .INTERMEDIATE depend on the intermediate. + # - The intermediate file depends on the inputs and executes the + # actual command. + # - The intermediate recipe will 'touch' the intermediate file. + # - The multi-output rule will have an do-nothing recipe. + intermediate = "%s.intermediate" % (command if command else self.target) + self.WriteLn('%s: %s' % (' '.join(outputs), intermediate)) + self.WriteLn('\t%s' % '@:'); + self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate)) + self.WriteLn('%s: %s%s' % + (intermediate, ' '.join(inputs), force_append)) + actions.insert(0, '$(call do_cmd,touch)') + if actions: for action in actions: self.WriteLn('\t%s' % action) - if not order_only and len(outputs) > 1: - # If we have more than one output, a rule like - # foo bar: baz - # that for *each* output we must run the action, potentially - # in parallel. That is not what we're trying to write -- what - # we want is that we run the action once and it generates all - # the files. - # http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html - # discusses this problem and has this solution: - # 1) Write the naive rule that would produce parallel runs of - # the action. - # 2) Make the outputs seralized on each other, so we won't start - # a parallel run until the first run finishes, at which point - # we'll have generated all the outputs and we're done. - self.WriteLn('%s: %s' % (' '.join(outputs[1:]), outputs[0])) - # Add a dummy command to the "extra outputs" rule, otherwise make seems to - # think these outputs haven't (couldn't have?) changed, and thus doesn't - # flag them as changed (i.e. include in '$?') when evaluating dependent - # rules, which in turn causes do_cmd() to skip running dependent commands. - self.WriteLn('%s: ;' % (' '.join(outputs[1:]))) self.WriteLn() @@ -2015,6 +2012,7 @@ def CalculateMakefilePath(build_file, base_name): srcdir_prefix = '$(srcdir)/' flock_command= 'flock' + copy_archive_arguments = '-af' header_params = { 'default_target': default_target, 'builddir': builddir_name, @@ -2024,6 +2022,7 @@ def CalculateMakefilePath(build_file, base_name): 'link_commands': LINK_COMMANDS_LINUX, 'extra_commands': '', 'srcdir': srcdir, + 'copy_archive_args': copy_archive_arguments, } if flavor == 'mac': flock_command = './gyp-mac-tool flock' @@ -2047,8 +2046,15 @@ def CalculateMakefilePath(build_file, base_name): header_params.update({ 'flock': 'lockf', }) + elif flavor == 'openbsd': + copy_archive_arguments = '-pPRf' + header_params.update({ + 'copy_archive_args': copy_archive_arguments, + }) elif flavor == 'aix': + copy_archive_arguments = '-pPRf' header_params.update({ + 'copy_archive_args': copy_archive_arguments, 'link_commands': LINK_COMMANDS_AIX, 'flock': './gyp-flock-tool flock', 'flock_index': 2, diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py index 8e6bd7ba0a0592..2ecf964c687c13 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py @@ -86,6 +86,9 @@ def _import_OrderedDict(): 'msvs_enable_winrt', 'msvs_requires_importlibrary', 'msvs_enable_winphone', + 'msvs_application_type_revision', + 'msvs_target_platform_version', + 'msvs_target_platform_minversion', ] @@ -2344,6 +2347,9 @@ def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules): rule_name, {'Condition': "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " "'true'" % (rule_name, rule_name), + 'EchoOff': 'true', + 'StandardOutputImportance': 'High', + 'StandardErrorImportance': 'High', 'CommandLineTemplate': '%%(%s.CommandLineTemplate)' % rule_name, 'AdditionalOptions': '%%(%s.AdditionalOptions)' % rule_name, 'Inputs': rule_inputs @@ -2634,8 +2640,23 @@ def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name): if spec.get('msvs_enable_winrt'): properties[0].append(['DefaultLanguage', 'en-US']) properties[0].append(['AppContainerApplication', 'true']) - properties[0].append(['ApplicationTypeRevision', '8.1']) - + if spec.get('msvs_application_type_revision'): + app_type_revision = spec.get('msvs_application_type_revision') + properties[0].append(['ApplicationTypeRevision', app_type_revision]) + else: + properties[0].append(['ApplicationTypeRevision', '8.1']) + + if spec.get('msvs_target_platform_version'): + target_platform_version = spec.get('msvs_target_platform_version') + properties[0].append(['WindowsTargetPlatformVersion', + target_platform_version]) + if spec.get('msvs_target_platform_minversion'): + target_platform_minversion = spec.get('msvs_target_platform_minversion') + properties[0].append(['WindowsTargetPlatformMinVersion', + target_platform_minversion]) + else: + properties[0].append(['WindowsTargetPlatformMinVersion', + target_platform_version]) if spec.get('msvs_enable_winphone'): properties[0].append(['ApplicationType', 'Windows Phone']) else: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py index 624c99ae896b26..841067ed348112 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py @@ -139,8 +139,11 @@ def __init__(self, type): self.bundle = None # On Windows, incremental linking requires linking against all the .objs # that compose a .lib (rather than the .lib itself). That list is stored - # here. + # here. In this case, we also need to save the compile_deps for the target, + # so that the the target that directly depends on the .objs can also depend + # on those. self.component_objs = None + self.compile_deps = None # Windows only. The import .lib is the output of a build step, but # because dependents only link against the lib (not both the lib and the # dll) we keep track of the import library here. @@ -474,16 +477,17 @@ def WriteSpec(self, spec, config_name, generator_flags): elif self.flavor == 'mac' and len(self.archs) > 1: link_deps = collections.defaultdict(list) - + compile_deps = self.target.actions_stamp or actions_depends if self.flavor == 'win' and self.target.type == 'static_library': self.target.component_objs = link_deps + self.target.compile_deps = compile_deps # Write out a link step, if needed. output = None is_empty_bundle = not link_deps and not mac_bundle_depends if link_deps or self.target.actions_stamp or actions_depends: output = self.WriteTarget(spec, config_name, config, link_deps, - self.target.actions_stamp or actions_depends) + compile_deps) if self.is_mac_bundle: mac_bundle_depends.append(output) @@ -921,6 +925,11 @@ def WriteSourcesForArch(self, ninja_file, config_name, config, sources, os.environ.get('CFLAGS', '').split() + cflags_c) cflags_cc = (os.environ.get('CPPFLAGS', '').split() + os.environ.get('CXXFLAGS', '').split() + cflags_cc) + elif self.toolset == 'host': + cflags_c = (os.environ.get('CPPFLAGS_host', '').split() + + os.environ.get('CFLAGS_host', '').split() + cflags_c) + cflags_cc = (os.environ.get('CPPFLAGS_host', '').split() + + os.environ.get('CXXFLAGS_host', '').split() + cflags_cc) defines = config.get('defines', []) + extra_defines self.WriteVariableList(ninja_file, 'defines', @@ -1088,6 +1097,7 @@ def WriteLinkForArch(self, ninja_file, spec, config_name, config, implicit_deps = set() solibs = set() + order_deps = set() if 'dependencies' in spec: # Two kinds of dependencies: @@ -1106,6 +1116,8 @@ def WriteLinkForArch(self, ninja_file, spec, config_name, config, target.component_objs and self.msvs_settings.IsUseLibraryDependencyInputs(config_name)): new_deps = target.component_objs + if target.compile_deps: + order_deps.add(target.compile_deps) elif self.flavor == 'win' and target.import_lib: new_deps = [target.import_lib] elif target.UsesToc(self.flavor): @@ -1169,7 +1181,7 @@ def WriteLinkForArch(self, ninja_file, spec, config_name, config, ldflags.append(r'-Wl,-rpath=\$$ORIGIN/%s' % rpath) ldflags.append('-Wl,-rpath-link=%s' % rpath) self.WriteVariableList(ninja_file, 'ldflags', - gyp.common.uniquer(map(self.ExpandSpecial, ldflags))) + map(self.ExpandSpecial, ldflags)) library_dirs = config.get('library_dirs', []) if self.flavor == 'win': @@ -1244,6 +1256,7 @@ def WriteLinkForArch(self, ninja_file, spec, config_name, config, ninja_file.build(output, command + command_suffix, link_deps, implicit=list(implicit_deps), + order_only=list(order_deps), variables=extra_bindings) return linked_binary @@ -1258,7 +1271,7 @@ def WriteTarget(self, spec, config_name, config, link_deps, compile_deps): self.target.type = 'none' elif spec['type'] == 'static_library': self.target.binary = self.ComputeOutput(spec) - if (self.flavor not in ('mac', 'openbsd', 'win') and not + if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not self.is_standalone_static_library): self.ninja.build(self.target.binary, 'alink_thin', link_deps, order_only=compile_deps) @@ -1672,7 +1685,7 @@ def CommandWithWrapper(cmd, wrappers, prog): def GetDefaultConcurrentLinks(): """Returns a best-guess for a number of concurrent links.""" - pool_size = int(os.getenv('GYP_LINK_CONCURRENCY', 0)) + pool_size = int(os.environ.get('GYP_LINK_CONCURRENCY', 0)) if pool_size: return pool_size @@ -1696,8 +1709,10 @@ class MEMORYSTATUSEX(ctypes.Structure): stat.dwLength = ctypes.sizeof(stat) ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)) - mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB - hard_cap = max(1, int(os.getenv('GYP_LINK_CONCURRENCY_MAX', 2**32))) + # VS 2015 uses 20% more working set than VS 2013 and can consume all RAM + # on a 64 GB machine. + mem_limit = max(1, stat.ullTotalPhys / (5 * (2 ** 30))) # total / 5GB + hard_cap = max(1, int(os.environ.get('GYP_LINK_CONCURRENCY_MAX', 2**32))) return min(mem_limit, hard_cap) elif sys.platform.startswith('linux'): if os.path.exists("/proc/meminfo"): @@ -2275,7 +2290,11 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, if flavor == 'mac': gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) - build_file = gyp.common.RelativePath(build_file, options.toplevel_dir) + # If build_file is a symlink, we must not follow it because there's a chance + # it could point to a path above toplevel_dir, and we cannot correctly deal + # with that case at the moment. + build_file = gyp.common.RelativePath(build_file, options.toplevel_dir, + False) qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name, toolset) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py index 482b53ac8ad9ec..0e3fb9301ecb9e 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py @@ -87,6 +87,8 @@ 'mac_framework_private_headers', ] +generator_filelist_paths = None + # Xcode's standard set of library directories, which don't need to be duplicated # in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay. xcode_standard_library_dirs = frozenset([ @@ -578,6 +580,26 @@ def PerformBuild(data, configurations, params): subprocess.check_call(arguments) +def CalculateGeneratorInputInfo(params): + toplevel = params['options'].toplevel_dir + if params.get('flavor') == 'ninja': + generator_dir = os.path.relpath(params['options'].generator_output or '.') + output_dir = params.get('generator_flags', {}).get('output_dir', 'out') + output_dir = os.path.normpath(os.path.join(generator_dir, output_dir)) + qualified_out_dir = os.path.normpath(os.path.join( + toplevel, output_dir, 'gypfiles-xcode-ninja')) + else: + output_dir = os.path.normpath(os.path.join(toplevel, 'xcodebuild')) + qualified_out_dir = os.path.normpath(os.path.join( + toplevel, output_dir, 'gypfiles')) + + global generator_filelist_paths + generator_filelist_paths = { + 'toplevel': toplevel, + 'qualified_out_dir': qualified_out_dir, + } + + def GenerateOutput(target_list, target_dicts, data, params): # Optionally configure each spec to use ninja as the external builder. ninja_wrapper = params.get('flavor') == 'ninja' @@ -590,6 +612,15 @@ def GenerateOutput(target_list, target_dicts, data, params): parallel_builds = generator_flags.get('xcode_parallel_builds', True) serialize_all_tests = \ generator_flags.get('xcode_serialize_all_test_runs', True) + upgrade_check_project_version = \ + generator_flags.get('xcode_upgrade_check_project_version', None) + + # Format upgrade_check_project_version with leading zeros as needed. + if upgrade_check_project_version: + upgrade_check_project_version = str(upgrade_check_project_version) + while len(upgrade_check_project_version) < 4: + upgrade_check_project_version = '0' + upgrade_check_project_version + skip_excluded_files = \ not generator_flags.get('xcode_list_excluded_files', True) xcode_projects = {} @@ -604,9 +635,17 @@ def GenerateOutput(target_list, target_dicts, data, params): xcode_projects[build_file] = xcp pbxp = xcp.project + # Set project-level attributes from multiple options + project_attributes = {}; if parallel_builds: - pbxp.SetProperty('attributes', - {'BuildIndependentTargetsInParallel': 'YES'}) + project_attributes['BuildIndependentTargetsInParallel'] = 'YES' + if upgrade_check_project_version: + project_attributes['LastUpgradeCheck'] = upgrade_check_project_version + project_attributes['LastTestingUpgradeCheck'] = \ + upgrade_check_project_version + project_attributes['LastSwiftUpdateCheck'] = \ + upgrade_check_project_version + pbxp.SetProperty('attributes', project_attributes) # Add gyp/gypi files to project if not generator_flags.get('standalone'): @@ -648,6 +687,7 @@ def GenerateOutput(target_list, target_dicts, data, params): 'loadable_module': 'com.googlecode.gyp.xcode.bundle', 'shared_library': 'com.apple.product-type.library.dynamic', 'static_library': 'com.apple.product-type.library.static', + 'mac_kernel_extension': 'com.apple.product-type.kernel-extension', 'executable+bundle': 'com.apple.product-type.application', 'loadable_module+bundle': 'com.apple.product-type.bundle', 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test', @@ -655,7 +695,9 @@ def GenerateOutput(target_list, target_dicts, data, params): 'executable+extension+bundle': 'com.apple.product-type.app-extension', 'executable+watch+extension+bundle': 'com.apple.product-type.watchkit-extension', - 'executable+watch+bundle': 'com.apple.product-type.application.watchapp', + 'executable+watch+bundle': + 'com.apple.product-type.application.watchapp', + 'mac_kernel_extension+bundle': 'com.apple.product-type.kernel-extension', } target_properties = { diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py index 34fbc54711923c..20178672b23bd8 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py @@ -28,7 +28,12 @@ # A list of types that are treated as linkable. -linkable_types = ['executable', 'shared_library', 'loadable_module'] +linkable_types = [ + 'executable', + 'shared_library', + 'loadable_module', + 'mac_kernel_extension', +] # A list of sections that contain links to other targets. dependency_sections = ['dependencies', 'export_dependent_settings'] @@ -57,7 +62,7 @@ def IsPathSection(section): # If section ends in one of the '=+?!' characters, it's applied to a section # without the trailing characters. '/' is notably absent from this list, # because there's no way for a regular expression to be treated as a path. - while section[-1:] in '=+?!': + while section and section[-1:] in '=+?!': section = section[:-1] if section in path_sections: @@ -893,11 +898,15 @@ def ExpandVariables(input, phase, variables, build_file): else: # Fix up command with platform specific workarounds. contents = FixupPlatformCommand(contents) - p = subprocess.Popen(contents, shell=use_shell, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - stdin=subprocess.PIPE, - cwd=build_file_dir) + try: + p = subprocess.Popen(contents, shell=use_shell, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + stdin=subprocess.PIPE, + cwd=build_file_dir) + except Exception, e: + raise GypError("%s while executing command '%s' in %s" % + (e, contents, build_file)) p_stdout, p_stderr = p.communicate('') @@ -905,8 +914,8 @@ def ExpandVariables(input, phase, variables, build_file): sys.stderr.write(p_stderr) # Simulate check_call behavior, since check_call only exists # in python 2.5 and later. - raise GypError("Call to '%s' returned exit status %d." % - (contents, p.returncode)) + raise GypError("Call to '%s' returned exit status %d while in %s." % + (contents, p.returncode, build_file)) replacement = p_stdout.rstrip() cached_command_results[cache_key] = replacement @@ -1662,8 +1671,8 @@ def DeepDependencies(self, dependencies=None): if dependency.ref is None: continue if dependency.ref not in dependencies: - dependencies.add(dependency.ref) dependency.DeepDependencies(dependencies) + dependencies.add(dependency.ref) return dependencies @@ -1720,11 +1729,12 @@ def _LinkDependenciesInternal(self, targets, include_shared_libraries, dependencies.add(self.ref) return dependencies - # Executables and loadable modules are already fully and finally linked. - # Nothing else can be a link dependency of them, there can only be - # dependencies in the sense that a dependent target might run an - # executable or load the loadable_module. - if not initial and target_type in ('executable', 'loadable_module'): + # Executables, mac kernel extensions and loadable modules are already fully + # and finally linked. Nothing else can be a link dependency of them, there + # can only be dependencies in the sense that a dependent target might run + # an executable or load the loadable_module. + if not initial and target_type in ('executable', 'loadable_module', + 'mac_kernel_extension'): return dependencies # Shared libraries are already fully linked. They should only be included @@ -2475,7 +2485,7 @@ def ValidateTargetType(target, target_dict): """ VALID_TARGET_TYPES = ('executable', 'loadable_module', 'static_library', 'shared_library', - 'none') + 'mac_kernel_extension', 'none') target_type = target_dict.get('type', None) if target_type not in VALID_TARGET_TYPES: raise GypError("Target %s has an invalid target type '%s'. " @@ -2488,6 +2498,35 @@ def ValidateTargetType(target, target_dict): target_type)) +def ValidateSourcesInTarget(target, target_dict, build_file, + duplicate_basename_check): + if not duplicate_basename_check: + return + if target_dict.get('type', None) != 'static_library': + return + sources = target_dict.get('sources', []) + basenames = {} + for source in sources: + name, ext = os.path.splitext(source) + is_compiled_file = ext in [ + '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S'] + if not is_compiled_file: + continue + basename = os.path.basename(name) # Don't include extension. + basenames.setdefault(basename, []).append(source) + + error = '' + for basename, files in basenames.iteritems(): + if len(files) > 1: + error += ' %s: %s\n' % (basename, ' '.join(files)) + + if error: + print('static library %s has several files with the same basename:\n' % + target + error + 'libtool on Mac cannot handle that. Use ' + '--no-duplicate-basename-check to disable this validation.') + raise GypError('Duplicate basenames in sources section, see list above') + + def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules): """Ensures that the rules sections in target_dict are valid and consistent, and determines which sources they apply to. @@ -2708,7 +2747,7 @@ def SetGeneratorGlobals(generator_input_info): def Load(build_files, variables, includes, depth, generator_input_info, check, - circular_check, parallel, root_targets): + circular_check, duplicate_basename_check, parallel, root_targets): SetGeneratorGlobals(generator_input_info) # A generator can have other lists (in addition to sources) be processed # for rules. @@ -2840,6 +2879,8 @@ def Load(build_files, variables, includes, depth, generator_input_info, check, target_dict = targets[target] build_file = gyp.common.BuildFile(target) ValidateTargetType(target, target_dict) + ValidateSourcesInTarget(target, target_dict, build_file, + duplicate_basename_check) ValidateRulesInTarget(target, target_dict, extra_sources_for_rules) ValidateRunAsInTarget(target, target_dict, build_file) ValidateActionsInTarget(target, target_dict, build_file) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py index 366439a062d36b..eeeaceb0c7aa23 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py @@ -603,8 +603,7 @@ def _ExpandVariables(self, data, substitutions): if isinstance(data, list): return [self._ExpandVariables(v, substitutions) for v in data] if isinstance(data, dict): - return dict((k, self._ExpandVariables(data[k], - substitutions)) for k in data) + return {k: self._ExpandVariables(data[k], substitutions) for k in data} return data if __name__ == '__main__': diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py index ce5c46ea5b3d95..ca67b122f0b9b1 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py @@ -442,6 +442,7 @@ def GetCflags(self, config): cl('FloatingPointModel', map={'0': 'precise', '1': 'strict', '2': 'fast'}, prefix='/fp:', default='0') + cl('CompileAsManaged', map={'false': '', 'true': '/clr'}) cl('WholeProgramOptimization', map={'true': '/GL'}) cl('WarningLevel', prefix='/W') cl('WarnAsError', map={'true': '/WX'}) @@ -593,6 +594,15 @@ def GetLdflags(self, config, gyp_to_build_path, expand_special, '2': 'WINDOWS%s' % minimum_required_version}, prefix='/SUBSYSTEM:') + stack_reserve_size = self._Setting( + ('VCLinkerTool', 'StackReserveSize'), config, default='') + if stack_reserve_size: + stack_commit_size = self._Setting( + ('VCLinkerTool', 'StackCommitSize'), config, default='') + if stack_commit_size: + stack_commit_size = ',' + stack_commit_size + ldflags.append('/STACK:%s%s' % (stack_reserve_size, stack_commit_size)) + ld('TerminalServerAware', map={'1': ':NO', '2': ''}, prefix='/TSAWARE') ld('LinkIncremental', map={'1': ':NO', '2': ''}, prefix='/INCREMENTAL') ld('BaseAddress', prefix='/BASE:') diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py index 417e465f7853f4..bb6f1ea436f258 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py @@ -123,7 +123,9 @@ def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args): stderr=subprocess.STDOUT) out, _ = link.communicate() for line in out.splitlines(): - if not line.startswith(' Creating library '): + if (not line.startswith(' Creating library ') and + not line.startswith('Generating code') and + not line.startswith('Finished generating code')): print line return link.returncode diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py index f1a839a2f59e89..b06bdc4e8b73a4 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py @@ -525,6 +525,13 @@ def GetCflags(self, configname, arch=None): if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'): cflags.append('-Wnewline-eof') + # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or + # llvm-gcc. It also requires a fairly recent libtool, and + # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the + # path to the libLTO.dylib that matches the used clang. + if self._Test('LLVM_LTO', 'YES', default='NO'): + cflags.append('-flto') + self._AppendPlatformVersionMinFlags(cflags) # TODO: @@ -831,8 +838,9 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): # These flags reflect the compilation options used by xcode to compile # extensions. ldflags.append('-lpkstart') - ldflags.append(sdk_root + - '/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit') + if XcodeVersion() < '0900': + ldflags.append(sdk_root + + '/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit') ldflags.append('-fapplication-extension') ldflags.append('-Xlinker -rpath ' '-Xlinker @executable_path/../../Frameworks') @@ -1024,7 +1032,23 @@ def _AdjustLibrary(self, library, config_name=None): sdk_root = self._SdkPath(config_name) if not sdk_root: sdk_root = '' - return l.replace('$(SDKROOT)', sdk_root) + # Xcode 7 started shipping with ".tbd" (text based stubs) files instead of + # ".dylib" without providing a real support for them. What it does, for + # "/usr/lib" libraries, is do "-L/usr/lib -lname" which is dependent on the + # library order and cause collision when building Chrome. + # + # Instead substitude ".tbd" to ".dylib" in the generated project when the + # following conditions are both true: + # - library is referenced in the gyp file as "$(SDKROOT)/**/*.dylib", + # - the ".dylib" file does not exists but a ".tbd" file do. + library = l.replace('$(SDKROOT)', sdk_root) + if l.startswith('$(SDKROOT)'): + basename, ext = os.path.splitext(library) + if ext == '.dylib' and not os.path.exists(library): + tbd_library = basename + '.tbd' + if os.path.exists(tbd_library): + library = tbd_library + return library def AdjustLibraries(self, libraries, config_name=None): """Transforms entries like 'Cocoa.framework' in libraries into entries like @@ -1428,6 +1452,7 @@ def _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration, # These are filled in on a as-needed basis. env = { + 'BUILT_FRAMEWORKS_DIR' : built_products_dir, 'BUILT_PRODUCTS_DIR' : built_products_dir, 'CONFIGURATION' : configuration, 'PRODUCT_NAME' : xcode_settings.GetProductName(), diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py index 034a0d2d4fcc23..d08b7f777002f0 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py @@ -1492,6 +1492,7 @@ def __init__(self, properties=None, id=None, parent=None): 'icns': 'image.icns', 'java': 'sourcecode.java', 'js': 'sourcecode.javascript', + 'kext': 'wrapper.kext', 'm': 'sourcecode.c.objc', 'mm': 'sourcecode.cpp.objcpp', 'nib': 'wrapper.nib', @@ -1951,6 +1952,7 @@ class PBXCopyFilesBuildPhase(XCBuildPhase): # path_tree_to_subfolder maps names of Xcode variables to the associated # dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase object. path_tree_to_subfolder = { + 'BUILT_FRAMEWORKS_DIR': 10, # Frameworks Directory 'BUILT_PRODUCTS_DIR': 16, # Products Directory # Other types that can be chosen via the Xcode UI. # TODO(mark): Map Xcode variable names to these. @@ -1958,7 +1960,6 @@ class PBXCopyFilesBuildPhase(XCBuildPhase): # : 6, # Executables: 6 # : 7, # Resources # : 15, # Java Resources - # : 10, # Frameworks # : 11, # Shared Frameworks # : 12, # Shared Support # : 13, # PlugIns @@ -2262,6 +2263,8 @@ class PBXNativeTarget(XCTarget): '', '.xctest'], 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib', '', '.so'], + 'com.apple.product-type.kernel-extension': ['wrapper.kext', + '', '.kext'], } def __init__(self, properties=None, id=None, parent=None, diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index 198017b262add5..3a3edccf872b92 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -19,9 +19,15 @@ var fs = require('graceful-fs') exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module' function build (gyp, argv, callback) { + var platformMake = 'make' + if (process.platform === 'aix') { + platformMake = 'gmake' + } else if (process.platform.indexOf('bsd') !== -1) { + platformMake = 'gmake' + } + var release = processRelease(argv, gyp, process.version, process.release) - , makeCommand = gyp.opts.make || process.env.MAKE - || (process.platform.indexOf('bsd') != -1 && process.platform.indexOf('kfreebsd') == -1 ? 'gmake' : 'make') + , makeCommand = gyp.opts.make || process.env.MAKE || platformMake , command = win ? 'msbuild' : makeCommand , buildDir = path.resolve('build') , configPath = path.resolve(buildDir, 'config.gypi') diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 009935202af98a..4e0652961ea902 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -1,4 +1,5 @@ module.exports = exports = configure +module.exports.test = { findPython: findPython } /** * Module dependencies. @@ -19,6 +20,7 @@ var fs = require('graceful-fs') , spawn = cp.spawn , execFile = cp.execFile , win = process.platform == 'win32' + , findNodeDirectory = require('./find-node-directory') exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' @@ -31,97 +33,14 @@ function configure (gyp, argv, callback) { , nodeDir , release = processRelease(argv, gyp, process.version, process.release) - checkPython() - - // Check if Python is in the $PATH - function checkPython () { - log.verbose('check python', 'checking for Python executable "%s" in the PATH', python) - which(python, function (err, execPath) { - if (err) { - log.verbose('`which` failed', python, err) - if (python === 'python2') { - python = 'python' - return checkPython() - } - if (win) { - guessPython() - } else { - failNoPython() - } - } else { - log.verbose('`which` succeeded', python, execPath) - checkPythonVersion() - } - }) - } - - // Called on Windows when "python" isn't available in the current $PATH. - // We're gonna check if "%SystemDrive%\python27\python.exe" exists. - function guessPython () { - log.verbose('could not find "' + python + '". guessing location') - var rootDir = process.env.SystemDrive || 'C:\\' - if (rootDir[rootDir.length - 1] !== '\\') { - rootDir += '\\' + findPython(python, function (err, found) { + if (err) { + callback(err) + } else { + python = found + getNodeDir() } - var pythonPath = path.resolve(rootDir, 'Python27', 'python.exe') - log.verbose('ensuring that file exists:', pythonPath) - fs.stat(pythonPath, function (err, stat) { - if (err) { - if (err.code == 'ENOENT') { - failNoPython() - } else { - callback(err) - } - return - } - python = pythonPath - checkPythonVersion() - }) - } - - function checkPythonVersion () { - var env = extend({}, process.env) - env.TERM = 'dumb' - - execFile(python, ['-c', 'import platform; print(platform.python_version());'], { env: env }, function (err, stdout) { - if (err) { - return callback(err) - } - log.verbose('check python version', '`%s -c "import platform; print(platform.python_version());"` returned: %j', python, stdout) - var version = stdout.trim() - if (~version.indexOf('+')) { - log.silly('stripping "+" sign(s) from version') - version = version.replace(/\+/g, '') - } - if (~version.indexOf('rc')) { - log.silly('stripping "rc" identifier from version') - version = version.replace(/rc(.*)$/ig, '') - } - var range = semver.Range('>=2.5.0 <3.0.0') - var valid = false - try { - valid = range.test(version) - } catch (e) { - log.silly('range.test() error', e) - } - if (valid) { - getNodeDir() - } else { - failPythonVersion(version) - } - }) - } - - function failNoPython () { - callback(new Error('Can\'t find Python executable "' + python + - '", you can set the PYTHON env variable.')) - } - - function failPythonVersion (badVersion) { - callback(new Error('Python executable "' + python + - '" is v' + badVersion + ', which is not supported by gyp.\n' + - 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.')) - } + }) function getNodeDir () { @@ -299,6 +218,34 @@ function configure (gyp, argv, callback) { argv.push('-I', config) }) + // for AIX we need to set up the path to the exp file + // which contains the symbols needed for linking. + // The file will either be in one of the following + // depending on whether it is an installed or + // development environment: + // - the include/node directory + // - the out/Release directory + // - the out/Debug directory + // - the root directory + var node_exp_file = '' + if (process.platform === 'aix') { + var node_root_dir = findNodeDirectory() + var candidates = ['include/node/node.exp', + 'out/Release/node.exp', + 'out/Debug/node.exp', + 'node.exp'] + for (var next = 0; next < candidates.length; next++) { + node_exp_file = path.resolve(node_root_dir, candidates[next]) + try { + fs.accessSync(node_exp_file, fs.R_OK) + // exp file found, stop looking + break + } catch (exception) { + // this candidate was not found or not readable, do nothing + } + } + } + // this logic ported from the old `gyp_addon` python file var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') @@ -319,6 +266,9 @@ function configure (gyp, argv, callback) { argv.push('-Dlibrary=shared_library') argv.push('-Dvisibility=default') argv.push('-Dnode_root_dir=' + nodeDir) + if (process.platform === 'aix') { + argv.push('-Dnode_exp_file=' + node_exp_file) + } argv.push('-Dnode_gyp_dir=' + nodeGypDir) argv.push('-Dnode_lib_file=' + release.name + '.lib') argv.push('-Dmodule_root_dir=' + process.cwd()) @@ -360,3 +310,101 @@ function configure (gyp, argv, callback) { } } + +function findPython (python, callback) { + checkPython() + + // Check if Python is in the $PATH + function checkPython () { + log.verbose('check python', 'checking for Python executable "%s" in the PATH', python) + which(python, function (err, execPath) { + if (err) { + log.verbose('`which` failed', python, err) + if (python === 'python2') { + python = 'python' + return checkPython() + } + if (win) { + guessPython() + } else { + failNoPython() + } + } else { + log.verbose('`which` succeeded', python, execPath) + // Found the `python` exceutable, and from now on we use it explicitly. + // This solves #667 and #750 (`execFile` won't run batch files + // (*.cmd, and *.bat)) + python = execPath + checkPythonVersion() + } + }) + } + + // Called on Windows when "python" isn't available in the current $PATH. + // We're gonna check if "%SystemDrive%\python27\python.exe" exists. + function guessPython () { + log.verbose('could not find "' + python + '". guessing location') + var rootDir = process.env.SystemDrive || 'C:\\' + if (rootDir[rootDir.length - 1] !== '\\') { + rootDir += '\\' + } + var pythonPath = path.resolve(rootDir, 'Python27', 'python.exe') + log.verbose('ensuring that file exists:', pythonPath) + fs.stat(pythonPath, function (err, stat) { + if (err) { + if (err.code == 'ENOENT') { + failNoPython() + } else { + callback(err) + } + return + } + python = pythonPath + checkPythonVersion() + }) + } + + function checkPythonVersion () { + var env = extend({}, process.env) + env.TERM = 'dumb' + + execFile(python, ['-c', 'import platform; print(platform.python_version());'], { env: env }, function (err, stdout) { + if (err) { + return callback(err) + } + log.verbose('check python version', '`%s -c "import platform; print(platform.python_version());"` returned: %j', python, stdout) + var version = stdout.trim() + if (~version.indexOf('+')) { + log.silly('stripping "+" sign(s) from version') + version = version.replace(/\+/g, '') + } + if (~version.indexOf('rc')) { + log.silly('stripping "rc" identifier from version') + version = version.replace(/rc(.*)$/ig, '') + } + var range = semver.Range('>=2.5.0 <3.0.0') + var valid = false + try { + valid = range.test(version) + } catch (e) { + log.silly('range.test() error', e) + } + if (valid) { + callback(null, python) + } else { + failPythonVersion(version) + } + }) + } + + function failNoPython () { + callback(new Error('Can\'t find Python executable "' + python + + '", you can set the PYTHON env variable.')) + } + + function failPythonVersion (badVersion) { + callback(new Error('Python executable "' + python + + '" is v' + badVersion + ', which is not supported by gyp.\n' + + 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.')) + } +} diff --git a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js new file mode 100644 index 00000000000000..3aee8a109ae280 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js @@ -0,0 +1,61 @@ +var path = require('path') + , log = require('npmlog') + +function findNodeDirectory(scriptLocation, processObj) { + // set dirname and process if not passed in + // this facilitates regression tests + if (scriptLocation === undefined) { + scriptLocation = __dirname + } + if (processObj === undefined) { + processObj = process + } + + // Have a look to see what is above us, to try and work out where we are + npm_parent_directory = path.join(scriptLocation, '../../../..') + log.verbose('node-gyp root', 'npm_parent_directory is ' + + path.basename(npm_parent_directory)) + node_root_dir = "" + + log.verbose('node-gyp root', 'Finding node root directory') + if (path.basename(npm_parent_directory) === 'deps') { + // We are in a build directory where this script lives in + // deps/npm/node_modules/node-gyp/lib + node_root_dir = path.join(npm_parent_directory, '..') + log.verbose('node-gyp root', 'in build directory, root = ' + + node_root_dir) + } else if (path.basename(npm_parent_directory) === 'node_modules') { + // We are in a node install directory where this script lives in + // lib/node_modules/npm/node_modules/node-gyp/lib or + // node_modules/npm/node_modules/node-gyp/lib depending on the + // platform + if (processObj.platform === 'win32') { + node_root_dir = path.join(npm_parent_directory, '..') + } else { + node_root_dir = path.join(npm_parent_directory, '../..') + } + log.verbose('node-gyp root', 'in install directory, root = ' + + node_root_dir) + } else { + // We don't know where we are, try working it out from the location + // of the node binary + var node_dir = path.dirname(processObj.execPath) + var directory_up = path.basename(node_dir) + if (directory_up === 'bin') { + node_root_dir = path.join(node_dir, '..') + } else if (directory_up === 'Release' || directory_up === 'Debug') { + // If we are a recently built node, and the directory structure + // is that of a repository. If we are on Windows then we only need + // to go one level up, everything else, two + if (processObj.platform === 'win32') { + node_root_dir = path.join(node_dir, '..') + } else { + node_root_dir = path.join(node_dir, '../..') + } + } + // Else return the default blank, "". + } + return node_root_dir +} + +module.exports = findNodeDirectory diff --git a/deps/npm/node_modules/node-gyp/lib/node-gyp.js b/deps/npm/node_modules/node-gyp/lib/node-gyp.js index d6d6509a7a8b03..b84f17d7e2cf9f 100644 --- a/deps/npm/node_modules/node-gyp/lib/node-gyp.js +++ b/deps/npm/node_modules/node-gyp/lib/node-gyp.js @@ -164,7 +164,9 @@ proto.parseArgv = function parseOpts (argv) { } else { // add the user-defined options to the config name = name.substring(npm_config_prefix.length) - this.opts[name] = val + // gyp@741b7f1 enters an infinite loop when it encounters + // zero-length options so ensure those don't get through. + if (name) this.opts[name] = val } }, this) diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md index 2aff0ebff4403e..421f3aa5f951a2 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -47,6 +47,15 @@ If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`. + ## Installation With [npm](https://npmjs.org) do: diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index d165ae8174ca82..75f3d71cba90bc 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,38 +1,50 @@ module.exports = balanced; function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i < str.length && i >= 0 && ! result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); } + + i = ai < bi && ai >= 0 ? ai : bi; } - } - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; + if (begs.length) { + result = [ left, right ]; } - return m; } + + return result; } diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index 662faff69d0dea..1877dcb55fd0b8 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,7 +1,7 @@ { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "0.2.1", + "version": "0.3.0", "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" @@ -13,7 +13,7 @@ }, "dependencies": {}, "devDependencies": { - "tape": "~1.1.1" + "tape": "~4.2.2" }, "keywords": [ "match", @@ -44,30 +44,13 @@ "android-browser/4.2..latest" ] }, - "gitHead": "d743dd31d7376e0fcf99392a4be7227f2e99bf5d", + "readme": "# balanced-match\n\nMatch balanced string pairs, like `{` and `}` or `` and ``.\n\n[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)\n[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)\n\n[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)\n\n## Example\n\nGet the first matching pair of braces:\n\n```js\nvar balanced = require('balanced-match');\n\nconsole.log(balanced('{', '}', 'pre{in{nested}}post'));\nconsole.log(balanced('{', '}', 'pre{first}between{second}post'));\n```\n\nThe matches are:\n\n```bash\n$ node example.js\n{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }\n{ start: 3,\n end: 9,\n pre: 'pre',\n body: 'first',\n post: 'between{second}post' }\n```\n\n## API\n\n### var m = balanced(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\nobject with those keys:\n\n* **start** the index of the first match of `a`\n* **end** the index of the matching `b`\n* **pre** the preamble, `a` and `b` not included\n* **body** the match, `a` and `b` not included\n* **post** the postscript, `a` and `b` not included\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.\n\n### var r = balanced.range(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\narray with indexes: `[ , ]`.\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install balanced-match\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, - "_id": "balanced-match@0.2.1", - "_shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7", - "_from": "balanced-match@>=0.2.0 <0.3.0", - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "dist": { - "shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7", - "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", - "readme": "ERROR: No README data found!" + "_id": "balanced-match@0.3.0", + "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz", + "_from": "balanced-match@>=0.3.0 <0.4.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js index 36bfd39954850d..f5e98e3f2a3240 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js @@ -52,5 +52,33 @@ test('balanced', function(t) { body: 'innest', post: 'post' }); + t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 9, + pre: 'pre', + body: '{in}', + post: 'post' + }); + t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'in', + post: '}post' + }); + t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { + start: 4, + end: 10, + pre: 'pre{', + body: 'first', + post: 'in{second}post' + }); + t.deepEqual(balanced('', 'prepost'), { + start: 3, + end: 4, + pre: 'pre', + body: '', + post: 'post' + }); t.end(); }); diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json index b516138098fba9..50cc7b58839e17 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -56,28 +56,14 @@ ] } }, + "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n", + "readmeFilename": "README.markdown", "bugs": { "url": "https://github.com/substack/node-concat-map/issues" }, - "homepage": "https://github.com/substack/node-concat-map", + "homepage": "https://github.com/substack/node-concat-map#readme", "_id": "concat-map@0.0.1", - "dist": { - "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "_from": "concat-map@0.0.1", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "concat-map@0.0.1" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json index 4cb3e05d7ceb6c..a2e05c7ac681d3 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,7 +1,7 @@ { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "1.1.1", + "version": "1.1.2", "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -13,11 +13,11 @@ "gentest": "bash test/generate.sh" }, "dependencies": { - "balanced-match": "^0.2.0", + "balanced-match": "^0.3.0", "concat-map": "0.0.1" }, "devDependencies": { - "tape": "^3.0.3" + "tape": "4.2.2" }, "keywords": [], "author": { @@ -42,34 +42,13 @@ "android-browser/4.2..latest" ] }, - "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612", + "readme": "# brace-expansion\n\n[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), \nas known from sh/bash, in JavaScript.\n\n[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)\n[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)\n\n[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)\n\n## Example\n\n```js\nvar expand = require('brace-expansion');\n\nexpand('file-{a,b,c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('-v{,,}')\n// => ['-v', '-v', '-v']\n\nexpand('file{0..2}.jpg')\n// => ['file0.jpg', 'file1.jpg', 'file2.jpg']\n\nexpand('file-{a..c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('file{2..0}.jpg')\n// => ['file2.jpg', 'file1.jpg', 'file0.jpg']\n\nexpand('file{0..4..2}.jpg')\n// => ['file0.jpg', 'file2.jpg', 'file4.jpg']\n\nexpand('file-{a..e..2}.jpg')\n// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']\n\nexpand('file{00..10..5}.jpg')\n// => ['file00.jpg', 'file05.jpg', 'file10.jpg']\n\nexpand('{{A..C},{a..c}}')\n// => ['A', 'B', 'C', 'a', 'b', 'c']\n\nexpand('ppp{,config,oe{,conf}}')\n// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']\n```\n\n## API\n\n```js\nvar expand = require('brace-expansion');\n```\n\n### var expanded = expand(str)\n\nReturn an array of all possible and valid expansions of `str`. If none are\nfound, `[str]` is returned.\n\nValid expansions are:\n\n```js\n/^(.*,)+(.+)?$/\n// {a,b,...}\n```\n\nA comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nA numeric sequence from `x` to `y` inclusive, with optional increment.\nIf `x` or `y` start with a leading `0`, all the numbers will be padded\nto have equal length. Negative numbers and backwards iteration work too.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nAn alphabetic sequence from `x` to `y` inclusive, with optional increment.\n`x` and `y` must be exactly one character, and if given, `incr` must be a\nnumber.\n\nFor compatibility reasons, the string `${` is not eligible for brace expansion.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install brace-expansion\n```\n\n## Contributors\n\n- [Julian Gruber](https://github.com/juliangruber)\n- [Isaac Z. Schlueter](https://github.com/isaacs)\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, - "_id": "brace-expansion@1.1.1", - "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", - "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_npmVersion": "2.6.1", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "dist": { - "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", - "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz", - "readme": "ERROR: No README data found!" + "_id": "brace-expansion@1.1.2", + "_shasum": "f21445d0488b658e2771efd870eff51df29f04ef", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz", + "_from": "brace-expansion@>=1.0.0 <2.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json index 3dc6beb49f684a..e9256630aa3819 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json @@ -33,31 +33,14 @@ "minimatch.js", "browser.js" ], - "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", + "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch#readme", "_id": "minimatch@2.0.10", "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "_from": "minimatch@>=2.0.1 <3.0.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "readme": "ERROR: No README data found!" + "_from": "minimatch@>=2.0.1 <3.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/package.json index ad70fb110ce271..84b72480f8925d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/glob/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/glob/package.json @@ -42,30 +42,14 @@ "benchclean": "bash benchclean.sh" }, "license": "ISC", - "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f", + "readme": "[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)\n\n# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n![](oh-my-glob.gif)\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Glob Primer\n\n\"Globs\" are the patterns you type when you do stuff like `ls *.js` on\nthe command line, or put `build/*` in a `.gitignore` file.\n\nBefore parsing the path part patterns, braced sections are expanded\ninto a set. Braced sections start with `{` and end with `}`, with any\nnumber of comma-delimited sections within. Braced sections may contain\nslash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.\n\nThe following characters have special magic meaning when used in a\npath portion:\n\n* `*` Matches 0 or more characters in a single path portion\n* `?` Matches 1 character\n* `[...]` Matches a range of characters, similar to a RegExp range.\n If the first character of the range is `!` or `^` then it matches\n any character not in the range.\n* `!(pattern|pattern|pattern)` Matches anything that does not match\n any of the patterns provided.\n* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the\n patterns provided.\n* `+(pattern|pattern|pattern)` Matches one or more occurrences of the\n patterns provided.\n* `*(a|b|c)` Matches zero or more occurrences of the patterns provided\n* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns\n provided\n* `**` If a \"globstar\" is alone in a path portion, then it matches\n zero or more directories and subdirectories searching for matches.\n It does not crawl symlinked directories.\n\n### Dots\n\nIf a file or directory path portion has a `.` as the first character,\nthen it will not match any glob pattern unless that pattern's\ncorresponding path part also has a `.` as its first character.\n\nFor example, the pattern `a/.*/c` would match the file at `a/.b/c`.\nHowever the pattern `a/*/c` would not, because `*` does not start with\na dot character.\n\nYou can make glob treat dots as normal characters by setting\n`dot:true` in the options.\n\n### Basename Matching\n\nIf you set `matchBase:true` in the options, and the pattern has no\nslashes in it, then it will seek for any file anywhere in the tree\nwith a matching basename. For example, `*.js` would match\n`test/simple/basic.js`.\n\n### Negation\n\nThe intent for negation would be for a pattern starting with `!` to\nmatch everything that *doesn't* match the supplied pattern. However,\nthe implementation is weird, and for the time being, this should be\navoided. The behavior will change or be deprecated in version 5.\n\n### Empty Sets\n\nIf no matching files are found, then an empty array is returned. This\ndiffers from the shell, where the pattern itself is returned. For\nexample:\n\n $ echo a*s*d*f\n a*s*d*f\n\nTo get the bash-style behavior, set the `nonull:true` in the options.\n\n### See Also:\n\n* `man sh`\n* `man bash` (Search for \"Pattern Matching\")\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob.hasMagic(pattern, [options])\n\nReturns `true` if there are any special characters in the pattern, and\n`false` otherwise.\n\nNote that the options affect the results. If `noext:true` is set in\nthe options object, then `+(a|b)` will not be considered a magic\npattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`\nthen that is considered magical, unless `nobrace:true` is set in the\noptions.\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instantiating the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `'DIR'` - Path exists, and is not a directory\n * `'FILE'` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n* `statCache` Cache of `fs.stat` results, to prevent statting the same\n path multiple times.\n* `symlinks` A record of which paths are symbolic links, which is\n relevant in resolving `**` patterns.\n* `realpathCache` An optional object which is passed to `fs.realpath`\n to minimize unnecessary syscalls. It is stored on the instantiated\n Glob object, and may be re-used.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `pause` Temporarily stop the search\n* `resume` Resume the search\n* `abort` Stop the search forever\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the Glob object, as well.\n\nIf you are running many `glob` operations, you can pass a Glob object\nas the `options` argument to a subsequent operation to shortcut some\n`stat` and `readdir` calls. At the very least, you may pass in shared\n`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that\nparallel glob operations will be sped up by sharing information about\nthe filesystem.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence.\n* `silent` When an unusual error is encountered when attempting to\n read a directory, a warning will be printed to stderr. Set the\n `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered when attempting to\n read a directory, the process will just continue on in search of\n other matches. Set the `strict` option to raise an error in these\n cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary\n to set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `symlinks` A cache of known symbolic links. You may pass in a\n previously generated `symlinks` object to save `lstat` calls when\n resolving `**` matches.\n* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set. Set this\n flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `debug` Set to enable debug logging in minimatch and glob.\n* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.\n* `noglobstar` Do not match `**` against multiple filenames. (Ie,\n treat it as a normal `*` instead.)\n* `noext` Do not match `+(a|b)` \"extglob\" patterns.\n* `nocase` Perform a case-insensitive match. Note: on\n case-insensitive filesystems, non-magic patterns will match by\n default, since `stat` and `readdir` will not raise errors.\n* `matchBase` Perform a basename-only match if the pattern does not\n contain any slash characters. That is, `*.js` would be treated as\n equivalent to `**/*.js`, matching all js files in all directories.\n* `nonegate` Suppress `negate` behavior. (See below.)\n* `nocomment` Suppress `comment` behavior. (See below.)\n* `nonull` Return the pattern when no matches are found.\n* `nodir` Do not match directories, only files. (Note: to match\n *only* directories, simply put a `/` at the end of the pattern.)\n* `ignore` Add a pattern or an array of patterns to exclude matches.\n* `follow` Follow symlinked directories when expanding `**` patterns.\n Note that this can result in a lot of duplicate references in the\n presence of cyclic links.\n* `realpath` Set to true to call `fs.realpath` on all of the results.\n In the case of a symlink that cannot be resolved, the full absolute\n path to the matched entry is returned (though it will usually be a\n broken symlink)\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.3, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nNote that symlinked directories are not crawled as part of a `**`,\nthough their contents may match against subsequent portions of the\npattern. This prevents infinite loops and duplicates and the like.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n\n## Contributing\n\nAny change to behavior (including bugfixes) must come with a test.\n\nPatches that fail tests or reduce performance will be rejected.\n\n```\n# to run tests\nnpm test\n\n# to re-generate test fixtures\nnpm run test-regen\n\n# to benchmark against bash/zsh\nnpm run bench\n\n# to profile javascript\nnpm run prof\n```\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, - "homepage": "https://github.com/isaacs/node-glob", + "homepage": "https://github.com/isaacs/node-glob#readme", "_id": "glob@4.5.3", "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "_from": "glob@>=3.0.0 <4.0.0||>=4.0.0 <5.0.0", - "_npmVersion": "2.7.1", - "_nodeVersion": "1.4.2", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.5.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz" + "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "_from": "glob@>=3.0.0 <4.0.0||>=4.0.0 <5.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore new file mode 100644 index 00000000000000..07e6e472cc75fa --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml new file mode 100644 index 00000000000000..4af02b3d17e64c --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 00000000000000..4a0bc5033a06e7 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# Authors, sorted by whether or not they are me +Isaac Z. Schlueter +Brian Cottingham +Carlos Brito Lage +Jesse Dailey +Kevin O'Hara +Marco Rogers +Mark Cavage +Marko Mikulicic +Nathan Rajlich +Satheesh Natesan +Trent Mick +ashleybrener +n4kz diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md new file mode 100644 index 00000000000000..c06814e0414d56 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/README.md @@ -0,0 +1,137 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n) { return n * 2 } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Keys should always be Strings or Numbers + +Note: this module will print warnings to `console.error` if you use a +key that is not a String or Number. Because items are stored in an +object, which coerces keys to a string, it won't go well for you if +you try to use a key that is not a unique string, it'll cause surprise +collisions. For example: + +```JavaScript +// Bad Example! Dont' do this! +var cache = LRU() +var a = {} +var b = {} +cache.set(a, 'this is a') +cache.set(b, 'this is b') +console.log(cache.get(a)) // prints: 'this is b' +``` + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n){return n.length}`. The default is + `function(n){return 1}`, which is fine if you want to store `max` + like-sized things. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `max` is optional and overrides the + cache `max` option if provided. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length()` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js new file mode 100644 index 00000000000000..2bbe653be8ad08 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js @@ -0,0 +1,334 @@ +;(function () { // closure for web browsers + +if (typeof module === 'object' && module.exports) { + module.exports = LRUCache +} else { + // just set the global for non-node platforms. + this.LRUCache = LRUCache +} + +function hOP (obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key) +} + +function naiveLength () { return 1 } + +var didTypeWarning = false +function typeCheckKey(key) { + if (!didTypeWarning && typeof key !== 'string' && typeof key !== 'number') { + didTypeWarning = true + console.error(new TypeError("LRU: key must be a string or number. Almost certainly a bug! " + typeof key).stack) + } +} + +function LRUCache (options) { + if (!(this instanceof LRUCache)) + return new LRUCache(options) + + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + this._max = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) + this._max = Infinity + + this._lengthCalculator = options.length || naiveLength + if (typeof this._lengthCalculator !== "function") + this._lengthCalculator = naiveLength + + this._allowStale = options.stale || false + this._maxAge = options.maxAge || null + this._dispose = options.dispose + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, "max", + { set : function (mL) { + if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity + this._max = mL + if (this._length > this._max) trim(this) + } + , get : function () { return this._max } + , enumerable : true + }) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, "lengthCalculator", + { set : function (lC) { + if (typeof lC !== "function") { + this._lengthCalculator = naiveLength + this._length = this._itemCount + for (var key in this._cache) { + this._cache[key].length = 1 + } + } else { + this._lengthCalculator = lC + this._length = 0 + for (var key in this._cache) { + this._cache[key].length = this._lengthCalculator(this._cache[key].value) + this._length += this._cache[key].length + } + } + + if (this._length > this._max) trim(this) + } + , get : function () { return this._lengthCalculator } + , enumerable : true + }) + +Object.defineProperty(LRUCache.prototype, "length", + { get : function () { return this._length } + , enumerable : true + }) + + +Object.defineProperty(LRUCache.prototype, "itemCount", + { get : function () { return this._itemCount } + , enumerable : true + }) + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + var i = 0 + var itemCount = this._itemCount + + for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) { + i++ + var hit = this._lruList[k] + if (isStale(this, hit)) { + del(this, hit) + if (!this._allowStale) hit = undefined + } + if (hit) { + fn.call(thisp, hit.value, hit.key, this) + } + } +} + +LRUCache.prototype.keys = function () { + var keys = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + keys[i++] = hit.key + } + return keys +} + +LRUCache.prototype.values = function () { + var values = new Array(this._itemCount) + var i = 0 + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + values[i++] = hit.value + } + return values +} + +LRUCache.prototype.reset = function () { + if (this._dispose && this._cache) { + for (var k in this._cache) { + this._dispose(k, this._cache[k].value) + } + } + + this._cache = Object.create(null) // hash of items by key + this._lruList = Object.create(null) // list of items in order of use recency + this._mru = 0 // most recently used + this._lru = 0 // least recently used + this._length = 0 // number of items in the list + this._itemCount = 0 +} + +LRUCache.prototype.dump = function () { + var arr = [] + var i = 0 + + for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { + var hit = this._lruList[k] + if (!isStale(this, hit)) { + //Do not store staled hits + ++i + arr.push({ + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }); + } + } + //arr has the most read first + return arr +} + +LRUCache.prototype.dumpLru = function () { + return this._lruList +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this._maxAge + typeCheckKey(key) + + var now = maxAge ? Date.now() : 0 + var len = this._lengthCalculator(value) + + if (hOP(this._cache, key)) { + if (len > this._max) { + del(this, this._cache[key]) + return false + } + // dispose of the old one before overwriting + if (this._dispose) + this._dispose(key, this._cache[key].value) + + this._cache[key].now = now + this._cache[key].maxAge = maxAge + this._cache[key].value = value + this._length += (len - this._cache[key].length) + this._cache[key].length = len + this.get(key) + + if (this._length > this._max) + trim(this) + + return true + } + + var hit = new Entry(key, value, this._mru++, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this._max) { + if (this._dispose) this._dispose(key, value) + return false + } + + this._length += hit.length + this._lruList[hit.lu] = this._cache[key] = hit + this._itemCount ++ + + if (this._length > this._max) + trim(this) + + return true +} + +LRUCache.prototype.has = function (key) { + typeCheckKey(key) + if (!hOP(this._cache, key)) return false + var hit = this._cache[key] + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + typeCheckKey(key) + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + typeCheckKey(key) + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var hit = this._lruList[this._lru] + del(this, hit) + return hit || null +} + +LRUCache.prototype.del = function (key) { + typeCheckKey(key) + del(this, this._cache[key]) +} + +LRUCache.prototype.load = function (arr) { + //reset the cache + this.reset(); + + var now = Date.now() + //A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l-- ) { + var hit = arr[l] + typeCheckKey(hit.k) + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + //the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + //dont add already expired items + if (maxAge > 0) this.set(hit.k, hit.v, maxAge) + } + } +} + +function get (self, key, doUse) { + typeCheckKey(key) + var hit = self._cache[key] + if (hit) { + if (isStale(self, hit)) { + del(self, hit) + if (!self._allowStale) hit = undefined + } else { + if (doUse) use(self, hit) + } + if (hit) hit = hit.value + } + return hit +} + +function isStale(self, hit) { + if (!hit || (!hit.maxAge && !self._maxAge)) return false + var stale = false; + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self._maxAge && (diff > self._maxAge) + } + return stale; +} + +function use (self, hit) { + shiftLU(self, hit) + hit.lu = self._mru ++ + self._lruList[hit.lu] = hit +} + +function trim (self) { + while (self._lru < self._mru && self._length > self._max) + del(self, self._lruList[self._lru]) +} + +function shiftLU (self, hit) { + delete self._lruList[ hit.lu ] + while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ +} + +function del (self, hit) { + if (hit) { + if (self._dispose) self._dispose(hit.key, hit.value) + self._length -= hit.length + self._itemCount -- + delete self._cache[ hit.key ] + shiftLU(self, hit) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, lu, length, now, maxAge) { + this.key = key + this.value = value + this.lu = lu + this.length = length + this.now = now + if (maxAge) this.maxAge = maxAge +} + +})() diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json new file mode 100644 index 00000000000000..55f8aa534c3a0a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/package.json @@ -0,0 +1,37 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "2.7.3", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test --gc" + }, + "main": "lib/lru-cache.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "devDependencies": { + "tap": "^1.2.0", + "weak": "" + }, + "license": "ISC", + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Keys should always be Strings or Numbers\n\nNote: this module will print warnings to `console.error` if you use a\nkey that is not a String or Number. Because items are stored in an\nobject, which coerces keys to a string, it won't go well for you if\nyou try to use a key that is not a unique string, it'll cause surprise\ncollisions. For example:\n\n```JavaScript\n// Bad Example! Dont' do this!\nvar cache = LRU()\nvar a = {}\nvar b = {}\ncache.set(a, 'this is a')\ncache.set(b, 'this is b')\nconsole.log(cache.get(a)) // prints: 'this is b'\n```\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `max`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `max` is optional and overrides the\n cache `max` option if provided.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length()`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "_id": "lru-cache@2.7.3", + "_shasum": "6d4524e8b955f95d4f5b58851ce21dd72fb4e952", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "_from": "lru-cache@>=2.0.0 <3.0.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js new file mode 100644 index 00000000000000..b47225f109891f --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/basic.js @@ -0,0 +1,396 @@ +var test = require("tap").test + , LRU = require("../") + +test("basic", function (t) { + var cache = new LRU({max: 10}) + cache.set("key", "value") + t.equal(cache.get("key"), "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.length, 1) + t.equal(cache.max, 10) + t.end() +}) + +test("least recently set", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + cache.get("a") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), "A") + t.end() +}) + +test("del", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.del("a") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("max", function (t) { + var cache = new LRU(3) + + // test changing the max, verify that the LRU items get dropped. + cache.max = 100 + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + + // now remove the max restriction, and try again. + cache.max = "hello" + for (var i = 0; i < 100; i ++) cache.set(i, i) + t.equal(cache.length, 100) + for (var i = 0; i < 100; i ++) { + t.equal(cache.get(i), i) + } + // should trigger an immediate resize + cache.max = 3 + t.equal(cache.length, 3) + for (var i = 0; i < 97; i ++) { + t.equal(cache.get(i), undefined) + } + for (var i = 98; i < 100; i ++) { + t.equal(cache.get(i), i) + } + t.end() +}) + +test("reset", function (t) { + var cache = new LRU(10) + cache.set("a", "A") + cache.set("b", "B") + cache.reset() + t.equal(cache.length, 0) + t.equal(cache.max, 10) + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.end() +}) + + +test("basic with weighed length", function (t) { + var cache = new LRU({ + max: 100, + length: function (item) { return item.size } + }) + cache.set("key", {val: "value", size: 50}) + t.equal(cache.get("key").val, "value") + t.equal(cache.get("nada"), undefined) + t.equal(cache.lengthCalculator(cache.get("key")), 50) + t.equal(cache.length, 50) + t.equal(cache.max, 100) + t.end() +}) + + +test("weighed length item too large", function (t) { + var cache = new LRU({ + max: 10, + length: function (item) { return item.size } + }) + t.equal(cache.max, 10) + + // should fall out immediately + cache.set("key", {val: "value", size: 50}) + + t.equal(cache.length, 0) + t.equal(cache.get("key"), undefined) + t.end() +}) + +test("least recently set with weighed length", function (t) { + var cache = new LRU({ + max:8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.set("d", "DDDD") + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("c"), "CCC") + t.equal(cache.get("b"), undefined) + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("lru recently gotten with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + cache.get("a") + cache.get("b") + cache.set("d", "DDDD") + t.equal(cache.get("c"), undefined) + t.equal(cache.get("d"), "DDDD") + t.equal(cache.get("b"), "BB") + t.equal(cache.get("a"), "A") + t.end() +}) + +test("lru recently updated with weighed length", function (t) { + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) + cache.set("a", "A") + cache.set("b", "BB") + cache.set("c", "CCC") + t.equal(cache.length, 6) //CCC BB A + cache.set("a", "+A") + t.equal(cache.length, 7) //+A CCC BB + cache.set("b", "++BB") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("c", "oversized") + t.equal(cache.length, 6) //++BB +A + t.equal(cache.get("c"), undefined) + + cache.set("a", "oversized") + t.equal(cache.length, 4) //++BB + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "++BB") + t.end() +}) + +test("set returns proper booleans", function(t) { + var cache = new LRU({ + max: 5, + length: function (item) { return item.length } + }) + + t.equal(cache.set("a", "A"), true) + + // should return false for max exceeded + t.equal(cache.set("b", "donuts"), false) + + t.equal(cache.set("b", "B"), true) + t.equal(cache.set("c", "CCCC"), true) + t.end() +}) + +test("drop the old items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A") + + setTimeout(function () { + cache.set("b", "b") + t.equal(cache.get("a"), "A") + }, 25) + + setTimeout(function () { + cache.set("c", "C") + // timed out + t.notOk(cache.get("a")) + }, 60 + 25) + + setTimeout(function () { + t.notOk(cache.get("b")) + t.equal(cache.get("c"), "C") + }, 90) + + setTimeout(function () { + t.notOk(cache.get("c")) + t.end() + }, 155) +}) + +test("individual item can have it's own maxAge", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + cache.set("a", "A", 20) + setTimeout(function () { + t.notOk(cache.get("a")) + t.end() + }, 25) +}) + +test("individual item can have it's own maxAge > cache's", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 20 + }) + + cache.set("a", "A", 50) + setTimeout(function () { + t.equal(cache.get("a"), "A") + t.end() + }, 25) +}) + +test("disposal function", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + dispose: function (k, n) { + disposed = n + } + }) + + cache.set(1, 1) + cache.set(2, 2) + t.equal(disposed, 1) + cache.set(3, 3) + t.equal(disposed, 2) + cache.reset() + t.equal(disposed, 3) + t.end() +}) + +test("disposal function on too big of item", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + length: function (k) { + return k.length + }, + dispose: function (k, n) { + disposed = n + } + }) + var obj = [ 1, 2 ] + + t.equal(disposed, false) + cache.set("obj", obj) + t.equal(disposed, obj) + t.end() +}) + +test("has()", function(t) { + var cache = new LRU({ + max: 1, + maxAge: 10 + }) + + cache.set('foo', 'bar') + t.equal(cache.has('foo'), true) + cache.set('blu', 'baz') + t.equal(cache.has('foo'), false) + t.equal(cache.has('blu'), true) + setTimeout(function() { + t.equal(cache.has('blu'), false) + t.end() + }, 15) +}) + +test("stale", function(t) { + var cache = new LRU({ + maxAge: 10, + stale: true + }) + + cache.set('foo', 'bar') + t.equal(cache.get('foo'), 'bar') + t.equal(cache.has('foo'), true) + setTimeout(function() { + t.equal(cache.has('foo'), false) + t.equal(cache.get('foo'), 'bar') + t.equal(cache.get('foo'), undefined) + t.end() + }, 15) +}) + +test("lru update via set", function(t) { + var cache = LRU({ max: 2 }); + + cache.set('foo', 1); + cache.set('bar', 2); + cache.del('bar'); + cache.set('baz', 3); + cache.set('qux', 4); + + t.equal(cache.get('foo'), undefined) + t.equal(cache.get('bar'), undefined) + t.equal(cache.get('baz'), 3) + t.equal(cache.get('qux'), 4) + t.end() +}) + +test("least recently set w/ peek", function (t) { + var cache = new LRU(2) + cache.set("a", "A") + cache.set("b", "B") + t.equal(cache.peek("a"), "A") + cache.set("c", "C") + t.equal(cache.get("c"), "C") + t.equal(cache.get("b"), "B") + t.equal(cache.get("a"), undefined) + t.end() +}) + +test("pop the least used item", function (t) { + var cache = new LRU(3) + , last + + cache.set("a", "A") + cache.set("b", "B") + cache.set("c", "C") + + t.equal(cache.length, 3) + t.equal(cache.max, 3) + + // Ensure we pop a, c, b + cache.get("b", "B") + + last = cache.pop() + t.equal(last.key, "a") + t.equal(last.value, "A") + t.equal(cache.length, 2) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "c") + t.equal(last.value, "C") + t.equal(cache.length, 1) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last.key, "b") + t.equal(last.value, "B") + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + last = cache.pop() + t.equal(last, null) + t.equal(cache.length, 0) + t.equal(cache.max, 3) + + t.end() +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js new file mode 100644 index 00000000000000..4190417cbc61d8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/foreach.js @@ -0,0 +1,120 @@ +var test = require('tap').test +var LRU = require('../') + +test('forEach', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 9 + l.forEach(function (val, key, cache) { + t.equal(cache, l) + t.equal(key, i.toString()) + t.equal(val, i.toString(2)) + i -= 1 + }) + + // get in order of most recently used + l.get(6) + l.get(8) + + var order = [ 8, 6, 9, 7, 5 ] + var i = 0 + + l.forEach(function (val, key, cache) { + var j = order[i ++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + t.end() +}) + +test('keys() and values()', function (t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + t.similar(l.keys(), ['9', '8', '7', '6', '5']) + t.similar(l.values(), ['1001', '1000', '111', '110', '101']) + + // get in order of most recently used + l.get(6) + l.get(8) + + t.similar(l.keys(), ['8', '6', '9', '7', '5']) + t.similar(l.values(), ['1000', '110', '1001', '111', '101']) + + t.end() +}) + +test('all entries are iterated over', function(t) { + var l = new LRU(5) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function (val, key, cache) { + if (i > 0) { + cache.del(key) + } + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 1) + + t.end() +}) + +test('all stale entries are removed', function(t) { + var l = new LRU({ max: 5, maxAge: -5, stale: true }) + for (var i = 0; i < 10; i ++) { + l.set(i.toString(), i.toString(2)) + } + + var i = 0 + l.forEach(function () { + i += 1 + }) + + t.equal(i, 5) + t.equal(l.keys().length, 0) + + t.end() +}) + +test('expires', function (t) { + var l = new LRU({ + max: 10, + maxAge: 50 + }) + for (var i = 0; i < 10; i++) { + l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined)) + } + + var i = 0 + var order = [ 8, 6, 4, 2, 0 ] + setTimeout(function () { + l.forEach(function (val, key, cache) { + var j = order[i++] + t.equal(cache, l) + t.equal(key, j.toString()) + t.equal(val, j.toString(2)) + }) + t.equal(i, order.length); + + setTimeout(function () { + var count = 0; + l.forEach(function (val, key, cache) { count++; }) + t.equal(0, count); + t.end() + }, 25) + + }, 26) +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js new file mode 100644 index 00000000000000..b5912f6f168e5e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js @@ -0,0 +1,51 @@ +#!/usr/bin/env node --expose_gc + + +var weak = require('weak'); +var test = require('tap').test +var LRU = require('../') +var l = new LRU({ max: 10 }) +var refs = 0 +function X() { + refs ++ + weak(this, deref) +} + +function deref() { + refs -- +} + +test('no leaks', function (t) { + // fill up the cache + for (var i = 0; i < 100; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var start = process.memoryUsage() + + // capture the memory + var startRefs = refs + + // do it again, but more + for (var i = 0; i < 10000; i++) { + l.set(i, new X); + // throw some gets in there, too. + if (i % 2 === 0) + l.get(i / 2) + } + + gc() + + var end = process.memoryUsage() + t.equal(refs, startRefs, 'no leaky refs') + + console.error('start: %j\n' + + 'end: %j', start, end); + t.pass(); + t.end(); +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js new file mode 100644 index 00000000000000..5fe5dc3d371f1e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/serialize.js @@ -0,0 +1,215 @@ +var test = require('tap').test +var LRU = require('../') + +test('dump', function (t) { + var cache = new LRU() + + t.equal(cache.dump().length, 0, "nothing in dump for empty cache") + + cache.set("a", "A") + cache.set("b", "B") + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.set("a", "A"); + t.deepEqual(cache.dump(), [ + { k: "a", v: "A", e: 0 }, + { k: "b", v: "B", e: 0 } + ]) + + cache.get("b"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 }, + { k: "a", v: "A", e: 0 } + ]) + + cache.del("a"); + t.deepEqual(cache.dump(), [ + { k: "b", v: "B", e: 0 } + ]) + + t.end() +}) + +test("do not dump stale items", function(t) { + var cache = new LRU({ + max: 5, + maxAge: 50 + }) + + //expires at 50 + cache.set("a", "A") + + setTimeout(function () { + //expires at 75 + cache.set("b", "B") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "b") + t.equal(s[1].k, "a") + }, 25) + + setTimeout(function () { + //expires at 110 + cache.set("c", "C") + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "c") + t.equal(s[1].k, "b") + }, 60) + + setTimeout(function () { + //expires at 130 + cache.set("d", "D", 40) + var s = cache.dump() + t.equal(s.length, 2) + t.equal(s[0].k, "d") + t.equal(s[1].k, "c") + }, 90) + + setTimeout(function () { + var s = cache.dump() + t.equal(s.length, 1) + t.equal(s[0].k, "d") + }, 120) + + setTimeout(function () { + var s = cache.dump() + t.deepEqual(s, []) + t.end() + }, 155) +}) + +test("load basic cache", function(t) { + var cache = new LRU(), + copy = new LRU() + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.deepEquals(cache.dump(), copy.dump()) + + t.end() +}) + + +test("load staled cache", function(t) { + var cache = new LRU({maxAge: 50}), + copy = new LRU({maxAge: 50}), + arr + + //expires at 50 + cache.set("a", "A") + setTimeout(function () { + //expires at 80 + cache.set("b", "B") + arr = cache.dump() + t.equal(arr.length, 2) + }, 30) + + setTimeout(function () { + copy.load(arr) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + }, 60) + + setTimeout(function () { + t.equal(copy.get("b"), undefined) + t.end() + }, 90) +}) + +test("load to other size cache", function(t) { + var cache = new LRU({max: 2}), + copy = new LRU({max: 1}) + + cache.set("a", "A") + cache.set("b", "B") + + copy.load(cache.dump()) + t.equal(copy.get("a"), undefined) + t.equal(copy.get("b"), "B") + + //update the last read from original cache + cache.get("a") + copy.load(cache.dump()) + t.equal(copy.get("a"), "A") + t.equal(copy.get("b"), undefined) + + t.end() +}) + + +test("load to other age cache", function(t) { + var cache = new LRU({maxAge: 50}), + aged = new LRU({maxAge: 100}), + simple = new LRU(), + arr, + expired + + //created at 0 + //a would be valid till 0 + 50 + cache.set("a", "A") + setTimeout(function () { + //created at 20 + //b would be valid till 20 + 50 + cache.set("b", "B") + //b would be valid till 20 + 70 + cache.set("c", "C", 70) + arr = cache.dump() + t.equal(arr.length, 3) + }, 20) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), "B") + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), "B") + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), "B") + t.equal(simple.get("c"), "C") + }, 60) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), "C") + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), "C") + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), "C") + }, 80) + + setTimeout(function () { + t.equal(cache.get("a"), undefined) + t.equal(cache.get("b"), undefined) + t.equal(cache.get("c"), undefined) + + aged.load(arr) + t.equal(aged.get("a"), undefined) + t.equal(aged.get("b"), undefined) + t.equal(aged.get("c"), undefined) + + simple.load(arr) + t.equal(simple.get("a"), undefined) + t.equal(simple.get("b"), undefined) + t.equal(simple.get("c"), undefined) + t.end() + }, 100) + +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json index 4255e77a933eed..0432d4e4c55ee5 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/package.json @@ -31,30 +31,14 @@ "url": "http://blog.izs.me/" }, "license": "ISC", - "gitHead": "527f97aa5bb253d927348698c0cd3bb267d098c6", + "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocaine-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `util.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/sigmund/issues" }, "homepage": "https://github.com/isaacs/sigmund#readme", "_id": "sigmund@1.0.1", "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "_from": "sigmund@>=1.0.0 <1.1.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "tarball": "http://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "sigmund@>=1.0.0 <1.1.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json index 8bf46ccae0c4f6..412ab5de12686d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json @@ -29,30 +29,14 @@ "type": "MIT", "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" }, - "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a", + "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, - "homepage": "https://github.com/isaacs/minimatch", + "homepage": "https://github.com/isaacs/minimatch#readme", "_id": "minimatch@1.0.0", "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", - "_from": "minimatch@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "minimatch@>=1.0.0 <2.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE new file mode 100644 index 00000000000000..af4588069db82d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE @@ -0,0 +1,5 @@ +Copyright (c) 2015, Rebecca Turner + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md index 3491c5956cc236..cff489810b4f54 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md @@ -128,7 +128,8 @@ Tracker events. Defaults to undefined. * **todo** *(optional)* The amount of work todo (a number). Defaults to 0. -Ordinarily these are constructed as a part of a tracker group (via `newItem`) but they c +Ordinarily these are constructed as a part of a tracker group (via +`newItem`). * var completed = tracker.completed() diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json index ea3c1da0d490b2..4b732e7e3577cb 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "repository": { "type": "git", - "url": "git://github.com/visionmedia/node-delegates.git" + "url": "git+https://github.com/visionmedia/node-delegates.git" }, "description": "delegate methods and accessors to another property", "keywords": [ @@ -16,33 +16,14 @@ "should": "*" }, "license": "MIT", + "readme": "\n# delegates\n\n Node method and accessor delegation utilty.\n\n## Installation\n\n```\n$ npm install delegates\n```\n\n## Example\n\n```js\nvar delegate = require('delegates');\n\n...\n\ndelegate(proto, 'request')\n .method('acceptsLanguages')\n .method('acceptsEncodings')\n .method('acceptsCharsets')\n .method('accepts')\n .method('is')\n .access('querystring')\n .access('idempotent')\n .access('socket')\n .access('length')\n .access('query')\n .access('search')\n .access('status')\n .access('method')\n .access('path')\n .access('body')\n .access('host')\n .access('url')\n .getter('subdomains')\n .getter('protocol')\n .getter('header')\n .getter('stale')\n .getter('fresh')\n .getter('secure')\n .getter('ips')\n .getter('ip')\n```\n\n# API\n\n## Delegate(proto, prop)\n\nCreates a delegator instance used to configure using the `prop` on the given\n`proto` object. (which is usually a prototype)\n\n## Delegate#method(name)\n\nAllows the given method `name` to be accessed on the host.\n\n## Delegate#getter(name)\n\nCreates a \"getter\" for the property with the given `name` on the delegated\nobject.\n\n## Delegate#setter(name)\n\nCreates a \"setter\" for the property with the given `name` on the delegated\nobject.\n\n## Delegate#access(name)\n\nCreates an \"accessor\" (ie: both getter *and* setter) for the property with the\ngiven `name` on the delegated object.\n\n## Delegate#fluent(name)\n\nA unique type of \"accessor\" that works for a \"fluent\" API. When called as a\ngetter, the method returns the expected value. However, if the method is called\nwith a value, it will return itself so it can be chained. For example:\n\n```js\ndelegate(proto, 'request')\n .fluent('query')\n\n// getter\nvar q = request.query();\n\n// setter (chainable)\nrequest\n .query({ a: 1 })\n .query({ b: 2 });\n```\n\n# License\n\n MIT\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/visionmedia/node-delegates/issues" }, - "homepage": "https://github.com/visionmedia/node-delegates", + "homepage": "https://github.com/visionmedia/node-delegates#readme", "_id": "delegates@0.1.0", "_shasum": "b4b57be11a1653517a04b27f0949bdc327dfe390", - "_from": "delegates@>=0.1.0 <0.2.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" - } - ], - "dist": { - "shasum": "b4b57be11a1653517a04b27f0949bdc327dfe390", - "tarball": "http://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/delegates/-/delegates-0.1.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "delegates@>=0.1.0 <0.2.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json index 759100666932a3..36966f6056d3bd 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -1,6 +1,6 @@ { "name": "are-we-there-yet", - "version": "1.0.4", + "version": "1.0.5", "description": "Keep track of the overall completion of many dispirate processes", "main": "index.js", "scripts": { @@ -24,28 +24,29 @@ }, "dependencies": { "delegates": "^0.1.0", - "readable-stream": "^1.1.13" + "readable-stream": "^2.0.0 || ^1.1.13" }, - "gitHead": "7ce414849b81ab83935a935275def01914821bde", - "_id": "are-we-there-yet@1.0.4", - "_shasum": "527fe389f7bcba90806106b99244eaa07e886f85", + "gitHead": "abaff79ae17e9397eae19d29d2d75778d18aab3a", + "_id": "are-we-there-yet@1.0.5", + "_shasum": "239f26706da902a2bffb72c33de66fdfd3798ac5", "_from": "are-we-there-yet@>=1.0.0 <1.1.0", - "_npmVersion": "2.0.0", + "_npmVersion": "3.5.2", + "_nodeVersion": "4.2.2", "_npmUser": { "name": "iarna", "email": "me@re-becca.org" }, + "dist": { + "shasum": "239f26706da902a2bffb72c33de66fdfd3798ac5", + "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.5.tgz" + }, "maintainers": [ { "name": "iarna", "email": "me@re-becca.org" } ], - "dist": { - "shasum": "527fe389f7bcba90806106b99244eaa07e886f85", - "tarball": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.4.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.4.tgz", + "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.5.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json index 6430bb74a470fc..61491a10cc1deb 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json @@ -27,27 +27,10 @@ "require-inject": "^1.1.1", "tap": "^0.4.13" }, - "gitHead": "d4ad300c67b25c197582e42e936ea928f7935d01", + "readme": "has-unicode\n===========\n\nTry to guess if your terminal supports unicode\n\n```javascript\nvar hasUnicode = require(\"has-unicode\")\n\nif (hasUnicode()) {\n // the terminal probably has unicode support\n}\n```\n```javascript\nvar hasUnicode = require(\"has-unicode\").tryHarder\nhasUnicode(function(unicodeSupported) {\n if (unicodeSupported) {\n // the terminal probably has unicode support\n }\n})\n```\n\n## Detecting Unicode\n\nWhat we actually detect is UTF-8 support, as that's what Node itself supports.\nIf you have a UTF-16 locale then you won't be detected as unicode capable.\n\n### Windows\n\nSince at least Windows 7, `cmd` and `powershell` have been unicode capable.\nAs such, we report any Windows installation as unicode capable.\n\n\n### Unix Like Operating Systems\n\nWe look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in\nthat order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value. \nFor `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient\nfor most POSIX systems. While locale data can be put in `/etc/locale.conf`\nas well, AFAIK it's always copied into the environment.\n\n", + "readmeFilename": "README.md", "_id": "has-unicode@1.0.1", "_shasum": "c46fceea053eb8ec789bffbba25fca52dfdcf38e", - "_from": "has-unicode@>=1.0.0 <2.0.0", - "_npmVersion": "3.3.6", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "dist": { - "shasum": "c46fceea053eb8ec789bffbba25fca52dfdcf38e", - "tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz" - }, - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "has-unicode@>=1.0.0 <2.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json index f592f32e198f3e..b305178dba5878 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json @@ -44,45 +44,13 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, + "readme": "# lodash._basetostring v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._basetostring\n```\n\nIn Node.js/io.js:\n\n```js\nvar baseToString = require('lodash._basetostring');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._basetostring@3.0.1", "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "_from": "lodash._basetostring@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._basetostring@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json index f941138c4bfdcf..f02acc4ba12027 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -53,45 +53,13 @@ "dependencies": { "lodash._basetostring": "^3.0.0" }, + "readme": "# lodash.repeat v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.repeat` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.repeat\n```\n\nIn Node.js/io.js:\n\n```js\nvar repeat = require('lodash.repeat');\n```\n\nSee the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.repeat) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.repeat@3.0.1", "_shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.repeat@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json index 376b174bee4ab4..b53f86c8fa4e62 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json @@ -47,45 +47,13 @@ "dependencies": { "lodash.repeat": "^3.0.0" }, + "readme": "# lodash._createpadding v3.6.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._createpadding\n```\n\nIn Node.js/io.js:\n\n```js\nvar createPadding = require('lodash._createpadding');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._createpadding@3.6.1", "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "_from": "lodash._createpadding@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._createpadding@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json index c18ed47167af3a..b86f390b481654 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json @@ -54,45 +54,13 @@ "lodash._basetostring": "^3.0.0", "lodash._createpadding": "^3.0.0" }, + "readme": "# lodash.pad v3.1.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.pad\n```\n\nIn Node.js/io.js:\n\n```js\nvar pad = require('lodash.pad');\n```\n\nSee the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.pad) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.pad@3.1.1", "_shasum": "2e078ebc33b331d2ba34bf8732af129fd5c04624", - "_from": "lodash.pad@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "2e078ebc33b331d2ba34bf8732af129fd5c04624", - "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-3.1.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-3.1.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.pad@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json index f592f32e198f3e..b305178dba5878 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json @@ -44,45 +44,13 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, + "readme": "# lodash._basetostring v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._basetostring\n```\n\nIn Node.js/io.js:\n\n```js\nvar baseToString = require('lodash._basetostring');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._basetostring@3.0.1", "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "_from": "lodash._basetostring@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._basetostring@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json index f941138c4bfdcf..f02acc4ba12027 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -53,45 +53,13 @@ "dependencies": { "lodash._basetostring": "^3.0.0" }, + "readme": "# lodash.repeat v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.repeat` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.repeat\n```\n\nIn Node.js/io.js:\n\n```js\nvar repeat = require('lodash.repeat');\n```\n\nSee the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.repeat) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.repeat@3.0.1", "_shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.repeat@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json index 376b174bee4ab4..b53f86c8fa4e62 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json @@ -47,45 +47,13 @@ "dependencies": { "lodash.repeat": "^3.0.0" }, + "readme": "# lodash._createpadding v3.6.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._createpadding\n```\n\nIn Node.js/io.js:\n\n```js\nvar createPadding = require('lodash._createpadding');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._createpadding@3.6.1", "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "_from": "lodash._createpadding@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._createpadding@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json index 55b0c256f9d1bc..ac84716ef6a44d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json @@ -54,45 +54,13 @@ "lodash._basetostring": "^3.0.0", "lodash._createpadding": "^3.0.0" }, + "readme": "# lodash.padleft v3.1.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padLeft` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.padleft\n```\n\nIn Node.js/io.js:\n\n```js\nvar padLeft = require('lodash.padleft');\n```\n\nSee the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.padleft) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.padleft@3.1.1", "_shasum": "150151f1e0245edba15d50af2d71f1d5cff46530", - "_from": "lodash.padleft@>=3.0.0 <4.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "150151f1e0245edba15d50af2d71f1d5cff46530", - "tarball": "http://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.1.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.padleft/-/lodash.padleft-3.1.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.padleft@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json index f592f32e198f3e..b305178dba5878 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json @@ -44,45 +44,13 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, + "readme": "# lodash._basetostring v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._basetostring\n```\n\nIn Node.js/io.js:\n\n```js\nvar baseToString = require('lodash._basetostring');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._basetostring@3.0.1", "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "_from": "lodash._basetostring@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._basetostring@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json index f941138c4bfdcf..f02acc4ba12027 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -53,45 +53,13 @@ "dependencies": { "lodash._basetostring": "^3.0.0" }, + "readme": "# lodash.repeat v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.repeat` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.repeat\n```\n\nIn Node.js/io.js:\n\n```js\nvar repeat = require('lodash.repeat');\n```\n\nSee the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.repeat) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.repeat@3.0.1", "_shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "_from": "lodash.repeat@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.repeat@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json index 376b174bee4ab4..b53f86c8fa4e62 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json @@ -47,45 +47,13 @@ "dependencies": { "lodash.repeat": "^3.0.0" }, + "readme": "# lodash._createpadding v3.6.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._createpadding\n```\n\nIn Node.js/io.js:\n\n```js\nvar createPadding = require('lodash._createpadding');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._createpadding@3.6.1", "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "_from": "lodash._createpadding@>=3.0.0 <4.0.0", - "_npmVersion": "2.12.0", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash._createpadding@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json index 2a40f94bfc3bfd..cf8ce7f968d73e 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json @@ -54,45 +54,13 @@ "lodash._basetostring": "^3.0.0", "lodash._createpadding": "^3.0.0" }, + "readme": "# lodash.padright v3.1.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash.padright\n```\n\nIn Node.js/io.js:\n\n```js\nvar padRight = require('lodash.padright');\n```\n\nSee the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.padright) for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash.padright@3.1.1", "_shasum": "79f7770baaa39738c040aeb5465e8d88f2aacec0", - "_from": "lodash.padright@>=3.0.0 <4.0.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "dist": { - "shasum": "79f7770baaa39738c040aeb5465e8d88f2aacec0", - "tarball": "http://registry.npmjs.org/lodash.padright/-/lodash.padright-3.1.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/lodash.padright/-/lodash.padright-3.1.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "lodash.padright@>=3.0.0 <4.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json index d16cc33df97528..693ea43f6441d1 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json @@ -34,27 +34,10 @@ "devDependencies": { "tap": "^0.4.13" }, - "gitHead": "9f7eeeeed3b74a70f30b721d570435f6ffbc0168", + "readme": "gauge\n=====\n\nA nearly stateless terminal based horizontal guage / progress bar.\n\n```javascript\nvar Gauge = require(\"gauge\")\n\nvar gauge = new Gauge()\n\ngauge.show(\"test\", 0.20)\n\ngauge.pulse(\"this\")\n\ngauge.hide()\n```\n\n![](example.png)\n\n\n### `var gauge = new Gauge([options], [ansiStream])`\n\n* **options** – *(optional)* An option object. (See [below] for details.)\n* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi]\n module to include various commands for controlling the cursor in a terminal.\n\n[ansi]: https://www.npmjs.com/package/ansi\n[below]: #theme-objects\n\nConstructs a new gauge. Gauges are drawn on a single line, and are not drawn\nif the current terminal isn't a tty.\n\nIf you resize your terminal in a way that can be detected then the gauge\nwill be drawn at the new size. As a general rule, growing your terminal will\nbe clean, but shrinking your terminal will result in cruft as we don't have\nenough information to know where what we wrote previously is now located.\n\nThe **options** object can have the following properties, all of which are\noptional:\n\n* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more\n than once in this period of time. This applies to `show` and `pulse`\n calls, but if you `hide` and then `show` the gauge it will draw it\n regardless of time since last draw.\n* theme: defaults to Gauge.unicode` if the terminal supports\n unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`.\n Details on the [theme object](#theme-objects) are documented elsewhere.\n* template: see [documentation elsewhere](#template-objects) for\n defaults and details.\n\n[has-unicode]: https://www.npmjs.com/package/has-unicode\n\nIf **ansiStream** isn't passed in, then one will be constructed from stderr\nwith `ansi(process.stderr)`.\n\n### `gauge.show([name, [completed]])`\n\n* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or \"\".\n* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0.\n\nIf `process.stdout.isTTY` is false then this does nothing. If completed is 0\nand `gauge.pulse` has never been called, then similarly nothing will be printed.\n\nIf `maxUpdateFrequency` msec haven't passed since the last call to `show` or\n`pulse` then similarly, nothing will be printed. (Actually, the update is\ndeferred until `maxUpdateFrequency` msec have passed and if nothing else has\nhappened, the gauge update will happen.)\n\n### `gauge.hide()`\n\nRemoves the gauge from the terminal.\n\n### `gauge.pulse([name])`\n\n* **name** – *(optional)* The specific thing that triggered this pulse\n\nSpins the spinner in the gauge to show output. If **name** is included then\nit will be combined with the last name passed to `gauge.show` using the\nsubsection property of the theme (typically a right facing arrow).\n\n### `gauge.disable()`\n\nHides the gauge and ignores further calls to `show` or `pulse`.\n\n### `gauge.enable()`\n\nShows the gauge and resumes updating when `show` or `pulse` is called.\n\n### `gauge.setTheme(theme)`\n\nChange the active theme, will be displayed with the next show or pulse\n\n### `gauge.setTemplate(template)`\n\nChange the active template, will be displayed with the next show or pulse\n\n### Theme Objects\n\nThere are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`.\nTheme objects have the follow properties:\n\n| Property | Unicode | ASCII |\n| ---------- | ------- | ----- |\n| startgroup | ╢ | \\| |\n| endgroup | ╟ | \\| |\n| complete | █ | # |\n| incomplete | ░ | - |\n| spinner | ▀▐▄▌ | -\\\\\\|/ |\n| subsection | → | -> |\n\n*startgroup*, *endgroup* and *subsection* can be as many characters as you want.\n\n*complete* and *incomplete* should be a single character width each.\n\n*spinner* is a list of characters to use in turn when displaying an activity\nspinner. The Gauge will spin as many characters as you give here.\n\n### Template Objects\n\nA template is an array of objects and strings that, after being evaluated,\nwill be turned into the gauge line. The default template is:\n\n```javascript\n[\n {type: \"name\", separated: true, maxLength: 25, minLength: 25, align: \"left\"},\n {type: \"spinner\", separated: true},\n {type: \"startgroup\"},\n {type: \"completionbar\"},\n {type: \"endgroup\"}\n]\n```\n\nThe various template elements can either be **plain strings**, in which case they will\nbe be included verbatum in the output.\n\nIf the template element is an object, it can have the following keys:\n\n* *type* can be:\n * `name` – The most recent name passed to `show`; if this is in response to a\n `pulse` then the name passed to `pulse` will be appended along with the\n subsection property from the theme.\n * `spinner` – If you've ever called `pulse` this will be one of the characters\n from the spinner property of the theme.\n * `startgroup` – The `startgroup` property from the theme.\n * `completionbar` – This progress bar itself\n * `endgroup` – The `endgroup` property from the theme.\n* *separated* – If true, the element will be separated with spaces from things on\n either side (and margins count as space, so it won't be indented), but only\n if its included.\n* *maxLength* – The maximum length for this element. If its value is longer it\n will be truncated.\n* *minLength* – The minimum length for this element. If its value is shorter it\n will be padded according to the *align* value.\n* *align* – (Default: left) Possible values \"left\", \"right\" and \"center\". Works\n as you'd expect from word processors.\n* *length* – Provides a single value for both *minLength* and *maxLength*. If both\n *length* and *minLength or *maxLength* are specifed then the latter take precedence.\n\n### Tracking Completion\n\nIf you have more than one thing going on that you want to track completion\nof, you may find the related [are-we-there-yet] helpful. It's `change`\nevent can be wired up to the `show` method to get a more traditional\nprogress bar interface.\n\n[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet\n", + "readmeFilename": "README.md", "_id": "gauge@1.2.2", "_shasum": "05b6730a19a8fcad3c340a142f0945222a3f815b", - "_from": "gauge@>=1.2.0 <1.3.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "0.10.38", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "dist": { - "shasum": "05b6730a19a8fcad3c340a142f0945222a3f815b", - "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.2.tgz" - }, - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.2.tgz", - "readme": "ERROR: No README data found!" + "_from": "gauge@>=1.2.0 <1.3.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/package.json index cd7131f404419f..3637903fd7788a 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/npmlog/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/package.json @@ -24,34 +24,14 @@ "tap": "" }, "license": "ISC", - "gitHead": "4e1a73a567036064ded425a7d48c863d53550b4f", + "readme": "# npmlog\n\nThe logger util that npm uses.\n\nThis logger is very basic. It does the logging for npm. It supports\ncustom levels and colored output.\n\nBy default, logs are written to stderr. If you want to send log messages\nto outputs other than streams, then you can change the `log.stream`\nmember, or you can just listen to the events that it emits, and do\nwhatever you want with them.\n\n# Basic Usage\n\n```\nvar log = require('npmlog')\n\n// additional stuff ---------------------------+\n// message ----------+ |\n// prefix ----+ | |\n// level -+ | | |\n// v v v v\n log.info('fyi', 'I have a kitty cat: %j', myKittyCat)\n```\n\n## log.level\n\n* {String}\n\nThe level to display logs at. Any logs at or above this level will be\ndisplayed. The special level `silent` will prevent anything from being\ndisplayed ever.\n\n## log.record\n\n* {Array}\n\nAn array of all the log messages that have been entered.\n\n## log.maxRecordSize\n\n* {Number}\n\nThe maximum number of records to keep. If log.record gets bigger than\n10% over this value, then it is sliced down to 90% of this value.\n\nThe reason for the 10% window is so that it doesn't have to resize a\nlarge array on every log entry.\n\n## log.prefixStyle\n\n* {Object}\n\nA style object that specifies how prefixes are styled. (See below)\n\n## log.headingStyle\n\n* {Object}\n\nA style object that specifies how the heading is styled. (See below)\n\n## log.heading\n\n* {String} Default: \"\"\n\nIf set, a heading that is printed at the start of every line.\n\n## log.stream\n\n* {Stream} Default: `process.stderr`\n\nThe stream where output is written.\n\n## log.enableColor()\n\nForce colors to be used on all messages, regardless of the output\nstream.\n\n## log.disableColor()\n\nDisable colors on all messages.\n\n## log.enableProgress()\n\nEnable the display of log activity spinner and progress bar\n\n## log.disableProgress()\n\nDisable the display of a progress bar\n\n## log.enableUnicode()\n\nForce the unicode theme to be used for the progress bar.\n\n## log.disableUnicode()\n\nDisable the use of unicode in the progress bar.\n\n## log.setGaugeTemplate(template)\n\nOverrides the default gauge template.\n\n## log.pause()\n\nStop emitting messages to the stream, but do not drop them.\n\n## log.resume()\n\nEmit all buffered messages that were written while paused.\n\n## log.log(level, prefix, message, ...)\n\n* `level` {String} The level to emit the message at\n* `prefix` {String} A string prefix. Set to \"\" to skip.\n* `message...` Arguments to `util.format`\n\nEmit a log message at the specified level.\n\n## log\\[level](prefix, message, ...)\n\nFor example,\n\n* log.silly(prefix, message, ...)\n* log.verbose(prefix, message, ...)\n* log.info(prefix, message, ...)\n* log.http(prefix, message, ...)\n* log.warn(prefix, message, ...)\n* log.error(prefix, message, ...)\n\nLike `log.log(level, prefix, message, ...)`. In this way, each level is\ngiven a shorthand, so you can do `log.info(prefix, message)`.\n\n## log.addLevel(level, n, style, disp)\n\n* `level` {String} Level indicator\n* `n` {Number} The numeric level\n* `style` {Object} Object with fg, bg, inverse, etc.\n* `disp` {String} Optional replacement for `level` in the output.\n\nSets up a new level with a shorthand function and so forth.\n\nNote that if the number is `Infinity`, then setting the level to that\nwill cause all log messages to be suppressed. If the number is\n`-Infinity`, then the only way to show it is to enable all log messages.\n\n## log.newItem(name, todo, weight)\n\n* `name` {String} Optional; progress item name.\n* `todo` {Number} Optional; total amount of work to be done. Default 0.\n* `weight` {Number} Optional; the weight of this item relative to others. Default 1.\n\nThis adds a new `are-we-there-yet` item tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `Tracker` object.\n\n## log.newStream(name, todo, weight)\n\nThis adds a new `are-we-there-yet` stream tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerStream` object.\n\n## log.newGroup(name, weight)\n\nThis adds a new `are-we-there-yet` tracker group to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerGroup` object.\n\n# Events\n\nEvents are all emitted with the message object.\n\n* `log` Emitted for all messages\n* `log.` Emitted for all messages with the `` level.\n* `` Messages with prefixes also emit their prefix as an event.\n\n# Style Objects\n\nStyle objects can have the following fields:\n\n* `fg` {String} Color for the foreground text\n* `bg` {String} Color for the background\n* `bold`, `inverse`, `underline` {Boolean} Set the associated property\n* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)\n\n# Message Objects\n\nEvery log event is emitted with a message object, and the `log.record`\nlist contains all of them that have been created. They have the\nfollowing fields:\n\n* `id` {Number}\n* `level` {String}\n* `prefix` {String}\n* `message` {String} Result of `util.format()`\n* `messageRaw` {Array} Arguments to `util.format()`\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/npmlog/issues" }, "homepage": "https://github.com/isaacs/npmlog#readme", "_id": "npmlog@1.2.1", "_shasum": "28e7be619609b53f7ad1dd300a10d64d716268b6", - "_from": "npmlog@>=0.0.0 <1.0.0||>=1.0.0 <2.0.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "28e7be619609b53f7ad1dd300a10d64d716268b6", - "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-1.2.1.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-1.2.1.tgz" + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-1.2.1.tgz", + "_from": "npmlog@>=0.0.0 <1.0.0||>=1.0.0 <2.0.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json index 253335e6234907..7b5d86dbbda5e9 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms/package.json @@ -17,32 +17,14 @@ "ms/index.js": "index.js" } }, - "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", + "readme": "# ms.js: miliseconds conversion utility\n\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('100') // 100\n```\n\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).\n- If a number is supplied to `ms`, a string with a unit is returned.\n- If a string that contains the number is supplied, it returns it as\na number (e.g: it returns `100` for `'100'`).\n- If you pass a string with a number and a valid unit, the number of\nequivalent ms is returned.\n\n## License\n\nMIT\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/guille/ms.js/issues" }, - "homepage": "https://github.com/guille/ms.js", + "homepage": "https://github.com/guille/ms.js#readme", "_id": "ms@0.7.1", - "scripts": {}, "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "_from": "ms@0.7.1", - "_npmVersion": "2.7.5", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" - } - ], - "dist": { - "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "ms@0.7.1" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json index 7e6d9fc59a1755..ebe311fad9ab3a 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/package.json @@ -38,36 +38,14 @@ "debug/debug.js": "debug.js" } }, - "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35", + "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```bash\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n\nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n#### Windows note\n\n On Windows the environment variable is set using the `set` command.\n\n ```cmd\n set DEBUG=*,-not_this\n ```\n\nThen, run the program to be debugged as usual.\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n\n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n\n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\".\n\n## Wildcards\n\n The `*` character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:\n\n```js\nwindow.myDebug = require(\"debug\");\n```\n\n (\"debug\" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:\n\n```js\nmyDebug.enable(\"worker:*\")\n```\n\n Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.\n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n b('doing some work');\n}, 1200);\n```\n\n#### Web Inspector Colors\n\n Colors are also enabled on \"Web Inspectors\" that understand the `%c` formatting\n option. These are WebKit web inspectors, Firefox ([since version\n 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))\n and the Firebug plugin for Firefox (any version).\n\n Colored output looks something like:\n\n ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)\n\n### stderr vs stdout\n\nYou can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:\n\nExample _stdout.js_:\n\n```js\nvar debug = require('debug');\nvar error = debug('app:error');\n\n// by default stderr is used\nerror('goes to stderr!');\n\nvar log = debug('app:log');\n// set this namespace to log via console.log\nlog.log = console.log.bind(console); // don't forget to bind to console!\nlog('goes to stdout');\nerror('still goes to stderr!');\n\n// set all output to go via console.info\n// overrides all per-namespace log settings\ndebug.log = console.info.bind(console);\nerror('now goes to stdout via console.info');\nlog('still goes to stdout, but via console.info now');\n```\n\n### Save debug output to a file\n\nYou can save all debug statements to a file by piping them.\n\nExample:\n\n```bash\n$ DEBUG_FD=3 node your-app.js 3> whatever.log\n```\n\n## Authors\n\n - TJ Holowaychuk\n - Nathan Rajlich\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/visionmedia/debug/issues" }, - "homepage": "https://github.com/visionmedia/debug", + "homepage": "https://github.com/visionmedia/debug#readme", "_id": "debug@2.2.0", - "scripts": {}, "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", - "_from": "debug@*", - "_npmVersion": "2.7.4", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", - "tarball": "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "debug@*" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json index 8ed83ab2436443..f795cc352da0fd 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json @@ -28,30 +28,14 @@ "engines": { "node": "*" }, - "gitHead": "65a5d884f25b4b7a1608e367d715d713dbd3b3d6", + "readme": "array-index\n===========\n### Invoke getter/setter functions on array-like objects\n[![Build Status](https://secure.travis-ci.org/TooTallNate/array-index.svg)](http://travis-ci.org/TooTallNate/array-index)\n\n\nThis little module provides an `ArrayIndex` constructor function that you can\ninherit from with your own objects. When a numbered property gets read, then the\n`__get__` function on the object will be invoked. When a numbered property gets\nset, then the `__set__` function on the object will be invoked.\n\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install array-index\n```\n\n\nExamples\n--------\n\nA quick silly example, using `Math.sqrt()` for the \"getter\":\n\n``` js\nvar ArrayIndex = require('array-index')\n\n// let's just create a singleton instance.\nvar a = new ArrayIndex()\n\n// the \"__get__\" function is invoked for each \"a[n]\" access.\n// it is given a single argument, the \"index\" currently being accessed.\n// so here, we're passing in the `Math.sqrt()` function, so accessing\n// \"a[9]\" will return `Math.sqrt(9)`.\na.__get__ = Math.sqrt\n\n// the \"__get__\" and \"__set__\" functions are only invoked up\n// to \"a.length\", so we must set that manually.\na.length = 10\n\nconsole.log(a)\n// [ 0,\n// 1,\n// 1.4142135623730951,\n// 1.7320508075688772,\n// 2,\n// 2.23606797749979,\n// 2.449489742783178,\n// 2.6457513110645907,\n// 2.8284271247461903,\n// 3,\n// __get__: [Function: sqrt] ]\n```\n\nHere's an example of creating a subclass of `ArrayIndex` using `util.inherits()`:\n\n``` js\nvar ArrayIndex = require('array-index')\nvar inherits = require('util').inherits\n\nfunction MyArray (length) {\n // be sure to call the ArrayIndex constructor in your own constructor\n ArrayIndex.call(this, length)\n\n // the \"set\" object will contain values at indexes previously set,\n // so that they can be returned in the \"getter\" function. This is just a\n // silly example, your subclass will have more meaningful logic.\n Object.defineProperty(this, 'set', {\n value: Object.create(null),\n enumerable: false\n })\n}\n\n// inherit from the ArrayIndex's prototype\ninherits(MyArray, ArrayIndex)\n\nMyArray.prototype.__get__ = function (index) {\n if (index in this.set) return this.set[index]\n return index * 2\n}\n\nMyArray.prototype.__set__ = function (index, v) {\n this.set[index] = v\n}\n\n\n// and now you can create some instances\nvar a = new MyArray(15)\na[9] = a[10] = a[14] = '_'\na[0] = 'nate'\n\nconsole.log(a)\n// [ 'nate', 2, 4, 6, 8, 10, 12, 14, 16, '_', '_', 22, 24, 26, '_' ]\n```\n\nAPI\n---\n\nThe `ArrayIndex` base class is meant to be subclassed, but it also has a few\nconvenient functions built-in.\n\n### \"length\" -> Number\n\nThe length of the ArrayIndex instance. The `__get__` and `__set__` functions will\nonly be invoked on the object up to this \"length\". You may set this length at any\ntime to adjust the amount range where the getters/setters will be invoked.\n\n### \"toArray()\" -> Array\n\nReturns a new regular Array instance with the same values that this ArrayIndex\nclass would have. This function calls the `__get__` function repeatedly from\n`0...length-1` and returns the \"flattened\" array instance.\n\n### \"toJSON()\" -> Array\n\nAll `ArrayIndex` instances get basic support for `JSON.stringify()`, which is\nthe same as a \"flattened\" Array being stringified.\n\n### \"toString()\" -> String\n\nThe `toString()` override is basically just `array.toArray().toString()`.\n\n### \"format()\" -> String\n\nThe `inspect()` implementation for the REPL attempts to mimic what a regular\nArray looks like in the REPL.\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/TooTallNate/array-index/issues" }, - "homepage": "https://github.com/TooTallNate/array-index", + "homepage": "https://github.com/TooTallNate/array-index#readme", "_id": "array-index@0.1.1", "_shasum": "4d5eaf06cc3d925847cd73d1535c217ba306d3e1", - "_from": "array-index@>=0.1.0 <0.2.0", - "_npmVersion": "2.1.3", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "4d5eaf06cc3d925847cd73d1535c217ba306d3e1", - "tarball": "http://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz" + "_resolved": "https://registry.npmjs.org/array-index/-/array-index-0.1.1.tgz", + "_from": "array-index@>=0.1.0 <0.2.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json index ad8edc9f83eedd..f61cec87c3c0cc 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json @@ -31,25 +31,10 @@ "devDependencies": { "mocha": "~1.16.1" }, - "gitHead": "5d1fedd54e4413459f67e4a4babb024144cd00d0", + "readme": "path-array\n==========\n### Treat your `$PATH` like a JavaScript Array\n[![Build Status](https://travis-ci.org/TooTallNate/path-array.svg?branch=master)](https://travis-ci.org/TooTallNate/path-array)\n\nThis module provides a JavaScript `Array` implementation that is backed by your\n`$PATH` env variable. That is, you can use regular Array functions like `shift()`,\n`pop()`, `push()`, `unshift()`, etc. to mutate your `$PATH`.\n\nAlso works for preparing an `env` object for passing to\n[`child_process.spawn()`][cp.spawn].\n\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install path-array\n```\n\n\nExample\n-------\n\nInteracting with your own `$PATH` env variable:\n\n``` js\nvar PathArray = require('path-array');\n\n// no args uses `process.env` by default\nvar p = new PathArray();\n\nconsole.log(p);\n// [ './node_modules/.bin',\n// '/opt/local/bin',\n// '/opt/local/sbin',\n// '/usr/local/bin',\n// '/usr/local/sbin',\n// '/usr/bin',\n// '/bin',\n// '/usr/sbin',\n// '/sbin',\n// '/usr/local/bin',\n// '/opt/X11/bin' ]\n\n// push another path entry. this function mutates the `process.env.PATH`\np.unshift('/foo');\n\nconsole.log(process.env.PATH);\n// '/foo:./node_modules/.bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin'\n```\n\n\nAPI\n---\n\n### new PathArray([env]) → PathArray\n\nCreates and returns a new `PathArray` instance with the given `env` object. If no\n`env` is specified, then [`process.env`][process.env] is used by default.\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[process.env]: http://nodejs.org/docs/latest/api/process.html#process_process_env\n[cp.spawn]: http://nodejs.org/docs/latest/api/child_process.html#child_process_child_process_spawn_command_args_options\n", + "readmeFilename": "README.md", "_id": "path-array@1.0.0", "_shasum": "6c14130c33084f0150553c657b38397ab67aaa4e", - "_from": "path-array@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "6c14130c33084f0150553c657b38397ab67aaa4e", - "tarball": "http://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.0.tgz", + "_from": "path-array@>=1.0.0 <2.0.0" } 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/LICENCE b/deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE deleted file mode 100644 index 74489e2e2658e7..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -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. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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/node-gyp/node_modules/tar/README.md b/deps/npm/node_modules/node-gyp/node_modules/tar/README.md deleted file mode 100644 index 424a2782bf7b59..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -This only works with directories, it does not work with individual files. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js deleted file mode 100644 index f6253a72c5cd3e..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,19 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Extracted!') -} - -var extractor = tar.Extract({path: __dirname + "/extract"}) - .on('error', onError) - .on('end', onEnd); - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .on('error', onError) - .pipe(extractor); diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js deleted file mode 100644 index 039969ce300d12..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js +++ /dev/null @@ -1,24 +0,0 @@ -var tar = require("../tar.js") - , fstream = require("fstream") - , fs = require("fs") - -var dirDest = fs.createWriteStream('dir.tar') - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Packed!') -} - -var packer = tar.Pack({ noProprietary: true }) - .on('error', onError) - .on('end', onEnd); - -// This must be a "directory" -fstream.Reader({ path: __dirname, type: "Directory" }) - .on('error', onError) - .pipe(packer) - .pipe(dirDest) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js b/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js deleted file mode 100644 index 39f3f0888a2cfd..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" << 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js deleted file mode 100644 index 4af5c410838af8..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,213 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c4583ae060..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", , , - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ceee5b24..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", , , -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js deleted file mode 100644 index 9fb1e6fb1b502c..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,86 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - // have to dump into a directory - opts.type = "Directory" - opts.Directory = true - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type !== "Link") return - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - this._fst.on('error', function(err) { - me.emit('error', err) - }) - - this._fst.on('drain', function() { - me.emit('drain') - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80aa7c67..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js deleted file mode 100644 index 05b237c0c7b32a..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js +++ /dev/null @@ -1,385 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} - diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js deleted file mode 100644 index 3ff14dd695100e..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,231 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path) - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} 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 deleted file mode 100644 index 8517c481bc6ef4..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,271 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - me._ended = false - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - entry.write(c) - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - if (this._eofStarted) - this._ended = true - this._eofStarted = true - } else { - this._eofStarted = false - this._startEntry(c) - } - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - return this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath= in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path= in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} 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 deleted file mode 100644 index 5aa78aec301062..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "tar", - "description": "tar for node", - "version": "1.0.3", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "main": "tar.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - }, - "devDependencies": { - "graceful-fs": "^3.0.2", - "rimraf": "1.x", - "tap": "0.x", - "mkdirp": "^0.5.0" - }, - "license": "BSD", - "gitHead": "f4151128c585da236c6b1e278b762ecaedc20c15", - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@1.0.3", - "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44", - "_from": "tar@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.10", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "dist": { - "shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44", - "tarball": "http://registry.npmjs.org/tar/-/tar-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.3.tgz" -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js b/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js deleted file mode 100644 index a81298b9a0b126..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7af05700..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js deleted file mode 100644 index 45400cd9bb818d..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js +++ /dev/null @@ -1,132 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , gfs = require("graceful-fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/dir.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - , rimraf = require("rimraf") - , mkdirp = require("mkdirp") - - , ee = 0 - , expectEntries = [ - { - "path" : "dir/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - }, - { - "path" : "dir/sub/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - } ] - -function slow (fs, method, t1, t2) { - var orig = fs[method] - if (!orig) return null - fs[method] = function () { - var args = [].slice.call(arguments) - console.error("slow", method, args[0]) - var cb = args.pop() - - setTimeout(function () { - orig.apply(fs, args.concat(function(er, data) { - setTimeout(function() { - cb(er, data) - }, t2) - })) - }, t1) - } -} - -// Make sure we get the graceful-fs that fstream is using. -var gfs2 -try { - gfs2 = require("fstream/node_modules/graceful-fs") -} catch (er) {} - -var slowMethods = ["chown", "chmod", "utimes", "lutimes"] -slowMethods.forEach(function (method) { - var t1 = 500 - var t2 = 0 - slow(fs, method, t1, t2) - slow(gfs, method, t1, t2) - if (gfs2) { - slow(gfs2, method, t1, t2) - } -}) - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - rimraf.sync(target) - /mkdirp.sync(target) - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - rimraf.sync(target) - - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - t.end() - }) - - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js deleted file mode 100644 index eca4e7cc962db6..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js +++ /dev/null @@ -1,367 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - require("rimraf").sync(__dirname + "/tmp/extract-test") - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz b/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index f1676023afa2bba2aa18b5508c92f03e1d0816c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19352 zcmdS9Wm8?>6E%oKa0>)?hoHgXLLj)iOK^9Wixb@4-2;JO!GpWILvVM$XZZb}7gIGe zUtnIH+O<#h+1^?)mpt7>+4-uRLlz3qxI~Dff#Gk#6 z`g-rTn_<`NkGgSqh`9%iyIO+RJMIEk@Q^cjEPzS$QFJLbkvahQFp1Gi?M1xtX z_d_3jPIjl>+%+o^H;key?OVfX3E8v2FgIk&q5@J)^5h?H8?w4%1l*k;@LW8A*KOPe z2m})_YIt^yV27?Sb9o}&8YLHw}wmBaI#s5;w$~1gL}Yl8$kSfR+T&Wf?T=;vdl4$nrcnE0Smw^kG$rI+igCu zLr{XYa&G{kKrnW&uV)Zm056SzBh^q4DFok3neK>2dnOF*v9)P(VIXSxruX3R_(6<} zOZDyM+Urp`x)%;WHfqw~UlV|((9x}_0fV6Gd7)s-8b8Iyj6dV=FE|k7SbKGn(HT^^ z)#XFd>jGa=?A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gHci6FyC}6TYMJ(l%c#U%)g2ncMx}ZiY+c#6)bXg&F)*@}Vema#2 z-Q9BPC~k3)PslmB z(i-+FSLqt5jr2XIK^daixLVsdCRAB8vaeBR1Lg8DXkeDC`jYkN2-saF7t9>BpFD4JkrKp$KA zAL@2H+T7=td2fHniTr5BwPpvVCMvwr99iMeii$Xu81{Q=%fuK83Ql;>8VHJl^6Di6 zgXC9gTW)iu(+NC1;Zq!F;2}a;0!js>P0lSt(?5I^=bFJVp1g$yBn^6zPK{Q8ij1;J zE&M7U)lFBkhp=D%55F2SV`}D>*@rI&NBiQ}PX}KDL z@n)2OSK9)#-C5m?+XI9Lho1~2=GPxT9qk>?`0n+WceB3Q{c`jktEiS=-cmaRo`L@} z{BQT|+s}K4hp#q1q{FBFGrU%DG$rTo8<%^cE#eocI0d8O<>S-IWc1V4*7xtyvZ}3r{Jk|fpWMC;&-0Qf5|6yN z-A;Ugf8)j~{Y$_5zVQ7d@j@>S!ccgD7l+X!aen)z=L6kR4PEIMY1%1fKL?NXdY9ng zp$Pr&Jpq_*ys6-2oep^QHv&)4eIhUY$lH$Mot+&YKTG+uFo?IqD2aA9f>4#s>t^3x z`boRp4*YH7CgH?j&|89T0Re*`KfHr_1+Oc;T|9ip@!giD-L6RiE|4};x{*M>X oml~`&|2uHtz<~n?4jede;J|?c2M!!Kc-Zj&1MZ2imH?Oo0D?ENMF0Q* diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f79500de73..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index d4b03a1fe936be..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,886 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js deleted file mode 100644 index bf033c12987862..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js +++ /dev/null @@ -1,934 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var pack = Pack(doGH ? pkg : null) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js deleted file mode 100644 index f765a50129bff1..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js b/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7faa03906..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 0fd880784566e7..b95bd06160f7df 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -11,7 +11,7 @@ "bindings", "gyp" ], - "version": "3.0.3", + "version": "3.2.1", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -40,7 +40,7 @@ "request": "2", "rimraf": "2", "semver": "2.x || 3.x || 4 || 5", - "tar": "^1.0.0", + "tar": "^2.0.0", "which": "1" }, "engines": { @@ -52,32 +52,36 @@ "scripts": { "test": "tape test/test-*" }, - "gitHead": "d6b03851d366c7fa78e7d2f57c61bb074ea45ea3", + "gitHead": "89692c9187e10df944b0bf587ed44381b004a08c", "bugs": { "url": "https://github.com/nodejs/node-gyp/issues" }, - "homepage": "https://github.com/nodejs/node-gyp", - "_id": "node-gyp@3.0.3", - "_shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694", - "_from": "node-gyp@3.0.3", - "_npmVersion": "2.14.2", - "_nodeVersion": "4.0.0", + "homepage": "https://github.com/nodejs/node-gyp#readme", + "_id": "node-gyp@3.2.1", + "_shasum": "f5dd569970a508464cc3c15d7e9e8d2de8638dd5", + "_from": "node-gyp@>=3.2.1 <3.3.0", + "_npmVersion": "3.3.12", + "_nodeVersion": "6.0.0-pre", "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" }, "maintainers": [ { "name": "TooTallNate", "email": "nathan@tootallnate.net" }, + { + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" + }, { "name": "fishrock123", "email": "fishrock123@rocketmail.com" }, { "name": "isaacs", - "email": "isaacs@npmjs.com" + "email": "i@izs.me" }, { "name": "rvagg", @@ -89,9 +93,10 @@ } ], "dist": { - "shasum": "9b004219f4fa9efbfd78c5fc674aa12e58fb8694", - "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz" + "shasum": "f5dd569970a508464cc3c15d7e9e8d2de8638dd5", + "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.2.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.0.3.tgz" + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.2.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c index f397cfa195e448..b1e170aa13bd95 100644 --- a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c +++ b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c @@ -9,7 +9,10 @@ #ifdef _MSC_VER +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif + #include #include diff --git a/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js b/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js new file mode 100644 index 00000000000000..46659d0cfe8fa2 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js @@ -0,0 +1,115 @@ +var test = require('tape') +var path = require('path') +var findNodeDirectory = require('../lib/find-node-directory') + +var platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix'] + +// we should find the directory based on the directory +// the script is running in and it should match the layout +// in a build tree where npm is installed in +// .... /deps/npm +test('test find-node-directory - node install', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + t.equal( + findNodeDirectory('/x/deps/npm/node_modules/node-gyp/lib', processObj), + path.join('/x')) + } +}) + +// we should find the directory based on the directory +// the script is running in and it should match the layout +// in an installed tree where npm is installed in +// .... /lib/node_modules/npm or .../node_modules/npm +// depending on the patform +test('test find-node-directory - node build', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + if (platforms[next] === 'win32') { + t.equal( + findNodeDirectory('/y/node_modules/npm/node_modules/node-gyp/lib', + processObj), path.join('/y')) + } else { + t.equal( + findNodeDirectory('/y/lib/node_modules/npm/node_modules/node-gyp/lib', + processObj), path.join('/y')) + } + } +}) + +// we should find the directory based on the execPath +// for node and match because it was in the bin directory +test('test find-node-directory - node in bin directory', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + t.equal( + findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), + path.join('/x/y')) + } +}) + +// we should find the directory based on the execPath +// for node and match because it was in the Release directory +test('test find-node-directory - node in build release dir', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj + if (platforms[next] === 'win32') { + processObj = {execPath: '/x/y/Release/node', platform: platforms[next]} + } else { + processObj = {execPath: '/x/y/out/Release/node', + platform: platforms[next]} + } + + t.equal( + findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), + path.join('/x/y')) + } +}) + +// we should find the directory based on the execPath +// for node and match because it was in the Debug directory +test('test find-node-directory - node in Debug release dir', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj + if (platforms[next] === 'win32') { + processObj = {execPath: '/a/b/Debug/node', platform: platforms[next]} + } else { + processObj = {execPath: '/a/b/out/Debug/node', platform: platforms[next]} + } + + t.equal( + findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), + path.join('/a/b')) + } +}) + +// we should not find it as it will not match based on the execPath nor +// the directory from which the script is running +test('test find-node-directory - not found', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj = {execPath: '/x/y/z/y', platform:next} + t.equal(findNodeDirectory('/a/b/c/d', processObj), '') + } +}) + +// we should find the directory based on the directory +// the script is running in and it should match the layout +// in a build tree where npm is installed in +// .... /deps/npm +// same test as above but make sure additional directory entries +// don't cause an issue +test('test find-node-directory - node install', function (t) { + t.plan(platforms.length) + for (var next = 0; next < platforms.length; next++) { + var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} + t.equal( + findNodeDirectory('/x/y/z/a/b/c/deps/npm/node_modules/node-gyp/lib', + processObj), path.join('/x/y/z/a/b/c')) + } +}) diff --git a/deps/npm/node_modules/node-gyp/test/test-find-python.js b/deps/npm/node_modules/node-gyp/test/test-find-python.js new file mode 100644 index 00000000000000..7f5c3946794f20 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/test-find-python.js @@ -0,0 +1,20 @@ +'use strict' + +var test = require('tape') +var configure = require('../lib/configure') +var execFile = require('child_process').execFile + +test('find python executable', function (t) { + t.plan(4) + + configure.test.findPython('python', function (err, found) { + t.strictEqual(err, null) + var proc = execFile(found, ['-V'], function (err, stdout, stderr) { + t.strictEqual(err, null) + t.strictEqual(stdout, '') + t.ok(/Python 2/.test(stderr)) + }) + proc.stdout.setEncoding('utf-8') + proc.stderr.setEncoding('utf-8') + }) +}) diff --git a/deps/npm/node_modules/node-gyp/test/test-options.js b/deps/npm/node_modules/node-gyp/test/test-options.js new file mode 100644 index 00000000000000..d097f81be62c8f --- /dev/null +++ b/deps/npm/node_modules/node-gyp/test/test-options.js @@ -0,0 +1,25 @@ +'use strict'; + +var test = require('tape') +var gyp = require('../lib/node-gyp') + +test('options in environment', function (t) { + t.plan(1) + + // `npm test` dumps a ton of npm_config_* variables in the environment. + Object.keys(process.env) + .filter(function(key) { return /^npm_config_/.test(key) }) + .forEach(function(key) { delete process.env[key] }) + + // Zero-length keys should get filtered out. + process.env.npm_config_ = '42' + // Other keys should get added. + process.env.npm_config_x = '42' + // Except loglevel. + process.env.npm_config_loglevel = 'debug' + + var g = gyp(); + g.parseArgv(['rebuild']) // Also sets opts.argv. + + t.deepEqual(Object.keys(g.opts).sort(), ['argv', 'x']) +}) diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/LICENSE rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/README.md rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/index.js rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json similarity index 64% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json index 93233eaac56239..f592f32e198f3e 100644 --- a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json @@ -44,13 +44,45 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "readme": "# lodash._basetostring v3.0.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash._basetostring\n```\n\nIn Node.js/io.js:\n\n```js\nvar baseToString = require('lodash._basetostring');\n```\n\nSee the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details.\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/lodash/lodash/issues" }, "_id": "lodash._basetostring@3.0.1", "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "_from": "lodash._basetostring@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "directories": {}, "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "_from": "lodash._basetostring@3.0.1" + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/LICENSE similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/LICENSE rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/LICENSE diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/README.md similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/README.md rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/README.md diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/index.js similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/index.js rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/index.js diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json similarity index 100% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json similarity index 97% rename from deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json rename to deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json index 945409f3e1c152..376b174bee4ab4 100644 --- a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/package.json +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json @@ -52,7 +52,7 @@ }, "_id": "lodash._createpadding@3.6.1", "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", - "_from": "lodash._createpadding@3.6.1", + "_from": "lodash._createpadding@>=3.0.0 <4.0.0", "_npmVersion": "2.12.0", "_nodeVersion": "0.12.5", "_npmUser": { diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..f81145e6ebe765 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/README.md @@ -0,0 +1,20 @@ +# lodash._basetostring v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js/io.js: + +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..db8ecc9fdd0094 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/index.js @@ -0,0 +1,22 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..f592f32e198f3e --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json @@ -0,0 +1,88 @@ +{ + "name": "lodash._basetostring", + "version": "3.0.1", + "description": "The modern build of lodash’s internal `baseToString` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash._basetostring@3.0.1", + "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "_from": "lodash._basetostring@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/README.md new file mode 100644 index 00000000000000..f9c9411c70412e --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/README.md @@ -0,0 +1,20 @@ +# lodash._createpadding v3.6.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._createpadding +``` + +In Node.js/io.js: + +```js +var createPadding = require('lodash._createpadding'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/index.js new file mode 100644 index 00000000000000..3541a8aae32935 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/index.js @@ -0,0 +1,37 @@ +/** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var repeat = require('lodash.repeat'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeIsFinite = global.isFinite; + +/** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ +function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); +} + +module.exports = createPadding; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md new file mode 100644 index 00000000000000..dec571a333a52a --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md @@ -0,0 +1,20 @@ +# lodash.repeat v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.repeat` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.repeat +``` + +In Node.js/io.js: + +```js +var repeat = require('lodash.repeat'); +``` + +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js new file mode 100644 index 00000000000000..367913f56e0ada --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js @@ -0,0 +1,55 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseToString = require('lodash._basetostring'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeIsFinite = global.isFinite; + +/** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ +function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; +} + +module.exports = repeat; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json new file mode 100644 index 00000000000000..f941138c4bfdcf --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -0,0 +1,97 @@ +{ + "name": "lodash.repeat", + "version": "3.0.1", + "description": "The modern build of lodash’s `_.repeat` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "dependencies": { + "lodash._basetostring": "^3.0.0" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash.repeat@3.0.1", + "_shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", + "_from": "lodash.repeat@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", + "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json new file mode 100644 index 00000000000000..376b174bee4ab4 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json @@ -0,0 +1,91 @@ +{ + "name": "lodash._createpadding", + "version": "3.6.1", + "description": "The modern build of lodash’s internal `createPadding` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "dependencies": { + "lodash.repeat": "^3.0.0" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash._createpadding@3.6.1", + "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", + "_from": "lodash._createpadding@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "4907b438595adc54ee8935527a6c424c02c81a87", + "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..f81145e6ebe765 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/README.md @@ -0,0 +1,20 @@ +# lodash._basetostring v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js/io.js: + +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..db8ecc9fdd0094 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/index.js @@ -0,0 +1,22 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..f592f32e198f3e --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json @@ -0,0 +1,88 @@ +{ + "name": "lodash._basetostring", + "version": "3.0.1", + "description": "The modern build of lodash’s internal `baseToString` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash._basetostring@3.0.1", + "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "_from": "lodash._basetostring@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/README.md new file mode 100644 index 00000000000000..f9c9411c70412e --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/README.md @@ -0,0 +1,20 @@ +# lodash._createpadding v3.6.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createPadding` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._createpadding +``` + +In Node.js/io.js: + +```js +var createPadding = require('lodash._createpadding'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash._createpadding) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/index.js new file mode 100644 index 00000000000000..3541a8aae32935 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/index.js @@ -0,0 +1,37 @@ +/** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var repeat = require('lodash.repeat'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeIsFinite = global.isFinite; + +/** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ +function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); +} + +module.exports = createPadding; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE new file mode 100644 index 00000000000000..9cd87e5dcefe58 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md new file mode 100644 index 00000000000000..dec571a333a52a --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md @@ -0,0 +1,20 @@ +# lodash.repeat v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.repeat` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.repeat +``` + +In Node.js/io.js: + +```js +var repeat = require('lodash.repeat'); +``` + +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js new file mode 100644 index 00000000000000..367913f56e0ada --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js @@ -0,0 +1,55 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseToString = require('lodash._basetostring'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeIsFinite = global.isFinite; + +/** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ +function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; +} + +module.exports = repeat; diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json new file mode 100644 index 00000000000000..f941138c4bfdcf --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json @@ -0,0 +1,97 @@ +{ + "name": "lodash.repeat", + "version": "3.0.1", + "description": "The modern build of lodash’s `_.repeat` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "dependencies": { + "lodash._basetostring": "^3.0.0" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash.repeat@3.0.1", + "_shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", + "_from": "lodash.repeat@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "f4b98dc7ef67256ce61e7874e1865edb208e0edf", + "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json new file mode 100644 index 00000000000000..376b174bee4ab4 --- /dev/null +++ b/deps/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json @@ -0,0 +1,91 @@ +{ + "name": "lodash._createpadding", + "version": "3.6.1", + "description": "The modern build of lodash’s internal `createPadding` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "dependencies": { + "lodash.repeat": "^3.0.0" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "_id": "lodash._createpadding@3.6.1", + "_shasum": "4907b438595adc54ee8935527a6c424c02c81a87", + "_from": "lodash._createpadding@>=3.0.0 <4.0.0", + "_npmVersion": "2.12.0", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "dist": { + "shasum": "4907b438595adc54ee8935527a6c424c02c81a87", + "tarball": "http://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE similarity index 79% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE rename to deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE index 22ced3e63a8e60..d8d7f9437dbf5a 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE @@ -1,10 +1,5 @@ -The following license applies to all files unless the file is specified below. -Each file specified below has its license information embedded in it: +Copyright Node.js contributors. All rights reserved. -tools/jsstyle - -Copyright 2011, Robert Mustacchi. All rights reserved. -Copyright 2011, Joyent, Inc. 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 diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js index 9074e8ebcb61e9..ff4c851c075a2f 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -21,8 +21,12 @@ // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; } exports.isArray = isArray; @@ -62,7 +66,7 @@ function isUndefined(arg) { exports.isUndefined = isUndefined; function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; + return objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; @@ -72,13 +76,12 @@ function isObject(arg) { exports.isObject = isObject; function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; + return objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); + return (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; @@ -97,11 +100,8 @@ function isPrimitive(arg) { } exports.isPrimitive = isPrimitive; -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; +exports.isBuffer = Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); -} \ No newline at end of file +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json index 466dfdfe0139b3..83e519e7b464a5 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -1,6 +1,6 @@ { "name": "core-util-is", - "version": "1.0.1", + "version": "1.0.2", "description": "The `util.is*` functions introduced in Node v0.12.", "main": "lib/util.js", "repository": { @@ -27,27 +27,17 @@ "bugs": { "url": "https://github.com/isaacs/core-util-is/issues" }, - "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is", - "_id": "core-util-is@1.0.1", - "dist": { - "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "scripts": { + "test": "tap test.js" }, - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "1.3.23", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" + "devDependencies": { + "tap": "^2.3.0" }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "_id": "core-util-is@1.0.2", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_from": "core-util-is@>=1.0.0 <1.1.0" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js new file mode 100644 index 00000000000000..1a490c65ac8b5d --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js deleted file mode 100644 index 007fa10575636d..00000000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js +++ /dev/null @@ -1,106 +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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return arg instanceof Buffer; -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml index 5ac98855343cee..36201b10017a5e 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml @@ -4,4 +4,9 @@ node_js: - "0.10" - "0.11" - "0.12" - - "iojs" + - "1.7.1" + - 1 + - 2 + - 3 + - 4 + - 5 diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js index 049521cad7ba1b..571c276783c779 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js @@ -1,5 +1,12 @@ 'use strict'; -module.exports = nextTick; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} function nextTick(fn) { var args = new Array(arguments.length - 1); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json index 087586e8f8cedd..4019a28addcd88 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json @@ -1,6 +1,6 @@ { "name": "process-nextick-args", - "version": "1.0.3", + "version": "1.0.6", "description": "process.nextTick but always with args", "main": "index.js", "scripts": { @@ -19,19 +19,19 @@ "devDependencies": { "tap": "~0.2.6" }, - "gitHead": "e855846a69662b9489f1ad3dde1ebf2ccc4370b8", - "_id": "process-nextick-args@1.0.3", - "_shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", + "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78", + "_id": "process-nextick-args@1.0.6", + "_shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", "_from": "process-nextick-args@>=1.0.0 <1.1.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.5.0", + "_npmVersion": "2.14.4", + "_nodeVersion": "4.1.1", "_npmUser": { "name": "cwmma", "email": "calvin.metcalf@gmail.com" }, "dist": { - "shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", - "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", + "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" }, "maintainers": [ { @@ -40,6 +40,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz", + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json index 0364d54ba46af6..ee70702359198d 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -22,33 +22,13 @@ "browserify" ], "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion 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. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, "_id": "string_decoder@0.10.31", "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" + "_from": "string_decoder@>=0.10.0 <0.11.0" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json index ae0c70f6c633f1..f68d8bb958657f 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json @@ -28,27 +28,10 @@ "url": "https://github.com/TooTallNate/util-deprecate/issues" }, "homepage": "https://github.com/TooTallNate/util-deprecate", - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "readme": "util-deprecate\n==============\n### The Node.js `util.deprecate()` function with browser support\n\nIn Node.js, this module simply re-exports the `util.deprecate()` function.\n\nIn the web browser (i.e. via browserify), a browser-specific implementation\nof the `util.deprecate()` function is used.\n\n\n## API\n\nA `deprecate()` function is the only thing exposed by this module.\n\n``` javascript\n// setup:\nexports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');\n\n\n// users see:\nfoo();\n// foo() is deprecated, use bar() instead\nfoo();\nfoo();\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Nathan Rajlich \n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", "_id": "util-deprecate@1.0.2", "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "readme": "ERROR: No README data found!" + "_from": "util-deprecate@>=1.0.1 <1.1.0" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json index 248dbac49b9131..c0698efcb36108 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json @@ -34,43 +34,14 @@ "util": false }, "license": "MIT", - "gitHead": "f2a4f4a659bacbe742a494b7d2aede64fab0d4f9", + "readme": "# readable-stream\n\n***Node-core streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)\n\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)\n\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)\n\n```bash\nnpm install --save readable-stream\n```\n\n***Node-core streams for userland***\n\nThis package is a mirror of the Streams2 and Streams3 implementations in\nNode-core, including [documentation](doc/stream.markdown).\n\nIf you want to guarantee a stable streams base, regardless of what version of\nNode 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).\n\nAs of version 2.0.0 **readable-stream** uses semantic versioning. \n\n# Streams WG Team Members\n\n* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>\n - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B\n* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>\n - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242\n* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>\n - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D\n* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>\n* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>\n* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/nodejs/readable-stream/issues" }, "homepage": "https://github.com/nodejs/readable-stream#readme", "_id": "readable-stream@2.0.4", "_shasum": "2523ef27ffa339d7ba9da8603f2d0599d06edbd8", - "_from": "readable-stream@>=2.0.0 <2.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "2523ef27ffa339d7ba9da8603f2d0599d06edbd8", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz", - "readme": "ERROR: No README data found!" + "_from": "readable-stream@>=2.0.0 <2.1.0" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json index b8b59f5c303991..f946a953af73c6 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json @@ -52,28 +52,13 @@ "android-browser/4.2..latest" ] }, + "readme": "# typedarray\n\nTypedArray polyfill ripped from [this\nmodule](https://raw.github.com/inexorabletash/polyfill).\n\n[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)\n\n[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)\n\n# example\n\n``` js\nvar Uint8Array = require('typedarray').Uint8Array;\nvar ua = new Uint8Array(5);\nua[1] = 256 + 55;\nconsole.log(ua[1]);\n```\n\noutput:\n\n```\n55\n```\n\n# methods\n\n``` js\nvar TA = require('typedarray')\n```\n\nThe `TA` object has the following constructors:\n\n* TA.ArrayBuffer\n* TA.DataView\n* TA.Float32Array\n* TA.Float64Array\n* TA.Int8Array\n* TA.Int16Array\n* TA.Int32Array\n* TA.Uint8Array\n* TA.Uint8ClampedArray\n* TA.Uint16Array\n* TA.Uint32Array\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install typedarray\n```\n\nTo use this module in the browser, compile with\n[browserify](http://browserify.org)\nor download a UMD build from browserify CDN:\n\nhttp://wzrd.in/standalone/typedarray@latest\n\n# license\n\nMIT\n", + "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/typedarray/issues" }, "_id": "typedarray@0.0.6", - "dist": { - "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "_from": "typedarray@>=0.0.5 <0.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "readme": "ERROR: No README data found!" + "_from": "typedarray@>=0.0.5 <0.1.0" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json index 5a3f8b401e4449..53820bc0b2ce94 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json @@ -54,28 +54,11 @@ "android-browser/4.2..latest" ] }, - "gitHead": "522adc12d82f57c691a5f946fbc8ba08718dcdcb", + "readme": "# concat-stream\n\nWritable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.\n\n[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)\n\n[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)\n\n### description\n\nStreams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.\n\nOnly use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).\n\nThere are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.\n\n## Related\n\n`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.\n\n### examples\n\n#### Buffers\n\n```js\nvar fs = require('fs')\nvar concat = require('concat-stream')\n\nvar readStream = fs.createReadStream('cat.png')\nvar concatStream = concat(gotPicture)\n\nreadStream.on('error', handleError)\nreadStream.pipe(concatStream)\n\nfunction gotPicture(imageBuffer) {\n // imageBuffer is all of `cat.png` as a node.js Buffer\n}\n\nfunction handleError(err) {\n // handle your error appropriately here, e.g.:\n console.error(err) // print the error to STDERR\n process.exit(1) // exit program with non-zero exit code\n}\n\n```\n\n#### Arrays\n\n```js\nvar write = concat(function(data) {})\nwrite.write([1,2,3])\nwrite.write([4,5,6])\nwrite.end()\n// data will be [1,2,3,4,5,6] in the above callback\n```\n\n#### Uint8Arrays\n\n```js\nvar write = concat(function(data) {})\nvar a = new Uint8Array(3)\na[0] = 97; a[1] = 98; a[2] = 99\nwrite.write(a)\nwrite.write('!')\nwrite.end(Buffer('!!1'))\n```\n\nSee `test/` for more examples\n\n# methods\n\n```js\nvar concat = require('concat-stream')\n```\n\n## var writable = concat(opts={}, cb)\n\nReturn a `writable` stream that will fire `cb(data)` with all of the data that\nwas written to the stream. Data can be written to `writable` as strings,\nBuffers, arrays of byte integers, and Uint8Arrays. \n\nBy default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.\n\n* `string` - get a string\n* `buffer` - get back a Buffer\n* `array` - get an array of byte integers\n* `uint8array`, `u8`, `uint8` - get back a Uint8Array\n* `object`, get back an array of Objects\n\nIf you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.\n\n# error handling\n\n`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.\n\nWe recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.\n\n# license\n\nMIT LICENSE\n", + "readmeFilename": "readme.md", "homepage": "https://github.com/maxogden/concat-stream#readme", "_id": "concat-stream@1.5.1", "_shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c", - "_from": "concat-stream@>=1.4.6 <2.0.0", - "_npmVersion": "2.14.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "maxogden", - "email": "max@maxogden.com" - }, - "dist": { - "shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c", - "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz" - }, - "maintainers": [ - { - "name": "maxogden", - "email": "max@maxogden.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz", - "readme": "ERROR: No README data found!" + "_from": "concat-stream@>=1.4.6 <2.0.0" } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index 5671705ab08989..7ead37785b2d14 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "7.0.8", + "version": "7.0.9", "repository": { "url": "git+https://github.com/npm/npm-registry-client.git" }, @@ -27,7 +27,7 @@ "rimraf": "2", "semver": "2 >=2.2.1 || 3.x || 4 || 5", "slide": "^1.1.3", - "npmlog": "" + "npmlog": "~2.0.0" }, "devDependencies": { "negotiator": "^0.4.9", @@ -37,17 +37,46 @@ "tap": "^1.2.0" }, "optionalDependencies": { - "npmlog": "" + "npmlog": "~2.0.0" }, "license": "ISC", - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"https://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can by authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## API\n\n### client.access(uri, params, cb)\n\n* `uri` {String} Registry URL for the package's access API endpoint.\n Looks like `/-/package//access`.\n* `params` {Object} Object containing per-request properties.\n * `access` {String} New access level for the package. Can be either\n `public` or `restricted`. Registry will raise an error if trying\n to change the access level of an unscoped package.\n * `auth` {Credentials}\n\nSet the access level for scoped packages. For now, there are only two\naccess levels: \"public\" and \"restricted\".\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.distTags.fetch(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `auth` {Credentials}\n* `cb` {Function}\n\nFetch all of the `dist-tags` for the named package.\n\n### client.distTags.add(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `version` {String} Exact version to be mapped to the `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nAdd (or replace) a single dist-tag onto the named package.\n\n### client.distTags.set(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSet all of the `dist-tags` for the named package at once, creating any\n`dist-tags` that do not already exit. Any `dist-tags` not included in the\n`distTags` map will be removed.\n\n### client.distTags.update(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nUpdate the values of multiple `dist-tags`, creating any `dist-tags` that do\nnot already exist. Any pre-existing `dist-tags` not included in the `distTags`\nmap will be left alone.\n\n### client.distTags.rm(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a single `dist-tag` from the named package.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag or the \"Last Modified\" timestamp.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `access` {String} Access for the package. Can be `public` or `restricted` (no default).\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `lastModified` {String} The cached Last-Modified timestamp. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Certificate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {string} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n", - "readmeFilename": "README.md", - "gitHead": "e56227b65d18c5158979509ee22a9c3f40cb6756", + "gitHead": "2c0c83149edb270829582a234703404b2ba1c410", "bugs": { "url": "https://github.com/npm/npm-registry-client/issues" }, "homepage": "https://github.com/npm/npm-registry-client#readme", - "_id": "npm-registry-client@7.0.8", - "_shasum": "8c9fea64458fcc26f31da1219127e6e0ebfb0590", - "_from": "npm-registry-client@>=7.0.8 <7.1.0" + "_id": "npm-registry-client@7.0.9", + "_shasum": "1baf86ee5285c4e6d38d4556208ded56049231bb", + "_from": "npm-registry-client@>=7.0.9 <7.1.0", + "_npmVersion": "3.4.1", + "_nodeVersion": "5.1.0", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "dist": { + "shasum": "1baf86ee5285c4e6d38d4556208ded56049231bb", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.0.9.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.0.9.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/once/package.json b/deps/npm/node_modules/once/package.json index c85f12ebe1d4fa..dac31323c40212 100644 --- a/deps/npm/node_modules/once/package.json +++ b/deps/npm/node_modules/once/package.json @@ -1,6 +1,6 @@ { "name": "once", - "version": "1.3.2", + "version": "1.3.3", "description": "Run a function exactly one time", "main": "once.js", "directories": { @@ -10,11 +10,14 @@ "wrappy": "1" }, "devDependencies": { - "tap": "~0.3.0" + "tap": "^1.2.0" }, "scripts": { "test": "tap test/*.js" }, + "files": [ + "once.js" + ], "repository": { "type": "git", "url": "git://github.com/isaacs/once.git" @@ -31,30 +34,14 @@ "url": "http://blog.izs.me/" }, "license": "ISC", - "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2", + "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/once/issues" }, "homepage": "https://github.com/isaacs/once#readme", - "_id": "once@1.3.2", - "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", - "_from": "once@>=1.3.2 <1.4.0", - "_npmVersion": "2.9.1", - "_nodeVersion": "2.0.0", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", - "tarball": "http://registry.npmjs.org/once/-/once-1.3.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", - "readme": "ERROR: No README data found!" + "_id": "once@1.3.3", + "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "_from": "once@>=1.3.3 <1.4.0" } diff --git a/deps/npm/node_modules/once/test/once.js b/deps/npm/node_modules/once/test/once.js deleted file mode 100644 index c618360dfaeb56..00000000000000 --- a/deps/npm/node_modules/once/test/once.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tap').test -var once = require('../once.js') - -test('once', function (t) { - var f = 0 - function fn (g) { - t.equal(f, 0) - f ++ - return f + g + this - } - fn.ownProperty = {} - var foo = once(fn) - t.equal(fn.ownProperty, foo.ownProperty) - t.notOk(foo.called) - for (var i = 0; i < 1E3; i++) { - t.same(f, i === 0 ? 0 : 1) - var g = foo.call(1, 1) - t.ok(foo.called) - t.same(g, 3) - t.same(f, 1) - } - t.end() -}) diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml index d793e7f545f775..c24c59b5d5b4fa 100644 --- a/deps/npm/node_modules/request/.travis.yml +++ b/deps/npm/node_modules/request/.travis.yml @@ -1,9 +1,9 @@ language: node_js node_js: - - "4.0" - - "io.js" - - "0.12" - - "0.10" + - node + - io.js + - 0.12 + - 0.10 sudo: false after_script: "npm run test-cov && cat ./coverage/lcov.info | codecov && cat ./coverage/lcov.info | coveralls" diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md index a43c6726a479d5..7dc85ea14d2c0d 100644 --- a/deps/npm/node_modules/request/CHANGELOG.md +++ b/deps/npm/node_modules/request/CHANGELOG.md @@ -1,5 +1,30 @@ ## Change Log +### v2.67.0 (2015/11/19) +- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) + +### v2.66.0 (2015/11/18) +- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic) +- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov) +- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot) +- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms) +- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot) +- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @Bloutiouf) +- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov) +- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot) +- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot) +- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota) +- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden) +- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov) +- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson) +- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov) +- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot) +- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov) +- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@Bloutiouf) +- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu) +- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot) +- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot) + ### v2.65.0 (2015/10/11) - [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot) - [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster) diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index c18b022abe726d..77e30df5821d52 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -161,7 +161,7 @@ request.post({url:'http://service.com/upload', form: {key:'value'}}, function(er #### multipart/form-data (Multipart Form Uploads) -For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. +For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. ```js @@ -179,7 +179,7 @@ var formData = { ], // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS} // Use case: for some types of streams, you'll need to provide "file"-related information manually. - // See the `form-data` README for more information about options: https://github.com/felixge/node-form-data + // See the `form-data` README for more information about options: https://github.com/form-data/form-data custom_file: { value: fs.createReadStream('/dev/urandom'), options: { @@ -206,7 +206,7 @@ form.append('my_field', 'my_value'); form.append('my_buffer', new Buffer([1, 2, 3])); form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); ``` -See the [form-data README](https://github.com/felixge/node-form-data) for more information & examples. +See the [form-data README](https://github.com/form-data/form-data) for more information & examples. #### multipart/related @@ -472,7 +472,7 @@ HTTP/1.1 200 OK At this point, the connection is left open, and the client is communicating directly with the `endpoint-server.com` machine. -See [the wikipedia page on HTTP Tunneling](http://en.wikipedia.org/wiki/HTTP_tunnel) +See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel) for more information. By default, when proxying `http` traffic, request will simply make a @@ -566,7 +566,7 @@ Here's some examples of valid `no_proxy` values: ## UNIX Domain Sockets -`request` supports making requests to [UNIX Domain Sockets](http://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: +`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: ```js /* Pattern */ 'http://unix:SOCKET:PATH' @@ -746,7 +746,7 @@ The first argument can be either a `url` or an `options` object. The only requir In non-chunked requests, data items with body streams are not allowed. - `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request. - `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request. -- `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. +- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. - `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body. --- @@ -762,7 +762,7 @@ The first argument can be either a `url` or an `options` object. The only requir - `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. - `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) - `maxRedirects` - the maximum number of redirects to follow (default: `10`) -- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). +- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain. --- @@ -799,8 +799,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - `tunnel` - controls the behavior of [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) as follows: - - `undefined` (default) - `true` if the destination is `https` or a previous - request in the redirect chain used a tunneling proxy, `false` otherwise + - `undefined` (default) - `true` if the destination is `https`, `false` otherwise - `true` - always tunnel to the destination by making a `CONNECT` request to the proxy - `false` - request the destination as a `GET` request. @@ -845,7 +844,7 @@ For example: ```js //requests using baseRequest() will set the 'x-token' header var baseRequest = request.defaults({ - headers: {x-token: 'my-token'} + headers: {'x-token': 'my-token'} }) //requests using specialRequest() will include the 'x-token' header set in @@ -933,7 +932,7 @@ There are at least three ways to debug the operation of `request`: 2. Set `require('request').debug = true` at any time (this does the same thing as #1). -3. Use the [request-debug module](https://github.com/nylen/request-debug) to +3. Use the [request-debug module](https://github.com/request/request-debug) to view request and response headers and bodies. [back to top](#table-of-contents) @@ -1076,9 +1075,9 @@ request('http://www.google.com', function() { ``` The cookie store must be a -[`tough-cookie`](https://github.com/goinstant/tough-cookie) +[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) store and it must support synchronous operations; see the -[`CookieStore` API docs](https://github.com/goinstant/tough-cookie/#cookiestore-api) +[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) for details. To inspect your cookie jar after a request: diff --git a/deps/npm/node_modules/request/lib/har.js b/deps/npm/node_modules/request/lib/har.js index 83453a3274bbbe..ceb1cd1076e328 100644 --- a/deps/npm/node_modules/request/lib/har.js +++ b/deps/npm/node_modules/request/lib/har.js @@ -60,43 +60,53 @@ Har.prototype.prep = function (data) { } // prep body - switch (data.postData.mimeType) { - case 'multipart/mixed': - case 'multipart/related': - case 'multipart/form-data': - case 'multipart/alternative': - // reset values - data.postData.mimeType = 'multipart/form-data' - break - - case 'application/x-www-form-urlencoded': - if (!data.postData.params) { - data.postData.text = '' - } else { - data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) - - // always overwrite - data.postData.text = qs.stringify(data.postData.paramsObj) - } - break - - case 'text/json': - case 'text/x-json': - case 'application/json': - case 'application/x-json': - data.postData.mimeType = 'application/json' - - if (data.postData.text) { - try { - data.postData.jsonObj = JSON.parse(data.postData.text) - } catch (e) { - this.request.debug(e) - - // force back to text/plain - data.postData.mimeType = 'text/plain' - } + function some (arr) { + return arr.some(function (type) { + return data.postData.mimeType.indexOf(type) === 0 + }) + } + + if (some([ + 'multipart/mixed', + 'multipart/related', + 'multipart/form-data', + 'multipart/alternative'])) { + + // reset values + data.postData.mimeType = 'multipart/form-data' + } + + else if (some([ + 'application/x-www-form-urlencoded'])) { + + if (!data.postData.params) { + data.postData.text = '' + } else { + data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) + + // always overwrite + data.postData.text = qs.stringify(data.postData.paramsObj) + } + } + + else if (some([ + 'text/json', + 'text/x-json', + 'application/json', + 'application/x-json'])) { + + data.postData.mimeType = 'application/json' + + if (data.postData.text) { + try { + data.postData.jsonObj = JSON.parse(data.postData.text) + } catch (e) { + this.request.debug(e) + + // force back to text/plain + data.postData.mimeType = 'text/plain' } - break + } } return data @@ -152,51 +162,50 @@ Har.prototype.options = function (options) { options.headers = req.headersObj } - switch (req.postData.mimeType) { - case 'application/x-www-form-urlencoded': - options.form = req.postData.paramsObj - break - - case 'application/json': - if (req.postData.jsonObj) { - options.body = req.postData.jsonObj - options.json = true - } - break - - case 'multipart/form-data': - options.formData = {} + function test (type) { + return req.postData.mimeType.indexOf(type) === 0 + } + if (test('application/x-www-form-urlencoded')) { + options.form = req.postData.paramsObj + } + else if (test('application/json')) { + if (req.postData.jsonObj) { + options.body = req.postData.jsonObj + options.json = true + } + } + else if (test('multipart/form-data')) { + options.formData = {} - req.postData.params.forEach(function (param) { - var attachment = {} + req.postData.params.forEach(function (param) { + var attachment = {} - if (!param.fileName && !param.fileName && !param.contentType) { - options.formData[param.name] = param.value - return - } + if (!param.fileName && !param.fileName && !param.contentType) { + options.formData[param.name] = param.value + return + } - // attempt to read from disk! - if (param.fileName && !param.value) { - attachment.value = fs.createReadStream(param.fileName) - } else if (param.value) { - attachment.value = param.value - } + // attempt to read from disk! + if (param.fileName && !param.value) { + attachment.value = fs.createReadStream(param.fileName) + } else if (param.value) { + attachment.value = param.value + } - if (param.fileName) { - attachment.options = { - filename: param.fileName, - contentType: param.contentType ? param.contentType : null - } + if (param.fileName) { + attachment.options = { + filename: param.fileName, + contentType: param.contentType ? param.contentType : null } - - options.formData[param.name] = attachment - }) - break - - default: - if (req.postData.text) { - options.body = req.postData.text } + + options.formData[param.name] = attachment + }) + } + else { + if (req.postData.text) { + options.body = req.postData.text + } } return options diff --git a/deps/npm/node_modules/request/lib/redirect.js b/deps/npm/node_modules/request/lib/redirect.js index b2d0f613a35d17..040dfe0e03d335 100644 --- a/deps/npm/node_modules/request/lib/redirect.js +++ b/deps/npm/node_modules/request/lib/redirect.js @@ -105,7 +105,7 @@ Redirect.prototype.onResponse = function (response) { // handle the case where we change protocol from https to http or vice versa if (request.uri.protocol !== uriPrev.protocol) { - request._updateProtocol() + delete request.agent } self.redirects.push( @@ -120,7 +120,6 @@ Redirect.prototype.onResponse = function (response) { // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 delete request.src delete request.req - delete request.agent delete request._started if (response.statusCode !== 401 && response.statusCode !== 307) { // Remove parameters from the previous response, unless this is the second request @@ -141,7 +140,7 @@ Redirect.prototype.onResponse = function (response) { } if (!self.removeRefererHeader) { - request.setHeader('referer', request.uri.href) + request.setHeader('referer', uriPrev.href) } request.emit('redirect') diff --git a/deps/npm/node_modules/request/lib/tunnel.js b/deps/npm/node_modules/request/lib/tunnel.js index cf28016e26ae36..918aec69afbc21 100644 --- a/deps/npm/node_modules/request/lib/tunnel.js +++ b/deps/npm/node_modules/request/lib/tunnel.js @@ -34,7 +34,7 @@ var defaultProxyHeaderExclusiveList = [ ] function constructProxyHost(uriObject) { - var port = uriObject.portA + var port = uriObject.port , protocol = uriObject.protocol , proxyHost = uriObject.hostname + ':' @@ -109,22 +109,19 @@ function Tunnel (request) { this.request = request this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList this.proxyHeaderExclusiveList = [] -} - -Tunnel.prototype.isEnabled = function (options) { - var request = this.request - // Tunnel HTTPS by default, or if a previous request in the redirect chain - // was tunneled. Allow the user to override this setting. - - // If self.tunnel is already set (because this is a redirect), use the - // existing value. if (typeof request.tunnel !== 'undefined') { - return request.tunnel + this.tunnelOverride = request.tunnel } +} + +Tunnel.prototype.isEnabled = function () { + var self = this + , request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. - // If options.tunnel is set (the user specified a value), use it. - if (typeof options.tunnel !== 'undefined') { - return options.tunnel + // If self.tunnelOverride is set (the user specified a value), use it. + if (typeof self.tunnelOverride !== 'undefined') { + return self.tunnelOverride } // If the destination is HTTPS, tunnel. @@ -132,10 +129,8 @@ Tunnel.prototype.isEnabled = function (options) { return true } - // Otherwise, leave tunnel unset, because if a later request in the redirect - // chain is HTTPS then that request (and any subsequent ones) should be - // tunneled. - return undefined + // Otherwise, do not use tunnel. + return false } Tunnel.prototype.setup = function (options) { diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json index 0fe40d0b6e88b3..c90bace3c0f2e4 100644 --- a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json +++ b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json @@ -18,32 +18,14 @@ "engines": { "node": "*" }, - "gitHead": "8554bdb41268fa295eb1ee300f4adaa9f7f07fec", + "readme": "aws-sign\n========\n\nAWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mikeal/aws-sign/issues" }, "homepage": "https://github.com/mikeal/aws-sign#readme", "_id": "aws-sign2@0.6.0", - "scripts": {}, "_shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "_from": "aws-sign2@>=0.6.0 <0.7.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - } - ], - "dist": { - "shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "tarball": "http://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "aws-sign2@>=0.6.0 <0.7.0" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml index f7968279b51e1d..cfe1c9439388b6 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml @@ -15,23 +15,33 @@ matrix: env: TASK=test - node_js: '0.12' env: TASK=test - - node_js: 'iojs' + - node_js: 1 env: TASK=test - - node_js: 'iojs' + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: node + env: TASK=test + - node_js: node env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="41..beta" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="36..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="['6.1', '7.1', '8.2']" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="['6.1', '7.1', '8.2']" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 'iojs' + - node_js: node env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" script: "npm run $TASK" env: diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown index 4df9c088d13109..bf544f9f2565f3 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown @@ -4,7 +4,7 @@ A stream is an abstract interface implemented by various objects in Node.js. For example a [request to an HTTP -server](https://iojs.org/dist/v4.1.2/doc/api/http.html#http_http_incomingmessage) is a stream, as is +server](https://iojs.org/dist/v5.0.0/doc/api/http.html#http_http_incomingmessage) is a stream, as is [stdout][]. Streams are readable, writable, or both. All streams are instances of [EventEmitter][] @@ -136,9 +136,9 @@ destinations drain and ask for more data. Examples of readable streams include: -* [http responses, on the client](https://iojs.org/dist/v4.1.2/doc/api/http.html#http_http_incomingmessage) -* [http requests, on the server](https://iojs.org/dist/v4.1.2/doc/api/http.html#http_http_incomingmessage) -* [fs read streams](https://iojs.org/dist/v4.1.2/doc/api/fs.html#fs_class_fs_readstream) +* [http responses, on the client](https://iojs.org/dist/v5.0.0/doc/api/http.html#http_http_incomingmessage) +* [http requests, on the server](https://iojs.org/dist/v5.0.0/doc/api/http.html#http_http_incomingmessage) +* [fs read streams](https://iojs.org/dist/v5.0.0/doc/api/fs.html#fs_class_fs_readstream) * [zlib streams][] * [crypto streams][] * [tcp sockets][] @@ -538,13 +538,13 @@ that you are writing data *to*. Examples of writable streams include: -* [http requests, on the client](https://iojs.org/dist/v4.1.2/doc/api/http.html#http_class_http_clientrequest) -* [http responses, on the server](https://iojs.org/dist/v4.1.2/doc/api/http.html#http_class_http_serverresponse) -* [fs write streams](https://iojs.org/dist/v4.1.2/doc/api/fs.html#fs_class_fs_writestream) +* [http requests, on the client](https://iojs.org/dist/v5.0.0/doc/api/http.html#http_class_http_clientrequest) +* [http responses, on the server](https://iojs.org/dist/v5.0.0/doc/api/http.html#http_class_http_serverresponse) +* [fs write streams](https://iojs.org/dist/v5.0.0/doc/api/fs.html#fs_class_fs_writestream) * [zlib streams][] * [crypto streams][] * [tcp sockets][] -* [child process stdin](https://iojs.org/dist/v4.1.2/doc/api/child_process.html#child_process_child_stdin) +* [child process stdin](https://iojs.org/dist/v5.0.0/doc/api/child_process.html#child_process_child_stdin) * [process.stdout][], [process.stderr][] #### writable.write(chunk[, encoding][, callback]) @@ -1650,24 +1650,24 @@ JSONParseStream.prototype._flush = function(cb) { ``` -[EventEmitter]: https://iojs.org/dist/v4.1.2/doc/api/events.html#events_class_events_eventemitter +[EventEmitter]: https://iojs.org/dist/v5.0.0/doc/api/events.html#events_class_events_eventemitter [Object mode]: #stream_object_mode [`stream.push(chunk)`]: #stream_readable_push_chunk_encoding [`stream.push(null)`]: #stream_readable_push_chunk_encoding [`stream.push()`]: #stream_readable_push_chunk_encoding [`unpipe()`]: #stream_readable_unpipe_destination [unpiped]: #stream_readable_unpipe_destination -[tcp sockets]: https://iojs.org/dist/v4.1.2/doc/api/net.html#net_class_net_socket +[tcp sockets]: https://iojs.org/dist/v5.0.0/doc/api/net.html#net_class_net_socket [zlib streams]: zlib.html [zlib]: zlib.html [crypto streams]: crypto.html [crypto]: crypto.html -[tls.CryptoStream]: https://iojs.org/dist/v4.1.2/doc/api/tls.html#tls_class_cryptostream -[process.stdin]: https://iojs.org/dist/v4.1.2/doc/api/process.html#process_process_stdin -[stdout]: https://iojs.org/dist/v4.1.2/doc/api/process.html#process_process_stdout -[process.stdout]: https://iojs.org/dist/v4.1.2/doc/api/process.html#process_process_stdout -[process.stderr]: https://iojs.org/dist/v4.1.2/doc/api/process.html#process_process_stderr -[child process stdout and stderr]: https://iojs.org/dist/v4.1.2/doc/api/child_process.html#child_process_child_stdout +[tls.CryptoStream]: https://iojs.org/dist/v5.0.0/doc/api/tls.html#tls_class_cryptostream +[process.stdin]: https://iojs.org/dist/v5.0.0/doc/api/process.html#process_process_stdin +[stdout]: https://iojs.org/dist/v5.0.0/doc/api/process.html#process_process_stdout +[process.stdout]: https://iojs.org/dist/v5.0.0/doc/api/process.html#process_process_stdout +[process.stderr]: https://iojs.org/dist/v5.0.0/doc/api/process.html#process_process_stderr +[child process stdout and stderr]: https://iojs.org/dist/v5.0.0/doc/api/child_process.html#child_process_child_stdout [API for Stream Consumers]: #stream_api_for_stream_consumers [API for Stream Implementors]: #stream_api_for_stream_implementors [Readable]: #stream_class_stream_readable @@ -1686,7 +1686,7 @@ JSONParseStream.prototype._flush = function(cb) { [`_write(chunk, encoding, callback)`]: #stream_writable_write_chunk_encoding_callback_1 [`_write()`]: #stream_writable_write_chunk_encoding_callback_1 [_write]: #stream_writable_write_chunk_encoding_callback_1 -[`util.inherits`]: https://iojs.org/dist/v4.1.2/doc/api/util.html#util_util_inherits_constructor_superconstructor +[`util.inherits`]: https://iojs.org/dist/v5.0.0/doc/api/util.html#util_util_inherits_constructor_superconstructor [`end()`]: #stream_writable_end_chunk_encoding_callback [`'data'` event]: #stream_event_data [`resume()`]: #stream_readable_resume diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js index b2986f5face98b..90068ea249d998 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js @@ -550,6 +550,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { var ondrain = pipeOnDrain(src); dest.on('drain', ondrain); + var cleanedUp = false; function cleanup() { debug('cleanup'); // cleanup event handlers once the pipe is broken @@ -562,6 +563,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) { src.removeListener('end', cleanup); 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. @@ -577,9 +580,16 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('ondata'); var ret = dest.write(chunk); if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + if (state.pipesCount === 1 && + state.pipes[0] === dest && + src.listenerCount('data') === 1 && + !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + } src.pause(); } } @@ -879,6 +889,8 @@ function fromList(n, state) { // read it all, truncate the array. if (stringMode) ret = list.join(''); + else if (list.length === 1) + ret = list[0]; else ret = Buffer.concat(list, length); list.length = 0; diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js index 091b991c73ecf3..23a2ba295df2f1 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js @@ -1,5 +1,5 @@ // A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all +// Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. 'use strict'; diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE new file mode 100644 index 00000000000000..d8d7f9437dbf5a --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js index 9074e8ebcb61e9..ff4c851c075a2f 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -21,8 +21,12 @@ // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; } exports.isArray = isArray; @@ -62,7 +66,7 @@ function isUndefined(arg) { exports.isUndefined = isUndefined; function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; + return objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; @@ -72,13 +76,12 @@ function isObject(arg) { exports.isObject = isObject; function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; + return objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); + return (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; @@ -97,11 +100,8 @@ function isPrimitive(arg) { } exports.isPrimitive = isPrimitive; -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; +exports.isBuffer = Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); -} \ No newline at end of file +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json index 466dfdfe0139b3..83e519e7b464a5 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -1,6 +1,6 @@ { "name": "core-util-is", - "version": "1.0.1", + "version": "1.0.2", "description": "The `util.is*` functions introduced in Node v0.12.", "main": "lib/util.js", "repository": { @@ -27,27 +27,17 @@ "bugs": { "url": "https://github.com/isaacs/core-util-is/issues" }, - "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is", - "_id": "core-util-is@1.0.1", - "dist": { - "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "scripts": { + "test": "tap test.js" }, - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_npmVersion": "1.3.23", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" + "devDependencies": { + "tap": "^2.3.0" }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "_id": "core-util-is@1.0.2", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_from": "core-util-is@>=1.0.0 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js new file mode 100644 index 00000000000000..1a490c65ac8b5d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js deleted file mode 100644 index 007fa10575636d..00000000000000 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +++ /dev/null @@ -1,106 +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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return arg instanceof Buffer; -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml index 5ac98855343cee..36201b10017a5e 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml @@ -4,4 +4,9 @@ node_js: - "0.10" - "0.11" - "0.12" - - "iojs" + - "1.7.1" + - 1 + - 2 + - 3 + - 4 + - 5 diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js index 049521cad7ba1b..571c276783c779 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js @@ -1,5 +1,12 @@ 'use strict'; -module.exports = nextTick; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} function nextTick(fn) { var args = new Array(arguments.length - 1); diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json index 087586e8f8cedd..4019a28addcd88 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json @@ -1,6 +1,6 @@ { "name": "process-nextick-args", - "version": "1.0.3", + "version": "1.0.6", "description": "process.nextTick but always with args", "main": "index.js", "scripts": { @@ -19,19 +19,19 @@ "devDependencies": { "tap": "~0.2.6" }, - "gitHead": "e855846a69662b9489f1ad3dde1ebf2ccc4370b8", - "_id": "process-nextick-args@1.0.3", - "_shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", + "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78", + "_id": "process-nextick-args@1.0.6", + "_shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", "_from": "process-nextick-args@>=1.0.0 <1.1.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.5.0", + "_npmVersion": "2.14.4", + "_nodeVersion": "4.1.1", "_npmUser": { "name": "cwmma", "email": "calvin.metcalf@gmail.com" }, "dist": { - "shasum": "e272eed825d5e9f4ea74d8d73b1fe311c3beb630", - "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz" + "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", + "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" }, "maintainers": [ { @@ -40,6 +40,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.3.tgz", + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json index 0364d54ba46af6..ee70702359198d 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -22,33 +22,13 @@ "browserify" ], "license": "MIT", - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion 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. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, "_id": "string_decoder@0.10.31", "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "readme": "ERROR: No README data found!" + "_from": "string_decoder@>=0.10.0 <0.11.0" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json index ae0c70f6c633f1..f68d8bb958657f 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json @@ -28,27 +28,10 @@ "url": "https://github.com/TooTallNate/util-deprecate/issues" }, "homepage": "https://github.com/TooTallNate/util-deprecate", - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "readme": "util-deprecate\n==============\n### The Node.js `util.deprecate()` function with browser support\n\nIn Node.js, this module simply re-exports the `util.deprecate()` function.\n\nIn the web browser (i.e. via browserify), a browser-specific implementation\nof the `util.deprecate()` function is used.\n\n\n## API\n\nA `deprecate()` function is the only thing exposed by this module.\n\n``` javascript\n// setup:\nexports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');\n\n\n// users see:\nfoo();\n// foo() is deprecated, use bar() instead\nfoo();\nfoo();\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Nathan Rajlich \n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", "_id": "util-deprecate@1.0.2", "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "readme": "ERROR: No README data found!" + "_from": "util-deprecate@>=1.0.1 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json index 4dbae1ff0d1520..c0698efcb36108 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "2.0.3", + "version": "2.0.4", "description": "Streams3, a user-land copy of the stream library from iojs v2.x", "main": "readable.js", "dependencies": { @@ -34,43 +34,14 @@ "util": false }, "license": "MIT", - "gitHead": "58099551e1ea7d99f8d13495740c5ae3f5d98053", + "readme": "# readable-stream\n\n***Node-core streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)\n\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)\n\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)\n\n```bash\nnpm install --save readable-stream\n```\n\n***Node-core streams for userland***\n\nThis package is a mirror of the Streams2 and Streams3 implementations in\nNode-core, including [documentation](doc/stream.markdown).\n\nIf you want to guarantee a stable streams base, regardless of what version of\nNode 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).\n\nAs of version 2.0.0 **readable-stream** uses semantic versioning. \n\n# Streams WG Team Members\n\n* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com>\n - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B\n* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>\n - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242\n* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org>\n - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D\n* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com>\n* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>\n* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me>\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/nodejs/readable-stream/issues" }, "homepage": "https://github.com/nodejs/readable-stream#readme", - "_id": "readable-stream@2.0.3", - "_shasum": "4ab16b2aba452374b542a3f4f528634b9b45bb5a", - "_from": "readable-stream@>=2.0.0 <2.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "dist": { - "shasum": "4ab16b2aba452374b542a3f4f528634b9b45bb5a", - "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.3.tgz", - "readme": "ERROR: No README data found!" + "_id": "readable-stream@2.0.4", + "_shasum": "2523ef27ffa339d7ba9da8603f2d0599d06edbd8", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz", + "_from": "readable-stream@>=2.0.0 <2.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/bl/package.json b/deps/npm/node_modules/request/node_modules/bl/package.json index 1513847030a9eb..b5dcf4a692596f 100644 --- a/deps/npm/node_modules/request/node_modules/bl/package.json +++ b/deps/npm/node_modules/request/node_modules/bl/package.json @@ -33,30 +33,13 @@ "faucet": "~0.0.1", "brtapsauce": "~0.3.0" }, - "gitHead": "1794938be6697a6d1e02cd942a4eea59b353347a", + "readme": "# bl *(BufferList)*\n\n[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl)\n\n**A Node.js Buffer list collector, reader and streamer thingy.**\n\n[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/)\n[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/)\n\n**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!\n\nThe original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.\n\n```js\nconst BufferList = require('bl')\n\nvar bl = new BufferList()\nbl.append(new Buffer('abcd'))\nbl.append(new Buffer('efg'))\nbl.append('hi') // bl will also accept & convert Strings\nbl.append(new Buffer('j'))\nbl.append(new Buffer([ 0x3, 0x4 ]))\n\nconsole.log(bl.length) // 12\n\nconsole.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'\nconsole.log(bl.slice(3, 10).toString('ascii')) // 'defghij'\nconsole.log(bl.slice(3, 6).toString('ascii')) // 'def'\nconsole.log(bl.slice(3, 8).toString('ascii')) // 'defgh'\nconsole.log(bl.slice(5, 10).toString('ascii')) // 'fghij'\n\n// or just use toString!\nconsole.log(bl.toString()) // 'abcdefghij\\u0003\\u0004'\nconsole.log(bl.toString('ascii', 3, 8)) // 'defgh'\nconsole.log(bl.toString('ascii', 5, 10)) // 'fghij'\n\n// other standard Buffer readables\nconsole.log(bl.readUInt16BE(10)) // 0x0304\nconsole.log(bl.readUInt16LE(10)) // 0x0403\n```\n\nGive it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:\n\n```js\nconst bl = require('bl')\n , fs = require('fs')\n\nfs.createReadStream('README.md')\n .pipe(bl(function (err, data) { // note 'new' isn't strictly required\n // `data` is a complete Buffer object containing the full data\n console.log(data.toString())\n }))\n```\n\nNote that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.\n\nOr to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):\n```js\nconst hyperquest = require('hyperquest')\n , bl = require('bl')\n , url = 'https://raw.github.com/rvagg/bl/master/README.md'\n\nhyperquest(url).pipe(bl(function (err, data) {\n console.log(data.toString())\n}))\n```\n\nOr, use it as a readable stream to recompose a list of Buffers to an output source:\n\n```js\nconst BufferList = require('bl')\n , fs = require('fs')\n\nvar bl = new BufferList()\nbl.append(new Buffer('abcd'))\nbl.append(new Buffer('efg'))\nbl.append(new Buffer('hi'))\nbl.append(new Buffer('j'))\n\nbl.pipe(fs.createWriteStream('gibberish.txt'))\n```\n\n## API\n\n * new BufferList([ callback ])\n * bl.length\n * bl.append(buffer)\n * bl.get(index)\n * bl.slice([ start[, end ] ])\n * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])\n * bl.duplicate()\n * bl.consume(bytes)\n * bl.toString([encoding, [ start, [ end ]]])\n * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()\n * Streams\n\n--------------------------------------------------------\n\n### new BufferList([ callback | buffer | buffer array ])\nThe constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.\n\nNormally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.\n\n`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:\n\n```js\nvar bl = require('bl')\nvar myinstance = bl()\n\n// equivilant to:\n\nvar BufferList = require('bl')\nvar myinstance = new BufferList()\n```\n\n--------------------------------------------------------\n\n### bl.length\nGet the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.\n\n--------------------------------------------------------\n\n### bl.append(buffer)\n`append(buffer)` adds an additional buffer or BufferList to the internal list.\n\n--------------------------------------------------------\n\n### bl.get(index)\n`get()` will return the byte at the specified index.\n\n--------------------------------------------------------\n\n### bl.slice([ start, [ end ] ])\n`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.\n\nIf the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.\n\n--------------------------------------------------------\n\n### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])\n`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.\n\n--------------------------------------------------------\n\n### bl.duplicate()\n`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:\n\n```js\nvar bl = new BufferList()\n\nbl.append('hello')\nbl.append(' world')\nbl.append('\\n')\n\nbl.duplicate().pipe(process.stdout, { end: false })\n\nconsole.log(bl.toString())\n```\n\n--------------------------------------------------------\n\n### bl.consume(bytes)\n`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data.\n\n--------------------------------------------------------\n\n### bl.toString([encoding, [ start, [ end ]]])\n`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.\n\n--------------------------------------------------------\n\n### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()\n\nAll of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.\n\nSee the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work.\n\n--------------------------------------------------------\n\n### Streams\n**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance.\n\n--------------------------------------------------------\n\n## Contributors\n\n**bl** is brought to you by the following hackers:\n\n * [Rod Vagg](https://github.com/rvagg)\n * [Matteo Collina](https://github.com/mcollina)\n * [Jarett Cruger](https://github.com/jcrugzz)\n\n=======\n\n\n## License & copyright\n\nCopyright (c) 2013-2014 bl contributors (listed above).\n\nbl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/rvagg/bl/issues" }, "_id": "bl@1.0.0", "_shasum": "ada9a8a89a6d7ac60862f7dec7db207873e0c3f5", - "_from": "bl@>=1.0.0 <1.1.0", - "_npmVersion": "2.9.0", - "_nodeVersion": "2.0.1-nightly20150618d2e4e03444", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "dist": { - "shasum": "ada9a8a89a6d7ac60862f7dec7db207873e0c3f5", - "tarball": "http://registry.npmjs.org/bl/-/bl-1.0.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/bl/-/bl-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "bl@>=1.0.0 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/caseless/package.json b/deps/npm/node_modules/request/node_modules/caseless/package.json index 2cd79ea01ab69b..50e085532bb041 100644 --- a/deps/npm/node_modules/request/node_modules/caseless/package.json +++ b/deps/npm/node_modules/request/node_modules/caseless/package.json @@ -27,36 +27,11 @@ "devDependencies": { "tape": "^2.10.2" }, - "gitHead": "c578232a02cc2b46b6da8851caf57fdbfac89ff5", + "readme": "## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing.\n\nThis library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set.\n\n## Usage\n\n```javascript\nvar headers = {}\n , c = caseless(headers)\n ;\nc.set('a-Header', 'asdf')\nc.get('a-header') === 'asdf'\n```\n\n## has(key)\n\nHas takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with.\n\n```javascript\nc.has('a-header') === 'a-Header'\n```\n\n## set(key, value[, clobber=true])\n\nSet is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header.\n\n```javascript\nc.set('a-Header', 'fdas')\nc.set('a-HEADER', 'more', false)\nc.get('a-header') === 'fdsa,more'\n```\n\n## swap(key)\n\nSwaps the casing of a header with the new one that is passed in.\n\n```javascript\nvar headers = {}\n , c = caseless(headers)\n ;\nc.set('a-Header', 'fdas')\nc.swap('a-HEADER')\nc.has('a-header') === 'a-HEADER'\nheaders === {'a-HEADER': 'fdas'}\n```\n", + "readmeFilename": "README.md", "homepage": "https://github.com/mikeal/caseless#readme", "_id": "caseless@0.11.0", "_shasum": "715b96ea9841593cc33067923f5ec60ebda4f7d7", - "_from": "caseless@>=0.11.0 <0.12.0", - "_npmVersion": "2.8.3", - "_nodeVersion": "1.8.1", - "_npmUser": { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - } - ], - "dist": { - "shasum": "715b96ea9841593cc33067923f5ec60ebda4f7d7", - "tarball": "http://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "caseless@>=0.11.0 <0.12.0" } diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json index 8ac66b814c8162..5741476c399470 100644 --- a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json +++ b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json @@ -31,34 +31,13 @@ "fake": "0.2.0", "far": "0.0.1" }, - "gitHead": "07a9dc99fb8f1a488160026b9ad77493f766fb84", + "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/felixge/node-delayed-stream/issues" }, "_id": "delayed-stream@1.0.0", "_shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619", - "_from": "delayed-stream@>=1.0.0 <1.1.0", - "_npmVersion": "2.8.3", - "_nodeVersion": "1.6.4", - "_npmUser": { - "name": "apechimp", - "email": "apeherder@gmail.com" - }, - "dist": { - "shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619", - "tarball": "http://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - }, - "maintainers": [ - { - "name": "felixge", - "email": "felix@debuggable.com" - }, - { - "name": "apechimp", - "email": "apeherder@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "delayed-stream@>=1.0.0 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/package.json index e0cd160ff6dbe5..56a56db2fda690 100644 --- a/deps/npm/node_modules/request/node_modules/combined-stream/package.json +++ b/deps/npm/node_modules/request/node_modules/combined-stream/package.json @@ -26,42 +26,13 @@ "far": "~0.0.7" }, "license": "MIT", - "gitHead": "cfc7b815d090a109bcedb5bb0f6713148d55a6b7", + "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n**NB** Currently `combined-stream` works with streams vesrion 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatability with `combined-stream`.\n\n- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.\n\n- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = `true`\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = `2 * 1024 * 1024`\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = `0`\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/felixge/node-combined-stream/issues" }, "_id": "combined-stream@1.0.5", "_shasum": "938370a57b4a51dea2c77c15d5c5fdf895164009", - "_from": "combined-stream@>=1.0.5 <1.1.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", - "_npmUser": { - "name": "alexindigo", - "email": "iam@alexindigo.com" - }, - "dist": { - "shasum": "938370a57b4a51dea2c77c15d5c5fdf895164009", - "tarball": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz" - }, - "maintainers": [ - { - "name": "felixge", - "email": "felix@debuggable.com" - }, - { - "name": "celer", - "email": "dtyree77@gmail.com" - }, - { - "name": "alexindigo", - "email": "iam@alexindigo.com" - }, - { - "name": "apechimp", - "email": "apeherder@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "readme": "ERROR: No README data found!" + "_from": "combined-stream@>=1.0.5 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/extend/package.json b/deps/npm/node_modules/request/node_modules/extend/package.json index c8c7cac9967924..5c87f645980f2d 100644 --- a/deps/npm/node_modules/request/node_modules/extend/package.json +++ b/deps/npm/node_modules/request/node_modules/extend/package.json @@ -39,35 +39,14 @@ "eslint": "^0.24.0" }, "license": "MIT", - "gitHead": "148e7270cab2e9413af2cd0cab147070d755ed6d", + "readme": "[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n\n# extend() for Node.js [![Version Badge][npm-version-png]][npm-url]\n\n`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.\n\n## Installation\n\nThis package is available on [npm][npm-url] as: `extend`\n\n``` sh\nnpm install extend\n```\n\n## Usage\n\n**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**\n\n*Extend one object with one or more others, returning the modified object.*\n\nKeep in mind that the target object will be modified, and will be returned from extend().\n\nIf a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).\nUndefined properties are not copied. However, properties inherited from the object's prototype will be copied over.\nWarning: passing `false` as the first argument is not supported.\n\n### Arguments\n\n* `deep` *Boolean* (optional)\nIf set, the merge becomes recursive (i.e. deep copy).\n* `target`\t*Object*\nThe object to extend.\n* `object1`\t*Object*\nThe object that will be merged into the first.\n* `objectN` *Object* (Optional)\nMore objects to merge into the first.\n\n## License\n\n`node-extend` is licensed under the [MIT License][mit-license-url].\n\n## Acknowledgements\n\nAll credit to the jQuery authors for perfecting this amazing utility.\n\nPorted to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].\n\n[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg\n[travis-url]: https://travis-ci.org/justmoon/node-extend\n[npm-url]: https://npmjs.org/package/extend\n[mit-license-url]: http://opensource.org/licenses/MIT\n[github-justmoon]: https://github.com/justmoon\n[github-insin]: https://github.com/insin\n[github-ljharb]: https://github.com/ljharb\n[npm-version-png]: http://vb.teelaun.ch/justmoon/node-extend.svg\n[deps-svg]: https://david-dm.org/justmoon/node-extend.svg\n[deps-url]: https://david-dm.org/justmoon/node-extend\n[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg\n[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies\n\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/justmoon/node-extend/issues" }, "homepage": "https://github.com/justmoon/node-extend#readme", "_id": "extend@3.0.0", "_shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4", - "_from": "extend@>=3.0.0 <3.1.0", - "_npmVersion": "2.11.3", - "_nodeVersion": "2.3.1", - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "dist": { - "shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4", - "tarball": "http://registry.npmjs.org/extend/-/extend-3.0.0.tgz" - }, - "maintainers": [ - { - "name": "justmoon", - "email": "justmoon@members.fsf.org" - }, - { - "name": "ljharb", - "email": "ljharb@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "extend@>=3.0.0 <3.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json index 4460b7d34ce74e..1b5f24165d98e6 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json @@ -84,40 +84,11 @@ "tests" ] }, - "gitHead": "621f13805aa326865b85dbbf7128baf7146ab976", + "readme": "# Async.js\n\n[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)\n[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async)\n[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)\n[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [Node.js](http://nodejs.org) and installable via `npm install async`,\nit can also be used directly in the browser.\n\nAsync is also installable via:\n\n- [bower](http://bower.io/): `bower install async`\n- [component](https://github.com/component/component): `component install\n caolan/async`\n- [jam](http://jamjs.org/): `jam install async`\n- [spm](http://spmjs.io/): `spm install async`\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns\nfor asynchronous control flow (`parallel`, `series`, `waterfall`…). All these\nfunctions assume you follow the Node.js convention of providing a single\ncallback as the last argument of your `async` function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)\n### Synchronous iteration functions\n\nIf you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop.\n\nThis can also arise by accident if you callback early in certain cases:\n\n```js\nasync.eachSeries(hugeArray, function iterator(item, callback) {\n if (inCache(item)) {\n callback(null, cache[item]); // if many items are cached, you'll overflow\n } else {\n doSomeIO(item, callback);\n }\n}, function done() {\n //...\n});\n```\n\nJust change it to:\n\n```js\nasync.eachSeries(hugeArray, function iterator(item, callback) {\n if (inCache(item)) {\n async.setImmediate(function () {\n callback(null, cache[item]);\n });\n } else {\n doSomeIO(item, callback);\n //...\n```\n\nAsync guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral.\n\nIf JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works.\n\n\n### Multiple callbacks\n\nMake sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.\n\n```js\nasync.waterfall([\n function (callback) {\n getSomething(options, function (err, result) {\n if (err) {\n callback(new Error(\"failed getting something:\" + err.message));\n // we should return here\n }\n // since we did not return, this callback still will be called and\n // `processData` will be called twice\n callback(null, result);\n });\n },\n processData\n], done)\n```\n\nIt is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function.\n\n\n### Binding a context to an iterator\n\nThis section is really about `bind`, not about `async`. If you are wondering how to\nmake `async` execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){\n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its\n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](https://github.com/caolan/async/blob/master/lib/async.js).\nAlternatively, you can install using Node Package Manager (`npm`):\n\n npm install async\n\nAs well as using Bower:\n\n bower install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.\n\nUsage:\n\n```html\n\n\n```\n\n## Documentation\n\nSome functions are also available in the following forms:\n* `Series` - the same as `` but runs only a single async operation at a time\n* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time\n\n### Collections\n\n* [`each`](#each), `eachSeries`, `eachLimit`\n* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit`\n* [`map`](#map), `mapSeries`, `mapLimit`\n* [`filter`](#filter), `filterSeries`, `filterLimit`\n* [`reject`](#reject), `rejectSeries`, `rejectLimit`\n* [`reduce`](#reduce), [`reduceRight`](#reduceRight)\n* [`detect`](#detect), `detectSeries`, `detectLimit`\n* [`sortBy`](#sortBy)\n* [`some`](#some), `someLimit`\n* [`every`](#every), `everyLimit`\n* [`concat`](#concat), `concatSeries`\n\n### Control Flow\n\n* [`series`](#seriestasks-callback)\n* [`parallel`](#parallel), `parallelLimit`\n* [`whilst`](#whilst), [`doWhilst`](#doWhilst)\n* [`until`](#until), [`doUntil`](#doUntil)\n* [`during`](#during), [`doDuring`](#doDuring)\n* [`forever`](#forever)\n* [`waterfall`](#waterfall)\n* [`compose`](#compose)\n* [`seq`](#seq)\n* [`applyEach`](#applyEach), `applyEachSeries`\n* [`queue`](#queue), [`priorityQueue`](#priorityQueue)\n* [`cargo`](#cargo)\n* [`auto`](#auto)\n* [`retry`](#retry)\n* [`iterator`](#iterator)\n* [`times`](#times), `timesSeries`, `timesLimit`\n\n### Utils\n\n* [`apply`](#apply)\n* [`nextTick`](#nextTick)\n* [`memoize`](#memoize)\n* [`unmemoize`](#unmemoize)\n* [`ensureAsync`](#ensureAsync)\n* [`constant`](#constant)\n* [`asyncify`](#asyncify)\n* [`wrapSync`](#wrapSync)\n* [`log`](#log)\n* [`dir`](#dir)\n* [`noConflict`](#noConflict)\n\n## Collections\n\n\n\n### each(arr, iterator, [callback])\n\nApplies the function `iterator` to each item in `arr`, in parallel.\nThe `iterator` is called with an item from the list, and a callback for when it\nhas finished. If the `iterator` passes an error to its `callback`, the main\n`callback` (for the `each` function) is immediately called with the error.\n\nNote, that since this function applies `iterator` to each item in parallel,\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has\n completed. If no error has occurred, the `callback` should be run without\n arguments or with an explicit `null` argument. The array index is not passed\n to the iterator. If you need the index, use [`forEachOf`](#forEachOf).\n* `callback(err)` - *Optional* A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Examples__\n\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n```js\n// assuming openFiles is an array of file names\n\nasync.each(openFiles, function(file, callback) {\n\n // Perform operation on file here.\n console.log('Processing file ' + file);\n\n if( file.length > 32 ) {\n console.log('This file name is too long');\n callback('File name too long');\n } else {\n // Do work to process file here\n console.log('File processed');\n callback();\n }\n}, function(err){\n // if any of the file processing produced an error, err would equal that error\n if( err ) {\n // One of the iterations produced an error.\n // All processing will now stop.\n console.log('A file failed to process');\n } else {\n console.log('All files have been processed successfully');\n }\n});\n```\n\n__Related__\n\n* eachSeries(arr, iterator, [callback])\n* eachLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n\n\n### forEachOf(obj, iterator, [callback])\n\nLike `each`, except that it iterates over objects, and passes the key as the second argument to the iterator.\n\n__Arguments__\n\n* `obj` - An object or array to iterate over.\n* `iterator(item, key, callback)` - A function to apply to each item in `obj`.\nThe `key` is the item's key, or index in the case of an array. The iterator is\npassed a `callback(err)` which must be called once it has completed. If no\nerror has occurred, the callback should be run without arguments or with an\nexplicit `null` argument.\n* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs.\n\n__Example__\n\n```js\nvar obj = {dev: \"/dev.json\", test: \"/test.json\", prod: \"/prod.json\"};\nvar configs = {};\n\nasync.forEachOf(obj, function (value, key, callback) {\n fs.readFile(__dirname + value, \"utf8\", function (err, data) {\n if (err) return callback(err);\n try {\n configs[key] = JSON.parse(data);\n } catch (e) {\n return callback(e);\n }\n callback();\n })\n}, function (err) {\n if (err) console.error(err.message);\n // configs is now a map of JSON data\n doSomethingWith(configs);\n})\n```\n\n__Related__\n\n* forEachOfSeries(obj, iterator, [callback])\n* forEachOfLimit(obj, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### map(arr, iterator, [callback])\n\nProduces a new array of values by mapping each value in `arr` through\nthe `iterator` function. The `iterator` is called with an item from `arr` and a\ncallback for when it has finished processing. Each of these callback takes 2 arguments:\nan `error`, and the transformed item from `arr`. If `iterator` passes an error to its\ncallback, the main `callback` (for the `map` function) is immediately called with the error.\n\nNote, that since this function applies the `iterator` to each item in parallel,\nthere is no guarantee that the `iterator` functions will complete in order.\nHowever, the results array will be in the same order as the original `arr`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once\n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - *Optional* A callback which is called when all `iterator`\n functions have finished, or an error occurs. Results is an array of the\n transformed items from the `arr`.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n__Related__\n* mapSeries(arr, iterator, [callback])\n* mapLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n\n### filter(arr, iterator, [callback])\n\n__Alias:__ `select`\n\nReturns a new array of all the values in `arr` which pass an async truth test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The `iterator` is passed a `callback(truthValue)`, which must be called with a\n boolean argument once it has completed.\n* `callback(results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n__Related__\n\n* filterSeries(arr, iterator, [callback])\n* filterLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### reject(arr, iterator, [callback])\n\nThe opposite of [`filter`](#filter). Removes values that pass an `async` truth test.\n\n__Related__\n\n* rejectSeries(arr, iterator, [callback])\n* rejectLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, [callback])\n\n__Aliases:__ `inject`, `foldl`\n\nReduces `arr` into a single value using an async `iterator` to return\neach successive step. `memo` is the initial state of the reduction.\nThis function only operates in series.\n\nFor performance reasons, it may make sense to split a call to this function into\na parallel map, and then use the normal `Array.prototype.reduce` on the results.\nThis function is for situations where each step in the reduction needs to be async;\nif you can get the data before reducing it, then it's probably a good idea to do so.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `memo` - The initial state of the reduction.\n* `iterator(memo, item, callback)` - A function applied to each item in the\n array to produce the next step in the reduction. The `iterator` is passed a\n `callback(err, reduction)` which accepts an optional error as its first\n argument, and the state of the reduction as the second. If an error is\n passed to the callback, the reduction is stopped and the main `callback` is\n immediately called with the error.\n* `callback(err, result)` - *Optional* A callback which is called after all the `iterator`\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, [callback])\n\n__Alias:__ `foldr`\n\nSame as [`reduce`](#reduce), only operates on `arr` in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, [callback])\n\nReturns the first value in `arr` that passes an async truth test. The\n`iterator` is applied in parallel, meaning the first iterator to return `true` will\nfire the detect `callback` with that result. That means the result might not be\nthe first item in the original `arr` (in terms of order) that passes the test.\n\nIf order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The iterator is passed a `callback(truthValue)` which must be called with a\n boolean argument once it has completed. **Note: this callback does not take an error as its first argument.**\n* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns\n `true`, or after all the `iterator` functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value `undefined` if none passed. **Note: this callback does not take an error as its first argument.**\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n__Related__\n\n* detectSeries(arr, iterator, [callback])\n* detectLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, [callback])\n\nSorts a list by the results of running each `arr` value through an async `iterator`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, sortValue)` which must be called once it\n has completed with an error (which can be `null`) and a value to use as the sort\n criteria.\n* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is the items from\n the original `arr` sorted by the values returned by the `iterator` calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n__Sort Order__\n\nBy modifying the callback parameter the sorting order can be influenced:\n\n```js\n//ascending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(null, x);\n}, function(err,result){\n //result callback\n} );\n\n//descending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(null, x*-1); //<- x*-1 instead of x, turns the order around\n}, function(err,result){\n //result callback\n} );\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, [callback])\n\n__Alias:__ `any`\n\nReturns `true` if at least one element in the `arr` satisfies an async test.\n_The callback for each iterator call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. Once any iterator\ncall returns `true`, the main `callback` is immediately called.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a `callback(truthValue)`` which must be\n called with a boolean argument once it has completed.\n* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns\n `true`, or after all the iterator functions have finished. Result will be\n either `true` or `false` depending on the values of the async tests.\n\n **Note: the callbacks do not take an error as their first argument.**\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n__Related__\n\n* someLimit(arr, limit, iterator, callback)\n\n---------------------------------------\n\n\n### every(arr, iterator, [callback])\n\n__Alias:__ `all`\n\nReturns `true` if every element in `arr` satisfies an async test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a `callback(truthValue)` which must be\n called with a boolean argument once it has completed.\n* `callback(result)` - *Optional* A callback which is called after all the `iterator`\n functions have finished. Result will be either `true` or `false` depending on\n the values of the async tests.\n\n **Note: the callbacks do not take an error as their first argument.**\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n__Related__\n\n* everyLimit(arr, limit, iterator, callback)\n\n---------------------------------------\n\n\n### concat(arr, iterator, [callback])\n\nApplies `iterator` to each item in `arr`, concatenating the results. Returns the\nconcatenated list. The `iterator`s are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of `arr` passed to the `iterator` function.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, results)` which must be called once it\n has completed with an error (which can be `null`) and an array of results.\n* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is an array containing\n the concatenated results of the `iterator` function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n__Related__\n\n* concatSeries(arr, iterator, [callback])\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun the functions in the `tasks` array in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run, and `callback` is immediately called with the value of the error.\nOtherwise, `callback` receives an array of results when `tasks` have completed.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function, and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`series`](#series).\n\n**Note** that while many implementations preserve the order of object properties, the\n[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)\nexplicitly states that\n\n> The mechanics and order of enumerating the properties is not specified.\n\nSo if you rely on the order in which your series of functions are executed, and want\nthis to work on all platforms, consider using an array.\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed\n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all\n the result arguments passed to the `task` callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun the `tasks` array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main `callback` is immediately called with the value of the error.\nOnce the `tasks` have completed, the results are passed to the final `callback` as an\narray.\n\n**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`parallel`](#parallel).\n\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run. Each function is passed\n a `callback(err, result)` which it must call on completion with an error `err`\n (which can be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all\n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n__Related__\n\n* parallelLimit(tasks, limit, [callback])\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\n__Arguments__\n\n* `test()` - synchronous truth test to perform before each execution of `fn`.\n* `fn(callback)` - A function which is called each time `test` passes. The function is\n passed a `callback(err)`, which must be called once it has completed with an\n optional `err` argument.\n* `callback(err)` - A callback which is called after the test fails and repeated\n execution of `fn` has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post-check version of [`whilst`](#whilst). To reflect the difference in\nthe order of operations, the arguments `test` and `fn` are switched.\n\n`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\nThe inverse of [`whilst`](#whilst).\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### during(test, fn, callback)\n\nLike [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.during(\n function (callback) {\n return callback(null, count < 5);\n },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doDuring(fn, test, callback)\n\nThe post-check version of [`during`](#during). To reflect the difference in\nthe order of operations, the arguments `test` and `fn` are switched.\n\nAlso a version of [`doWhilst`](#doWhilst) with asynchronous `test` function.\n\n---------------------------------------\n\n\n### forever(fn, [errback])\n\nCalls the asynchronous function `fn` with a callback parameter that allows it to\ncall itself again, in series, indefinitely.\n\nIf an error is passed to the callback then `errback` is called with the\nerror, and execution stops, otherwise it will never be called.\n\n```js\nasync.forever(\n function(next) {\n // next is suitable for passing to things that need a callback(err [, whatever]);\n // it will result in this function being called again.\n },\n function(err) {\n // if next is called with a value in its first parameter, it will appear\n // in here as 'err', and execution will stop.\n }\n);\n```\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns the `tasks` array of functions in series, each passing their results to the next in\nthe array. However, if any of the `tasks` pass an error to their own callback, the\nnext function is not executed, and the main `callback` is immediately called with\nthe error.\n\n__Arguments__\n\n* `tasks` - An array of functions to run, each function is passed a\n `callback(err, result1, result2, ...)` it must call on completion. The first\n argument is an error (which can be `null`) and any further arguments will be\n passed as arguments in order to the next task.\n* `callback(err, [results])` - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback) {\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback) {\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n },\n function(arg1, callback) {\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done'\n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions `f()`, `g()`, and `h()` would produce the result of\n`f(g(h()))`, only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### seq(fn1, fn2...)\n\nVersion of the compose function that is more natural to read.\nEach function consumes the return value of the previous function.\nIt is the equivalent of [`compose`](#compose) with the arguments reversed.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\n// Requires lodash (or underscore), express3 and dresende's orm2.\n// Part of an app, that fetches cats of the logged user.\n// This example uses `seq` function to avoid overnesting and error\n// handling clutter.\napp.get('/cats', function(request, response) {\n var User = request.models.User;\n async.seq(\n _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))\n function(user, fn) {\n user.getCats(fn); // 'getCats' has signature (callback(err, data))\n }\n )(req.session.user_id, function (err, cats) {\n if (err) {\n console.error(err);\n response.json({ status: 'error', message: err.message });\n } else {\n response.json({ status: 'ok', message: 'Cats found', data: cats });\n }\n });\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling\n`callback` after all functions have completed. If you only provide the first\nargument, then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* `fns` - the asynchronous functions to all call with the same arguments\n* `args...` - any number of separate arguments to pass to the function\n* `callback` - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n__Related__\n\n* applyEachSeries(tasks, args..., [callback])\n\n---------------------------------------\n\n\n### queue(worker, [concurrency])\n\nCreates a `queue` object with the specified `concurrency`. Tasks added to the\n`queue` are processed in parallel (up to the `concurrency` limit). If all\n`worker`s are in progress, the task is queued until one becomes available.\nOnce a `worker` completes a `task`, that `task`'s callback is called.\n\n__Arguments__\n\n* `worker(task, callback)` - An asynchronous function for processing a queued\n task, which must call its `callback(err)` argument when finished, with an\n optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.\n* `concurrency` - An `integer` for determining how many `worker` functions should be\n run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown.\n\n__Queue objects__\n\nThe `queue` object returned by this function has the following properties and\nmethods:\n\n* `length()` - a function returning the number of items waiting to be processed.\n* `started` - a function returning whether or not any items have been pushed and processed by the queue\n* `running()` - a function returning the number of items currently being processed.\n* `workersList()` - a function returning the array of items currently being processed.\n* `idle()` - a function returning false if there are items waiting or being processed, or true if not.\n* `concurrency` - an integer for determining how many `worker` functions should be\n run in parallel. This property can be changed after a `queue` is created to\n alter the concurrency on-the-fly.\n* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once\n the `worker` has finished processing the task. Instead of a single task, a `tasks` array\n can be submitted. The respective callback is used for every task in the list.\n* `unshift(task, [callback])` - add a new task to the front of the `queue`.\n* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,\n and further tasks will be queued.\n* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.\n* `paused` - a boolean for determining whether the queue is in a paused state\n* `pause()` - a function that pauses the processing of tasks until `resume()` is called.\n* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.\n* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle.\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing item');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n\n---------------------------------------\n\n\n### priorityQueue(worker, concurrency)\n\nThe same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:\n\n* `push(task, priority, [callback])` - `priority` should be a number. If an array of\n `tasks` is given, all tasks will be assigned the same priority.\n* The `unshift` method was removed.\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a `cargo` object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the `payload` limit). If the\n`worker` is in progress, the task is queued until it becomes available. Once\nthe `worker` has completed some tasks, each callback of those tasks is called.\nCheck out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work.\n\nWhile [queue](#queue) passes only one task to one of a group of workers\nat a time, cargo passes an array of tasks to a single worker, repeating\nwhen the worker is finished.\n\n__Arguments__\n\n* `worker(tasks, callback)` - An asynchronous function for processing an array of\n queued tasks, which must call its `callback(err)` argument when finished, with\n an optional `err` argument.\n* `payload` - An optional `integer` for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe `cargo` object returned by this function has the following properties and\nmethods:\n\n* `length()` - A function returning the number of items waiting to be processed.\n* `payload` - An `integer` for determining how many tasks should be\n process per round. This property can be changed after a `cargo` is created to\n alter the payload on-the-fly.\n* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called\n once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`\n can be submitted. The respective callback is used for every task in the list.\n* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.\n* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.\n* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue)\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [concurrency], [callback])\n\nDetermines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied.\n\nIf any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far.\n\nNote, all functions are called with a `results` object as a second argument,\nso it is unsafe to pass functions in the `tasks` object which cannot handle the\nextra argument.\n\nFor example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling `readFile` with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to `readFile` in a function which does not forward the\n`results` object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* `tasks` - An object. Each of its properties is either a function or an array of\n requirements, with the function itself the last item in the array. The object's key\n of a property serves as the name of the task defined by that property,\n i.e. can be used when specifying requirements for other tasks.\n The function receives two arguments: (1) a `callback(err, result)` which must be\n called when finished, passing an `error` (which can be `null`) and the result of\n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions.\n* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible.\n* `callback(err, results)` - An optional callback which is called when all the\n tasks have been completed. It receives the `err` argument if any `tasks`\n pass an error to their callback. Results are always returned; however, if\n an error occurs, no further `tasks` will be performed, and the results\n object will only contain partial results.\n\n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n make_folder: function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n },\n write_file: ['get_data', 'make_folder', function(callback, results){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, 'filename');\n }],\n email_link: ['write_file', function(callback, results){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n callback(null, {'file':results.write_file, 'email':'user@example.com'});\n }]\n}, function(err, results) {\n console.log('err = ', err);\n console.log('results = ', results);\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n results.push('filename');\n callback(null);\n },\n function(callback){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n callback(null, {'file':results.pop(), 'email':'user@example.com'});\n }\n ]);\n});\n```\n\nFor a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding\nnew tasks much easier (and the code more readable).\n\n\n---------------------------------------\n\n\n### retry([opts = {times: 5, interval: 0}| 5], task, [callback])\n\nAttempts to get a successful response from `task` no more than `times` times before\nreturning an error. If the task is successful, the `callback` will be passed the result\nof the successful task. If all attempts fail, the callback will be passed the error and\nresult (if any) of the final attempt.\n\n__Arguments__\n\n* `opts` - Can be either an object with `times` and `interval` or a number. `times` is how many attempts should be made before giving up. `interval` is how long to wait inbetween attempts. Defaults to {times: 5, interval: 0}\n * if a number is passed in it sets `times` only (with `interval` defaulting to 0).\n* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`\n which must be called when finished, passing `err` (which can be `null`) and the `result` of\n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions (if nested inside another control flow).\n* `callback(err, results)` - An optional callback which is called when the\n task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.\n\nThe [`retry`](#retry) function can be used as a stand-alone control flow by passing a\ncallback, as shown below:\n\n```js\nasync.retry(3, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\n```js\nasync.retry({times: 3, interval: 200}, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\nIt can also be embedded within other control flow functions to retry individual methods\nthat are not as reliable, like this:\n\n```js\nasync.auto({\n users: api.getUsers.bind(api),\n payments: async.retry(3, api.getPayments.bind(api))\n}, function(err, results) {\n // do something with the results\n});\n```\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the `tasks` array,\nreturning a continuation to call the next one after that. It's also possible to\n“peek” at the next iterator with `iterator.next()`.\n\nThis function is used internally by the `async` module, but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* `tasks` - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied.\n\nUseful as a shorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback), setImmediate(callback)\n\nCalls `callback` on a later loop around the event loop. In Node.js this just\ncalls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`\nif available, otherwise `setTimeout(callback, 0)`, which means other higher priority\nevents may precede the execution of `callback`.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* `callback` - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, iterator, [callback])\n\nCalls the `iterator` function `n` times, and accumulates results in the same manner\nyou would use with [`map`](#map).\n\n__Arguments__\n\n* `n` - The number of times to run the function.\n* `iterator` - The function to call `n` times.\n* `callback` - see [`map`](#map)\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n__Related__\n\n* timesSeries(n, iterator, [callback])\n* timesLimit(n, limit, iterator, [callback])\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an `async` function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nIf no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* `fn` - The function to proxy and cache results from.\n* `hasher` - An optional function for generating a custom hash for storing\n results. It has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized\nform. Handy for testing.\n\n__Arguments__\n\n* `fn` - the memoized function\n\n---------------------------------------\n\n\n### ensureAsync(fn)\n\nWrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained.\n\n__Arguments__\n\n* `fn` - an async function, one that expects a node-style callback as its last argument\n\nReturns a wrapped function with the exact same call signature as the function passed in.\n\n__Example__\n\n```js\nfunction sometimesAsync(arg, callback) {\n if (cache[arg]) {\n return callback(null, cache[arg]); // this would be synchronous!!\n } else {\n doSomeIO(arg, callback); // this IO would be asynchronous\n }\n}\n\n// this has a risk of stack overflows if many results are cached in a row\nasync.mapSeries(args, sometimesAsync, done);\n\n// this will defer sometimesAsync's callback if necessary,\n// preventing stack overflows\nasync.mapSeries(args, async.ensureAsync(sometimesAsync), done);\n\n```\n\n---------------------------------------\n\n\n### constant(values...)\n\nReturns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`.\n\n__Example__\n\n```js\nasync.waterfall([\n async.constant(42),\n function (value, next) {\n // value === 42\n },\n //...\n], callback);\n\nasync.waterfall([\n async.constant(filename, \"utf8\"),\n fs.readFile,\n function (fileData, next) {\n //...\n }\n //...\n], callback);\n\nasync.auto({\n hostname: async.constant(\"https://server.net/\"),\n port: findFreePort,\n launchServer: [\"hostname\", \"port\", function (cb, options) {\n startServer(options, cb);\n }],\n //...\n}, callback);\n\n```\n\n---------------------------------------\n\n\n\n### asyncify(func)\n\n__Alias:__ `wrapSync`\n\nTake a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback.\n\n__Example__\n\n```js\nasync.waterfall([\n async.apply(fs.readFile, filename, \"utf8\"),\n async.asyncify(JSON.parse),\n function (data, next) {\n // data is the result of parsing the text.\n // If there was a parsing error, it would have been caught.\n }\n], callback)\n```\n\n---------------------------------------\n\n\n### log(function, arguments)\n\nLogs the result of an `async` function to the `console`. Only works in Node.js or\nin browsers that support `console.log` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.log` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an `async` function to the `console` using `console.dir` to\ndisplay the properties of the resulting object. Only works in Node.js or\nin browsers that support `console.dir` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.dir` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of `async` back to its original value, returning a reference to the\n`async` object.\n", + "readmeFilename": "README.md", "homepage": "https://github.com/caolan/async#readme", "_id": "async@1.5.0", "_shasum": "2796642723573859565633fc6274444bee2f8ce3", - "_from": "async@>=1.4.0 <2.0.0", - "_npmVersion": "2.14.2", - "_nodeVersion": "0.10.26", - "_npmUser": { - "name": "aearly", - "email": "alexander.early@gmail.com" - }, - "maintainers": [ - { - "name": "caolan", - "email": "caolan.mcmahon@gmail.com" - }, - { - "name": "beaugunderson", - "email": "beau@beaugunderson.com" - }, - { - "name": "aearly", - "email": "alexander.early@gmail.com" - }, - { - "name": "megawac", - "email": "megawac@gmail.com" - } - ], - "dist": { - "shasum": "2796642723573859565633fc6274444bee2f8ce3", - "tarball": "http://registry.npmjs.org/async/-/async-1.5.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "async@>=1.4.0 <2.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json index 662e628b206630..bac334dc3085b9 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/package.json @@ -35,51 +35,14 @@ "pre-commit": "^1.0.10", "request": "^2.60.0" }, - "gitHead": "c174f1b7f3a78a00ec5af0360469280445e37804", + "readme": "# Form-Data [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) [![Build Status](https://img.shields.io/travis/form-data/form-data/master.svg)](https://travis-ci.org/form-data/form-data) [![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)\n\nA library to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's [request](https://github.com/request/request) stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume();\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nIn case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/surelynot.php',\n headers: {'x-test-header': 'test-header-value'}\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n### Integration with other libraries\n\n#### Request\n\nForm submission using [request](https://github.com/request/request):\n\n```javascript\nvar formData = {\n my_field: 'my_value',\n my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),\n};\n\nrequest.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {\n if (err) {\n return console.error('upload failed:', err);\n }\n console.log('Upload successful! Server responded with:', body);\n});\n```\n\nFor more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).\n\n#### node-fetch\n\nYou can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):\n\n```javascript\nvar form = new FormData();\n\nform.append('a', 1);\n\nfetch('http://example.com', { method: 'POST', body: form })\n .then(function(res) {\n return res.json();\n }).then(function(json) {\n console.log(json);\n });\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## License\n\nForm-Data is licensed under the MIT license.\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/form-data/form-data/issues" }, "homepage": "https://github.com/form-data/form-data#readme", "_id": "form-data@1.0.0-rc3", "_shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577", - "_from": "form-data@>=1.0.0-rc3 <1.1.0", - "_npmVersion": "2.11.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "dylanpiercey", - "email": "pierceydylan@gmail.com" - }, - "dist": { - "shasum": "d35bc62e7fbc2937ae78f948aaa0d38d90607577", - "tarball": "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz" - }, - "maintainers": [ - { - "name": "felixge", - "email": "felix@debuggable.com" - }, - { - "name": "idralyuk", - "email": "igor@buran.us" - }, - { - "name": "alexindigo", - "email": "iam@alexindigo.com" - }, - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "celer", - "email": "dtyree77@gmail.com" - }, - { - "name": "dylanpiercey", - "email": "pierceydylan@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz", - "readme": "ERROR: No README data found!" + "_from": "form-data@>=1.0.0-rc3 <1.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json index ccc77e036e4994..3dd2795c3eb827 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/package.json @@ -33,39 +33,14 @@ "dependencies": { "graceful-readlink": ">= 1.0.0" }, - "gitHead": "b2aad7a8471d434593a85306aa73777a526e9f75", + "readme": "# Commander.js\n\n\n[![Build Status](https://api.travis-ci.org/tj/commander.js.svg)](http://travis-ci.org/tj/commander.js)\n[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)\n[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander)\n[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander). \n [API documentation](http://tj.github.com/commander.js/)\n\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq-sauce', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineapple');\nif (program.bbqSauce) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nfunction collect(val, memo) {\n memo.push(val);\n return memo;\n}\n\nfunction increaseVerbosity(v, total) {\n return total + 1;\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .option('-c, --collect [value]', 'A repeatable value', collect, [])\n .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0)\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' collect: %j', program.collect);\nconsole.log(' verbosity: %j', program.verbose);\nconsole.log(' args: %j', program.args);\n```\n\n## Regular Expression\n```js\nprogram\n .version('0.0.1')\n .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium')\n .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)\n .parse(process.argv);\n \nconsole.log(' size: %j', program.size);\nconsole.log(' drink: %j', program.drink);\n```\n\n## Variadic arguments\n\n The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to\n append `...` to the argument name. Here is an example:\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .command('rmdir [otherDirs...]')\n .action(function (dir, otherDirs) {\n console.log('rmdir %s', dir);\n if (otherDirs) {\n otherDirs.forEach(function (oDir) {\n console.log('rmdir %s', oDir);\n });\n }\n });\n\nprogram.parse(process.argv);\n```\n\n An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed\n to your action as demonstrated above.\n\n## Specify the argument syntax\n\n```js\n#!/usr/bin/env node\n\nvar program = require('../');\n\nprogram\n .version('0.0.1')\n .arguments(' [env]')\n .action(function (cmd, env) {\n cmdValue = cmd;\n envValue = env;\n });\n\nprogram.parse(process.argv);\n\nif (typeof cmdValue === 'undefined') {\n console.error('no command given!');\n process.exit(1);\n}\nconsole.log('command:', cmdValue);\nconsole.log('environment:', envValue || \"no environment given\");\n```\n\n## Git-style sub-commands\n\n```js\n// file: ./examples/pm\nvar program = require('..');\n\nprogram\n .version('0.0.1')\n .command('install [name]', 'install one or more packages')\n .command('search [query]', 'search with optional query')\n .command('list', 'list packages installed', {isDefault: true})\n .parse(process.argv);\n```\n\nWhen `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. \nThe commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`.\n\nOptions can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the option from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified.\n\nIf the program is designed to be installed globally, make sure the executables have proper modes, like `755`.\n\n### `--harmony`\n\nYou can enable `--harmony` option in two ways:\n* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern.\n* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n An application for pizzas ordering\n\n Options:\n\n -h, --help output usage information\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineapple\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -C, --no-cheese You do not want any cheese\n\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nYields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .outputHelp(cb)\n\nOutput help information without exiting.\nOptional callback cb allows post-processing of help text before it is displayed.\n\nIf you want to display help by default (e.g. if no command was provided), you can use something like:\n\n```js\nvar program = require('commander');\nvar colors = require('colors');\n\nprogram\n .version('0.0.1')\n .command('getstream [url]', 'get stream URL')\n .parse(process.argv);\n\n if (!process.argv.slice(2).length) {\n program.outputHelp(make_red);\n }\n\nfunction make_red(txt) {\n return colors.red(txt); //display the help text in red on the console\n}\n```\n\n## .help(cb)\n\n Output help information and exit immediately.\n Optional callback cb allows post-processing of help text before it is displayed.\n\n## Examples\n\n```js\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-C, --chdir ', 'change the working directory')\n .option('-c, --config ', 'set config path. defaults to ./deploy.conf')\n .option('-T, --no-tests', 'ignore test hook')\n\nprogram\n .command('setup [env]')\n .description('run setup commands for all envs')\n .option(\"-s, --setup_mode [mode]\", \"Which setup mode to use\")\n .action(function(env, options){\n var mode = options.setup_mode || \"normal\";\n env = env || 'all';\n console.log('setup for %s env(s) with %s mode', env, mode);\n });\n\nprogram\n .command('exec ')\n .alias('ex')\n .description('execute the given remote cmd')\n .option(\"-e, --exec_mode \", \"Which exec mode to use\")\n .action(function(cmd, options){\n console.log('exec \"%s\" using %s mode', cmd, options.exec_mode);\n }).on('--help', function() {\n console.log(' Examples:');\n console.log();\n console.log(' $ deploy exec sequential');\n console.log(' $ deploy exec async');\n console.log();\n });\n\nprogram\n .command('*')\n .action(function(env){\n console.log('deploying \"%s\"', env);\n });\n\nprogram.parse(process.argv);\n```\n\nMore Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.\n\n## License\n\nMIT\n\n", + "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/tj/commander.js/issues" }, "homepage": "https://github.com/tj/commander.js#readme", "_id": "commander@2.9.0", "_shasum": "9c99094176e12240cb22d6c5146098400fe0f7d4", - "_from": "commander@>=2.8.1 <3.0.0", - "_npmVersion": "2.11.3", - "_nodeVersion": "0.12.7", - "_npmUser": { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - }, - "dist": { - "shasum": "9c99094176e12240cb22d6c5146098400fe0f7d4", - "tarball": "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "somekittens", - "email": "rkoutnik@gmail.com" - }, - { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "commander@>=2.9.0 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js index 7820e6497b5af1..f24db9b1c9062b 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js @@ -190,7 +190,7 @@ var compile = function(schema, cache, root, reporter, opts) { validate('for (var %s = %d; %s < %s.length; %s++) {', i, node.items.length, i, name, i) visit(name+'['+i+']', node.additionalItems, reporter, filter) validate('}') - } + } } if (node.format && fmts[node.format]) { @@ -395,7 +395,7 @@ var compile = function(schema, cache, root, reporter, opts) { node.anyOf.forEach(function(sch, i) { if (i === 0) { validate('var %s = errors', prev) - } else { + } else { validate('if (errors !== %s) {', prev) ('errors = %s', prev) } @@ -446,7 +446,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.maxProperties !== undefined) { if (type !== 'object') validate('if (%s) {', types.object(name)) - + validate('if (Object.keys(%s).length > %d) {', name, node.maxProperties) error('has more properties than allowed') validate('}') @@ -456,7 +456,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.minProperties !== undefined) { if (type !== 'object') validate('if (%s) {', types.object(name)) - + validate('if (Object.keys(%s).length < %d) {', name, node.minProperties) error('has less properties than allowed') validate('}') @@ -466,7 +466,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.maxItems !== undefined) { if (type !== 'array') validate('if (%s) {', types.array(name)) - + validate('if (%s.length > %d) {', name, node.maxItems) error('has more items than allowed') validate('}') @@ -476,7 +476,7 @@ var compile = function(schema, cache, root, reporter, opts) { if (node.minItems !== undefined) { if (type !== 'array') validate('if (%s) {', types.array(name)) - + validate('if (%s.length < %d) {', name, node.minItems) error('has less items than allowed') validate('}') @@ -543,14 +543,16 @@ var compile = function(schema, cache, root, reporter, opts) { validate = validate.toFunction(scope) validate.errors = null - validate.__defineGetter__('error', function() { - if (!validate.errors) return '' - return validate.errors - .map(function(err) { - return err.field+' '+err.message - }) - .join('\n') - }) + if (Object.defineProperty) { + Object.defineProperty(validate, 'error', { + get: function() { + if (!validate.errors) return '' + return validate.errors.map(function(err) { + return err.field + ' ' + err.message; + }).join('\n') + } + }) + } validate.toJSON = function() { return schema diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json index 4b0677650bcd69..6becf9612acf5a 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json @@ -33,32 +33,11 @@ "test": "node test.js" }, "license": "MIT", - "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", + "readme": "# JSON Pointer for nodejs\n\nThis is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).\n\n## Usage\n\n var jsonpointer = require(\"jsonpointer\");\n var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};\n var one = jsonpointer.get(obj, \"/foo\");\n var two = jsonpointer.get(obj, \"/bar/baz\");\n var three = jsonpointer.get(obj, \"/qux/0\");\n var four = jsonpointer.get(obj, \"/qux/1\");\n var five = jsonpointer.get(obj, \"/qux/2\");\n var notfound = jsonpointer.get(obj, \"/quo\"); // returns null\n\n jsonpointer.set(obj, \"/foo\", 6); // obj.foo = 6;\n\n## Testing\n\n $ node test.js\n All tests pass.\n $\n\n[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](https://travis-ci.org/janl/node-jsonpointer)\n\n## Author\n\n(c) 2011 Jan Lehnardt \n\n## License\n\nMIT License.\n", + "readmeFilename": "README.md", "homepage": "https://github.com/janl/node-jsonpointer#readme", "_id": "jsonpointer@2.0.0", "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "_from": "jsonpointer@2.0.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "marcbachmann", - "email": "marc.brookman@gmail.com" - }, - "maintainers": [ - { - "name": "jan", - "email": "jan@apache.org" - }, - { - "name": "marcbachmann", - "email": "marc.brookman@gmail.com" - } - ], - "dist": { - "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "tarball": "http://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "jsonpointer@2.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js index 5b760152b75041..94889c9de11a18 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js @@ -1,5 +1,7 @@ module.exports = extend +var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend() { var target = {} @@ -7,7 +9,7 @@ function extend() { var source = arguments[i] for (var key in source) { - if (source.hasOwnProperty(key)) { + if (hasOwnProperty.call(source, key)) { target[key] = source[key] } } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js index a34475ebddf63f..72debede6ca585 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js @@ -1,11 +1,13 @@ module.exports = extend +var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] for (var key in source) { - if (source.hasOwnProperty(key)) { + if (hasOwnProperty.call(source, key)) { target[key] = source[key] } } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json index c087642df8c5e3..cc323c6f44964f 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json @@ -1,6 +1,6 @@ { "name": "xtend", - "version": "4.0.0", + "version": "4.0.1", "description": "extend like a boss", "keywords": [ "extend", @@ -39,12 +39,7 @@ "url": "https://github.com/Raynos/xtend/issues", "email": "raynos2@gmail.com" }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], + "license": "MIT", "testling": { "files": "test.js", "browsers": [ @@ -65,8 +60,8 @@ }, "readme": "# xtend\n\n[![browser support][3]][4]\n\n[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\n// extend returns a new object. Does not mutate arguments\nvar combination = extend({\n a: \"a\",\n b: 'c'\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n## Stability status: Locked\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", "readmeFilename": "README.md", - "_id": "xtend@4.0.0", - "_shasum": "8bc36ff87aedbe7ce9eaf0bca36b2354a743840f", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", + "_id": "xtend@4.0.1", + "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "_from": "xtend@>=4.0.0 <5.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js index 3369d79660b184..093a2b061e81ae 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js @@ -61,3 +61,23 @@ test("mutable", function (assert) { assert.equal(a.bar, "baz") assert.end() }) + +test("null prototype", function(assert) { + var a = { a: "foo" } + var b = Object.create(null) + b.b = "bar"; + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("null prototype mutable", function (assert) { + var a = { foo: "bar" } + var b = Object.create(null) + b.bar = "baz"; + + mutableExtend(a, b) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json index 4dfb435af06d6f..0d63f3ca159540 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json @@ -1,6 +1,6 @@ { "name": "is-my-json-valid", - "version": "2.12.2", + "version": "2.12.3", "description": "A JSONSchema validator that uses code generation to be extremely fast", "main": "index.js", "dependencies": { @@ -35,8 +35,8 @@ "homepage": "https://github.com/mafintosh/is-my-json-valid", "readme": "# is-my-json-valid\n\nA [JSONSchema](http://json-schema.org/) validator that uses code generation\nto be extremely fast\n\n```\nnpm install is-my-json-valid\n```\n\nIt passes the entire JSONSchema v4 test suite except for `remoteRefs` and `maxLength`/`minLength` when using unicode surrogate pairs.\n\n[![build status](http://img.shields.io/travis/mafintosh/is-my-json-valid.svg?style=flat)](http://travis-ci.org/mafintosh/is-my-json-valid)\n\n## Usage\n\nSimply pass a schema to compile it\n\n``` js\nvar validator = require('is-my-json-valid')\n\nvar validate = validator({\n required: true,\n type: 'object',\n properties: {\n hello: {\n required: true,\n type: 'string'\n }\n }\n})\n\nconsole.log('should be valid', validate({hello: 'world'}))\nconsole.log('should not be valid', validate({}))\n\n// get the last list of errors by checking validate.errors\n// the following will print [{field: 'data.hello', message: 'is required'}]\nconsole.log(validate.errors)\n```\n\nYou can also pass the schema as a string\n\n``` js\nvar validate = validate('{\"type\": ... }')\n```\n\nOptionally you can use the require submodule to load a schema from `__dirname`\n\n``` js\nvar validator = require('is-my-json-valid/require')\nvar validate = validator('my-schema.json')\n```\n\n## Custom formats\n\nis-my-json-valid supports the formats specified in JSON schema v4 (such as date-time).\nIf you want to add your own custom formats pass them as the formats options to the validator\n\n``` js\nvar validate = validator({\n type: 'string',\n required: true,\n format: 'only-a'\n}, {\n formats: {\n 'only-a': /^a+$/\n }\n})\n\nconsole.log(validate('aa')) // true\nconsole.log(validate('ab')) // false\n```\n\n## External schemas\n\nYou can pass in external schemas that you reference using the `$ref` attribute as the `schemas` option\n\n``` js\nvar ext = {\n required: true,\n type: 'string'\n}\n\nvar schema = {\n $ref: '#ext' // references another schema called ext\n}\n\n// pass the external schemas as an option\nvar validate = validator(schema, {schemas: {ext: ext}})\n\nvalidate('hello') // returns true\nvalidate(42) // return false\n```\n\n## Filtering away additional properties\n\nis-my-json-valid supports filtering away properties not in the schema\n\n``` js\nvar filter = validator.filter({\n required: true,\n type: 'object',\n properties: {\n hello: {type: 'string', required: true}\n },\n additionalProperties: false\n})\n\nvar doc = {hello: 'world', notInSchema: true}\nconsole.log(filter(doc)) // {hello: 'world'}\n```\n\n## Verbose mode outputs the value on errors\n\nis-my-json-valid outputs the value causing an error when verbose is set to true\n\n``` js\nvar validate = validator({\n required: true,\n type: 'object',\n properties: {\n hello: {\n required: true,\n type: 'string'\n }\n }\n}, {\n verbose: true\n})\n\nvalidate({hello: 100});\nconsole.log(validate.errors) // {field: 'data.hello', message: 'is the wrong type', value: 100}\n```\n\n## Greedy mode tries to validate as much as possible\n\nBy default is-my-json-valid bails on first validation error but when greedy is\nset to true it tries to validate as much as possible:\n\n``` js\nvar validate = validator({\n type: 'object',\n properties: {\n x: {\n type: 'number'\n }\n },\n required: ['x', 'y']\n}, {\n greedy: true\n});\n\nvalidate({x: 'string'});\nconsole.log(validate.errors) // [{field: 'data.y', message: 'is required'},\n // {field: 'data.x', message: 'is the wrong type'}]\n```\n\n## Performance\n\nis-my-json-valid uses code generation to turn your JSON schema into basic javascript code that is easily optimizeable by v8.\n\nAt the time of writing, is-my-json-valid is the __fastest validator__ when running\n\n* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark)\n* [cosmicreals.com benchmark](http://cosmicrealms.com/blog/2014/08/29/benchmark-of-node-dot-js-json-validation-modules-part-3/)\n* [jsck benchmark](https://github.com/pandastrike/jsck/issues/72#issuecomment-70992684)\n* [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)\n* [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)\n\nIf you know any other relevant benchmarks open a PR and I'll add them.\n\n## License\n\nMIT\n", "readmeFilename": "README.md", - "_id": "is-my-json-valid@2.12.2", - "_shasum": "0d65859318c846ce3a134402fd3fbc504272ccc9", - "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.2.tgz", - "_from": "is-my-json-valid@>=2.12.2 <3.0.0" + "_id": "is-my-json-valid@2.12.3", + "_shasum": "5a39d1d76b2dbb83140bbd157b1d5ee4bdc85ad6", + "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.3.tgz", + "_from": "is-my-json-valid@>=2.12.3 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/index.js index a7e3dc38520a4e..fb36c2a45467b7 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/index.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/index.js @@ -5,9 +5,9 @@ var SETTLED = 'settled'; var FULFILLED = 'fulfilled'; var REJECTED = 'rejected'; var NOOP = function () {}; +var isNode = typeof process !== 'undefined' && typeof process.emit === 'function'; -// async calls -var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout; +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; var asyncQueue = []; var asyncTimer; @@ -83,17 +83,18 @@ function handleThenable(promise, value) { } if (value && (typeof value === 'function' || typeof value === 'object')) { - var then = value.then; // then should be retrived only once + // then should be retrieved only once + var then = value.then; if (typeof then === 'function') { then.call(value, function (val) { if (!resolved) { resolved = true; - if (value !== val) { - resolve(promise, val); - } else { + if (value === val) { fulfill(promise, val); + } else { + resolve(promise, val); } } }, function (reason) { @@ -154,6 +155,13 @@ function publishFulfillment(promise) { function publishRejection(promise) { promise._state = REJECTED; publish(promise); + if (!promise._handled && isNode) { + process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + process.emit('rejectionHandled', promise); } /** @@ -179,6 +187,7 @@ Promise.prototype = { _state: PENDING, _then: null, _data: undefined, + _handled: false, then: function (onFulfillment, onRejection) { var subscriber = { @@ -188,6 +197,13 @@ Promise.prototype = { rejected: onRejection }; + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + if (this._state === FULFILLED || this._state === REJECTED) { // already resolved, call callback async asyncCall(invokeCallback, subscriber); @@ -199,7 +215,7 @@ Promise.prototype = { return subscriber.then; }, - 'catch': function (onRejection) { + catch: function (onRejection) { return this.then(null, onRejection); } }; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json index 3a4c8826948b2b..f64cd26ef331ef 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json @@ -1,7 +1,7 @@ { "name": "pinkie", - "version": "1.0.0", - "description": "Itty bitty little wittle twinkie pinkie ES6 Promise implementation", + "version": "2.0.1", + "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", "license": "MIT", "repository": { "type": "git", @@ -16,28 +16,34 @@ "node": ">=0.10.0" }, "scripts": { - "test": "mocha" + "test": "xo && nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls" }, "files": [ "index.js" ], "keywords": [ "promise", + "promises", + "es2015", "es6" ], - "dependencies": {}, "devDependencies": { + "core-assert": "^0.1.1", + "coveralls": "^2.11.4", "mocha": "*", - "promises-aplus-tests": "*" + "nyc": "^3.2.2", + "promises-aplus-tests": "*", + "xo": "^0.10.1" }, - "readme": "

    \n\t
    \n\t\"pinkie\"\n\t
    \n\t
    \n

    \n\n> Itty bitty little wittle twinkie pinkie [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation\n\n[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie)\n\nThere are [tons of Promise implementations](https://github.com/sorrycc/awesome-javascript#control-flow) out there, but all of them focused on browser compatibility and often bloated with functionality.\n\nThis module focused to be exactly Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in NodeJS land (it should be browserify-able thou).\n\n\n## Install\n\n```\n$ npm install --save pinkie\n```\n\n\n## Usage\n\n```js\nvar Promise = require('pinkie');\n\nnew Promise(function (resolve, reject) {\n\tgot('google.com', function (err, data) {\n\t\tif (err) {\n\t\t\treturn reject(err);\n\t\t}\n\n\t\tresolve(data);\n\t});\n});\n//=> Promise\n```\n\n\n### API\n\n`pinkie` exports bare [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation. In case you forgot:\n\n#### new Promise(executor)\n\nReturns new instance of `Promise`.\n\n##### executor\n\n*Required* \nType: `function`\n\nFunction with two arguments resolve and reject. The first argument fulfills the promise, the second argument rejects it.\n\n#### pinkie.all(promises)\n\nReturns a promise that resolves when all of the promises in the `promises` Array argument have resolved.\n\n#### pinkie.race(promises)\n\nReturns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise.\n\n#### pinkie.reject(reason)\n\nReturns a Promise object that is rejected with the given `reason`.\n\n#### pinkie.resolve(value)\n\nReturns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will \"follow\" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n", + "readme": "

    \n\t
    \n\t\"pinkie\"\n\t
    \n\t
    \n

    \n\n> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation\n\n[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)\n\nThere are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.\n\nThis module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).\n\n\n## Install\n\n```\n$ npm install --save pinkie\n```\n\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar Promise = require('pinkie');\n\nnew Promise(function (resolve, reject) {\n\tfs.readFile('foo.json', 'utf8', function (err, data) {\n\t\tif (err) {\n\t\t\treject(err);\n\t\t\treturn;\n\t\t}\n\n\t\tresolve(data);\n\t});\n});\n//=> Promise\n```\n\n\n### API\n\n`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:\n\n#### new Promise(executor)\n\nReturns new instance of `Promise`.\n\n##### executor\n\n*Required* \nType: `function`\n\nFunction with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.\n\n#### pinkie.all(promises)\n\nReturns a promise that resolves when all of the promises in the `promises` Array argument have resolved.\n\n#### pinkie.race(promises)\n\nReturns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise.\n\n#### pinkie.reject(reason)\n\nReturns a Promise object that is rejected with the given `reason`.\n\n#### pinkie.resolve(value)\n\nReturns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will \"follow\" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.\n\n\n## Related\n\n- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module\n\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/floatdrop/pinkie/issues" }, "homepage": "https://github.com/floatdrop/pinkie#readme", - "_id": "pinkie@1.0.0", - "_shasum": "5a47f28ba1015d0201bda7bf0f358e47bec8c7e4", - "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", - "_from": "pinkie@>=1.0.0 <2.0.0" + "_id": "pinkie@2.0.1", + "_shasum": "4236c86fc29f261c2045bbe81f78cbb2a5e8306c", + "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.1.tgz", + "_from": "pinkie@>=2.0.0 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/readme.md index dbbd014f316f0c..4d76909c5f0cd5 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/readme.md +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/readme.md @@ -1,17 +1,17 @@


    - pinkie + pinkie

    -> Itty bitty little wittle twinkie pinkie [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation +> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation -[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) +[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) -There are [tons of Promise implementations](https://github.com/sorrycc/awesome-javascript#control-flow) out there, but all of them focused on browser compatibility and often bloated with functionality. +There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. -This module focused to be exactly Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in NodeJS land (it should be browserify-able thou). +This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). ## Install @@ -24,12 +24,14 @@ $ npm install --save pinkie ## Usage ```js +var fs = require('fs'); var Promise = require('pinkie'); new Promise(function (resolve, reject) { - got('google.com', function (err, data) { + fs.readFile('foo.json', 'utf8', function (err, data) { if (err) { - return reject(err); + reject(err); + return; } resolve(data); @@ -41,7 +43,7 @@ new Promise(function (resolve, reject) { ### API -`pinkie` exports bare [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation. In case you forgot: +`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: #### new Promise(executor) @@ -52,7 +54,7 @@ Returns new instance of `Promise`. *Required* Type: `function` -Function with two arguments resolve and reject. The first argument fulfills the promise, the second argument rejects it. +Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. #### pinkie.all(promises) @@ -70,6 +72,12 @@ Returns a Promise object that is rejected with the given `reason`. Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. + +## Related + +- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module + + ## License MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json index bd4e66f8d191b1..d51cdd3b592fec 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json @@ -1,7 +1,7 @@ { "name": "pinkie-promise", - "version": "1.0.0", - "description": "ES6 Promise ponyfill", + "version": "2.0.0", + "description": "ES2015 Promise ponyfill", "license": "MIT", "repository": { "type": "git", @@ -23,24 +23,26 @@ ], "keywords": [ "promise", + "promises", + "es2015", "es6", "polyfill", "ponyfill" ], "dependencies": { - "pinkie": "^1.0.0" + "pinkie": "^2.0.0" }, "devDependencies": { "mocha": "*" }, - "readme": "# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)\n\n> [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill\n>\n> Ponyfill: A polyfill that doesn't overwrite the native method\n\nModule exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.\n\n## Install\n\n```\n$ npm install --save pinkie-promise\n```\n\n## Usage\n\n```js\nvar Promise = require('pinkie-promise');\n\nnew Promise(function (resolve) { resolve('unicorns'); });\n//=> Promise { 'unicorns' }\n```\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n", + "readme": "# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)\n\n> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill\n\nModule exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.\n\n## Install\n\n```\n$ npm install --save pinkie-promise\n```\n\n## Usage\n\n```js\nvar Promise = require('pinkie-promise');\n\nnew Promise(function (resolve) { resolve('unicorns'); });\n//=> Promise { 'unicorns' }\n```\n\n## Related\n\n- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/floatdrop/pinkie-promise/issues" }, "homepage": "https://github.com/floatdrop/pinkie-promise#readme", - "_id": "pinkie-promise@1.0.0", - "_shasum": "d1da67f5482563bb7cf57f286ae2822ecfbf3670", - "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", - "_from": "pinkie-promise@>=1.0.0 <2.0.0" + "_id": "pinkie-promise@2.0.0", + "_shasum": "4c83538de1f6e660c29e0a13446844f7a7e88259", + "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz", + "_from": "pinkie-promise@>=2.0.0 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/readme.md index bb5e9d2e0f7b72..78477f4297d677 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/readme.md +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/readme.md @@ -1,8 +1,6 @@ # pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) -> [ES6 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill -> -> Ponyfill: A polyfill that doesn't overwrite the native method +> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. @@ -21,6 +19,10 @@ new Promise(function (resolve) { resolve('unicorns'); }); //=> Promise { 'unicorns' } ``` +## Related + +- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function + ## License MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/deps/npm/node_modules/request/node_modules/har-validator/package.json b/deps/npm/node_modules/request/node_modules/har-validator/package.json index 7892afc27fd969..196a4e810931c6 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.2", + "version": "2.0.3", "name": "har-validator", "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema", "author": { @@ -49,40 +49,23 @@ "devDependencies": { "codeclimate-test-reporter": "0.1.1", "echint": "^1.5.0", - "istanbul": "^0.3.21", - "mocha": "^2.3.3", + "istanbul": "^0.4.0", + "mocha": "^2.3.4", "require-directory": "^2.1.1", - "should": "^7.1.0", + "should": "^7.1.1", "should-promised": "^0.3.1", - "standard": "^5.3.1" + "standard": "^5.4.1" }, "dependencies": { "chalk": "^1.1.1", - "commander": "^2.8.1", - "is-my-json-valid": "^2.12.2", - "pinkie-promise": "^1.0.0" + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.3", + "pinkie-promise": "^2.0.0" }, - "gitHead": "46efd17253a81fb70614e904d9e766aa4de4f394", - "_id": "har-validator@2.0.2", - "_shasum": "233d0fa887b98a4f345969f811a2eec70d97aed7", - "_from": "har-validator@>=2.0.2 <2.1.0", - "_npmVersion": "2.14.4", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "ahmadnassri", - "email": "ahmad@ahmadnassri.com" - }, - "maintainers": [ - { - "name": "ahmadnassri", - "email": "ahmad@ahmadnassri.com" - } - ], - "dist": { - "shasum": "233d0fa887b98a4f345969f811a2eec70d97aed7", - "tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.2.tgz", - "readme": "ERROR: No README data found!" + "readme": "# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]\n\nExtremely fast HTTP Archive ([HAR](http://www.softwareishard.com/blog/har-12-spec/)) validator using JSON Schema.\n\n[![Build Status][travis-image]][travis-url]\n[![Downloads][npm-downloads]][npm-url]\n[![Code Climate][codeclimate-quality]][codeclimate-url]\n[![Coverage Status][codeclimate-coverage]][codeclimate-url]\n[![Dependencies][david-image]][david-url]\n\n## Install\n\n```shell\n# to use in cli\nnpm install --global har-validator\n\n# to use as a module\nnpm install --save har-validator\n```\n\n## Usage\n\n```\n\n Usage: har-validator [options] \n\n Options:\n\n -h, --help output usage information\n -V, --version output the version number\n -s, --schema [name] validate schema name (log, request, response, etc ...)\n\n```\n\n###### Example\n\n```shell\nhar-validator har.json\n\nhar-validator --schema request request.json\n```\n\n## API\n\n**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](#callback-api) is provided*\n\n### Validate(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a full [HAR](http://www.softwareishard.com/blog/har-12-spec/) object\n\n```js\nvar HAR = require('./har.json')\nvar validate = require('har-validator')\n\nvalidate(HAR)\n .then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.log(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [log](http://www.softwareishard.com/blog/har-12-spec/#log) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.log(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.cache(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [cache](http://www.softwareishard.com/blog/har-12-spec/#cache) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.cache(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.cacheEntry(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [\"beforeRequest\" or \"afterRequest\"](http://www.softwareishard.com/blog/har-12-spec/#cache) objects\n\n```js\nvar validate = require('har-validator')\n\nvalidate.cacheEntry(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.content(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [content](http://www.softwareishard.com/blog/har-12-spec/#content) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.content(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.cookie(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [cookie](http://www.softwareishard.com/blog/har-12-spec/#cookies) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.cookie(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.creator(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [creator](http://www.softwareishard.com/blog/har-12-spec/#creator) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.creator(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.entry(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n an [entry](http://www.softwareishard.com/blog/har-12-spec/#entries) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.entry(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.log(data)\n\nalias of [`Validate(data)`](#validate-data-callback-)\n\n### Validate.page(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [page](http://www.softwareishard.com/blog/har-12-spec/#pages) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.page(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.pageTimings(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [pageTimings](http://www.softwareishard.com/blog/har-12-spec/#pageTimings) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.pageTimings(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.postData(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [postData](http://www.softwareishard.com/blog/har-12-spec/#postData) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.postData(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.record(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [record](http://www.softwareishard.com/blog/har-12-spec/#headers) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.record(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.request(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [request](http://www.softwareishard.com/blog/har-12-spec/#request) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.request(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.response(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [response](http://www.softwareishard.com/blog/har-12-spec/#response) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.cacheEntry(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n### Validate.timings(data)\n\n> Returns a promise that resolves to the valid object.\n\n- **data**: `Object` *(Required)*\n a [timings](http://www.softwareishard.com/blog/har-12-spec/#timings) object\n\n```js\nvar validate = require('har-validator')\n\nvalidate.timings(data.then(function (HAR) {\n console.log('horray!')\n })\n .catch(function (error) {\n console.error(error)\n })\n```\n\n----\n\n## Callback API\n\n### Validate(data [, callback])\n\n> Returns `true` or `false`.\n\n```js\nvar HAR = require('./har.json');\nvar validate = require('har-validator/lib/async');\n\nvalidate(HAR, function (e, valid) {\n if (e) console.log(e.errors)\n\n if (valid) console.log('horray!');\n});\n\n```\nThe async API provides exactly the same methods as the [Promise API](#promise-api)\n\n----\n\n## Support\n\nDonations are welcome to help support the continuous development of this project.\n\n[![Gratipay][gratipay-image]][gratipay-url]\n[![PayPal][paypal-image]][paypal-url]\n[![Flattr][flattr-image]][flattr-url]\n[![Bitcoin][bitcoin-image]][bitcoin-url]\n\n## License\n\n[ISC License](LICENSE) © [Ahmad Nassri](https://www.ahmadnassri.com/)\n\n[license-url]: https://github.com/ahmadnassri/har-validator/blob/master/LICENSE\n\n[travis-url]: https://travis-ci.org/ahmadnassri/har-validator\n[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square\n\n[npm-url]: https://www.npmjs.com/package/har-validator\n[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square\n[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square\n[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square\n\n[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator\n[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square\n[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square\n\n[david-url]: https://david-dm.org/ahmadnassri/har-validator\n[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square\n\n[gratipay-url]: https://www.gratipay.com/ahmadnassri/\n[gratipay-image]: https://img.shields.io/gratipay/ahmadnassri.svg?style=flat-square\n\n[paypal-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UJ2B2BTK9VLRS&on0=project&os0=har-validator\n[paypal-image]: http://img.shields.io/badge/paypal-donate-green.svg?style=flat-square\n\n[flattr-url]: https://flattr.com/submit/auto?user_id=ahmadnassri&url=https://github.com/ahmadnassri/har-validator&title=har-validator&language=&tags=github&category=software\n[flattr-image]: http://img.shields.io/badge/flattr-donate-green.svg?style=flat-square\n\n[bitcoin-image]: http://img.shields.io/badge/bitcoin-1Nb46sZRVG3or7pNaDjthcGJpWhvoPpCxy-green.svg?style=flat-square\n[bitcoin-url]: https://www.coinbase.com/checkouts/ae383ae6bb931a2fa5ad11cec115191e?name=har-validator\n", + "readmeFilename": "README.md", + "_id": "har-validator@2.0.3", + "_shasum": "5a9e12564a571cf0b81ef93c2157bd1617168883", + "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz", + "_from": "har-validator@>=2.0.2 <2.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/dist/client.js b/deps/npm/node_modules/request/node_modules/hawk/dist/client.js new file mode 100644 index 00000000000000..155412351d6947 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/hawk/dist/client.js @@ -0,0 +1,340 @@ +'use strict' + +// Load modules + +; + +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } + +var Url = require('url'); +var Hoek = require('hoek'); +var Cryptiles = require('cryptiles'); +var Crypto = require('./crypto'); +var Utils = require('./utils'); + +// Declare internals + +var internals = {}; + +// Generate an Authorization header for a given request + +/* + uri: 'http://example.com/resource?a=b' or object from Url.parse() + method: HTTP verb (e.g. 'GET', 'POST') + options: { + + // Required + + credentials: { + id: 'dh37fgj492je', + key: 'aoijedoaijsdlaksjdl', + algorithm: 'sha256' // 'sha1', 'sha256' + }, + + // Optional + + ext: 'application-specific', // Application specific data sent via the ext attribute + timestamp: Date.now(), // A pre-calculated timestamp + nonce: '2334f34f', // A pre-generated nonce + localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) + payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) + contentType: 'application/json', // Payload content-type (ignored if hash provided) + hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash + app: '24s23423f34dx', // Oz application id + dlg: '234sz34tww3sd' // Oz delegated-by application id + } +*/ + +exports.header = function (uri, method, options) { + + var result = { + field: '', + artifacts: {} + }; + + // Validate inputs + + if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') { + + result.err = 'Invalid argument type'; + return result; + } + + // Application time + + var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec); + + // Validate credentials + + var credentials = options.credentials; + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + + result.err = 'Invalid credential object'; + return result; + } + + if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { + result.err = 'Unknown algorithm'; + return result; + } + + // Parse URI + + if (typeof uri === 'string') { + uri = Url.parse(uri); + } + + // Calculate signature + + var artifacts = { + ts: timestamp, + nonce: options.nonce || Cryptiles.randomString(6), + method: method, + resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' + host: uri.hostname, + port: uri.port || (uri.protocol === 'http:' ? 80 : 443), + hash: options.hash, + ext: options.ext, + app: options.app, + dlg: options.dlg + }; + + result.artifacts = artifacts; + + // Calculate payload hash + + if (!artifacts.hash && (options.payload || options.payload === '')) { + + artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); + } + + var mac = Crypto.calculateMac('header', credentials, artifacts); + + // Construct header + + var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed + var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"'; + + if (artifacts.app) { + header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; + } + + result.field = header; + + return result; +}; + +// Validate server response + +/* + res: node's response object + artifacts: object received from header().artifacts + options: { + payload: optional payload received + required: specifies if a Server-Authorization header is required. Defaults to 'false' + } +*/ + +exports.authenticate = function (res, credentials, artifacts, options) { + + artifacts = Hoek.clone(artifacts); + options = options || {}; + + if (res.headers['www-authenticate']) { + + // Parse HTTP WWW-Authenticate header + + var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']); + if (wwwAttributes instanceof Error) { + return false; + } + + // Validate server timestamp (not used to update clock since it is done via the SNPT client) + + if (wwwAttributes.ts) { + var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials); + if (tsm !== wwwAttributes.tsm) { + return false; + } + } + } + + // Parse HTTP Server-Authorization header + + if (!res.headers['server-authorization'] && !options.required) { + + return true; + } + + var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']); + if (attributes instanceof Error) { + return false; + } + + artifacts.ext = attributes.ext; + artifacts.hash = attributes.hash; + + var mac = Crypto.calculateMac('response', credentials, artifacts); + if (mac !== attributes.mac) { + return false; + } + + if (!options.payload && options.payload !== '') { + + return true; + } + + if (!attributes.hash) { + return false; + } + + var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']); + return calculatedHash === attributes.hash; +}; + +// Generate a bewit value for a given URI + +/* + uri: 'http://example.com/resource?a=b' or object from Url.parse() + options: { + + // Required + + credentials: { + id: 'dh37fgj492je', + key: 'aoijedoaijsdlaksjdl', + algorithm: 'sha256' // 'sha1', 'sha256' + }, + ttlSec: 60 * 60, // TTL in seconds + + // Optional + + ext: 'application-specific', // Application specific data sent via the ext attribute + localtimeOffsetMsec: 400 // Time offset to sync with server time + }; +*/ + +exports.getBewit = function (uri, options) { + + // Validate inputs + + if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) { + + return ''; + } + + options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value + + // Application time + + var now = Utils.now(options.localtimeOffsetMsec); + + // Validate credentials + + var credentials = options.credentials; + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + + return ''; + } + + if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { + return ''; + } + + // Parse URI + + if (typeof uri === 'string') { + uri = Url.parse(uri); + } + + // Calculate signature + + var exp = Math.floor(now / 1000) + options.ttlSec; + var mac = Crypto.calculateMac('bewit', credentials, { + ts: exp, + nonce: '', + method: 'GET', + resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' + host: uri.hostname, + port: uri.port || (uri.protocol === 'http:' ? 80 : 443), + ext: options.ext + }); + + // Construct bewit: id\exp\mac\ext + + var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext; + return Hoek.base64urlEncode(bewit); +}; + +// Generate an authorization string for a message + +/* + host: 'example.com', + port: 8000, + message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation + options: { + + // Required + + credentials: { + id: 'dh37fgj492je', + key: 'aoijedoaijsdlaksjdl', + algorithm: 'sha256' // 'sha1', 'sha256' + }, + + // Optional + + timestamp: Date.now(), // A pre-calculated timestamp + nonce: '2334f34f', // A pre-generated nonce + localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) + } +*/ + +exports.message = function (host, port, message, options) { + + // Validate inputs + + if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') { + + return null; + } + + // Application time + + var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec); + + // Validate credentials + + var credentials = options.credentials; + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + + // Invalid credential object + return null; + } + + if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { + return null; + } + + // Calculate signature + + var artifacts = { + ts: timestamp, + nonce: options.nonce || Cryptiles.randomString(6), + host: host, + port: port, + hash: Crypto.calculatePayloadHash(message, credentials.algorithm) + }; + + // Construct authorization + + var result = { + id: credentials.id, + ts: artifacts.ts, + nonce: artifacts.nonce, + hash: artifacts.hash, + mac: Crypto.calculateMac('message', credentials, artifacts) + }; + + return result; +}; diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js index 7ccacf613bbea6..a7945d0dd91a11 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js @@ -93,8 +93,8 @@ hawk.client = { ts: timestamp, nonce: options.nonce || hawk.utils.randomString(6), method: method, - resource: uri.relative, - host: uri.hostname, + resource: uri.resource, + host: uri.host, port: uri.port, hash: options.hash, ext: options.ext, @@ -201,8 +201,8 @@ hawk.client = { ts: exp, nonce: '', method: 'GET', - resource: uri.relative, // Maintain trailing '?' and query params - host: uri.hostname, + resource: uri.resource, // Maintain trailing '?' and query params + host: uri.host, port: uri.port, ext: options.ext }); @@ -583,26 +583,20 @@ hawk.utils = { return result.join(''); }, + uriRegex: /^([^:]+)\:\/\/(?:[^@]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment parseUri: function (input) { - // Based on: parseURI 1.2.2 - // http://blog.stevenlevithan.com/archives/parseuri - // (c) Steven Levithan - // MIT License - - var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment']; - - var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/; - var uriByNumber = input.match(uriRegex); - var uri = {}; - - for (var i = 0, il = keys.length; i < il; ++i) { - uri[keys[i]] = uriByNumber[i] || ''; + var parts = input.match(hawk.utils.uriRegex); + if (!parts) { + return { host: '', port: '', resource: '' }; } - if (uri.port === '') { - uri.port = (uri.protocol.toLowerCase() === 'http' ? '80' : (uri.protocol.toLowerCase() === 'https' ? '443' : '')); - } + var scheme = parts[1].toLowerCase(); + var uri = { + host: parts[2], + port: parts[3] || (scheme === 'http' ? '80' : (scheme === 'https' ? '443' : '')), + resource: parts[4] + }; return uri; }, diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md index b2845933d5591b..cbd91c93190b62 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md @@ -27,6 +27,41 @@ object (instance of `Error`) which includes the following properties: The `Boom` object also supports the following method: - `reformat()` - rebuilds `error.output` using the other object properties. +## Overview + +- Helper methods + - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) + - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) +- HTTP 4xx Errors + - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) + - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) + - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) + - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) + - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data) + - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) + - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) + - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) + - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data) + - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) + - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) + - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) + - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) + - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) + - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) + - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) + - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) + - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data) + - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) + - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) +- HTTP 5xx Errors + - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data) + - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) + - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) + - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data) + - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) +- [FAQ](#faq) + + ## Helper Methods ### `wrap(error, [statusCode], [message])` @@ -511,6 +546,26 @@ Generates the following response payload: All 500 errors hide your message from the end user. Your message is recorded in the server log. +### `Boom.badImplementation([message], [data])` + +Returns a 500 Internal Server Error error where: +- `message` - optional message. +- `data` - optional additional error data. + +```js +Boom.badImplementation('terrible implementation'); +``` + +Generates the following response payload: + +```json +{ + "statusCode": 500, + "error": "Internal Server Error", + "message": "An internal server error occurred" +} +``` + ### `Boom.notImplemented([message], [data])` Returns a 501 Not Implemented error where: @@ -590,26 +645,6 @@ Generates the following response payload: } ``` -### `Boom.badImplementation([message], [data])` - -Returns a 500 Internal Server Error error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badImplementation('terrible implementation'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 500, - "error": "Internal Server Error", - "message": "An internal server error occurred" -} -``` - ## F.A.Q. ###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives? diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js index 18cf99ba53db01..6bdea693688ed3 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js @@ -278,7 +278,7 @@ internals.serverError = function (message, data, statusCode, ctor) { if (data instanceof Error) { error = exports.wrap(data, statusCode, message); } else { - error = internals.create(statusCode || 500, message, ctor); + error = internals.create(statusCode || 500, message, undefined, ctor); error.data = data; } diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json index 2b01dad14d7f2b..f869d5e6371948 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json @@ -1,7 +1,7 @@ { "name": "boom", "description": "HTTP-friendly error objects", - "version": "2.10.0", + "version": "2.10.1", "repository": { "type": "git", "url": "git://github.com/hapijs/boom.git" @@ -19,46 +19,21 @@ }, "devDependencies": { "code": "1.x.x", - "lab": "6.x.x" + "lab": "7.x.x" }, "scripts": { "test": "lab -a code -t 100 -L", "test-cov-html": "lab -a code -r html -o coverage.html -L" }, "license": "BSD-3-Clause", - "gitHead": "0d745c736930ef849d94fbdd7a32d7c300197c0e", + "readme": "![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png)\n\nHTTP-friendly error objects\n\n[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom)\n[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom)\n\nLead Maintainer: [Adam Bretz](https://github.com/arb)\n\n**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response\nobject (instance of `Error`) which includes the following properties:\n- `isBoom` - if `true`, indicates this is a `Boom` object instance.\n- `isServer` - convenience bool indicating status code >= 500.\n- `message` - the error message.\n- `output` - the formatted response. Can be directly manipulated after object construction to return a custom\n error response. Allowed root keys:\n - `statusCode` - the HTTP status code (typically 4xx or 5xx).\n - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content.\n - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any\n changes will be lost\n if `reformat()` is called. Any content allowed and by default includes the following content:\n - `statusCode` - the HTTP status code, derived from `error.output.statusCode`.\n - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`.\n - `message` - the error message derived from `error.message`.\n- inherited `Error` properties.\n\nThe `Boom` object also supports the following method:\n- `reformat()` - rebuilds `error.output` using the other object properties.\n\n## Overview\n\n- Helper methods\n - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message)\n - [`create(statusCode, [message], [data])`](#createstatuscode-message-data)\n- HTTP 4xx Errors\n - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data)\n - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes)\n - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data)\n - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data)\n - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data)\n - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data)\n - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data)\n - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data)\n - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data)\n - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data)\n - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data)\n - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data)\n - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data)\n - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data)\n - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data)\n - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data)\n - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data)\n - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data)\n - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data)\n - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data)\n- HTTP 5xx Errors\n - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data)\n - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data)\n - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data)\n - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data)\n - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data)\n- [FAQ](#faq)\n\n\n## Helper Methods\n\n### `wrap(error, [statusCode], [message])`\n\nDecorates an error with the **boom** properties where:\n- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object.\n- `statusCode` - optional HTTP status code. Defaults to `500`.\n- `message` - optional message string. If the error already has a message, it adds the message as a prefix.\n Defaults to no message.\n\n```js\nvar error = new Error('Unexpected input');\nBoom.wrap(error, 400);\n```\n\n### `create(statusCode, [message], [data])`\n\nGenerates an `Error` object with the **boom** decorations where:\n- `statusCode` - an HTTP error code number. Must be greater or equal 400.\n- `message` - optional message string.\n- `data` - additional error data set to `error.data` property.\n\n```js\nvar error = Boom.create(400, 'Bad request', { timestamp: Date.now() });\n```\n\n## HTTP 4xx Errors\n\n### `Boom.badRequest([message], [data])`\n\nReturns a 400 Bad Request error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.badRequest('invalid query');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 400,\n \"error\": \"Bad Request\",\n \"message\": \"invalid query\"\n}\n```\n\n### `Boom.unauthorized([message], [scheme], [attributes])`\n\nReturns a 401 Unauthorized error where:\n- `message` - optional message.\n- `scheme` can be one of the following:\n - an authentication scheme name\n - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header.\n- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used\n when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the\n 'WWW-Authenticate' in the format of 'key=\"value\"' as well as in the response payload under the `attributes` key.\n `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as\n the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header\n will not be present and `isMissing` will be true on the error object.\n\nIf either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response.\n\n```js\nBoom.unauthorized('invalid password');\n```\n\nGenerates the following response:\n\n```json\n\"payload\": {\n \"statusCode\": 401,\n \"error\": \"Unauthorized\",\n \"message\": \"invalid password\"\n},\n\"headers\" {}\n```\n\n```js\nBoom.unauthorized('invalid password', 'sample');\n```\n\nGenerates the following response:\n\n```json\n\"payload\": {\n \"statusCode\": 401,\n \"error\": \"Unauthorized\",\n \"message\": \"invalid password\",\n \"attributes\": {\n \"error\": \"invalid password\"\n }\n},\n\"headers\" {\n \"WWW-Authenticate\": \"sample error=\\\"invalid password\\\"\"\n}\n```\n\n```js\nBoom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' });\n```\n\nGenerates the following response:\n\n```json\n\"payload\": {\n \"statusCode\": 401,\n \"error\": \"Unauthorized\",\n \"message\": \"invalid password\",\n \"attributes\": {\n \"error\": \"invalid password\",\n \"ttl\": 0,\n \"cache\": \"\",\n \"foo\": \"bar\"\n }\n},\n\"headers\" {\n \"WWW-Authenticate\": \"sample ttl=\\\"0\\\", cache=\\\"\\\", foo=\\\"bar\\\", error=\\\"invalid password\\\"\"\n}\n```\n\n### `Boom.forbidden([message], [data])`\n\nReturns a 403 Forbidden error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.forbidden('try again some time');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 403,\n \"error\": \"Forbidden\",\n \"message\": \"try again some time\"\n}\n```\n\n### `Boom.notFound([message], [data])`\n\nReturns a 404 Not Found error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.notFound('missing');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 404,\n \"error\": \"Not Found\",\n \"message\": \"missing\"\n}\n```\n\n### `Boom.methodNotAllowed([message], [data])`\n\nReturns a 405 Method Not Allowed error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.methodNotAllowed('that method is not allowed');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 405,\n \"error\": \"Method Not Allowed\",\n \"message\": \"that method is not allowed\"\n}\n```\n\n### `Boom.notAcceptable([message], [data])`\n\nReturns a 406 Not Acceptable error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.notAcceptable('unacceptable');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 406,\n \"error\": \"Not Acceptable\",\n \"message\": \"unacceptable\"\n}\n```\n\n### `Boom.proxyAuthRequired([message], [data])`\n\nReturns a 407 Proxy Authentication Required error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.proxyAuthRequired('auth missing');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 407,\n \"error\": \"Proxy Authentication Required\",\n \"message\": \"auth missing\"\n}\n```\n\n### `Boom.clientTimeout([message], [data])`\n\nReturns a 408 Request Time-out error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.clientTimeout('timed out');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 408,\n \"error\": \"Request Time-out\",\n \"message\": \"timed out\"\n}\n```\n\n### `Boom.conflict([message], [data])`\n\nReturns a 409 Conflict error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.conflict('there was a conflict');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 409,\n \"error\": \"Conflict\",\n \"message\": \"there was a conflict\"\n}\n```\n\n### `Boom.resourceGone([message], [data])`\n\nReturns a 410 Gone error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.resourceGone('it is gone');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 410,\n \"error\": \"Gone\",\n \"message\": \"it is gone\"\n}\n```\n\n### `Boom.lengthRequired([message], [data])`\n\nReturns a 411 Length Required error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.lengthRequired('length needed');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 411,\n \"error\": \"Length Required\",\n \"message\": \"length needed\"\n}\n```\n\n### `Boom.preconditionFailed([message], [data])`\n\nReturns a 412 Precondition Failed error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.preconditionFailed();\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 412,\n \"error\": \"Precondition Failed\"\n}\n```\n\n### `Boom.entityTooLarge([message], [data])`\n\nReturns a 413 Request Entity Too Large error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.entityTooLarge('too big');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 413,\n \"error\": \"Request Entity Too Large\",\n \"message\": \"too big\"\n}\n```\n\n### `Boom.uriTooLong([message], [data])`\n\nReturns a 414 Request-URI Too Large error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.uriTooLong('uri is too long');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 414,\n \"error\": \"Request-URI Too Large\",\n \"message\": \"uri is too long\"\n}\n```\n\n### `Boom.unsupportedMediaType([message], [data])`\n\nReturns a 415 Unsupported Media Type error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.unsupportedMediaType('that media is not supported');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 415,\n \"error\": \"Unsupported Media Type\",\n \"message\": \"that media is not supported\"\n}\n```\n\n### `Boom.rangeNotSatisfiable([message], [data])`\n\nReturns a 416 Requested Range Not Satisfiable error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.rangeNotSatisfiable();\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 416,\n \"error\": \"Requested Range Not Satisfiable\"\n}\n```\n\n### `Boom.expectationFailed([message], [data])`\n\nReturns a 417 Expectation Failed error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.expectationFailed('expected this to work');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 417,\n \"error\": \"Expectation Failed\",\n \"message\": \"expected this to work\"\n}\n```\n\n### `Boom.badData([message], [data])`\n\nReturns a 422 Unprocessable Entity error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.badData('your data is bad and you should feel bad');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 422,\n \"error\": \"Unprocessable Entity\",\n \"message\": \"your data is bad and you should feel bad\"\n}\n```\n\n### `Boom.preconditionRequired([message], [data])`\n\nReturns a 428 Precondition Required error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.preconditionRequired('you must supply an If-Match header');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 428,\n \"error\": \"Precondition Required\",\n \"message\": \"you must supply an If-Match header\"\n}\n```\n\n### `Boom.tooManyRequests([message], [data])`\n\nReturns a 429 Too Many Requests error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.tooManyRequests('you have exceeded your request limit');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 429,\n \"error\": \"Too Many Requests\",\n \"message\": \"you have exceeded your request limit\"\n}\n```\n\n## HTTP 5xx Errors\n\nAll 500 errors hide your message from the end user. Your message is recorded in the server log.\n\n### `Boom.badImplementation([message], [data])`\n\nReturns a 500 Internal Server Error error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.badImplementation('terrible implementation');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 500,\n \"error\": \"Internal Server Error\",\n \"message\": \"An internal server error occurred\"\n}\n```\n\n### `Boom.notImplemented([message], [data])`\n\nReturns a 501 Not Implemented error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.notImplemented('method not implemented');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 501,\n \"error\": \"Not Implemented\",\n \"message\": \"method not implemented\"\n}\n```\n\n### `Boom.badGateway([message], [data])`\n\nReturns a 502 Bad Gateway error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.badGateway('that is a bad gateway');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 502,\n \"error\": \"Bad Gateway\",\n \"message\": \"that is a bad gateway\"\n}\n```\n\n### `Boom.serverTimeout([message], [data])`\n\nReturns a 503 Service Unavailable error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.serverTimeout('unavailable');\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 503,\n \"error\": \"Service Unavailable\",\n \"message\": \"unavailable\"\n}\n```\n\n### `Boom.gatewayTimeout([message], [data])`\n\nReturns a 504 Gateway Time-out error where:\n- `message` - optional message.\n- `data` - optional additional error data.\n\n```js\nBoom.gatewayTimeout();\n```\n\nGenerates the following response payload:\n\n```json\n{\n \"statusCode\": 504,\n \"error\": \"Gateway Time-out\"\n}\n```\n\n## F.A.Q.\n\n###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives?\n\nThere is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the [\"Error transformation\"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hapijs/boom/issues" }, - "homepage": "https://github.com/hapijs/boom", - "_id": "boom@2.10.0", - "_shasum": "ff4cb6a6d3d5246239f6b97a69a8412362d096e4", - "_from": "boom@>=2.8.0 <3.0.0", - "_npmVersion": "2.14.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "arb", - "email": "arbretz@gmail.com" - }, - "maintainers": [ - { - "name": "hueniverse", - "email": "eran@hueniverse.com" - }, - { - "name": "wyatt", - "email": "wpreul@gmail.com" - }, - { - "name": "arb", - "email": "arbretz@gmail.com" - } - ], - "dist": { - "shasum": "ff4cb6a6d3d5246239f6b97a69a8412362d096e4", - "tarball": "http://registry.npmjs.org/boom/-/boom-2.10.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/boom/-/boom-2.10.0.tgz", - "readme": "ERROR: No README data found!" + "homepage": "https://github.com/hapijs/boom#readme", + "_id": "boom@2.10.1", + "_shasum": "39c8918ceff5799f83f9492a848f625add0c766f", + "_resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "_from": "boom@>=2.0.0 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js index 3f092baae3c73c..79a59e9f46623f 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js @@ -629,3 +629,26 @@ describe('badImplementation()', function () { done(); }); }); + +describe('stack trace', function () { + + it('should omit lib', function (done) { + + ['badRequest', 'unauthorized', 'forbidden', 'notFound', 'methodNotAllowed', + 'notAcceptable', 'proxyAuthRequired', 'clientTimeout', 'conflict', + 'resourceGone', 'lengthRequired', 'preconditionFailed', 'entityTooLarge', + 'uriTooLong', 'unsupportedMediaType', 'rangeNotSatisfiable', 'expectationFailed', + 'badData', 'preconditionRequired', 'tooManyRequests', + + // 500s + 'internal', 'notImplemented', 'badGateway', 'serverTimeout', 'gatewayTimeout', + 'badImplementation' + ].forEach(function (name) { + + var err = Boom[name](); + expect(err.stack).to.not.match(/\/lib\/index\.js/); + }); + + done(); + }); +}); diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json index c65fd094047c73..16d0b49c9bbc0b 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json @@ -27,35 +27,14 @@ "test-cov-html": "lab -a code -r html -o coverage.html" }, "license": "BSD-3-Clause", - "gitHead": "9bc5a852f01cd51e615814e1cb255fe2df810649", + "readme": "cryptiles\n=========\n\nGeneral purpose crypto utilities\n\n[![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles)\n\nLead Maintainer - [C J Silverio](https://github.com/ceejbot)\n\n## Methods\n\n### `randomString( size)`\nReturns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.\n\n### `fixedTimeComparison( a, b)`\nCompare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hapijs/cryptiles/issues" }, "homepage": "https://github.com/hapijs/cryptiles#readme", "_id": "cryptiles@2.0.5", "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8", - "_from": "cryptiles@>=2.0.0 <3.0.0", - "_npmVersion": "2.14.2", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "hueniverse", - "email": "eran@hammer.io" - }, - "dist": { - "shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8", - "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" - }, - "maintainers": [ - { - "name": "hueniverse", - "email": "eran@hueniverse.com" - }, - { - "name": "ceejbot", - "email": "ceejceej@gmail.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "readme": "ERROR: No README data found!" + "_from": "cryptiles@>=2.0.0 <3.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/package.json b/deps/npm/node_modules/request/node_modules/hawk/package.json index 5a835b2e42a959..f3b98e74f688ad 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/package.json @@ -1,7 +1,7 @@ { "name": "hawk", "description": "HTTP Hawk Authentication Scheme", - "version": "3.1.0", + "version": "3.1.2", "author": { "name": "Eran Hammer", "email": "eran@hammer.io", @@ -25,7 +25,7 @@ "browser": "./lib/browser.js", "dependencies": { "hoek": "2.x.x", - "boom": "^2.8.x", + "boom": "2.x.x", "cryptiles": "2.x.x", "sntp": "1.x.x" }, @@ -38,31 +38,14 @@ "test-cov-html": "lab -a code -r html -o coverage.html" }, "license": "BSD-3-Clause", - "gitHead": "fdb9d05e383d5237631eaddc4f51422e54fa8b52", + "readme": "![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)\n\n **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial\nHTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).\n\nCurrent version: **3.x**\n\nNote: 3.x and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)\n\n# Table of Content\n\n- [**Introduction**](#introduction)\n - [Replay Protection](#replay-protection)\n - [Usage Example](#usage-example)\n - [Protocol Example](#protocol-example)\n - [Payload Validation](#payload-validation)\n - [Response Payload Validation](#response-payload-validation)\n - [Browser Support and Considerations](#browser-support-and-considerations)\n

    \n- [**Single URI Authorization**](#single-uri-authorization)\n - [Usage Example](#bewit-usage-example)\n

    \n- [**Security Considerations**](#security-considerations)\n - [MAC Keys Transmission](#mac-keys-transmission)\n - [Confidentiality of Requests](#confidentiality-of-requests)\n - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)\n - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)\n - [Entropy of Keys](#entropy-of-keys)\n - [Coverage Limitations](#coverage-limitations)\n - [Future Time Manipulation](#future-time-manipulation)\n - [Client Clock Poisoning](#client-clock-poisoning)\n - [Bewit Limitations](#bewit-limitations)\n - [Host Header Forgery](#host-header-forgery)\n

    \n- [**Frequently Asked Questions**](#frequently-asked-questions)\n

    \n- [**Implementations**](#implementations)\n- [**Acknowledgements**](#acknowledgements)\n\n# Introduction\n\n**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with\npartial cryptographic verification of the request and response, covering the HTTP method, request URI, host,\nand optionally the request payload.\n\nSimilar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of\nclient credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,\nthe key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is\nincluded in its place.\n\nHowever, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of\nreplay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less\n\"chattiness\" (interaction with the server).\n\nAlso unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because\nthe client and server must both have access to the key material in the clear.\n\nThe primary design goals of this scheme are to:\n* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,\n* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where\n to send an authenticated request), and\n* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client\n failure to validate the server's identity as part of its TLS handshake.\n\nIn addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using\na query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).\n\nThe **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,\nwhich is beyond the scope of this module. Typically, the shared credentials are established via an initial\nTLS-protected phase or derived from some other shared confidential information available to both the client\nand the server.\n\n\n## Replay Protection\n\nWithout replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more \nthan once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when \nmaking requests. This gives the server enough information to prevent replay attacks.\n\nThe nonce is generated by the client, and is a string unique across all requests with the same timestamp and\nkey identifier combination. \n\nThe timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards\nare rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.\nBy default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in\npractice translates to a maximum of 2 minutes as the skew can be positive or negative).\n\nUsing a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client\nclock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types\n(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response\nto a bad timestamp.\n\nThere is no expectation that the client will adjust its system clock to match the server (in fact, this would be a\npotential attack vector). Instead, the client only uses the server's time to calculate an offset used only\nfor communications with that particular server. The protocol rewards clients with synchronized clocks by reducing\nthe number of round trips required to authenticate the first request.\n\n\n## Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256',\n user: 'Steve'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n // Authenticate incoming request\n\n Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {\n\n // Prepare response\n\n var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');\n var headers = { 'Content-Type': 'text/plain' };\n\n // Generate Server-Authorization response header\n\n var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });\n headers['Server-Authorization'] = header;\n\n // Send the response back\n\n res.writeHead(!err ? 200 : 401, headers);\n res.end(payload);\n });\n};\n\n// Start server\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nClient code:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Request options\n\nvar requestOptions = {\n uri: 'http://example.com:8000/resource/1?b=1&a=2',\n method: 'GET',\n headers: {}\n};\n\n// Generate Authorization request header\n\nvar header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });\nrequestOptions.headers.Authorization = header.field;\n\n// Send authenticated request\n\nRequest(requestOptions, function (error, response, body) {\n\n // Authenticate the server's response\n\n var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });\n\n // Output results\n\n console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));\n});\n```\n\n**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local\nmachine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.\n\n```javascript\nHawk.sntp.start();\n```\n\n\n## Protocol Example\n\nThe client attempts to access a protected resource without authentication, sending the following HTTP request to\nthe resource server:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\n```\n\nThe resource server returns an authentication challenge.\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Hawk\n```\n\nThe client has previously obtained a set of **Hawk** credentials for accessing resources on the \"http://example.com/\"\nserver. The **Hawk** credentials issued to the client include the following attributes:\n\n* Key identifier: dh37fgj492je\n* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn\n* Algorithm: sha256\n\nThe client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,\n1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline\ncharacter):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nGET\n/resource/1?b=1&a=2\nexample.com\n8000\n\nsome-app-ext-data\n\n```\n\nThe request MAC is calculated using HMAC with the specified hash algorithm \"sha256\" and the key over the normalized request string.\nThe result is base64-encoded to produce the request MAC:\n\n```\n6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\n```\n\nThe client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using\nthe HTTP `Authorization` request header field:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", ext=\"some-app-ext-data\", mac=\"6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\"\n```\n\nThe server validates the request by calculating the request MAC again based on the request received and verifies the validity\nand scope of the **Hawk** credentials. If valid, the server responds with the requested resource.\n\n\n### Payload Validation\n\n**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash\nusing the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):\n* `hawk.1.payload`\n* the content-type in lowercase, without any parameters (e.g. `application/json`)\n* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)\n\nFor example:\n\n* Payload: `Thank you for flying Hawk`\n* Content Type: `text/plain`\n* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`\n\nResults in the following input to the payload hash function (newline terminated values):\n\n```\nhawk.1.payload\ntext/plain\nThank you for flying Hawk\n\n```\n\nWhich produces the following hash value:\n\n```\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\n```\n\nThe client constructs the normalized request string (newline terminated values):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource/1?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n\n```\n\nThen calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,\nand request MAC, with the request using the HTTP `Authorization` request header field:\n\n```\nPOST /resource/1?a=1&b=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", hash=\"Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\", ext=\"some-app-ext-data\", mac=\"aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=\"\n```\n\nIt is up to the server if and when it validates the payload for any given request, based solely on it's security policy\nand the nature of the data included.\n\nIf the payload is available at the time of authentication, the server uses the hash value provided by the client to construct\nthe normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value\nwith the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.\n\nHowever, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed\nat a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value\nprovided by the client after validating the MAC.\n\nIt is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value\nincluded in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided\nby the client, the payload may be modified by an attacker.\n\n\n## Response Payload Validation\n\n**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the\nclient to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header\nas a response header using the exact same syntax as the `Authorization` request header field.\n\nThe header is contructed using the same process as the client's request header. The server uses the same credentials and other\nartifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with\nnew values based on the server response. The rest as identical to those used by the client.\n\nThe result MAC digest is included with the optional `hash` and `ext` values:\n\n```\nServer-Authorization: Hawk mac=\"XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"\n```\n\n\n## Browser Support and Considerations\n\nA browser script is provided for including using a ` + + \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js new file mode 100644 index 00000000000000..664c1b455bd77e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js @@ -0,0 +1,3 @@ +var BigInteger = require('./'); +var a = new BigInteger('91823918239182398123'); +console.log(a.bitLength()); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js new file mode 100644 index 00000000000000..e32fe13d860085 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js @@ -0,0 +1,1358 @@ +(function(){ + + // Copyright (c) 2005 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Basic JavaScript BN library - subset useful for RSA encryption. + + // Bits per digit + var dbits; + + // JavaScript engine analysis + var canary = 0xdeadbeefcafe; + var j_lm = ((canary&0xffffff)==0xefcafe); + + // (public) Constructor + function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); + } + + // return new, unset BigInteger + function nbi() { return new BigInteger(null); } + + // am: Compute w_j += (x*this_i), propagate carries, + // c is initial carry, returns final carry. + // c < 3*dvalue, x < 2*dvalue, this_i < dvalue + // We need to select the fastest one that works in this environment. + + // am1: use a single mult and divide to get the high bits, + // max digit bits should be 26 because + // max internal value = 2*dvalue^2-2*dvalue (< 2^53) + function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; + } + // am2 avoids a big mult-and-extract completely. + // Max digit bits should be <= 30 because we do bitwise ops + // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) + function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; + } + // Alternately, set max digit bits to 28 since some + // browsers slow down when dealing with 32-bit numbers. + function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; + } + else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; + } + else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; + } + + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; + } + + // (protected) set from integer value x, -DV <= x < DV + function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+this.DV; + else this.t = 0; + } + + // return bigint initialized to value + function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + + // (protected) set from string and radix + function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; + } + + // (public) return string representation in given radix + function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; + } + + // (public) -this + function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + + // (public) |this| + function bnAbs() { return (this.s<0)?this.negate():this; } + + // (public) return + if this > a, - if this < a, 0 if equal + function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; + } + + // returns bit length of the integer x + function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; + } + + // (public) return the number of bits in "this" + function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); + } + + // (protected) r = this << n*DB + function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; + } + + // (protected) r = this >> n*DB + function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; + } + + // (protected) r = this << n + function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); + } + + // (protected) r = this >> n + function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); + } + + // (protected) r = this * a, r != this,a (HAC 14.12) + // "this" should be the larger one if appropriate. + function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); + } + + // (protected) r = this^2, r != this (HAC 14.16) + function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); + } + + // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) + // r != q, this != m. q or r may be null. + function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); + } + + // (public) this mod a + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; + } + + // Modular reduction using "classic" algorithm + function Classic(m) { this.m = m; } + function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { return x; } + function cReduce(x) { x.divRemTo(this.m,null,x); } + function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + + // (protected) return "-1/this % 2^DB"; useful for Mont. reduction + // justification: + // xy == 1 (mod m) + // xy = 1+km + // xy(2-xy) = (1+km)(1-km) + // x[y(2-xy)] = 1-k^2m^2 + // x[y(2-xy)] == 1 (mod m^2) + // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 + // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. + // JS multiply "overflows" differently from C/C++, so care is needed here. + function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; + } + + // Montgomery reduction + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; + } + + // xR mod m + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; + } + + // x/R mod m + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + + // x = x/R mod m (HAC 14.32) + function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = "x^2/R mod m"; x != r + function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = "xy/R mod m"; x,y != r + function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + + // (protected) true iff this is even + function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + + // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) + function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); + } + + // (public) this^e % m, 0 <= e < 2^32 + function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); + } + + // protected + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + + // public + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + + // "constants" + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + + // Copyright (c) 2005-2009 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Extended JavaScript BN functions, required for RSA private ops. + + // Version 1.1: new BigInteger("0", 10) returns "proper" zero + // Version 1.2: square() API, isProbablePrime fix + + // (public) + function bnClone() { var r = nbi(); this.copyTo(r); return r; } + + // (public) return value as integer + function bnIntValue() { + if(this.s < 0) { + if(this.t == 1) return this[0]-this.DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this[1]&((1<<(32-this.DB))-1))<>24; } + + // (public) return value as short (assumes DB>=16) + function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } + + // (protected) return x s.t. r^x < DV + function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + + // (public) 0 if this == 0, 1 if this > 0 + function bnSigNum() { + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; + else return 1; + } + + // (protected) convert to radix string + function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; + } + + // (protected) convert from radix string + function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); + } + + // (protected) alternate constructor + function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this[i]&((1<>(p+=this.DB-8); + } + else { + d = (this[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + + function bnEquals(a) { return(this.compareTo(a)==0); } + function bnMin(a) { return(this.compareTo(a)<0)?this:a; } + function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + + // (protected) r = this op a (bitwise) + function bnpBitwiseTo(a,op,r) { + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); + if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r[i] = op(this[i],f); + r.t = this.t; + } + else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); + } + + // (public) this & a + function op_and(x,y) { return x&y; } + function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + + // (public) this | a + function op_or(x,y) { return x|y; } + function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + + // (public) this ^ a + function op_xor(x,y) { return x^y; } + function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + + // (public) this & ~a + function op_andnot(x,y) { return x&~y; } + function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + + // (public) ~this + function bnNot() { + var r = nbi(); + for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; + r.t = this.t; + r.s = ~this.s; + return r; + } + + // (public) this << n + function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; + } + + // (public) this >> n + function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; + } + + // return index of lowest 1-bit in x, x < 2^31 + function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; + } + + // (public) returns index of lowest 1-bit (or -1 if none) + function bnGetLowestSetBit() { + for(var i = 0; i < this.t; ++i) + if(this[i] != 0) return i*this.DB+lbit(this[i]); + if(this.s < 0) return this.t*this.DB; + return -1; + } + + // return number of 1 bits in x + function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; + } + + // (public) return number of set bits + function bnBitCount() { + var r = 0, x = this.s&this.DM; + for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); + return r; + } + + // (public) true iff nth bit is set + function bnTestBit(n) { + var j = Math.floor(n/this.DB); + if(j >= this.t) return(this.s!=0); + return((this[j]&(1<<(n%this.DB)))!=0); + } + + // (protected) this op (1<>= this.DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r[i++] = c; + else if(c < -1) r[i++] = this.DV+c; + r.t = i; + r.clamp(); + } + + // (public) this + a + function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + + // (public) this - a + function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + + // (public) this * a + function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + + // (public) this^2 + function bnSquare() { var r = nbi(); this.squareTo(r); return r; } + + // (public) this / a + function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + + // (public) this % a + function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + + // (public) [this/a,this%a] + function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); + } + + // (protected) this *= n, this >= 0, 1 < n < DV + function bnpDMultiply(n) { + this[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); + } + + // (protected) this += n << w words, this >= 0 + function bnpDAddOffset(n,w) { + if(n == 0) return; + while(this.t <= w) this[this.t++] = 0; + this[w] += n; + while(this[w] >= this.DV) { + this[w] -= this.DV; + if(++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + + // A "null" reducer + function NullExp() {} + function nNop(x) { return x; } + function nMulTo(x,y,r) { x.multiplyTo(y,r); } + function nSqrTo(x,r) { x.squareTo(r); } + + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + + // (public) this^e + function bnPow(e) { return this.exp(e,new NullExp()); } + + // (protected) r = lower n words of "this * a", a.t <= n + // "this" should be the larger one if appropriate. + function bnpMultiplyLowerTo(a,n,r) { + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); + r.clamp(); + } + + // (protected) r = "this * a" without lower n words, n > 0 + // "this" should be the larger one if appropriate. + function bnpMultiplyUpperTo(a,n,r) { + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); + } + + // Barrett modular reduction + function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + + function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } + } + + function barrettRevert(x) { return x; } + + // x = x mod m (HAC 14.42) + function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = x^2 mod m; x != r + function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = x*y mod m; x,y != r + function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + + // (public) this^e % m (HAC 14.85) + function bnModPow(e,m) { + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e[j])-1; + while(j >= 0) { + if(i >= k1) w = (e[j]>>(i-k1))&km; + else { + w = (e[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; + } + + // (protected) this % n, n < 2^26 + function bnpModInt(n) { + if(n <= 0) return 0; + var d = this.DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; + return r; + } + + // (public) 1/this % m (HAC 14.61) + function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; + } + + var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; + var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + + // (public) test primality with certainty >= 1-.5^t + function bnIsProbablePrime(t) { + var i, x = this.abs(); + if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); + } + + // (protected) true if probably prime (HAC 4.24, Miller-Rabin) + function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + //Pick bases at random, instead of starting at 2 + a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; + } + + // protected + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + + // public + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + + // JSBN-specific extension + BigInteger.prototype.square = bnSquare; + + // Expose the Barrett function + BigInteger.prototype.Barrett = Barrett + + // BigInteger interfaces not implemented in jsbn: + + // BigInteger(int signum, byte[] magnitude) + // double doubleValue() + // float floatValue() + // int hashCode() + // long longValue() + // static BigInteger valueOf(long val) + + // Random number generator - requires a PRNG backend, e.g. prng4.js + + // For best results, put code like + // + // in your main HTML document. + + var rng_state; + var rng_pool; + var rng_pptr; + + // Mix in a 32-bit integer into the pool + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + + // Mix in the current time (w/milliseconds) into the pool + function rng_seed_time() { + rng_seed_int(new Date().getTime()); + } + + // Initialize the pool with junk if needed. + if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + // Use webcrypto if available + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for(t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } + else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); + } + + function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); + } + + function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); + } + + function SecureRandom() {} + + SecureRandom.prototype.nextBytes = rng_get_bytes; + + // prng4.js - uses Arcfour as a PRNG + + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + + // Initialize arcfour context from key, an array of ints, each from [0..255] + function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; + } + + function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; + } + + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + + // Plug in your RNG constructor here + function prng_newstate() { + return new Arcfour(); + } + + // Pool size must be a multiple of 4 and greater than 32. + // An array of bytes the size of the pool will be passed to init() + var rng_psize = 256; + + if (typeof exports !== 'undefined') { + exports = module.exports = { + BigInteger: BigInteger, + SecureRandom: SecureRandom, + }; + } else { + this.BigInteger = BigInteger; + this.SecureRandom = SecureRandom; + } + +}).call(this); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json new file mode 100644 index 00000000000000..13bae552494351 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json @@ -0,0 +1,33 @@ +{ + "name": "jsbn", + "version": "0.1.0", + "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", + "main": "index.js", + "scripts": { + "test": "mocha test.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/andyperlitch/jsbn.git" + }, + "keywords": [ + "biginteger", + "bignumber", + "big", + "integer" + ], + "author": { + "name": "Tom Wu" + }, + "license": "BSD", + "readme": "# jsbn: javascript big number\n\n[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/)\n\nI felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the modular pattern applied to prevent global leaks and to allow for use with node.js on the server side.\n\n## usage\n\n var BigInteger = require('jsbn');\n \n var a = new BigInteger('91823918239182398123');\n alert(a.bitLength()); // 67\n\n\n## API\n\n### bi.toString()\n\nreturns the base-10 number as a string\n\n### bi.negate()\n\nreturns a new BigInteger equal to the negation of `bi`\n\n### bi.abs\n\nreturns new BI of absolute value\n\n### bi.compareTo\n\n\n\n### bi.bitLength\n\n\n\n### bi.mod\n\n\n\n### bi.modPowInt\n\n\n\n### bi.clone\n\n\n\n### bi.intValue\n\n\n\n### bi.byteValue\n\n\n\n### bi.shortValue\n\n\n\n### bi.signum\n\n\n\n### bi.toByteArray\n\n\n\n### bi.equals\n\n\n\n### bi.min\n\n\n\n### bi.max\n\n\n\n### bi.and\n\n\n\n### bi.or\n\n\n\n### bi.xor\n\n\n\n### bi.andNot\n\n\n\n### bi.not\n\n\n\n### bi.shiftLeft\n\n\n\n### bi.shiftRight\n\n\n\n### bi.getLowestSetBit\n\n\n\n### bi.bitCount\n\n\n\n### bi.testBit\n\n\n\n### bi.setBit\n\n\n\n### bi.clearBit\n\n\n\n### bi.flipBit\n\n\n\n### bi.add\n\n\n\n### bi.subtract\n\n\n\n### bi.multiply\n\n\n\n### bi.divide\n\n\n\n### bi.remainder\n\n\n\n### bi.divideAndRemainder\n\n\n\n### bi.modPow\n\n\n\n### bi.modInverse\n\n\n\n### bi.pow\n\n\n\n### bi.gcd\n\n\n\n### bi.isProbablePrime\n\n\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/andyperlitch/jsbn/issues" + }, + "homepage": "https://github.com/andyperlitch/jsbn#readme", + "_id": "jsbn@0.1.0", + "_shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd", + "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", + "_from": "jsbn@>=0.1.0 <0.2.0" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/.npmignore b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/.npmignore new file mode 100644 index 00000000000000..7d98dcbd2d360a --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/.npmignore @@ -0,0 +1,4 @@ +.eslintrc +.travis.yml +bower.json +test diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md new file mode 100644 index 00000000000000..a75b45f9c4b81e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md @@ -0,0 +1,128 @@ +TweetNaCl.js Changelog +====================== + + +v0.13.2 +------- + +* Fixed undefined variable bug in fast version of Poly1305. No worries, this + bug was *never* triggered. + +* Specified CC0 public domain dedication. + +* Updated development dependencies. + + +v0.13.1 +------- + +* Exclude `crypto` and `buffer` modules from browserify builds. + + +v0.13.0 +------- + +* Made `nacl-fast` the default version in NPM package. Now + `require("tweetnacl")` will use fast version; to get the original version, + use `require("tweetnacl/nacl.js")`. + +* Cleanup temporary array after generating random bytes. + + +v0.12.2 +------- + +* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, + `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. + + +v0.12.1 +------- + +* Significantly improved performance of Salsa20 (~1.5x faster) and + Poly1305 (~3.5x faster) in `nacl-fast` version. + + +v0.12.0 +------- + +* Instead of using the given secret key directly, TweetNaCl.js now copies it to + a new array in `nacl.box.keyPair.fromSecretKey` and + `nacl.sign.keyPair.fromSecretKey`. + + +v0.11.2 +------- + +* Added new constant: `nacl.sign.seedLength`. + + +v0.11.1 +------- + +* Even faster hash for both short and long inputs (in `nacl-fast`). + + +v0.11.0 +------- + +* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs + deterministically from a 32-byte seed. (It behaves like + [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) + `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) + +* Fast version now has an improved hash implementation that is 2x-5x faster. + +* Fixed benchmarks, which may have produced incorrect measurements. + + +v0.10.1 +------- + +* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. + + +v0.10.0 +------- + +* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal + with signed messages, and new `nacl.sign.detached` and + `nacl.sign.detached.verify` are available. + + Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a + message and "detached" signature. This was unlike NaCl's API, which dealt with + signed messages (concatenation of signature and message). + + The new API is: + + nacl.sign(message, secretKey) -> signedMessage + nacl.sign.open(signedMessage, publicKey) -> message | null + + Since detached signatures are common, two new API functions were introduced: + + nacl.sign.detached(message, secretKey) -> signature + nacl.sign.detached.verify(message, signature, publicKey) -> true | false + + (Note that it's `verify`, not `open`, and it returns a boolean value, unlike + `open`, which returns an "unsigned" message.) + +* NPM package now comes without `test` directory to keep it small. + + +v0.9.2 +------ + +* Improved documentation. +* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 + bytes in Poly1305 (and thus, secretbox and box). However this has no impact + in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit + indexes, and most implementations won't allocate more than a gigabyte or so. + (Obviously, there are no tests for the correctness of implementation.) Also, + it's not recommended to use messages that large without splitting them into + smaller packets anyway. + + +v0.9.1 +------ + +* Initial release diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md new file mode 100644 index 00000000000000..c40721d594afbb --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md @@ -0,0 +1,463 @@ +TweetNaCl.js +============ + +Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) +to JavaScript for modern browsers and Node.js. Public domain. + +[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) +](https://travis-ci.org/dchest/tweetnacl-js) + +[Demo](https://dchest.github.io/tweetnacl-js/) + +**:warning: Beta version. The library is stable and API is frozen, however +it has not been independently reviewed. If you can help reviewing it, please +[contact me](mailto:dmitry@codingrobots.com).** + +Documentation +============= + +* [Overview](#overview) +* [Installation](#installation) +* [Usage](#usage) + * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) + * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) + * [Scalar multiplication](#scalar-multiplication) + * [Signatures](#signatures) + * [Hashing](#hashing) + * [Random bytes generation](#random-bytes-generation) + * [Constant-time comparison](#constant-time-comparison) + * [Utilities](#utilities) +* [Examples](#examples) +* [System requirements](#system-requirements) +* [Development and testing](#development-and-testing) +* [Contributors](#contributors) +* [Who uses it](#who-uses-it) + + +Overview +-------- + +The primary goal of this project is to produce a translation of TweetNaCl to +JavaScript which is as close as possible to the original C implementation, plus +a thin layer of idiomatic high-level API on top of it. + +There are two versions, you can use either of them: + +* `nacl.js` is the port of TweetNaCl with minimum differences from the + original + high-level API. + +* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with + faster versions. + + +Installation +------------ + +You can install TweetNaCl.is via a package manager: + +[Bower](http://bower.io): + + $ bower install tweetnacl + +[NPM](https://www.npmjs.org/): + + $ npm install tweetnacl + +or [download source code](https://github.com/dchest/tweetnacl-js/releases). + + +Usage +------ + +All API functions accept and return bytes as `Uint8Array`s. If you need to +encode or decode strings, use functions from `nacl.util` namespace. + +### Public-key authenticated encryption (box) + +Implements *curve25519-xsalsa20-poly1305*. + +#### nacl.box.keyPair() + +Generates a new random key pair for box and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 32-byte secret key + } + + +#### nacl.box.keyPair.fromSecretKey(secretKey) + +Returns a key pair for box with public key corresponding to the given secret +key. + +#### nacl.box(message, nonce, theirPublicKey, mySecretKey) + +Encrypt and authenticates message using peer's public key, our secret key, and +the given nonce, which must be unique for each distinct message for a key pair. + +Returns an encrypted and authenticated message, which is +`nacl.box.overheadLength` longer than the original message. + +#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) + +Authenticates and decrypts the given box with peer's public key, our secret +key, and the given nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.box.before(theirPublicKey, mySecretKey) + +Returns a precomputed shared key which can be used in `nacl.box.after` and +`nacl.box.open.after`. + +#### nacl.box.after(message, nonce, sharedKey) + +Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.open.after(box, nonce, sharedKey) + +Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.publicKeyLength = 32 + +Length of public key in bytes. + +#### nacl.box.secretKeyLength = 32 + +Length of secret key in bytes. + +#### nacl.box.sharedKeyLength = 32 + +Length of precomputed shared key in bytes. + +#### nacl.box.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.box.overheadLength = 16 + +Length of overhead added to box compared to original message. + + +### Secret-key authenticated encryption (secretbox) + +Implements *xsalsa20-poly1305*. + +#### nacl.secretbox(message, nonce, key) + +Encrypt and authenticates message using the key and the nonce. The nonce must +be unique for each distinct message for this key. + +Returns an encrypted and authenticated message, which is +`nacl.secretbox.overheadLength` longer than the original message. + +#### nacl.secretbox.open(box, nonce, key) + +Authenticates and decrypts the given secret box using the key and the nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.secretbox.keyLength = 32 + +Length of key in bytes. + +#### nacl.secretbox.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.secretbox.overheadLength = 16 + +Length of overhead added to secret box compared to original message. + + +### Scalar multiplication + +Implements *curve25519*. + +#### nacl.scalarMult(n, p) + +Multiplies an integer `n` by a group element `p` and returns the resulting +group element. + +#### nacl.scalarMult.base(n) + +Multiplies an integer `n` by a standard group element and returns the resulting +group element. + +#### nacl.scalarMult.scalarLength = 32 + +Length of scalar in bytes. + +#### nacl.scalarMult.groupElementLength = 32 + +Length of group element in bytes. + + +### Signatures + +Implements [ed25519](http://ed25519.cr.yp.to). + +#### nacl.sign.keyPair() + +Generates new random key pair for signing and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 64-byte secret key + } + +#### nacl.sign.keyPair.fromSecretKey(secretKey) + +Returns a signing key pair with public key corresponding to the given +64-byte secret key. The secret key must have been generated by +`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. + +#### nacl.sign.keyPair.fromSeed(seed) + +Returns a new signing key pair generated deterministically from a 32-byte seed. +The seed must contain enough entropy to be secure. This method is not +recommended for general use: instead, use `nacl.sign.keyPair` to generate a new +key pair from a random seed. + +#### nacl.sign(message, secretKey) + +Signs the message using the secret key and returns a signed message. + +#### nacl.sign.open(signedMessage, publicKey) + +Verifies the signed message and returns the message without signature. + +Returns `null` if verification failed. + +#### nacl.sign.detached(message, secretKey) + +Signs the message using the secret key and returns a signature. + +#### nacl.sign.detached.verify(message, signature, publicKey) + +Verifies the signature for the message and returns `true` if verification +succeeded or `false` if it failed. + +#### nacl.sign.publicKeyLength = 32 + +Length of signing public key in bytes. + +#### nacl.sign.secretKeyLength = 64 + +Length of signing secret key in bytes. + +#### nacl.sign.seedLength = 32 + +Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. + +#### nacl.sign.signatureLength = 64 + +Length of signature in bytes. + + +### Hashing + +Implements *SHA-512*. + +#### nacl.hash(message) + +Returns SHA-512 hash of the message. + +#### nacl.hash.hashLength = 64 + +Length of hash in bytes. + + +### Random bytes generation + +#### nacl.randomBytes(length) + +Returns a `Uint8Array` of the given length containing random bytes of +cryptographic quality. + +**Implementation note** + +TweetNaCl.js uses the following methods to generate random bytes, +depending on the platform it runs on: + +* `window.crypto.getRandomValues` (WebCrypto standard) +* `window.msCrypto.getRandomValues` (Internet Explorer 11) +* `crypto.randomBytes` (Node.js) + +Note that browsers are required to throw `QuotaExceededError` exception if +requested `length` is more than 65536, so do not ask for more than 65536 bytes +in *one call* (multiple calls to get as many bytes as you like are okay: +browsers can generate infinite amount of random bytes without any bad +consequences). + +If the platform doesn't provide a suitable PRNG, the following functions, +which require random numbers, will throw exception: + +* `nacl.randomBytes` +* `nacl.box.keyPair` +* `nacl.sign.keyPair` + +Other functions are deterministic and will continue working. + +If a platform you are targeting doesn't implement secure random number +generator, but you somehow have a cryptographically-strong source of entropy +(not `Math.random`!), and you know what you are doing, you can plug it into +TweetNaCl.js like this: + + nacl.setPRNG(function(x, n) { + // ... copy n random bytes into x ... + }); + +Note that `nacl.setPRNG` *completely replaces* internal random byte generator +with the one provided. + + +### Constant-time comparison + +#### nacl.verify(x, y) + +Compares `x` and `y` in constant time and returns `true` if their lengths are +non-zero and equal, and their contents are equal. + +Returns `false` if either of the arguments has zero length, or arguments have +different lengths, or their contents differ. + + +### Utilities + +Encoding/decoding functions are provided for convenience. They are correct, +however their performance and wide compatibility with uncommon runtimes is not +something that is considered important compared to the simplicity and size of +implementation. You can use third-party libraries if you need to. + +#### nacl.util.decodeUTF8(string) + +Decodes string and returns `Uint8Array` of bytes. + +#### nacl.util.encodeUTF8(array) + +Encodes `Uint8Array` or `Array` of bytes into string. + +#### nacl.util.decodeBase64(string) + +Decodes Base-64 encoded string and returns `Uint8Array` of bytes. + +#### nacl.util.encodeBase64(array) + +Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding. + + +System requirements +------------------- + +TweetNaCl.js supports modern browsers that have a cryptographically secure +pseudorandom number generator and typed arrays, including the latest versions +of: + +* Chrome +* Firefox +* Safari (Mac, iOS) +* Internet Explorer 11 + +Other systems: + +* Node.js (we test on 0.10 and later) + + +Development and testing +------------------------ + +Install NPM modules needed for development: + + $ npm install + +To build minified versions: + + $ npm run build + +Tests use minified version, so make sure to rebuild it every time you change +`nacl.js` or `nacl-fast.js`. + +### Testing + +To run tests in Node.js: + + $ npm test + +By default all tests described here work on `nacl.min.js`. To test other +versions, set environment variable `NACL_SRC` to the file name you want to test. +For example, the following command will test fast minified version: + + $ NACL_SRC=nacl-fast.min.js npm test + +To run full suite of tests in Node.js, including comparing outputs of +JavaScript port to outputs of the original C version: + + $ npm run testall + +To prepare tests for browsers: + + $ npm run browser + +and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to +run them. + +To run headless browser tests with `testling`: + + $ npm run testling + +(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) + +### Benchmarking + +To run benchmarks in Node.js: + + $ npm run bench + $ NACL_SRC=nacl-fast.min.js npm run bench + +To run benchmarks in a browser, open `test/benchmark/bench.html` (or +`test/benchmark/bench-fast.html`). + + +Contributors +------------ + +JavaScript port: + + * [Dmitry Chestnykh](http://github.com/dchest) (ported xsalsa20, poly1305, curve25519) + * [Devi Mandiri](https://github.com/devi) (ported curve25519, ed25519, sha512) + +Original authors of [NaCl](http://nacl.cr.yp.to), [TweetNaCl](http://tweetnacl.cr.yp.to) +and [Poly1305-donna](https://github.com/floodyberry/poly1305-donna) +(who are *not* responsible for any errors in this implementation): + + * [Daniel J. Bernstein](http://cr.yp.to/djb.html) + * Wesley Janssen + * [Tanja Lange](http://hyperelliptic.org/tanja) + * [Peter Schwabe](http://www.cryptojedi.org/users/peter/) + * [Matthew Dempsky](https://github.com/mdempsky) + * [Andrew Moon](https://github.com/floodyberry) + +Contributors have dedicated their work to the public domain. + +This software is distributed without any warranty. + + +Third-party libraries based on TweetNaCl.js +------------------------------------------- + +* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation +* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption +* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) + + +Who uses it +----------- + +Some notable users of TweetNaCl.js: + +* [miniLock](http://minilock.io/) +* [Stellar](https://www.stellar.org/) diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js new file mode 100644 index 00000000000000..6c4995848cc42c --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js @@ -0,0 +1,2418 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function ts64(x, i, h, l) { + x[i] = (h >> 24) & 0xff; + x[i+1] = (h >> 16) & 0xff; + x[i+2] = (h >> 8) & 0xff; + x[i+3] = h & 0xff; + x[i+4] = (l >> 24) & 0xff; + x[i+5] = (l >> 16) & 0xff; + x[i+6] = (l >> 8) & 0xff; + x[i+7] = l & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core_salsa20(o, p, k, c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x1 >>> 0 & 0xff; + o[ 5] = x1 >>> 8 & 0xff; + o[ 6] = x1 >>> 16 & 0xff; + o[ 7] = x1 >>> 24 & 0xff; + + o[ 8] = x2 >>> 0 & 0xff; + o[ 9] = x2 >>> 8 & 0xff; + o[10] = x2 >>> 16 & 0xff; + o[11] = x2 >>> 24 & 0xff; + + o[12] = x3 >>> 0 & 0xff; + o[13] = x3 >>> 8 & 0xff; + o[14] = x3 >>> 16 & 0xff; + o[15] = x3 >>> 24 & 0xff; + + o[16] = x4 >>> 0 & 0xff; + o[17] = x4 >>> 8 & 0xff; + o[18] = x4 >>> 16 & 0xff; + o[19] = x4 >>> 24 & 0xff; + + o[20] = x5 >>> 0 & 0xff; + o[21] = x5 >>> 8 & 0xff; + o[22] = x5 >>> 16 & 0xff; + o[23] = x5 >>> 24 & 0xff; + + o[24] = x6 >>> 0 & 0xff; + o[25] = x6 >>> 8 & 0xff; + o[26] = x6 >>> 16 & 0xff; + o[27] = x6 >>> 24 & 0xff; + + o[28] = x7 >>> 0 & 0xff; + o[29] = x7 >>> 8 & 0xff; + o[30] = x7 >>> 16 & 0xff; + o[31] = x7 >>> 24 & 0xff; + + o[32] = x8 >>> 0 & 0xff; + o[33] = x8 >>> 8 & 0xff; + o[34] = x8 >>> 16 & 0xff; + o[35] = x8 >>> 24 & 0xff; + + o[36] = x9 >>> 0 & 0xff; + o[37] = x9 >>> 8 & 0xff; + o[38] = x9 >>> 16 & 0xff; + o[39] = x9 >>> 24 & 0xff; + + o[40] = x10 >>> 0 & 0xff; + o[41] = x10 >>> 8 & 0xff; + o[42] = x10 >>> 16 & 0xff; + o[43] = x10 >>> 24 & 0xff; + + o[44] = x11 >>> 0 & 0xff; + o[45] = x11 >>> 8 & 0xff; + o[46] = x11 >>> 16 & 0xff; + o[47] = x11 >>> 24 & 0xff; + + o[48] = x12 >>> 0 & 0xff; + o[49] = x12 >>> 8 & 0xff; + o[50] = x12 >>> 16 & 0xff; + o[51] = x12 >>> 24 & 0xff; + + o[52] = x13 >>> 0 & 0xff; + o[53] = x13 >>> 8 & 0xff; + o[54] = x13 >>> 16 & 0xff; + o[55] = x13 >>> 24 & 0xff; + + o[56] = x14 >>> 0 & 0xff; + o[57] = x14 >>> 8 & 0xff; + o[58] = x14 >>> 16 & 0xff; + o[59] = x14 >>> 24 & 0xff; + + o[60] = x15 >>> 0 & 0xff; + o[61] = x15 >>> 8 & 0xff; + o[62] = x15 >>> 16 & 0xff; + o[63] = x15 >>> 24 & 0xff; +} + +function core_hsalsa20(o,p,k,c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x5 >>> 0 & 0xff; + o[ 5] = x5 >>> 8 & 0xff; + o[ 6] = x5 >>> 16 & 0xff; + o[ 7] = x5 >>> 24 & 0xff; + + o[ 8] = x10 >>> 0 & 0xff; + o[ 9] = x10 >>> 8 & 0xff; + o[10] = x10 >>> 16 & 0xff; + o[11] = x10 >>> 24 & 0xff; + + o[12] = x15 >>> 0 & 0xff; + o[13] = x15 >>> 8 & 0xff; + o[14] = x15 >>> 16 & 0xff; + o[15] = x15 >>> 24 & 0xff; + + o[16] = x6 >>> 0 & 0xff; + o[17] = x6 >>> 8 & 0xff; + o[18] = x6 >>> 16 & 0xff; + o[19] = x6 >>> 24 & 0xff; + + o[20] = x7 >>> 0 & 0xff; + o[21] = x7 >>> 8 & 0xff; + o[22] = x7 >>> 16 & 0xff; + o[23] = x7 >>> 24 & 0xff; + + o[24] = x8 >>> 0 & 0xff; + o[25] = x8 >>> 8 & 0xff; + o[26] = x8 >>> 16 & 0xff; + o[27] = x8 >>> 24 & 0xff; + + o[28] = x9 >>> 0 & 0xff; + o[29] = x9 >>> 8 & 0xff; + o[30] = x9 >>> 16 & 0xff; + o[31] = x9 >>> 24 & 0xff; +} + +function crypto_core_salsa20(out,inp,k,c) { + core_salsa20(out,inp,k,c); +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core_hsalsa20(out,inp,k,c); +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = x[i]; + } + return 0; +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20(c,cpos,d,sn,s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); +} + +/* +* Port of Andrew Moon's Poly1305-donna-16. Public domain. +* https://github.com/floodyberry/poly1305-donna +*/ + +var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + + var t0, t1, t2, t3, t4, t5, t6, t7; + + t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; + t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; + t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; + this.r[5] = ((t4 >>> 1)) & 0x1ffe; + t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; + t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + this.r[9] = ((t7 >>> 5)) & 0x007f; + + this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; + this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; + this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; + this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; + this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; + this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; + this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; + this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; +}; + +poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : (1 << 11); + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + + var h0 = this.h[0], + h1 = this.h[1], + h2 = this.h[2], + h3 = this.h[3], + h4 = this.h[4], + h5 = this.h[5], + h6 = this.h[6], + h7 = this.h[7], + h8 = this.h[8], + h9 = this.h[9]; + + var r0 = this.r[0], + r1 = this.r[1], + r2 = this.r[2], + r3 = this.r[3], + r4 = this.r[4], + r5 = this.r[5], + r6 = this.r[6], + r7 = this.r[7], + r8 = this.r[8], + r9 = this.r[9]; + + while (bytes >= 16) { + t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; + t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; + t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; + h5 += ((t4 >>> 1)) & 0x1fff; + t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; + t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + h9 += ((t7 >>> 5)) | hibit; + + c = 0; + + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = (d0 >>> 13); d0 &= 0x1fff; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += (d0 >>> 13); d0 &= 0x1fff; + + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = (d1 >>> 13); d1 &= 0x1fff; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += (d1 >>> 13); d1 &= 0x1fff; + + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = (d2 >>> 13); d2 &= 0x1fff; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += (d2 >>> 13); d2 &= 0x1fff; + + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = (d3 >>> 13); d3 &= 0x1fff; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += (d3 >>> 13); d3 &= 0x1fff; + + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = (d4 >>> 13); d4 &= 0x1fff; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += (d4 >>> 13); d4 &= 0x1fff; + + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = (d5 >>> 13); d5 &= 0x1fff; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += (d5 >>> 13); d5 &= 0x1fff; + + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = (d6 >>> 13); d6 &= 0x1fff; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += (d6 >>> 13); d6 &= 0x1fff; + + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = (d7 >>> 13); d7 &= 0x1fff; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += (d7 >>> 13); d7 &= 0x1fff; + + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = (d8 >>> 13); d8 &= 0x1fff; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += (d8 >>> 13); d8 &= 0x1fff; + + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = (d9 >>> 13); d9 &= 0x1fff; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += (d9 >>> 13); d9 &= 0x1fff; + + c = (((c << 2) + c)) | 0; + c = (c + d0) | 0; + d0 = c & 0x1fff; + c = (c >>> 13); + d1 += c; + + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; +}; + +poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i; + + if (this.leftover) { + i = this.leftover; + this.buffer[i++] = 1; + for (; i < 16; i++) this.buffer[i] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + for (i = 2; i < 10; i++) { + this.h[i] += c; + c = this.h[i] >>> 13; + this.h[i] &= 0x1fff; + } + this.h[0] += (c * 5); + c = this.h[0] >>> 13; + this.h[0] &= 0x1fff; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + this.h[2] += c; + + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 0x1fff; + for (i = 1; i < 10; i++) { + g[i] = this.h[i] + c; + c = g[i] >>> 13; + g[i] &= 0x1fff; + } + g[9] -= (1 << 13); + + mask = (g[9] >>> ((2 * 8) - 1)) - 1; + for (i = 0; i < 10; i++) g[i] &= mask; + mask = ~mask; + for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; + + this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; + + f = this.h[0] + this.pad[0]; + this.h[0] = f & 0xffff; + for (i = 1; i < 8; i++) { + f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; + this.h[i] = f & 0xffff; + } + + mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; + mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; + mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; + mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; + mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; + mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; + mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; + mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; + mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; + mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; + mac[macpos+10] = (this.h[5] >>> 0) & 0xff; + mac[macpos+11] = (this.h[5] >>> 8) & 0xff; + mac[macpos+12] = (this.h[6] >>> 0) & 0xff; + mac[macpos+13] = (this.h[6] >>> 8) & 0xff; + mac[macpos+14] = (this.h[7] >>> 0) & 0xff; + mac[macpos+15] = (this.h[7] >>> 8) & 0xff; +}; + +poly1305.prototype.update = function(m, mpos, bytes) { + var i, want; + + if (this.leftover) { + want = (16 - this.leftover); + if (want > bytes) + want = bytes; + for (i = 0; i < want; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + + if (bytes >= 16) { + want = bytes - (bytes % 16); + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + + if (bytes) { + for (i = 0; i < bytes; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + this.leftover += bytes; + } +}; + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var i, v, c = 1; + for (i = 0; i < 16; i++) { + v = o[i] + c + 65535; + c = Math.floor(v / 65536); + o[i] = v - c * 65536; + } + o[0] += c-1 + 37 * (c-1); +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; +} + +function Z(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; +} + +function M(o, a, b) { + var v, c, + t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, + t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, + t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, + t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11], + b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + // t15 left as is + + // first car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + // second car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + o[ 0] = t0; + o[ 1] = t1; + o[ 2] = t2; + o[ 3] = t3; + o[ 4] = t4; + o[ 5] = t5; + o[ 6] = t6; + o[ 7] = t7; + o[ 8] = t8; + o[ 9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), + bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, + bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, + th, tl, i, j, h, l, a, b, c, d; + + var ah0 = hh[0], + ah1 = hh[1], + ah2 = hh[2], + ah3 = hh[3], + ah4 = hh[4], + ah5 = hh[5], + ah6 = hh[6], + ah7 = hh[7], + + al0 = hl[0], + al1 = hl[1], + al2 = hl[2], + al3 = hl[3], + al4 = hl[4], + al5 = hl[5], + al6 = hl[6], + al7 = hl[7]; + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) { + j = 8 * i + pos; + wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; + wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; + } + for (i = 0; i < 80; i++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + + // add + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma1 + h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); + l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Ch + h = (ah4 & ah5) ^ (~ah4 & ah6); + l = (al4 & al5) ^ (~al4 & al6); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // K + h = K[i*2]; + l = K[i*2+1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // w + h = wh[i%16]; + l = wl[i%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + th = c & 0xffff | d << 16; + tl = a & 0xffff | b << 16; + + // add + h = th; + l = tl; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma0 + h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); + l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Maj + h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); + l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh7 = (c & 0xffff) | (d << 16); + bl7 = (a & 0xffff) | (b << 16); + + // add + h = bh3; + l = bl3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = th; + l = tl; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh3 = (c & 0xffff) | (d << 16); + bl3 = (a & 0xffff) | (b << 16); + + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + // add + h = wh[j]; + l = wl[j]; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = wh[(j+9)%16]; + l = wl[(j+9)%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma0 + th = wh[(j+1)%16]; + tl = wl[(j+1)%16]; + h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); + l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma1 + th = wh[(j+14)%16]; + tl = wl[(j+14)%16]; + h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); + l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + wh[j] = (c & 0xffff) | (d << 16); + wl[j] = (a & 0xffff) | (b << 16); + } + } + } + + // add + h = ah0; + l = al0; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[0]; + l = hl[0]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[0] = ah0 = (c & 0xffff) | (d << 16); + hl[0] = al0 = (a & 0xffff) | (b << 16); + + h = ah1; + l = al1; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[1]; + l = hl[1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[1] = ah1 = (c & 0xffff) | (d << 16); + hl[1] = al1 = (a & 0xffff) | (b << 16); + + h = ah2; + l = al2; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[2]; + l = hl[2]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[2] = ah2 = (c & 0xffff) | (d << 16); + hl[2] = al2 = (a & 0xffff) | (b << 16); + + h = ah3; + l = al3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[3]; + l = hl[3]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[3] = ah3 = (c & 0xffff) | (d << 16); + hl[3] = al3 = (a & 0xffff) | (b << 16); + + h = ah4; + l = al4; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[4]; + l = hl[4]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[4] = ah4 = (c & 0xffff) | (d << 16); + hl[4] = al4 = (a & 0xffff) | (b << 16); + + h = ah5; + l = al5; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[5]; + l = hl[5]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[5] = ah5 = (c & 0xffff) | (d << 16); + hl[5] = al5 = (a & 0xffff) | (b << 16); + + h = ah6; + l = al6; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[6]; + l = hl[6]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[6] = ah6 = (c & 0xffff) | (d << 16); + hl[6] = al6 = (a & 0xffff) | (b << 16); + + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[7]; + l = hl[7]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[7] = ah7 = (c & 0xffff) | (d << 16); + hl[7] = al7 = (a & 0xffff) | (b << 16); + + pos += 128; + n -= 128; + } + + return n; +} + +function crypto_hash(out, m, n) { + var hh = new Int32Array(8), + hl = new Int32Array(8), + x = new Uint8Array(256), + i, b = n; + + hh[0] = 0x6a09e667; + hh[1] = 0xbb67ae85; + hh[2] = 0x3c6ef372; + hh[3] = 0xa54ff53a; + hh[4] = 0x510e527f; + hh[5] = 0x9b05688c; + hh[6] = 0x1f83d9ab; + hh[7] = 0x5be0cd19; + + hl[0] = 0xf3bcc908; + hl[1] = 0x84caa73b; + hl[2] = 0xfe94f82b; + hl[3] = 0x5f1d36f1; + hl[4] = 0xade682d1; + hl[5] = 0x2b3e6c1f; + hl[6] = 0xfb41bd6b; + hl[7] = 0x137e2179; + + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, (b / 0x20000000) | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + + for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +nacl.util = {}; + +nacl.util.decodeUTF8 = function(s) { + var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; +}; + +nacl.util.encodeUTF8 = function(arr) { + var i, s = []; + for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); + return decodeURIComponent(escape(s.join(''))); +}; + +nacl.util.encodeBase64 = function(arr) { + if (typeof btoa === 'undefined') { + return (new Buffer(arr)).toString('base64'); + } else { + var i, s = [], len = arr.length; + for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); + return btoa(s.join('')); + } +}; + +nacl.util.decodeBase64 = function(s) { + if (typeof atob === 'undefined') { + return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); + } else { + var i, d = atob(s), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; + } +}; + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto; + if (typeof window !== 'undefined') { + // Browser. + if (window.crypto && window.crypto.getRandomValues) { + crypto = window.crypto; // Standard + } else if (window.msCrypto && window.msCrypto.getRandomValues) { + crypto = window.msCrypto; // Internet Explorer 11+ + } + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + crypto.getRandomValues(v); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js new file mode 100644 index 00000000000000..7072c2af4435bd --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js @@ -0,0 +1,2 @@ +!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A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+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;tt;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;te)return null;for(var o=new Uint8Array(e),i=0;ie;e++)o[e]=t[e];for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;ne;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js new file mode 100644 index 00000000000000..b8edbbee692cdf --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js @@ -0,0 +1,1205 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function L32(x, c) { return (x << c) | (x >>> (32 - c)); } + +function ld32(x, i) { + var u = x[i+3] & 0xff; + u = (u<<8)|(x[i+2] & 0xff); + u = (u<<8)|(x[i+1] & 0xff); + return (u<<8)|(x[i+0] & 0xff); +} + +function dl64(x, i) { + var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; + var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; + return new u64(h, l); +} + +function st32(x, j, u) { + var i; + for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } +} + +function ts64(x, i, u) { + x[i] = (u.hi >> 24) & 0xff; + x[i+1] = (u.hi >> 16) & 0xff; + x[i+2] = (u.hi >> 8) & 0xff; + x[i+3] = u.hi & 0xff; + x[i+4] = (u.lo >> 24) & 0xff; + x[i+5] = (u.lo >> 16) & 0xff; + x[i+6] = (u.lo >> 8) & 0xff; + x[i+7] = u.lo & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core(out,inp,k,c,h) { + var w = new Uint32Array(16), x = new Uint32Array(16), + y = new Uint32Array(16), t = new Uint32Array(4); + var i, j, m; + + for (i = 0; i < 4; i++) { + x[5*i] = ld32(c, 4*i); + x[1+i] = ld32(k, 4*i); + x[6+i] = ld32(inp, 4*i); + x[11+i] = ld32(k, 16+4*i); + } + + for (i = 0; i < 16; i++) y[i] = x[i]; + + for (i = 0; i < 20; i++) { + for (j = 0; j < 4; j++) { + for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; + t[1] ^= L32((t[0]+t[3])|0, 7); + t[2] ^= L32((t[1]+t[0])|0, 9); + t[3] ^= L32((t[2]+t[1])|0,13); + t[0] ^= L32((t[3]+t[2])|0,18); + for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; + } + for (m = 0; m < 16; m++) x[m] = w[m]; + } + + if (h) { + for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; + for (i = 0; i < 4; i++) { + x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; + x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; + } + for (i = 0; i < 4; i++) { + st32(out,4*i,x[5*i]); + st32(out,16+4*i,x[6+i]); + } + } else { + for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); + } +} + +function crypto_core_salsa20(out,inp,k,c) { + core(out,inp,k,c,false); + return 0; +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core(out,inp,k,c,true); + return 0; +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + if (!b) return 0; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + if (m) mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,d,n,k) { + return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); +} + +function add1305(h, c) { + var j, u = 0; + for (j = 0; j < 17; j++) { + u = (u + ((h[j] + c[j]) | 0)) | 0; + h[j] = u & 255; + u >>>= 8; + } +} + +var minusp = new Uint32Array([ + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 +]); + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s, i, j, u; + var x = new Uint32Array(17), r = new Uint32Array(17), + h = new Uint32Array(17), c = new Uint32Array(17), + g = new Uint32Array(17); + for (j = 0; j < 17; j++) r[j]=h[j]=0; + for (j = 0; j < 16; j++) r[j]=k[j]; + r[3]&=15; + r[4]&=252; + r[7]&=15; + r[8]&=252; + r[11]&=15; + r[12]&=252; + r[15]&=15; + + while (n > 0) { + for (j = 0; j < 17; j++) c[j] = 0; + for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; + c[j] = 1; + mpos += j; n -= j; + add1305(h,c); + for (i = 0; i < 17; i++) { + x[i] = 0; + for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; + } + for (i = 0; i < 17; i++) h[i] = x[i]; + u = 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u & 3; + u = (5 * (u >>> 2)) | 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u; + } + + for (j = 0; j < 17; j++) g[j] = h[j]; + add1305(h,minusp); + s = (-(h[16] >>> 7) | 0); + for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); + + for (j = 0; j < 16; j++) c[j] = k[j + 16]; + c[16] = 0; + add1305(h,c); + for (j = 0; j < 16; j++) out[outpos+j] = h[j]; + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var c; + var i; + for (i = 0; i < 16; i++) { + o[i] += 65536; + c = Math.floor(o[i] / 65536); + o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); + o[i] -= (c * 65536); + } +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; +} + +function Z(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; +} + +function M(o, a, b) { + var i, j, t = new Float64Array(31); + for (i = 0; i < 31; i++) t[i] = 0; + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { + t[i+j] += a[i] * b[j]; + } + } + for (i = 0; i < 15; i++) { + t[i] += 38 * t[i+16]; + } + for (i = 0; i < 16; i++) o[i] = t[i]; + car25519(o); + car25519(o); +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +function add64() { + var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; + for (i = 0; i < arguments.length; i++) { + l = arguments[i].lo; + h = arguments[i].hi; + a += (l & m16); b += (l >>> 16); + c += (h & m16); d += (h >>> 16); + } + + b += (a >>> 16); + c += (b >>> 16); + d += (c >>> 16); + + return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); +} + +function shr64(x, c) { + return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); +} + +function xor64() { + var l = 0, h = 0, i; + for (i = 0; i < arguments.length; i++) { + l ^= arguments[i].lo; + h ^= arguments[i].hi; + } + return new u64(h, l); +} + +function R(x, c) { + var h, l, c1 = 32 - c; + if (c < 32) { + h = (x.hi >>> c) | (x.lo << c1); + l = (x.lo >>> c) | (x.hi << c1); + } else if (c < 64) { + h = (x.lo >>> c) | (x.hi << c1); + l = (x.hi >>> c) | (x.lo << c1); + } + return new u64(h, l); +} + +function Ch(x, y, z) { + var h = (x.hi & y.hi) ^ (~x.hi & z.hi), + l = (x.lo & y.lo) ^ (~x.lo & z.lo); + return new u64(h, l); +} + +function Maj(x, y, z) { + var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), + l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); + return new u64(h, l); +} + +function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } +function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } +function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } +function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } + +var K = [ + new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), + new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), + new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), + new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), + new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), + new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), + new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), + new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), + new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), + new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), + new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), + new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), + new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), + new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), + new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), + new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), + new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), + new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), + new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), + new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), + new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), + new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), + new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), + new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), + new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), + new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), + new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), + new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), + new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), + new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), + new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), + new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), + new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), + new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), + new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), + new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), + new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), + new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), + new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), + new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) +]; + +function crypto_hashblocks(x, m, n) { + var z = [], b = [], a = [], w = [], t, i, j; + + for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); + for (i = 0; i < 80; i++) { + for (j = 0; j < 8; j++) b[j] = a[j]; + t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); + b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); + b[3] = add64(b[3], t); + for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); + } + } + } + + for (i = 0; i < 8; i++) { + a[i] = add64(a[i], z[i]); + z[i] = a[i]; + } + + pos += 128; + n -= 128; + } + + for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); + return n; +} + +var iv = new Uint8Array([ + 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, + 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, + 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, + 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, + 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, + 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, + 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, + 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 +]); + +function crypto_hash(out, m, n) { + var h = new Uint8Array(64), x = new Uint8Array(256); + var i, b = n; + + for (i = 0; i < 64; i++) h[i] = iv[i]; + + crypto_hashblocks(h, m, n); + n %= 128; + + for (i = 0; i < 256; i++) x[i] = 0; + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); + crypto_hashblocks(h, x, n); + + for (i = 0; i < 64; i++) out[i] = h[i]; + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +nacl.util = {}; + +nacl.util.decodeUTF8 = function(s) { + var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; +}; + +nacl.util.encodeUTF8 = function(arr) { + var i, s = []; + for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); + return decodeURIComponent(escape(s.join(''))); +}; + +nacl.util.encodeBase64 = function(arr) { + if (typeof btoa === 'undefined') { + return (new Buffer(arr)).toString('base64'); + } else { + var i, s = [], len = arr.length; + for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); + return btoa(s.join('')); + } +}; + +nacl.util.decodeBase64 = function(s) { + if (typeof atob === 'undefined') { + return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); + } else { + var i, d = atob(s), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; + } +}; + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto; + if (typeof window !== 'undefined') { + // Browser. + if (window.crypto && window.crypto.getRandomValues) { + crypto = window.crypto; // Standard + } else if (window.msCrypto && window.msCrypto.getRandomValues) { + crypto = window.msCrypto; // Internet Explorer 11+ + } + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + crypto.getRandomValues(v); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js new file mode 100644 index 00000000000000..95d869502e4b0d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js @@ -0,0 +1 @@ +!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;rn?(e=r.hi>>>n|r.lo<>>n|r.hi<n&&(e=r.lo>>>n|r.hi<>>n|r.lo<a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;nn;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;nt)return null;for(var o=new Uint8Array(t),i=0;it;t++)o[t]=n[t];for(t=0;t=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;et;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json new file mode 100644 index 00000000000000..e5421269116db0 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json @@ -0,0 +1,78 @@ +{ + "name": "tweetnacl", + "version": "0.13.2", + "description": "Port of TweetNaCl cryptographic library to JavaScript", + "main": "nacl-fast.js", + "directories": { + "test": "test" + }, + "scripts": { + "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js", + "test": "tape test/*.js | faucet", + "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet", + "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null", + "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", + "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet", + "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet", + "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet", + "bench": "node test/benchmark/bench.js", + "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "chrome/22..latest", + "firefox/16..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6..latest", + "ipad/6..latest", + "android-browser/latest" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dchest/tweetnacl-js.git" + }, + "keywords": [ + "crypto", + "cryptography", + "curve25519", + "ed25519", + "encrypt", + "hash", + "key", + "nacl", + "poly1305", + "public", + "salsa20", + "signatures" + ], + "author": { + "name": "TweetNaCl-js contributors" + }, + "license": "CC0-1.0", + "bugs": { + "url": "https://github.com/dchest/tweetnacl-js/issues" + }, + "homepage": "https://dchest.github.io/tweetnacl-js", + "devDependencies": { + "browserify": "^10.1.3", + "eslint": "^1.4.3", + "faucet": "0.0.1", + "tap-browser-color": "^0.1.2", + "tape": "^4.0.0", + "testling": "^1.7.1", + "uglify-js": "^2.4.21" + }, + "browser": { + "buffer": false, + "crypto": false + }, + "readme": "TweetNaCl.js\n============\n\nPort of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/)\nto JavaScript for modern browsers and Node.js. Public domain.\n\n[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)\n](https://travis-ci.org/dchest/tweetnacl-js)\n\n[Demo](https://dchest.github.io/tweetnacl-js/)\n\n**:warning: Beta version. The library is stable and API is frozen, however\nit has not been independently reviewed. If you can help reviewing it, please\n[contact me](mailto:dmitry@codingrobots.com).**\n\nDocumentation\n=============\n\n* [Overview](#overview)\n* [Installation](#installation)\n* [Usage](#usage)\n * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box)\n * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox)\n * [Scalar multiplication](#scalar-multiplication)\n * [Signatures](#signatures)\n * [Hashing](#hashing)\n * [Random bytes generation](#random-bytes-generation)\n * [Constant-time comparison](#constant-time-comparison)\n * [Utilities](#utilities)\n* [Examples](#examples)\n* [System requirements](#system-requirements)\n* [Development and testing](#development-and-testing)\n* [Contributors](#contributors)\n* [Who uses it](#who-uses-it)\n\n\nOverview\n--------\n\nThe primary goal of this project is to produce a translation of TweetNaCl to\nJavaScript which is as close as possible to the original C implementation, plus\na thin layer of idiomatic high-level API on top of it.\n\nThere are two versions, you can use either of them:\n\n* `nacl.js` is the port of TweetNaCl with minimum differences from the\n original + high-level API.\n\n* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with\n faster versions.\n\n\nInstallation\n------------\n\nYou can install TweetNaCl.is via a package manager:\n\n[Bower](http://bower.io):\n\n $ bower install tweetnacl\n\n[NPM](https://www.npmjs.org/):\n\n $ npm install tweetnacl\n\nor [download source code](https://github.com/dchest/tweetnacl-js/releases).\n\n\nUsage\n------\n\nAll API functions accept and return bytes as `Uint8Array`s. If you need to\nencode or decode strings, use functions from `nacl.util` namespace.\n\n### Public-key authenticated encryption (box)\n\nImplements *curve25519-xsalsa20-poly1305*.\n\n#### nacl.box.keyPair()\n\nGenerates a new random key pair for box and returns it as an object with\n`publicKey` and `secretKey` members:\n\n {\n publicKey: ..., // Uint8Array with 32-byte public key\n secretKey: ... // Uint8Array with 32-byte secret key\n }\n\n\n#### nacl.box.keyPair.fromSecretKey(secretKey)\n\nReturns a key pair for box with public key corresponding to the given secret\nkey.\n\n#### nacl.box(message, nonce, theirPublicKey, mySecretKey)\n\nEncrypt and authenticates message using peer's public key, our secret key, and\nthe given nonce, which must be unique for each distinct message for a key pair.\n\nReturns an encrypted and authenticated message, which is\n`nacl.box.overheadLength` longer than the original message.\n\n#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey)\n\nAuthenticates and decrypts the given box with peer's public key, our secret\nkey, and the given nonce.\n\nReturns the original message, or `false` if authentication fails.\n\n#### nacl.box.before(theirPublicKey, mySecretKey)\n\nReturns a precomputed shared key which can be used in `nacl.box.after` and\n`nacl.box.open.after`.\n\n#### nacl.box.after(message, nonce, sharedKey)\n\nSame as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`.\n\n#### nacl.box.open.after(box, nonce, sharedKey)\n\nSame as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`.\n\n#### nacl.box.publicKeyLength = 32\n\nLength of public key in bytes.\n\n#### nacl.box.secretKeyLength = 32\n\nLength of secret key in bytes.\n\n#### nacl.box.sharedKeyLength = 32\n\nLength of precomputed shared key in bytes.\n\n#### nacl.box.nonceLength = 24\n\nLength of nonce in bytes.\n\n#### nacl.box.overheadLength = 16\n\nLength of overhead added to box compared to original message.\n\n\n### Secret-key authenticated encryption (secretbox)\n\nImplements *xsalsa20-poly1305*.\n\n#### nacl.secretbox(message, nonce, key)\n\nEncrypt and authenticates message using the key and the nonce. The nonce must\nbe unique for each distinct message for this key.\n\nReturns an encrypted and authenticated message, which is\n`nacl.secretbox.overheadLength` longer than the original message.\n\n#### nacl.secretbox.open(box, nonce, key)\n\nAuthenticates and decrypts the given secret box using the key and the nonce.\n\nReturns the original message, or `false` if authentication fails.\n\n#### nacl.secretbox.keyLength = 32\n\nLength of key in bytes.\n\n#### nacl.secretbox.nonceLength = 24\n\nLength of nonce in bytes.\n\n#### nacl.secretbox.overheadLength = 16\n\nLength of overhead added to secret box compared to original message.\n\n\n### Scalar multiplication\n\nImplements *curve25519*.\n\n#### nacl.scalarMult(n, p)\n\nMultiplies an integer `n` by a group element `p` and returns the resulting\ngroup element.\n\n#### nacl.scalarMult.base(n)\n\nMultiplies an integer `n` by a standard group element and returns the resulting\ngroup element.\n\n#### nacl.scalarMult.scalarLength = 32\n\nLength of scalar in bytes.\n\n#### nacl.scalarMult.groupElementLength = 32\n\nLength of group element in bytes.\n\n\n### Signatures\n\nImplements [ed25519](http://ed25519.cr.yp.to).\n\n#### nacl.sign.keyPair()\n\nGenerates new random key pair for signing and returns it as an object with\n`publicKey` and `secretKey` members:\n\n {\n publicKey: ..., // Uint8Array with 32-byte public key\n secretKey: ... // Uint8Array with 64-byte secret key\n }\n\n#### nacl.sign.keyPair.fromSecretKey(secretKey)\n\nReturns a signing key pair with public key corresponding to the given\n64-byte secret key. The secret key must have been generated by\n`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`.\n\n#### nacl.sign.keyPair.fromSeed(seed)\n\nReturns a new signing key pair generated deterministically from a 32-byte seed.\nThe seed must contain enough entropy to be secure. This method is not\nrecommended for general use: instead, use `nacl.sign.keyPair` to generate a new\nkey pair from a random seed.\n\n#### nacl.sign(message, secretKey)\n\nSigns the message using the secret key and returns a signed message.\n\n#### nacl.sign.open(signedMessage, publicKey)\n\nVerifies the signed message and returns the message without signature.\n\nReturns `null` if verification failed.\n\n#### nacl.sign.detached(message, secretKey)\n\nSigns the message using the secret key and returns a signature.\n\n#### nacl.sign.detached.verify(message, signature, publicKey)\n\nVerifies the signature for the message and returns `true` if verification\nsucceeded or `false` if it failed.\n\n#### nacl.sign.publicKeyLength = 32\n\nLength of signing public key in bytes.\n\n#### nacl.sign.secretKeyLength = 64\n\nLength of signing secret key in bytes.\n\n#### nacl.sign.seedLength = 32\n\nLength of seed for `nacl.sign.keyPair.fromSeed` in bytes.\n\n#### nacl.sign.signatureLength = 64\n\nLength of signature in bytes.\n\n\n### Hashing\n\nImplements *SHA-512*.\n\n#### nacl.hash(message)\n\nReturns SHA-512 hash of the message.\n\n#### nacl.hash.hashLength = 64\n\nLength of hash in bytes.\n\n\n### Random bytes generation\n\n#### nacl.randomBytes(length)\n\nReturns a `Uint8Array` of the given length containing random bytes of\ncryptographic quality.\n\n**Implementation note**\n\nTweetNaCl.js uses the following methods to generate random bytes,\ndepending on the platform it runs on:\n\n* `window.crypto.getRandomValues` (WebCrypto standard)\n* `window.msCrypto.getRandomValues` (Internet Explorer 11)\n* `crypto.randomBytes` (Node.js)\n\nNote that browsers are required to throw `QuotaExceededError` exception if\nrequested `length` is more than 65536, so do not ask for more than 65536 bytes\nin *one call* (multiple calls to get as many bytes as you like are okay:\nbrowsers can generate infinite amount of random bytes without any bad\nconsequences).\n\nIf the platform doesn't provide a suitable PRNG, the following functions,\nwhich require random numbers, will throw exception:\n\n* `nacl.randomBytes`\n* `nacl.box.keyPair`\n* `nacl.sign.keyPair`\n\nOther functions are deterministic and will continue working.\n\nIf a platform you are targeting doesn't implement secure random number\ngenerator, but you somehow have a cryptographically-strong source of entropy\n(not `Math.random`!), and you know what you are doing, you can plug it into\nTweetNaCl.js like this:\n\n nacl.setPRNG(function(x, n) {\n // ... copy n random bytes into x ...\n });\n\nNote that `nacl.setPRNG` *completely replaces* internal random byte generator\nwith the one provided.\n\n\n### Constant-time comparison\n\n#### nacl.verify(x, y)\n\nCompares `x` and `y` in constant time and returns `true` if their lengths are\nnon-zero and equal, and their contents are equal.\n\nReturns `false` if either of the arguments has zero length, or arguments have\ndifferent lengths, or their contents differ.\n\n\n### Utilities\n\nEncoding/decoding functions are provided for convenience. They are correct,\nhowever their performance and wide compatibility with uncommon runtimes is not\nsomething that is considered important compared to the simplicity and size of\nimplementation. You can use third-party libraries if you need to.\n\n#### nacl.util.decodeUTF8(string)\n\nDecodes string and returns `Uint8Array` of bytes.\n\n#### nacl.util.encodeUTF8(array)\n\nEncodes `Uint8Array` or `Array` of bytes into string.\n\n#### nacl.util.decodeBase64(string)\n\nDecodes Base-64 encoded string and returns `Uint8Array` of bytes.\n\n#### nacl.util.encodeBase64(array)\n\nEncodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.\n\n\nSystem requirements\n-------------------\n\nTweetNaCl.js supports modern browsers that have a cryptographically secure\npseudorandom number generator and typed arrays, including the latest versions\nof:\n\n* Chrome\n* Firefox\n* Safari (Mac, iOS)\n* Internet Explorer 11\n\nOther systems:\n\n* Node.js (we test on 0.10 and later)\n\n\nDevelopment and testing\n------------------------\n\nInstall NPM modules needed for development:\n\n $ npm install\n\nTo build minified versions:\n\n $ npm run build\n\nTests use minified version, so make sure to rebuild it every time you change\n`nacl.js` or `nacl-fast.js`.\n\n### Testing\n\nTo run tests in Node.js:\n\n $ npm test\n\nBy default all tests described here work on `nacl.min.js`. To test other\nversions, set environment variable `NACL_SRC` to the file name you want to test.\nFor example, the following command will test fast minified version:\n\n $ NACL_SRC=nacl-fast.min.js npm test\n\nTo run full suite of tests in Node.js, including comparing outputs of\nJavaScript port to outputs of the original C version:\n\n $ npm run testall\n\nTo prepare tests for browsers:\n\n $ npm run browser\n\nand then open `test/browser/test.html` (or `test/browser/test-fast.html`) to\nrun them.\n\nTo run headless browser tests with `testling`:\n\n $ npm run testling\n\n(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)\n\n### Benchmarking\n\nTo run benchmarks in Node.js:\n\n $ npm run bench\n $ NACL_SRC=nacl-fast.min.js npm run bench\n\nTo run benchmarks in a browser, open `test/benchmark/bench.html` (or\n`test/benchmark/bench-fast.html`).\n\n\nContributors\n------------\n\nJavaScript port:\n\n * [Dmitry Chestnykh](http://github.com/dchest) (ported xsalsa20, poly1305, curve25519)\n * [Devi Mandiri](https://github.com/devi) (ported curve25519, ed25519, sha512)\n\nOriginal authors of [NaCl](http://nacl.cr.yp.to), [TweetNaCl](http://tweetnacl.cr.yp.to)\nand [Poly1305-donna](https://github.com/floodyberry/poly1305-donna)\n(who are *not* responsible for any errors in this implementation):\n\n * [Daniel J. Bernstein](http://cr.yp.to/djb.html)\n * Wesley Janssen\n * [Tanja Lange](http://hyperelliptic.org/tanja)\n * [Peter Schwabe](http://www.cryptojedi.org/users/peter/)\n * [Matthew Dempsky](https://github.com/mdempsky)\n * [Andrew Moon](https://github.com/floodyberry)\n\nContributors have dedicated their work to the public domain.\n\nThis software is distributed without any warranty.\n\n\nThird-party libraries based on TweetNaCl.js\n-------------------------------------------\n\n* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation\n* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption\n* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html)\n\n\nWho uses it\n-----------\n\nSome notable users of TweetNaCl.js:\n\n* [miniLock](http://minilock.io/)\n* [Stellar](https://www.stellar.org/)\n", + "readmeFilename": "README.md", + "_id": "tweetnacl@0.13.2", + "_shasum": "453161770469d45cd266c36404e2bc99a8fa9944", + "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.2.tgz", + "_from": "tweetnacl@>=0.13.0 <1.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json new file mode 100644 index 00000000000000..93dbdef15395ce --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json @@ -0,0 +1,71 @@ +{ + "name": "sshpk", + "version": "1.7.1", + "description": "A library for finding and using SSH public keys", + "main": "lib/index.js", + "scripts": { + "test": "tape test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/arekinath/node-sshpk.git" + }, + "author": { + "name": "Joyent, Inc" + }, + "contributors": [ + { + "name": "Dave Eddy", + "email": "dave@daveeddy.com" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "Alex Wilson", + "email": "alex@cooperi.net" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/arekinath/node-sshpk/issues" + }, + "engines": { + "node": ">=0.8.0" + }, + "directories": { + "bin": "./bin", + "lib": "./lib" + }, + "homepage": "https://github.com/arekinath/node-sshpk#readme", + "dependencies": { + "asn1": ">=0.2.3 <0.3.0", + "assert-plus": ">=0.2.0 <0.3.0", + "dashdash": ">=1.10.1 <2.0.0", + "jsbn": ">=0.1.0 <0.2.0", + "tweetnacl": ">=0.13.0 <1.0.0", + "jodid25519": ">=1.0.0 <2.0.0", + "ecc-jsbn": ">=0.0.1 <1.0.0" + }, + "optionalDependencies": { + "jsbn": ">=0.1.0 <0.2.0", + "tweetnacl": ">=0.13.0 <1.0.0", + "jodid25519": ">=1.0.0 <2.0.0", + "ecc-jsbn": ">=0.0.1 <1.0.0" + }, + "devDependencies": { + "tape": ">=3.5.0 <4.0.0", + "benchmark": ">=1.0.0 <2.0.0", + "sinon": ">=1.17.2 <2.0.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv" + }, + "readme": "sshpk\n=========\n\nParse, convert, fingerprint and use SSH keys (both public and private) in pure\nnode -- no `ssh-keygen` or other external dependencies.\n\nSupports RSA, DSA, ECDSA (nistp-\\*) and ED25519 key types, in PEM (PKCS#1, \nPKCS#8) and OpenSSH formats.\n\nThis library has been extracted from\n[`node-http-signature`](https://github.com/joyent/node-http-signature)\n(work by [Mark Cavage](https://github.com/mcavage) and\n[Dave Eddy](https://github.com/bahamas10)) and\n[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint)\n(work by Dave Eddy), with additions (including ECDSA support) by\n[Alex Wilson](https://github.com/arekinath).\n\nInstall\n-------\n\n```\nnpm install sshpk\n```\n\nExamples\n--------\n\n```js\nvar sshpk = require('sshpk');\n\nvar fs = require('fs');\n\n/* Read in an OpenSSH-format public key */\nvar keyPub = fs.readFileSync('id_rsa.pub');\nvar key = sshpk.parseKey(keyPub, 'ssh');\n\n/* Get metadata about the key */\nconsole.log('type => %s', key.type);\nconsole.log('size => %d bits', key.size);\nconsole.log('comment => %s', key.comment);\n\n/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */\nconsole.log('fingerprint => %s', key.fingerprint().toString());\nconsole.log('old-style fingerprint => %s', key.fingerprint('md5').toString());\n```\n\nExample output:\n\n```\ntype => rsa\nsize => 2048 bits\ncomment => foo@foo.com\nfingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w\nold-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd\n```\n\nMore examples: converting between formats:\n\n```js\n/* Read in a PEM public key */\nvar keyPem = fs.readFileSync('id_rsa.pem');\nvar key = sshpk.parseKey(keyPem, 'pem');\n\n/* Convert to PEM PKCS#8 public key format */\nvar pemBuf = key.toBuffer('pkcs8');\n\n/* Convert to SSH public key format (and return as a string) */\nvar sshKey = key.toString('ssh');\n```\n\nSigning and verifying:\n\n```js\n/* Read in an OpenSSH/PEM *private* key */\nvar keyPriv = fs.readFileSync('id_ecdsa');\nvar key = sshpk.parsePrivateKey(keyPriv, 'pem');\n\nvar data = 'some data';\n\n/* Sign some data with the key */\nvar s = key.createSign('sha1');\ns.update(data);\nvar signature = s.sign();\n\n/* Now load the public key (could also use just key.toPublic()) */\nvar keyPub = fs.readFileSync('id_ecdsa.pub');\nkey = sshpk.parseKey(keyPub, 'ssh');\n\n/* Make a crypto.Verifier with this key */\nvar v = key.createVerify('sha1');\nv.update(data);\nvar valid = v.verify(signature);\n/* => true! */\n```\n\nMatching fingerprints with keys:\n\n```js\nvar fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w');\n\nvar keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...];\n\nkeys.forEach(function (key) {\n\tif (fp.matches(key))\n\t\tconsole.log('found it!');\n});\n```\n\nUsage\n-----\n\n## Public keys\n\n### `parseKey(data[, format = 'auto'[, name]])`\n\nParses a key from a given data format and returns a new `Key` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`: standard OpenSSH format,\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n - `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `Key.isKey(obj)`\n\nReturns `true` if the given object is a valid `Key` object created by a version\nof `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Key#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `Key#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `Key#comment`\n\nOptional string, a key comment used by some formats (eg the `ssh` format).\n\n### `Key#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `Key#toBuffer([format = 'ssh'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, for valid options see `parseKey()`\n\n### `Key#toString([format = 'ssh])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `Key#fingerprint([algorithm = 'sha256'])`\n\nCreates a new `Fingerprint` object representing this Key's fingerprint.\n\nParameters\n\n- `algorithm` -- String name of hash algorithm to use, valid options are `md5`,\n `sha1`, `sha256`, `sha384`, `sha512`\n\n### `Key#createVerify([hashAlgorithm])`\n\nCreates a `crypto.Verifier` specialized to use this Key (and the correct public\nkey algorithm to match it). The returned Verifier has the same API as a regular\none, except that the `verify()` function takes only the target signature as an\nargument.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.verify(signature[, format])` Parameters\n\n- `signature` -- either a Signature object, or a Buffer or String\n- `format` -- optional String, name of format to interpret given String with.\n Not valid if `signature` is a Signature or Buffer.\n\n### `Key#createDiffieHellman()`\n### `Key#createDH()`\n\nCreates a Diffie-Hellman key exchange object initialized with this key and all\nnecessary parameters. This has the same API as a `crypto.DiffieHellman`\ninstance, except that functions take `Key` and `PrivateKey` objects as\narguments, and return them where indicated for.\n\nThis is only valid for keys belonging to a cryptosystem that supports DHE\nor a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt\nto call this function on other keys will yield an `Error`.\n\n## Private keys\n\n### `parsePrivateKey(data[, format = 'auto'[, name]])`\n\nParses a private key from a given data format and returns a new\n`PrivateKey` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `PrivateKey.isPrivateKey(obj)`\n\nReturns `true` if the given object is a valid `PrivateKey` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `PrivateKey#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `PrivateKey#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `PrivateKey#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `PrivateKey#toBuffer([format = 'pkcs1'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, valid options are listed under \n `parsePrivateKey`. Note that ED25519 keys default to `openssh`\n format instead (as they have no `pkcs1` representation).\n\n### `PrivateKey#toString([format = 'pkcs1'])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `PrivateKey#toPublic()`\n\nExtract just the public part of this private key, and return it as a `Key`\nobject.\n\n### `PrivateKey#fingerprint([algorithm = 'sha256'])`\n\nSame as `this.toPublic().fingerprint()`.\n\n### `PrivateKey#createVerify([hashAlgorithm])`\n\nSame as `this.toPublic().createVerify()`.\n\n### `PrivateKey#createSign([hashAlgorithm])`\n\nCreates a `crypto.Sign` specialized to use this PrivateKey (and the correct\nkey algorithm to match it). The returned Signer has the same API as a regular\none, except that the `sign()` function takes no arguments, and returns a\n`Signature` object.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.sign()` Parameters\n\n- none\n\n### `PrivateKey#derive(newType)`\n\nDerives a related key of type `newType` from this key. Currently this is\nonly supported to change between `ed25519` and `curve25519` keys which are\nstored with the same private key (but usually distinct public keys in order\nto avoid degenerate keys that lead to a weak Diffie-Hellman exchange).\n\nParameters\n\n- `newType` -- String, type of key to derive, either `ed25519` or `curve25519`\n\n## Fingerprints\n\n### `parseFingerprint(fingerprint[, algorithms])`\n\nPre-parses a fingerprint, creating a `Fingerprint` object that can be used to\nquickly locate a key by using the `Fingerprint#matches` function.\n\nParameters\n\n- `fingerprint` -- String, the fingerprint value, in any supported format\n- `algorithms` -- Optional list of strings, names of hash algorithms to limit\n support to. If `fingerprint` uses a hash algorithm not on\n this list, throws `InvalidAlgorithmError`.\n\n### `Fingerprint.isFingerprint(obj)`\n\nReturns `true` if the given object is a valid `Fingerprint` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Fingerprint#toString([format])`\n\nReturns a fingerprint as a string, in the given format.\n\nParameters\n\n- `format` -- Optional String, format to use, valid options are `hex` and\n `base64`. If this `Fingerprint` uses the `md5` algorithm, the\n default format is `hex`. Otherwise, the default is `base64`.\n\n### `Fingerprint#matches(key)`\n\nVerifies whether or not this `Fingerprint` matches a given `Key`. This function\nuses double-hashing to avoid leaking timing information. Returns a boolean.\n\nParameters\n\n- `key` -- a `Key` object, the key to match this fingerprint against\n\n## Signatures\n\n### `parseSignature(signature, algorithm, format)`\n\nParses a signature in a given format, creating a `Signature` object. Useful\nfor converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and\nalso returned as output from `PrivateKey#createSign().sign()`.\n\nA Signature object can also be passed to a verifier produced by\n`Key#createVerify()` and it will automatically be converted internally into the\ncorrect format for verification.\n\nParameters\n\n- `signature` -- a Buffer (binary) or String (base64), data of the actual\n signature in the given format\n- `algorithm` -- a String, name of the algorithm to be used, possible values\n are `rsa`, `dsa`, `ecdsa`\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature.isSignature(obj)`\n\nReturns `true` if the given object is a valid `Signature` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Signature#toBuffer([format = 'asn1'])`\n\nConverts a Signature to the given format and returns it as a Buffer.\n\nParameters\n\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature#toString([format = 'asn1'])`\n\nSame as `this.toBuffer(format).toString('base64')`.\n\nErrors\n------\n\n### `InvalidAlgorithmError`\n\nThe specified algorithm is not valid, either because it is not supported, or\nbecause it was not included on a list of allowed algorithms.\n\nThrown by `Fingerprint.parse`, `Key#fingerprint`.\n\nProperties\n\n- `algorithm` -- the algorithm that could not be validated\n\n### `FingerprintFormatError`\n\nThe fingerprint string given could not be parsed as a supported fingerprint\nformat, or the specified fingerprint format is invalid.\n\nThrown by `Fingerprint.parse`, `Fingerprint#toString`.\n\nProperties\n\n- `fingerprint` -- if caused by a fingerprint, the string value given\n- `format` -- if caused by an invalid format specification, the string value given\n\n### `KeyParseError`\n\nThe key data given could not be parsed as a valid key.\n\nProperties\n\n- `keyName` -- `name` that was given to `Key#parse`\n- `format` -- the `format` that was trying to parse the key\n- `innerErr` -- the inner Error thrown by the format parser\n\nFriends of sshpk\n----------------\n\n * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library\n for speaking the `ssh-agent` protocol from node.js, which uses `sshpk`\n", + "readmeFilename": "README.md", + "_id": "sshpk@1.7.1", + "_shasum": "565e386c42a77e6062fbd14c0472ff21cd53398c", + "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.1.tgz", + "_from": "sshpk@>=1.7.0 <2.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json index 47d76cffcf9187..4c9abf04018951 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json @@ -1,7 +1,7 @@ { "name": "http-signature", "description": "Reference implementation of Joyent's HTTP Signature scheme.", - "version": "0.11.0", + "version": "1.1.0", "license": "MIT", "author": { "name": "Joyent, Inc" @@ -33,7 +33,8 @@ "request" ], "engines": { - "node": ">=0.8" + "node": ">=0.8", + "npm": ">=1.3.7" }, "main": "lib/index.js", "scripts": { @@ -41,37 +42,17 @@ }, "dependencies": { "assert-plus": "^0.1.5", - "asn1": "0.1.11", - "ctype": "0.5.3" + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" }, "devDependencies": { "node-uuid": "^1.4.1", "tap": "0.4.2" }, - "_id": "http-signature@0.11.0", - "_shasum": "1796cf67a001ad5cd6849dca0991485f09089fe6", - "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.11.0.tgz", - "_from": "http-signature@>=0.11.0 <0.12.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "pfmooney", - "email": "patrick.f.mooney@gmail.com" - }, - "maintainers": [ - { - "name": "mcavage", - "email": "mcavage@gmail.com" - }, - { - "name": "pfmooney", - "email": "patrick.f.mooney@gmail.com" - } - ], - "dist": { - "shasum": "1796cf67a001ad5cd6849dca0991485f09089fe6", - "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.11.0.tgz" - }, - "directories": {}, - "readme": "ERROR: No README data found!" + "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actually want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n```js\nvar fs = require('fs');\nvar https = require('https');\nvar httpSignature = require('http-signature');\n\nvar key = fs.readFileSync('./key.pem', 'ascii');\n\nvar options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n};\n\n// Adds a 'Date' header in, signs it, and adds the\n// 'Authorization' header in.\nvar req = https.request(options, function(res) {\n console.log(res.statusCode);\n});\n\n\nhttpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n});\n\nreq.end();\n```\n\n### Server\n\n```js\nvar fs = require('fs');\nvar https = require('https');\nvar httpSignature = require('http-signature');\n\nvar options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n};\n\nhttps.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n}).listen(8443);\n```\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee .\n", + "readmeFilename": "README.md", + "_id": "http-signature@1.1.0", + "_shasum": "5d2d7e9b6ef49980ad5b128d8e4ef09a31c90d95", + "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.0.tgz", + "_from": "http-signature@>=1.1.0 <1.2.0" } diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md b/deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md new file mode 100644 index 00000000000000..ee27ba4b4412b0 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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/request/node_modules/is-typedarray/README.md b/deps/npm/node_modules/request/node_modules/is-typedarray/README.md new file mode 100644 index 00000000000000..27528639193584 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/is-typedarray/README.md @@ -0,0 +1,16 @@ +# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Detect whether or not an object is a +[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). + +## Usage + +[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) + +### isTypedArray(array) + +Returns `true` when array is a Typed Array, and `false` when it is not. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/index.js b/deps/npm/node_modules/request/node_modules/is-typedarray/index.js new file mode 100644 index 00000000000000..58596036cdf159 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/is-typedarray/index.js @@ -0,0 +1,41 @@ +module.exports = isTypedArray +isTypedArray.strict = isStrictTypedArray +isTypedArray.loose = isLooseTypedArray + +var toString = Object.prototype.toString +var names = { + '[object Int8Array]': true + , '[object Int16Array]': true + , '[object Int32Array]': true + , '[object Uint8Array]': true + , '[object Uint8ClampedArray]': true + , '[object Uint16Array]': true + , '[object Uint32Array]': true + , '[object Float32Array]': true + , '[object Float64Array]': true +} + +function isTypedArray(arr) { + return ( + isStrictTypedArray(arr) + || isLooseTypedArray(arr) + ) +} + +function isStrictTypedArray(arr) { + return ( + arr instanceof Int8Array + || arr instanceof Int16Array + || arr instanceof Int32Array + || arr instanceof Uint8Array + || arr instanceof Uint8ClampedArray + || arr instanceof Uint16Array + || arr instanceof Uint32Array + || arr instanceof Float32Array + || arr instanceof Float64Array + ) +} + +function isLooseTypedArray(arr) { + return names[toString.call(arr)] +} diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/package.json b/deps/npm/node_modules/request/node_modules/is-typedarray/package.json new file mode 100644 index 00000000000000..236bb8006bde26 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/is-typedarray/package.json @@ -0,0 +1,40 @@ +{ + "name": "is-typedarray", + "version": "1.0.0", + "description": "Detect whether or not an object is a Typed Array", + "main": "index.js", + "scripts": { + "test": "node test" + }, + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "tape": "^2.13.1" + }, + "repository": { + "type": "git", + "url": "git://github.com/hughsk/is-typedarray.git" + }, + "keywords": [ + "typed", + "array", + "detect", + "is", + "util" + ], + "bugs": { + "url": "https://github.com/hughsk/is-typedarray/issues" + }, + "homepage": "https://github.com/hughsk/is-typedarray", + "readme": "# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)\n\nDetect whether or not an object is a\n[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays).\n\n## Usage\n\n[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/)\n\n### isTypedArray(array)\n\nReturns `true` when array is a Typed Array, and `false` when it is not.\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details.\n", + "readmeFilename": "README.md", + "_id": "is-typedarray@1.0.0", + "_shasum": "e479c80858df0c1b11ddda6940f96011fcda4a9a", + "_resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "_from": "is-typedarray@>=1.0.0 <1.1.0" +} diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/test.js b/deps/npm/node_modules/request/node_modules/is-typedarray/test.js new file mode 100644 index 00000000000000..b0c176fa302aa0 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/is-typedarray/test.js @@ -0,0 +1,34 @@ +var test = require('tape') +var ista = require('./') + +test('strict', function(t) { + t.ok(ista.strict(new Int8Array), 'Int8Array') + t.ok(ista.strict(new Int16Array), 'Int16Array') + t.ok(ista.strict(new Int32Array), 'Int32Array') + t.ok(ista.strict(new Uint8Array), 'Uint8Array') + t.ok(ista.strict(new Uint16Array), 'Uint16Array') + t.ok(ista.strict(new Uint32Array), 'Uint32Array') + t.ok(ista.strict(new Float32Array), 'Float32Array') + t.ok(ista.strict(new Float64Array), 'Float64Array') + + t.ok(!ista.strict(new Array), 'Array') + t.ok(!ista.strict([]), '[]') + + t.end() +}) + +test('loose', function(t) { + t.ok(ista.loose(new Int8Array), 'Int8Array') + t.ok(ista.loose(new Int16Array), 'Int16Array') + t.ok(ista.loose(new Int32Array), 'Int32Array') + t.ok(ista.loose(new Uint8Array), 'Uint8Array') + t.ok(ista.loose(new Uint16Array), 'Uint16Array') + t.ok(ista.loose(new Uint32Array), 'Uint32Array') + t.ok(ista.loose(new Float32Array), 'Float32Array') + t.ok(ista.loose(new Float64Array), 'Float64Array') + + t.ok(!ista.loose(new Array), 'Array') + t.ok(!ista.loose([]), '[]') + + t.end() +}) diff --git a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md index 3057e4940a22ad..64241d971cd57c 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md +++ b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md @@ -1,3 +1,9 @@ +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + 2.1.7 / 2015-09-20 ================== diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md index 3088a726f620b8..c7f8b5a3ee16b1 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md @@ -1,3 +1,16 @@ +1.20.0 / 2015-11-10 +=================== + + * Add `application/cdni` + * Add `application/csvm+json` + * Add `application/rfc+xml` + * Add `application/vnd.3gpp.access-transfer-events+xml` + * Add `application/vnd.3gpp.srvcc-ext+xml` + * Add `application/vnd.ms-windows.wsd.oob` + * Add `application/vnd.oxli.countgraph` + * Add `application/vnd.pagerduty+json` + * Add `text/x-suse-ymp` + 1.19.0 / 2015-09-17 =================== diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json index f5b1a8c5119640..123e7f9517432e 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json @@ -158,6 +158,9 @@ "source": "iana", "extensions": ["cdmiq"] }, + "application/cdni": { + "source": "iana" + }, "application/cea": { "source": "iana" }, @@ -198,6 +201,10 @@ "application/cstadata+xml": { "source": "iana" }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, "application/cu-seeme": { "source": "apache", "extensions": ["cu"] @@ -882,6 +889,9 @@ "source": "iana", "extensions": ["rld"] }, + "application/rfc+xml": { + "source": "iana" + }, "application/riscos": { "source": "iana" }, @@ -1157,6 +1167,9 @@ "application/vnd.3gpp-prose-pc3ch+xml": { "source": "iana" }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana" + }, "application/vnd.3gpp.bsf+xml": { "source": "iana" }, @@ -1178,6 +1191,9 @@ "application/vnd.3gpp.sms": { "source": "iana" }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana" + }, "application/vnd.3gpp.srvcc-info+xml": { "source": "iana" }, @@ -2645,6 +2661,9 @@ "application/vnd.ms-windows.printerpairing": { "source": "iana" }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, "application/vnd.ms-wmdrm.lic-chlg-req": { "source": "iana" }, @@ -3343,6 +3362,13 @@ "application/vnd.otps.ct-kip+xml": { "source": "iana" }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, "application/vnd.palm": { "source": "iana", "extensions": ["pdb","pqa","oprc"] @@ -6132,6 +6158,10 @@ "source": "apache", "extensions": ["sfv"] }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, "text/x-uuencode": { "source": "apache", "extensions": ["uu"] diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json index 573cfa53e87bbd..9277428867ba7d 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json @@ -1,7 +1,7 @@ { "name": "mime-db", "description": "Media Type Database", - "version": "1.19.0", + "version": "1.20.0", "contributors": [ { "name": "Douglas Christopher Wilson", @@ -38,10 +38,10 @@ "cogent": "1.0.1", "csv-parse": "1.0.0", "gnode": "0.1.1", - "istanbul": "0.3.20", + "istanbul": "0.4.0", "mocha": "1.21.5", - "raw-body": "2.1.3", - "stream-to-array": "2" + "raw-body": "2.1.4", + "stream-to-array": "2.2.0" }, "files": [ "HISTORY.md", @@ -67,8 +67,8 @@ "url": "https://github.com/jshttp/mime-db/issues" }, "homepage": "https://github.com/jshttp/mime-db#readme", - "_id": "mime-db@1.19.0", - "_shasum": "496a18198a7ce8244534e25bb102b74fb420fd56", - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.19.0.tgz", - "_from": "mime-db@>=1.19.0 <1.20.0" + "_id": "mime-db@1.20.0", + "_shasum": "496f90fd01fe0e031c8823ec3aa9450ffda18ed8", + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.20.0.tgz", + "_from": "mime-db@>=1.20.0 <1.21.0" } diff --git a/deps/npm/node_modules/request/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/mime-types/package.json index 3292c714cc493f..21477d6d9ad6c3 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/package.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/package.json @@ -1,7 +1,7 @@ { "name": "mime-types", "description": "The ultimate javascript content-type utility.", - "version": "2.1.7", + "version": "2.1.8", "contributors": [ { "name": "Douglas Christopher Wilson", @@ -28,10 +28,10 @@ "url": "git+https://github.com/jshttp/mime-types.git" }, "dependencies": { - "mime-db": "~1.19.0" + "mime-db": "~1.20.0" }, "devDependencies": { - "istanbul": "0.3.20", + "istanbul": "0.4.1", "mocha": "~1.21.5" }, "files": [ @@ -53,8 +53,8 @@ "url": "https://github.com/jshttp/mime-types/issues" }, "homepage": "https://github.com/jshttp/mime-types#readme", - "_id": "mime-types@2.1.7", - "_shasum": "ff603970e3c731ef6f7f4df3c9a0f463a13c2755", - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.7.tgz", + "_id": "mime-types@2.1.8", + "_shasum": "faf57823de04bc7cbff4ee82c6b63946e812ae72", + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.8.tgz", "_from": "mime-types@>=2.1.7 <2.2.0" } diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore b/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore index fd4f2b066b339e..8886139386e5da 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore +++ b/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore @@ -1,2 +1,4 @@ node_modules .DS_Store +.nyc_output +coverage diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/README.md b/deps/npm/node_modules/request/node_modules/node-uuid/README.md index b7d04c94071085..5cd85550877331 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/README.md +++ b/deps/npm/node_modules/request/node_modules/node-uuid/README.md @@ -7,7 +7,9 @@ Features: * Generate RFC4122 version 1 or version 4 UUIDs * Runs in node.js and all browsers. * Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation on supporting platforms +* Cryptographically strong random # generation + * `crypto.randomBytes(n)` in node.js + * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility) * 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) * [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) * Comes with a Command Line Interface for generating uuids on the command line @@ -226,6 +228,15 @@ For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid- ## Release notes +### 1.4.6 + +* Properly detect node crypto and whatwg crypto +* Workaround phantomjs/browserify bug +* Explicit check for `window` rather implicit this-global +* Issue warning if Math.random() is being used +* "use strict"; +* A few jshint / stylistic updates (=== and such) + ### 1.4.0 * Improved module context detection diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/bower.json b/deps/npm/node_modules/request/node_modules/node-uuid/bower.json index 1656dc8197a341..c0925e1906bd7c 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/bower.json +++ b/deps/npm/node_modules/request/node_modules/node-uuid/bower.json @@ -1,6 +1,6 @@ { "name": "node-uuid", - "version": "1.4.3", + "version": "1.4.7", "homepage": "https://github.com/broofa/node-uuid", "authors": [ "Robert Kieffer " diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/component.json b/deps/npm/node_modules/request/node_modules/node-uuid/component.json index 149f84b22bec4f..3ff463366e7818 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/component.json +++ b/deps/npm/node_modules/request/node_modules/node-uuid/component.json @@ -2,12 +2,19 @@ "name": "node-uuid", "repo": "broofa/node-uuid", "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.3", + "version": "1.4.7", "author": "Robert Kieffer ", "contributors": [ - {"name": "Christoph Tavan ", "github": "https://github.com/ctavan"} + { + "name": "Christoph Tavan ", + "github": "https://github.com/ctavan" + } + ], + "keywords": [ + "uuid", + "guid", + "rfc4122" ], - "keywords": ["uuid", "guid", "rfc4122"], "dependencies": {}, "development": {}, "main": "uuid.js", @@ -15,4 +22,4 @@ "uuid.js" ], "license": "MIT" -} +} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/package.json b/deps/npm/node_modules/request/node_modules/node-uuid/package.json index 076eaa154863ca..67dc8da838efa6 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/package.json +++ b/deps/npm/node_modules/request/node_modules/node-uuid/package.json @@ -1,49 +1,67 @@ { - "name": "node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url": "http://github.com/broofa/node-uuid", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], "author": { "name": "Robert Kieffer", "email": "robert@broofa.com" }, + "bin": { + "uuid": "./bin/uuid" + }, + "bugs": { + "url": "https://github.com/broofa/node-uuid/issues" + }, "contributors": [ + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, { "name": "Christoph Tavan", "email": "dev@tavan.de" } ], - "bin": { - "uuid": "./bin/uuid" - }, - "scripts": { - "test": "node test/test.js" + "dependencies": {}, + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "devDependencies": { + "nyc": "^2.2.0" }, + "directories": {}, + "homepage": "https://github.com/broofa/node-uuid", + "installable": true, + "keywords": [ + "guid", + "rfc4122", + "uuid" + ], "lib": ".", - "main": "./uuid.js", - "repository": { - "type": "git", - "url": "git+https://github.com/broofa/node-uuid.git" - }, - "version": "1.4.3", "licenses": [ { "type": "MIT", "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" } ], - "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n* Comes with a Command Line Interface for generating uuids on the command line\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> \nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Command Line Interface\n\nTo use the executable, it's probably best to install this library globally.\n\n`npm install -g node-uuid`\n\nUsage:\n\n```\nUSAGE: uuid [version] [options]\n\n\noptions:\n\n--help Display this message and exit\n```\n\n`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by \"v1\" and \"v4\", respectively). `version` defaults to version 4 when not supplied.\n\n### Examples\n\n```\n> uuid\n3a91f950-dec8-4688-ba14-5b7bbfc7a563\n```\n\n```\n> uuid v1\n9d0b43e0-7696-11e3-964b-250efa37a98e\n```\n\n```\n> uuid v4\n6790ac7c-24ac-4f98-8464-42f6d98a53ae\n```\n\n## Testing\n\nIn node.js\n\n```\nnpm test\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" + "main": "./uuid.js", + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + } + ], + "name": "node-uuid", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/broofa/node-uuid.git" }, - "homepage": "https://github.com/broofa/node-uuid#readme", - "_id": "node-uuid@1.4.3", - "_shasum": "319bb7a56e7cb63f00b5c0cd7851cd4b4ddf1df9", - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz", - "_from": "node-uuid@>=1.4.3 <1.5.0" + "scripts": { + "coverage": "nyc npm test && nyc report", + "test": "node test/test.js" + }, + "url": "http://github.com/broofa/node-uuid", + "version": "1.4.7", + "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation\n * `crypto.randomBytes(n)` in node.js\n * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility)\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n* Comes with a Command Line Interface for generating uuids on the command line\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> \nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Command Line Interface\n\nTo use the executable, it's probably best to install this library globally.\n\n`npm install -g node-uuid`\n\nUsage:\n\n```\nUSAGE: uuid [version] [options]\n\n\noptions:\n\n--help Display this message and exit\n```\n\n`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by \"v1\" and \"v4\", respectively). `version` defaults to version 4 when not supplied.\n\n### Examples\n\n```\n> uuid\n3a91f950-dec8-4688-ba14-5b7bbfc7a563\n```\n\n```\n> uuid v1\n9d0b43e0-7696-11e3-964b-250efa37a98e\n```\n\n```\n> uuid v4\n6790ac7c-24ac-4f98-8464-42f6d98a53ae\n```\n\n## Testing\n\nIn node.js\n\n```\nnpm test\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.6\n\n* Properly detect node crypto and whatwg crypto\n* Workaround phantomjs/browserify bug\n* Explicit check for `window` rather implicit this-global\n* Issue warning if Math.random() is being used\n* \"use strict\";\n* A few jshint / stylistic updates (=== and such)\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", + "readmeFilename": "README.md", + "_id": "node-uuid@1.4.7", + "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "_from": "node-uuid@>=1.4.7 <1.5.0" } diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js b/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js index 24692256161c4c..5f1113d85727ae 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js +++ b/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js @@ -1,6 +1,9 @@ if (!this.uuid) { // node.js uuid = require('../uuid'); + if (!/_rb/.test(uuid._rng.toString())) { + throw new Error("should use crypto for node.js"); + } } // diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js index 0a617697969af7..89c5b8fb613948 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js +++ b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js @@ -3,53 +3,74 @@ // Copyright (c) 2010-2012 Robert Kieffer // MIT License - http://opensource.org/licenses/mit-license.php -(function() { - var _global = this; +/*global window, require, define */ +(function(_window) { + 'use strict'; // Unique ID creation requires a high quality random # generator. We feature // detect to determine the best RNG source, normalizing to a function that // returns 128-bits of randomness, since that's what's usually required - var _rng; + var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; + + function setupBrowser() { + // Allow for MSIE11 msCrypto + var _crypto = _window.crypto || _window.msCrypto; + + if (!_rng && _crypto && _crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + try { + var _rnds8 = new Uint8Array(16); + _whatwgRNG = _rng = function whatwgRNG() { + _crypto.getRandomValues(_rnds8); + return _rnds8; + }; + _rng(); + } catch(e) {} + } - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if (typeof(_global.require) == 'function') { - try { - var _rb = _global.require('crypto').randomBytes; - _rng = _rb && function() {return _rb(16);}; - } catch(e) {} + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _mathRNG = _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + if ('undefined' !== typeof console && console.warn) { + console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); + } + } } - if (!_rng && _global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + function setupNode() { + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html // // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - _rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; + if ('function' === typeof require) { + try { + var _rb = require('crypto').randomBytes; + _nodeRNG = _rng = _rb && function() {return _rb(16);}; + _rng(); + } catch(e) {} + } } - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; + if (_window) { + setupBrowser(); + } else { + setupNode(); } // Buffer class to use - var BufferClass = typeof(_global.Buffer) == 'function' ? _global.Buffer : Array; + var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; // Maps for number <-> hex string conversion var _byteToHex = []; @@ -118,17 +139,17 @@ options = options || {}; - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; + var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; // UUID timestamps are 100 nano-second units since the Gregorian epoch, // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); + var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; + var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; @@ -194,8 +215,8 @@ // Deprecated - 'format' argument, as supported in v1.2 var i = buf && offset || 0; - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; + if (typeof(options) === 'string') { + buf = (options === 'binary') ? new BufferClass(16) : null; options = null; } options = options || {}; @@ -223,25 +244,29 @@ uuid.parse = parse; uuid.unparse = unparse; uuid.BufferClass = BufferClass; + uuid._rng = _rng; + uuid._mathRNG = _mathRNG; + uuid._nodeRNG = _nodeRNG; + uuid._whatwgRNG = _whatwgRNG; - if (typeof(module) != 'undefined' && module.exports) { + if (('undefined' !== typeof module) && module.exports) { // Publish as node.js module module.exports = uuid; - } else if (typeof define === 'function' && define.amd) { + } else if (typeof define === 'function' && define.amd) { // Publish as AMD module define(function() {return uuid;}); - + } else { // Publish as global (in browsers) - var _previousRoot = _global.uuid; + _previousRoot = _window.uuid; // **`noConflict()` - (browser only) to reset global 'uuid' var** uuid.noConflict = function() { - _global.uuid = _previousRoot; + _window.uuid = _previousRoot; return uuid; }; - _global.uuid = uuid; + _window.uuid = uuid; } -}).call(this); +})('undefined' !== typeof window ? window : null); diff --git a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json index eeaaa68d3596ce..566bf5c3dd73e8 100644 --- a/deps/npm/node_modules/request/node_modules/oauth-sign/package.json +++ b/deps/npm/node_modules/request/node_modules/oauth-sign/package.json @@ -21,39 +21,14 @@ "scripts": { "test": "node test.js" }, - "gitHead": "e1f2b42ff039901ce977f8e81918767d97d496b5", + "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mikeal/oauth-sign/issues" }, "homepage": "https://github.com/mikeal/oauth-sign#readme", "_id": "oauth-sign@0.8.0", "_shasum": "938fdc875765ba527137d8aec9d178e24debc553", - "_from": "oauth-sign@>=0.8.0 <0.9.0", - "_npmVersion": "2.10.1", - "_nodeVersion": "0.12.4", - "_npmUser": { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - }, - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - } - ], - "dist": { - "shasum": "938fdc875765ba527137d8aec9d178e24debc553", - "tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.0.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "oauth-sign@>=0.8.0 <0.9.0" } diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json index 7e60df7007dfe5..2ca59cde2561bb 100644 --- a/deps/npm/node_modules/request/node_modules/qs/package.json +++ b/deps/npm/node_modules/request/node_modules/qs/package.json @@ -26,34 +26,13 @@ "dist": "browserify --standalone Qs lib/index.js > dist/qs.js" }, "license": "BSD-3-Clause", - "gitHead": "a341cdf2fadba5ede1ce6c95c7051f6f31f37b81", + "readme": "# qs\n\nA querystring parsing and stringifying library with some added security.\n\n[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs)\n\nLead Maintainer: [Nathan LaFreniere](https://github.com/nlf)\n\nThe **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).\n\n## Usage\n\n```javascript\nvar Qs = require('qs');\n\nvar obj = Qs.parse('a=c'); // { a: 'c' }\nvar str = Qs.stringify(obj); // 'a=c'\n```\n\n### Parsing Objects\n\n```javascript\nQs.parse(string, [options]);\n```\n\n**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.\nFor example, the string `'foo[bar]=baz'` converts to:\n\n```javascript\n{\n foo: {\n bar: 'baz'\n }\n}\n```\n\nWhen using the `plainObjects` option the parsed value is returned as a plain object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:\n\n```javascript\nQs.parse('a.hasOwnProperty=b', { plainObjects: true });\n// { a: { hasOwnProperty: 'b' } }\n```\n\nBy default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.\n\n```javascript\nQs.parse('a.hasOwnProperty=b', { allowPrototypes: true });\n// { a: { hasOwnProperty: 'b' } }\n```\n\nURI encoded strings work too:\n\n```javascript\nQs.parse('a%5Bb%5D=c');\n// { a: { b: 'c' } }\n```\n\nYou can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:\n\n```javascript\n{\n foo: {\n bar: {\n baz: 'foobarbaz'\n }\n }\n}\n```\n\nBy default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like\n`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:\n\n```javascript\n{\n a: {\n b: {\n c: {\n d: {\n e: {\n f: {\n '[g][h][i]': 'j'\n }\n }\n }\n }\n }\n }\n}\n```\n\nThis depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`:\n\n```javascript\nQs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });\n// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }\n```\n\nThe depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.\n\nFor similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:\n\n```javascript\nQs.parse('a=b&c=d', { parameterLimit: 1 });\n// { a: 'b' }\n```\n\nAn optional delimiter can also be passed:\n\n```javascript\nQs.parse('a=b;c=d', { delimiter: ';' });\n// { a: 'b', c: 'd' }\n```\n\nDelimiters can be a regular expression too:\n\n```javascript\nQs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });\n// { a: 'b', c: 'd', e: 'f' }\n```\n\nOption `allowDots` can be used to enable dot notation:\n\n```javascript\nQs.parse('a.b=c', { allowDots: true });\n// { a: { b: 'c' } }\n```\n\n### Parsing Arrays\n\n**qs** can also parse arrays using a similar `[]` notation:\n\n```javascript\nQs.parse('a[]=b&a[]=c');\n// { a: ['b', 'c'] }\n```\n\nYou may specify an index as well:\n\n```javascript\nQs.parse('a[1]=c&a[0]=b');\n// { a: ['b', 'c'] }\n```\n\nNote that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number\nto create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving\ntheir order:\n\n```javascript\nQs.parse('a[1]=b&a[15]=c');\n// { a: ['b', 'c'] }\n```\n\nNote that an empty string is also a value, and will be preserved:\n\n```javascript\nQs.parse('a[]=&a[]=b');\n// { a: ['', 'b'] }\nQs.parse('a[0]=b&a[1]=&a[2]=c');\n// { a: ['b', '', 'c'] }\n```\n\n**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will\ninstead be converted to an object with the index as the key:\n\n```javascript\nQs.parse('a[100]=b');\n// { a: { '100': 'b' } }\n```\n\nThis limit can be overridden by passing an `arrayLimit` option:\n\n```javascript\nQs.parse('a[1]=b', { arrayLimit: 0 });\n// { a: { '1': 'b' } }\n```\n\nTo disable array parsing entirely, set `parseArrays` to `false`.\n\n```javascript\nQs.parse('a[]=b', { parseArrays: false });\n// { a: { '0': 'b' } }\n```\n\nIf you mix notations, **qs** will merge the two items into an object:\n\n```javascript\nQs.parse('a[0]=b&a[b]=c');\n// { a: { '0': 'b', b: 'c' } }\n```\n\nYou can also create arrays of objects:\n\n```javascript\nQs.parse('a[][b]=c');\n// { a: [{ b: 'c' }] }\n```\n\n### Stringifying\n\n```javascript\nQs.stringify(object, [options]);\n```\n\nWhen stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:\n\n```javascript\nQs.stringify({ a: 'b' });\n// 'a=b'\nQs.stringify({ a: { b: 'c' } });\n// 'a%5Bb%5D=c'\n```\n\nThis encoding can be disabled by setting the `encode` option to `false`:\n\n```javascript\nQs.stringify({ a: { b: 'c' } }, { encode: false });\n// 'a[b]=c'\n```\n\nExamples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.\n\nWhen arrays are stringified, by default they are given explicit indices:\n\n```javascript\nQs.stringify({ a: ['b', 'c', 'd'] });\n// 'a[0]=b&a[1]=c&a[2]=d'\n```\n\nYou may override this by setting the `indices` option to `false`:\n\n```javascript\nQs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });\n// 'a=b&a=c&a=d'\n```\n\nYou may use the `arrayFormat` option to specify the format of the output array\n\n```javascript\nQs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })\n// 'a[0]=b&a[1]=c'\nQs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })\n// 'a[]=b&a[]=c'\nQs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })\n// 'a=b&a=c'\n```\n\nEmpty strings and null values will omit the value, but the equals sign (=) remains in place:\n\n```javascript\nQs.stringify({ a: '' });\n// 'a='\n```\n\nProperties that are set to `undefined` will be omitted entirely:\n\n```javascript\nQs.stringify({ a: null, b: undefined });\n// 'a='\n```\n\nThe delimiter may be overridden with stringify as well:\n\n```javascript\nQs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' });\n// 'a=b;c=d'\n```\n\nFinally, you can use the `filter` option to restrict which keys will be included in the stringified output.\nIf you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you\npass an array, it will be used to select properties and array indices for stringification:\n\n```javascript\nfunction filterFunc(prefix, value) {\n if (prefix == 'b') {\n // Return an `undefined` value to omit a property.\n return;\n }\n if (prefix == 'e[f]') {\n return value.getTime();\n }\n if (prefix == 'e[g][0]') {\n return value * 2;\n }\n return value;\n}\nQs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc })\n// 'a=b&c=d&e[f]=123&e[g][0]=4'\nQs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] })\n// 'a=b&e=f'\nQs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] })\n// 'a[0]=b&a[2]=d'\n```\n\n### Handling of `null` values\n\nBy default, `null` values are treated like empty strings:\n\n```javascript\nQs.stringify({ a: null, b: '' });\n// 'a=&b='\n```\n\nParsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings.\n\n```javascript\nQs.parse('a&b=')\n// { a: '', b: '' }\n```\n\nTo distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`\nvalues have no `=` sign:\n\n```javascript\nQs.stringify({ a: null, b: '' }, { strictNullHandling: true });\n// 'a&b='\n```\n\nTo parse values without `=` back to `null` use the `strictNullHandling` flag:\n\n```javascript\nQs.parse('a&b=', { strictNullHandling: true });\n// { a: null, b: '' }\n\n```\n\nTo completely skip rendering keys with `null` values, use the `skipNulls` flag:\n\n```javascript\nqs.stringify({ a: 'b', c: null}, { skipNulls: true })\n// 'a=b'\n```\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hapijs/qs/issues" }, "_id": "qs@5.2.0", "_shasum": "a9f31142af468cb72b25b30136ba2456834916be", - "_from": "qs@>=5.2.0 <5.3.0", - "_npmVersion": "3.3.5", - "_nodeVersion": "0.10.40", - "_npmUser": { - "name": "nlf", - "email": "quitlahok@gmail.com" - }, - "dist": { - "shasum": "a9f31142af468cb72b25b30136ba2456834916be", - "tarball": "http://registry.npmjs.org/qs/-/qs-5.2.0.tgz" - }, - "maintainers": [ - { - "name": "nlf", - "email": "quitlahok@gmail.com" - }, - { - "name": "hueniverse", - "email": "eran@hueniverse.com" - } - ], - "directories": {}, "_resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", - "readme": "ERROR: No README data found!" + "_from": "qs@>=5.2.0 <5.3.0" } diff --git a/deps/npm/node_modules/request/node_modules/stringstream/package.json b/deps/npm/node_modules/request/node_modules/stringstream/package.json index 39474baa0b5ef2..9d846459870bb7 100644 --- a/deps/npm/node_modules/request/node_modules/stringstream/package.json +++ b/deps/npm/node_modules/request/node_modules/stringstream/package.json @@ -19,32 +19,14 @@ "url": "git+https://github.com/mhart/StringStream.git" }, "license": "MIT", - "gitHead": "1efe3bf507bf3a1161f8473908b60e881d41422b", + "readme": "# Decode streams into strings The Right Way(tm)\n\n```javascript\nvar fs = require('fs')\nvar zlib = require('zlib')\nvar strs = require('stringstream')\n\nvar utf8Stream = fs.createReadStream('massiveLogFile.gz')\n .pipe(zlib.createGunzip())\n .pipe(strs('utf8'))\n```\n\nNo need to deal with `setEncoding()` weirdness, just compose streams\nlike they were supposed to be!\n\nHandles input and output encoding:\n\n```javascript\n// Stream from utf8 to hex to base64... Why not, ay.\nvar hex64Stream = fs.createReadStream('myFile')\n .pipe(strs('utf8', 'hex'))\n .pipe(strs('hex', 'base64'))\n```\n\nAlso deals with `base64` output correctly by aligning each emitted data\nchunk so that there are no dangling `=` characters:\n\n```javascript\nvar stream = fs.createReadStream('myFile').pipe(strs('base64'))\n\nvar base64Str = ''\n\nstream.on('data', function(data) { base64Str += data })\nstream.on('end', function() {\n console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding()\n console.log('Original file is: ' + new Buffer(base64Str, 'base64'))\n})\n```\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mhart/StringStream/issues" }, "homepage": "https://github.com/mhart/StringStream#readme", "_id": "stringstream@0.0.5", - "scripts": {}, "_shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", - "_from": "stringstream@>=0.0.4 <0.1.0", - "_npmVersion": "2.14.8", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "hichaelmart", - "email": "michael.hart.au@gmail.com" - }, - "maintainers": [ - { - "name": "hichaelmart", - "email": "michael.hart.au@gmail.com" - } - ], - "dist": { - "shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", - "tarball": "http://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" - }, - "directories": {}, "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "readme": "ERROR: No README data found!" + "_from": "stringstream@>=0.0.4 <0.1.0" } diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js index f1cb5e2872300b..0afe4a2a960c58 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js @@ -1265,7 +1265,6 @@ CookieJar.deserialize = function(strOrObj, store, cb) { }); }; -CookieJar.fromJSON = CookieJar.deserializeSync; CookieJar.deserializeSync = function(strOrObj, store) { var serialized = typeof strOrObj === 'string' ? JSON.parse(strOrObj) : strOrObj; @@ -1279,6 +1278,7 @@ CookieJar.deserializeSync = function(strOrObj, store) { jar._importCookiesSync(serialized); return jar; }; +CookieJar.fromJSON = CookieJar.deserializeSync; CAN_BE_SYNC.push('clone'); CookieJar.prototype.clone = function(newStore, cb) { diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json index 4a6920dd5aba20..8b90d88b094aaf 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json @@ -36,7 +36,7 @@ "RFC6265", "RFC2965" ], - "version": "2.2.0", + "version": "2.2.1", "homepage": "https://github.com/SalesforceEng/tough-cookie", "repository": { "type": "git", @@ -60,31 +60,10 @@ "async": "^1.4.2", "vows": "^0.8.1" }, - "gitHead": "fb1456177c9b51445afa34656eb314c70c2adcd2", - "_id": "tough-cookie@2.2.0", - "_shasum": "d4ce661075e5fddb7f20341d3f9931a6fbbadde0", - "_from": "tough-cookie@>=2.2.0 <2.3.0", - "_npmVersion": "2.11.2", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jstash", - "email": "jstash@gmail.com" - }, - "dist": { - "shasum": "d4ce661075e5fddb7f20341d3f9931a6fbbadde0", - "tarball": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.0.tgz" - }, - "maintainers": [ - { - "name": "jstash", - "email": "jeremy@goinstant.com" - }, - { - "name": "goinstant", - "email": "services@goinstant.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.0.tgz", - "readme": "ERROR: No README data found!" + "readme": "[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie)\n\n[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)\n![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)\n\n# Synopsis\n\n``` javascript\nvar tough = require('tough-cookie');\nvar Cookie = tough.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new tough.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\n## tough\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\n**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary.\n\n### `parseDate(string)`\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`.\n\n### `formatDate(date)`\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\n### `canonicalDomain(str)`\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\n### `domainMatch(str,domStr[,canonicalize=true])`\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\n### `defaultPath(path)`\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\n### `pathMatch(reqPath,cookiePath)`\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\n### `parse(cookieString[, options])`\n\nalias for `Cookie.parse(cookieString[, options])`\n\n### `fromJSON(string)`\n\nalias for `Cookie.fromJSON(string)`\n\n### `getPublicSuffix(hostname)`\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\n### `cookieCompare(a,b)`\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence:\n\n* Longest `.path`\n* oldest `.creation` (which has a 1ms precision, same as `Date`)\n* lowest `.creationIndex` (to get beyond the 1ms precision)\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\n**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`.\n\n### `permuteDomain(domain)`\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n### `permutePath(path)`\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\n\n## Cookie\n\nExported via `tough.Cookie`.\n\n### `Cookie.parse(cookieString[, options])`\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed.\n\nThe options parameter is not required and currently has only one property:\n\n * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant.\n\nIf options is not an object, it is ignored, which means you can use `Array#map` with it.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\n### Properties\n\nCookie object properties:\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n * _creation_ - `Date` - when this cookie was constructed\n * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation)\n\nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\n### `Cookie([{properties}])`\n\nReceives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties.\n\n### `.toString()`\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n### `.cookieString()`\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n### `.setExpires(String)`\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n### `.setMaxAge(number)`\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n### `.expiryTime([now=Date.now()])`\n\n### `.expiryDate([now=Date.now()])`\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n### `.TTL([now=Date.now()])`\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n### `.canonicalizedDoman()`\n\n### `.cdomain()`\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n### `.toJSON()`\n\nFor convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized.\n\nAny `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`).\n\n**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.\n\n### `Cookie.fromJSON(strOrObj)`\n\nDoes the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first.\n\nAny `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer.\n\nReturns `null` upon JSON parsing error.\n\n### `.clone()`\n\nDoes a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`.\n\n### `.validate()`\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\n\n## CookieJar\n\nExported via `tough.CookieJar`.\n\n### `CookieJar([store],[options])`\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like \"com\" and \"co.uk\"\n * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.\n This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers.\n\nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))`\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n### `.setCookieSync(cookieOrString, currentUrl, [{options}])`\n\nSynchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n### `.getCookies(currentUrl, [{options},] cb(err,cookies))`\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n### `.getCookiesSync(currentUrl, [{options}])`\n\nSynchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n### `.getCookieString(...)`\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n### `.getCookieStringSync(...)`\n\nSynchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n### `.getSetCookieStrings(...)`\n\nReturns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.\n\n### `.getSetCookieStringsSync(...)`\n\nSynchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n### `.serialize(cb(err,serializedObject))`\n\nSerialize the Jar if the underlying store supports `.getAllCookies`.\n\n**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.\n\nSee [Serialization Format].\n\n### `.serializeSync()`\n\nSync version of .serialize\n\n### `.toJSON()`\n\nAlias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`.\n\n### `CookieJar.deserialize(serialized, [store], cb(err,object))`\n\nA new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization.\n\nThe `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created.\n\nAs a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback.\n\n### `CookieJar.deserializeSync(serialized, [store])`\n\nSync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work.\n\n### `CookieJar.fromJSON(string)`\n\nAlias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`.\n\n### `.clone([store,]cb(err,newJar))`\n\nProduces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa.\n\nThe `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`.\n\n### `.cloneSync([store])`\n\nSynchronous version of `.clone`, returning a new `CookieJar` instance.\n\nThe `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used.\n\nThe _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.\n\n## Store\n\nBase class for CookieJar stores. Available as `tough.Store`.\n\n## Store API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nStores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`.\n\nStores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\n### `store.findCookie(domain, path, key, cb(err,cookie))`\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\n### `store.findCookies(domain, path, cb(err,cookies))`\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\n### `store.putCookie(cookie, cb(err))`\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\n### `store.updateCookie(oldCookie, newCookie, cb(err))`\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\n### `store.removeCookie(domain, path, key, cb(err))`\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\n### `store.removeCookies(domain, path, cb(err))`\n\nRemoves matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n### `store.getAllCookies(cb(err, cookies))`\n\nProduces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.\n\nCookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail.\n\nPass an error if retrieval fails.\n\n## MemoryCookieStore\n\nInherits from `Store`.\n\nA just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API.\n\n# Serialization Format\n\n**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.\n\n```js\n {\n // The version of tough-cookie that serialized this jar.\n version: 'tough-cookie@1.x.y',\n\n // add the store type, to make humans happy:\n storeType: 'MemoryCookieStore',\n\n // CookieJar configuration:\n rejectPublicSuffixes: true,\n // ... future items go here\n\n // Gets filled from jar.store.getAllCookies():\n cookies: [\n {\n key: 'string',\n value: 'string',\n // ...\n /* other Cookie.serializableProperties go here */\n }\n ]\n }\n```\n\n# Copyright and License\n\n(tl;dr: BSD-3-Clause with some MPL/2.0)\n\n```text\n Copyright (c) 2015, Salesforce.com, Inc.\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n 3. Neither the name of Salesforce.com nor the names of its contributors may\n be used to endorse or promote products derived from this software without\n specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE.\n```\n\nPortions may be licensed under different licenses (in particular `public_suffix_list.dat` is MPL/2.0); please read that file and the LICENSE file for full details.\n", + "readmeFilename": "README.md", + "_id": "tough-cookie@2.2.1", + "_shasum": "3b0516b799e70e8164436a1446e7e5877fda118e", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.1.tgz", + "_from": "tough-cookie@>=2.2.0 <2.3.0" } diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js b/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js index da516ec43f8785..68013ac1f4ef33 100644 --- a/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js @@ -25,6 +25,7 @@ function httpsOverHttp(options) { var agent = new TunnelingAgent(options) agent.request = http.request agent.createSocket = createSecureSocket + agent.defaultPort = 443 return agent } @@ -38,6 +39,7 @@ function httpsOverHttps(options) { var agent = new TunnelingAgent(options) agent.request = https.request agent.createSocket = createSecureSocket + agent.defaultPort = 443 return agent } diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json index 265089b648b618..4ea6ea5618acfa 100644 --- a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json @@ -5,8 +5,9 @@ "url": "http://www.futurealoof.com" }, "name": "tunnel-agent", + "license": "Apache-2.0", "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.4.1", + "version": "0.4.2", "repository": { "url": "git+https://github.com/mikeal/tunnel-agent.git" }, @@ -17,14 +18,44 @@ "engines": { "node": "*" }, - "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", + "gitHead": "449634d1054949f9f145f4925985a8dea0f46b0f", "bugs": { "url": "https://github.com/mikeal/tunnel-agent/issues" }, "homepage": "https://github.com/mikeal/tunnel-agent#readme", - "_id": "tunnel-agent@0.4.1", - "_shasum": "bbeecff4d679ce753db9462761a88dfcec3c5ab3", - "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.1.tgz", - "_from": "tunnel-agent@>=0.4.1 <0.5.0" + "_id": "tunnel-agent@0.4.2", + "scripts": {}, + "_shasum": "1104e3f36ac87125c287270067d582d18133bfee", + "_from": "tunnel-agent@>=0.4.1 <0.5.0", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + }, + "dist": { + "shasum": "1104e3f36ac87125c287270067d582d18133bfee", + "tarball": "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz" + }, + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + { + "name": "nylen", + "email": "jnylen@gmail.com" + }, + { + "name": "fredkschott", + "email": "fkschott@gmail.com" + }, + { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index c93714d9549cc4..d8040a11e6c020 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -7,7 +7,7 @@ "util", "utility" ], - "version": "2.65.0", + "version": "2.67.0", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com" @@ -32,17 +32,18 @@ "form-data": "~1.0.0-rc3", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.7", - "node-uuid": "~1.4.3", + "node-uuid": "~1.4.7", "qs": "~5.2.0", "tunnel-agent": "~0.4.1", "tough-cookie": "~2.2.0", - "http-signature": "~0.11.0", + "http-signature": "~1.1.0", "oauth-sign": "~0.8.0", "hawk": "~3.1.0", "aws-sign2": "~0.6.0", "stringstream": "~0.0.4", "combined-stream": "~1.0.5", "isstream": "~0.1.2", + "is-typedarray": "~1.0.0", "har-validator": "~2.0.2" }, "scripts": { @@ -54,59 +55,30 @@ }, "devDependencies": { "browserify-istanbul": "^0.1.5", - "browserify": "^11.2.0", + "browserify": "^12.0.1", "buffer-equal": "^0.0.1", "codecov.io": "^0.1.6", "coveralls": "^2.11.4", - "eslint": "0.18.0", + "eslint": "1.9.0", "function-bind": "^1.0.2", - "istanbul": "^0.3.21", + "istanbul": "^0.4.0", "karma-browserify": "^4.4.0", "karma": "^0.13.10", "karma-cli": "^0.1.1", - "karma-coverage": "^0.2.6", + "karma-coverage": "^0.5.3", "karma-phantomjs-launcher": "^0.1.4", "karma-tap": "^1.0.3", "rimraf": "^2.2.8", "server-destroy": "^1.0.1", "tape": "^4.2.0", "taper": "^0.4.0", - "bluebird": "^2.10.1" + "bluebird": "^3.0.2" }, - "gitHead": "8a7a37835c600f5006a6679aa23a0db504003ecd", + "readme": "\n# Request - Simplified HTTP client\n\n[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)\n\n[![Build status](https://img.shields.io/travis/request/request.svg?style=flat-square)](https://travis-ci.org/request/request)\n[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master)\n[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)\n[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request)\n[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)\n\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```js\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Show the HTML for the Google homepage.\n }\n})\n```\n\n\n## Table of contents\n\n- [Streaming](#streaming)\n- [Forms](#forms)\n- [HTTP Authentication](#http-authentication)\n- [Custom HTTP Headers](#custom-http-headers)\n- [OAuth Signing](#oauth-signing)\n- [Proxies](#proxies)\n- [Unix Domain Sockets](#unix-domain-sockets)\n- [TLS/SSL Protocol](#tlsssl-protocol)\n- [Support for HAR 1.2](#support-for-har-12)\n- [**All Available Options**](#requestoptions-callback)\n\nRequest also offers [convenience methods](#convenience-methods) like\n`request.defaults` and `request.post`, and there are\nlots of [usage examples](#examples) and several\n[debugging techniques](#debugging).\n\n\n---\n\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```js\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```js\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```js\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nRequest emits a \"response\" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).\n\n```js\nrequest\n .get('http://google.com/img.png')\n .on('response', function(response) {\n console.log(response.statusCode) // 200\n console.log(response.headers['content-type']) // 'image/png'\n })\n .pipe(request.put('http://mysite.com/img.png'))\n```\n\nTo easily handle errors when streaming requests, listen to the `error` event before piping:\n\n```js\nrequest\n .get('http://mysite.com/doodle.png')\n .on('error', function(err) {\n console.log(err)\n })\n .pipe(fs.createWriteStream('doodle.png'))\n```\n\nNow let’s get fancy.\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```js\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```js\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\n\n#### application/x-www-form-urlencoded (URL-Encoded Forms)\n\nURL-encoded forms are simple.\n\n```js\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n// or\nrequest.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })\n```\n\n\n#### multipart/form-data (Multipart Form Uploads)\n\nFor `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.\n\n\n```js\nvar formData = {\n // Pass a simple key-value pair\n my_field: 'my_value',\n // Pass data via Buffers\n my_buffer: new Buffer([1, 2, 3]),\n // Pass data via Streams\n my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),\n // Pass multiple values /w an Array\n attachments: [\n fs.createReadStream(__dirname + '/attachment1.jpg'),\n fs.createReadStream(__dirname + '/attachment2.jpg')\n ],\n // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}\n // Use case: for some types of streams, you'll need to provide \"file\"-related information manually.\n // See the `form-data` README for more information about options: https://github.com/form-data/form-data\n custom_file: {\n value: fs.createReadStream('/dev/urandom'),\n options: {\n filename: 'topsecret.jpg',\n contentType: 'image/jpg'\n }\n }\n};\nrequest.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) {\n if (err) {\n return console.error('upload failed:', err);\n }\n console.log('Upload successful! Server responded with:', body);\n});\n```\n\nFor advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)\n\n```js\n// NOTE: Advanced use-case, for normal use see 'formData' usage above\nvar r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...})\nvar form = r.form();\nform.append('my_field', 'my_value');\nform.append('my_buffer', new Buffer([1, 2, 3]));\nform.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});\n```\nSee the [form-data README](https://github.com/form-data/form-data) for more information & examples.\n\n\n#### multipart/related\n\nSome variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.\n\n```js\n request({\n method: 'PUT',\n preambleCRLF: true,\n postambleCRLF: true,\n uri: 'http://service.com/upload',\n multipart: [\n {\n 'content-type': 'application/json',\n body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n },\n { body: 'I am an attachment' },\n { body: fs.createReadStream('image.png') }\n ],\n // alternatively pass an object containing additional options\n multipart: {\n chunked: false,\n data: [\n {\n 'content-type': 'application/json',\n body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n },\n { body: 'I am an attachment' }\n ]\n }\n },\n function (error, response, body) {\n if (error) {\n return console.error('upload failed:', error);\n }\n console.log('Upload successful! Server responded with:', body);\n })\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## HTTP Authentication\n\n```js\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n// or\nrequest.get('http://some.server.com/').auth(null, null, true, 'bearerToken');\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'bearer': 'bearerToken'\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values:\n\n- `user` || `username`\n- `pass` || `password`\n- `sendImmediately` (optional)\n- `bearer` (optional)\n\nThe method form takes parameters\n`auth(username, password, sendImmediately, bearer)`.\n\n`sendImmediately` defaults to `true`, which causes a basic or bearer\nauthentication header to be sent. If `sendImmediately` is `false`, then\n`request` will retry with a proper authentication header after receiving a\n`401` response from the server (which must contain a `WWW-Authenticate` header\nindicating the required authentication method).\n\nNote that you can also specify basic authentication using the URL itself, as\ndetailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the\n`user:password` before the host with an `@` sign:\n\n```js\nvar username = 'username',\n password = 'password',\n url = 'http://' + username + ':' + password + '@some.server.com';\n\nrequest({url: url}, function (error, response, body) {\n // Do more stuff with 'body' here\n});\n```\n\nDigest authentication is supported, but it only works with `sendImmediately`\nset to `false`; otherwise `request` will send basic authentication on the\ninitial request, which will probably cause the request to fail.\n\nBearer authentication is supported, and is activated when the `bearer` value is\navailable. The value may be either a `String` or a `Function` returning a\n`String`. Using a function to supply the bearer token is particularly useful if\nused in conjunction with `defaults` to allow a single function to supply the\nlast known token at the time of sending a request, or to compute one on the fly.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```js\nvar request = require('request');\n\nvar options = {\n url: 'https://api.github.com/repos/request/request',\n headers: {\n 'User-Agent': 'request'\n }\n};\n\nfunction callback(error, response, body) {\n if (!error && response.statusCode == 200) {\n var info = JSON.parse(body);\n console.log(info.stargazers_count + \" Stars\");\n console.log(info.forks_count + \" Forks\");\n }\n}\n\nrequest(options, callback);\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## OAuth Signing\n\n[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The\ndefault signing algorithm is\n[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):\n\n```js\n// OAuth1.0 - 3-legged server side flow (Twitter example)\n// step 1\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n\n // step 2\n var req_data = qs.parse(body)\n var uri = 'https://api.twitter.com/oauth/authenticate'\n + '?' + qs.stringify({oauth_token: req_data.oauth_token})\n // redirect the user to the authorize uri\n\n // step 3\n // after the user is redirected back to your server\n var auth_data = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: auth_data.oauth_token\n , token_secret: req_data.oauth_token_secret\n , verifier: auth_data.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n // ready to make signed requests on behalf of the user\n var perm_data = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_data.oauth_token\n , token_secret: perm_data.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json'\n , qs =\n { screen_name: perm_data.screen_name\n , user_id: perm_data.user_id\n }\n ;\n request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\nFor [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make\nthe following changes to the OAuth options object:\n* Pass `signature_method : 'RSA-SHA1'`\n* Instead of `consumer_secret`, specify a `private_key` string in\n [PEM format](http://how2ssl.com/articles/working_with_pem_files/)\n\nFor [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make\nthe following changes to the OAuth options object:\n* Pass `signature_method : 'PLAINTEXT'`\n\nTo send OAuth parameters via query params or in a post body as described in The\n[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param)\nsection of the oauth1 spec:\n* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth\n options object.\n* `transport_method` defaults to `'header'`\n\nTo use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either\n* Manually generate the body hash and pass it as a string `body_hash: '...'`\n* Automatically generate the body hash by passing `body_hash: true`\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Proxies\n\nIf you specify a `proxy` option, then the request (and any subsequent\nredirects) will be sent via a connection to the proxy server.\n\nIf your endpoint is an `https` url, and you are using a proxy, then\nrequest will send a `CONNECT` request to the proxy server *first*, and\nthen use the supplied connection to connect to the endpoint.\n\nThat is, first it will make a request like:\n\n```\nHTTP/1.1 CONNECT endpoint-server.com:80\nHost: proxy-server.com\nUser-Agent: whatever user agent you specify\n```\n\nand then the proxy server make a TCP connection to `endpoint-server`\non port `80`, and return a response that looks like:\n\n```\nHTTP/1.1 200 OK\n```\n\nAt this point, the connection is left open, and the client is\ncommunicating directly with the `endpoint-server.com` machine.\n\nSee [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel)\nfor more information.\n\nBy default, when proxying `http` traffic, request will simply make a\nstandard proxied `http` request. This is done by making the `url`\nsection of the initial line of the request a fully qualified url to\nthe endpoint.\n\nFor example, it will make a single request that looks like:\n\n```\nHTTP/1.1 GET http://endpoint-server.com/some-url\nHost: proxy-server.com\nOther-Headers: all go here\n\nrequest body or whatever\n```\n\nBecause a pure \"http over http\" tunnel offers no additional security\nor other features, it is generally simpler to go with a\nstraightforward HTTP proxy in this case. However, if you would like\nto force a tunneling proxy, you may set the `tunnel` option to `true`.\n\nYou can also make a standard proxied `http` request by explicitly setting\n`tunnel : false`, but **note that this will allow the proxy to see the traffic\nto/from the destination server**.\n\nIf you are using a tunneling proxy, you may set the\n`proxyHeaderWhiteList` to share certain headers with the proxy.\n\nYou can also set the `proxyHeaderExclusiveList` to share certain\nheaders only with the proxy and not with destination host.\n\nBy default, this set is:\n\n```\naccept\naccept-charset\naccept-encoding\naccept-language\naccept-ranges\ncache-control\ncontent-encoding\ncontent-language\ncontent-length\ncontent-location\ncontent-md5\ncontent-range\ncontent-type\nconnection\ndate\nexpect\nmax-forwards\npragma\nproxy-authorization\nreferer\nte\ntransfer-encoding\nuser-agent\nvia\n```\n\nNote that, when using a tunneling proxy, the `proxy-authorization`\nheader and any headers from custom `proxyHeaderExclusiveList` are\n*never* sent to the endpoint server, but only to the proxy server.\n\n\n### Controlling proxy behaviour using environment variables\n\nThe following environment variables are respected by `request`:\n\n * `HTTP_PROXY` / `http_proxy`\n * `HTTPS_PROXY` / `https_proxy`\n * `NO_PROXY` / `no_proxy`\n\nWhen `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.\n\n`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.\n\nHere's some examples of valid `no_proxy` values:\n\n * `google.com` - don't proxy HTTP/HTTPS requests to Google.\n * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.\n * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!\n * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## UNIX Domain Sockets\n\n`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:\n\n```js\n/* Pattern */ 'http://unix:SOCKET:PATH'\n/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')\n```\n\nNote: The `SOCKET` path is assumed to be absolute to the root of the host file system.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## TLS/SSL Protocol\n\nTLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be\nset directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent).\n\n```js\nvar fs = require('fs')\n , path = require('path')\n , certFile = path.resolve(__dirname, 'ssl/client.crt')\n , keyFile = path.resolve(__dirname, 'ssl/client.key')\n , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem')\n , request = require('request');\n\nvar options = {\n url: 'https://api.some-server.com/',\n cert: fs.readFileSync(certFile),\n key: fs.readFileSync(keyFile),\n passphrase: 'password',\n ca: fs.readFileSync(caFile)\n }\n};\n\nrequest.get(options);\n```\n\n### Using `options.agentOptions`\n\nIn the example below, we call an API requires client side SSL certificate\n(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:\n\n```js\nvar fs = require('fs')\n , path = require('path')\n , certFile = path.resolve(__dirname, 'ssl/client.crt')\n , keyFile = path.resolve(__dirname, 'ssl/client.key')\n , request = require('request');\n\nvar options = {\n url: 'https://api.some-server.com/',\n agentOptions: {\n cert: fs.readFileSync(certFile),\n key: fs.readFileSync(keyFile),\n // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:\n // pfx: fs.readFileSync(pfxFilePath),\n passphrase: 'password',\n securityOptions: 'SSL_OP_NO_SSLv3'\n }\n};\n\nrequest.get(options);\n```\n\nIt is able to force using SSLv3 only by specifying `secureProtocol`:\n\n```js\nrequest.get({\n url: 'https://api.some-server.com/',\n agentOptions: {\n secureProtocol: 'SSLv3_method'\n }\n});\n```\n\nIt is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs).\nThis can be useful, for example, when using self-signed certificates.\nTo require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`.\nThe certificate the domain presents must be signed by the root certificate specified:\n\n```js\nrequest.get({\n url: 'https://api.some-server.com/',\n agentOptions: {\n ca: fs.readFileSync('ca.cert.pem')\n }\n});\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Support for HAR 1.2\n\nThe `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.\n\na validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.\n\n```js\n var request = require('request')\n request({\n // will be ignored\n method: 'GET',\n uri: 'http://www.google.com',\n\n // HTTP Archive Request Object\n har: {\n url: 'http://www.mockbin.com/har',\n method: 'POST',\n headers: [\n {\n name: 'content-type',\n value: 'application/x-www-form-urlencoded'\n }\n ],\n postData: {\n mimeType: 'application/x-www-form-urlencoded',\n params: [\n {\n name: 'foo',\n value: 'bar'\n },\n {\n name: 'hello',\n value: 'world'\n }\n ]\n }\n }\n })\n\n // a POST request will be sent to http://www.mockbin.com\n // with body an application/x-www-form-urlencoded body:\n // foo=bar&hello=world\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n## request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string.\n- `method` - http method (default: `\"GET\"`)\n- `headers` - http headers (default: `{}`)\n\n---\n\n- `qs` - object containing querystring values to be appended to the `uri`\n- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`\n- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat`\n- `useQuerystring` - If true, use `querystring` to stringify and parse\n querystrings, otherwise use `qs` (default: `false`). Set this option to\n `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the\n default `foo[0]=bar&foo[1]=baz`.\n\n---\n\n- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object.\n- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See \"Forms\" section above.\n- `formData` - Data to pass for a `multipart/form-data` request. See\n [Forms](#forms) section above.\n- `multipart` - array of objects which contain their own headers and `body`\n attributes. Sends a `multipart/related` request. See [Forms](#forms) section\n above.\n - Alternatively you can pass in an object `{chunked: false, data: []}` where\n `chunked` is used to specify whether the request is sent in\n [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)\n In non-chunked requests, data items with body streams are not allowed.\n- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.\n- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.\n- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.\n\n---\n\n- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.\n- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n\n---\n\n- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.\n- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n- `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain.\n\n---\n\n- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)\n- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.\n- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n\n---\n\n- `agent` - `http(s).Agent` instance to use\n- `agentClass` - alternatively specify your agent's class name\n- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).\n- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+\n- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.\n - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).\n - Note that if you are sending multiple requests in a loop and creating\n multiple new `pool` objects, `maxSockets` will not work as intended. To\n work around this, either use [`request.defaults`](#requestdefaultsoptions)\n with your pool options or create the pool object with the `maxSockets`\n property outside of the loop.\n- `timeout` - Integer containing the number of milliseconds to wait for a\nserver to send response headers (and start the response body) before aborting\nthe request. Note that if the underlying TCP connection cannot be established,\nthe OS-wide TCP connection timeout will overrule the `timeout` option ([the\ndefault in Linux can be anywhere from 20-120 seconds][linux-timeout]).\n\n[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout\n\n---\n\n- `localAddress` - Local interface to bind for network connections.\n- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n- `tunnel` - controls the behavior of\n [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)\n as follows:\n - `undefined` (default) - `true` if the destination is `https`, `false` otherwise\n - `true` - always tunnel to the destination by making a `CONNECT` request to\n the proxy\n - `false` - request the destination as a `GET` request.\n- `proxyHeaderWhiteList` - A whitelist of headers to send to a\n tunneling proxy.\n- `proxyHeaderExclusiveList` - A whitelist of headers to send\n exclusively to a tunneling proxy and not to destination.\n\n---\n\n- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property.\n- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*\n\nThe callback argument gets 3 arguments:\n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n\n### request.defaults(options)\n\nThis method **returns a wrapper** around the normal request API that defaults\nto whatever options you pass to it.\n\n**Note:** `request.defaults()` **does not** modify the global request API;\ninstead, it **returns a wrapper** that has your default settings applied to it.\n\n**Note:** You can call `.defaults()` on the wrapper that is returned from\n`request.defaults` to add/override defaults that were previously defaulted.\n\nFor example:\n```js\n//requests using baseRequest() will set the 'x-token' header\nvar baseRequest = request.defaults({\n headers: {'x-token': 'my-token'}\n})\n\n//requests using specialRequest() will include the 'x-token' header set in\n//baseRequest and will also include the 'special' header\nvar specialRequest = baseRequest.defaults({\n headers: {special: 'special value'}\n})\n```\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```js\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```js\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```js\nrequest.post(url)\n```\n\n### request.head\n\nSame as `request()`, but defaults to `method: \"HEAD\"`.\n\n```js\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```js\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```js\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```js\nrequest.cookie('key1=value1')\n```\n### request.jar()\n\nFunction that creates a new cookie jar.\n\n```js\nrequest.jar()\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Debugging\n\nThere are at least three ways to debug the operation of `request`:\n\n1. Launch the node process like `NODE_DEBUG=request node script.js`\n (`lib,request,otherlib` works too).\n\n2. Set `require('request').debug = true` at any time (this does the same thing\n as #1).\n\n3. Use the [request-debug module](https://github.com/request/request-debug) to\n view request and response headers and bodies.\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Timeouts\n\nMost requests to external servers should have a timeout attached, in case the\nserver is not responding in a timely manner. Without a timeout, your code may\nhave a socket open/consume resources for minutes or more.\n\nThere are two main types of timeouts: **connection timeouts** and **read\ntimeouts**. A connect timeout occurs if the timeout is hit while your client is\nattempting to establish a connection to a remote machine (corresponding to the\n[connect() call][connect] on the socket). A read timeout occurs any time the\nserver is too slow to send back a part of the response.\n\nThese two situations have widely different implications for what went wrong\nwith the request, so it's useful to be able to distinguish them. You can detect\ntimeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you\ncan detect whether the timeout was a connection timeout by checking if the\n`err.connect` property is set to `true`.\n\n```js\nrequest.get('http://10.255.255.1', {timeout: 1500}, function(err) {\n console.log(err.code === 'ETIMEDOUT');\n // Set to `true` if the timeout was a connection timeout, `false` or\n // `undefined` otherwise.\n console.log(err.connect === true);\n process.exit(0);\n});\n```\n\n[connect]: http://linux.die.net/man/2/connect\n\n## Examples:\n\n```js\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nFor backwards-compatibility, response compression is not supported by default.\nTo accept gzip-compressed responses, set the `gzip` option to `true`. Note\nthat the body data passed through `request` is automatically decompressed\nwhile the response object is unmodified and will contain compressed data if\nthe server sent a compressed response.\n\n```js\n var request = require('request')\n request(\n { method: 'GET'\n , uri: 'http://www.google.com'\n , gzip: true\n }\n , function (error, response, body) {\n // body is the decompressed response body\n console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))\n console.log('the decoded data is: ' + body)\n }\n ).on('data', function(data) {\n // decompressed data as it is received\n console.log('decoded chunk: ' + data)\n })\n .on('response', function(response) {\n // unmodified http.IncomingMessage object\n response.on('data', function(data) {\n // compressed data as it is received\n console.log('received ' + data.length + ' bytes of compressed data')\n })\n })\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```js\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```js\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nOR\n\n```js\nvar j = request.jar();\nvar cookie = request.cookie('key1=value1');\nvar url = 'http://www.google.com';\nj.setCookie(cookie, url);\nrequest({url: url, jar: j}, function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie store (such as a\n[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore)\nwhich supports saving to and restoring from JSON files), pass it as a parameter\nto `request.jar()`:\n\n```js\nvar FileCookieStore = require('tough-cookie-filestore');\n// NOTE - currently the 'cookies.json' file must already exist!\nvar j = request.jar(new FileCookieStore('cookies.json'));\nrequest = request.defaults({ jar : j })\nrequest('http://www.google.com', function() {\n request('http://images.google.com')\n})\n```\n\nThe cookie store must be a\n[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie)\nstore and it must support synchronous operations; see the\n[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api)\nfor details.\n\nTo inspect your cookie jar after a request:\n\n```js\nvar j = request.jar()\nrequest({url: 'http://www.google.com', jar: j}, function () {\n var cookie_string = j.getCookieString(url); // \"key1=value1; key2=value2; ...\"\n var cookies = j.getCookies(url);\n // [{key: 'key1', value: 'value1', domain: \"www.google.com\", ...}, ...]\n})\n```\n\n[back to top](#table-of-contents)\n", + "readmeFilename": "README.md", "homepage": "https://github.com/request/request#readme", - "_id": "request@2.65.0", - "_shasum": "cc1a3bc72b96254734fc34296da322f9486ddeba", - "_from": "request@>=2.65.0 <2.66.0", - "_npmVersion": "2.14.3", - "_nodeVersion": "4.1.0", - "_npmUser": { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - }, - "maintainers": [ - { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - }, - { - "name": "fredkschott", - "email": "fkschott@gmail.com" - }, - { - "name": "simov", - "email": "simeonvelichkov@gmail.com" - } - ], - "dist": { - "shasum": "cc1a3bc72b96254734fc34296da322f9486ddeba", - "tarball": "http://registry.npmjs.org/request/-/request-2.65.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/request/-/request-2.65.0.tgz", - "readme": "ERROR: No README data found!" + "_id": "request@2.67.0", + "_shasum": "8af74780e2bf11ea0ae9aa965c11f11afd272742", + "_resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz", + "_from": "request@>=2.67.0 <2.68.0" } diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js index 824f9386e8e279..19c1b92f376029 100644 --- a/deps/npm/node_modules/request/request.js +++ b/deps/npm/node_modules/request/request.js @@ -15,6 +15,7 @@ var http = require('http') , caseless = require('caseless') , ForeverAgent = require('forever-agent') , FormData = require('form-data') + , isTypedArray = require('is-typedarray').strict , helpers = require('./lib/helpers') , cookies = require('./lib/cookies') , getProxyFromURI = require('./lib/getProxyFromURI') @@ -122,7 +123,6 @@ function Request (options) { var reserved = Object.keys(Request.prototype) var nonReserved = filterForNonReserved(reserved, options) - stream.Stream.call(self) util._extend(self, nonReserved) options = filterOutReservedFunctions(reserved, options) @@ -249,6 +249,11 @@ Request.prototype.init = function (options) { self.uri = url.parse(self.uri) } + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme if (self.uri.protocol === 'unix:') { return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) @@ -277,6 +282,7 @@ Request.prototype.init = function (options) { message += '. This can be caused by a crappy redirection.' } // This error was fatal + self.abort() return self.emit('error', new Error(message)) } @@ -284,7 +290,7 @@ Request.prototype.init = function (options) { self.proxy = getProxyFromURI(self.uri) } - self.tunnel = self._tunnel.isEnabled(options) + self.tunnel = self._tunnel.isEnabled() if (self.proxy) { self._tunnel.setup(options) } @@ -422,6 +428,10 @@ Request.prototype.init = function (options) { } function setContentLength () { + if (isTypedArray(self.body)) { + self.body = new Buffer(self.body) + } + if (!self.hasHeader('content-length')) { var length if (typeof self.body === 'string') { @@ -583,63 +593,6 @@ Request.prototype.init = function (options) { } -// Must call this when following a redirect from https to http or vice versa -// Attempts to keep everything as identical as possible, but update the -// httpModule, Tunneling agent, and/or Forever Agent in use. -Request.prototype._updateProtocol = function () { - var self = this - var protocol = self.uri.protocol - - if (protocol === 'https:' || self.tunnel) { - // previously was doing http, now doing https - // if it's https, then we might need to tunnel now. - if (self.proxy) { - if (self._tunnel.setup()) { - return - } - } - - self.httpModule = https - switch (self.agentClass) { - case ForeverAgent: - self.agentClass = ForeverAgent.SSL - break - case http.Agent: - self.agentClass = https.Agent - break - default: - // nothing we can do. Just hope for the best. - return - } - - // if there's an agent, we need to get a new one. - if (self.agent) { - self.agent = self.getNewAgent() - } - - } else { - // previously was doing https, now doing http - self.httpModule = http - switch (self.agentClass) { - case ForeverAgent.SSL: - self.agentClass = ForeverAgent - break - case https.Agent: - self.agentClass = http.Agent - break - default: - // nothing we can do. just hope for the best - return - } - - // if there's an agent, then get a new one. - if (self.agent) { - self.agent = null - self.agent = self.getNewAgent() - } - } -} - Request.prototype.getNewAgent = function () { var self = this var Agent = self.agentClass @@ -1386,6 +1339,8 @@ Request.prototype.pipe = function (dest, opts) { } Request.prototype.write = function () { var self = this + if (self._aborted) {return} + if (!self._started) { self.start() } @@ -1393,6 +1348,8 @@ Request.prototype.write = function () { } Request.prototype.end = function (chunk) { var self = this + if (self._aborted) {return} + if (chunk) { self.write(chunk) } diff --git a/deps/npm/node_modules/rimraf/README.md b/deps/npm/node_modules/rimraf/README.md index 18659f67fa3205..de7c4bbfabf9f9 100644 --- a/deps/npm/node_modules/rimraf/README.md +++ b/deps/npm/node_modules/rimraf/README.md @@ -1,12 +1,17 @@ [![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) -The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. Install with `npm install rimraf`, or just drop rimraf.js somewhere. ## API -`rimraf(f, callback)` +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. The callback will be called with an error if there is one. Certain errors are handled for you: diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json index 7576f528f72db2..d06b57dd9af73b 100644 --- a/deps/npm/node_modules/rimraf/package.json +++ b/deps/npm/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.4.3", + "version": "2.4.4", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -32,30 +32,14 @@ "mkdirp": "^0.5.1", "tap": "^1.3.1" }, - "gitHead": "ec7050f8ca14c931b847414f18466e601ca7c02e", + "readme": "[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)\n\nThe [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, [opts], callback)`\n\nThe first parameter will be interpreted as a globbing pattern for files. If you\nwant to disable globbing you can do so with `opts.disableGlob` (defaults to\n`false`). This might be handy, for instance, if you have filenames that contain\nglobbing wildcard characters.\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up, adding 100ms of wait\n between each attempt. The default `maxBusyTries` is 3.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n* `EMFILE` - Since `readdir` requires opening a file descriptor, it's\n possible to hit `EMFILE` if too many file descriptors are in use.\n In the sync case, there's nothing to be done for this. But in the\n async case, rimraf will gradually back off with timeouts up to\n `opts.emfileWait` ms, which defaults to 1000.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf [ ...]` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/rimraf/issues" }, "homepage": "https://github.com/isaacs/rimraf#readme", - "_id": "rimraf@2.4.3", - "_shasum": "e5b51c9437a4c582adb955e9f28cf8d945e272af", - "_from": "rimraf@2.4.3", - "_npmVersion": "3.2.2", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "e5b51c9437a4c582adb955e9f28cf8d945e272af", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.3.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.3.tgz" + "_id": "rimraf@2.4.4", + "_shasum": "b528ce2ebe0e6d89fb03b265de11d61da0dbcf82", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.4.tgz", + "_from": "rimraf@>=2.4.4 <2.5.0" } diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index b5e35ff0b5bd95..0b14a7e8103b07 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -107,7 +107,7 @@ The method `.inc` takes an additional `identifier` string argument that will append the value of the string as a prerelease identifier: ```javascript -> semver.inc('1.2.3', 'pre', 'beta') +> semver.inc('1.2.3', 'prerelease', 'beta') '1.2.4-beta.0' ``` @@ -228,6 +228,30 @@ zero. * `^1.x` := `>=1.0.0 <2.0.0` * `^0.x` := `>=0.0.0 <1.0.0` +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + ## Functions All methods and classes take a final `loose` boolean argument that, if diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index b3a540c1643bb5..0a8742848dbc3f 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,13 +1,13 @@ { "name": "semver", - "version": "5.0.3", + "version": "5.1.0", "description": "The semantic version parser used by npm.", "main": "semver.js", "scripts": { "test": "tap test/*.js" }, "devDependencies": { - "tap": "^1.3.4" + "tap": "^2.0.0" }, "license": "ISC", "repository": { @@ -17,23 +17,23 @@ "bin": { "semver": "./bin/semver" }, - "gitHead": "5f89ecbe78145ad0b501cf6279f602a23c89738d", + "gitHead": "8e33a30e62e40e4983d1c5f55e794331b861aadc", "bugs": { "url": "https://github.com/npm/node-semver/issues" }, "homepage": "https://github.com/npm/node-semver#readme", - "_id": "semver@5.0.3", - "_shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a", - "_from": "semver@5.0.3", + "_id": "semver@5.1.0", + "_shasum": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "_from": "semver@>=5.1.0 <5.2.0", "_npmVersion": "3.3.2", "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", - "email": "isaacs@npmjs.com" + "email": "i@izs.me" }, "dist": { - "shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a", - "tarball": "http://registry.npmjs.org/semver/-/semver-5.0.3.tgz" + "shasum": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "tarball": "http://registry.npmjs.org/semver/-/semver-5.1.0.tgz" }, "maintainers": [ { @@ -46,5 +46,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz" + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/semver/range.bnf b/deps/npm/node_modules/semver/range.bnf new file mode 100644 index 00000000000000..000df923a6963f --- /dev/null +++ b/deps/npm/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js index 19392d8ff9fc7d..71795f6f0720ae 100644 --- a/deps/npm/node_modules/semver/semver.js +++ b/deps/npm/node_modules/semver/semver.js @@ -332,10 +332,6 @@ SemVer.prototype.format = function() { return this.version; }; -SemVer.prototype.inspect = function() { - return ''; -}; - SemVer.prototype.toString = function() { return this.version; }; @@ -692,10 +688,6 @@ Comparator.prototype.parse = function(comp) { this.semver = new SemVer(m[2], this.loose); }; -Comparator.prototype.inspect = function() { - return ''; -}; - Comparator.prototype.toString = function() { return this.value; }; @@ -739,10 +731,6 @@ function Range(range, loose) { this.format(); } -Range.prototype.inspect = function() { - return ''; -}; - Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(' ').trim(); diff --git a/deps/npm/node_modules/spdx/LICENSE.md b/deps/npm/node_modules/spdx/LICENSE.md deleted file mode 100644 index 2180a8c1a3676e..00000000000000 --- a/deps/npm/node_modules/spdx/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright Kyle E. Mitchell - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/deps/npm/node_modules/spdx/README.md b/deps/npm/node_modules/spdx/README.md deleted file mode 100644 index f373262474e8bb..00000000000000 --- a/deps/npm/node_modules/spdx/README.md +++ /dev/null @@ -1,145 +0,0 @@ -spdx.js -======= - -[![npm version](https://img.shields.io/npm/v/spdx.svg)](https://www.npmjs.com/package/spdx) -[![SPDX License Expression Syntax version](https://img.shields.io/badge/SPDX-2.0-blue.svg)](http://spdx.org/SPDX-specifications/spdx-version-2.0) -[![license](https://img.shields.io/badge/license-Apache--2.0-303284.svg)](http://www.apache.org/licenses/LICENSE-2.0) -[![build status](https://img.shields.io/travis/kemitchell/spdx.js.svg)](http://travis-ci.org/kemitchell/spdx.js) - -SPDX License Expression Syntax parser - - - -Simple License Expressions --------------------------- -```js -spdx.valid('Invalid-Identifier'); // => null -spdx.valid('GPL-2.0'); // => true -spdx.valid('GPL-2.0+'); // => true -spdx.valid('LicenseRef-23'); // => true -spdx.valid('LicenseRef-MIT-Style-1'); // => true -spdx.valid('DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2'); // => true -``` - -Composite License Expressions ------------------------------ - -### Disjunctive `OR` Operator -```js -spdx.valid('(LGPL-2.1 OR MIT)'); // => true -spdx.valid('(LGPL-2.1 OR MIT OR BSD-3-Clause)'); // => true -``` - -### Conjunctive `AND` Operator -```js -spdx.valid('(LGPL-2.1 AND MIT)'); // => true -spdx.valid('(LGPL-2.1 AND MIT AND BSD-2-Clause)'); // => true -``` - -### Exception `WITH` Operator -```js -spdx.valid('(GPL-2.0+ WITH Bison-exception-2.2)'); // => true -``` - -### Order of Precedence and Parentheses -```js -var firstAST = { - left: {license: 'LGPL-2.1'}, - conjunction: 'or', - right: { - left: {license: 'BSD-3-Clause'}, - conjunction: 'and', - right: {license: 'MIT'} - } -}; -spdx.parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'); // => firstAST - -var secondAST = { - left: {license: 'MIT'}, - conjunction: 'and', - right: { - left: {license: 'LGPL-2.1', plus: true}, - conjunction: 'and', - right: {license: 'BSD-3-Clause'} - } -}; -spdx.parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'); // => secondAST -``` - -Strict Whitespace Rules ------------------------ -```js -spdx.valid('MIT '); // => false -spdx.valid(' MIT'); // => false -spdx.valid('MIT AND BSD-3-Clause'); // => false -``` - -Identifier Lists ----------------- -```js -Array.isArray(spdx.licenses); // => true -spdx.licenses.indexOf('ISC') > -1; // => true -spdx.licenses.indexOf('Apache-1.7') > -1; // => false -spdx.licenses.every(function(element) { - return typeof element === 'string'; -}); // => true - -Array.isArray(spdx.exceptions); // => true -spdx.exceptions.indexOf('GCC-exception-3.1') > -1; // => true -spdx.exceptions.every(function(element) { - return typeof element === 'string'; -}); // => true -``` - -Comparison ----------- -```js -spdx.gt('GPL-3.0', 'GPL-2.0'); // => true -spdx.lt('MPL-1.0', 'MPL-2.0'); // => true - -spdx.gt('LPPL-1.3a', 'LPPL-1.0'); // => true -spdx.gt('LPPL-1.3c', 'LPPL-1.3a'); // => true -spdx.gt('MIT', 'ISC'); // => false -spdx.gt('OSL-1.0', 'OPL-1.0'); // => false -spdx.gt('AGPL-3.0', 'AGPL-1.0'); // => true - -try { - spdx.gt('(MIT OR ISC)', 'GPL-3.0'); -} catch (error) { - error.message; // => '"(MIT OR ISC)" is not a simple license identifier' -} - -spdx.satisfies('MIT', 'MIT'); // => true -spdx.satisfies('MIT', '(ISC OR MIT)'); // => true -spdx.satisfies('Zlib', '(ISC OR (MIT OR Zlib))'); // => true -spdx.satisfies('GPL-3.0', '(ISC OR MIT)'); // => false -spdx.satisfies('GPL-2.0', 'GPL-2.0+'); // => true -spdx.satisfies('GPL-3.0', 'GPL-2.0+'); // => true -spdx.satisfies('GPL-1.0', 'GPL-2.0+'); // => false - -spdx.satisfies('GPL-2.0', 'GPL-2.0+ WITH Bison-exception-2.2'); // => false -spdx.satisfies( - 'GPL-3.0 WITH Bison-exception-2.2', 'GPL-2.0+ WITH Bison-exception-2.2' -); // => true - -spdx.satisfies('(MIT OR GPL-2.0)', '(ISC OR MIT)'); // => true -spdx.satisfies('(MIT AND GPL-2.0)', '(MIT OR GPL-2.0)'); // => true -spdx.satisfies('(MIT AND GPL-2.0)', '(ISC OR GPL-2.0)'); // => false -``` - -Version Metadata ----------------- -```js -spdx.specificationVersion; // => '2.0' -spdx.implementationVersion; // => package.version -``` - -The Specification ------------------ -[The Software Package Data Exchange (SPDX) specification](http://spdx.org) is the work of the [Linux Foundation](http://www.linuxfoundation.org) and its contributors, and is licensed under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. diff --git a/deps/npm/node_modules/spdx/package.json b/deps/npm/node_modules/spdx/package.json deleted file mode 100644 index d1601c60119e82..00000000000000 --- a/deps/npm/node_modules/spdx/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "spdx", - "description": "SPDX License Expression Syntax parser", - "version": "0.4.1", - "author": { - "name": "Kyle E. Mitchell", - "email": "kyle@kemitchell.com", - "url": "http://kemitchell.com" - }, - "bugs": { - "url": "https://github.com/kemitchell/spdx.js/issues" - }, - "dependencies": { - "spdx-license-ids": "^1.0.0" - }, - "devDependencies": { - "docco": "^0.7.0", - "fixpack": "^2.2.0", - "jison": "^0.4.15", - "jscs": "^1.12.0", - "jshint": "^2.7.0", - "jsmd": "^0.3.0" - }, - "homepage": "https://github.com/kemitchell/spdx.js", - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "Apache-2.0", - "main": "source/spdx.js", - "repository": { - "type": "git", - "url": "git+https://github.com/kemitchell/spdx.js.git" - }, - "scripts": { - "build": "node build/parser.js > source/parser.generated.js", - "doc": "docco --output documentation source/spdx.js", - "lint": "fixpack && jshint build source/spdx.js && jscs build source/spdx.js", - "precommit": "npm run lint && npm run test", - "prepublish": "npm run build", - "pretest": "npm run build", - "test": "jsmd README.md" - }, - "gitHead": "e98233f7ebfa27ceec7d9f9bd77d7eb003ca3210", - "_id": "spdx@0.4.1", - "_shasum": "eb43a2d83483e7073d24184b5ca0d00f33e184ff", - "_from": "spdx@>=0.4.0 <0.5.0", - "_npmVersion": "2.11.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - "maintainers": [ - { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - } - ], - "dist": { - "shasum": "eb43a2d83483e7073d24184b5ca0d00f33e184ff", - "tarball": "http://registry.npmjs.org/spdx/-/spdx-0.4.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/spdx/-/spdx-0.4.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/deps/npm/node_modules/spdx/source/exceptions.json b/deps/npm/node_modules/spdx/source/exceptions.json deleted file mode 100644 index d588a1af7e11f8..00000000000000 --- a/deps/npm/node_modules/spdx/source/exceptions.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - "Autoconf-exception-2.0", - "Autoconf-exception-3.0", - "Bison-exception-2.2", - "Classpath-exception-2.0", - "eCos-exception-2.0", - "Font-exception-2.0", - "GCC-exception-2.0", - "GCC-exception-3.1", - "WxWindows-exception-3.1" -] diff --git a/deps/npm/node_modules/spdx/source/parser.generated.js b/deps/npm/node_modules/spdx/source/parser.generated.js deleted file mode 100644 index 380609339cd77a..00000000000000 --- a/deps/npm/node_modules/spdx/source/parser.generated.js +++ /dev/null @@ -1,1255 +0,0 @@ -/* parser generated by jison 0.4.15 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var spdxparse = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, -productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: -return this.$ = $$[$0-1]; -break; -case 2: case 4: case 5: -this.$ = { license: yytext }; -break; -case 3: -this.$ = { license: $$[$0-1], plus: true }; -break; -case 6: -this.$ = $$[$0]; -break; -case 7: -this.$ = { exception: $$[$0] }; -this.$.license = $$[$0-2].license; -if ($$[$0-2].hasOwnProperty('plus')) { - this.$.plus = $$[$0-2].plus; -} -break; -case 8: -this.$ = { conjunction: 'and', left: $$[$0-2], right: $$[$0] }; -break; -case 9: -this.$ = { conjunction: 'or', left: $$[$0-2], right: $$[$0] }; -break; -case 10: -this.$ = $$[$0-1] -break; -} -}, -table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], -defaultActions: {8:[2,1]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - throw new Error(str); - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - _token_stack: - function lex() { - var token; - token = lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 5; -break; -case 1:/* skip whitespace */ -break; -case 2:return 8; -break; -case 3:return 16; -break; -case 4:return 17; -break; -case 5:return 11; -break; -case 6:return 10; -break; -case 7:return 9; -break; -case 8:return 14; -break; -case 9:return 15; -break; -case 10:return 12; -break; -case 11:return 7; -break; -case 12:return 7; -break; -case 13:return 7; -break; -case 14:return 7; -break; -case 15:return 7; -break; -case 16:return 7; -break; -case 17:return 7; -break; -case 18:return 7; -break; -case 19:return 7; -break; -case 20:return 7; -break; -case 21:return 7; -break; -case 22:return 7; -break; -case 23:return 7; -break; -case 24:return 7; -break; -case 25:return 7; -break; -case 26:return 7; -break; -case 27:return 7; -break; -case 28:return 7; -break; -case 29:return 7; -break; -case 30:return 7; -break; -case 31:return 7; -break; -case 32:return 7; -break; -case 33:return 7; -break; -case 34:return 7; -break; -case 35:return 7; -break; -case 36:return 7; -break; -case 37:return 7; -break; -case 38:return 7; -break; -case 39:return 7; -break; -case 40:return 7; -break; -case 41:return 7; -break; -case 42:return 7; -break; -case 43:return 7; -break; -case 44:return 7; -break; -case 45:return 7; -break; -case 46:return 7; -break; -case 47:return 7; -break; -case 48:return 7; -break; -case 49:return 7; -break; -case 50:return 7; -break; -case 51:return 7; -break; -case 52:return 7; -break; -case 53:return 7; -break; -case 54:return 7; -break; -case 55:return 7; -break; -case 56:return 7; -break; -case 57:return 7; -break; -case 58:return 7; -break; -case 59:return 7; -break; -case 60:return 7; -break; -case 61:return 7; -break; -case 62:return 7; -break; -case 63:return 7; -break; -case 64:return 7; -break; -case 65:return 7; -break; -case 66:return 7; -break; -case 67:return 7; -break; -case 68:return 7; -break; -case 69:return 7; -break; -case 70:return 7; -break; -case 71:return 7; -break; -case 72:return 7; -break; -case 73:return 7; -break; -case 74:return 7; -break; -case 75:return 7; -break; -case 76:return 7; -break; -case 77:return 7; -break; -case 78:return 7; -break; -case 79:return 7; -break; -case 80:return 7; -break; -case 81:return 7; -break; -case 82:return 7; -break; -case 83:return 7; -break; -case 84:return 7; -break; -case 85:return 7; -break; -case 86:return 7; -break; -case 87:return 7; -break; -case 88:return 7; -break; -case 89:return 7; -break; -case 90:return 7; -break; -case 91:return 7; -break; -case 92:return 7; -break; -case 93:return 7; -break; -case 94:return 7; -break; -case 95:return 7; -break; -case 96:return 7; -break; -case 97:return 7; -break; -case 98:return 7; -break; -case 99:return 7; -break; -case 100:return 7; -break; -case 101:return 7; -break; -case 102:return 7; -break; -case 103:return 7; -break; -case 104:return 7; -break; -case 105:return 7; -break; -case 106:return 7; -break; -case 107:return 7; -break; -case 108:return 7; -break; -case 109:return 7; -break; -case 110:return 7; -break; -case 111:return 7; -break; -case 112:return 7; -break; -case 113:return 7; -break; -case 114:return 7; -break; -case 115:return 7; -break; -case 116:return 7; -break; -case 117:return 7; -break; -case 118:return 7; -break; -case 119:return 7; -break; -case 120:return 7; -break; -case 121:return 7; -break; -case 122:return 7; -break; -case 123:return 7; -break; -case 124:return 7; -break; -case 125:return 7; -break; -case 126:return 7; -break; -case 127:return 7; -break; -case 128:return 7; -break; -case 129:return 7; -break; -case 130:return 7; -break; -case 131:return 7; -break; -case 132:return 7; -break; -case 133:return 7; -break; -case 134:return 7; -break; -case 135:return 7; -break; -case 136:return 7; -break; -case 137:return 7; -break; -case 138:return 7; -break; -case 139:return 7; -break; -case 140:return 7; -break; -case 141:return 7; -break; -case 142:return 7; -break; -case 143:return 7; -break; -case 144:return 7; -break; -case 145:return 7; -break; -case 146:return 7; -break; -case 147:return 7; -break; -case 148:return 7; -break; -case 149:return 7; -break; -case 150:return 7; -break; -case 151:return 7; -break; -case 152:return 7; -break; -case 153:return 7; -break; -case 154:return 7; -break; -case 155:return 7; -break; -case 156:return 7; -break; -case 157:return 7; -break; -case 158:return 7; -break; -case 159:return 7; -break; -case 160:return 7; -break; -case 161:return 7; -break; -case 162:return 7; -break; -case 163:return 7; -break; -case 164:return 7; -break; -case 165:return 7; -break; -case 166:return 7; -break; -case 167:return 7; -break; -case 168:return 7; -break; -case 169:return 7; -break; -case 170:return 7; -break; -case 171:return 7; -break; -case 172:return 7; -break; -case 173:return 7; -break; -case 174:return 7; -break; -case 175:return 7; -break; -case 176:return 7; -break; -case 177:return 7; -break; -case 178:return 7; -break; -case 179:return 7; -break; -case 180:return 7; -break; -case 181:return 7; -break; -case 182:return 7; -break; -case 183:return 7; -break; -case 184:return 7; -break; -case 185:return 7; -break; -case 186:return 7; -break; -case 187:return 7; -break; -case 188:return 7; -break; -case 189:return 7; -break; -case 190:return 7; -break; -case 191:return 7; -break; -case 192:return 7; -break; -case 193:return 7; -break; -case 194:return 7; -break; -case 195:return 7; -break; -case 196:return 7; -break; -case 197:return 7; -break; -case 198:return 7; -break; -case 199:return 7; -break; -case 200:return 7; -break; -case 201:return 7; -break; -case 202:return 7; -break; -case 203:return 7; -break; -case 204:return 7; -break; -case 205:return 7; -break; -case 206:return 7; -break; -case 207:return 7; -break; -case 208:return 7; -break; -case 209:return 7; -break; -case 210:return 7; -break; -case 211:return 7; -break; -case 212:return 7; -break; -case 213:return 7; -break; -case 214:return 7; -break; -case 215:return 7; -break; -case 216:return 7; -break; -case 217:return 7; -break; -case 218:return 7; -break; -case 219:return 7; -break; -case 220:return 7; -break; -case 221:return 7; -break; -case 222:return 7; -break; -case 223:return 7; -break; -case 224:return 7; -break; -case 225:return 7; -break; -case 226:return 7; -break; -case 227:return 7; -break; -case 228:return 7; -break; -case 229:return 7; -break; -case 230:return 7; -break; -case 231:return 7; -break; -case 232:return 7; -break; -case 233:return 7; -break; -case 234:return 7; -break; -case 235:return 7; -break; -case 236:return 7; -break; -case 237:return 7; -break; -case 238:return 7; -break; -case 239:return 7; -break; -case 240:return 7; -break; -case 241:return 7; -break; -case 242:return 7; -break; -case 243:return 7; -break; -case 244:return 7; -break; -case 245:return 7; -break; -case 246:return 7; -break; -case 247:return 7; -break; -case 248:return 7; -break; -case 249:return 7; -break; -case 250:return 7; -break; -case 251:return 7; -break; -case 252:return 7; -break; -case 253:return 7; -break; -case 254:return 7; -break; -case 255:return 7; -break; -case 256:return 7; -break; -case 257:return 7; -break; -case 258:return 7; -break; -case 259:return 7; -break; -case 260:return 7; -break; -case 261:return 7; -break; -case 262:return 7; -break; -case 263:return 7; -break; -case 264:return 7; -break; -case 265:return 7; -break; -case 266:return 7; -break; -case 267:return 7; -break; -case 268:return 7; -break; -case 269:return 7; -break; -case 270:return 7; -break; -case 271:return 7; -break; -case 272:return 7; -break; -case 273:return 7; -break; -case 274:return 7; -break; -case 275:return 7; -break; -case 276:return 7; -break; -case 277:return 7; -break; -case 278:return 7; -break; -case 279:return 7; -break; -case 280:return 7; -break; -case 281:return 7; -break; -case 282:return 7; -break; -case 283:return 7; -break; -case 284:return 7; -break; -case 285:return 7; -break; -case 286:return 7; -break; -case 287:return 7; -break; -case 288:return 7; -break; -case 289:return 7; -break; -case 290:return 7; -break; -case 291:return 7; -break; -case 292:return 7; -break; -case 293:return 7; -break; -case 294:return 7; -break; -case 295:return 7; -break; -case 296:return 7; -break; -case 297:return 7; -break; -case 298:return 7; -break; -case 299:return 7; -break; -case 300:return 7; -break; -case 301:return 7; -break; -case 302:return 7; -break; -case 303:return 7; -break; -case 304:return 7; -break; -case 305:return 7; -break; -case 306:return 7; -break; -case 307:return 7; -break; -case 308:return 13; -break; -case 309:return 13; -break; -case 310:return 13; -break; -case 311:return 13; -break; -case 312:return 13; -break; -case 313:return 13; -break; -case 314:return 13; -break; -case 315:return 13; -break; -case 316:return 13; -break; -} -}, -rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:Glide)/,/^(?:Abstyles)/,/^(?:AFL-1.1)/,/^(?:AFL-1.2)/,/^(?:AFL-2.0)/,/^(?:AFL-2.1)/,/^(?:AFL-3.0)/,/^(?:AMPAS)/,/^(?:APL-1.0)/,/^(?:Adobe-Glyph)/,/^(?:APAFML)/,/^(?:Adobe-2006)/,/^(?:AGPL-1.0)/,/^(?:Afmparse)/,/^(?:Aladdin)/,/^(?:ADSL)/,/^(?:AMDPLPA)/,/^(?:ANTLR-PD)/,/^(?:Apache-1.0)/,/^(?:Apache-1.1)/,/^(?:Apache-2.0)/,/^(?:AML)/,/^(?:APSL-1.0)/,/^(?:APSL-1.1)/,/^(?:APSL-1.2)/,/^(?:APSL-2.0)/,/^(?:Artistic-1.0)/,/^(?:Artistic-1.0-Perl)/,/^(?:Artistic-1.0-cl8)/,/^(?:Artistic-2.0)/,/^(?:AAL)/,/^(?:Bahyph)/,/^(?:Barr)/,/^(?:Beerware)/,/^(?:BitTorrent-1.0)/,/^(?:BitTorrent-1.1)/,/^(?:BSL-1.0)/,/^(?:Borceux)/,/^(?:BSD-2-Clause)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:BSD-3-Clause)/,/^(?:BSD-3-Clause-Clear)/,/^(?:BSD-4-Clause)/,/^(?:BSD-Protection)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:BSD-4-Clause-UC)/,/^(?:bzip2-1.0.5)/,/^(?:bzip2-1.0.6)/,/^(?:Caldera)/,/^(?:CECILL-1.0)/,/^(?:CECILL-1.1)/,/^(?:CECILL-2.0)/,/^(?:CECILL-B)/,/^(?:CECILL-C)/,/^(?:ClArtistic)/,/^(?:MIT-CMU)/,/^(?:CNRI-Jython)/,/^(?:CNRI-Python)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:CPOL-1.02)/,/^(?:CDDL-1.0)/,/^(?:CDDL-1.1)/,/^(?:CPAL-1.0)/,/^(?:CPL-1.0)/,/^(?:CATOSL-1.1)/,/^(?:Condor-1.1)/,/^(?:CC-BY-1.0)/,/^(?:CC-BY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/^(?:Unicode-TOU)/,/^(?:UPL-1.0)/,/^(?:NCSA)/,/^(?:Vim)/,/^(?:VOSTROM)/,/^(?:VSL-1.0)/,/^(?:W3C-19980720)/,/^(?:W3C)/,/^(?:Wsuipa)/,/^(?:Xnet)/,/^(?:X11)/,/^(?:Xerox)/,/^(?:XFree86-1.1)/,/^(?:xinetd)/,/^(?:xpp)/,/^(?:XSkat)/,/^(?:YPL-1.0)/,/^(?:YPL-1.1)/,/^(?:Zed)/,/^(?:Zend-2.0)/,/^(?:Zimbra-1.3)/,/^(?:Zimbra-1.4)/,/^(?:Zlib)/,/^(?:zlib-acknowledgement)/,/^(?:ZPL-1.1)/,/^(?:ZPL-2.0)/,/^(?:ZPL-2.1)/,/^(?:Autoconf-exception-2.0)/,/^(?:Autoconf-exception-3.0)/,/^(?:Bison-exception-2.2)/,/^(?:Classpath-exception-2.0)/,/^(?:eCos-exception-2.0)/,/^(?:Font-exception-2.0)/,/^(?:GCC-exception-2.0)/,/^(?:GCC-exception-3.1)/,/^(?:WxWindows-exception-3.1)/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = spdxparse; -exports.Parser = spdxparse.Parser; -exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} diff --git a/deps/npm/node_modules/spdx/source/ranges.json b/deps/npm/node_modules/spdx/source/ranges.json deleted file mode 100644 index 1f3c52b3e194dd..00000000000000 --- a/deps/npm/node_modules/spdx/source/ranges.json +++ /dev/null @@ -1,194 +0,0 @@ -[ - [ - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0" - ], - [ - "AGPL-1.0", - "AGPL-3.0" - ], - [ - "Apache-1.0", - "Apache-1.1", - "Apache-2.0" - ], - [ - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0" - ], - [ - "Artistic-1.0", - "Artistic-2.0" - ], - [ - "BitTorrent-1.0", - "BitTorrent-1.1" - ], - [ - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-4.0" - ], - [ - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-4.0" - ], - [ - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-ND-3.0", - "CC-BY-NC-ND-4.0" - ], - [ - "CC-BY-NC-SA-1.0", - "CC-BY-NC-SA-2.0", - "CC-BY-NC-SA-2.5", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-4.0" - ], - [ - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-ND-4.0" - ], - [ - "CC-BY-SA-1.0", - "CC-BY-SA-2.0", - "CC-BY-SA-2.5", - "CC-BY-SA-3.0", - "CC-BY-SA-4.0" - ], - [ - "CDDL-1.0", - "CDDL-1.1" - ], - [ - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0" - ], - [ - "ECL-1.0", - "ECL-2.0" - ], - [ - "EFL-1.0", - "EFL-2.0" - ], - [ - "EUPL-1.0", - "EUPL-1.1" - ], - [ - "GFDL-1.1", - "GFDL-1.2", - "GFDL-1.3" - ], - [ - "GPL-1.0", - "GPL-2.0", - "GPL-3.0" - ], - [ - "LGPL-2.0", - "LGPL-2.1", - "LGPL-3.0" - ], - [ - "LPL-1.0", - "LPL-1.02" - ], - [ - "LPPL-1.0", - "LPPL-1.1", - "LPPL-1.2", - "LPPL-1.3a", - "LPPL-1.3c" - ], - [ - "MPL-1.0", - "MPL-1.1", - "MPL-2.0" - ], - [ - "MPL-1.0", - "MPL-1.1", - "MPL-2.0-no-copyleft-exception" - ], - [ - "NPL-1.0", - "NPL-1.1" - ], - [ - "OFL-1.0", - "OFL-1.1" - ], - [ - "OLDAP-1.1", - "OLDAP-1.2", - "OLDAP-1.3", - "OLDAP-1.4", - "OLDAP-2.0", - "OLDAP-2.0.1", - "OLDAP-2.1", - "OLDAP-2.2", - "OLDAP-2.2.1", - "OLDAP-2.2.2", - "OLDAP-2.3", - "OLDAP-2.4", - "OLDAP-2.5", - "OLDAP-2.6", - "OLDAP-2.7", - "OLDAP-2.8" - ], - [ - "OSL-1.0", - "OSL-1.1", - "OSL-2.0", - "OSL-2.1", - "OSL-3.0" - ], - [ - "PHP-3.0", - "PHP-3.01" - ], - [ - "RPL-1.1", - "RPL-1.5" - ], - [ - "SGI-B-1.0", - "SGI-B-1.1", - "SGI-B-2.0" - ], - [ - "YPL-1.0", - "YPL-1.1" - ], - [ - "ZPL-1.1", - "ZPL-2.0", - "ZPL-2.1" - ], - [ - "Zimbra-1.3", - "Zimbra-1.4" - ], - [ - "bzip2-1.0.5", - "bzip2-1.0.6" - ] -] diff --git a/deps/npm/node_modules/spdx/source/spdx.js b/deps/npm/node_modules/spdx/source/spdx.js deleted file mode 100644 index 5aece3d5437511..00000000000000 --- a/deps/npm/node_modules/spdx/source/spdx.js +++ /dev/null @@ -1,161 +0,0 @@ -// spdx.js -// ======= -// SPDX License Expression Syntax parser - -// Validation -// ---------- - -// Require the generated parser. -var parser = require('./parser.generated.js').parser; - -exports.parse = function(argument) { - return parser.parse(argument); -}; - -var containsRepeatedSpace = /\s{2,}/; - -exports.valid = function(argument) { - if ( - argument.trim() !== argument || - containsRepeatedSpace.test(argument) - ) { - return false; - } - try { - parser.parse(argument); - return true; - } catch (e) { - // jison generates parsers that throw errors, while this function - // mimics `semver.valid` by returning null. - return null; - } -}; - -// Comparison -// ---------- - -var ranges = require('./ranges.json'); - -var notALicenseIdentifier = ' is not a simple license identifier'; - -var rangeComparison = function(comparison) { - return function(first, second) { - var firstAST = exports.parse(first); - if (!firstAST.hasOwnProperty('license')) { - throw new Error('"' + first + '"' + notALicenseIdentifier); - } - var secondAST = exports.parse(second); - if (!secondAST.hasOwnProperty('license')) { - throw new Error('"' + second + '"' + notALicenseIdentifier); - } - return ranges.some(function(range) { - var indexOfFirst = range.indexOf(firstAST.license); - if (indexOfFirst < 0) { - return false; - } - var indexOfSecond = range.indexOf(secondAST.license); - if (indexOfSecond < 0) { - return false; - } - return comparison(indexOfFirst, indexOfSecond); - }); - }; -}; - -exports.gt = rangeComparison(function(first, second) { - return first > second; -}); - -exports.lt = rangeComparison(function(first, second) { - return first < second; -}); - -exports.satisfies = (function() { - var rangesAreCompatible = function(first, second) { - return ( - first.license === second.license || - ranges.some(function(range) { - return ( - range.indexOf(first.license) > -1 && - range.indexOf(second.license) - ); - }) - ); - }; - - var identifierInRange = function(identifier, range) { - return ( - identifier.license === range.license || - exports.gt(identifier.license, range.license) - ); - }; - - var licensesAreCompatible = function(first, second) { - if (first.exception !== second.exception) { - return false; - } else if (second.hasOwnProperty('license')) { - if (second.hasOwnProperty('plus')) { - if (first.hasOwnProperty('plus')) { - // first+, second+ - return rangesAreCompatible(first, second); - } else { - // first, second+ - return identifierInRange(first, second); - } - } else { - if (first.hasOwnProperty('plus')) { - // first+, second - return identifierInRange(second, first); - } else { - // first, second - return first.license === second.license; - } - } - } - }; - - var recurseLeftAndRight = function(first, second) { - var firstConjunction = first.conjunction; - if (firstConjunction === 'and') { - return ( - recurse(first.left, second) && - recurse(first.right, second) - ); - } else if (firstConjunction === 'or') { - return ( - recurse(first.left, second) || - recurse(first.right, second) - ); - } - }; - - var recurse = function(first, second) { - if (first.hasOwnProperty('conjunction')) { - return recurseLeftAndRight(first, second); - } else if (second.hasOwnProperty('conjunction')) { - return recurseLeftAndRight(second, first); - } else { - return licensesAreCompatible(first, second); - } - }; - - return function(first, second) { - return recurse(parser.parse(first), parser.parse(second)); - }; -})(); - -// Reference Data -// -------------- - -// Require the same license and exception data used by the parser. -exports.licenses = require('spdx-license-ids'); -exports.exceptions = require('./exceptions.json'); - -// Version Metadata -// ---------------- - -// The License Expression Syntax version -exports.specificationVersion = '2.0'; - -// This module's semantic version -exports.implementationVersion = '0.4.1'; diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/LICENSE b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/LICENSE new file mode 100644 index 00000000000000..4b54239b2e6f94 --- /dev/null +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/LICENSE @@ -0,0 +1,57 @@ +SPDX:Apache-2.0 + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json index f1a85e2ea38e0c..1fcb730362e6a7 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json @@ -1,7 +1,7 @@ { "name": "spdx-correct", "description": "correct invalid SPDX identifiers", - "version": "1.0.1", + "version": "1.0.2", "author": { "name": "Kyle E. Mitchell", "email": "kyle@kemitchell.com", @@ -31,23 +31,23 @@ "scripts": { "test": "defence README.md | replace-require-self | node && tape *.test.js" }, - "gitHead": "f3581dea1529d975851ceab7f86e646d8220608a", + "gitHead": "8430a3ad521e1455208db33faafcb79c7b074236", "bugs": { "url": "https://github.com/kemitchell/spdx-correct.js/issues" }, "homepage": "https://github.com/kemitchell/spdx-correct.js#readme", - "_id": "spdx-correct@1.0.1", - "_shasum": "ac075f5f2f6a06c0bfdd1c847eb3dde3dd8221ea", + "_id": "spdx-correct@1.0.2", + "_shasum": "4b3073d933ff51f3912f03ac5519498a4150db40", "_from": "spdx-correct@>=1.0.0 <1.1.0", - "_npmVersion": "2.13.5", - "_nodeVersion": "0.12.7", + "_npmVersion": "3.3.6", + "_nodeVersion": "4.2.1", "_npmUser": { "name": "kemitchell", "email": "kyle@kemitchell.com" }, "dist": { - "shasum": "ac075f5f2f6a06c0bfdd1c847eb3dde3dd8221ea", - "tarball": "http://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.1.tgz" + "shasum": "4b3073d933ff51f3912f03ac5519498a4150db40", + "tarball": "http://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz" }, "maintainers": [ { @@ -60,5 +60,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.1.tgz" + "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE index 442142822dd18a..51a8d6bf05d26c 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE @@ -1,11 +1,9 @@ -SPDX:MIT +The MIT License -MIT License +Copyright (c) 2015 Kyle E. Mitchell and other contributors -Copyright (c) 2015 Kyle E. Mitchell - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the +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 @@ -15,8 +13,8 @@ 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 +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, diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/README.md b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/README.md index 897aa43f33eda4..4b96d3e2a9e97d 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/README.md +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/README.md @@ -1,5 +1,5 @@ ```javascript -var parse = require('./') +var parse = require('spdx-expression-parse') var assert = require('assert') var firstAST = { @@ -27,6 +27,16 @@ var secondAST = { assert.deepEqual( parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), secondAST) + +// We handle all the bare SPDX license and exception ids as well. +require('spdx-license-ids').forEach(function(id) { + assert.deepEqual( + parse(id), + { license: id }) + require('spdx-exceptions').forEach(function(e) { + assert.deepEqual( + parse(id + ' WITH ' + e), + { license: id, exception: e }) }) }) ``` --- diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/.npmignore b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/.npmignore deleted file mode 100644 index 5825067776c896..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.npmiginore -.travis.yml diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/LICENSE.md b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/LICENSE.md deleted file mode 100644 index 6c255589566ffe..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell - -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/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/README.md b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/README.md index ef377325ee1e74..43a663723df002 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/README.md +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/README.md @@ -1,13 +1 @@ -```javascript -var assert = require('assert') -var spdxExceptions = require('spdx-exceptions') - -assert(Array.isArray(spdxExceptions)) - -assert(spdxExceptions.length > 0) - -function isString(x) { - return typeof x === 'string' } - -assert(spdxExceptions.every(isString)) -``` +The package exports an array of strings. diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/index.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/index.json index dd9277891ec266..3b84277baad0c8 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/index.json +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/index.json @@ -1,24 +1,24 @@ [ "389-exception", - "Autoconf-exception-2.0 ", - "Autoconf-exception-3.0 ", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", "Bison-exception-2.2", "CLISP-exception-2.0", "Classpath-exception-2.0", - "FLTK-exception ", - "FLTK-exception-2.0 ", - "Font-exception-2.0 ", + "FLTK-exception", + "FLTK-exception-2.0", + "Font-exception-2.0", "GCC-exception-2.0", "GCC-exception-3.1", - "LZMA-exception ", + "LZMA-exception", "Libtool-exception", - "Nokia-Qt-exception-1.1 ", + "Nokia-Qt-exception-1.1", "Qwt-exception-1.0", "WxWindows-exception-3.1", - "eCos-exception-2.0 ", - "freertos-exception-2.0 ", - "gnu-javamail-exception ", - "i2p-gpl-java-exception ", + "eCos-exception-2.0", + "freertos-exception-2.0", + "gnu-javamail-exception", + "i2p-gpl-java-exception", "mif-exception", - "u-boot-exception-2.0 " + "u-boot-exception-2.0" ] diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/package.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/package.json index 08249989340112..734aafb5b39fc5 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/package.json +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/package.json @@ -1,7 +1,7 @@ { "name": "spdx-exceptions", "description": "list of SPDX standard license exceptions", - "version": "1.0.2", + "version": "1.0.4", "author": { "name": "The Linux Foundation" }, @@ -12,34 +12,29 @@ "url": "https://kemitchell.com/" } ], - "devDependencies": { - "defence-cli": "^1.0.1" - }, "license": "CC-BY-3.0", "repository": { "type": "git", - "url": "git+https://github.com/kemitchell/spdx-exceptions.js.git" - }, - "scripts": { - "test": "defence -i javascript README.md | sed 's!spdx-exceptions!./!' | node" + "url": "git+https://github.com/kemitchell/spdx-exceptions.json.git" }, - "gitHead": "a1e7b0595efee0e4436e9807dd36280791e44c82", + "gitHead": "770316d6c946417ab6efa8533b82d0b61779092b", "bugs": { - "url": "https://github.com/kemitchell/spdx-exceptions.js/issues" + "url": "https://github.com/kemitchell/spdx-exceptions.json/issues" }, - "homepage": "https://github.com/kemitchell/spdx-exceptions.js#readme", - "_id": "spdx-exceptions@1.0.2", - "_shasum": "c584a2875a1db1c8743266990af6e0c82e143a5b", - "_from": "spdx-exceptions@>=1.0.0 <2.0.0", - "_npmVersion": "2.13.3", - "_nodeVersion": "0.12.7", + "homepage": "https://github.com/kemitchell/spdx-exceptions.json#readme", + "_id": "spdx-exceptions@1.0.4", + "scripts": {}, + "_shasum": "220b84239119ae9045a892db81a83f4ce16f80fd", + "_from": "spdx-exceptions@>=1.0.4 <2.0.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "kemitchell", "email": "kyle@kemitchell.com" }, "dist": { - "shasum": "c584a2875a1db1c8743266990af6e0c82e143a5b", - "tarball": "http://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.2.tgz" + "shasum": "220b84239119ae9045a892db81a83f4ce16f80fd", + "tarball": "http://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.4.tgz" }, "maintainers": [ { @@ -48,5 +43,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.2.tgz" + "_resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json index e38d0b5a9671c1..662d8b47e60640 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json @@ -1,19 +1,21 @@ { "name": "spdx-expression-parse", "description": "parse SPDX license expressions", - "version": "1.0.0", + "version": "1.0.2", "author": { "name": "Kyle E. Mitchell", "email": "kyle@kemitchell.com", "url": "http://kemitchell.com" }, "dependencies": { - "spdx-exceptions": "^1.0.0", + "spdx-exceptions": "^1.0.4", "spdx-license-ids": "^1.0.0" }, "devDependencies": { "defence-cli": "^1.0.1", - "jison": "^0.4.15" + "jison": "^0.4.15", + "replace-require-self": "^1.0.0", + "uglify-js": "^2.4.24" }, "keywords": [ "SPDX", @@ -31,28 +33,27 @@ "url": "git+https://github.com/kemitchell/spdx-expression-parse.js.git" }, "scripts": { - "generate": "node generate-parser.js > parser.generated.js", - "prepublish": "npm run generate", - "pretest": "npm run generate", - "test": "defence -i javascript README.md | node" + "prepublish": "node generate-parser.js | uglifyjs > parser.generated.js", + "pretest": "npm run prepublish", + "test": "defence -i javascript README.md | replace-require-self | node" }, - "gitHead": "213bc03808f709a4ceaadb8466740a8c96c1e896", + "gitHead": "ffe2fa7272ebf640b18286fc561f17a844d4f06b", "bugs": { "url": "https://github.com/kemitchell/spdx-expression-parse.js/issues" }, "homepage": "https://github.com/kemitchell/spdx-expression-parse.js#readme", - "_id": "spdx-expression-parse@1.0.0", - "_shasum": "4fbb7e738c9e98fa0b0914dfd961ac6629fbcdef", + "_id": "spdx-expression-parse@1.0.2", + "_shasum": "d52b14b5e9670771440af225bcb563122ac452f6", "_from": "spdx-expression-parse@>=1.0.0 <1.1.0", - "_npmVersion": "2.13.3", - "_nodeVersion": "0.12.7", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", "_npmUser": { "name": "kemitchell", "email": "kyle@kemitchell.com" }, "dist": { - "shasum": "4fbb7e738c9e98fa0b0914dfd961ac6629fbcdef", - "tarball": "http://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.0.tgz" + "shasum": "d52b14b5e9670771440af225bcb563122ac452f6", + "tarball": "http://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.2.tgz" }, "maintainers": [ { @@ -61,5 +62,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.2.tgz" } diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js index 59747a3cf8735c..7d9665a86b2d28 100644 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js +++ b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js @@ -1,1289 +1 @@ -/* parser generated by jison 0.4.15 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var spdxparse = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, -productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: -return this.$ = $$[$0-1]; -break; -case 2: case 4: case 5: -this.$ = { license: yytext }; -break; -case 3: -this.$ = { license: $$[$0-1], plus: true }; -break; -case 6: -this.$ = $$[$0]; -break; -case 7: -this.$ = { exception: $$[$0] }; -this.$.license = $$[$0-2].license; -if ($$[$0-2].hasOwnProperty('plus')) { - this.$.plus = $$[$0-2].plus; -} -break; -case 8: -this.$ = { conjunction: 'and', left: $$[$0-2], right: $$[$0] }; -break; -case 9: -this.$ = { conjunction: 'or', left: $$[$0-2], right: $$[$0] }; -break; -case 10: -this.$ = $$[$0-1] -break; -} -}, -table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], -defaultActions: {8:[2,1]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - throw new Error(str); - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - _token_stack: - function lex() { - var token; - token = lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 5; -break; -case 1:/* skip whitespace */ -break; -case 2:return 8; -break; -case 3:return 16; -break; -case 4:return 17; -break; -case 5:return 11; -break; -case 6:return 10; -break; -case 7:return 9; -break; -case 8:return 14; -break; -case 9:return 15; -break; -case 10:return 12; -break; -case 11:return 7 -break; -case 12:return 7 -break; -case 13:return 7 -break; -case 14:return 7 -break; -case 15:return 7 -break; -case 16:return 7 -break; -case 17:return 7 -break; -case 18:return 7 -break; -case 19:return 7 -break; -case 20:return 7 -break; -case 21:return 7 -break; -case 22:return 7 -break; -case 23:return 7 -break; -case 24:return 7 -break; -case 25:return 7 -break; -case 26:return 7 -break; -case 27:return 7 -break; -case 28:return 7 -break; -case 29:return 7 -break; -case 30:return 7 -break; -case 31:return 7 -break; -case 32:return 7 -break; -case 33:return 7 -break; -case 34:return 7 -break; -case 35:return 7 -break; -case 36:return 7 -break; -case 37:return 7 -break; -case 38:return 7 -break; -case 39:return 7 -break; -case 40:return 7 -break; -case 41:return 7 -break; -case 42:return 7 -break; -case 43:return 7 -break; -case 44:return 7 -break; -case 45:return 7 -break; -case 46:return 7 -break; -case 47:return 7 -break; -case 48:return 7 -break; -case 49:return 7 -break; -case 50:return 7 -break; -case 51:return 7 -break; -case 52:return 7 -break; -case 53:return 7 -break; -case 54:return 7 -break; -case 55:return 7 -break; -case 56:return 7 -break; -case 57:return 7 -break; -case 58:return 7 -break; -case 59:return 7 -break; -case 60:return 7 -break; -case 61:return 7 -break; -case 62:return 7 -break; -case 63:return 7 -break; -case 64:return 7 -break; -case 65:return 7 -break; -case 66:return 7 -break; -case 67:return 7 -break; -case 68:return 7 -break; -case 69:return 7 -break; -case 70:return 7 -break; -case 71:return 7 -break; -case 72:return 7 -break; -case 73:return 7 -break; -case 74:return 7 -break; -case 75:return 7 -break; -case 76:return 7 -break; -case 77:return 7 -break; -case 78:return 7 -break; -case 79:return 7 -break; -case 80:return 7 -break; -case 81:return 7 -break; -case 82:return 7 -break; -case 83:return 7 -break; -case 84:return 7 -break; -case 85:return 7 -break; -case 86:return 7 -break; -case 87:return 7 -break; -case 88:return 7 -break; -case 89:return 7 -break; -case 90:return 7 -break; -case 91:return 7 -break; -case 92:return 7 -break; -case 93:return 7 -break; -case 94:return 7 -break; -case 95:return 7 -break; -case 96:return 7 -break; -case 97:return 7 -break; -case 98:return 7 -break; -case 99:return 7 -break; -case 100:return 7 -break; -case 101:return 7 -break; -case 102:return 7 -break; -case 103:return 7 -break; -case 104:return 7 -break; -case 105:return 7 -break; -case 106:return 7 -break; -case 107:return 7 -break; -case 108:return 7 -break; -case 109:return 7 -break; -case 110:return 7 -break; -case 111:return 7 -break; -case 112:return 7 -break; -case 113:return 7 -break; -case 114:return 7 -break; -case 115:return 7 -break; -case 116:return 7 -break; -case 117:return 7 -break; -case 118:return 7 -break; -case 119:return 7 -break; -case 120:return 7 -break; -case 121:return 7 -break; -case 122:return 7 -break; -case 123:return 7 -break; -case 124:return 7 -break; -case 125:return 7 -break; -case 126:return 7 -break; -case 127:return 7 -break; -case 128:return 7 -break; -case 129:return 7 -break; -case 130:return 7 -break; -case 131:return 7 -break; -case 132:return 7 -break; -case 133:return 7 -break; -case 134:return 7 -break; -case 135:return 7 -break; -case 136:return 7 -break; -case 137:return 7 -break; -case 138:return 7 -break; -case 139:return 7 -break; -case 140:return 7 -break; -case 141:return 7 -break; -case 142:return 7 -break; -case 143:return 7 -break; -case 144:return 7 -break; -case 145:return 7 -break; -case 146:return 7 -break; -case 147:return 7 -break; -case 148:return 7 -break; -case 149:return 7 -break; -case 150:return 7 -break; -case 151:return 7 -break; -case 152:return 7 -break; -case 153:return 7 -break; -case 154:return 7 -break; -case 155:return 7 -break; -case 156:return 7 -break; -case 157:return 7 -break; -case 158:return 7 -break; -case 159:return 7 -break; -case 160:return 7 -break; -case 161:return 7 -break; -case 162:return 7 -break; -case 163:return 7 -break; -case 164:return 7 -break; -case 165:return 7 -break; -case 166:return 7 -break; -case 167:return 7 -break; -case 168:return 7 -break; -case 169:return 7 -break; -case 170:return 7 -break; -case 171:return 7 -break; -case 172:return 7 -break; -case 173:return 7 -break; -case 174:return 7 -break; -case 175:return 7 -break; -case 176:return 7 -break; -case 177:return 7 -break; -case 178:return 7 -break; -case 179:return 7 -break; -case 180:return 7 -break; -case 181:return 7 -break; -case 182:return 7 -break; -case 183:return 7 -break; -case 184:return 7 -break; -case 185:return 7 -break; -case 186:return 7 -break; -case 187:return 7 -break; -case 188:return 7 -break; -case 189:return 7 -break; -case 190:return 7 -break; -case 191:return 7 -break; -case 192:return 7 -break; -case 193:return 7 -break; -case 194:return 7 -break; -case 195:return 7 -break; -case 196:return 7 -break; -case 197:return 7 -break; -case 198:return 7 -break; -case 199:return 7 -break; -case 200:return 7 -break; -case 201:return 7 -break; -case 202:return 7 -break; -case 203:return 7 -break; -case 204:return 7 -break; -case 205:return 7 -break; -case 206:return 7 -break; -case 207:return 7 -break; -case 208:return 7 -break; -case 209:return 7 -break; -case 210:return 7 -break; -case 211:return 7 -break; -case 212:return 7 -break; -case 213:return 7 -break; -case 214:return 7 -break; -case 215:return 7 -break; -case 216:return 7 -break; -case 217:return 7 -break; -case 218:return 7 -break; -case 219:return 7 -break; -case 220:return 7 -break; -case 221:return 7 -break; -case 222:return 7 -break; -case 223:return 7 -break; -case 224:return 7 -break; -case 225:return 7 -break; -case 226:return 7 -break; -case 227:return 7 -break; -case 228:return 7 -break; -case 229:return 7 -break; -case 230:return 7 -break; -case 231:return 7 -break; -case 232:return 7 -break; -case 233:return 7 -break; -case 234:return 7 -break; -case 235:return 7 -break; -case 236:return 7 -break; -case 237:return 7 -break; -case 238:return 7 -break; -case 239:return 7 -break; -case 240:return 7 -break; -case 241:return 7 -break; -case 242:return 7 -break; -case 243:return 7 -break; -case 244:return 7 -break; -case 245:return 7 -break; -case 246:return 7 -break; -case 247:return 7 -break; -case 248:return 7 -break; -case 249:return 7 -break; -case 250:return 7 -break; -case 251:return 7 -break; -case 252:return 7 -break; -case 253:return 7 -break; -case 254:return 7 -break; -case 255:return 7 -break; -case 256:return 7 -break; -case 257:return 7 -break; -case 258:return 7 -break; -case 259:return 7 -break; -case 260:return 7 -break; -case 261:return 7 -break; -case 262:return 7 -break; -case 263:return 7 -break; -case 264:return 7 -break; -case 265:return 7 -break; -case 266:return 7 -break; -case 267:return 7 -break; -case 268:return 7 -break; -case 269:return 7 -break; -case 270:return 7 -break; -case 271:return 7 -break; -case 272:return 7 -break; -case 273:return 7 -break; -case 274:return 7 -break; -case 275:return 7 -break; -case 276:return 7 -break; -case 277:return 7 -break; -case 278:return 7 -break; -case 279:return 7 -break; -case 280:return 7 -break; -case 281:return 7 -break; -case 282:return 7 -break; -case 283:return 7 -break; -case 284:return 7 -break; -case 285:return 7 -break; -case 286:return 7 -break; -case 287:return 7 -break; -case 288:return 7 -break; -case 289:return 7 -break; -case 290:return 7 -break; -case 291:return 7 -break; -case 292:return 7 -break; -case 293:return 7 -break; -case 294:return 7 -break; -case 295:return 7 -break; -case 296:return 7 -break; -case 297:return 7 -break; -case 298:return 7 -break; -case 299:return 7 -break; -case 300:return 7 -break; -case 301:return 7 -break; -case 302:return 7 -break; -case 303:return 7 -break; -case 304:return 7 -break; -case 305:return 7 -break; -case 306:return 7 -break; -case 307:return 7 -break; -case 308:return 7 -break; -case 309:return 7 -break; -case 310:return 7 -break; -case 311:return 7 -break; -case 312:return 13 -break; -case 313:return 13 -break; -case 314:return 13 -break; -case 315:return 13 -break; -case 316:return 13 -break; -case 317:return 13 -break; -case 318:return 13 -break; -case 319:return 13 -break; -case 320:return 13 -break; -case 321:return 13 -break; -case 322:return 13 -break; -case 323:return 13 -break; -case 324:return 13 -break; -case 325:return 13 -break; -case 326:return 13 -break; -case 327:return 13 -break; -case 328:return 13 -break; -case 329:return 13 -break; -case 330:return 13 -break; -case 331:return 13 -break; -case 332:return 13 -break; -case 333:return 13 -break; -} -}, -rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:Glide)/,/^(?:Abstyles)/,/^(?:AFL-1.1)/,/^(?:AFL-1.2)/,/^(?:AFL-2.0)/,/^(?:AFL-2.1)/,/^(?:AFL-3.0)/,/^(?:AMPAS)/,/^(?:APL-1.0)/,/^(?:Adobe-Glyph)/,/^(?:APAFML)/,/^(?:Adobe-2006)/,/^(?:AGPL-1.0)/,/^(?:Afmparse)/,/^(?:Aladdin)/,/^(?:ADSL)/,/^(?:AMDPLPA)/,/^(?:ANTLR-PD)/,/^(?:Apache-1.0)/,/^(?:Apache-1.1)/,/^(?:Apache-2.0)/,/^(?:AML)/,/^(?:APSL-1.0)/,/^(?:APSL-1.1)/,/^(?:APSL-1.2)/,/^(?:APSL-2.0)/,/^(?:Artistic-1.0)/,/^(?:Artistic-1.0-Perl)/,/^(?:Artistic-1.0-cl8)/,/^(?:Artistic-2.0)/,/^(?:AAL)/,/^(?:Bahyph)/,/^(?:Barr)/,/^(?:Beerware)/,/^(?:BitTorrent-1.0)/,/^(?:BitTorrent-1.1)/,/^(?:BSL-1.0)/,/^(?:Borceux)/,/^(?:BSD-2-Clause)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:BSD-3-Clause)/,/^(?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qhull)/,/^(?:Rdisc)/,/^(?:RPSL-1.0)/,/^(?:RPL-1.1)/,/^(?:RPL-1.5)/,/^(?:RHeCos-1.1)/,/^(?:RSCPL)/,/^(?:RSA-MD)/,/^(?:Ruby)/,/^(?:SAX-PD)/,/^(?:Saxpath)/,/^(?:SCEA)/,/^(?:SWL)/,/^(?:SGI-B-1.0)/,/^(?:SGI-B-1.1)/,/^(?:SGI-B-2.0)/,/^(?:OFL-1.0)/,/^(?:OFL-1.1)/,/^(?:SimPL-2.0)/,/^(?:Sleepycat)/,/^(?:SNIA)/,/^(?:Spencer-86)/,/^(?:Spencer-94)/,/^(?:Spencer-99)/,/^(?:SMLNJ)/,/^(?:SugarCRM-1.1.3)/,/^(?:SISSL)/,/^(?:SISSL-1.2)/,/^(?:SPL-1.0)/,/^(?:Watcom-1.0)/,/^(?:TCL)/,/^(?:Unlicense)/,/^(?:TMate)/,/^(?:TORQUE-1.1)/,/^(?:TOSL)/,/^(?:Unicode-TOU)/,/^(?:UPL-1.0)/,/^(?:NCSA)/,/^(?:Vim)/,/^(?:VOSTROM)/,/^(?:VSL-1.0)/,/^(?:W3C-19980720)/,/^(?:W3C)/,/^(?:Wsuipa)/,/^(?:Xnet)/,/^(?:X11)/,/^(?:Xerox)/,/^(?:XFree86-1.1)/,/^(?:xinetd)/,/^(?:xpp)/,/^(?:XSkat)/,/^(?:YPL-1.0)/,/^(?:YPL-1.1)/,/^(?:Zed)/,/^(?:Zend-2.0)/,/^(?:Zimbra-1.3)/,/^(?:Zimbra-1.4)/,/^(?:Zlib)/,/^(?:zlib-acknowledgement)/,/^(?:ZPL-1.1)/,/^(?:ZPL-2.0)/,/^(?:ZPL-2.1)/,/^(?:389-exception)/,/^(?:Autoconf-exception-2.0 )/,/^(?:Autoconf-exception-3.0 )/,/^(?:Bison-exception-2.2)/,/^(?:CLISP-exception-2.0)/,/^(?:Classpath-exception-2.0)/,/^(?:FLTK-exception )/,/^(?:FLTK-exception-2.0 )/,/^(?:Font-exception-2.0 )/,/^(?:GCC-exception-2.0)/,/^(?:GCC-exception-3.1)/,/^(?:LZMA-exception )/,/^(?:Libtool-exception)/,/^(?:Nokia-Qt-exception-1.1 )/,/^(?:Qwt-exception-1.0)/,/^(?:WxWindows-exception-3.1)/,/^(?:eCos-exception-2.0 )/,/^(?:freertos-exception-2.0 )/,/^(?:gnu-javamail-exception )/,/^(?:i2p-gpl-java-exception )/,/^(?:mif-exception)/,/^(?:u-boot-exception-2.0 )/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = spdxparse; -exports.Parser = spdxparse.Parser; -exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} +var spdxparse=function(){var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17];var parser={trace:function trace(){},yy:{},symbols_:{error:2,start:3,expression:4,EOS:5,simpleExpression:6,LICENSE:7,PLUS:8,LICENSEREF:9,DOCUMENTREF:10,COLON:11,WITH:12,EXCEPTION:13,AND:14,OR:15,OPEN:16,CLOSE:17,$accept:0,$end:1},terminals_:{2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"},productions_:[0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return this.$=$$[$0-1];break;case 2:case 4:case 5:this.$={license:yytext};break;case 3:this.$={license:$$[$0-1],plus:true};break;case 6:this.$=$$[$0];break;case 7:this.$={exception:$$[$0]};this.$.license=$$[$0-2].license;if($$[$0-2].hasOwnProperty("plus")){this.$.plus=$$[$0-2].plus}break;case 8:this.$={conjunction:"and",left:$$[$0-2],right:$$[$0]};break;case 9:this.$={conjunction:"or",left:$$[$0-2],right:$$[$0]};break;case 10:this.$=$$[$0-1];break}},table:[{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])],defaultActions:{8:[2,1]},parseError:function parseError(str,hash){if(hash.recoverable){this.trace(str)}else{throw new Error(str)}},parse:function parse(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1;var args=lstack.slice.call(arguments,1);var lexer=Object.create(this.lexer);var sharedState={yy:{}};for(var k in this.yy){if(Object.prototype.hasOwnProperty.call(this.yy,k)){sharedState.yy[k]=this.yy[k]}}lexer.setInput(input,sharedState.yy);sharedState.yy.lexer=lexer;sharedState.yy.parser=this;if(typeof lexer.yylloc=="undefined"){lexer.yylloc={}}var yyloc=lexer.yylloc;lstack.push(yyloc);var ranges=lexer.options&&lexer.options.ranges;if(typeof sharedState.yy.parseError==="function"){this.parseError=sharedState.yy.parseError}else{this.parseError=Object.getPrototypeOf(this).parseError}function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length-n}_token_stack:function lex(){var token;token=lexer.lex()||EOF;if(typeof token!=="number"){token=self.symbols_[token]||token}return token}var symbol,preErrorSymbol,state,action,a,r,yyval={},p,len,newState,expected;while(true){state=stack[stack.length-1];if(this.defaultActions[state]){action=this.defaultActions[state]}else{if(symbol===null||typeof symbol=="undefined"){symbol=lex()}action=table[state]&&table[state][symbol]}if(typeof action==="undefined"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state]){if(this.terminals_[p]&&p>TERROR){expected.push("'"+this.terminals_[p]+"'")}}if(lexer.showPosition){errStr="Parse error on line "+(yylineno+1)+":\n"+lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'"}else{errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'")}this.parseError(errStr,{text:lexer.match,token:this.terminals_[symbol]||symbol,line:lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1){throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol)}switch(action[0]){case 1:stack.push(symbol);vstack.push(lexer.yytext);lstack.push(lexer.yylloc);stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=lexer.yyleng;yytext=lexer.yytext;yylineno=lexer.yylineno;yyloc=lexer.yylloc;if(recovering>0){recovering--}}else{symbol=preErrorSymbol;preErrorSymbol=null}break;case 2:len=this.productions_[action[1]][1];yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};if(ranges){yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]}r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args));if(typeof r!=="undefined"){return r}if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return true}}return true}};var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parser){this.yy.parser.parseError(str,hash)}else{throw new Error(str)}},setInput:function(input,yy){this.yy=yy||this.yy||{};this._input=input;this._more=this._backtrack=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges){this.yylloc.range=[0,0]}this.offset=0;return this},input:function(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.offset++;this.match+=ch;this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges){this.yylloc.range[1]++}this._input=this._input.slice(1);return ch},unput:function(ch){var len=ch.length;var lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-len);this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(lines.length-1){this.yylineno-=lines.length-1}var r=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len};if(this.options.ranges){this.yylloc.range=[r[0],r[0]+this.yyleng-len]}this.yyleng=this.yytext.length;return this},more:function(){this._more=true;return this},reject:function(){if(this.options.backtrack_lexer){this._backtrack=true}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;if(next.length<20){next+=this._input.substr(0,20-next.length)}return(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput();var c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer){backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done};if(this.options.ranges){backup.yylloc.range=this.yylloc.range.slice(0)}}lines=match[0].match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno+=lines.length}this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._backtrack=false;this._input=this._input.slice(match[0].length);this.matched+=match[0];token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input){this.done=false}if(token){return token}else if(this._backtrack){for(var k in backup){this[k]=backup[k]}return false}return false},next:function(){if(this.done){return this.EOF}if(!this._input){this.done=true}var token,match,tempMatch,index;if(!this._more){this.yytext="";this.match=""}var rules=this._currentRules();for(var i=0;imatch[0].length)){match=tempMatch;index=i;if(this.options.backtrack_lexer){token=this.test_match(tempMatch,rules[i]);if(token!==false){return token}else if(this._backtrack){match=false;continue}else{return false}}else if(!this.options.flex){break}}}if(match){token=this.test_match(match,rules[index]);if(token!==false){return token}return false}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function lex(){var r=this.next();if(r){return r}else{return this.lex()}},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){var n=this.conditionStack.length-1;if(n>0){return this.conditionStack.pop()}else{return this.conditionStack[0]}},_currentRules:function _currentRules(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules}else{return this.conditions["INITIAL"].rules}},topState:function topState(n){n=this.conditionStack.length-1-Math.abs(n||0);if(n>=0){return this.conditionStack[n]}else{return"INITIAL"}},pushState:function pushState(condition){this.begin(condition)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{},performAction:function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:return 5;break;case 1:break;case 2:return 8;break;case 3:return 16;break;case 4:return 17;break;case 5:return 11;break;case 6:return 10;break;case 7:return 9;break;case 8:return 14;break;case 9:return 15;break;case 10:return 12;break;case 11:return 7;break;case 12:return 7;break;case 13:return 7;break;case 14:return 13;break;case 15:return 13;break;case 16:return 13;break;case 17:return 13;break;case 18:return 13;break;case 19:return 13;break;case 20:return 13;break;case 21:return 13;break;case 22:return 7;break;case 23:return 7;break;case 24:return 13;break;case 25:return 13;break;case 26:return 13;break;case 27:return 7;break;case 28:return 13;break;case 29:return 13;break;case 30:return 13;break;case 31:return 7;break;case 32:return 7;break;case 33:return 13;break;case 34:return 13;break;case 35:return 13;break;case 36:return 7;break;case 37:return 13;break;case 38:return 7;break;case 39:return 7;break;case 40:return 7;break;case 41:return 7;break;case 42:return 7;break;case 43:return 7;break;case 44:return 7;break;case 45:return 7;break;case 46:return 7;break;case 47:return 7;break;case 48:return 7;break;case 49:return 7;break;case 50:return 7;break;case 51:return 13;break;case 52:return 7;break;case 53:return 7;break;case 54:return 7;break;case 55:return 13;break;case 56:return 7;break;case 57:return 7;break;case 58:return 7;break;case 59:return 13;break;case 60:return 7;break;case 61:return 13;break;case 62:return 7;break;case 63:return 7;break;case 64:return 7;break;case 65:return 7;break;case 66:return 7;break;case 67:return 7;break;case 68:return 7;break;case 69:return 7;break;case 70:return 7;break;case 71:return 7;break;case 72:return 7;break;case 73:return 7;break;case 74:return 7;break;case 75:return 7;break;case 76:return 7;break;case 77:return 7;break;case 78:return 7;break;case 79:return 7;break;case 80:return 7;break;case 81:return 7;break;case 82:return 7;break;case 83:return 7;break;case 84:return 7;break;case 85:return 7;break;case 86:return 7;break;case 87:return 7;break;case 88:return 7;break;case 89:return 7;break;case 90:return 7;break;case 91:return 7;break;case 92:return 7;break;case 93:return 7;break;case 94:return 7;break;case 95:return 7;break;case 96:return 7;break;case 97:return 7;break;case 98:return 7;break;case 99:return 7;break;case 100:return 7;break;case 101:return 7;break;case 102:return 7;break;case 103:return 7;break;case 104:return 7;break;case 105:return 7;break;case 106:return 7;break;case 107:return 7;break;case 108:return 7;break;case 109:return 7;break;case 110:return 7;break;case 111:return 7;break;case 112:return 7;break;case 113:return 7;break;case 114:return 7;break;case 115:return 7;break;case 116:return 7;break;case 117:return 7;break;case 118:return 7;break;case 119:return 7;break;case 120:return 7;break;case 121:return 7;break;case 122:return 7;break;case 123:return 7;break;case 124:return 7;break;case 125:return 7;break;case 126:return 7;break;case 127:return 7;break;case 128:return 7;break;case 129:return 7;break;case 130:return 7;break;case 131:return 7;break;case 132:return 7;break;case 133:return 7;break;case 134:return 7;break;case 135:return 7;break;case 136:return 7;break;case 137:return 7;break;case 138:return 7;break;case 139:return 7;break;case 140:return 7;break;case 141:return 7;break;case 142:return 7;break;case 143:return 7;break;case 144:return 7;break;case 145:return 7;break;case 146:return 7;break;case 147:return 7;break;case 148:return 7;break;case 149:return 7;break;case 150:return 7;break;case 151:return 7;break;case 152:return 7;break;case 153:return 7;break;case 154:return 7;break;case 155:return 7;break;case 156:return 7;break;case 157:return 7;break;case 158:return 7;break;case 159:return 7;break;case 160:return 7;break;case 161:return 7;break;case 162:return 7;break;case 163:return 7;break;case 164:return 7;break;case 165:return 7;break;case 166:return 7;break;case 167:return 7;break;case 168:return 7;break;case 169:return 7;break;case 170:return 7;break;case 171:return 7;break;case 172:return 7;break;case 173:return 7;break;case 174:return 7;break;case 175:return 7;break;case 176:return 7;break;case 177:return 7;break;case 178:return 7;break;case 179:return 7;break;case 180:return 7;break;case 181:return 7;break;case 182:return 7;break;case 183:return 7;break;case 184:return 7;break;case 185:return 7;break;case 186:return 7;break;case 187:return 7;break;case 188:return 7;break;case 189:return 7;break;case 190:return 7;break;case 191:return 7;break;case 192:return 7;break;case 193:return 7;break;case 194:return 7;break;case 195:return 7;break;case 196:return 7;break;case 197:return 7;break;case 198:return 7;break;case 199:return 7;break;case 200:return 7;break;case 201:return 7;break;case 202:return 7;break;case 203:return 7;break;case 204:return 7;break;case 205:return 7;break;case 206:return 7;break;case 207:return 7;break;case 208:return 7;break;case 209:return 7;break;case 210:return 7;break;case 211:return 7;break;case 212:return 7;break;case 213:return 7;break;case 214:return 7;break;case 215:return 7;break;case 216:return 7;break;case 217:return 7;break;case 218:return 7;break;case 219:return 7;break;case 220:return 7;break;case 221:return 7;break;case 222:return 7;break;case 223:return 7;break;case 224:return 7;break;case 225:return 7;break;case 226:return 7;break;case 227:return 7;break;case 228:return 7;break;case 229:return 7;break;case 230:return 7;break;case 231:return 7;break;case 232:return 7;break;case 233:return 7;break;case 234:return 7;break;case 235:return 7;break;case 236:return 7;break;case 237:return 7;break;case 238:return 7;break;case 239:return 7;break;case 240:return 7;break;case 241:return 7;break;case 242:return 7;break;case 243:return 7;break;case 244:return 7;break;case 245:return 7;break;case 246:return 7;break;case 247:return 7;break;case 248:return 7;break;case 249:return 7;break;case 250:return 7;break;case 251:return 7;break;case 252:return 7;break;case 253:return 7;break;case 254:return 7;break;case 255:return 7;break;case 256:return 7;break;case 257:return 7;break;case 258:return 7;break;case 259:return 7;break;case 260:return 7;break;case 261:return 7;break;case 262:return 7;break;case 263:return 7;break;case 264:return 7;break;case 265:return 7;break;case 266:return 7;break;case 267:return 7;break;case 268:return 7;break;case 269:return 7;break;case 270:return 7;break;case 271:return 7;break;case 272:return 7;break;case 273:return 7;break;case 274:return 7;break;case 275:return 7;break;case 276:return 7;break;case 277:return 7;break;case 278:return 7;break;case 279:return 7;break;case 280:return 7;break;case 281:return 7;break;case 282:return 7;break;case 283:return 7;break;case 284:return 7;break;case 285:return 7;break;case 286:return 7;break;case 287:return 7;break;case 288:return 7;break;case 289:return 7;break;case 290:return 7;break;case 291:return 7;break;case 292:return 7;break;case 293:return 7;break;case 294:return 7;break;case 295:return 7;break;case 296:return 7;break;case 297:return 7;break;case 298:return 7;break;case 299:return 7;break;case 300:return 7;break;case 301:return 7;break;case 302:return 7;break;case 303:return 7;break;case 304:return 7;break;case 305:return 7;break;case 306:return 7;break;case 307:return 7;break;case 308:return 7;break;case 309:return 7;break;case 310:return 7;break;case 311:return 7;break;case 312:return 7;break;case 313:return 7;break;case 314:return 7;break;case 315:return 7;break;case 316:return 7;break;case 317:return 7;break;case 318:return 7;break;case 319:return 7;break;case 320:return 7;break;case 321:return 7;break;case 322:return 7;break;case 323:return 7;break;case 324:return 7;break;case 325:return 7;break;case 326:return 7;break;case 327:return 7;break;case 328:return 7;break;case 329:return 7;break;case 330:return 7;break;case 331:return 7;break;case 332:return 7;break;case 333:return 7;break;case 334:return 7;break;case 335:return 7;break;case 336:return 7;break;case 337:return 7;break;case 338:return 7;break}},rules:[/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:WxWindows-exception-3\.1)/,/^(?:Classpath-exception-2\.0)/,/^(?:gnu-javamail-exception)/,/^(?:freertos-exception-2\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:Autoconf-exception-2\.0)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-3\.0)/,/^(?:zlib-acknowledgement)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:Bison-exception-2\.2)/,/^(?:CLISP-exception-2\.0)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:FLTK-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:Font-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Qwt-exception-1\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Libtool-exception)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:MIT-advertising)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:CrystalStacker)/,/^(?:BSD-Protection)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:BitTorrent-1\.0)/,/^(?:Frameworx-1\.0)/,/^(?:mif-exception)/,/^(?:Interbase-1\.0)/,/^(?:389-exception)/,/^(?:HaskellReport)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-NC-1\.0)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:BSD-4-Clause)/,/^(?:Artistic-1\.0)/,/^(?:BSD-3-Clause)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-SA-3\.0)/,/^(?:XFree86-1\.1)/,/^(?:OLDAP-2\.0\.1)/,/^(?:bzip2-1\.0\.6)/,/^(?:OLDAP-2\.2\.1)/,/^(?:ImageMagick)/,/^(?:Unicode-TOU)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:CNRI-Jython)/,/^(?:CNRI-Python)/,/^(?:bzip2-1\.0\.5)/,/^(?:OLDAP-2\.2\.2)/,/^(?:PostgreSQL)/,/^(?:Apache-1\.1)/,/^(?:CECILL-1\.0)/,/^(?:Apache-2\.0)/,/^(?:Zimbra-1\.4)/,/^(?:CECILL-1\.1)/,/^(?:Zimbra-1\.3)/,/^(?:Adobe-2006)/,/^(?:JasPer-2\.0)/,/^(?:CECILL-2\.0)/,/^(?:TORQUE-1\.1)/,/^(?:CECILL-2\.1)/,/^(?:Watcom-1\.0)/,/^(?:Intel-ACPI)/,/^(?:ClArtistic)/,/^(?:Spencer-99)/,/^(?:Condor-1\.1)/,/^(?:Spencer-94)/,/^(?:gSOAP-1\.3b)/,/^(?:EUDatagrid)/,/^(?:Spencer-86)/,/^(?:Python-2\.0)/,/^(?:RHeCos-1\.1)/,/^(?:CATOSL-1\.1)/,/^(?:Apache-1\.0)/,/^(?:FreeImage)/,/^(?:SGI-B-1\.1)/,/^(?:SGI-B-1\.0)/,/^(?:SimPL-2\.0)/,/^(?:Sleepycat)/,/^(?:Crossword)/,/^(?:ErlPL-1\.1)/,/^(?:CPOL-1\.02)/,/^(?:OLDAP-2\.8)/,/^(?:OLDAP-2\.7)/,/^(?:OLDAP-2\.6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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338],inclusive:true}}};return lexer}();parser.lexer=lexer;function Parser(){this.yy={}}Parser.prototype=parser;parser.Parser=Parser;return new Parser}();if(typeof require!=="undefined"&&typeof exports!=="undefined"){exports.parser=spdxparse;exports.Parser=spdxparse.Parser;exports.parse=function(){return spdxparse.parse.apply(spdxparse,arguments)};exports.main=function commonjsMain(args){if(!args[1]){console.log("Usage: "+args[0]+" FILE");process.exit(1)}var source=require("fs").readFileSync(require("path").normalize(args[1]),"utf8");return exports.parser.parse(source)};if(typeof module!=="undefined"&&require.main===module){exports.main(process.argv.slice(1))}} diff --git a/deps/npm/node_modules/validate-npm-package-license/package.json b/deps/npm/node_modules/validate-npm-package-license/package.json index 00006cc3904b90..1b7e084b1b47e6 100644 --- a/deps/npm/node_modules/validate-npm-package-license/package.json +++ b/deps/npm/node_modules/validate-npm-package-license/package.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/kemitchell/validate-npm-package-license.js#readme", "_id": "validate-npm-package-license@3.0.1", "_shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", - "_from": "validate-npm-package-license@3.0.1", + "_from": "validate-npm-package-license@>=3.0.1 <3.1.0", "_npmVersion": "2.13.5", "_nodeVersion": "0.12.7", "_npmUser": { @@ -58,5 +58,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" + "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/write-file-atomic/.nyc_output/47248.json b/deps/npm/node_modules/write-file-atomic/.nyc_output/47248.json new file mode 100644 index 00000000000000..9e26dfeeb6e641 --- /dev/null +++ b/deps/npm/node_modules/write-file-atomic/.nyc_output/47248.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/deps/npm/node_modules/write-file-atomic/.nyc_output/47250.json b/deps/npm/node_modules/write-file-atomic/.nyc_output/47250.json new file mode 100644 index 00000000000000..eada5f58dd8435 --- /dev/null +++ b/deps/npm/node_modules/write-file-atomic/.nyc_output/47250.json @@ -0,0 +1 @@ +{"./index.js":{"path":"./index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":14,"6":14,"7":42,"8":14,"9":1,"10":1,"11":14,"12":1,"13":7,"14":5,"15":5,"16":7,"17":5,"18":7,"19":7,"20":7,"21":4,"22":1,"23":7,"24":5,"25":7,"26":7,"27":7,"28":6,"29":1,"30":5,"31":4,"32":4,"33":4},"b":{"1":[5,2],"2":[5,2],"3":[7,1],"4":[4,3],"5":[5,2],"6":[1,5]},"f":{"1":14,"2":14,"3":7,"4":7,"5":4,"6":7},"fnMap":{"1":{"name":"murmurhex","line":6,"loc":{"start":{"line":6,"column":0},"end":{"line":6,"column":22}}},"2":{"name":"(anonymous_2)","line":12,"loc":{"start":{"line":12,"column":17},"end":{"line":12,"column":37}}},"3":{"name":"writeFile","line":16,"loc":{"start":{"line":16,"column":17},"end":{"line":16,"column":72}}},"4":{"name":"(anonymous_4)","line":27,"loc":{"start":{"line":27,"column":5},"end":{"line":27,"column":20}}},"5":{"name":"(anonymous_5)","line":28,"loc":{"start":{"line":28,"column":29},"end":{"line":28,"column":41}}},"6":{"name":"writeFileSync","line":33,"loc":{"start":{"line":33,"column":22},"end":{"line":33,"column":71}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":31}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":34}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":40}},"4":{"start":{"line":6,"column":0},"end":{"line":10,"column":1}},"5":{"start":{"line":7,"column":2},"end":{"line":7,"column":30}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":77}},"7":{"start":{"line":8,"column":48},"end":{"line":8,"column":77}},"8":{"start":{"line":9,"column":2},"end":{"line":9,"column":22}},"9":{"start":{"line":11,"column":0},"end":{"line":11,"column":19}},"10":{"start":{"line":12,"column":0},"end":{"line":14,"column":1}},"11":{"start":{"line":13,"column":2},"end":{"line":13,"column":75}},"12":{"start":{"line":16,"column":0},"end":{"line":31,"column":1}},"13":{"start":{"line":17,"column":2},"end":{"line":20,"column":3}},"14":{"start":{"line":18,"column":4},"end":{"line":18,"column":22}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":18}},"16":{"start":{"line":21,"column":2},"end":{"line":21,"column":28}},"17":{"start":{"line":21,"column":16},"end":{"line":21,"column":28}},"18":{"start":{"line":22,"column":2},"end":{"line":22,"column":36}},"19":{"start":{"line":23,"column":2},"end":{"line":30,"column":4}},"20":{"start":{"line":28,"column":4},"end":{"line":29,"column":18}},"21":{"start":{"line":28,"column":43},"end":{"line":28,"column":57}},"22":{"start":{"line":33,"column":0},"end":{"line":44,"column":1}},"23":{"start":{"line":34,"column":2},"end":{"line":34,"column":28}},"24":{"start":{"line":34,"column":16},"end":{"line":34,"column":28}},"25":{"start":{"line":35,"column":2},"end":{"line":35,"column":36}},"26":{"start":{"line":36,"column":2},"end":{"line":43,"column":3}},"27":{"start":{"line":37,"column":4},"end":{"line":37,"column":44}},"28":{"start":{"line":38,"column":4},"end":{"line":38,"column":82}},"29":{"start":{"line":38,"column":23},"end":{"line":38,"column":82}},"30":{"start":{"line":39,"column":4},"end":{"line":39,"column":36}},"31":{"start":{"line":41,"column":4},"end":{"line":41,"column":47}},"32":{"start":{"line":41,"column":10},"end":{"line":41,"column":33}},"33":{"start":{"line":42,"column":4},"end":{"line":42,"column":13}}},"branchMap":{"1":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":17,"column":2}},{"start":{"line":17,"column":2},"end":{"line":17,"column":2}}]},"2":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":2},"end":{"line":21,"column":2}},{"start":{"line":21,"column":2},"end":{"line":21,"column":2}}]},"3":{"line":25,"type":"binary-expr","locations":[{"start":{"line":25,"column":4},"end":{"line":25,"column":17}},{"start":{"line":25,"column":21},"end":{"line":25,"column":82}}]},"4":{"line":28,"type":"cond-expr","locations":[{"start":{"line":28,"column":10},"end":{"line":28,"column":59}},{"start":{"line":29,"column":8},"end":{"line":29,"column":18}}]},"5":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":2},"end":{"line":34,"column":2}},{"start":{"line":34,"column":2},"end":{"line":34,"column":2}}]},"6":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":4},"end":{"line":38,"column":4}},{"start":{"line":38,"column":4},"end":{"line":38,"column":4}}]}}}} \ No newline at end of file diff --git a/deps/npm/node_modules/write-file-atomic/.travis.yml b/deps/npm/node_modules/write-file-atomic/.travis.yml new file mode 100644 index 00000000000000..3bc5d90c5666ca --- /dev/null +++ b/deps/npm/node_modules/write-file-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js index f61a17038bd156..797e571779f9d8 100644 --- a/deps/npm/node_modules/write-file-atomic/index.js +++ b/deps/npm/node_modules/write-file-atomic/index.js @@ -1,45 +1,44 @@ 'use strict' -var fs = require('graceful-fs'); -var chain = require('slide').chain; -var crypto = require('crypto'); +var fs = require('graceful-fs') +var chain = require('slide').chain +var MurmurHash3 = require('imurmurhash') -var md5hex = function () { - var hash = crypto.createHash('md5'); - for (var ii=0; iiwriteFileAtomic(filename, data, [options], callback)\n\n* filename **String**\n* data **String** | **Buffer**\n* options **Object**\n * chown **Object**\n * uid **Number**\n * gid **Number**\n * encoding **String** | **Null** default = 'utf8'\n * mode **Number** default = 438 (aka 0666 in Octal)\ncallback **Function**\n\nAtomically and asynchronously writes data to a file, replacing the file if it already\nexists. data can be a string or a buffer.\n\nThe file is initially named `filename + \".\" + md5hex(__filename, process.pid, ++invocations)`.\nIf writeFile completes successfully then, if passed the **chown** option it will change\nthe ownership of the file. Finally it renames the file back to the filename you specified. If\nit encounters errors at any of these steps it will attempt to unlink the temporary file and then\npass the error back to the caller.\n\nIf provided, the **chown** option requires both **uid** and **gid** properties or else\nyou'll get an error.\n\nThe **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.\n\nExample:\n\n```javascript\nwriteFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {\n if (err) throw err;\n console.log('It\\'s saved!');\n});\n```\n\n### var writeFileAtomicSync = require('write-file-atomic').sync
    writeFileAtomicSync(filename, data, [options])\n\nThe synchronous version of **writeFileAtomic**.\n", + "readmeFilename": "README.md", + "gitHead": "42dc04a17af96ac045f4979c8c951ee5a14a8b8b", + "_id": "write-file-atomic@1.1.4", + "_shasum": "b1f52dc2e8dc0e3cb04d187a25f758a38a90ca3b", + "_from": "write-file-atomic@>=1.1.4 <1.2.0" } diff --git a/deps/npm/node_modules/write-file-atomic/test/basic.js b/deps/npm/node_modules/write-file-atomic/test/basic.js index a3227eaa1de40d..13b971973321d2 100644 --- a/deps/npm/node_modules/write-file-atomic/test/basic.js +++ b/deps/npm/node_modules/write-file-atomic/test/basic.js @@ -1,97 +1,97 @@ -"use strict"; -var test = require('tap').test; -var requireInject = require('require-inject'); +'use strict' +var test = require('tap').test +var requireInject = require('require-inject') var writeFileAtomic = requireInject('../index', { - 'graceful-fs': { - writeFile: function (tmpfile, data, options, cb) { - if (/nowrite/.test(tmpfile)) return cb('ENOWRITE'); - cb(); - }, - chown: function (tmpfile, uid, gid, cb) { - if (/nochown/.test(tmpfile)) return cb('ENOCHOWN'); - cb(); - }, - rename: function (tmpfile, filename, cb) { - if (/norename/.test(tmpfile)) return cb('ENORENAME'); - cb(); - }, - unlink: function (tmpfile, cb) { - if (/nounlink/.test(tmpfile)) return cb('ENOUNLINK'); - cb(); - }, - writeFileSync: function (tmpfile, data, options) { - if (/nowrite/.test(tmpfile)) throw 'ENOWRITE'; - }, - chownSync: function (tmpfile, uid, gid) { - if (/nochown/.test(tmpfile)) throw 'ENOCHOWN'; - }, - renameSync: function (tmpfile, filename) { - if (/norename/.test(tmpfile)) throw 'ENORENAME'; - }, - unlinkSync: function (tmpfile) { - if (/nounlink/.test(tmpfile)) throw 'ENOUNLINK'; - }, + 'graceful-fs': { + writeFile: function (tmpfile, data, options, cb) { + if (/nowrite/.test(tmpfile)) return cb(new Error('ENOWRITE')) + cb() + }, + chown: function (tmpfile, uid, gid, cb) { + if (/nochown/.test(tmpfile)) return cb(new Error('ENOCHOWN')) + cb() + }, + rename: function (tmpfile, filename, cb) { + if (/norename/.test(tmpfile)) return cb(new Error('ENORENAME')) + cb() + }, + unlink: function (tmpfile, cb) { + if (/nounlink/.test(tmpfile)) return cb(new Error('ENOUNLINK')) + cb() + }, + writeFileSync: function (tmpfile, data, options) { + if (/nowrite/.test(tmpfile)) throw new Error('ENOWRITE') + }, + chownSync: function (tmpfile, uid, gid) { + if (/nochown/.test(tmpfile)) throw new Error('ENOCHOWN') + }, + renameSync: function (tmpfile, filename) { + if (/norename/.test(tmpfile)) throw new Error('ENORENAME') + }, + unlinkSync: function (tmpfile) { + if (/nounlink/.test(tmpfile)) throw new Error('ENOUNLINK') } -}); -var writeFileAtomicSync = writeFileAtomic.sync; + } +}) +var writeFileAtomicSync = writeFileAtomic.sync test('async tests', function (t) { - t.plan(7); - writeFileAtomic('good', 'test', {mode: '0777'}, function (err) { - t.notOk(err, 'No errors occur when passing in options'); - }); - writeFileAtomic('good', 'test', function (err) { - t.notOk(err, 'No errors occur when NOT passing in options'); - }); - writeFileAtomic('nowrite', 'test', function (err) { - t.is(err, 'ENOWRITE', 'writeFile failures propagate'); - }); - writeFileAtomic('nochown', 'test', {chown: {uid:100,gid:100}}, function (err) { - t.is(err, 'ENOCHOWN', 'Chown failures propagate'); - }); - writeFileAtomic('nochown', 'test', function (err) { - t.notOk(err, 'No attempt to chown when no uid/gid passed in'); - }); - writeFileAtomic('norename', 'test', function (err) { - t.is(err, 'ENORENAME', 'Rename errors propagate'); - }); - writeFileAtomic('norename nounlink', 'test', function (err) { - t.is(err, 'ENORENAME', 'Failure to unlink the temp file does not clobber the original error'); - }); -}); + t.plan(7) + writeFileAtomic('good', 'test', {mode: '0777'}, function (err) { + t.notOk(err, 'No errors occur when passing in options') + }) + writeFileAtomic('good', 'test', function (err) { + t.notOk(err, 'No errors occur when NOT passing in options') + }) + writeFileAtomic('nowrite', 'test', function (err) { + t.is(err.message, 'ENOWRITE', 'writeFile failures propagate') + }) + writeFileAtomic('nochown', 'test', {chown: {uid: 100, gid: 100}}, function (err) { + t.is(err.message, 'ENOCHOWN', 'Chown failures propagate') + }) + writeFileAtomic('nochown', 'test', function (err) { + t.notOk(err, 'No attempt to chown when no uid/gid passed in') + }) + writeFileAtomic('norename', 'test', function (err) { + t.is(err.message, 'ENORENAME', 'Rename errors propagate') + }) + writeFileAtomic('norename nounlink', 'test', function (err) { + t.is(err.message, 'ENORENAME', 'Failure to unlink the temp file does not clobber the original error') + }) +}) test('sync tests', function (t) { - t.plan(7); - var throws = function (shouldthrow, msg, todo) { - var err; - try { todo() } catch (e) { err = e } - t.is(shouldthrow,err,msg); - } - var noexception = function (msg, todo) { - var err; - try { todo() } catch (e) { err = e } - t.notOk(err,msg); - } + t.plan(7) + var throws = function (shouldthrow, msg, todo) { + var err + try { todo() } catch (e) { err = e } + t.is(shouldthrow, err.message, msg) + } + var noexception = function (msg, todo) { + var err + try { todo() } catch (e) { err = e } + t.notOk(err, msg) + } - noexception('No errors occur when passing in options',function (){ - writeFileAtomicSync('good', 'test', {mode: '0777'}); - }) - noexception('No errors occur when NOT passing in options',function (){ - writeFileAtomicSync('good', 'test'); - }); - throws('ENOWRITE', 'writeFile failures propagate', function () { - writeFileAtomicSync('nowrite', 'test'); - }); - throws('ENOCHOWN', 'Chown failures propagate', function () { - writeFileAtomicSync('nochown', 'test', {chown: {uid:100,gid:100}}); - }); - noexception('No attempt to chown when no uid/gid passed in', function (){ - writeFileAtomicSync('nochown', 'test'); - }); - throws('ENORENAME', 'Rename errors propagate', function (){ - writeFileAtomicSync('norename', 'test'); - }); - throws('ENORENAME', 'Failure to unlink the temp file does not clobber the original error', function (){ - writeFileAtomicSync('norename nounlink', 'test'); - }); -}); + noexception('No errors occur when passing in options', function () { + writeFileAtomicSync('good', 'test', {mode: '0777'}) + }) + noexception('No errors occur when NOT passing in options', function () { + writeFileAtomicSync('good', 'test') + }) + throws('ENOWRITE', 'writeFile failures propagate', function () { + writeFileAtomicSync('nowrite', 'test') + }) + throws('ENOCHOWN', 'Chown failures propagate', function () { + writeFileAtomicSync('nochown', 'test', {chown: {uid: 100, gid: 100}}) + }) + noexception('No attempt to chown when no uid/gid passed in', function () { + writeFileAtomicSync('nochown', 'test') + }) + throws('ENORENAME', 'Rename errors propagate', function () { + writeFileAtomicSync('norename', 'test') + }) + throws('ENORENAME', 'Failure to unlink the temp file does not clobber the original error', function () { + writeFileAtomicSync('norename nounlink', 'test') + }) +}) diff --git a/deps/npm/package.json b/deps/npm/package.json index fe047bc56230c1..d6831c8490de2f 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.14.12", + "version": "2.14.15", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -46,7 +46,7 @@ "dezalgo": "~1.0.3", "editor": "~1.0.0", "fs-vacuum": "~1.2.7", - "fs-write-stream-atomic": "~1.0.4", + "fs-write-stream-atomic": "~1.0.5", "fstream": "~1.0.8", "fstream-npm": "~1.0.7", "github-url-from-git": "~1.4.0", @@ -59,20 +59,20 @@ "ini": "~1.3.4", "init-package-json": "~1.9.1", "lockfile": "~1.0.1", - "lru-cache": "~2.7.0", + "lru-cache": "~3.2.0", "minimatch": "~3.0.0", "mkdirp": "~0.5.1", - "node-gyp": "~3.0.3", + "node-gyp": "~3.2.1", "nopt": "~3.0.6", "normalize-git-url": "~3.0.1", "normalize-package-data": "~2.3.5", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~1.0.6", "npm-package-arg": "~4.1.0", - "npm-registry-client": "~7.0.8", + "npm-registry-client": "~7.0.9", "npm-user-validate": "~0.1.2", "npmlog": "~2.0.0", - "once": "~1.3.2", + "once": "~1.3.3", "opener": "~1.4.1", "osenv": "~0.1.3", "path-is-inside": "~1.0.0", @@ -81,14 +81,13 @@ "read-package-json": "~2.0.2", "readable-stream": "~1.1.13", "realize-package-specifier": "~3.0.1", - "request": "~2.65.0", + "request": "~2.67.0", "retry": "~0.8.0", - "rimraf": "~2.4.3", - "semver": "~5.0.3", + "rimraf": "~2.4.4", + "semver": "~5.1.0", "sha": "~2.0.1", "slide": "~1.1.6", "sorted-object": "~1.0.0", - "spdx": "~0.4.1", "tar": "~2.2.1", "text-table": "~0.2.0", "uid-number": "0.0.6", @@ -97,7 +96,7 @@ "validate-npm-package-name": "~2.2.2", "which": "~1.2.0", "wrappy": "~1.0.1", - "write-file-atomic": "~1.1.3" + "write-file-atomic": "~1.1.4" }, "bundleDependencies": [ "abbrev", @@ -125,6 +124,7 @@ "glob", "graceful-fs", "hosted-git-info", + "imurmurhash", "inflight", "inherits", "ini", @@ -159,7 +159,6 @@ "sha", "slide", "sorted-object", - "spdx", "spdx-license-ids", "strip-ansi", "tar", @@ -181,7 +180,7 @@ "npm-registry-mock": "~1.0.0", "require-inject": "~1.3.0", "sprintf-js": "~1.0.2", - "tap": "~2.2.0" + "tap": "~2.3.1" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js index 77689cbc54d70f..760681427c6be1 100644 --- a/deps/npm/test/tap/ls-depth-cli.js +++ b/deps/npm/test/tap/ls-depth-cli.js @@ -113,6 +113,52 @@ test('npm ls --depth=Infinity', function (t) { ) }) +test('npm ls --depth=0 --json', function (t) { + common.npm( + ['ls', '--depth=0', '--json'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.doesNotHave( + out, + /test-package@0\.0\.0/, + 'output not contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('npm ls --depth=Infinity --json', function (t) { + // travis has a preconfigured depth=0, in general we can not depend + // on the default value in all environments, so explictly set it here + common.npm( + ['ls', '--depth=Infinity', '--json'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0' + ) + t.end() + } + ) +}) + test('cleanup', function (t) { cleanup() t.end() diff --git a/deps/npm/test/tap/version-sub-directory.js b/deps/npm/test/tap/version-sub-directory.js new file mode 100644 index 00000000000000..52074a18e7a2b6 --- /dev/null +++ b/deps/npm/test/tap/version-sub-directory.js @@ -0,0 +1,74 @@ +var common = require('../common-tap.js') +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') + +var pkg = path.resolve(__dirname, 'version-sub-directory') +var subDirectory = path.resolve(pkg, 'sub-directory') +var packagePath = path.resolve(pkg, 'package.json') +var cache = path.resolve(pkg, 'cache') + +var json = { name: 'cat', version: '0.1.2' } + +test('npm version from a subdirectory', function (t) { + setup() + npmLoad() + + function npmLoad () { + npm.load({ cache: cache }, function () { + common.makeGitRepo({ + path: pkg, + added: ['package.json'] + }, version) + }) + } + + function version (er, stdout, stderr) { + t.ifError(er, 'git repo initialized without issue') + t.notOk(stderr, 'no error output') + npm.config.set('sign-git-tag', false) + npm.commands.version(['patch'], checkVersion) + } + + function checkVersion (er) { + var git = require('../../lib/utils/git.js') + t.ifError(er, 'version command ran without error') + git.whichAndExec( + ['log'], + { cwd: pkg, env: process.env }, + checkCommit + ) + } + + function checkCommit (er, log, stderr) { + t.ifError(er, 'git log ran without issue') + t.notOk(stderr, 'no error output') + t.ok(log.match(/0\.1\.3/g), 'commited from subdirectory') + t.end() + } +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(subDirectory) + process.chdir(subDirectory) + fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') +} From c4da37b8570b1246dd660cdde4ebbffcda567c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 26 Jan 2016 13:45:04 -0800 Subject: [PATCH 255/262] test: make npm tests work on prerelease node versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4872 Reviewed-By: João Reis Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Rebecca Turner --- deps/npm/html/doc/cli/npm.html | 6 +++--- deps/npm/html/doc/misc/npm-disputes.html | 6 +++--- deps/npm/test/common-tap.js | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 5d9d36640bb13e..bdff00e3b84d21 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -110,7 +110,7 @@

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@

    BUGS

  • web: https://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com
  • Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,7 @@

    AUTHOR

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

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index a8b9d64edc5e23..97b0e475b268d2 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

      npm-disputes

      Handling Module

      SYNOPSIS

      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.

      @@ -51,12 +51,12 @@

      DESCRIPTION

      owner (Bob).
    • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
    • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
    • diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index 3537df68761aa6..de0a9f416d79d8 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -18,6 +18,8 @@ process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') var bin = exports.bin = require.resolve('../bin/npm-cli.js') var chain = require('slide').chain From ce8b663088e32e2deb20d7c181185ac2749e0b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 27 Jan 2016 14:01:29 -0800 Subject: [PATCH 256/262] doc: Update small error in LICENSE for npm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This corresponds to https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4 PR-URL: https://github.com/nodejs/node/pull/4872 Reviewed-By: João Reis Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Rebecca Turner --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a5045ba8cfadff..b39df1e0a8d9cb 100644 --- a/LICENSE +++ b/LICENSE @@ -680,7 +680,7 @@ The externally maintained libraries used by Node.js are: Copyright (c) their respective copyright owners Licensed on their respective license terms - The npm public registry at https://registry.npmjs.com + 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 From 7bd9fabb3f3ed375fa3aee515662d68be736581f Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Fri, 29 Jan 2016 11:30:16 -0800 Subject: [PATCH 257/262] deps: upgrade openssl sources to 1.0.2f This replaces all sources of openssl-1.0.2f.tar.gz into deps/openssl/openssl Fix: https://github.com/nodejs/node/issues/4857 PR-URL: https://github.com/nodejs/node/pull/4961 Reviewed-By: Shigeki Ohtsu deps: copy openssl header files to include dir All symlink files in deps/openssl/openssl/include/openssl/ are removed and replaced with real header files to avoid issues on Windows. Two files of opensslconf.h in crypto and include dir are replaced to refer config/opensslconf.h. Fix: https://github.com/nodejs/node/issues/4857 PR-URL: https://github.com/nodejs/node/pull/4961 Reviewed-By: Shigeki Ohtsu deps: fix openssl assembly error on ia32 win32 `x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and perhaps others) are requiring .686 . Fixes: https://github.com/nodejs/node/issues/589 PR-URL: https://github.com/nodejs/node/pull/1389 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis Reviewed-By: Shigeki Ohtsu deps: fix asm build error of openssl in x86_win32 See https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html iojs needs to stop using masm and move to nasm or yasm on Win32. Fixes: https://github.com/nodejs/node/issues/589 PR-URL: https://github.com/nodejs/node/pull/1389 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis openssl: fix keypress requirement in apps on win32 Reapply b910613792dac946b295855963869933a9089044 . Fixes: https://github.com/nodejs/node/issues/589 PR-URL: https://github.com/nodejs/node/pull/1389 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis docs: update openssl UPDATING guide the guide is now current with the steps taken to update openssl to v1.0.2f PR-URL: https://github.com/nodejs/node/pull/4961 Reviewed-By: Myles Borins --- deps/openssl/doc/UPGRADING.md | 235 ++++++++++++++++-- deps/openssl/openssl/ACKNOWLEDGMENTS | 32 +-- deps/openssl/openssl/CHANGES | 48 ++++ deps/openssl/openssl/Configure | 33 +-- deps/openssl/openssl/INSTALL | 8 +- deps/openssl/openssl/LICENSE | 2 +- deps/openssl/openssl/Makefile | 40 ++- deps/openssl/openssl/Makefile.bak | 40 ++- deps/openssl/openssl/Makefile.org | 38 ++- deps/openssl/openssl/NEWS | 5 + deps/openssl/openssl/README | 13 +- deps/openssl/openssl/apps/app_rand.c | 8 +- deps/openssl/openssl/apps/engine.c | 2 +- deps/openssl/openssl/apps/md4.c | 1 - deps/openssl/openssl/apps/ocsp.c | 2 +- deps/openssl/openssl/apps/pkcs12.c | 42 ++-- deps/openssl/openssl/apps/pkeyutl.c | 34 ++- deps/openssl/openssl/apps/s_client.c | 13 +- deps/openssl/openssl/apps/s_server.c | 2 +- deps/openssl/openssl/apps/speed.c | 2 +- deps/openssl/openssl/apps/x509.c | 7 +- deps/openssl/openssl/crypto/aes/aes.h | 2 +- deps/openssl/openssl/crypto/aes/aes_cbc.c | 2 +- deps/openssl/openssl/crypto/aes/aes_cfb.c | 2 +- deps/openssl/openssl/crypto/aes/aes_core.c | 2 +- deps/openssl/openssl/crypto/aes/aes_ctr.c | 2 +- deps/openssl/openssl/crypto/aes/aes_ecb.c | 2 +- deps/openssl/openssl/crypto/aes/aes_ige.c | 2 +- deps/openssl/openssl/crypto/aes/aes_locl.h | 2 +- deps/openssl/openssl/crypto/aes/aes_misc.c | 2 +- deps/openssl/openssl/crypto/aes/aes_ofb.c | 2 +- deps/openssl/openssl/crypto/aes/aes_x86core.c | 2 +- .../openssl/crypto/aes/asm/aesni-mb-x86_64.pl | 2 +- .../crypto/aes/asm/aesni-sha1-x86_64.pl | 2 +- .../crypto/aes/asm/aesni-sha256-x86_64.pl | 2 +- deps/openssl/openssl/crypto/bio/bio.h | 8 +- deps/openssl/openssl/crypto/bio/bss_bio.c | 2 +- deps/openssl/openssl/crypto/bio/bss_conn.c | 31 ++- deps/openssl/openssl/crypto/bio/bss_dgram.c | 2 - .../openssl/crypto/bn/asm/rsaz-x86_64.pl | 2 +- .../openssl/crypto/bn/asm/x86_64-mont.pl | 2 +- .../openssl/crypto/bn/asm/x86_64-mont5.pl | 2 +- deps/openssl/openssl/crypto/bn/bn_exp.c | 41 ++- deps/openssl/openssl/crypto/bn/exptest.c | 82 +++++- .../openssl/crypto/camellia/camellia.c | 4 +- .../openssl/crypto/camellia/camellia.h | 2 +- .../openssl/crypto/camellia/cmll_cbc.c | 2 +- .../openssl/crypto/camellia/cmll_cfb.c | 2 +- .../openssl/crypto/camellia/cmll_ctr.c | 2 +- .../openssl/crypto/camellia/cmll_ecb.c | 2 +- .../openssl/crypto/camellia/cmll_locl.h | 2 +- .../openssl/crypto/camellia/cmll_misc.c | 2 +- .../openssl/crypto/camellia/cmll_ofb.c | 2 +- .../openssl/crypto/camellia/cmll_utl.c | 2 +- deps/openssl/openssl/crypto/des/des_old.c | 2 +- deps/openssl/openssl/crypto/des/des_old.h | 2 +- deps/openssl/openssl/crypto/des/des_old2.c | 2 +- deps/openssl/openssl/crypto/dh/dh.h | 1 + deps/openssl/openssl/crypto/dh/dh_check.c | 35 ++- deps/openssl/openssl/crypto/dh/dhtest.c | 85 ++++++- deps/openssl/openssl/crypto/dsa/dsa_ossl.c | 8 +- deps/openssl/openssl/crypto/dso/dso.h | 2 +- deps/openssl/openssl/crypto/dso/dso_dl.c | 2 +- deps/openssl/openssl/crypto/dso/dso_dlfcn.c | 2 +- deps/openssl/openssl/crypto/dso/dso_lib.c | 2 +- deps/openssl/openssl/crypto/dso/dso_vms.c | 2 +- deps/openssl/openssl/crypto/dso/dso_win32.c | 2 +- .../crypto/ec/asm/ecp_nistz256-x86_64.pl | 2 +- deps/openssl/openssl/crypto/ec/ec2_smpl.c | 1 + deps/openssl/openssl/crypto/ec/ec_key.c | 2 + .../openssl/crypto/ec/ecp_nistz256_table.c | 2 +- deps/openssl/openssl/crypto/ec/ectest.c | 2 +- deps/openssl/openssl/crypto/engine/eng_all.c | 2 +- deps/openssl/openssl/crypto/evp/e_camellia.c | 2 +- deps/openssl/openssl/crypto/evp/e_old.c | 2 +- deps/openssl/openssl/crypto/evp/e_seed.c | 2 +- deps/openssl/openssl/crypto/mem_clr.c | 2 +- .../crypto/modes/asm/aesni-gcm-x86_64.pl | 2 +- .../openssl/crypto/modes/asm/ghash-x86_64.pl | 2 +- deps/openssl/openssl/crypto/o_dir.c | 2 +- deps/openssl/openssl/crypto/o_dir.h | 2 +- deps/openssl/openssl/crypto/o_dir_test.c | 2 +- deps/openssl/openssl/crypto/o_str.c | 2 +- deps/openssl/openssl/crypto/o_str.h | 2 +- deps/openssl/openssl/crypto/o_time.c | 2 +- deps/openssl/openssl/crypto/o_time.h | 2 +- deps/openssl/openssl/crypto/opensslv.h | 6 +- deps/openssl/openssl/crypto/rand/rand_vms.c | 2 +- deps/openssl/openssl/crypto/rc4/rc4_utl.c | 2 +- deps/openssl/openssl/crypto/rsa/rsa_chk.c | 2 +- deps/openssl/openssl/crypto/rsa/rsa_sign.c | 4 +- deps/openssl/openssl/crypto/seed/seed_cbc.c | 2 +- deps/openssl/openssl/crypto/seed/seed_cfb.c | 2 +- deps/openssl/openssl/crypto/seed/seed_ecb.c | 2 +- deps/openssl/openssl/crypto/seed/seed_ofb.c | 2 +- .../openssl/crypto/sha/asm/sha1-mb-x86_64.pl | 2 +- .../openssl/crypto/sha/asm/sha1-x86_64.pl | 2 +- .../crypto/sha/asm/sha256-mb-x86_64.pl | 2 +- .../openssl/crypto/sha/asm/sha512-x86_64.pl | 2 +- deps/openssl/openssl/crypto/sha/sha1test.c | 2 +- deps/openssl/openssl/crypto/store/store.h | 2 +- deps/openssl/openssl/crypto/store/str_lib.c | 2 +- deps/openssl/openssl/crypto/store/str_locl.h | 2 +- deps/openssl/openssl/crypto/store/str_mem.c | 2 +- deps/openssl/openssl/crypto/store/str_meth.c | 2 +- .../openssl/openssl/crypto/ts/ts_rsp_verify.c | 3 +- deps/openssl/openssl/crypto/ui/ui.h | 2 +- deps/openssl/openssl/crypto/ui/ui_compat.c | 2 +- deps/openssl/openssl/crypto/ui/ui_compat.h | 2 +- deps/openssl/openssl/crypto/ui/ui_lib.c | 2 +- deps/openssl/openssl/crypto/ui/ui_locl.h | 2 +- deps/openssl/openssl/crypto/ui/ui_openssl.c | 2 +- deps/openssl/openssl/crypto/ui/ui_util.c | 2 +- deps/openssl/openssl/crypto/x509/x509_vfy.c | 39 +-- deps/openssl/openssl/crypto/x509/x509_vfy.h | 2 +- deps/openssl/openssl/crypto/x509/x509_vpm.c | 4 +- deps/openssl/openssl/crypto/x509v3/v3_pci.c | 2 +- deps/openssl/openssl/crypto/x509v3/v3_pcia.c | 2 +- deps/openssl/openssl/crypto/x509v3/v3_utl.c | 3 +- .../openssl/crypto/x509v3/v3nametest.c | 10 + .../openssl/openssl/demos/easy_tls/easy-tls.c | 2 +- .../openssl/openssl/demos/easy_tls/easy-tls.h | 2 +- deps/openssl/openssl/demos/tunala/tunala.c | 2 +- deps/openssl/openssl/doc/apps/s_time.pod | 4 +- .../openssl/doc/crypto/BIO_s_connect.pod | 4 +- .../ssl/SSL_CTX_set1_verify_cert_store.pod | 8 +- .../doc/ssl/SSL_CTX_set_tlsext_status_cb.pod | 73 ++++++ .../doc/ssl/SSL_CTX_set_tmp_dh_callback.pod | 29 +-- deps/openssl/openssl/engines/e_chil.c | 2 +- deps/openssl/openssl/include/openssl/aes.h | 2 +- deps/openssl/openssl/include/openssl/bio.h | 8 +- .../openssl/include/openssl/camellia.h | 2 +- .../openssl/openssl/include/openssl/des_old.h | 2 +- deps/openssl/openssl/include/openssl/dh.h | 1 + deps/openssl/openssl/include/openssl/dso.h | 2 +- deps/openssl/openssl/include/openssl/kssl.h | 2 +- .../openssl/include/openssl/opensslv.h | 6 +- deps/openssl/openssl/include/openssl/ssl.h | 6 +- deps/openssl/openssl/include/openssl/ui.h | 2 +- .../openssl/include/openssl/ui_compat.h | 2 +- .../openssl/include/openssl/x509_vfy.h | 2 +- deps/openssl/openssl/openssl.spec | 2 +- deps/openssl/openssl/ssl/d1_both.c | 70 ++++-- deps/openssl/openssl/ssl/kssl.c | 2 +- deps/openssl/openssl/ssl/kssl.h | 2 +- deps/openssl/openssl/ssl/kssl_lcl.h | 2 +- deps/openssl/openssl/ssl/s2_srvr.c | 20 +- deps/openssl/openssl/ssl/s3_clnt.c | 63 ++--- deps/openssl/openssl/ssl/s3_lib.c | 34 +-- deps/openssl/openssl/ssl/s3_srvr.c | 25 +- deps/openssl/openssl/ssl/ssl.h | 6 +- deps/openssl/openssl/ssl/ssl_err.c | 2 + deps/openssl/openssl/ssl/ssl_lib.c | 5 +- deps/openssl/openssl/ssl/ssl_sess.c | 3 - deps/openssl/openssl/ssl/t1_enc.c | 2 +- deps/openssl/openssl/ssl/t1_lib.c | 22 +- deps/openssl/openssl/test/bctest | 111 +++++++++ deps/openssl/openssl/test/bftest.c | 1 - deps/openssl/openssl/test/bntest.c | 1 - deps/openssl/openssl/test/casttest.c | 1 - deps/openssl/openssl/test/clienthellotest.c | 1 - .../openssl/openssl/test/constant_time_test.c | 1 - deps/openssl/openssl/test/destest.c | 1 - deps/openssl/openssl/test/dhtest.c | 1 - deps/openssl/openssl/test/dsatest.c | 1 - deps/openssl/openssl/test/ecdhtest.c | 1 - deps/openssl/openssl/test/ecdsatest.c | 1 - deps/openssl/openssl/test/ectest.c | 1 - deps/openssl/openssl/test/enginetest.c | 1 - deps/openssl/openssl/test/evp_extra_test.c | 1 - deps/openssl/openssl/test/evp_test.c | 1 - deps/openssl/openssl/test/exptest.c | 1 - deps/openssl/openssl/test/heartbeat_test.c | 1 - deps/openssl/openssl/test/hmactest.c | 1 - deps/openssl/openssl/test/ideatest.c | 1 - deps/openssl/openssl/test/igetest.c | 2 +- deps/openssl/openssl/test/jpaketest.c | 1 - deps/openssl/openssl/test/md2test.c | 1 - deps/openssl/openssl/test/md4test.c | 1 - deps/openssl/openssl/test/md5test.c | 1 - deps/openssl/openssl/test/mdc2test.c | 1 - deps/openssl/openssl/test/randtest.c | 1 - deps/openssl/openssl/test/rc2test.c | 1 - deps/openssl/openssl/test/rc4test.c | 1 - deps/openssl/openssl/test/rc5test.c | 1 - deps/openssl/openssl/test/rmdtest.c | 1 - deps/openssl/openssl/test/rsa_test.c | 1 - deps/openssl/openssl/test/sha1test.c | 1 - deps/openssl/openssl/test/sha256t.c | 1 - deps/openssl/openssl/test/sha512t.c | 1 - deps/openssl/openssl/test/shatest.c | 1 - deps/openssl/openssl/test/srptest.c | 1 - deps/openssl/openssl/test/ssltest.c | 1 - deps/openssl/openssl/test/v3nametest.c | 1 - deps/openssl/openssl/test/verify_extra_test.c | 1 - deps/openssl/openssl/test/wp_test.c | 1 - deps/openssl/openssl/util/domd | 4 +- deps/openssl/openssl/util/pl/VC-32.pl | 8 +- deps/openssl/openssl/util/pod2mantest | 58 +++++ 199 files changed, 1216 insertions(+), 564 deletions(-) delete mode 120000 deps/openssl/openssl/apps/md4.c create mode 100644 deps/openssl/openssl/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod create mode 100755 deps/openssl/openssl/test/bctest delete mode 120000 deps/openssl/openssl/test/bftest.c delete mode 120000 deps/openssl/openssl/test/bntest.c delete mode 120000 deps/openssl/openssl/test/casttest.c delete mode 120000 deps/openssl/openssl/test/clienthellotest.c delete mode 120000 deps/openssl/openssl/test/constant_time_test.c delete mode 120000 deps/openssl/openssl/test/destest.c delete mode 120000 deps/openssl/openssl/test/dhtest.c delete mode 120000 deps/openssl/openssl/test/dsatest.c delete mode 120000 deps/openssl/openssl/test/ecdhtest.c delete mode 120000 deps/openssl/openssl/test/ecdsatest.c delete mode 120000 deps/openssl/openssl/test/ectest.c delete mode 120000 deps/openssl/openssl/test/enginetest.c delete mode 120000 deps/openssl/openssl/test/evp_extra_test.c delete mode 120000 deps/openssl/openssl/test/evp_test.c delete mode 120000 deps/openssl/openssl/test/exptest.c delete mode 120000 deps/openssl/openssl/test/heartbeat_test.c delete mode 120000 deps/openssl/openssl/test/hmactest.c delete mode 120000 deps/openssl/openssl/test/ideatest.c delete mode 120000 deps/openssl/openssl/test/jpaketest.c delete mode 120000 deps/openssl/openssl/test/md2test.c delete mode 120000 deps/openssl/openssl/test/md4test.c delete mode 120000 deps/openssl/openssl/test/md5test.c delete mode 120000 deps/openssl/openssl/test/mdc2test.c delete mode 120000 deps/openssl/openssl/test/randtest.c delete mode 120000 deps/openssl/openssl/test/rc2test.c delete mode 120000 deps/openssl/openssl/test/rc4test.c delete mode 120000 deps/openssl/openssl/test/rc5test.c delete mode 120000 deps/openssl/openssl/test/rmdtest.c delete mode 120000 deps/openssl/openssl/test/rsa_test.c delete mode 120000 deps/openssl/openssl/test/sha1test.c delete mode 120000 deps/openssl/openssl/test/sha256t.c delete mode 120000 deps/openssl/openssl/test/sha512t.c delete mode 120000 deps/openssl/openssl/test/shatest.c delete mode 120000 deps/openssl/openssl/test/srptest.c delete mode 120000 deps/openssl/openssl/test/ssltest.c delete mode 120000 deps/openssl/openssl/test/v3nametest.c delete mode 120000 deps/openssl/openssl/test/verify_extra_test.c delete mode 120000 deps/openssl/openssl/test/wp_test.c create mode 100755 deps/openssl/openssl/util/pod2mantest diff --git a/deps/openssl/doc/UPGRADING.md b/deps/openssl/doc/UPGRADING.md index aac92f730acc9c..5c8919d2cf349e 100644 --- a/deps/openssl/doc/UPGRADING.md +++ b/deps/openssl/doc/UPGRADING.md @@ -1,8 +1,8 @@ ## How to upgrade openssl library in Node.js -This document describes the procedure to upgrade openssl from 1.0.2a -to 1.0.2c in Node.js. - +This document describes the procedure to upgrade openssl from 1.0.2e +to 1.0.2f in Node.js. This procedure might be applied to upgrading +any versions in 1.0.2. ### Build System and Upgrading Overview The openssl build system is based on the `Configure` perl script in @@ -31,6 +31,8 @@ The tested platform in CI are also listed. | --dest-os | --dest-cpu | conf | asm | openssl target | CI | |---------- |----------- |----- |----- |------------------- |--- | +| aix | ppc | o | x(*2)| aix-gcc | o | +| aix | ppc64 | o | x(*2)| aix64-gcc | o | | linux | ia32 | o | o |linux-elf | o | | linux | x32 | o | x(*2)|linux-x32 | x | | linux | x64 | o | o |linux-x86_64 | o | @@ -91,48 +93,197 @@ https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha5 otherwise asm_obsolete are used. The following is the detail instruction steps how to upgrade openssl -version from 1.0.2a to 1.0.2c in node. +version from 1.0.2e to 1.0.2f in node. + +*This needs to run Linux +enviroment.* ### 1. Replace openssl source in `deps/openssl/openssl` Remove old openssl sources in `deps/openssl/openssl` . Get original openssl sources from -https://www.openssl.org/source/openssl-1.0.2c.tar.gz and extract all +https://www.openssl.org/source/openssl-1.0.2f.tar.gz and extract all files into `deps/openssl/openssl` . -### 2. Apply private patches -There are three kinds of private patches to be applied in openssl-1.0.2c. - -- The two fixes of assembly error on ia32 win32. masm is no longer - supported in openssl. We should move to use nasm or yasm in future - version of node. - -- The fix of openssl-cli built on win. Key press requirement of - openssl-cli in win causes timeout failures of several tests. +```sh +ohtsu@ubuntu:~/github/node$ cd deps/openssl/ +ohtsu@ubuntu:~/github/node/deps/openssl$ rm -rf openssl +ohtsu@ubuntu:~/github/node/deps/openssl$ tar zxf ~/tmp/openssl-1.0.2f.tar.gz +ohtsu@ubuntu:~/github/node/deps/openssl$ mv openssl-1.0.2f openssl +ohtsu@ubuntu:~/github/node/deps/openssl$ git add --all openssl +ohtsu@ubuntu:~/github/node/deps/openssl$ git commit openssl +```` +The commit message can be -- A new `-no_rand_screen` option to openssl s_client. This makes test - time of test-tls-server-verify be much faster. +>deps: upgrade openssl sources to 1.0.2f +> +>This replaces all sources of openssl-1.0.2f.tar.gz into +>deps/openssl/openssl -### 3. Replace openssl header files in `deps/openssl/openssl/include/openssl` +### 2. Replace openssl header files in `deps/openssl/openssl/include/openssl` all header files in `deps/openssl/openssl/include/openssl/*.h` are symbolic links in the distributed release tar.gz. They cause issues in Windows. They are copied from the real files of symlink origin into the include directory. During installation, they also copied into `PREFIX/node/include` by tools/install.py. +`deps/openssl/openssl/include/openssl/opensslconf.h` and +`deps/openssl/openssl/crypto/opensslconf.h` needs to be changed so as +to refer the platform independent file of `deps/openssl/config/opensslconf.h` + +The following shell script (copy_symlink.sh) is my tool for working +this procedures to invoke it in the `deps/openssl/openssl/include/openssl/`. + +```sh +#!/bin/bash +for var in "$@" +do + if [ -L $var ]; then + origin=`readlink $var` + rm $var + cp $origin $var + fi +done +rm opensslconf.h +echo '#include "../../crypto/opensslconf.h"' > opensslconf.h +rm ../../crypto/opensslconf.h +echo '#include "../../config/opensslconf.h"' > ../../crypto/opensslconf.h +```` + +This step somehow gets troublesome since openssl-1.0.2f because +symlink headers are removed in tar.gz file and we have to execute +./config script to generate them. The config script also generate +unnecessary platform dependent files in the repository so that we have +to clean up them after committing header files. + +```sh +ohtsu@ubuntu:~/github/node/deps/openssl$ cd openssl/ +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ ./config + +make[1]: Leaving directory `/home/ohtsu/github/node/deps/openssl/openssl/test' + +Configured for linux-x86_64. +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ cd include/openssl/ +ohtsu@ubuntu:~/github/node/deps/openssl/openssl/include/openssl$ ~/copy_symlink.sh *.h +ohtsu@ubuntu:~/github/node/deps/openssl/openssl/include/openssl$ cd ../.. +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ git add include +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ git commit include/ crypto/opensslconf.h +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ git clean -f +ohtsu@ubuntu:~/github/node/deps/openssl/openssl$ git checkout Makefile Makefile.bak +```` +The commit message can be + +>deps: copy all openssl header files to include dir +> +>All symlink files in `deps/openssl/openssl/include/openssl/` +>are removed and replaced with real header files to avoid +>issues on Windows. Two files of opensslconf.h in crypto and +>include dir are replaced to refer config/opensslconf.h. + +### 3. Apply floating patches +At the time of writing, there are four floating patches to be applied +to openssl. + +- Two fixes for assembly errors on ia32 win32. + +- One fix for openssl-cli built on win. Key press requirement of + openssl-cli in win causes timeout failures of several tests. + +- Adding a new `-no_rand_screen` option to openssl s_client. This + makes test time of test-tls-server-verify be much faster. + +These fixes can be applied via cherry-pick. The first three will merge without conflict. +The last commit can be landed using a recursive strategy that prefers newer changes. + +```sh +git cherry-pick c66c3d9fa3f5bab0bdfe363dd947136cf8a3907f +git cherry-pick 42a8de2ac66b6953cbc731fdb0b128b8019643b2 +git cherry-pick 2eb170874aa5e84e71b62caab7ac9792fd59c10f +git cherry-pick --strategy=recursive -X theirs 664a659 +``` + +If you attempted to cherry-pick the last commit you would have the following conflict + +``` +# do not do this +git cherry-pick 664a6596960655e214fef25e74d3285097703e95 +error: could not apply 664a659... deps: add -no_rand_screen to openssl s_client +hint: after resolving the conflicts, mark the corrected paths +hint: with 'git add ' or 'git rm ' +hint: and commit the result with 'git commit' +git cherry-pi +``` + +the conflict is in `deps/openssl/openssl/apps/app_rand.c` as below. + +```sh +ohtsu@omb:openssl$ git diff +diff --cc deps/openssl/openssl/apps/app_rand.c +index 7f40bba,b6fe294..0000000 +--- a/deps/openssl/openssl/apps/app_rand.c ++++ b/deps/openssl/openssl/apps/app_rand.c +@@@ -124,7 -124,16 +124,20 @@@ int app_RAND_load_file(const char *file + char buffer[200]; + + #ifdef OPENSSL_SYS_WINDOWS + ++<<<<<<< HEAD + + RAND_screen(); + ++======= + + /* + + * allocate 2 to dont_warn not to use RAND_screen() via + + * -no_rand_screen option in s_client + + */ + + if (dont_warn != 2) { + + BIO_printf(bio_e, "Loading 'screen' into random state -"); + + BIO_flush(bio_e); + + RAND_screen(); + + BIO_printf(bio_e, " done\n"); + + } + ++>>>>>>> 664a659... deps: add -no_rand_screen to openssl s_client + #endif + + if (file == NULL) +```` + +We want to opt for the changes from 664a659 instead of the changes present on HEAD. +`git cherry-pick --strategy=recursive -X theirs` will do just that! ### 4. Change `opensslconf.h` so as to fit each platform. -No change. +opensslconf.h includes defines and macros which are platform +dependent. Each files can be generated via `deps/openssl/config/Makefile` +We can regenerate them and commit them if any diffs exist. + +```sh +ohtsu@ubuntu:~/github/node/deps/openssl$ cd config +ohtsu@ubuntu:~/github/node/deps/openssl/config$ make clean +find archs -name opensslconf.h -exec rm "{}" \; +ohtsu@ubuntu:~/github/node/deps/openssl/config$ make +cd ../openssl; perl ./Configure no-shared no-symlinks aix-gcc > /dev/null +ohtsu@ubuntu:~/github/node/deps/openssl/config$ git diff +ohtsu@ubuntu:~/github/node/deps/openssl/config$ git commit . +```` +The commit message can be + +>deps: update openssl config files +> +>Regenerate config files for supported platforms with Makefile. ### 5. Update openssl.gyp and openssl.gypi -No change. +This process is needed when source files are removed, renamed and added. +It seldom happen in the minor bug fix release. Build errors would be +thrown if it happens. In case of build errors, we need to check source +files in Makefiles of its platform and change openssl.gyp or +openssl.gypi according to the changes of source files. Please contact +@shigeki if it is needed. ### 6. ASM files for openssl We provide two sets of asm files. One is for the latest assembler -and the other is the older one. +and the other is the older one. sections 6.1 and 6.2 describe the two +types of files. Section 6.3 explains the steps to update the files. +In the case of upgrading 1.0.2f there were no changes to the asm files. ### 6.1. asm files for the latest compiler This was made in `deps/openssl/asm/Makefile` - Updated asm files for each platforms which are required in - openssl-1.0.2c. + openssl-1.0.2f. - Some perl files need CC and ASM envs. Added a check if these envs exist. Followed asm files are to be generated with CC=gcc and ASM=nasm on Linux. See @@ -148,8 +299,9 @@ This was made in `deps/openssl/asm/Makefile` With export environments of CC=gcc and ASM=nasm, then type make command and check if new asm files are generated. +If you don't have nasm please install it such as `apt-get install nasm`. -### 6.2.asm files for the older compiler +### 6.2. asm files for the older compiler For older assembler, the version check of CC and ASM should be skipped in generating asm file with perl scripts. Copy files from `deps/openssl/asm` into @@ -158,3 +310,42 @@ into this directories and remove the check of CC and ASM envs. Without environments of CC and ASM, then type make command and check if new asm files for older compilers are generated. + +The following steps includes version check of gcc and nasm. + +### 6.3 steps + +```sh +ohtsu@ubuntu:~/github/node/deps/openssl/config$ cd ../asm +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ gcc --version +gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 +Copyright (C) 2013 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ nasm -v +NASM version 2.10.09 compiled on Dec 29 2013 +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ export CC=gcc +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ export ASM=nasm +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ make clean +find . -iname '*.asm' -exec rm "{}" \; +find . -iname '*.s' -exec rm "{}" \; +find . -iname '*.S' -exec rm "{}" \; +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ make +ohtsu@ubuntu:~/github/node/deps/openssl/asm$ cd ../asm_obsolete/ +ohtsu@ubuntu:~/github/node/deps/openssl/asm_obsolete$ unset CC +ohtsu@ubuntu:~/github/node/deps/openssl/asm_obsolete$ unset ASM +ohtsu@ubuntu:~/github/node/deps/openssl/asm_obsolete$ make clean +find . -iname '*.asm' -exec rm "{}" \; +find . -iname '*.s' -exec rm "{}" \; +find . -iname '*.S' -exec rm "{}" \; +ohtsu@ubuntu:~/github/node/deps/openssl$ git status +ohtsu@ubuntu:~/github/node/deps/openssl$ git commit asm asm_obsolete +```` +The commit message can be + +>deps: update openssl asm and asm_obsolete files +> +>Regenerate asm files with Makefile and CC=gcc and ASM=gcc where +>gcc-4.8.4. Also asm files in asm_obsolete dir to support old compiler +>and assembler are regenerated without CC and ASM envs. diff --git a/deps/openssl/openssl/ACKNOWLEDGMENTS b/deps/openssl/openssl/ACKNOWLEDGMENTS index 59c6f01f97f652..d21dccbb79cfa1 100644 --- a/deps/openssl/openssl/ACKNOWLEDGMENTS +++ b/deps/openssl/openssl/ACKNOWLEDGMENTS @@ -1,30 +1,2 @@ -The OpenSSL project depends on volunteer efforts and financial support from -the end user community. That support comes in the form of donations and paid -sponsorships, software support contracts, paid consulting services -and commissioned software development. - -Since all these activities support the continued development and improvement -of OpenSSL we consider all these clients and customers as sponsors of the -OpenSSL project. - -We would like to identify and thank the following such sponsors for their past -or current significant support of the OpenSSL project: - -Major support: - - Qualys http://www.qualys.com/ - -Very significant support: - - OpenGear: http://www.opengear.com/ - -Significant support: - - PSW Group: http://www.psw.net/ - Acano Ltd. http://acano.com/ - -Please note that we ask permission to identify sponsors and that some sponsors -we consider eligible for inclusion here have requested to remain anonymous. - -Additional sponsorship or financial support is always welcome: for more -information please contact the OpenSSL Software Foundation. +Please https://www.openssl.org/community/thanks.html for the current +acknowledgements. diff --git a/deps/openssl/openssl/CHANGES b/deps/openssl/openssl/CHANGES index 584f0dbd45d73f..aa1f60d1441fcf 100644 --- a/deps/openssl/openssl/CHANGES +++ b/deps/openssl/openssl/CHANGES @@ -2,6 +2,54 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2e and 1.0.2f [28 Jan 2016] + + *) DH small subgroups + + Historically OpenSSL only ever generated DH parameters based on "safe" + primes. More recently (in version 1.0.2) support was provided for + generating X9.42 style parameter files such as those required for RFC 5114 + support. The primes used in such files may not be "safe". Where an + application is using DH configured with parameters based on primes that are + not "safe" then an attacker could use this fact to find a peer's private + DH exponent. This attack requires that the attacker complete multiple + handshakes in which the peer uses the same private DH exponent. For example + this could be used to discover a TLS server's private DH exponent if it's + reusing the private DH exponent or it's using a static DH ciphersuite. + + OpenSSL provides the option SSL_OP_SINGLE_DH_USE for ephemeral DH (DHE) in + TLS. It is not on by default. If the option is not set then the server + reuses the same private DH exponent for the life of the server process and + would be vulnerable to this attack. It is believed that many popular + applications do set this option and would therefore not be at risk. + + The fix for this issue adds an additional check where a "q" parameter is + available (as is the case in X9.42 based parameters). This detects the + only known attack, and is the only possible defense for static DH + ciphersuites. This could have some performance impact. + + Additionally the SSL_OP_SINGLE_DH_USE option has been switched on by + default and cannot be disabled. This could have some performance impact. + + This issue was reported to OpenSSL by Antonio Sanso (Adobe). + (CVE-2016-0701) + [Matt Caswell] + + *) SSLv2 doesn't block disabled ciphers + + A malicious client can negotiate SSLv2 ciphers that have been disabled on + the server and complete SSLv2 handshakes even if all SSLv2 ciphers have + been disabled, provided that the SSLv2 protocol was not also disabled via + SSL_OP_NO_SSLv2. + + This issue was reported to OpenSSL on 26th December 2015 by Nimrod Aviram + and Sebastian Schinzel. + (CVE-2015-3197) + [Viktor Dukhovni] + + *) Reject DH handshakes with parameters shorter than 1024 bits. + [Kurt Roeckx] + Changes between 1.0.2d and 1.0.2e [3 Dec 2015] *) BN_mod_exp may produce incorrect results on x86_64 diff --git a/deps/openssl/openssl/Configure b/deps/openssl/openssl/Configure index ac86cd6cf6a259..4a715dc4373234 100755 --- a/deps/openssl/openssl/Configure +++ b/deps/openssl/openssl/Configure @@ -124,6 +124,9 @@ my $clang_disabled_warnings = "-Wno-unused-parameter -Wno-missing-field-initiali # -Wextended-offsetof my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Qunused-arguments"; +# Warn that "make depend" should be run? +my $warn_make_depend = 0; + my $strict_warnings = 0; my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; @@ -1513,7 +1516,7 @@ if ($target =~ /\-icc$/) # Intel C compiler # linker only when --prefix is not /usr. if ($target =~ /^BSD\-/) { - $shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|); + $shared_ldflag.=" -Wl,-rpath,\$\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|); } if ($sys_id ne "") @@ -2028,14 +2031,8 @@ EOF &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); } if ($depflags ne $default_depflags && !$make_depend) { - print < (note that your message will be recorded in the request tracker publicly readable - via http://www.openssl.org/support/rt.html and will be forwarded to a - public mailing list). Include the output of "make report" in your message. - Please check out the request tracker. Maybe the bug was already - reported or has already been fixed. + at https://www.openssl.org/community/index.html#bugs and will be + forwarded to a public mailing list). Include the output of "make + report" in your message. Please check out the request tracker. Maybe + the bug was already reported or has already been fixed. [If you encounter assembler error messages, try the "no-asm" configuration option as an immediate fix.] diff --git a/deps/openssl/openssl/LICENSE b/deps/openssl/openssl/LICENSE index e47d101f1025e8..fb03713dd11115 100644 --- a/deps/openssl/openssl/LICENSE +++ b/deps/openssl/openssl/LICENSE @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * 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 diff --git a/deps/openssl/openssl/Makefile b/deps/openssl/openssl/Makefile index e2bbb475c7dfa2..ee04c02cc1ca9e 100644 --- a/deps/openssl/openssl/Makefile +++ b/deps/openssl/openssl/Makefile @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2e +VERSION=1.0.2f MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -182,8 +182,7 @@ SHARED_LDFLAGS= GENERAL= Makefile BASENAME= openssl NAME= $(BASENAME)-$(VERSION) -TARFILE= $(NAME).tar -WTARFILE= $(NAME)-win.tar +TARFILE= ../$(NAME).tar EXHEADER= e_os2.h HEADER= e_os.h @@ -501,38 +500,35 @@ TABLE: Configure # would occur. Therefore the list of files is temporarily stored into a file # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal # tar does not support the --files-from option. -TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list \ - --owner openssl:0 --group openssl:0 \ - --transform 's|^|openssl-$(VERSION)/|' \ +TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \ + --owner 0 --group 0 \ + --transform 's|^|$(NAME)/|' \ -cvf - -../$(TARFILE).list: +$(TARFILE).list: find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \ \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \ - \! -name '*test' \! -name '.#*' \! -name '*~' \ - | sort > ../$(TARFILE).list + \( \! -name '*test' -o -name bctest -o -name pod2mantest \) \ + \! -name '.#*' \! -name '*~' \! -type l \ + | sort > $(TARFILE).list -tar: ../$(TARFILE).list +tar: $(TARFILE).list find . -type d -print | xargs chmod 755 find . -type f -print | xargs chmod a+r find . -type f -perm -0100 -print | xargs chmod a+x - $(TAR_COMMAND) | gzip --best >../$(TARFILE).gz - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE).gz + $(TAR_COMMAND) | gzip --best > $(TARFILE).gz + rm -f $(TARFILE).list + ls -l $(TARFILE).gz -tar-snap: ../$(TARFILE).list - $(TAR_COMMAND) > ../$(TARFILE) - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE) +tar-snap: $(TARFILE).list + $(TAR_COMMAND) > $(TARFILE) + rm -f $(TARFILE).list + ls -l $(TARFILE) dist: $(PERL) Configure dist - @$(MAKE) dist_pem_h @$(MAKE) SDIRS='$(SDIRS)' clean - @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar - -dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar install: all install_docs install_sw diff --git a/deps/openssl/openssl/Makefile.bak b/deps/openssl/openssl/Makefile.bak index 27eb08cf315d6f..96d8e0f1999f1e 100644 --- a/deps/openssl/openssl/Makefile.bak +++ b/deps/openssl/openssl/Makefile.bak @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2e-dev +VERSION=1.0.2f-dev MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -182,8 +182,7 @@ SHARED_LDFLAGS= GENERAL= Makefile BASENAME= openssl NAME= $(BASENAME)-$(VERSION) -TARFILE= $(NAME).tar -WTARFILE= $(NAME)-win.tar +TARFILE= ../$(NAME).tar EXHEADER= e_os2.h HEADER= e_os.h @@ -501,38 +500,35 @@ TABLE: Configure # would occur. Therefore the list of files is temporarily stored into a file # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal # tar does not support the --files-from option. -TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list \ - --owner openssl:0 --group openssl:0 \ - --transform 's|^|openssl-$(VERSION)/|' \ +TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \ + --owner 0 --group 0 \ + --transform 's|^|$(NAME)/|' \ -cvf - -../$(TARFILE).list: +$(TARFILE).list: find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \ \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \ - \! -name '*test' \! -name '.#*' \! -name '*~' \ - | sort > ../$(TARFILE).list + \( \! -name '*test' -o -name bctest -o -name pod2mantest \) \ + \! -name '.#*' \! -name '*~' \! -type l \ + | sort > $(TARFILE).list -tar: ../$(TARFILE).list +tar: $(TARFILE).list find . -type d -print | xargs chmod 755 find . -type f -print | xargs chmod a+r find . -type f -perm -0100 -print | xargs chmod a+x - $(TAR_COMMAND) | gzip --best >../$(TARFILE).gz - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE).gz + $(TAR_COMMAND) | gzip --best > $(TARFILE).gz + rm -f $(TARFILE).list + ls -l $(TARFILE).gz -tar-snap: ../$(TARFILE).list - $(TAR_COMMAND) > ../$(TARFILE) - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE) +tar-snap: $(TARFILE).list + $(TAR_COMMAND) > $(TARFILE) + rm -f $(TARFILE).list + ls -l $(TARFILE) dist: $(PERL) Configure dist - @$(MAKE) dist_pem_h @$(MAKE) SDIRS='$(SDIRS)' clean - @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar - -dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar install: all install_docs install_sw diff --git a/deps/openssl/openssl/Makefile.org b/deps/openssl/openssl/Makefile.org index 0333644415a2aa..76fdbdf6ac5c2a 100644 --- a/deps/openssl/openssl/Makefile.org +++ b/deps/openssl/openssl/Makefile.org @@ -180,8 +180,7 @@ SHARED_LDFLAGS= GENERAL= Makefile BASENAME= openssl NAME= $(BASENAME)-$(VERSION) -TARFILE= $(NAME).tar -WTARFILE= $(NAME)-win.tar +TARFILE= ../$(NAME).tar EXHEADER= e_os2.h HEADER= e_os.h @@ -499,38 +498,35 @@ TABLE: Configure # would occur. Therefore the list of files is temporarily stored into a file # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal # tar does not support the --files-from option. -TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list \ - --owner openssl:0 --group openssl:0 \ - --transform 's|^|openssl-$(VERSION)/|' \ +TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \ + --owner 0 --group 0 \ + --transform 's|^|$(NAME)/|' \ -cvf - -../$(TARFILE).list: +$(TARFILE).list: find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \ \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \ - \! -name '*test' \! -name '.#*' \! -name '*~' \ - | sort > ../$(TARFILE).list + \( \! -name '*test' -o -name bctest -o -name pod2mantest \) \ + \! -name '.#*' \! -name '*~' \! -type l \ + | sort > $(TARFILE).list -tar: ../$(TARFILE).list +tar: $(TARFILE).list find . -type d -print | xargs chmod 755 find . -type f -print | xargs chmod a+r find . -type f -perm -0100 -print | xargs chmod a+x - $(TAR_COMMAND) | gzip --best >../$(TARFILE).gz - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE).gz + $(TAR_COMMAND) | gzip --best > $(TARFILE).gz + rm -f $(TARFILE).list + ls -l $(TARFILE).gz -tar-snap: ../$(TARFILE).list - $(TAR_COMMAND) > ../$(TARFILE) - rm -f ../$(TARFILE).list - ls -l ../$(TARFILE) +tar-snap: $(TARFILE).list + $(TAR_COMMAND) > $(TARFILE) + rm -f $(TARFILE).list + ls -l $(TARFILE) dist: $(PERL) Configure dist - @$(MAKE) dist_pem_h @$(MAKE) SDIRS='$(SDIRS)' clean - @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar - -dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar install: all install_docs install_sw diff --git a/deps/openssl/openssl/NEWS b/deps/openssl/openssl/NEWS index e1c78f834f0818..06c77025e999d7 100644 --- a/deps/openssl/openssl/NEWS +++ b/deps/openssl/openssl/NEWS @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2e and OpenSSL 1.0.2f [28 Jan 2016] + + o DH small subgroups (CVE-2016-0701) + o SSLv2 doesn't block disabled ciphers (CVE-2015-3197) + Major changes between OpenSSL 1.0.2d and OpenSSL 1.0.2e [3 Dec 2015] o BN_mod_exp may produce incorrect results on x86_64 (CVE-2015-3193) diff --git a/deps/openssl/openssl/README b/deps/openssl/openssl/README index 49c4c9f147c3bc..1e9869daee000d 100644 --- a/deps/openssl/openssl/README +++ b/deps/openssl/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.0.2e 3 Dec 2015 + OpenSSL 1.0.2f 28 Jan 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -90,11 +90,12 @@ In order to avoid spam, this is a moderated mailing list, and it might take a day for the ticket to show up. (We also scan posts to make sure - that security disclosures aren't publically posted by mistake.) Mail to - this address is recorded in the public RT (request tracker) database (see - https://www.openssl.org/support/rt.html for details) and also forwarded - the public openssl-dev mailing list. Confidential mail may be sent to - openssl-security@openssl.org (PGP key available from the key servers). + that security disclosures aren't publically posted by mistake.) Mail + to this address is recorded in the public RT (request tracker) database + (see https://www.openssl.org/community/index.html#bugs for details) and + also forwarded the public openssl-dev mailing list. Confidential mail + may be sent to openssl-security@openssl.org (PGP key available from the + key servers). Please do NOT use this for general assistance or support queries. Just because something doesn't work the way you expect does not mean it diff --git a/deps/openssl/openssl/apps/app_rand.c b/deps/openssl/openssl/apps/app_rand.c index ef0dd2ba8cabdd..7f40bba7646882 100644 --- a/deps/openssl/openssl/apps/app_rand.c +++ b/deps/openssl/openssl/apps/app_rand.c @@ -124,13 +124,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) char buffer[200]; #ifdef OPENSSL_SYS_WINDOWS - /* - * allocate 2 to dont_warn not to use RAND_screen() via - * -no_rand_screen option in s_client - */ - if (dont_warn != 2) { - RAND_screen(); - } + RAND_screen(); #endif if (file == NULL) diff --git a/deps/openssl/openssl/apps/engine.c b/deps/openssl/openssl/apps/engine.c index 460ec60cb14c89..f54631b50d819a 100644 --- a/deps/openssl/openssl/apps/engine.c +++ b/deps/openssl/openssl/apps/engine.c @@ -1,4 +1,4 @@ -/* apps/engine.c -*- mode: C; c-file-style: "eay" -*- */ +/* apps/engine.c */ /* * Written by Richard Levitte for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/apps/md4.c b/deps/openssl/openssl/apps/md4.c deleted file mode 120000 index 03269af9bc5dd8..00000000000000 --- a/deps/openssl/openssl/apps/md4.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/md4/md4.c \ No newline at end of file diff --git a/deps/openssl/openssl/apps/ocsp.c b/deps/openssl/openssl/apps/ocsp.c index 6ed255d4b5635c..5da51df5148c8c 100644 --- a/deps/openssl/openssl/apps/ocsp.c +++ b/deps/openssl/openssl/apps/ocsp.c @@ -1041,7 +1041,7 @@ static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, bs = OCSP_BASICRESP_new(); thisupd = X509_gmtime_adj(NULL, 0); if (ndays != -1) - nextupd = X509_gmtime_adj(NULL, nmin * 60 + ndays * 3600 * 24); + nextupd = X509_time_adj_ex(NULL, ndays, nmin * 60, NULL); /* Examine each certificate id in the request */ for (i = 0; i < id_count; i++) { diff --git a/deps/openssl/openssl/apps/pkcs12.c b/deps/openssl/openssl/apps/pkcs12.c index e41b445a50b052..cbb75b7d5fe49a 100644 --- a/deps/openssl/openssl/apps/pkcs12.c +++ b/deps/openssl/openssl/apps/pkcs12.c @@ -79,7 +79,8 @@ const EVP_CIPHER *enc; # define CLCERTS 0x8 # define CACERTS 0x10 -int get_cert_chain(X509 *cert, X509_STORE *store, STACK_OF(X509) **chain); +static int get_cert_chain(X509 *cert, X509_STORE *store, + STACK_OF(X509) **chain); int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options, char *pempass); int dump_certs_pkeys_bags(BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags, @@ -594,7 +595,7 @@ int MAIN(int argc, char **argv) vret = get_cert_chain(ucert, store, &chain2); X509_STORE_free(store); - if (!vret) { + if (vret == X509_V_OK) { /* Exclude verified certificate */ for (i = 1; i < sk_X509_num(chain2); i++) sk_X509_push(certs, sk_X509_value(chain2, i)); @@ -602,7 +603,7 @@ int MAIN(int argc, char **argv) X509_free(sk_X509_value(chain2, 0)); sk_X509_free(chain2); } else { - if (vret >= 0) + if (vret != X509_V_ERR_UNSPECIFIED) BIO_printf(bio_err, "Error %s getting chain.\n", X509_verify_cert_error_string(vret)); else @@ -906,36 +907,25 @@ int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bag, char *pass, /* Given a single certificate return a verified chain or NULL if error */ -/* Hope this is OK .... */ - -int get_cert_chain(X509 *cert, X509_STORE *store, STACK_OF(X509) **chain) +static int get_cert_chain(X509 *cert, X509_STORE *store, + STACK_OF(X509) **chain) { X509_STORE_CTX store_ctx; - STACK_OF(X509) *chn; + STACK_OF(X509) *chn = NULL; int i = 0; - /* - * FIXME: Should really check the return status of X509_STORE_CTX_init - * for an error, but how that fits into the return value of this function - * is less obvious. - */ - X509_STORE_CTX_init(&store_ctx, store, cert, NULL); - if (X509_verify_cert(&store_ctx) <= 0) { - i = X509_STORE_CTX_get_error(&store_ctx); - if (i == 0) - /* - * avoid returning 0 if X509_verify_cert() did not set an - * appropriate error value in the context - */ - i = -1; - chn = NULL; - goto err; - } else + if (!X509_STORE_CTX_init(&store_ctx, store, cert, NULL)) { + *chain = NULL; + return X509_V_ERR_UNSPECIFIED; + } + + if (X509_verify_cert(&store_ctx) > 0) chn = X509_STORE_CTX_get1_chain(&store_ctx); - err: + else if ((i = X509_STORE_CTX_get_error(&store_ctx)) == 0) + i = X509_V_ERR_UNSPECIFIED; + X509_STORE_CTX_cleanup(&store_ctx); *chain = chn; - return i; } diff --git a/deps/openssl/openssl/apps/pkeyutl.c b/deps/openssl/openssl/apps/pkeyutl.c index aaa90740ad4dc6..501fd6304ad0e8 100644 --- a/deps/openssl/openssl/apps/pkeyutl.c +++ b/deps/openssl/openssl/apps/pkeyutl.c @@ -74,10 +74,11 @@ static void usage(void); static EVP_PKEY_CTX *init_ctx(int *pkeysize, char *keyfile, int keyform, int key_type, - char *passargin, int pkey_op, ENGINE *e); + char *passargin, int pkey_op, ENGINE *e, + int impl); static int setup_peer(BIO *err, EVP_PKEY_CTX *ctx, int peerform, - const char *file); + const char *file, ENGINE* e); static int do_keyop(EVP_PKEY_CTX *ctx, int pkey_op, unsigned char *out, size_t *poutlen, @@ -97,6 +98,7 @@ int MAIN(int argc, char **argv) EVP_PKEY_CTX *ctx = NULL; char *passargin = NULL; int keysize = -1; + int engine_impl = 0; unsigned char *buf_in = NULL, *buf_out = NULL, *sig = NULL; size_t buf_outlen; @@ -137,7 +139,7 @@ int MAIN(int argc, char **argv) else { ctx = init_ctx(&keysize, *(++argv), keyform, key_type, - passargin, pkey_op, e); + passargin, pkey_op, e, engine_impl); if (!ctx) { BIO_puts(bio_err, "Error initializing context\n"); ERR_print_errors(bio_err); @@ -147,7 +149,7 @@ int MAIN(int argc, char **argv) } else if (!strcmp(*argv, "-peerkey")) { if (--argc < 1) badarg = 1; - else if (!setup_peer(bio_err, ctx, peerform, *(++argv))) + else if (!setup_peer(bio_err, ctx, peerform, *(++argv), e)) badarg = 1; } else if (!strcmp(*argv, "-passin")) { if (--argc < 1) @@ -171,6 +173,8 @@ int MAIN(int argc, char **argv) badarg = 1; else e = setup_engine(bio_err, *(++argv), 0); + } else if (!strcmp(*argv, "-engine_impl")) { + engine_impl = 1; } #endif else if (!strcmp(*argv, "-pubin")) @@ -368,7 +372,8 @@ static void usage() BIO_printf(bio_err, "-hexdump hex dump output\n"); #ifndef OPENSSL_NO_ENGINE BIO_printf(bio_err, - "-engine e use engine e, possibly a hardware device.\n"); + "-engine e use engine e, maybe a hardware device, for loading keys.\n"); + BIO_printf(bio_err, "-engine_impl also use engine given by -engine for crypto operations\n"); #endif BIO_printf(bio_err, "-passin arg pass phrase source\n"); @@ -376,10 +381,12 @@ static void usage() static EVP_PKEY_CTX *init_ctx(int *pkeysize, char *keyfile, int keyform, int key_type, - char *passargin, int pkey_op, ENGINE *e) + char *passargin, int pkey_op, ENGINE *e, + int engine_impl) { EVP_PKEY *pkey = NULL; EVP_PKEY_CTX *ctx = NULL; + ENGINE *impl = NULL; char *passin = NULL; int rv = -1; X509 *x; @@ -419,7 +426,12 @@ static EVP_PKEY_CTX *init_ctx(int *pkeysize, if (!pkey) goto end; - ctx = EVP_PKEY_CTX_new(pkey, e); +#ifndef OPENSSL_NO_ENGINE + if (engine_impl) + impl = e; +#endif + + ctx = EVP_PKEY_CTX_new(pkey, impl); EVP_PKEY_free(pkey); @@ -467,16 +479,20 @@ static EVP_PKEY_CTX *init_ctx(int *pkeysize, } static int setup_peer(BIO *err, EVP_PKEY_CTX *ctx, int peerform, - const char *file) + const char *file, ENGINE* e) { EVP_PKEY *peer = NULL; + ENGINE* engine = NULL; int ret; if (!ctx) { BIO_puts(err, "-peerkey command before -inkey\n"); return 0; } - peer = load_pubkey(bio_err, file, peerform, 0, NULL, NULL, "Peer Key"); + if (peerform == FORMAT_ENGINE) + engine = e; + + peer = load_pubkey(bio_err, file, peerform, 0, NULL, engine, "Peer Key"); if (!peer) { BIO_printf(bio_err, "Error reading peer key %s\n", file); diff --git a/deps/openssl/openssl/apps/s_client.c b/deps/openssl/openssl/apps/s_client.c index 95fe6d48c7ba36..022ca6cf6b22d7 100644 --- a/deps/openssl/openssl/apps/s_client.c +++ b/deps/openssl/openssl/apps/s_client.c @@ -236,7 +236,6 @@ static BIO *bio_c_msg = NULL; static int c_quiet = 0; static int c_ign_eof = 0; static int c_brief = 0; -static int c_no_rand_screen = 0; #ifndef OPENSSL_NO_PSK /* Default PSK identity and key */ @@ -316,7 +315,7 @@ static void sc_usage(void) " -connect host:port - who to connect to (default is %s:%s)\n", SSL_HOST_NAME, PORT_STR); BIO_printf(bio_err, - " -verify_host host - check peer certificate matches \"host\"\n"); + " -verify_hostname host - check peer certificate matches \"host\"\n"); BIO_printf(bio_err, " -verify_email email - check peer certificate matches \"email\"\n"); BIO_printf(bio_err, @@ -457,10 +456,6 @@ static void sc_usage(void) " -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err, " -keymatexportlen len - Export len bytes of keying material (default 20)\n"); -#ifdef OPENSSL_SYS_WINDOWS - BIO_printf(bio_err, - " -no_rand_screen - Do not use RAND_screen() to initialize random state\n"); -#endif } #ifndef OPENSSL_NO_TLSEXT @@ -1140,10 +1135,6 @@ int MAIN(int argc, char **argv) keymatexportlen = atoi(*(++argv)); if (keymatexportlen == 0) goto bad; -#ifdef OPENSSL_SYS_WINDOWS - } else if (strcmp(*argv, "-no_rand_screen") == 0) { - c_no_rand_screen = 1; -#endif } else { BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; @@ -1249,7 +1240,7 @@ int MAIN(int argc, char **argv) if (!load_excert(&exc, bio_err)) goto end; - if (!app_RAND_load_file(NULL, bio_err, ++c_no_rand_screen) && inrand == NULL + if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL && !RAND_status()) { BIO_printf(bio_err, "warning, not much extra random data, consider using the -rand option\n"); diff --git a/deps/openssl/openssl/apps/s_server.c b/deps/openssl/openssl/apps/s_server.c index f19532b75fabd1..65cbaaf6eb9b2e 100644 --- a/deps/openssl/openssl/apps/s_server.c +++ b/deps/openssl/openssl/apps/s_server.c @@ -498,7 +498,7 @@ static void sv_usage(void) BIO_printf(bio_err, " -accept arg - port to accept on (default is %d)\n", PORT); BIO_printf(bio_err, - " -verify_host host - check peer certificate matches \"host\"\n"); + " -verify_hostname host - check peer certificate matches \"host\"\n"); BIO_printf(bio_err, " -verify_email email - check peer certificate matches \"email\"\n"); BIO_printf(bio_err, diff --git a/deps/openssl/openssl/apps/speed.c b/deps/openssl/openssl/apps/speed.c index 3697b71ec18b45..95adcc19cc15f1 100644 --- a/deps/openssl/openssl/apps/speed.c +++ b/deps/openssl/openssl/apps/speed.c @@ -1,4 +1,4 @@ -/* apps/speed.c -*- mode:C; c-file-style: "eay" -*- */ +/* apps/speed.c */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * diff --git a/deps/openssl/openssl/apps/x509.c b/deps/openssl/openssl/apps/x509.c index 864a60dda2e7ff..7c215bced00106 100644 --- a/deps/openssl/openssl/apps/x509.c +++ b/deps/openssl/openssl/apps/x509.c @@ -1226,12 +1226,7 @@ static int sign(X509 *x, EVP_PKEY *pkey, int days, int clrext, if (X509_gmtime_adj(X509_get_notBefore(x), 0) == NULL) goto err; - /* Lets just make it 12:00am GMT, Jan 1 1970 */ - /* memcpy(x->cert_info->validity->notBefore,"700101120000Z",13); */ - /* 28 days to be certified */ - - if (X509_gmtime_adj(X509_get_notAfter(x), (long)60 * 60 * 24 * days) == - NULL) + if (X509_time_adj_ex(X509_get_notAfter(x), days, 0, NULL) == NULL) goto err; if (!X509_set_pubkey(x, pkey)) diff --git a/deps/openssl/openssl/crypto/aes/aes.h b/deps/openssl/openssl/crypto/aes/aes.h index 87bf60f6f2bfbe..faa66c49148f50 100644 --- a/deps/openssl/openssl/crypto/aes/aes.h +++ b/deps/openssl/openssl/crypto/aes/aes.h @@ -1,4 +1,4 @@ -/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes.h */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_cbc.c b/deps/openssl/openssl/crypto/aes/aes_cbc.c index e39231f17cb8e4..805d0e260a6f28 100644 --- a/deps/openssl/openssl/crypto/aes/aes_cbc.c +++ b/deps/openssl/openssl/crypto/aes/aes_cbc.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_cbc.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_cbc.c */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_cfb.c b/deps/openssl/openssl/crypto/aes/aes_cfb.c index 1c79ce2dbaa17a..1225000963ea09 100644 --- a/deps/openssl/openssl/crypto/aes/aes_cfb.c +++ b/deps/openssl/openssl/crypto/aes/aes_cfb.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_cfb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_cfb.c */ /* ==================================================================== * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_core.c b/deps/openssl/openssl/crypto/aes/aes_core.c index 2ddb0860d78aca..7019b5d7aa3a5d 100644 --- a/deps/openssl/openssl/crypto/aes/aes_core.c +++ b/deps/openssl/openssl/crypto/aes/aes_core.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_core.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_core.c */ /** * rijndael-alg-fst.c * diff --git a/deps/openssl/openssl/crypto/aes/aes_ctr.c b/deps/openssl/openssl/crypto/aes/aes_ctr.c index 3ee382299881c1..9e760c4b12adbb 100644 --- a/deps/openssl/openssl/crypto/aes/aes_ctr.c +++ b/deps/openssl/openssl/crypto/aes/aes_ctr.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_ctr.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_ctr.c */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_ecb.c b/deps/openssl/openssl/crypto/aes/aes_ecb.c index 2e0d20ca224e95..52151a5c70f446 100644 --- a/deps/openssl/openssl/crypto/aes/aes_ecb.c +++ b/deps/openssl/openssl/crypto/aes/aes_ecb.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_ecb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_ecb.c */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_ige.c b/deps/openssl/openssl/crypto/aes/aes_ige.c index cf31c9bba44ade..8f2b7706472a04 100644 --- a/deps/openssl/openssl/crypto/aes/aes_ige.c +++ b/deps/openssl/openssl/crypto/aes/aes_ige.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_ige.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_ige.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_locl.h b/deps/openssl/openssl/crypto/aes/aes_locl.h index fabfd02ac095e0..7acd74ec1603a7 100644 --- a/deps/openssl/openssl/crypto/aes/aes_locl.h +++ b/deps/openssl/openssl/crypto/aes/aes_locl.h @@ -1,4 +1,4 @@ -/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes.h */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_misc.c b/deps/openssl/openssl/crypto/aes/aes_misc.c index ab948ad85eb462..fafad4d6f57a36 100644 --- a/deps/openssl/openssl/crypto/aes/aes_misc.c +++ b/deps/openssl/openssl/crypto/aes/aes_misc.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_misc.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_misc.c */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_ofb.c b/deps/openssl/openssl/crypto/aes/aes_ofb.c index e6153f99ba70e1..64a08caaec6de5 100644 --- a/deps/openssl/openssl/crypto/aes/aes_ofb.c +++ b/deps/openssl/openssl/crypto/aes/aes_ofb.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_ofb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_ofb.c */ /* ==================================================================== * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/aes/aes_x86core.c b/deps/openssl/openssl/crypto/aes/aes_x86core.c index c869ed7198520d..b5dd6976772ac4 100644 --- a/deps/openssl/openssl/crypto/aes/aes_x86core.c +++ b/deps/openssl/openssl/crypto/aes/aes_x86core.c @@ -1,4 +1,4 @@ -/* crypto/aes/aes_core.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes_core.c */ /** * rijndael-alg-fst.c * diff --git a/deps/openssl/openssl/crypto/aes/asm/aesni-mb-x86_64.pl b/deps/openssl/openssl/crypto/aes/asm/aesni-mb-x86_64.pl index 5a100fa8983b57..d7ad7882c4ee97 100644 --- a/deps/openssl/openssl/crypto/aes/asm/aesni-mb-x86_64.pl +++ b/deps/openssl/openssl/crypto/aes/asm/aesni-mb-x86_64.pl @@ -63,7 +63,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl b/deps/openssl/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl index c803cdebc112a4..8c84260856e164 100644 --- a/deps/openssl/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl +++ b/deps/openssl/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl @@ -94,7 +94,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && `ml64 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0); +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0); $shaext=1; ### set to zero if compiling for 1.0.1 diff --git a/deps/openssl/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl b/deps/openssl/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl index bfe29268c78147..72f44ecf625345 100644 --- a/deps/openssl/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl +++ b/deps/openssl/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl @@ -59,7 +59,7 @@ $avx = ($1>=10) + ($1>=12); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/bio/bio.h b/deps/openssl/openssl/crypto/bio/bio.h index f78796b069f547..6e2293bc66daad 100644 --- a/deps/openssl/openssl/crypto/bio/bio.h +++ b/deps/openssl/openssl/crypto/bio/bio.h @@ -479,11 +479,11 @@ struct bio_dgram_sctp_prinfo { # define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) # define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) # define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2) -# define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0) +# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,0,NULL) # define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) -/* BIO_s_accept_socket() */ +/* BIO_s_accept() */ # define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) # define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) /* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ @@ -496,6 +496,7 @@ struct bio_dgram_sctp_prinfo { # define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) # define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) +/* BIO_s_accept() and BIO_s_connect() */ # define BIO_do_connect(b) BIO_do_handshake(b) # define BIO_do_accept(b) BIO_do_handshake(b) # define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) @@ -515,12 +516,15 @@ struct bio_dgram_sctp_prinfo { # define BIO_get_url(b,url) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url)) # define BIO_get_no_connect_return(b) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL) +/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */ # define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) # define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) +/* BIO_s_file() */ # define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp) # define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp) +/* BIO_s_fd() and BIO_s_file() */ # define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) # define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) diff --git a/deps/openssl/openssl/crypto/bio/bss_bio.c b/deps/openssl/openssl/crypto/bio/bss_bio.c index d629a37a5a1dbf..4d8727f8f890cc 100644 --- a/deps/openssl/openssl/crypto/bio/bss_bio.c +++ b/deps/openssl/openssl/crypto/bio/bss_bio.c @@ -1,4 +1,4 @@ -/* crypto/bio/bss_bio.c -*- Mode: C; c-file-style: "eay" -*- */ +/* crypto/bio/bss_bio.c */ /* ==================================================================== * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/bio/bss_conn.c b/deps/openssl/openssl/crypto/bio/bss_conn.c index 42d0afffbc6c4c..7d15ad29dcd70e 100644 --- a/deps/openssl/openssl/crypto/bio/bss_conn.c +++ b/deps/openssl/openssl/crypto/bio/bss_conn.c @@ -419,7 +419,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) { BIO *dbio; int *ip; - const char **pptr; + const char **pptr = NULL; long ret = 1; BIO_CONNECT *data; @@ -442,19 +442,28 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_C_GET_CONNECT: if (ptr != NULL) { pptr = (const char **)ptr; - if (num == 0) { - *pptr = data->param_hostname; + } - } else if (num == 1) { - *pptr = data->param_port; - } else if (num == 2) { - *pptr = (char *)&(data->ip[0]); - } else if (num == 3) { - *((int *)ptr) = data->port; + if (b->init) { + if (pptr != NULL) { + ret = 1; + if (num == 0) { + *pptr = data->param_hostname; + } else if (num == 1) { + *pptr = data->param_port; + } else if (num == 2) { + *pptr = (char *)&(data->ip[0]); + } else { + ret = 0; + } + } + if (num == 3) { + ret = data->port; } - if ((!b->init) || (ptr == NULL)) + } else { + if (pptr != NULL) *pptr = "not initialized"; - ret = 1; + ret = 0; } break; case BIO_C_SET_CONNECT: diff --git a/deps/openssl/openssl/crypto/bio/bss_dgram.c b/deps/openssl/openssl/crypto/bio/bss_dgram.c index 7fcd831da06bed..bdd7bf88ea0e85 100644 --- a/deps/openssl/openssl/crypto/bio/bss_dgram.c +++ b/deps/openssl/openssl/crypto/bio/bss_dgram.c @@ -519,10 +519,8 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) switch (cmd) { case BIO_CTRL_RESET: num = 0; - case BIO_C_FILE_SEEK: ret = 0; break; - case BIO_C_FILE_TELL: case BIO_CTRL_INFO: ret = 0; break; diff --git a/deps/openssl/openssl/crypto/bn/asm/rsaz-x86_64.pl b/deps/openssl/openssl/crypto/bn/asm/rsaz-x86_64.pl index 12b571c282dc52..091cdc2069da4b 100755 --- a/deps/openssl/openssl/crypto/bn/asm/rsaz-x86_64.pl +++ b/deps/openssl/openssl/crypto/bn/asm/rsaz-x86_64.pl @@ -113,7 +113,7 @@ $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9])\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } diff --git a/deps/openssl/openssl/crypto/bn/asm/x86_64-mont.pl b/deps/openssl/openssl/crypto/bn/asm/x86_64-mont.pl index 725833d022e261..e82e451388c75c 100755 --- a/deps/openssl/openssl/crypto/bn/asm/x86_64-mont.pl +++ b/deps/openssl/openssl/crypto/bn/asm/x86_64-mont.pl @@ -68,7 +68,7 @@ $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9])\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } diff --git a/deps/openssl/openssl/crypto/bn/asm/x86_64-mont5.pl b/deps/openssl/openssl/crypto/bn/asm/x86_64-mont5.pl index 64e668f140c24e..292409c4ffb8b1 100755 --- a/deps/openssl/openssl/crypto/bn/asm/x86_64-mont5.pl +++ b/deps/openssl/openssl/crypto/bn/asm/x86_64-mont5.pl @@ -53,7 +53,7 @@ $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9])\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } diff --git a/deps/openssl/openssl/crypto/bn/bn_exp.c b/deps/openssl/openssl/crypto/bn/bn_exp.c index 50cf3231b07b71..6d30d1e0fff56e 100644 --- a/deps/openssl/openssl/crypto/bn/bn_exp.c +++ b/deps/openssl/openssl/crypto/bn/bn_exp.c @@ -282,9 +282,14 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, } bits = BN_num_bits(p); - if (bits == 0) { - ret = BN_one(r); + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) { + ret = 1; + BN_zero(r); + } else { + ret = BN_one(r); + } return ret; } @@ -418,7 +423,13 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, } bits = BN_num_bits(p); if (bits == 0) { - ret = BN_one(rr); + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) { + ret = 1; + BN_zero(rr); + } else { + ret = BN_one(rr); + } return ret; } @@ -639,7 +650,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, * precomputation memory layout to limit data-dependency to a minimum to * protect secret exponents (cf. the hyper-threading timing attacks pointed * out by Colin Percival, - * http://www.daemong-consideredperthreading-considered-harmful/) + * http://www.daemonology.net/hyperthreading-considered-harmful/) */ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, @@ -671,7 +682,13 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, bits = BN_num_bits(p); if (bits == 0) { - ret = BN_one(rr); + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) { + ret = 1; + BN_zero(rr); + } else { + ret = BN_one(rr); + } return ret; } @@ -1182,8 +1199,9 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, if (BN_is_one(m)) { ret = 1; BN_zero(rr); - } else + } else { ret = BN_one(rr); + } return ret; } if (a == 0) { @@ -1297,9 +1315,14 @@ int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, } bits = BN_num_bits(p); - - if (bits == 0) { - ret = BN_one(r); + if (bits == 0) { + /* x**0 mod 1 is still zero. */ + if (BN_is_one(m)) { + ret = 1; + BN_zero(r); + } else { + ret = BN_one(r); + } return ret; } diff --git a/deps/openssl/openssl/crypto/bn/exptest.c b/deps/openssl/openssl/crypto/bn/exptest.c index 8b3a4bae43288f..ac611c2e261449 100644 --- a/deps/openssl/openssl/crypto/bn/exptest.c +++ b/deps/openssl/openssl/crypto/bn/exptest.c @@ -72,6 +72,25 @@ static const char rnd_seed[] = "string to make the random number generator think it has entropy"; +/* + * Test that r == 0 in test_exp_mod_zero(). Returns one on success, + * returns zero and prints debug output otherwise. + */ +static int a_is_zero_mod_one(const char *method, const BIGNUM *r, + const BIGNUM *a) { + if (!BN_is_zero(r)) { + fprintf(stderr, "%s failed:\n", method); + fprintf(stderr, "a ** 0 mod 1 = r (should be 0)\n"); + fprintf(stderr, "a = "); + BN_print_fp(stderr, a); + fprintf(stderr, "\nr = "); + BN_print_fp(stderr, r); + fprintf(stderr, "\n"); + return 0; + } + return 1; +} + /* * test_exp_mod_zero tests that x**0 mod 1 == 0. It returns zero on success. */ @@ -79,8 +98,9 @@ static int test_exp_mod_zero() { BIGNUM a, p, m; BIGNUM r; + BN_ULONG one_word = 1; BN_CTX *ctx = BN_CTX_new(); - int ret = 1; + int ret = 1, failed = 0; BN_init(&m); BN_one(&m); @@ -92,21 +112,65 @@ static int test_exp_mod_zero() BN_zero(&p); BN_init(&r); - BN_mod_exp(&r, &a, &p, &m, ctx); - BN_CTX_free(ctx); - if (BN_is_zero(&r)) - ret = 0; - else { - printf("1**0 mod 1 = "); - BN_print_fp(stdout, &r); - printf(", should be 0\n"); + if (!BN_rand(&a, 1024, 0, 0)) + goto err; + + if (!BN_mod_exp(&r, &a, &p, &m, ctx)) + goto err; + + if (!a_is_zero_mod_one("BN_mod_exp", &r, &a)) + failed = 1; + + if (!BN_mod_exp_recp(&r, &a, &p, &m, ctx)) + goto err; + + if (!a_is_zero_mod_one("BN_mod_exp_recp", &r, &a)) + failed = 1; + + if (!BN_mod_exp_simple(&r, &a, &p, &m, ctx)) + goto err; + + if (!a_is_zero_mod_one("BN_mod_exp_simple", &r, &a)) + failed = 1; + + if (!BN_mod_exp_mont(&r, &a, &p, &m, ctx, NULL)) + goto err; + + if (!a_is_zero_mod_one("BN_mod_exp_mont", &r, &a)) + failed = 1; + + if (!BN_mod_exp_mont_consttime(&r, &a, &p, &m, ctx, NULL)) { + goto err; + } + + if (!a_is_zero_mod_one("BN_mod_exp_mont_consttime", &r, &a)) + failed = 1; + + /* + * A different codepath exists for single word multiplication + * in non-constant-time only. + */ + if (!BN_mod_exp_mont_word(&r, one_word, &p, &m, ctx, NULL)) + goto err; + + if (!BN_is_zero(&r)) { + fprintf(stderr, "BN_mod_exp_mont_word failed:\n"); + fprintf(stderr, "1 ** 0 mod 1 = r (should be 0)\n"); + fprintf(stderr, "r = "); + BN_print_fp(stderr, &r); + fprintf(stderr, "\n"); + return 0; } + ret = failed; + + err: BN_free(&r); BN_free(&a); BN_free(&p); BN_free(&m); + BN_CTX_free(ctx); return ret; } diff --git a/deps/openssl/openssl/crypto/camellia/camellia.c b/deps/openssl/openssl/crypto/camellia/camellia.c index b4a6766c623ca9..719fa61cf627f2 100644 --- a/deps/openssl/openssl/crypto/camellia/camellia.c +++ b/deps/openssl/openssl/crypto/camellia/camellia.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia.c */ /* ==================================================================== * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . * ALL RIGHTS RESERVED. @@ -67,7 +67,7 @@ /* * Algorithm Specification - * http://info.isl.llia/specicrypt/eng/camellia/specifications.html + * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html */ /* diff --git a/deps/openssl/openssl/crypto/camellia/camellia.h b/deps/openssl/openssl/crypto/camellia/camellia.h index 9be7c0fd999667..45e8d25b1dd5b5 100644 --- a/deps/openssl/openssl/crypto/camellia/camellia.h +++ b/deps/openssl/openssl/crypto/camellia/camellia.h @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia.h */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_cbc.c b/deps/openssl/openssl/crypto/camellia/cmll_cbc.c index a4907ca05f78c1..4017e00d9272a3 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_cbc.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_cbc.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_cbc.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_cbc.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_cfb.c b/deps/openssl/openssl/crypto/camellia/cmll_cfb.c index 59b85225c35e20..78f2ae4566b12e 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_cfb.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_cfb.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_cfb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_cfb.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_ctr.c b/deps/openssl/openssl/crypto/camellia/cmll_ctr.c index b8f523d446481a..95e26621b7d853 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_ctr.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_ctr.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_ctr.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_ctr.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_ecb.c b/deps/openssl/openssl/crypto/camellia/cmll_ecb.c index 16f1af86ac38d3..b030791b275cb7 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_ecb.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_ecb.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_ecb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_ecb.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_locl.h b/deps/openssl/openssl/crypto/camellia/cmll_locl.h index 4e4707b6213e43..2bd79b8c4eb332 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_locl.h +++ b/deps/openssl/openssl/crypto/camellia/cmll_locl.h @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_locl.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_locl.h */ /* ==================================================================== * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . * ALL RIGHTS RESERVED. diff --git a/deps/openssl/openssl/crypto/camellia/cmll_misc.c b/deps/openssl/openssl/crypto/camellia/cmll_misc.c index cbd250227becca..694d2fac8f1fd1 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_misc.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_misc.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_misc.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_misc.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_ofb.c b/deps/openssl/openssl/crypto/camellia/cmll_ofb.c index 46c3ae2af73766..85eb8921568ffe 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_ofb.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_ofb.c @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia_ofb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia_ofb.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/camellia/cmll_utl.c b/deps/openssl/openssl/crypto/camellia/cmll_utl.c index d19ee19317ce7e..d5eb6b4d68b1a5 100644 --- a/deps/openssl/openssl/crypto/camellia/cmll_utl.c +++ b/deps/openssl/openssl/crypto/camellia/cmll_utl.c @@ -1,4 +1,4 @@ -/* crypto/camellia/cmll_utl.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/cmll_utl.c */ /* ==================================================================== * Copyright (c) 2011 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/des/des_old.c b/deps/openssl/openssl/crypto/des/des_old.c index 54b0968e663b4f..c5c5a00f00c101 100644 --- a/deps/openssl/openssl/crypto/des/des_old.c +++ b/deps/openssl/openssl/crypto/des/des_old.c @@ -1,4 +1,4 @@ -/* crypto/des/des_old.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/des/des_old.c */ /*- * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING diff --git a/deps/openssl/openssl/crypto/des/des_old.h b/deps/openssl/openssl/crypto/des/des_old.h index f1e1e2cb09cfb2..ee7607a2415f83 100644 --- a/deps/openssl/openssl/crypto/des/des_old.h +++ b/deps/openssl/openssl/crypto/des/des_old.h @@ -1,4 +1,4 @@ -/* crypto/des/des_old.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/des/des_old.h */ /*- * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING diff --git a/deps/openssl/openssl/crypto/des/des_old2.c b/deps/openssl/openssl/crypto/des/des_old2.c index f7d28a67135542..247ff8dcf85f70 100644 --- a/deps/openssl/openssl/crypto/des/des_old2.c +++ b/deps/openssl/openssl/crypto/des/des_old2.c @@ -1,4 +1,4 @@ -/* crypto/des/des_old.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/des/des_old.c */ /* * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING The diff --git a/deps/openssl/openssl/crypto/dh/dh.h b/deps/openssl/openssl/crypto/dh/dh.h index b17767328183e0..5498a9dc106044 100644 --- a/deps/openssl/openssl/crypto/dh/dh.h +++ b/deps/openssl/openssl/crypto/dh/dh.h @@ -174,6 +174,7 @@ struct dh_st { /* DH_check_pub_key error codes */ # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 +# define DH_CHECK_PUBKEY_INVALID 0x03 /* * primes p where (p-1)/2 is prime too are called "safe"; we define this for diff --git a/deps/openssl/openssl/crypto/dh/dh_check.c b/deps/openssl/openssl/crypto/dh/dh_check.c index 347467c6a43369..5adedc0d264e99 100644 --- a/deps/openssl/openssl/crypto/dh/dh_check.c +++ b/deps/openssl/openssl/crypto/dh/dh_check.c @@ -151,23 +151,38 @@ int DH_check(const DH *dh, int *ret) int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) { int ok = 0; - BIGNUM *q = NULL; + BIGNUM *tmp = NULL; + BN_CTX *ctx = NULL; *ret = 0; - q = BN_new(); - if (q == NULL) + ctx = BN_CTX_new(); + if (ctx == NULL) goto err; - BN_set_word(q, 1); - if (BN_cmp(pub_key, q) <= 0) + BN_CTX_start(ctx); + tmp = BN_CTX_get(ctx); + if (tmp == NULL) + goto err; + BN_set_word(tmp, 1); + if (BN_cmp(pub_key, tmp) <= 0) *ret |= DH_CHECK_PUBKEY_TOO_SMALL; - BN_copy(q, dh->p); - BN_sub_word(q, 1); - if (BN_cmp(pub_key, q) >= 0) + BN_copy(tmp, dh->p); + BN_sub_word(tmp, 1); + if (BN_cmp(pub_key, tmp) >= 0) *ret |= DH_CHECK_PUBKEY_TOO_LARGE; + if (dh->q != NULL) { + /* Check pub_key^q == 1 mod p */ + if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx)) + goto err; + if (!BN_is_one(tmp)) + *ret |= DH_CHECK_PUBKEY_INVALID; + } + ok = 1; err: - if (q != NULL) - BN_free(q); + if (ctx != NULL) { + BN_CTX_end(ctx); + BN_CTX_free(ctx); + } return (ok); } diff --git a/deps/openssl/openssl/crypto/dh/dhtest.c b/deps/openssl/openssl/crypto/dh/dhtest.c index 6fe8ff4c0c4966..c5d3d87ea549e0 100644 --- a/deps/openssl/openssl/crypto/dh/dhtest.c +++ b/deps/openssl/openssl/crypto/dh/dhtest.c @@ -471,6 +471,31 @@ static const unsigned char dhtest_2048_256_Z[] = { 0xC2, 0x6C, 0x5D, 0x7C }; +static const unsigned char dhtest_rfc5114_2048_224_bad_y[] = { + 0x45, 0x32, 0x5F, 0x51, 0x07, 0xE5, 0xDF, 0x1C, 0xD6, 0x02, 0x82, 0xB3, + 0x32, 0x8F, 0xA4, 0x0F, 0x87, 0xB8, 0x41, 0xFE, 0xB9, 0x35, 0xDE, 0xAD, + 0xC6, 0x26, 0x85, 0xB4, 0xFF, 0x94, 0x8C, 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 0x51, 0x32, 0x9E, 0x7A, 0x6A, + 0xCF, 0xC1, 0x0A, 0xDB, 0x0E, 0xE0, 0x62, 0x77, 0x6F, 0x59, 0x62, 0x72, + 0x5A, 0x69, 0xA6, 0x5B, 0x70, 0xCA, 0x65, 0xC4, 0x95, 0x6F, 0x9A, 0xC2, + 0xDF, 0x72, 0x6D, 0xB1, 0x1E, 0x54, 0x7B, 0x51, 0xB4, 0xEF, 0x7F, 0x89, + 0x93, 0x74, 0x89, 0x59 +}; + typedef struct { DH *(*get_param) (void); const unsigned char *xA; @@ -503,10 +528,15 @@ static const rfc5114_td rfctd[] = { static int run_rfc5114_tests(void) { int i; + DH *dhA = NULL; + DH *dhB = NULL; + unsigned char *Z1 = NULL; + unsigned char *Z2 = NULL; + const rfc5114_td *td = NULL; + BIGNUM *bady = NULL; + for (i = 0; i < (int)(sizeof(rfctd) / sizeof(rfc5114_td)); i++) { - DH *dhA, *dhB; - unsigned char *Z1 = NULL, *Z2 = NULL; - const rfc5114_td *td = rfctd + i; + td = rfctd + i; /* Set up DH structures setting key components */ dhA = td->get_param(); dhB = td->get_param(); @@ -549,14 +579,63 @@ static int run_rfc5114_tests(void) DH_free(dhB); OPENSSL_free(Z1); OPENSSL_free(Z2); + dhA = NULL; + dhB = NULL; + Z1 = NULL; + Z2 = NULL; + } + /* Now i == OSSL_NELEM(rfctd) */ + /* RFC5114 uses unsafe primes, so now test an invalid y value */ + dhA = DH_get_2048_224(); + if (dhA == NULL) + goto bad_err; + Z1 = OPENSSL_malloc(DH_size(dhA)); + if (Z1 == NULL) + goto bad_err; + + bady = BN_bin2bn(dhtest_rfc5114_2048_224_bad_y, + sizeof(dhtest_rfc5114_2048_224_bad_y), NULL); + if (bady == NULL) + goto bad_err; + + if (!DH_generate_key(dhA)) + goto bad_err; + + if (DH_compute_key(Z1, bady, dhA) != -1) { + /* + * DH_compute_key should fail with -1. If we get here we unexpectedly + * allowed an invalid y value + */ + goto err; } + /* We'll have a stale error on the queue from the above test so clear it */ + ERR_clear_error(); + + printf("RFC5114 parameter test %d OK\n", i + 1); + + BN_free(bady); + DH_free(dhA); + OPENSSL_free(Z1); + return 1; bad_err: + BN_free(bady); + DH_free(dhA); + DH_free(dhB); + OPENSSL_free(Z1); + OPENSSL_free(Z2); + fprintf(stderr, "Initalisation error RFC5114 set %d\n", i + 1); ERR_print_errors_fp(stderr); return 0; err: + BN_free(bady); + DH_free(dhA); + DH_free(dhB); + OPENSSL_free(Z1); + OPENSSL_free(Z2); + fprintf(stderr, "Test failed RFC5114 set %d\n", i + 1); return 0; } diff --git a/deps/openssl/openssl/crypto/dsa/dsa_ossl.c b/deps/openssl/openssl/crypto/dsa/dsa_ossl.c index f0ec8faa84cc3c..efc4f1b6aebab0 100644 --- a/deps/openssl/openssl/crypto/dsa/dsa_ossl.c +++ b/deps/openssl/openssl/crypto/dsa/dsa_ossl.c @@ -187,9 +187,6 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) if (!BN_mod_mul(s, s, kinv, dsa->q, ctx)) goto err; - ret = DSA_SIG_new(); - if (ret == NULL) - goto err; /* * Redo if r or s is zero as required by FIPS 186-3: this is very * unlikely. @@ -201,11 +198,14 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) } goto redo; } + ret = DSA_SIG_new(); + if (ret == NULL) + goto err; ret->r = r; ret->s = s; err: - if (!ret) { + if (ret == NULL) { DSAerr(DSA_F_DSA_DO_SIGN, reason); BN_free(r); BN_free(s); diff --git a/deps/openssl/openssl/crypto/dso/dso.h b/deps/openssl/openssl/crypto/dso/dso.h index 7c4a1dc4a620fb..c9013f5cea8b25 100644 --- a/deps/openssl/openssl/crypto/dso/dso.h +++ b/deps/openssl/openssl/crypto/dso/dso.h @@ -1,4 +1,4 @@ -/* dso.h -*- mode:C; c-file-style: "eay" -*- */ +/* dso.h */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/dso/dso_dl.c b/deps/openssl/openssl/crypto/dso/dso_dl.c index 0087ac54afe1fc..ceedf66e885625 100644 --- a/deps/openssl/openssl/crypto/dso/dso_dl.c +++ b/deps/openssl/openssl/crypto/dso/dso_dl.c @@ -1,4 +1,4 @@ -/* dso_dl.c -*- mode:C; c-file-style: "eay" -*- */ +/* dso_dl.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/dso/dso_dlfcn.c b/deps/openssl/openssl/crypto/dso/dso_dlfcn.c index f629f0380d8c85..78df723ffbae88 100644 --- a/deps/openssl/openssl/crypto/dso/dso_dlfcn.c +++ b/deps/openssl/openssl/crypto/dso/dso_dlfcn.c @@ -1,4 +1,4 @@ -/* dso_dlfcn.c -*- mode:C; c-file-style: "eay" -*- */ +/* dso_dlfcn.c */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/dso/dso_lib.c b/deps/openssl/openssl/crypto/dso/dso_lib.c index 09b8eafccacc3d..3312450eae67d8 100644 --- a/deps/openssl/openssl/crypto/dso/dso_lib.c +++ b/deps/openssl/openssl/crypto/dso/dso_lib.c @@ -1,4 +1,4 @@ -/* dso_lib.c -*- mode:C; c-file-style: "eay" -*- */ +/* dso_lib.c */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/dso/dso_vms.c b/deps/openssl/openssl/crypto/dso/dso_vms.c index d0794b8fb044b8..1efd84b94539ec 100644 --- a/deps/openssl/openssl/crypto/dso/dso_vms.c +++ b/deps/openssl/openssl/crypto/dso/dso_vms.c @@ -1,4 +1,4 @@ -/* dso_vms.c -*- mode:C; c-file-style: "eay" -*- */ +/* dso_vms.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/dso/dso_win32.c b/deps/openssl/openssl/crypto/dso/dso_win32.c index c65234e9c44bb5..706e754a3f9f75 100644 --- a/deps/openssl/openssl/crypto/dso/dso_win32.c +++ b/deps/openssl/openssl/crypto/dso/dso_win32.c @@ -1,4 +1,4 @@ -/* dso_win32.c -*- mode:C; c-file-style: "eay" -*- */ +/* dso_win32.c */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl b/deps/openssl/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl index 648c969be6215f..e6acfd59f0d416 100755 --- a/deps/openssl/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl +++ b/deps/openssl/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl @@ -81,7 +81,7 @@ $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9])\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); diff --git a/deps/openssl/openssl/crypto/ec/ec2_smpl.c b/deps/openssl/openssl/crypto/ec/ec2_smpl.c index 077c7fc8dda595..5b27b91fcc94f3 100644 --- a/deps/openssl/openssl/crypto/ec/ec2_smpl.c +++ b/deps/openssl/openssl/crypto/ec/ec2_smpl.c @@ -746,6 +746,7 @@ int ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point, goto err; if (!BN_one(&point->Z)) goto err; + point->Z_is_one = 1; ret = 1; diff --git a/deps/openssl/openssl/crypto/ec/ec_key.c b/deps/openssl/openssl/crypto/ec/ec_key.c index c784b6fd30a3c8..bc94ab5661ffed 100644 --- a/deps/openssl/openssl/crypto/ec/ec_key.c +++ b/deps/openssl/openssl/crypto/ec/ec_key.c @@ -387,6 +387,8 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, tx = BN_CTX_get(ctx); ty = BN_CTX_get(ctx); + if (ty == NULL) + goto err; #ifndef OPENSSL_NO_EC2M tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(key->group)); diff --git a/deps/openssl/openssl/crypto/ec/ecp_nistz256_table.c b/deps/openssl/openssl/crypto/ec/ecp_nistz256_table.c index 216d024e01203c..2f0797db6b9b66 100644 --- a/deps/openssl/openssl/crypto/ec/ecp_nistz256_table.c +++ b/deps/openssl/openssl/crypto/ec/ecp_nistz256_table.c @@ -17,7 +17,7 @@ __attribute((aligned(4096))) #elif defined(_MSC_VER) __declspec(align(4096)) #elif defined(__SUNPRO_C) -# pragma align 4096(ecp_nistz256_precomputed) +# pragma align 64(ecp_nistz256_precomputed) #endif static const BN_ULONG ecp_nistz256_precomputed[37][64 * sizeof(P256_POINT_AFFINE) / diff --git a/deps/openssl/openssl/crypto/ec/ectest.c b/deps/openssl/openssl/crypto/ec/ectest.c index fede530bc1391b..efab0b07b1d2ac 100644 --- a/deps/openssl/openssl/crypto/ec/ectest.c +++ b/deps/openssl/openssl/crypto/ec/ectest.c @@ -1591,7 +1591,7 @@ struct nistp_test_params { int degree; /* * Qx, Qy and D are taken from - * http://csrcdocut.gov/groups/ST/toolkit/documents/Examples/ECDSA_Prime.pdf + * http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/ECDSA_Prime.pdf * Otherwise, values are standard curve parameters from FIPS 180-3 */ const char *p, *a, *b, *Qx, *Qy, *Gx, *Gy, *order, *d; diff --git a/deps/openssl/openssl/crypto/engine/eng_all.c b/deps/openssl/openssl/crypto/engine/eng_all.c index 195a3a95542a7a..48ad0d26b41e7d 100644 --- a/deps/openssl/openssl/crypto/engine/eng_all.c +++ b/deps/openssl/openssl/crypto/engine/eng_all.c @@ -1,4 +1,4 @@ -/* crypto/engine/eng_all.c -*- mode: C; c-file-style: "eay" -*- */ +/* crypto/engine/eng_all.c */ /* * Written by Richard Levitte for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/evp/e_camellia.c b/deps/openssl/openssl/crypto/evp/e_camellia.c index f9c84013675d29..f273f9c9475a9b 100644 --- a/deps/openssl/openssl/crypto/evp/e_camellia.c +++ b/deps/openssl/openssl/crypto/evp/e_camellia.c @@ -1,4 +1,4 @@ -/* crypto/evp/e_camellia.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/evp/e_camellia.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/evp/e_old.c b/deps/openssl/openssl/crypto/evp/e_old.c index c93f5a548163df..a23d143b7fae64 100644 --- a/deps/openssl/openssl/crypto/evp/e_old.c +++ b/deps/openssl/openssl/crypto/evp/e_old.c @@ -1,4 +1,4 @@ -/* crypto/evp/e_old.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/evp/e_old.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2004. diff --git a/deps/openssl/openssl/crypto/evp/e_seed.c b/deps/openssl/openssl/crypto/evp/e_seed.c index c948a8f3914fd5..7249d1b1eecb46 100644 --- a/deps/openssl/openssl/crypto/evp/e_seed.c +++ b/deps/openssl/openssl/crypto/evp/e_seed.c @@ -1,4 +1,4 @@ -/* crypto/evp/e_seed.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/evp/e_seed.c */ /* ==================================================================== * Copyright (c) 2007 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/mem_clr.c b/deps/openssl/openssl/crypto/mem_clr.c index 1a06636d0ce8da..ab85344eef386b 100644 --- a/deps/openssl/openssl/crypto/mem_clr.c +++ b/deps/openssl/openssl/crypto/mem_clr.c @@ -1,4 +1,4 @@ -/* crypto/mem_clr.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/mem_clr.c */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2002. diff --git a/deps/openssl/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl b/deps/openssl/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl index 4be25571ea28ca..bd6bf72fe48767 100644 --- a/deps/openssl/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl +++ b/deps/openssl/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl @@ -56,7 +56,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/modes/asm/ghash-x86_64.pl b/deps/openssl/openssl/crypto/modes/asm/ghash-x86_64.pl index 0bcb6d4e028be8..4ff2d39aa7b281 100644 --- a/deps/openssl/openssl/crypto/modes/asm/ghash-x86_64.pl +++ b/deps/openssl/openssl/crypto/modes/asm/ghash-x86_64.pl @@ -105,7 +105,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/o_dir.c b/deps/openssl/openssl/crypto/o_dir.c index 26242444c88500..f9dbed87112793 100644 --- a/deps/openssl/openssl/crypto/o_dir.c +++ b/deps/openssl/openssl/crypto/o_dir.c @@ -1,4 +1,4 @@ -/* crypto/o_dir.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_dir.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2004. diff --git a/deps/openssl/openssl/crypto/o_dir.h b/deps/openssl/openssl/crypto/o_dir.h index d55431194ef268..bf45a14d02ec74 100644 --- a/deps/openssl/openssl/crypto/o_dir.h +++ b/deps/openssl/openssl/crypto/o_dir.h @@ -1,4 +1,4 @@ -/* crypto/o_dir.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_dir.h */ /* * Copied from Richard Levitte's (richard@levitte.org) LP library. All * symbol names have been changed, with permission from the author. diff --git a/deps/openssl/openssl/crypto/o_dir_test.c b/deps/openssl/openssl/crypto/o_dir_test.c index 7cdbbbc403e72d..60436b72ce37d6 100644 --- a/deps/openssl/openssl/crypto/o_dir_test.c +++ b/deps/openssl/openssl/crypto/o_dir_test.c @@ -1,4 +1,4 @@ -/* crypto/o_dir.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_dir.h */ /* * Copied from Richard Levitte's (richard@levitte.org) LP library. All * symbol names have been changed, with permission from the author. diff --git a/deps/openssl/openssl/crypto/o_str.c b/deps/openssl/openssl/crypto/o_str.c index 4e2d096704f000..7e61cde85a273a 100644 --- a/deps/openssl/openssl/crypto/o_str.c +++ b/deps/openssl/openssl/crypto/o_str.c @@ -1,4 +1,4 @@ -/* crypto/o_str.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_str.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/o_str.h b/deps/openssl/openssl/crypto/o_str.h index 5313528ed92671..fa512eb3978422 100644 --- a/deps/openssl/openssl/crypto/o_str.h +++ b/deps/openssl/openssl/crypto/o_str.h @@ -1,4 +1,4 @@ -/* crypto/o_str.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_str.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/o_time.c b/deps/openssl/openssl/crypto/o_time.c index 58413fe97d09d3..635dae184d2fee 100644 --- a/deps/openssl/openssl/crypto/o_time.c +++ b/deps/openssl/openssl/crypto/o_time.c @@ -1,4 +1,4 @@ -/* crypto/o_time.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_time.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/o_time.h b/deps/openssl/openssl/crypto/o_time.h index a83a3d247d41ee..f192c6dccf374e 100644 --- a/deps/openssl/openssl/crypto/o_time.h +++ b/deps/openssl/openssl/crypto/o_time.h @@ -1,4 +1,4 @@ -/* crypto/o_time.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/o_time.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/opensslv.h b/deps/openssl/openssl/crypto/opensslv.h index abcef15b17d943..03b8c4843784a7 100644 --- a/deps/openssl/openssl/crypto/opensslv.h +++ b/deps/openssl/openssl/crypto/opensslv.h @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000205fL +# define OPENSSL_VERSION_NUMBER 0x1000206fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2e-fips 3 Dec 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2f-fips 28 Jan 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2e 3 Dec 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2f 28 Jan 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT diff --git a/deps/openssl/openssl/crypto/rand/rand_vms.c b/deps/openssl/openssl/crypto/rand/rand_vms.c index a7179a4ba121be..0e10c363e2b512 100644 --- a/deps/openssl/openssl/crypto/rand/rand_vms.c +++ b/deps/openssl/openssl/crypto/rand/rand_vms.c @@ -1,4 +1,4 @@ -/* crypto/rand/rand_vms.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/rand/rand_vms.c */ /* * Written by Richard Levitte for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/crypto/rc4/rc4_utl.c b/deps/openssl/openssl/crypto/rc4/rc4_utl.c index 7c6a15f1c71f9f..cbd4a24e4b4d05 100644 --- a/deps/openssl/openssl/crypto/rc4/rc4_utl.c +++ b/deps/openssl/openssl/crypto/rc4/rc4_utl.c @@ -1,4 +1,4 @@ -/* crypto/rc4/rc4_utl.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/rc4/rc4_utl.c */ /* ==================================================================== * Copyright (c) 2011 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/rsa/rsa_chk.c b/deps/openssl/openssl/crypto/rsa/rsa_chk.c index f4383860b58b28..607faa00171ed4 100644 --- a/deps/openssl/openssl/crypto/rsa/rsa_chk.c +++ b/deps/openssl/openssl/crypto/rsa/rsa_chk.c @@ -1,4 +1,4 @@ -/* crypto/rsa/rsa_chk.c -*- Mode: C; c-file-style: "eay" -*- */ +/* crypto/rsa/rsa_chk.c */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/rsa/rsa_sign.c b/deps/openssl/openssl/crypto/rsa/rsa_sign.c index 82ca8324dfbc11..ed63a1d8b0e3fe 100644 --- a/deps/openssl/openssl/crypto/rsa/rsa_sign.c +++ b/deps/openssl/openssl/crypto/rsa/rsa_sign.c @@ -84,7 +84,7 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len, return 0; } #endif - if ((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign) { + if (rsa->meth->rsa_sign) { return rsa->meth->rsa_sign(type, m, m_len, sigret, siglen, rsa); } /* Special case: SSL signature, just check the length */ @@ -293,7 +293,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, const unsigned char *sigbuf, unsigned int siglen, RSA *rsa) { - if ((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_verify) { + if (rsa->meth->rsa_verify) { return rsa->meth->rsa_verify(dtype, m, m_len, sigbuf, siglen, rsa); } diff --git a/deps/openssl/openssl/crypto/seed/seed_cbc.c b/deps/openssl/openssl/crypto/seed/seed_cbc.c index 33e6887740e92b..ee1115b4c11360 100644 --- a/deps/openssl/openssl/crypto/seed/seed_cbc.c +++ b/deps/openssl/openssl/crypto/seed/seed_cbc.c @@ -1,4 +1,4 @@ -/* crypto/seed/seed_cbc.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/seed/seed_cbc.c */ /* ==================================================================== * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/seed/seed_cfb.c b/deps/openssl/openssl/crypto/seed/seed_cfb.c index 3437d7b4e11141..b6a5648b35fd74 100644 --- a/deps/openssl/openssl/crypto/seed/seed_cfb.c +++ b/deps/openssl/openssl/crypto/seed/seed_cfb.c @@ -1,4 +1,4 @@ -/* crypto/seed/seed_cfb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/seed/seed_cfb.c */ /* ==================================================================== * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/seed/seed_ecb.c b/deps/openssl/openssl/crypto/seed/seed_ecb.c index 937a31b42a8765..9363d5508044a3 100644 --- a/deps/openssl/openssl/crypto/seed/seed_ecb.c +++ b/deps/openssl/openssl/crypto/seed/seed_ecb.c @@ -1,4 +1,4 @@ -/* crypto/seed/seed_ecb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/seed/seed_ecb.c */ /* ==================================================================== * Copyright (c) 2007 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/seed/seed_ofb.c b/deps/openssl/openssl/crypto/seed/seed_ofb.c index 6974302ce80f5c..48b71224c52c8d 100644 --- a/deps/openssl/openssl/crypto/seed/seed_ofb.c +++ b/deps/openssl/openssl/crypto/seed/seed_ofb.c @@ -1,4 +1,4 @@ -/* crypto/seed/seed_ofb.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/seed/seed_ofb.c */ /* ==================================================================== * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/sha/asm/sha1-mb-x86_64.pl b/deps/openssl/openssl/crypto/sha/asm/sha1-mb-x86_64.pl index f856bb888b0e7b..a8d8708d4b7514 100644 --- a/deps/openssl/openssl/crypto/sha/asm/sha1-mb-x86_64.pl +++ b/deps/openssl/openssl/crypto/sha/asm/sha1-mb-x86_64.pl @@ -58,7 +58,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/sha/asm/sha1-x86_64.pl b/deps/openssl/openssl/crypto/sha/asm/sha1-x86_64.pl index 9a6acc347d3317..5f375fc6886b3a 100755 --- a/deps/openssl/openssl/crypto/sha/asm/sha1-x86_64.pl +++ b/deps/openssl/openssl/crypto/sha/asm/sha1-x86_64.pl @@ -107,7 +107,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([2-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([2-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/sha/asm/sha256-mb-x86_64.pl b/deps/openssl/openssl/crypto/sha/asm/sha256-mb-x86_64.pl index 3d37ae31ad3e7f..9770286b9596ad 100644 --- a/deps/openssl/openssl/crypto/sha/asm/sha256-mb-x86_64.pl +++ b/deps/openssl/openssl/crypto/sha/asm/sha256-mb-x86_64.pl @@ -59,7 +59,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/sha/asm/sha512-x86_64.pl b/deps/openssl/openssl/crypto/sha/asm/sha512-x86_64.pl index 58665667f14934..78e445f3fe4ac2 100755 --- a/deps/openssl/openssl/crypto/sha/asm/sha512-x86_64.pl +++ b/deps/openssl/openssl/crypto/sha/asm/sha512-x86_64.pl @@ -124,7 +124,7 @@ $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } diff --git a/deps/openssl/openssl/crypto/sha/sha1test.c b/deps/openssl/openssl/crypto/sha/sha1test.c index 0052a95c7dd436..551a348df37f1f 100644 --- a/deps/openssl/openssl/crypto/sha/sha1test.c +++ b/deps/openssl/openssl/crypto/sha/sha1test.c @@ -157,8 +157,8 @@ int main(int argc, char *argv[]) if (err) printf("ERROR: %d\n", err); # endif - EXIT(err); EVP_MD_CTX_cleanup(&c); + EXIT(err); return (0); } diff --git a/deps/openssl/openssl/crypto/store/store.h b/deps/openssl/openssl/crypto/store/store.h index 834334104907bf..ce3709d9f00bfb 100644 --- a/deps/openssl/openssl/crypto/store/store.h +++ b/deps/openssl/openssl/crypto/store/store.h @@ -1,4 +1,4 @@ -/* crypto/store/store.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/store/store.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/store/str_lib.c b/deps/openssl/openssl/crypto/store/str_lib.c index 227b797b594947..e3d5da93886803 100644 --- a/deps/openssl/openssl/crypto/store/str_lib.c +++ b/deps/openssl/openssl/crypto/store/str_lib.c @@ -1,4 +1,4 @@ -/* crypto/store/str_lib.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/store/str_lib.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/store/str_locl.h b/deps/openssl/openssl/crypto/store/str_locl.h index ac55784df0aa9c..c0b40f0db67436 100644 --- a/deps/openssl/openssl/crypto/store/str_locl.h +++ b/deps/openssl/openssl/crypto/store/str_locl.h @@ -1,4 +1,4 @@ -/* crypto/store/str_locl.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/store/str_locl.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/store/str_mem.c b/deps/openssl/openssl/crypto/store/str_mem.c index 8edd0eb41b1296..6eee5bba292273 100644 --- a/deps/openssl/openssl/crypto/store/str_mem.c +++ b/deps/openssl/openssl/crypto/store/str_mem.c @@ -1,4 +1,4 @@ -/* crypto/store/str_mem.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/store/str_mem.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/store/str_meth.c b/deps/openssl/openssl/crypto/store/str_meth.c index d83a6de0fc476a..c83fbc565aaca9 100644 --- a/deps/openssl/openssl/crypto/store/str_meth.c +++ b/deps/openssl/openssl/crypto/store/str_meth.c @@ -1,4 +1,4 @@ -/* crypto/store/str_meth.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/store/str_meth.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2003. diff --git a/deps/openssl/openssl/crypto/ts/ts_rsp_verify.c b/deps/openssl/openssl/crypto/ts/ts_rsp_verify.c index da8991173ced5c..29aa5a497e89ba 100644 --- a/deps/openssl/openssl/crypto/ts/ts_rsp_verify.c +++ b/deps/openssl/openssl/crypto/ts/ts_rsp_verify.c @@ -255,7 +255,8 @@ static int TS_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted, /* chain is an out argument. */ *chain = NULL; - X509_STORE_CTX_init(&cert_ctx, store, signer, untrusted); + if (!X509_STORE_CTX_init(&cert_ctx, store, signer, untrusted)) + return 0; X509_STORE_CTX_set_purpose(&cert_ctx, X509_PURPOSE_TIMESTAMP_SIGN); i = X509_verify_cert(&cert_ctx); if (i <= 0) { diff --git a/deps/openssl/openssl/crypto/ui/ui.h b/deps/openssl/openssl/crypto/ui/ui.h index b917edab3a7a38..0dc16330b8708a 100644 --- a/deps/openssl/openssl/crypto/ui/ui.h +++ b/deps/openssl/openssl/crypto/ui/ui.h @@ -1,4 +1,4 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/ui/ui_compat.c b/deps/openssl/openssl/crypto/ui/ui_compat.c index 0ca5284f91c01c..e79d54eea6824f 100644 --- a/deps/openssl/openssl/crypto/ui/ui_compat.c +++ b/deps/openssl/openssl/crypto/ui/ui_compat.c @@ -1,4 +1,4 @@ -/* crypto/ui/ui_compat.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui_compat.c */ /* ==================================================================== * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/ui/ui_compat.h b/deps/openssl/openssl/crypto/ui/ui_compat.h index 42fb9ff6500f4d..bf541542c04112 100644 --- a/deps/openssl/openssl/crypto/ui/ui_compat.h +++ b/deps/openssl/openssl/crypto/ui/ui_compat.h @@ -1,4 +1,4 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/ui/ui_lib.c b/deps/openssl/openssl/crypto/ui/ui_lib.c index 5ddd7317e52b48..2f580352ce8f47 100644 --- a/deps/openssl/openssl/crypto/ui/ui_lib.c +++ b/deps/openssl/openssl/crypto/ui/ui_lib.c @@ -1,4 +1,4 @@ -/* crypto/ui/ui_lib.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui_lib.c */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/ui/ui_locl.h b/deps/openssl/openssl/crypto/ui/ui_locl.h index 0d919cd7b1cce8..bebc13abfc526f 100644 --- a/deps/openssl/openssl/crypto/ui/ui_locl.h +++ b/deps/openssl/openssl/crypto/ui/ui_locl.h @@ -1,4 +1,4 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/crypto/ui/ui_openssl.c b/deps/openssl/openssl/crypto/ui/ui_openssl.c index 5d66276418fc83..9ab259b8f605a6 100644 --- a/deps/openssl/openssl/crypto/ui/ui_openssl.c +++ b/deps/openssl/openssl/crypto/ui/ui_openssl.c @@ -1,4 +1,4 @@ -/* crypto/ui/ui_openssl.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui_openssl.c */ /* * Written by Richard Levitte (richard@levitte.org) and others for the * OpenSSL project 2001. diff --git a/deps/openssl/openssl/crypto/ui/ui_util.c b/deps/openssl/openssl/crypto/ui/ui_util.c index f65f80d71de671..0f290115d0f849 100644 --- a/deps/openssl/openssl/crypto/ui/ui_util.c +++ b/deps/openssl/openssl/crypto/ui/ui_util.c @@ -1,4 +1,4 @@ -/* crypto/ui/ui_util.c -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui_util.c */ /* ==================================================================== * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/crypto/x509/x509_vfy.c b/deps/openssl/openssl/crypto/x509/x509_vfy.c index ab94948f0135f2..0429767032fd9c 100644 --- a/deps/openssl/openssl/crypto/x509/x509_vfy.c +++ b/deps/openssl/openssl/crypto/x509/x509_vfy.c @@ -2283,9 +2283,10 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, ctx->current_reasons = 0; ctx->tree = NULL; ctx->parent = NULL; + /* Zero ex_data to make sure we're cleanup-safe */ + memset(&ctx->ex_data, 0, sizeof(ctx->ex_data)); ctx->param = X509_VERIFY_PARAM_new(); - if (!ctx->param) { X509err(X509_F_X509_STORE_CTX_INIT, ERR_R_MALLOC_FAILURE); return 0; @@ -2294,7 +2295,6 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, /* * Inherit callbacks and flags from X509_STORE if not set use defaults. */ - if (store) ret = X509_VERIFY_PARAM_inherit(ctx->param, store->param); else @@ -2302,6 +2302,7 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, if (store) { ctx->verify_cb = store->verify_cb; + /* Seems to always be 0 in OpenSSL, else must be idempotent */ ctx->cleanup = store->cleanup; } else ctx->cleanup = 0; @@ -2312,7 +2313,7 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, if (ret == 0) { X509err(X509_F_X509_STORE_CTX_INIT, ERR_R_MALLOC_FAILURE); - return 0; + goto err; } if (store && store->check_issued) @@ -2367,19 +2368,18 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, ctx->check_policy = check_policy; + if (CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, + &ctx->ex_data)) + return 1; + X509err(X509_F_X509_STORE_CTX_INIT, ERR_R_MALLOC_FAILURE); + + err: /* - * This memset() can't make any sense anyway, so it's removed. As - * X509_STORE_CTX_cleanup does a proper "free" on the ex_data, we put a - * corresponding "new" here and remove this bogus initialisation. + * On error clean up allocated storage, if the store context was not + * allocated with X509_STORE_CTX_new() this is our last chance to do so. */ - /* memset(&(ctx->ex_data),0,sizeof(CRYPTO_EX_DATA)); */ - if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, - &(ctx->ex_data))) { - OPENSSL_free(ctx); - X509err(X509_F_X509_STORE_CTX_INIT, ERR_R_MALLOC_FAILURE); - return 0; - } - return 1; + X509_STORE_CTX_cleanup(ctx); + return 0; } /* @@ -2395,8 +2395,17 @@ void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) { - if (ctx->cleanup) + /* + * We need to be idempotent because, unfortunately, free() also calls + * cleanup(), so the natural call sequence new(), init(), cleanup(), free() + * calls cleanup() for the same object twice! Thus we must zero the + * pointers below after they're freed! + */ + /* Seems to always be 0 in OpenSSL, do this at most once. */ + if (ctx->cleanup != NULL) { ctx->cleanup(ctx); + ctx->cleanup = NULL; + } if (ctx->param != NULL) { if (ctx->parent == NULL) X509_VERIFY_PARAM_free(ctx->param); diff --git a/deps/openssl/openssl/crypto/x509/x509_vfy.h b/deps/openssl/openssl/crypto/x509/x509_vfy.h index bd8613c62ba429..2663e1c0a362aa 100644 --- a/deps/openssl/openssl/crypto/x509/x509_vfy.h +++ b/deps/openssl/openssl/crypto/x509/x509_vfy.h @@ -313,7 +313,7 @@ void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) # define X509_V_OK 0 -/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */ +# define X509_V_ERR_UNSPECIFIED 1 # define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 # define X509_V_ERR_UNABLE_TO_GET_CRL 3 diff --git a/deps/openssl/openssl/crypto/x509/x509_vpm.c b/deps/openssl/openssl/crypto/x509/x509_vpm.c index 592a8a5f6a5c94..1ac15a881a1059 100644 --- a/deps/openssl/openssl/crypto/x509/x509_vpm.c +++ b/deps/openssl/openssl/crypto/x509/x509_vpm.c @@ -94,11 +94,11 @@ static int int_x509_param_set_hosts(X509_VERIFY_PARAM_ID *id, int mode, * Refuse names with embedded NUL bytes, except perhaps as final byte. * XXX: Do we need to push an error onto the error stack? */ - if (namelen == 0) + if (namelen == 0 || name == NULL) namelen = name ? strlen(name) : 0; else if (name && memchr(name, '\0', namelen > 1 ? namelen - 1 : namelen)) return 0; - if (name && name[namelen - 1] == '\0') + if (namelen > 0 && name[namelen - 1] == '\0') --namelen; if (mode == SET_HOST && id->hosts) { diff --git a/deps/openssl/openssl/crypto/x509v3/v3_pci.c b/deps/openssl/openssl/crypto/x509v3/v3_pci.c index 48ac0959cb10a3..34cad53cb5f0e0 100644 --- a/deps/openssl/openssl/crypto/x509v3/v3_pci.c +++ b/deps/openssl/openssl/crypto/x509v3/v3_pci.c @@ -1,4 +1,4 @@ -/* v3_pci.c -*- mode:C; c-file-style: "eay" -*- */ +/* v3_pci.c */ /* * Contributed to the OpenSSL Project 2004 by Richard Levitte * (richard@levitte.org) diff --git a/deps/openssl/openssl/crypto/x509v3/v3_pcia.c b/deps/openssl/openssl/crypto/x509v3/v3_pcia.c index 43fd362aeda04e..e53c82e8dc79ea 100644 --- a/deps/openssl/openssl/crypto/x509v3/v3_pcia.c +++ b/deps/openssl/openssl/crypto/x509v3/v3_pcia.c @@ -1,4 +1,4 @@ -/* v3_pcia.c -*- mode:C; c-file-style: "eay" -*- */ +/* v3_pcia.c */ /* * Contributed to the OpenSSL Project 2004 by Richard Levitte * (richard@levitte.org) diff --git a/deps/openssl/openssl/crypto/x509v3/v3_utl.c b/deps/openssl/openssl/crypto/x509v3/v3_utl.c index 4d1ecc58bf9450..43b9cb9c5861cd 100644 --- a/deps/openssl/openssl/crypto/x509v3/v3_utl.c +++ b/deps/openssl/openssl/crypto/x509v3/v3_utl.c @@ -841,7 +841,8 @@ static const unsigned char *valid_star(const unsigned char *p, size_t len, state = LABEL_START; ++dots; } else if (p[i] == '-') { - if ((state & LABEL_HYPHEN) != 0) + /* no domain/subdomain starts with '-' */ + if ((state & LABEL_START) != 0) return NULL; state |= LABEL_HYPHEN; } else diff --git a/deps/openssl/openssl/crypto/x509v3/v3nametest.c b/deps/openssl/openssl/crypto/x509v3/v3nametest.c index 7b5c1c8e51270f..ac5c9ff432d961 100644 --- a/deps/openssl/openssl/crypto/x509v3/v3nametest.c +++ b/deps/openssl/openssl/crypto/x509v3/v3nametest.c @@ -6,12 +6,16 @@ static const char *const names[] = { "a", "b", ".", "*", "@", ".a", "a.", ".b", "b.", ".*", "*.", "*@", "@*", "a@", "@a", "b@", "..", + "-example.com", "example-.com", "@@", "**", "*.com", "*com", "*.*.com", "*com", "com*", "*example.com", "*@example.com", "test@*.example.com", "example.com", "www.example.com", "test.www.example.com", "*.example.com", "*.www.example.com", "test.*.example.com", "www.*.com", ".www.example.com", "*www.example.com", "example.net", "xn--rger-koa.example.com", + "*.xn--rger-koa.example.com", "www.xn--rger-koa.example.com", + "*.good--example.com", "www.good--example.com", + "*.xn--bar.com", "xn--foo.xn--bar.com", "a.example.com", "b.example.com", "postmaster@example.com", "Postmaster@example.com", "postmaster@EXAMPLE.COM", @@ -27,6 +31,9 @@ static const char *const exceptions[] = { "set CN: host: [*.www.example.com] matches [.www.example.com]", "set CN: host: [*www.example.com] matches [www.example.com]", "set CN: host: [test.www.example.com] matches [.www.example.com]", + "set CN: host: [*.xn--rger-koa.example.com] matches [www.xn--rger-koa.example.com]", + "set CN: host: [*.xn--bar.com] matches [xn--foo.xn--bar.com]", + "set CN: host: [*.good--example.com] matches [www.good--example.com]", "set CN: host-no-wildcards: [*.www.example.com] matches [.www.example.com]", "set CN: host-no-wildcards: [test.www.example.com] matches [.www.example.com]", "set emailAddress: email: [postmaster@example.com] does not match [Postmaster@example.com]", @@ -43,6 +50,9 @@ static const char *const exceptions[] = { "set dnsName: host: [*.www.example.com] matches [.www.example.com]", "set dnsName: host: [*www.example.com] matches [www.example.com]", "set dnsName: host: [test.www.example.com] matches [.www.example.com]", + "set dnsName: host: [*.xn--rger-koa.example.com] matches [www.xn--rger-koa.example.com]", + "set dnsName: host: [*.xn--bar.com] matches [xn--foo.xn--bar.com]", + "set dnsName: host: [*.good--example.com] matches [www.good--example.com]", "set rfc822Name: email: [postmaster@example.com] does not match [Postmaster@example.com]", "set rfc822Name: email: [Postmaster@example.com] does not match [postmaster@example.com]", "set rfc822Name: email: [Postmaster@example.com] does not match [postmaster@EXAMPLE.COM]", diff --git a/deps/openssl/openssl/demos/easy_tls/easy-tls.c b/deps/openssl/openssl/demos/easy_tls/easy-tls.c index 5682e91a479302..ebcadafa7ba3f1 100644 --- a/deps/openssl/openssl/demos/easy_tls/easy-tls.c +++ b/deps/openssl/openssl/demos/easy_tls/easy-tls.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-file-style: "bsd" -*- */ +/* */ /*- * easy-tls.c -- generic TLS proxy. * $Id: easy-tls.c,v 1.4 2002/03/05 09:07:16 bodo Exp $ diff --git a/deps/openssl/openssl/demos/easy_tls/easy-tls.h b/deps/openssl/openssl/demos/easy_tls/easy-tls.h index 1c587b861c5cd2..b88d21c57bd230 100644 --- a/deps/openssl/openssl/demos/easy_tls/easy-tls.h +++ b/deps/openssl/openssl/demos/easy_tls/easy-tls.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-file-style: "bsd" -*- */ +/* */ /*- * easy-tls.h -- generic TLS proxy. * $Id: easy-tls.h,v 1.1 2001/09/17 19:06:59 bodo Exp $ diff --git a/deps/openssl/openssl/demos/tunala/tunala.c b/deps/openssl/openssl/demos/tunala/tunala.c index 11a7c5bb1497c5..3ceea02fad08d9 100644 --- a/deps/openssl/openssl/demos/tunala/tunala.c +++ b/deps/openssl/openssl/demos/tunala/tunala.c @@ -1154,7 +1154,7 @@ static int tunala_item_io(tunala_selector_t * selector, tunala_item_t * item) /* * This function name is attributed to the term donated by David Schwartz * on openssl-dev, message-ID: - * . :-) + * . :-) */ if (!state_machine_churn(&item->sm)) /* diff --git a/deps/openssl/openssl/doc/apps/s_time.pod b/deps/openssl/openssl/doc/apps/s_time.pod index 5a38aa2e03944f..9082d876feeb0e 100644 --- a/deps/openssl/openssl/doc/apps/s_time.pod +++ b/deps/openssl/openssl/doc/apps/s_time.pod @@ -26,7 +26,7 @@ B B =head1 DESCRIPTION -The B command implements a generic SSL/TLS client which connects to a +The B command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS. It can request a page from the server and includes the time to transfer the payload data in its timing measurements. It measures the number of connections within a given timeframe, the amount of data @@ -127,7 +127,7 @@ and the link speed determine how many connections B can establish. =head1 NOTES -B can be used to measure the performance of an SSL connection. +B can be used to measure the performance of an SSL connection. To connect to an SSL HTTP server and get the default page the command openssl s_time -connect servername:443 -www / -CApath yourdir -CAfile yourfile.pem -cipher commoncipher [-ssl3] diff --git a/deps/openssl/openssl/doc/crypto/BIO_s_connect.pod b/deps/openssl/openssl/doc/crypto/BIO_s_connect.pod index 18ece4c91f66fe..345a468a5d74c6 100644 --- a/deps/openssl/openssl/doc/crypto/BIO_s_connect.pod +++ b/deps/openssl/openssl/doc/crypto/BIO_s_connect.pod @@ -21,8 +21,8 @@ BIO_set_nbio, BIO_do_connect - connect BIO long BIO_set_conn_int_port(BIO *b, char *port); char *BIO_get_conn_hostname(BIO *b); char *BIO_get_conn_port(BIO *b); - char *BIO_get_conn_ip(BIO *b, dummy); - long BIO_get_conn_int_port(BIO *b, int port); + char *BIO_get_conn_ip(BIO *b); + long BIO_get_conn_int_port(BIO *b); long BIO_set_nbio(BIO *b, long n); diff --git a/deps/openssl/openssl/doc/ssl/SSL_CTX_set1_verify_cert_store.pod b/deps/openssl/openssl/doc/ssl/SSL_CTX_set1_verify_cert_store.pod index 493cca48194008..3e3a4fa90c0ea4 100644 --- a/deps/openssl/openssl/doc/ssl/SSL_CTX_set1_verify_cert_store.pod +++ b/deps/openssl/openssl/doc/ssl/SSL_CTX_set1_verify_cert_store.pod @@ -17,10 +17,10 @@ verification or chain store int SSL_CTX_set0_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); int SSL_CTX_set1_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); - int SSL_set0_verify_cert_store(SSL_CTX *ctx, X509_STORE *st); - int SSL_set1_verify_cert_store(SSL_CTX *ctx, X509_STORE *st); - int SSL_set0_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); - int SSL_set1_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); + int SSL_set0_verify_cert_store(SSL *ctx, X509_STORE *st); + int SSL_set1_verify_cert_store(SSL *ctx, X509_STORE *st); + int SSL_set0_chain_cert_store(SSL *ctx, X509_STORE *st); + int SSL_set1_chain_cert_store(SSL *ctx, X509_STORE *st); =head1 DESCRIPTION diff --git a/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod b/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod new file mode 100644 index 00000000000000..b8147baecf98b9 --- /dev/null +++ b/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod @@ -0,0 +1,73 @@ +=pod + +=head1 NAME + +SSL_CTX_set_tlsext_status_cb, SSL_CTX_set_tlsext_status_arg, +SSL_set_tlsext_status_type, SSL_get_tlsext_status_ocsp_resp, +SSL_set_tlsext_status_ocsp_resp - OCSP Certificate Status Request functions + +=head1 SYNOPSIS + + #include + + long SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx, + int (*callback)(SSL *, void *)); + long SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg); + + long SSL_set_tlsext_status_type(SSL *s, int type); + + long SSL_get_tlsext_status_ocsp_resp(ssl, unsigned char **resp); + long SSL_set_tlsext_status_ocsp_resp(ssl, unsigned char *resp, int len); + +=head1 DESCRIPTION + +A client application may request that a server send back an OCSP status response +(also known as OCSP stapling). To do so the client should call the +SSL_set_tlsext_status_type() function prior to the start of the handshake. +Currently the only supported type is B. This value +should be passed in the B argument. The client should additionally provide +a callback function to decide what to do with the returned OCSP response by +calling SSL_CTX_set_tlsext_status_cb(). The callback function should determine +whether the returned OCSP response is acceptable or not. The callback will be +passed as an argument the value previously set via a call to +SSL_CTX_set_tlsext_status_arg(). Note that the callback will not be called in +the event of a handshake where session resumption occurs (because there are no +Certificates exchanged in such a handshake). + +The response returned by the server can be obtained via a call to +SSL_get_tlsext_status_ocsp_resp(). The value B<*resp> will be updated to point +to the OCSP response data and the return value will be the length of that data. +Typically a callback would obtain an OCSP_RESPONSE object from this data via a +call to the d2i_OCSP_RESPONSE() function. If the server has not provided any +response data then B<*resp> will be NULL and the return value from +SSL_get_tlsext_status_ocsp_resp() will be -1. + +A server application must also call the SSL_CTX_set_tlsext_status_cb() function +if it wants to be able to provide clients with OCSP Certificate Status +responses. Typically the server callback would obtain the server certificate +that is being sent back to the client via a call to SSL_get_certificate(); +obtain the OCSP response to be sent back; and then set that response data by +calling SSL_set_tlsext_status_ocsp_resp(). A pointer to the response data should +be provided in the B argument, and the length of that data should be in +the B argument. + +=head1 RETURN VALUES + +The callback when used on the client side should return a negative value on +error; 0 if the response is not acceptable (in which case the handshake will +fail) or a positive value if it is acceptable. + +The callback when used on the server side should return with either +SSL_TLSEXT_ERR_OK (meaning that the OCSP response that has been set should be +returned), SSL_TLSEXT_ERR_NOACK (meaning that an OCSP response should not be +returned) or SSL_TLSEXT_ERR_ALERT_FATAL (meaning that a fatal error has +occurred). + +SSL_CTX_set_tlsext_status_cb(), SSL_CTX_set_tlsext_status_arg(), +SSL_set_tlsext_status_type() and SSL_set_tlsext_status_ocsp_resp() return 0 on +error or 1 on success. + +SSL_get_tlsext_status_ocsp_resp() returns the length of the OCSP response data +or -1 if there is no OCSP response data. + +=cut diff --git a/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod b/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod index b754c16a86e66e..234fbc845002f3 100644 --- a/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod +++ b/deps/openssl/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod @@ -48,25 +48,8 @@ even if he gets hold of the normal (certified) key, as this key was only used for signing. In order to perform a DH key exchange the server must use a DH group -(DH parameters) and generate a DH key. -The server will always generate a new DH key during the negotiation -if either the DH parameters are supplied via callback or the -SSL_OP_SINGLE_DH_USE option of SSL_CTX_set_options(3) is set (or both). -It will immediately create a DH key if DH parameters are supplied via -SSL_CTX_set_tmp_dh() and SSL_OP_SINGLE_DH_USE is not set. -In this case, -it may happen that a key is generated on initialization without later -being needed, while on the other hand the computer time during the -negotiation is being saved. - -If "strong" primes were used to generate the DH parameters, it is not strictly -necessary to generate a new key for each handshake but it does improve forward -secrecy. If it is not assured that "strong" primes were used, -SSL_OP_SINGLE_DH_USE must be used in order to prevent small subgroup -attacks. Always using SSL_OP_SINGLE_DH_USE has an impact on the -computer time needed during negotiation, but it is not very large, so -application authors/users should consider always enabling this option. -The option is required to implement perfect forward secrecy (PFS). +(DH parameters) and generate a DH key. The server will always generate +a new DH key during the negotiation. As generating DH parameters is extremely time consuming, an application should not generate the parameters on the fly but supply the parameters. @@ -93,10 +76,9 @@ can supply the DH parameters via a callback function. Previous versions of the callback used B and B parameters to control parameter generation for export and non-export cipher suites. Modern servers that do not support export ciphersuites -are advised to either use SSL_CTX_set_tmp_dh() in combination with -SSL_OP_SINGLE_DH_USE, or alternatively, use the callback but ignore -B and B and simply supply at least 2048-bit -parameters in the callback. +are advised to either use SSL_CTX_set_tmp_dh() or alternatively, use +the callback but ignore B and B and simply +supply at least 2048-bit parameters in the callback. =head1 EXAMPLES @@ -128,7 +110,6 @@ partly left out.) if (SSL_CTX_set_tmp_dh(ctx, dh_2048) != 1) { /* Error. */ } - SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE); ... =head1 RETURN VALUES diff --git a/deps/openssl/openssl/engines/e_chil.c b/deps/openssl/openssl/engines/e_chil.c index 72d14fe383a4eb..5dfab513452761 100644 --- a/deps/openssl/openssl/engines/e_chil.c +++ b/deps/openssl/openssl/engines/e_chil.c @@ -1,4 +1,4 @@ -/* crypto/engine/e_chil.c -*- mode: C; c-file-style: "eay" -*- */ +/* crypto/engine/e_chil.c */ /* * Written by Richard Levitte (richard@levitte.org), Geoff Thorpe * (geoff@geoffthorpe.net) and Dr Stephen N Henson (steve@openssl.org) for diff --git a/deps/openssl/openssl/include/openssl/aes.h b/deps/openssl/openssl/include/openssl/aes.h index 87bf60f6f2bfbe..faa66c49148f50 100644 --- a/deps/openssl/openssl/include/openssl/aes.h +++ b/deps/openssl/openssl/include/openssl/aes.h @@ -1,4 +1,4 @@ -/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/aes/aes.h */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/include/openssl/bio.h b/deps/openssl/openssl/include/openssl/bio.h index f78796b069f547..6e2293bc66daad 100644 --- a/deps/openssl/openssl/include/openssl/bio.h +++ b/deps/openssl/openssl/include/openssl/bio.h @@ -479,11 +479,11 @@ struct bio_dgram_sctp_prinfo { # define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) # define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) # define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2) -# define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0) +# define BIO_get_conn_int_port(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,0,NULL) # define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) -/* BIO_s_accept_socket() */ +/* BIO_s_accept() */ # define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) # define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) /* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ @@ -496,6 +496,7 @@ struct bio_dgram_sctp_prinfo { # define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) # define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) +/* BIO_s_accept() and BIO_s_connect() */ # define BIO_do_connect(b) BIO_do_handshake(b) # define BIO_do_accept(b) BIO_do_handshake(b) # define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) @@ -515,12 +516,15 @@ struct bio_dgram_sctp_prinfo { # define BIO_get_url(b,url) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url)) # define BIO_get_no_connect_return(b) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL) +/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */ # define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) # define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) +/* BIO_s_file() */ # define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp) # define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp) +/* BIO_s_fd() and BIO_s_file() */ # define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) # define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) diff --git a/deps/openssl/openssl/include/openssl/camellia.h b/deps/openssl/openssl/include/openssl/camellia.h index 9be7c0fd999667..45e8d25b1dd5b5 100644 --- a/deps/openssl/openssl/include/openssl/camellia.h +++ b/deps/openssl/openssl/include/openssl/camellia.h @@ -1,4 +1,4 @@ -/* crypto/camellia/camellia.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/camellia/camellia.h */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/include/openssl/des_old.h b/deps/openssl/openssl/include/openssl/des_old.h index f1e1e2cb09cfb2..ee7607a2415f83 100644 --- a/deps/openssl/openssl/include/openssl/des_old.h +++ b/deps/openssl/openssl/include/openssl/des_old.h @@ -1,4 +1,4 @@ -/* crypto/des/des_old.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/des/des_old.h */ /*- * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING diff --git a/deps/openssl/openssl/include/openssl/dh.h b/deps/openssl/openssl/include/openssl/dh.h index b17767328183e0..5498a9dc106044 100644 --- a/deps/openssl/openssl/include/openssl/dh.h +++ b/deps/openssl/openssl/include/openssl/dh.h @@ -174,6 +174,7 @@ struct dh_st { /* DH_check_pub_key error codes */ # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 +# define DH_CHECK_PUBKEY_INVALID 0x03 /* * primes p where (p-1)/2 is prime too are called "safe"; we define this for diff --git a/deps/openssl/openssl/include/openssl/dso.h b/deps/openssl/openssl/include/openssl/dso.h index 7c4a1dc4a620fb..c9013f5cea8b25 100644 --- a/deps/openssl/openssl/include/openssl/dso.h +++ b/deps/openssl/openssl/include/openssl/dso.h @@ -1,4 +1,4 @@ -/* dso.h -*- mode:C; c-file-style: "eay" -*- */ +/* dso.h */ /* * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/include/openssl/kssl.h b/deps/openssl/openssl/include/openssl/kssl.h index 9a5767280150c2..ae8a51f472daf2 100644 --- a/deps/openssl/openssl/include/openssl/kssl.h +++ b/deps/openssl/openssl/include/openssl/kssl.h @@ -1,4 +1,4 @@ -/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */ +/* ssl/kssl.h */ /* * Written by Vern Staats for the OpenSSL project * 2000. project 2000. diff --git a/deps/openssl/openssl/include/openssl/opensslv.h b/deps/openssl/openssl/include/openssl/opensslv.h index abcef15b17d943..03b8c4843784a7 100644 --- a/deps/openssl/openssl/include/openssl/opensslv.h +++ b/deps/openssl/openssl/include/openssl/opensslv.h @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000205fL +# define OPENSSL_VERSION_NUMBER 0x1000206fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2e-fips 3 Dec 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2f-fips 28 Jan 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2e 3 Dec 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2f 28 Jan 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT diff --git a/deps/openssl/openssl/include/openssl/ssl.h b/deps/openssl/openssl/include/openssl/ssl.h index afec1f5bf29f69..ae8c92575e03e0 100644 --- a/deps/openssl/openssl/include/openssl/ssl.h +++ b/deps/openssl/openssl/include/openssl/ssl.h @@ -625,7 +625,7 @@ struct ssl_session_st { # define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x00040000L /* If set, always create a new key when using tmp_ecdh parameters */ # define SSL_OP_SINGLE_ECDH_USE 0x00080000L -/* If set, always create a new key when using tmp_dh parameters */ +/* Does nothing: retained for compatibility */ # define SSL_OP_SINGLE_DH_USE 0x00100000L /* Does nothing: retained for compatibiity */ # define SSL_OP_EPHEMERAL_RSA 0x0 @@ -2092,7 +2092,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_CTX_set1_sigalgs_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) # define SSL_set1_sigalgs(ctx, slist, slistlen) \ - SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS,clistlen,(int *)slist) + SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)slist) # define SSL_set1_sigalgs_list(ctx, s) \ SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) # define SSL_CTX_set1_client_sigalgs(ctx, slist, slistlen) \ @@ -2713,6 +2713,7 @@ void ERR_load_SSL_strings(void); # define SSL_F_SSL3_SETUP_KEY_BLOCK 157 # define SSL_F_SSL3_SETUP_READ_BUFFER 156 # define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 +# define SSL_F_SSL3_SHUTDOWN 396 # define SSL_F_SSL3_WRITE_BYTES 158 # define SSL_F_SSL3_WRITE_PENDING 159 # define SSL_F_SSL_ADD_CERT_CHAIN 318 @@ -3056,6 +3057,7 @@ void ERR_load_SSL_strings(void); # define SSL_R_SERVERHELLO_TLSEXT 275 # define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 # define SSL_R_SHORT_READ 219 +# define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 # define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 # define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 # define SSL_R_SRP_A_CALC 361 diff --git a/deps/openssl/openssl/include/openssl/ui.h b/deps/openssl/openssl/include/openssl/ui.h index b917edab3a7a38..0dc16330b8708a 100644 --- a/deps/openssl/openssl/include/openssl/ui.h +++ b/deps/openssl/openssl/include/openssl/ui.h @@ -1,4 +1,4 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/include/openssl/ui_compat.h b/deps/openssl/openssl/include/openssl/ui_compat.h index 42fb9ff6500f4d..bf541542c04112 100644 --- a/deps/openssl/openssl/include/openssl/ui_compat.h +++ b/deps/openssl/openssl/include/openssl/ui_compat.h @@ -1,4 +1,4 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ +/* crypto/ui/ui.h */ /* * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project * 2001. diff --git a/deps/openssl/openssl/include/openssl/x509_vfy.h b/deps/openssl/openssl/include/openssl/x509_vfy.h index bd8613c62ba429..2663e1c0a362aa 100644 --- a/deps/openssl/openssl/include/openssl/x509_vfy.h +++ b/deps/openssl/openssl/include/openssl/x509_vfy.h @@ -313,7 +313,7 @@ void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) # define X509_V_OK 0 -/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */ +# define X509_V_ERR_UNSPECIFIED 1 # define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 # define X509_V_ERR_UNABLE_TO_GET_CRL 3 diff --git a/deps/openssl/openssl/openssl.spec b/deps/openssl/openssl/openssl.spec index 45e737ad151531..72ace12c4440e3 100644 --- a/deps/openssl/openssl/openssl.spec +++ b/deps/openssl/openssl/openssl.spec @@ -6,7 +6,7 @@ Release: 1 Summary: Secure Sockets Layer and cryptography libraries and tools Name: openssl -Version: 1.0.2e +Version: 1.0.2f Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz License: OpenSSL Group: System Environment/Libraries diff --git a/deps/openssl/openssl/ssl/d1_both.c b/deps/openssl/openssl/ssl/d1_both.c index c2c8d57e9d9c14..d1fc716d5c5c14 100644 --- a/deps/openssl/openssl/ssl/d1_both.c +++ b/deps/openssl/openssl/ssl/d1_both.c @@ -295,8 +295,44 @@ int dtls1_do_write(SSL *s, int type) blocksize = 0; frag_off = 0; + s->rwstate = SSL_NOTHING; + /* s->init_num shouldn't ever be < 0...but just in case */ while (s->init_num > 0) { + if (type == SSL3_RT_HANDSHAKE && s->init_off != 0) { + /* We must be writing a fragment other than the first one */ + + if (frag_off > 0) { + /* This is the first attempt at writing out this fragment */ + + if (s->init_off <= DTLS1_HM_HEADER_LENGTH) { + /* + * Each fragment that was already sent must at least have + * contained the message header plus one other byte. + * Therefore |init_off| must have progressed by at least + * |DTLS1_HM_HEADER_LENGTH + 1| bytes. If not something went + * wrong. + */ + return -1; + } + + /* + * Adjust |init_off| and |init_num| to allow room for a new + * message header for this fragment. + */ + s->init_off -= DTLS1_HM_HEADER_LENGTH; + s->init_num += DTLS1_HM_HEADER_LENGTH; + } else { + /* + * We must have been called again after a retry so use the + * fragment offset from our last attempt. We do not need + * to adjust |init_off| and |init_num| as above, because + * that should already have been done before the retry. + */ + frag_off = s->d1->w_msg_hdr.frag_off; + } + } + used_len = BIO_wpending(SSL_get_wbio(s)) + DTLS1_RT_HEADER_LENGTH + mac_size + blocksize; if (s->d1->mtu > used_len) @@ -309,8 +345,10 @@ int dtls1_do_write(SSL *s, int type) * grr.. we could get an error if MTU picked was wrong */ ret = BIO_flush(SSL_get_wbio(s)); - if (ret <= 0) + if (ret <= 0) { + s->rwstate = SSL_WRITING; return ret; + } used_len = DTLS1_RT_HEADER_LENGTH + mac_size + blocksize; if (s->d1->mtu > used_len + DTLS1_HM_HEADER_LENGTH) { curr_mtu = s->d1->mtu - used_len; @@ -336,25 +374,6 @@ int dtls1_do_write(SSL *s, int type) * XDTLS: this function is too long. split out the CCS part */ if (type == SSL3_RT_HANDSHAKE) { - if (s->init_off != 0) { - OPENSSL_assert(s->init_off > DTLS1_HM_HEADER_LENGTH); - s->init_off -= DTLS1_HM_HEADER_LENGTH; - s->init_num += DTLS1_HM_HEADER_LENGTH; - - /* - * We just checked that s->init_num > 0 so this cast should - * be safe - */ - if (((unsigned int)s->init_num) > curr_mtu) - len = curr_mtu; - else - len = s->init_num; - } - - /* Shouldn't ever happen */ - if (len > INT_MAX) - len = INT_MAX; - if (len < DTLS1_HM_HEADER_LENGTH) { /* * len is so small that we really can't do anything sensible @@ -442,7 +461,16 @@ int dtls1_do_write(SSL *s, int type) } s->init_off += ret; s->init_num -= ret; - frag_off += (ret -= DTLS1_HM_HEADER_LENGTH); + ret -= DTLS1_HM_HEADER_LENGTH; + frag_off += ret; + + /* + * We save the fragment offset for the next fragment so we have it + * available in case of an IO retry. We don't know the length of the + * next fragment yet so just set that to 0 for now. It will be + * updated again later. + */ + dtls1_fix_message_header(s, frag_off, 0); } } return (0); diff --git a/deps/openssl/openssl/ssl/kssl.c b/deps/openssl/openssl/ssl/kssl.c index cf585679dcccfe..f2839bdcd7f53f 100644 --- a/deps/openssl/openssl/ssl/kssl.c +++ b/deps/openssl/openssl/ssl/kssl.c @@ -1,4 +1,4 @@ -/* ssl/kssl.c -*- mode: C; c-file-style: "eay" -*- */ +/* ssl/kssl.c */ /* * Written by Vern Staats for the OpenSSL project * 2000. diff --git a/deps/openssl/openssl/ssl/kssl.h b/deps/openssl/openssl/ssl/kssl.h index 9a5767280150c2..ae8a51f472daf2 100644 --- a/deps/openssl/openssl/ssl/kssl.h +++ b/deps/openssl/openssl/ssl/kssl.h @@ -1,4 +1,4 @@ -/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */ +/* ssl/kssl.h */ /* * Written by Vern Staats for the OpenSSL project * 2000. project 2000. diff --git a/deps/openssl/openssl/ssl/kssl_lcl.h b/deps/openssl/openssl/ssl/kssl_lcl.h index 46dcef22d16c86..8e6a6d69e9497c 100644 --- a/deps/openssl/openssl/ssl/kssl_lcl.h +++ b/deps/openssl/openssl/ssl/kssl_lcl.h @@ -1,4 +1,4 @@ -/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */ +/* ssl/kssl.h */ /* * Written by Vern Staats for the OpenSSL project * 2000. project 2000. diff --git a/deps/openssl/openssl/ssl/s2_srvr.c b/deps/openssl/openssl/ssl/s2_srvr.c index 4289272b73d3dc..07e9df82820a9e 100644 --- a/deps/openssl/openssl/ssl/s2_srvr.c +++ b/deps/openssl/openssl/ssl/s2_srvr.c @@ -402,7 +402,7 @@ static int get_client_master_key(SSL *s) } cp = ssl2_get_cipher_by_char(p); - if (cp == NULL) { + if (cp == NULL || sk_SSL_CIPHER_find(s->session->ciphers, cp) < 0) { ssl2_return_error(s, SSL2_PE_NO_CIPHER); SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_NO_CIPHER_MATCH); return (-1); @@ -598,6 +598,11 @@ static int get_client_hello(SSL *s) s->s2->tmp.cipher_spec_length = i; n2s(p, i); s->s2->tmp.session_id_length = i; + if ((i < 0) || (i > SSL_MAX_SSL_SESSION_ID_LENGTH)) { + ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); + return -1; + } n2s(p, i); s->s2->challenge_length = i; if ((i < SSL2_MIN_CHALLENGE_LENGTH) || @@ -687,8 +692,12 @@ static int get_client_hello(SSL *s) prio = cs; allow = cl; } + + /* Generate list of SSLv2 ciphers shared between client and server */ for (z = 0; z < sk_SSL_CIPHER_num(prio); z++) { - if (sk_SSL_CIPHER_find(allow, sk_SSL_CIPHER_value(prio, z)) < 0) { + const SSL_CIPHER *cp = sk_SSL_CIPHER_value(prio, z); + if ((cp->algorithm_ssl & SSL_SSLV2) == 0 || + sk_SSL_CIPHER_find(allow, cp) < 0) { (void)sk_SSL_CIPHER_delete(prio, z); z--; } @@ -697,6 +706,13 @@ static int get_client_hello(SSL *s) sk_SSL_CIPHER_free(s->session->ciphers); s->session->ciphers = prio; } + + /* Make sure we have at least one cipher in common */ + if (sk_SSL_CIPHER_num(s->session->ciphers) == 0) { + ssl2_return_error(s, SSL2_PE_NO_CIPHER); + SSLerr(SSL_F_GET_CLIENT_HELLO, SSL_R_NO_CIPHER_MATCH); + return -1; + } /* * s->session->ciphers should now have a list of ciphers that are on * both the client and server. This list is ordered by the order the diff --git a/deps/openssl/openssl/ssl/s3_clnt.c b/deps/openssl/openssl/ssl/s3_clnt.c index bc5254c8116028..04cc9f54a92dff 100644 --- a/deps/openssl/openssl/ssl/s3_clnt.c +++ b/deps/openssl/openssl/ssl/s3_clnt.c @@ -2350,37 +2350,44 @@ int ssl3_get_cert_status(SSL *s) n = s->method->ssl_get_message(s, SSL3_ST_CR_CERT_STATUS_A, SSL3_ST_CR_CERT_STATUS_B, - SSL3_MT_CERTIFICATE_STATUS, 16384, &ok); + -1, 16384, &ok); if (!ok) return ((int)n); - if (n < 4) { - /* need at least status type + length */ - al = SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_LENGTH_MISMATCH); - goto f_err; - } - p = (unsigned char *)s->init_msg; - if (*p++ != TLSEXT_STATUSTYPE_ocsp) { - al = SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_UNSUPPORTED_STATUS_TYPE); - goto f_err; - } - n2l3(p, resplen); - if (resplen + 4 != n) { - al = SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_LENGTH_MISMATCH); - goto f_err; - } - if (s->tlsext_ocsp_resp) - OPENSSL_free(s->tlsext_ocsp_resp); - s->tlsext_ocsp_resp = BUF_memdup(p, resplen); - if (!s->tlsext_ocsp_resp) { - al = SSL_AD_INTERNAL_ERROR; - SSLerr(SSL_F_SSL3_GET_CERT_STATUS, ERR_R_MALLOC_FAILURE); - goto f_err; + + if (s->s3->tmp.message_type != SSL3_MT_CERTIFICATE_STATUS) { + /* + * The CertificateStatus message is optional even if + * tlsext_status_expected is set + */ + s->s3->tmp.reuse_message = 1; + } else { + if (n < 4) { + /* need at least status type + length */ + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_LENGTH_MISMATCH); + goto f_err; + } + p = (unsigned char *)s->init_msg; + if (*p++ != TLSEXT_STATUSTYPE_ocsp) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_UNSUPPORTED_STATUS_TYPE); + goto f_err; + } + n2l3(p, resplen); + if (resplen + 4 != n) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CERT_STATUS, SSL_R_LENGTH_MISMATCH); + goto f_err; + } + s->tlsext_ocsp_resp = BUF_memdup(p, resplen); + if (s->tlsext_ocsp_resp == NULL) { + al = SSL_AD_INTERNAL_ERROR; + SSLerr(SSL_F_SSL3_GET_CERT_STATUS, ERR_R_MALLOC_FAILURE); + goto f_err; + } + s->tlsext_ocsp_resplen = resplen; } - s->tlsext_ocsp_resplen = resplen; if (s->ctx->tlsext_status_cb) { int ret; ret = s->ctx->tlsext_status_cb(s, s->ctx->tlsext_status_arg); @@ -3603,7 +3610,7 @@ int ssl3_check_cert_and_algorithm(SSL *s) DH_free(dh_srvr); } - if ((!SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 768) + if ((!SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 1024) || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 512)) { SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM, SSL_R_DH_KEY_TOO_SMALL); goto f_err; diff --git a/deps/openssl/openssl/ssl/s3_lib.c b/deps/openssl/openssl/ssl/s3_lib.c index 64793d6af34f84..f846cb5b7b0199 100644 --- a/deps/openssl/openssl/ssl/s3_lib.c +++ b/deps/openssl/openssl/ssl/s3_lib.c @@ -3206,13 +3206,6 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB); return (ret); } - if (!(s->options & SSL_OP_SINGLE_DH_USE)) { - if (!DH_generate_key(dh)) { - DH_free(dh); - SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB); - return (ret); - } - } if (s->cert->dh_tmp != NULL) DH_free(s->cert->dh_tmp); s->cert->dh_tmp = dh; @@ -3263,6 +3256,8 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) #ifndef OPENSSL_NO_TLSEXT case SSL_CTRL_SET_TLSEXT_HOSTNAME: if (larg == TLSEXT_NAMETYPE_host_name) { + size_t len; + if (s->tlsext_hostname != NULL) OPENSSL_free(s->tlsext_hostname); s->tlsext_hostname = NULL; @@ -3270,7 +3265,8 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) ret = 1; if (parg == NULL) break; - if (strlen((char *)parg) > TLSEXT_MAXLEN_host_name) { + len = strlen((char *)parg); + if (len == 0 || len > TLSEXT_MAXLEN_host_name) { SSLerr(SSL_F_SSL3_CTRL, SSL_R_SSL3_EXT_INVALID_SERVERNAME); return 0; } @@ -3710,13 +3706,6 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_DH_LIB); return 0; } - if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) { - if (!DH_generate_key(new)) { - SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_DH_LIB); - DH_free(new); - return 0; - } - } if (cert->dh_tmp != NULL) DH_free(cert->dh_tmp); cert->dh_tmp = new; @@ -4337,6 +4326,21 @@ int ssl3_shutdown(SSL *s) } #endif } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) { + if (SSL_in_init(s)) { + /* + * We can't shutdown properly if we are in the middle of a + * handshake. Doing so is problematic because the peer may send a + * CCS before it acts on our close_notify. However we should not + * continue to process received handshake messages or CCS once our + * close_notify has been sent. Therefore any close_notify from + * the peer will be unreadable because we have not moved to the next + * cipher state. Its best just to avoid this can-of-worms. Return + * an error if we are wanting to wait for a close_notify from the + * peer and we are in init. + */ + SSLerr(SSL_F_SSL3_SHUTDOWN, SSL_R_SHUTDOWN_WHILE_IN_INIT); + return -1; + } /* * If we are waiting for a close from our peer, we are closed */ diff --git a/deps/openssl/openssl/ssl/s3_srvr.c b/deps/openssl/openssl/ssl/s3_srvr.c index ee83105b75bffa..ab28702ee972da 100644 --- a/deps/openssl/openssl/ssl/s3_srvr.c +++ b/deps/openssl/openssl/ssl/s3_srvr.c @@ -1,4 +1,4 @@ -/* ssl/s3_srvr.c -*- mode:C; c-file-style: "eay" -*- */ +/* ssl/s3_srvr.c */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1004,6 +1004,12 @@ int ssl3_get_client_hello(SSL *s) goto f_err; } + if ((j < 0) || (j > SSL_MAX_SSL_SESSION_ID_LENGTH)) { + al = SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH); + goto f_err; + } + s->hit = 0; /* * Versions before 0.9.7 always allow clients to resume sessions in @@ -1681,20 +1687,9 @@ int ssl3_send_server_key_exchange(SSL *s) } s->s3->tmp.dh = dh; - if ((dhp->pub_key == NULL || - dhp->priv_key == NULL || - (s->options & SSL_OP_SINGLE_DH_USE))) { - if (!DH_generate_key(dh)) { - SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB); - goto err; - } - } else { - dh->pub_key = BN_dup(dhp->pub_key); - dh->priv_key = BN_dup(dhp->priv_key); - if ((dh->pub_key == NULL) || (dh->priv_key == NULL)) { - SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB); - goto err; - } + if (!DH_generate_key(dh)) { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB); + goto err; } r[0] = dh->p; r[1] = dh->g; diff --git a/deps/openssl/openssl/ssl/ssl.h b/deps/openssl/openssl/ssl/ssl.h index afec1f5bf29f69..ae8c92575e03e0 100644 --- a/deps/openssl/openssl/ssl/ssl.h +++ b/deps/openssl/openssl/ssl/ssl.h @@ -625,7 +625,7 @@ struct ssl_session_st { # define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x00040000L /* If set, always create a new key when using tmp_ecdh parameters */ # define SSL_OP_SINGLE_ECDH_USE 0x00080000L -/* If set, always create a new key when using tmp_dh parameters */ +/* Does nothing: retained for compatibility */ # define SSL_OP_SINGLE_DH_USE 0x00100000L /* Does nothing: retained for compatibiity */ # define SSL_OP_EPHEMERAL_RSA 0x0 @@ -2092,7 +2092,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_CTX_set1_sigalgs_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) # define SSL_set1_sigalgs(ctx, slist, slistlen) \ - SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS,clistlen,(int *)slist) + SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)slist) # define SSL_set1_sigalgs_list(ctx, s) \ SSL_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)s) # define SSL_CTX_set1_client_sigalgs(ctx, slist, slistlen) \ @@ -2713,6 +2713,7 @@ void ERR_load_SSL_strings(void); # define SSL_F_SSL3_SETUP_KEY_BLOCK 157 # define SSL_F_SSL3_SETUP_READ_BUFFER 156 # define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 +# define SSL_F_SSL3_SHUTDOWN 396 # define SSL_F_SSL3_WRITE_BYTES 158 # define SSL_F_SSL3_WRITE_PENDING 159 # define SSL_F_SSL_ADD_CERT_CHAIN 318 @@ -3056,6 +3057,7 @@ void ERR_load_SSL_strings(void); # define SSL_R_SERVERHELLO_TLSEXT 275 # define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 # define SSL_R_SHORT_READ 219 +# define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 # define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 # define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 # define SSL_R_SRP_A_CALC 361 diff --git a/deps/openssl/openssl/ssl/ssl_err.c b/deps/openssl/openssl/ssl/ssl_err.c index 6d1366f2a59d48..dd3b2afd1ea6b7 100644 --- a/deps/openssl/openssl/ssl/ssl_err.c +++ b/deps/openssl/openssl/ssl/ssl_err.c @@ -206,6 +206,7 @@ static ERR_STRING_DATA SSL_str_functs[] = { {ERR_FUNC(SSL_F_SSL3_SETUP_KEY_BLOCK), "ssl3_setup_key_block"}, {ERR_FUNC(SSL_F_SSL3_SETUP_READ_BUFFER), "ssl3_setup_read_buffer"}, {ERR_FUNC(SSL_F_SSL3_SETUP_WRITE_BUFFER), "ssl3_setup_write_buffer"}, + {ERR_FUNC(SSL_F_SSL3_SHUTDOWN), "ssl3_shutdown"}, {ERR_FUNC(SSL_F_SSL3_WRITE_BYTES), "ssl3_write_bytes"}, {ERR_FUNC(SSL_F_SSL3_WRITE_PENDING), "ssl3_write_pending"}, {ERR_FUNC(SSL_F_SSL_ADD_CERT_CHAIN), "ssl_add_cert_chain"}, @@ -647,6 +648,7 @@ static ERR_STRING_DATA SSL_str_reasons[] = { {ERR_REASON(SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED), "session id context uninitialized"}, {ERR_REASON(SSL_R_SHORT_READ), "short read"}, + {ERR_REASON(SSL_R_SHUTDOWN_WHILE_IN_INIT), "shutdown while in init"}, {ERR_REASON(SSL_R_SIGNATURE_ALGORITHMS_ERROR), "signature algorithms error"}, {ERR_REASON(SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE), diff --git a/deps/openssl/openssl/ssl/ssl_lib.c b/deps/openssl/openssl/ssl/ssl_lib.c index f2071db93702c7..2744be8ad8ce67 100644 --- a/deps/openssl/openssl/ssl/ssl_lib.c +++ b/deps/openssl/openssl/ssl/ssl_lib.c @@ -1060,10 +1060,7 @@ int SSL_shutdown(SSL *s) return -1; } - if ((s != NULL) && !SSL_in_init(s)) - return (s->method->ssl_shutdown(s)); - else - return (1); + return s->method->ssl_shutdown(s); } int SSL_renegotiate(SSL *s) diff --git a/deps/openssl/openssl/ssl/ssl_sess.c b/deps/openssl/openssl/ssl/ssl_sess.c index 68390d31080993..b182998343844a 100644 --- a/deps/openssl/openssl/ssl/ssl_sess.c +++ b/deps/openssl/openssl/ssl/ssl_sess.c @@ -573,9 +573,6 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, int r; #endif - if (len < 0 || len > SSL_MAX_SSL_SESSION_ID_LENGTH) - goto err; - if (session_id + len > limit) { fatal = 1; goto err; diff --git a/deps/openssl/openssl/ssl/t1_enc.c b/deps/openssl/openssl/ssl/t1_enc.c index f46544b4d71332..514fcb3e4e74c4 100644 --- a/deps/openssl/openssl/ssl/t1_enc.c +++ b/deps/openssl/openssl/ssl/t1_enc.c @@ -1155,7 +1155,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, so = s->s3->server_opaque_prf_input; /* * must be same as col (see - * draft-resc-00.txts-opaque-prf-input-00.txt, section 3.1) + * draft-rescorla-tls-opaque-prf-input-00.txt, section 3.1) */ sol = s->s3->client_opaque_prf_input_len; } diff --git a/deps/openssl/openssl/ssl/t1_lib.c b/deps/openssl/openssl/ssl/t1_lib.c index 3176d1e3babaeb..d9ba99d7358466 100644 --- a/deps/openssl/openssl/ssl/t1_lib.c +++ b/deps/openssl/openssl/ssl/t1_lib.c @@ -3157,22 +3157,20 @@ int ssl_check_serverhello_tlsext(SSL *s) } # endif + OPENSSL_free(s->tlsext_ocsp_resp); + s->tlsext_ocsp_resp = NULL; + s->tlsext_ocsp_resplen = -1; /* * If we've requested certificate status and we wont get one tell the * callback */ if ((s->tlsext_status_type != -1) && !(s->tlsext_status_expected) - && s->ctx && s->ctx->tlsext_status_cb) { + && !(s->hit) && s->ctx && s->ctx->tlsext_status_cb) { int r; /* - * Set resp to NULL, resplen to -1 so callback knows there is no - * response. + * Call callback with resp == NULL and resplen == -1 so callback + * knows there is no response */ - if (s->tlsext_ocsp_resp) { - OPENSSL_free(s->tlsext_ocsp_resp); - s->tlsext_ocsp_resp = NULL; - } - s->tlsext_ocsp_resplen = -1; r = s->ctx->tlsext_status_cb(s, s->ctx->tlsext_status_arg); if (r == 0) { al = SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE; @@ -3583,7 +3581,7 @@ static int tls12_get_pkey_idx(unsigned char sig_alg) static void tls1_lookup_sigalg(int *phash_nid, int *psign_nid, int *psignhash_nid, const unsigned char *data) { - int sign_nid = 0, hash_nid = 0; + int sign_nid = NID_undef, hash_nid = NID_undef; if (!phash_nid && !psign_nid && !psignhash_nid) return; if (phash_nid || psignhash_nid) { @@ -3599,9 +3597,9 @@ static void tls1_lookup_sigalg(int *phash_nid, int *psign_nid, *psign_nid = sign_nid; } if (psignhash_nid) { - if (sign_nid && hash_nid) - OBJ_find_sigid_by_algs(psignhash_nid, hash_nid, sign_nid); - else + if (sign_nid == NID_undef || hash_nid == NID_undef + || OBJ_find_sigid_by_algs(psignhash_nid, hash_nid, + sign_nid) <= 0) *psignhash_nid = NID_undef; } } diff --git a/deps/openssl/openssl/test/bctest b/deps/openssl/openssl/test/bctest new file mode 100755 index 00000000000000..bdb3218f7acaa2 --- /dev/null +++ b/deps/openssl/openssl/test/bctest @@ -0,0 +1,111 @@ +#!/bin/sh + +# This script is used by test/Makefile.ssl to check whether a sane 'bc' +# is installed. +# ('make test_bn' should not try to run 'bc' if it does not exist or if +# it is a broken 'bc' version that is known to cause trouble.) +# +# If 'bc' works, we also test if it knows the 'print' command. +# +# In any case, output an appropriate command line for running (or not +# running) bc. + + +IFS=: +try_without_dir=true +# First we try "bc", then "$dir/bc" for each item in $PATH. +for dir in dummy:$PATH; do + if [ "$try_without_dir" = true ]; then + # first iteration + bc=bc + try_without_dir=false + else + # second and later iterations + bc="$dir/bc" + if [ ! -f "$bc" ]; then # '-x' is not available on Ultrix + bc='' + fi + fi + + if [ ! "$bc" = '' ]; then + failure=none + + + # Test for SunOS 5.[78] bc bug + "$bc" >tmp.bctest <<\EOF +obase=16 +ibase=16 +a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ +CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ +10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ +C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ +3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ +4FC3CADF855448B24A9D7640BCF473E +b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ +9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ +8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ +3ED0E2017D60A68775B75481449 +(a/b)*b + (a%b) - a +EOF + if [ 0 != "`cat tmp.bctest`" ]; then + failure=SunOStest + fi + + + if [ "$failure" = none ]; then + # Test for SCO bc bug. + "$bc" >tmp.bctest <<\EOF +obase=16 +ibase=16 +-FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ +9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ +11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ +1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ +AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ +F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ +B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ +02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ +85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ +A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ +E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ +8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ +04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ +89C8D71 +AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ +928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ +8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ +37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ +E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ +F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ +9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ +D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ +5296964 +EOF + if [ "0 +0" != "`cat tmp.bctest`" ]; then + failure=SCOtest + fi + fi + + + if [ "$failure" = none ]; then + # bc works; now check if it knows the 'print' command. + if [ "OK" = "`echo 'print \"OK\"' | $bc 2>/dev/null`" ] + then + echo "$bc" + else + echo "sed 's/print.*//' | $bc" + fi + exit 0 + fi + + echo "$bc does not work properly ('$failure' failed). Looking for another bc ..." >&2 + fi +done + +echo "No working bc found. Consider installing GNU bc." >&2 +if [ "$1" = ignore ]; then + echo "cat >/dev/null" + exit 0 +fi +exit 1 diff --git a/deps/openssl/openssl/test/bftest.c b/deps/openssl/openssl/test/bftest.c deleted file mode 120000 index eb8c15de7ecf13..00000000000000 --- a/deps/openssl/openssl/test/bftest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/bf/bftest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/bntest.c b/deps/openssl/openssl/test/bntest.c deleted file mode 120000 index 1f781768a9a449..00000000000000 --- a/deps/openssl/openssl/test/bntest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/bn/bntest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/casttest.c b/deps/openssl/openssl/test/casttest.c deleted file mode 120000 index 823c4bb36cde1b..00000000000000 --- a/deps/openssl/openssl/test/casttest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/cast/casttest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/clienthellotest.c b/deps/openssl/openssl/test/clienthellotest.c deleted file mode 120000 index ae25f16c43fe3f..00000000000000 --- a/deps/openssl/openssl/test/clienthellotest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../ssl/clienthellotest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/constant_time_test.c b/deps/openssl/openssl/test/constant_time_test.c deleted file mode 120000 index 4f9a6aa6e5a6ff..00000000000000 --- a/deps/openssl/openssl/test/constant_time_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/constant_time_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/destest.c b/deps/openssl/openssl/test/destest.c deleted file mode 120000 index fd77cd5ca86d94..00000000000000 --- a/deps/openssl/openssl/test/destest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/des/destest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/dhtest.c b/deps/openssl/openssl/test/dhtest.c deleted file mode 120000 index 7c3e64db0d89bf..00000000000000 --- a/deps/openssl/openssl/test/dhtest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/dh/dhtest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/dsatest.c b/deps/openssl/openssl/test/dsatest.c deleted file mode 120000 index 1a181759a183f8..00000000000000 --- a/deps/openssl/openssl/test/dsatest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/dsa/dsatest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/ecdhtest.c b/deps/openssl/openssl/test/ecdhtest.c deleted file mode 120000 index 5e24a98a670cb2..00000000000000 --- a/deps/openssl/openssl/test/ecdhtest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/ecdh/ecdhtest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/ecdsatest.c b/deps/openssl/openssl/test/ecdsatest.c deleted file mode 120000 index c2bbe4f91b3ac3..00000000000000 --- a/deps/openssl/openssl/test/ecdsatest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/ecdsa/ecdsatest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/ectest.c b/deps/openssl/openssl/test/ectest.c deleted file mode 120000 index e25805f3e0274d..00000000000000 --- a/deps/openssl/openssl/test/ectest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/ec/ectest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/enginetest.c b/deps/openssl/openssl/test/enginetest.c deleted file mode 120000 index 7eb1831ea39848..00000000000000 --- a/deps/openssl/openssl/test/enginetest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/engine/enginetest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/evp_extra_test.c b/deps/openssl/openssl/test/evp_extra_test.c deleted file mode 120000 index 7be69e4f57972e..00000000000000 --- a/deps/openssl/openssl/test/evp_extra_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/evp/evp_extra_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/evp_test.c b/deps/openssl/openssl/test/evp_test.c deleted file mode 120000 index 969b2dfaca9a28..00000000000000 --- a/deps/openssl/openssl/test/evp_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/evp/evp_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/exptest.c b/deps/openssl/openssl/test/exptest.c deleted file mode 120000 index cea2f17017cdd5..00000000000000 --- a/deps/openssl/openssl/test/exptest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/bn/exptest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/heartbeat_test.c b/deps/openssl/openssl/test/heartbeat_test.c deleted file mode 120000 index 836fb8a6d71de4..00000000000000 --- a/deps/openssl/openssl/test/heartbeat_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../ssl/heartbeat_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/hmactest.c b/deps/openssl/openssl/test/hmactest.c deleted file mode 120000 index a646bcdd43548f..00000000000000 --- a/deps/openssl/openssl/test/hmactest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/hmac/hmactest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/ideatest.c b/deps/openssl/openssl/test/ideatest.c deleted file mode 120000 index ba9935815cddd1..00000000000000 --- a/deps/openssl/openssl/test/ideatest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/idea/ideatest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/igetest.c b/deps/openssl/openssl/test/igetest.c index 0c7b3573d05065..08f361a0a85c4d 100644 --- a/deps/openssl/openssl/test/igetest.c +++ b/deps/openssl/openssl/test/igetest.c @@ -1,4 +1,4 @@ -/* test/igetest.c -*- mode:C; c-file-style: "eay" -*- */ +/* test/igetest.c */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * diff --git a/deps/openssl/openssl/test/jpaketest.c b/deps/openssl/openssl/test/jpaketest.c deleted file mode 120000 index 1b5e260fabc70e..00000000000000 --- a/deps/openssl/openssl/test/jpaketest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/dummytest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/md2test.c b/deps/openssl/openssl/test/md2test.c deleted file mode 120000 index 1b5e260fabc70e..00000000000000 --- a/deps/openssl/openssl/test/md2test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/dummytest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/md4test.c b/deps/openssl/openssl/test/md4test.c deleted file mode 120000 index 88e2eb82c7497e..00000000000000 --- a/deps/openssl/openssl/test/md4test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/md4/md4test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/md5test.c b/deps/openssl/openssl/test/md5test.c deleted file mode 120000 index 62779aedff6c78..00000000000000 --- a/deps/openssl/openssl/test/md5test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/md5/md5test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/mdc2test.c b/deps/openssl/openssl/test/mdc2test.c deleted file mode 120000 index 89c5faf92ecd01..00000000000000 --- a/deps/openssl/openssl/test/mdc2test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/mdc2/mdc2test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/randtest.c b/deps/openssl/openssl/test/randtest.c deleted file mode 120000 index 7094f41bd03fce..00000000000000 --- a/deps/openssl/openssl/test/randtest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/rand/randtest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/rc2test.c b/deps/openssl/openssl/test/rc2test.c deleted file mode 120000 index 4101b4f4e815da..00000000000000 --- a/deps/openssl/openssl/test/rc2test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/rc2/rc2test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/rc4test.c b/deps/openssl/openssl/test/rc4test.c deleted file mode 120000 index d3c90794b3071a..00000000000000 --- a/deps/openssl/openssl/test/rc4test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/rc4/rc4test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/rc5test.c b/deps/openssl/openssl/test/rc5test.c deleted file mode 120000 index 1b5e260fabc70e..00000000000000 --- a/deps/openssl/openssl/test/rc5test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/dummytest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/rmdtest.c b/deps/openssl/openssl/test/rmdtest.c deleted file mode 120000 index 1744939e0fcde9..00000000000000 --- a/deps/openssl/openssl/test/rmdtest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/ripemd/rmdtest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/rsa_test.c b/deps/openssl/openssl/test/rsa_test.c deleted file mode 120000 index 4bc7c768096927..00000000000000 --- a/deps/openssl/openssl/test/rsa_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/rsa/rsa_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/sha1test.c b/deps/openssl/openssl/test/sha1test.c deleted file mode 120000 index 172c67cc8db9ba..00000000000000 --- a/deps/openssl/openssl/test/sha1test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/sha/sha1test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/sha256t.c b/deps/openssl/openssl/test/sha256t.c deleted file mode 120000 index 2f356c921b6358..00000000000000 --- a/deps/openssl/openssl/test/sha256t.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/sha/sha256t.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/sha512t.c b/deps/openssl/openssl/test/sha512t.c deleted file mode 120000 index fbab5ab848c6a6..00000000000000 --- a/deps/openssl/openssl/test/sha512t.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/sha/sha512t.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/shatest.c b/deps/openssl/openssl/test/shatest.c deleted file mode 120000 index b0bffa74fd288a..00000000000000 --- a/deps/openssl/openssl/test/shatest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/sha/shatest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/srptest.c b/deps/openssl/openssl/test/srptest.c deleted file mode 120000 index 4f8b8f850c7ec1..00000000000000 --- a/deps/openssl/openssl/test/srptest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/srp/srptest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/ssltest.c b/deps/openssl/openssl/test/ssltest.c deleted file mode 120000 index 9ee1c02f163ca9..00000000000000 --- a/deps/openssl/openssl/test/ssltest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../ssl/ssltest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/v3nametest.c b/deps/openssl/openssl/test/v3nametest.c deleted file mode 120000 index 05ac9411585abe..00000000000000 --- a/deps/openssl/openssl/test/v3nametest.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/x509v3/v3nametest.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/verify_extra_test.c b/deps/openssl/openssl/test/verify_extra_test.c deleted file mode 120000 index 0d94843bbfd7b7..00000000000000 --- a/deps/openssl/openssl/test/verify_extra_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/x509/verify_extra_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/test/wp_test.c b/deps/openssl/openssl/test/wp_test.c deleted file mode 120000 index a0a05266b1f471..00000000000000 --- a/deps/openssl/openssl/test/wp_test.c +++ /dev/null @@ -1 +0,0 @@ -openssl-1.0.2e/../crypto/whrlpool/wp_test.c \ No newline at end of file diff --git a/deps/openssl/openssl/util/domd b/deps/openssl/openssl/util/domd index 6a628c7f96c22b..95bb1b06e25786 100755 --- a/deps/openssl/openssl/util/domd +++ b/deps/openssl/openssl/util/domd @@ -14,8 +14,8 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi cp Makefile Makefile.save # fake the presence of Kerberos touch $TOP/krb5.h -if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" || - echo $MAKEDEPEND | grep -q "gcc"; then +if ${MAKEDEPEND} --version 2>&1 | grep "clang" > /dev/null || + echo $MAKEDEPEND | grep "gcc" > /dev/null; then args="" while [ $# -gt 0 ]; do if [ "$1" != "--" ]; then args="$args $1"; fi diff --git a/deps/openssl/openssl/util/pl/VC-32.pl b/deps/openssl/openssl/util/pl/VC-32.pl index 284fe0381ed918..0f5547f056c2bc 100644 --- a/deps/openssl/openssl/util/pl/VC-32.pl +++ b/deps/openssl/openssl/util/pl/VC-32.pl @@ -361,9 +361,13 @@ sub do_link_rule $ret.="$target: $files $dep_libs"; if ($standalone == 1) { - $ret.=" \$(OBJ_D)${o}applink.obj\n"; + $ret.=" \$(OBJ_D)${o}applink.obj" if $shlib; + $ret.="\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t"; - $ret.= "\$(EX_LIBS) \$(OBJ_D)${o}applink.obj " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild); + if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild) { + $ret.= "\$(EX_LIBS) "; + $ret.= "\$(OBJ_D)${o}applink.obj " if $shlib; + } $ret.="$files $libs\n<<\n"; } elsif ($standalone == 2) diff --git a/deps/openssl/openssl/util/pod2mantest b/deps/openssl/openssl/util/pod2mantest new file mode 100755 index 00000000000000..384e683df4cc76 --- /dev/null +++ b/deps/openssl/openssl/util/pod2mantest @@ -0,0 +1,58 @@ +#!/bin/sh + +# This script is used by test/Makefile to check whether a sane 'pod2man' +# is installed. +# ('make install' should not try to run 'pod2man' if it does not exist or if +# it is a broken 'pod2man' version that is known to cause trouble. if we find +# the system 'pod2man' to be broken, we use our own copy instead) +# +# In any case, output an appropriate command line for running (or not +# running) pod2man. + + +IFS=: +if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi + +try_without_dir=true +# First we try "pod2man", then "$dir/pod2man" for each item in $PATH. +for dir in dummy${IFS}$PATH; do + if [ "$try_without_dir" = true ]; then + # first iteration + pod2man=pod2man + try_without_dir=false + else + # second and later iterations + pod2man="$dir/pod2man" + if [ ! -f "$pod2man" ]; then # '-x' is not available on Ultrix + pod2man='' + fi + fi + + if [ ! "$pod2man" = '' ]; then + failure=none + + if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | fgrep OpenSSL >/dev/null; then + : + else + failure=BasicTest + fi + + if [ "$failure" = none ]; then + if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null; then + failure=MultilineTest + fi + fi + + + if [ "$failure" = none ]; then + echo "$pod2man" + exit 0 + fi + + echo "$pod2man does not work properly ('$failure' failed). Looking for another pod2man ..." >&2 + fi +done + +echo "No working pod2man found. Consider installing a new version." >&2 +echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 +echo "$1 ../../util/pod2man.pl" From fcb8cae61efea50966580e62c4cce009be6ebbd4 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Wed, 27 May 2015 10:33:38 +0900 Subject: [PATCH 258/262] deps: add -no_rand_screen to openssl s_client In openssl s_client on Windows, RAND_screen() is invoked to initialize random state but it takes several seconds in each connection. This added -no_rand_screen to openssl s_client on Windows to skip RAND_screen() and gets a better performance in the unit test of test-tls-server-verify. Do not enable this except to use in the unit test. Fixes: https://github.com/nodejs/node/issues/1461 PR-URL: https://github.com/nodejs/node/pull/1836 Reviewed-By: Ben Noordhuis --- deps/openssl/openssl/apps/app_rand.c | 11 ++++++++++- deps/openssl/openssl/apps/s_client.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/deps/openssl/openssl/apps/app_rand.c b/deps/openssl/openssl/apps/app_rand.c index 7f40bba7646882..b6fe294a682711 100644 --- a/deps/openssl/openssl/apps/app_rand.c +++ b/deps/openssl/openssl/apps/app_rand.c @@ -124,7 +124,16 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) char buffer[200]; #ifdef OPENSSL_SYS_WINDOWS - RAND_screen(); + /* + * allocate 2 to dont_warn not to use RAND_screen() via + * -no_rand_screen option in s_client + */ + if (dont_warn != 2) { + BIO_printf(bio_e, "Loading 'screen' into random state -"); + BIO_flush(bio_e); + RAND_screen(); + BIO_printf(bio_e, " done\n"); + } #endif if (file == NULL) diff --git a/deps/openssl/openssl/apps/s_client.c b/deps/openssl/openssl/apps/s_client.c index 022ca6cf6b22d7..2abef8869a1310 100644 --- a/deps/openssl/openssl/apps/s_client.c +++ b/deps/openssl/openssl/apps/s_client.c @@ -236,6 +236,7 @@ static BIO *bio_c_msg = NULL; static int c_quiet = 0; static int c_ign_eof = 0; static int c_brief = 0; +static int c_no_rand_screen = 0; #ifndef OPENSSL_NO_PSK /* Default PSK identity and key */ @@ -456,6 +457,10 @@ static void sc_usage(void) " -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err, " -keymatexportlen len - Export len bytes of keying material (default 20)\n"); +#ifdef OPENSSL_SYS_WINDOWS + BIO_printf(bio_err, + " -no_rand_screen - Do not use RAND_screen() to initialize random state\n"); +#endif } #ifndef OPENSSL_NO_TLSEXT @@ -1135,6 +1140,10 @@ int MAIN(int argc, char **argv) keymatexportlen = atoi(*(++argv)); if (keymatexportlen == 0) goto bad; +#ifdef OPENSSL_SYS_WINDOWS + } else if (strcmp(*argv, "-no_rand_screen") == 0) { + c_no_rand_screen = 1; +#endif } else { BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; @@ -1240,7 +1249,7 @@ int MAIN(int argc, char **argv) if (!load_excert(&exc, bio_err)) goto end; - if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL + if (!app_RAND_load_file(NULL, bio_err, ++c_no_rand_screen) && inrand == NULL && !RAND_status()) { BIO_printf(bio_err, "warning, not much extra random data, consider using the -rand option\n"); From fc446ba2fbf8678cc581b0c29f95cc07869ba82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 29 Jan 2016 11:46:48 -0800 Subject: [PATCH 259/262] deps: upgrade to npm 2.14.16 PR-URL: https://github.com/nodejs/node/pull/4960 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- deps/npm/.travis.yml | 3 +- deps/npm/AUTHORS | 9 + deps/npm/CHANGELOG.md | 121 ++++++++++++ deps/npm/README.md | 46 ----- deps/npm/bin/node-gyp-bin/node-gyp.cmd | 10 +- deps/npm/doc/cli/npm-dist-tag.md | 25 ++- deps/npm/doc/cli/npm-install.md | 4 +- deps/npm/doc/cli/npm-publish.md | 11 +- deps/npm/doc/cli/npm-update.md | 2 +- deps/npm/doc/files/npm-folders.md | 10 +- deps/npm/doc/files/package.json.md | 4 +- deps/npm/doc/misc/npm-config.md | 2 +- deps/npm/html/doc/README.html | 38 +--- deps/npm/html/doc/api/npm-bin.html | 2 +- deps/npm/html/doc/api/npm-bugs.html | 2 +- deps/npm/html/doc/api/npm-cache.html | 2 +- deps/npm/html/doc/api/npm-commands.html | 2 +- deps/npm/html/doc/api/npm-config.html | 2 +- deps/npm/html/doc/api/npm-deprecate.html | 2 +- deps/npm/html/doc/api/npm-docs.html | 2 +- deps/npm/html/doc/api/npm-edit.html | 2 +- deps/npm/html/doc/api/npm-explore.html | 2 +- deps/npm/html/doc/api/npm-help-search.html | 2 +- deps/npm/html/doc/api/npm-init.html | 2 +- deps/npm/html/doc/api/npm-install.html | 2 +- deps/npm/html/doc/api/npm-link.html | 2 +- deps/npm/html/doc/api/npm-load.html | 2 +- deps/npm/html/doc/api/npm-ls.html | 2 +- deps/npm/html/doc/api/npm-outdated.html | 2 +- deps/npm/html/doc/api/npm-owner.html | 2 +- deps/npm/html/doc/api/npm-pack.html | 2 +- deps/npm/html/doc/api/npm-ping.html | 2 +- deps/npm/html/doc/api/npm-prefix.html | 2 +- deps/npm/html/doc/api/npm-prune.html | 2 +- deps/npm/html/doc/api/npm-publish.html | 2 +- deps/npm/html/doc/api/npm-rebuild.html | 2 +- deps/npm/html/doc/api/npm-repo.html | 2 +- deps/npm/html/doc/api/npm-restart.html | 2 +- deps/npm/html/doc/api/npm-root.html | 2 +- deps/npm/html/doc/api/npm-run-script.html | 2 +- deps/npm/html/doc/api/npm-search.html | 2 +- deps/npm/html/doc/api/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/api/npm-start.html | 2 +- deps/npm/html/doc/api/npm-stop.html | 2 +- deps/npm/html/doc/api/npm-tag.html | 2 +- deps/npm/html/doc/api/npm-test.html | 2 +- deps/npm/html/doc/api/npm-uninstall.html | 2 +- deps/npm/html/doc/api/npm-unpublish.html | 2 +- deps/npm/html/doc/api/npm-update.html | 2 +- deps/npm/html/doc/api/npm-version.html | 2 +- deps/npm/html/doc/api/npm-view.html | 2 +- deps/npm/html/doc/api/npm-whoami.html | 2 +- deps/npm/html/doc/api/npm.html | 4 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- 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-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 | 23 ++- deps/npm/html/doc/cli/npm-docs.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-init.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 6 +- 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-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-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 13 +- 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-rm.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-tag.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-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 4 +- 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 | 10 +- deps/npm/html/doc/files/npm-folders.html | 11 +- deps/npm/html/doc/files/npm-global.html | 11 +- deps/npm/html/doc/files/npm-json.html | 6 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 6 +- 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 | 4 +- deps/npm/html/doc/misc/npm-developers.html | 2 +- deps/npm/html/doc/misc/npm-disputes.html | 8 +- 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 | 6 +- deps/npm/lib/cache.js | 3 +- deps/npm/lib/cache/add-local-tarball.js | 4 +- deps/npm/lib/cache/add-remote-tarball.js | 18 +- deps/npm/lib/pack.js | 4 +- deps/npm/lib/utils/correct-mkdir.js | 7 + deps/npm/lib/utils/error-handler.js | 10 +- deps/npm/man/man1/npm-README.1 | 47 ----- deps/npm/man/man1/npm-dist-tag.1 | 25 ++- deps/npm/man/man1/npm-install.1 | 4 +- deps/npm/man/man1/npm-ls.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 11 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- deps/npm/man/man5/npm-folders.5 | 10 +- deps/npm/man/man5/npm-global.5 | 10 +- deps/npm/man/man5/npm-json.5 | 4 +- deps/npm/man/man5/package.json.5 | 4 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/package.json | 7 +- deps/npm/test/common-tap.js | 2 - .../test/tap/404-private-registry-scoped.js | 50 +++-- deps/npm/test/tap/404-private-registry.js | 48 +++-- .../tap/add-named-update-protocol-port.js | 100 ++++++---- .../test/tap/add-remote-git-fake-windows.js | 5 +- .../npm/test/tap/add-remote-git-shrinkwrap.js | 9 +- deps/npm/test/tap/add-remote-git.js | 1 + deps/npm/test/tap/adduser-always-auth.js | 184 +++++++++++++++--- deps/npm/test/tap/adduser-legacy-auth.js | 17 +- deps/npm/test/tap/correct-mkdir.js | 58 ++++++ .../test/tap/git-dependency-install-link.js | 1 + deps/npm/test/tap/install-link-scripts.js | 3 +- .../test/tap/noargs-install-config-save.js | 72 ++++--- deps/npm/test/tap/publish-access-scoped.js | 101 +++++----- deps/npm/test/tap/publish-access-unscoped.js | 101 +++++----- deps/npm/test/tap/publish-scoped.js | 126 ++++++------ deps/npm/test/tap/registry.js | 49 +++-- deps/npm/test/tap/sorted-package-json.js | 5 +- 160 files changed, 996 insertions(+), 705 deletions(-) create mode 100644 deps/npm/test/tap/correct-mkdir.js diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 59fddd7f2968a2..eff4750f3efb95 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,4 +1,5 @@ language: node_js +sudo: false node_js: - "5" - "4" @@ -11,7 +12,7 @@ env: before_install: - "npm config set spin false" - "npm install -g npm/npm#2.x" - - "sudo mkdir -p /var/run/couchdb" + - "mkdir -p /var/run/couchdb" script: "npm run-script test-all" notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index e1a88d3a9914b8..2952381a70d270 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -329,3 +329,12 @@ ekmartin Rafał Pocztarski Ashley Williams Mark Reeder +Tiago Rodrigues +Chris Rebert +Jeff McMahan +Scott Addie +Julian Simioni +Jimb Esser +Hal Henke +Alexis Campailla +Beau Gunderson diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index f5680c3d6f0686..9361445adcc8a2 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,124 @@ +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + ### v2.14.15 (2015-12-10): Did you know that Bob Ross reached the rank of master sergeant in the US Air diff --git a/deps/npm/README.md b/deps/npm/README.md index 43b9da4e694ca9..5e907a6b4b7658 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -138,52 +138,6 @@ must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen. -## Using npm Programmatically - -Although npm can be used programmatically, its API is meant for use by the CLI -*only*, and no guarantees are made regarding its fitness for any other purpose. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired `npm` command with appropriate arguments. - -The semantic version of npm refers to the CLI itself, rather than the -underlying API. _The internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver._ - -If you _still_ would like to use npm programmatically, it's _possible_. The API -isn't very well documented, but it _is_ rather simple. - -Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself. - -```javascript -var npm = require("npm") -npm.load(myConfigObject, function (er) { - if (er) return handlError(er) - npm.commands.install(["some", "args"], function (er, data) { - if (er) return commandFailed(er) - // command succeeded, and data might have some info - }) - npm.registry.log.on("log", function (message) { .... }) -}) -``` - -The `load` function takes an object hash of the command-line configs. -The various `npm.commands.` functions take an **array** of -positional argument **strings**. The last argument to any -`npm.commands.` function is a callback. Some commands take other -optional arguments. Read the source. - -You cannot set configs individually for any single npm function at this -time. Since `npm` is a singleton, any call to `npm.config.set` will -change the value for *all* npm commands in that process. - -See `./bin/npm-cli.js` for an example of pulling config values off of the -command line arguments using nopt. You may also want to check out `npm -help config` to learn about all the options you can set there. - ## More Docs Check out the [docs](https://docs.npmjs.com/), diff --git a/deps/npm/bin/node-gyp-bin/node-gyp.cmd b/deps/npm/bin/node-gyp-bin/node-gyp.cmd index 83ea8f59247858..083c9c58a502a1 100755 --- a/deps/npm/bin/node-gyp-bin/node-gyp.cmd +++ b/deps/npm/bin/node-gyp-bin/node-gyp.cmd @@ -1,5 +1,5 @@ -if not defined npm_config_node_gyp ( - node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* -) else ( - node %npm_config_node_gyp% %* -) +if not defined npm_config_node_gyp ( + node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* +) else ( + node "%npm_config_node_gyp%" %* +) diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md index 9213816514a483..06721bbae6ab3b 100644 --- a/deps/npm/doc/cli/npm-dist-tag.md +++ b/deps/npm/doc/cli/npm-dist-tag.md @@ -33,17 +33,30 @@ When installing dependencies, a preferred tagged version may be specified: This also applies to `npm dedupe`. -Publishing a package sets the "latest" tag to the published version unless the +Publishing a package sets the `latest` tag to the published version unless the `--tag` option is used. For example, `npm publish --tag=beta`. +By default, `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. + ## PURPOSE -Tags can be used to provide an alias instead of version numbers. For -example, `npm` currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version. +Tags can be used to provide an alias instead of version numbers. + +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., `stable`, `beta`, `dev`, `canary`. + +By default, the `latest` tag is used by npm to identify the current version of +a package, and `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. Typically, projects only use the `latest` +tag for stable release versions, and use other tags for unstable versions such +as prereleases. + +The `next` tag is used by some projects to identify the upcoming version. -A project might choose to have multiple streams of development, e.g., -"stable", "canary". +By default, other than `latest`, no tag has any special significance to npm +itself. ## CAVEATS diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index 16b31fa0dac719..3ae1f0aae381ed 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -25,7 +25,7 @@ A `package` is: * b) a gzipped tarball containing (a) * c) a url that resolves to (b) * d) a `@` that is published on the registry (see `npm-registry(7)`) with (c) -* e) a `@` that points to (d) +* e) a `@` (see `npm-dist-tag(1)`) that points to (d) * f) a `` that has a "latest" tag satisfying (e) * g) a `` that resolves to (b) @@ -76,7 +76,7 @@ after packing it up into a tarball (b). * `npm install [@/] [--save|--save-dev|--save-optional]`: Do a `@` install, where `` is the "tag" config. (See - `npm-config(7)`.) + `npm-config(7)`. The config's default value is `latest`.) In most cases, this will install the latest version of the module published on npm. diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md index 8c447d0df9c4d5..cf2f4feb5370f5 100644 --- a/deps/npm/doc/cli/npm-publish.md +++ b/deps/npm/doc/cli/npm-publish.md @@ -9,9 +9,11 @@ npm-publish(1) -- Publish a package ## DESCRIPTION -Publishes a package to the registry so that it can be installed by name. See -`npm-developers(7)` for details on what's included in the published package, as -well as details on how the package is built. +Publishes a package to the registry so that it can be installed by name. All +files in the package directory are included if no local `.gitignore` or +`.npmignore` file is present. See `npm-developers(7)` for full details on +what's included in the published package, as well as details on how the package +is built. By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a `npm-scope(7)` in the name @@ -27,7 +29,8 @@ specifying a different default registry or using a `npm-scope(7)` in the name * `[--tag ]` Registers the published package with the given tag, such that `npm install @` will install this version. By default, `npm publish` updates - and `npm install` installs the `latest` tag. + and `npm install` installs the `latest` tag. See `npm-dist-tag(1)` for + details about tags. * `[--access ]` Tells the registry whether this package should be published as public or diff --git a/deps/npm/doc/cli/npm-update.md b/deps/npm/doc/cli/npm-update.md index ce31c28910ff08..7285226d428547 100644 --- a/deps/npm/doc/cli/npm-update.md +++ b/deps/npm/doc/cli/npm-update.md @@ -22,7 +22,7 @@ or local) will be updated. As of `npm@2.6.1`, the `npm update` will only inspect top-level packages. Prior versions of `npm` would also recursively inspect all dependencies. -To get the old behavior, use `npm --depth 9999 update`, but be warned that +To get the old behavior, use `npm --depth Infinity update`, but be warned that simultaneous asynchronous update of all packages, including `npm` itself and packages that `npm` depends on, often causes problems up to and including the uninstallation of `npm` itself. diff --git a/deps/npm/doc/files/npm-folders.md b/deps/npm/doc/files/npm-folders.md index 18b7ea50dd2f9b..6846b1fce8f713 100644 --- a/deps/npm/doc/files/npm-folders.md +++ b/deps/npm/doc/files/npm-folders.md @@ -20,12 +20,10 @@ This document will tell you what it puts where. ### prefix Configuration The `prefix` config defaults to the location where node is installed. -On most systems, this is `/usr/local`, and most of the time is the same -as node's `process.installPrefix`. - -On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -`{prefix}/bin/node` rather than `{prefix}/node.exe`. +On most systems, this is `/usr/local`. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at `{prefix}/bin/node` rather than +`{prefix}/node.exe`. When the `global` flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index ff6686ba21a39d..841e7f45321687 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -21,7 +21,7 @@ The name is what your thing is called. Some rules: -* The name must be shorter than 214 characters. This includes the scope for +* The name must be less than or equal to 214 characters. This includes the scope for scoped packages. * The name can't start with a dot or an underscore. * New packages must not have uppercase letters in the name. @@ -410,7 +410,7 @@ See semver(7) for more details about specifying version ranges. * `git...` See 'Git URLs as Dependencies' below * `user/repo` See 'GitHub URLs' below * `tag` A specific version tagged and published as `tag` See `npm-tag(1)` -* `path/path/path` See Local Paths below +* `path/path/path` See [Local Paths](#local-paths) below For example, these are all valid: diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index 4b9d32ba3338cc..76471601c162d9 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -232,7 +232,7 @@ A client certificate to pass when accessing the registry. ### color -* Default: true on Posix, false on Windows +* Default: true * Type: Boolean or `"always"` If false, never shows colors. If `"always"` then always shows colors. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 952cd66ff991e4..3f9521992eedb1 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -92,42 +92,6 @@

      More Severe Uninstalling

      must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen.

      -

      Using npm Programmatically

      -

      Although npm can be used programmatically, its API is meant for use by the CLI -only, and no guarantees are made regarding its fitness for any other purpose. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired npm command with appropriate arguments.

      -

      The semantic version of npm refers to the CLI itself, rather than the -underlying API. The internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver.

      -

      If you still would like to use npm programmatically, it's possible. The API -isn't very well documented, but it is rather simple.

      -

      Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself.

      -
      var npm = require("npm")
      -npm.load(myConfigObject, function (er) {
      -  if (er) return handlError(er)
      -  npm.commands.install(["some", "args"], function (er, data) {
      -    if (er) return commandFailed(er)
      -    // command succeeded, and data might have some info
      -  })
      -  npm.registry.log.on("log", function (message) { .... })
      -})
      -
      -

      The load function takes an object hash of the command-line configs. -The various npm.commands.<cmd> functions take an array of -positional argument strings. The last argument to any -npm.commands.<cmd> function is a callback. Some commands take other -optional arguments. Read the source.

      -

      You cannot set configs individually for any single npm function at this -time. Since npm is a singleton, any call to npm.config.set will -change the value for all npm commands in that process.

      -

      See ./bin/npm-cli.js for an example of pulling config values off of the -command line arguments using nopt. You may also want to check out npm -help config to learn about all the options you can set there.

      More Docs

      Check out the docs, especially the faq.

      @@ -163,5 +127,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index c447623ac87ad0..3d9299365d21fa 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index 6fd7c5856d17e9..63271d8875ea87 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 0a37bb27f4e210..6cf00176750832 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index c672cb3a16f714..433d7da710349f 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index f8d8ae30c0d1a3..9b6e7874f4fa4f 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 4b1c74daae5155..92beadcd62f4f3 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 7d8e3ab7d9d020..b29244a76f9892 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 0931efe8b62556..a28d16fa9518d1 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index 9840342a0229c7..f2e43f9f4fafbc 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 49b22cdfaf60ca..d4c8c152acd7b9 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 3fd3a058eb01fa..38707e957bdb39 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 127f9b1521e63f..19c83deb241231 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 0cce1cbed847c5..2cf378d861416d 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 571a75850e7ba6..f1a9f5be4b5fdc 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 8e2854ea3540af..1a47dbcb3d64be 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

      global

             - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 40f8da3f8e4499..dc100aba627886 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 3297a9bf1e7116..ffcf76e4db9d7b 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 42da30ddc70d72..c28bd7032b43ca 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html index b91891ba278f27..c73766fbe2d2ec 100644 --- a/deps/npm/html/doc/api/npm-ping.html +++ b/deps/npm/html/doc/api/npm-ping.html @@ -29,4 +29,4 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 96b6f0e4637917..09abb2eeec1047 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 3584f02015489f..270157cb001e33 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index c9c20e7907fc88..fde56865e21114 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index d2c258f534c6f2..2120b230b1c78f 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

      CONFIGURATION

             - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 6523acc7469479..d9dd7e1e6a15d7 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 3d30112b71ca38..27eb9bd4676bb2 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 82ef516c3c74c4..011375f8e99a5b 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 7c4837904b1678..e592eb968d3a7b 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 1dbd50a8bb7b52..32b7fc9f1adc86 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 44bbe67b8eff54..b8891e749fd40e 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index c4f2b9e252c355..bcd448db2853b0 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index c1a49696521c6c..af310632bc09b2 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 74b9fdca62e026..49756460b40c10 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index a532ca8a025b7d..bdc9c481df10a8 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 926f9849459ad6..d5c225f9bb682d 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index b07dce819e78bf..264c005ba80a1a 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 44335e595b2038..68280b7c1bd01a 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -33,5 +33,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index b6090eca5c7415..00c68be8202574 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 82aa620c414cc0..2c8e33bdbb436d 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

      RETURN VALUE

             - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index bf6a49701fe9cd..151b9c090e6af9 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index e00ae9e9f4df9a..c075b2df28dbf7 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

      SYNOPSIS

      npm.commands.install(["package"], cb) })

      VERSION

      -

      2.14.15

      +

      2.14.16

      DESCRIPTION

      This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@

      ABBREVS

             - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 927ad46d9d9ea3..960f36e56e879e 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 8db22a998ef185..2f39869491d297 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 051a17dc4eddea..a88f31d379535e 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index e534ce8a70409b..42bdbf210ff672 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 d9d13e67ca5e34..b21c444163eac6 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

      DESCRIPTION

             - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 808ef0e57876e5..5d015febd27e5c 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 e7271f0dd8b01e..9b1da7a0e93bfe 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index b17b42d9c73b7d..c7e98ec93c4066 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 5dd370f6797642..5880af7c424a05 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 7708ab7f83416b..9602b2ae9d294b 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 1eb1e17bb855e1..c98a34e75c3860 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 7e6d02ee5db9bd..3b8a8a84906c0d 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -35,14 +35,23 @@

      SYNOPSIS

      When installing dependencies, a preferred tagged version may be specified:

      npm install --tag <tag>
       

      This also applies to npm dedupe.

      -

      Publishing a package sets the "latest" tag to the published version unless the +

      Publishing a package sets the latest tag to the published version unless the --tag option is used. For example, npm publish --tag=beta.

      +

      By default, npm install <pkg> (without any @<version> or @<tag> +specifier) installs the latest tag.

      PURPOSE

      -

      Tags can be used to provide an alias instead of version numbers. For -example, npm currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version.

      -

      A project might choose to have multiple streams of development, e.g., -"stable", "canary".

      +

      Tags can be used to provide an alias instead of version numbers.

      +

      For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., stable, beta, dev, canary.

      +

      By default, the latest tag is used by npm to identify the current version of +a package, and npm install <pkg> (without any @<version> or @<tag> +specifier) installs the latest tag. Typically, projects only use the latest +tag for stable release versions, and use other tags for unstable versions such +as prereleases.

      +

      The next tag is used by some projects to identify the upcoming version.

      +

      By default, other than latest, no tag has any special significance to npm +itself.

      CAVEATS

      This command used to be known as npm tag, which only created new tags, and so had a different syntax.

      @@ -76,5 +85,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index f85bf792c344b2..14b4760d3f1afb 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index feb7936a4255f2..a7549f551b4fda 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 24ab1f1564c46a..0708c2733fac83 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,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 9126696751765c..f7bd1b3adaa941 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index be9418fc14a56f..1d297b8a295a1a 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index b92411fe283210..8d2fe31bdee9f3 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 7281f125766c02..4edb8b1bbc5e13 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -30,7 +30,7 @@

      SYNOPSIS

    • b) a gzipped tarball containing (a)
    • c) a url that resolves to (b)
    • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
    • -
    • e) a <name>@<tag> that points to (d)
    • +
    • e) a <name>@<tag> (see npm-dist-tag(1)) that points to (d)
    • f) a <name> that has a "latest" tag satisfying (e)
    • g) a <git remote url> that resolves to (b)
    @@ -68,7 +68,7 @@

    SYNOPSIS

  • npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]:

    Do a <name>@<tag> install, where <tag> is the "tag" config. (See - npm-config(7).)

    + npm-config(7). The config's default value is latest.)

    In most cases, this will install the latest version of the module published on npm.

    Example:

    @@ -279,5 +279,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 89c8d82bc00198..7d9500725bb251 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -72,5 +72,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index b09df9cc7db309..577dc95459959c 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 74c7c4e6d705af..9b4ec16687514b 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,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@2.14.15 /path/to/npm
    +
    npm@2.14.16 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

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

    @@ -97,5 +97,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 76687c3384cbba..a4e1f6f12cd71b 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -115,5 +115,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 73a457835f4377..cbd00b28c4515c 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index b68e2f695ce3b1..a0214d27a2d2df 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 0b8ffbf96f0a9c..5283e84e2be750 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 40f4bde492c25e..9c6eb2fb528bb0 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-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 2415adf636a58b..cbbf757890bc39 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index fc7d1f6c2df8a8..1b913f936b1849 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -14,9 +14,11 @@

    SYNOPSIS

    npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
     npm publish <folder> [--tag <tag>] [--access <public|restricted>]
     

    DESCRIPTION

    -

    Publishes a package to the registry so that it can be installed by name. See -npm-developers(7) for details on what's included in the published package, as -well as details on how the package is built.

    +

    Publishes a package to the registry so that it can be installed by name. All +files in the package directory are included if no local .gitignore or +.npmignore file is present. See npm-developers(7) for full details on +what's included in the published package, as well as details on how the package +is built.

    By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a npm-scope(7) in the name (see package.json(5)).

    @@ -31,7 +33,8 @@

    SYNOPSIS

  • [--tag <tag>] Registers the published package with the given tag, such that npm install <name>@<tag> will install this version. By default, npm publish updates -and npm install installs the latest tag.

    +and npm install installs the latest tag. See npm-dist-tag(1) for +details about tags.

  • [--access <public|restricted>] Tells the registry whether this package should be published as public or @@ -66,5 +69,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 73066ffa224dd6..e59fa0b5c821ed 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 3b997168ccc3bf..f5a16a71c10e40 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 35c9e2aadf5663..d854a290bb7378 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 689dceaa1018d7..fc08c1771bdc9f 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 1352a2c30d9793..aef668a7f82a70 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,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 acbddd79e22f71..f272d18c116de1 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index f00ebb1f9659f1..02d8bf993d0661 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index d5b938ea789650..22783a1a3a3081 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 6482e7f5202a8c..6117bb5ce96ebf 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 70acbfb5dd39f6..e3c7fb453d5b67 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index f3c3bc523d19f8..0abf6026f0a99b 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 04cddba97bb07e..c548457826cfdc 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 48b7051ef4c93f..79f75851dc9c3f 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index e9c4342f8ae670..cde3b3beef7e26 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index d732d76908f254..19803e99079720 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 22a78bcb8d6856..dea1476ec915a8 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 4152dfbeb867d0..038ef313e42f7d 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 8182d4962004b1..16f572e6f7b7eb 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -24,7 +24,7 @@

    SYNOPSIS

    or local) will be updated.

    As of npm@2.6.1, the npm update will only inspect top-level packages. Prior versions of npm would also recursively inspect all dependencies. -To get the old behavior, use npm --depth 9999 update, but be warned that +To get the old behavior, use npm --depth Infinity update, but be warned that simultaneous asynchronous update of all packages, including npm itself and packages that npm depends on, often causes problems up to and including the uninstallation of npm itself.

    @@ -119,5 +119,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 1f1fcfcb9c6b5d..5e314e7e3dee13 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -95,5 +95,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 6298ee702c23eb..6111cdb861a1c7 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 9eb94323d838e3..f0d59db71a0342 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index bdff00e3b84d21..9fcca1222fa42e 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.14.15

    +

    2.14.16

    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 @@ -110,7 +110,7 @@

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@

    BUGS

  • web: https://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com
  • Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,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 2133bfc17affa5..9319a3f77bcb8a 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -25,11 +25,10 @@

      tl;dr

    prefix Configuration

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    +On most systems, this is /usr/local. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at {prefix}/bin/node rather than +{prefix}/node.exe.

    When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

    @@ -184,5 +183,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 2133bfc17affa5..9319a3f77bcb8a 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -25,11 +25,10 @@

    tl;dr

    prefix Configuration

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    +On most systems, this is /usr/local. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at {prefix}/bin/node rather than +{prefix}/node.exe.

    When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

    @@ -184,5 +183,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 83c4be717301ff..d6987af5bcbd48 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -24,7 +24,7 @@

    name

    The name is what your thing is called.

    Some rules:

      -
    • The name must be shorter than 214 characters. This includes the scope for +
    • The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
    • The name can't start with a dot or an underscore.
    • New packages must not have uppercase letters in the name.
    • @@ -309,7 +309,7 @@

      dependencies

    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • tag A specific version tagged and published as tag See npm-tag(1)
    • -
    • path/path/path See Local Paths below
    • +
    • path/path/path See Local Paths below

    For example, these are all valid:

    { "dependencies" :
    @@ -565,5 +565,5 @@ 

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index b400267be45aff..2bfc4db1aa78fb 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 83c4be717301ff..d6987af5bcbd48 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -24,7 +24,7 @@

    name

    The name is what your thing is called.

    Some rules:

      -
    • The name must be shorter than 214 characters. This includes the scope for +
    • The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
    • The name can't start with a dot or an underscore.
    • New packages must not have uppercase letters in the name.
    • @@ -309,7 +309,7 @@

      dependencies

    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • tag A specific version tagged and published as tag See npm-tag(1)
    • -
    • path/path/path See Local Paths below
    • +
    • path/path/path See Local Paths below

    For example, these are all valid:

    { "dependencies" :
    @@ -565,5 +565,5 @@ 

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 84b38628d4de0a..3b9f85fed9baed 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -242,5 +242,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 7fd8a50eb9b166..7c830fb39cb901 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -147,5 +147,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index bb6d06fd0d55ca..f164cd5e7936a0 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -196,7 +196,7 @@

    cert

    A client certificate to pass when accessing the registry.

    color

      -
    • Default: true on Posix, false on Windows
    • +
    • Default: true
    • Type: Boolean or "always"

    If false, never shows colors. If "always" then always shows colors. @@ -799,5 +799,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 1d939787d842ba..05897b052ad918 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 97b0e475b268d2..9c7fc3df0eee41 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

    npm-disputes

    Handling Module

    SYNOPSIS

    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.

    @@ -51,12 +51,12 @@

    DESCRIPTION

    owner (Bob).
  • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
  • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
  • @@ -112,5 +112,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 1ca8232c06ea42..e9c9b6316dbb6a 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -242,5 +242,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index d5417ce6295c26..8089d1aae341c3 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

    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 79d1aeaf069a5b..405abe5a59fcfb 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 2394c0035f675b..082079e0ac6560 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 2bac128e2856d0..c8d13a4a18f194 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -207,5 +207,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index e6c4ced30b0fef..61469f102cfcdf 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 9fc9ae1fd3af3a..782b6cbbdcfd3d 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@

    Ranges

           - + diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index 367f3ba0d92754..42c029efb1b84b 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -169,7 +169,9 @@ function save (c, u, cb) { }) } - log.info("adduser", "Authorized user %s", u.u) - npm.config.save("user", cb) + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) }) } diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 2e11be32f862fa..851636c3c17ae9 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -337,6 +337,7 @@ function afterAdd (cb) { return function (er, data) { // Save the resolved, shasum, etc. into the data so that the next // time we load from this cached data, we have all the same info. + // Ignore if it fails. var pj = path.join(cachedPackageRoot(data), "package", "package.json") var done = inflight(pj, cb) @@ -347,7 +348,7 @@ function afterAdd (cb) { return function (er, data) { if (er) return done(er) writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { if (!er) log.verbose("afterAdd", pj, "written") - return done(er, data) + return done(null, data) }) }) }} diff --git a/deps/npm/lib/cache/add-local-tarball.js b/deps/npm/lib/cache/add-local-tarball.js index e84b66dd8dd51f..f078039e357867 100644 --- a/deps/npm/lib/cache/add-local-tarball.js +++ b/deps/npm/lib/cache/add-local-tarball.js @@ -13,7 +13,7 @@ var mkdir = require("mkdirp") , chownr = require("chownr") , inflight = require("inflight") , once = require("once") - , writeStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness module.exports = addLocalTarball @@ -166,7 +166,7 @@ function addTmpTarball_ (tgz, data, shasum, cb) { if (er) return cb(er) var read = fs.createReadStream(tgz) - var write = writeStream(target, { mode: npm.modes.file }) + var write = writeStreamAtomic(target, { mode: npm.modes.file }) var fin = cs.uid && cs.gid ? chown : done read.on("error", cb).pipe(write).on("error", cb).on("close", fin) }) diff --git a/deps/npm/lib/cache/add-remote-tarball.js b/deps/npm/lib/cache/add-remote-tarball.js index 66d22009663307..d04e9da5090dd9 100644 --- a/deps/npm/lib/cache/add-remote-tarball.js +++ b/deps/npm/lib/cache/add-remote-tarball.js @@ -4,7 +4,8 @@ var mkdir = require("mkdirp") , path = require("path") , sha = require("sha") , retry = require("retry") - , createWriteStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") + , PassThrough = require('readable-stream').PassThrough , npm = require("../npm.js") , inflight = require("inflight") , addLocalTarball = require("./add-local-tarball.js") @@ -78,8 +79,8 @@ function fetchAndShaCheck (u, tmp, shasum, auth, cb) { return cb(er, response) } - var tarball = createWriteStream(tmp, { mode : npm.modes.file }) - tarball.on("error", function (er) { + var tarball = writeStreamAtomic(tmp, { mode: npm.modes.file }) + tarball.on('error', function (er) { cb(er) tarball.destroy() }) @@ -105,6 +106,15 @@ function fetchAndShaCheck (u, tmp, shasum, auth, cb) { }) }) - response.pipe(tarball) + // 0.8 http streams have a bug, where if they're paused with data in + // their buffers when the socket closes, they call `end` before emptying + // those buffers, which results in the entire pipeline ending and thus + // the point that applied backpressure never being able to trigger a + // `resume`. + // We work around this by piping into a pass through stream that has + // unlimited buffering. The pass through stream is from readable-stream + // and is thus a current streams3 implementation that is free of these + // bugs even on 0.8. + response.pipe(PassThrough({highWaterMark: Infinity})).pipe(tarball) }) } diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index a5ce90094f6a3a..ab81cc20f61c72 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -11,7 +11,7 @@ var npm = require("./npm.js") , chain = require("slide").chain , path = require("path") , cwd = process.cwd() - , writeStream = require('fs-write-stream-atomic') + , writeStreamAtomic = require('fs-write-stream-atomic') , cachedPackageRoot = require("./cache/cached-package-root.js") pack.usage = "npm pack " @@ -52,7 +52,7 @@ function pack_ (pkg, cb) { var cached = path.join(cachedPackageRoot(data), "package.tgz") , from = fs.createReadStream(cached) - , to = writeStream(fname) + , to = writeStreamAtomic(fname) , errState = null from.on("error", cb_) diff --git a/deps/npm/lib/utils/correct-mkdir.js b/deps/npm/lib/utils/correct-mkdir.js index 650c56fb17deb7..c0a31bdc58a10a 100644 --- a/deps/npm/lib/utils/correct-mkdir.js +++ b/deps/npm/lib/utils/correct-mkdir.js @@ -10,6 +10,13 @@ var stats = {} var effectiveOwner module.exports = function correctMkdir (path, cb) { cb = dezalgo(cb) + cb = inflight('correctMkdir:' + path, cb) + if (!cb) { + return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting') + } else { + log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing') + } + if (stats[path]) return cb(null, stats[path]) fs.stat(path, function (er, st) { diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index dac6a17f251c90..e5daf2066ee9c7 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -11,7 +11,7 @@ var cbCalled = false , exitCode = 0 , rollbacks = npm.rollbacks , chain = require("slide").chain - , writeStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") , nameValidator = require("validate-npm-package-name") @@ -187,8 +187,10 @@ function errorHandler (er) { ,"not with npm itself." ,"Tell the author that this fails on your system:" ," "+er.script - ,"You can get their info via:" - ," npm owner ls "+er.pkgname + ,'You can get information on how to open an issue for this project with:' + ,' npm bugs ' + er.pkgname + ,'Or if that isn\'t available, you can get their info via:', + ,' npm owner ls ' + er.pkgname ,"There is likely additional logging output above." ].join("\n")) break @@ -391,7 +393,7 @@ function writeLogFile (cb) { writingLogFile = true wroteLogFile = true - var fstr = writeStream("npm-debug.log") + var fstr = writeStreamAtomic("npm-debug.log") , os = require("os") , out = "" diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index dae1e044a77b74..7cf7be7dd7bd53 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -142,53 +142,6 @@ Uninstalling npm does not remove configuration files by default\. You must remove them yourself manually if you want them gone\. Note that this means that future npm installs will not remember the settings that you have chosen\. -.SH Using npm Programmatically -.P -Although npm can be used programmatically, its API is meant for use by the CLI -\fIonly\fR, and no guarantees are made regarding its fitness for any other purpose\. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired \fBnpm\fP command with appropriate arguments\. -.P -The semantic version of npm refers to the CLI itself, rather than the -underlying API\. \fIThe internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver\.\fR -.P -If you \fIstill\fR would like to use npm programmatically, it's \fIpossible\fR\|\. The API -isn't very well documented, but it \fIis\fR rather simple\. -.P -Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do\. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself\. -.P -.RS 2 -.nf -var npm = require("npm") -npm\.load(myConfigObject, function (er) { - if (er) return handlError(er) - npm\.commands\.install(["some", "args"], function (er, data) { - if (er) return commandFailed(er) - // command succeeded, and data might have some info - }) - npm\.registry\.log\.on("log", function (message) { \.\.\.\. }) -}) -.fi -.RE -.P -The \fBload\fP function takes an object hash of the command\-line configs\. -The various \fBnpm\.commands\.\fP functions take an \fBarray\fR of -positional argument \fBstrings\fR\|\. The last argument to any -\fBnpm\.commands\.\fP function is a callback\. Some commands take other -optional arguments\. Read the source\. -.P -You cannot set configs individually for any single npm function at this -time\. Since \fBnpm\fP is a singleton, any call to \fBnpm\.config\.set\fP will -change the value for \fIall\fR npm commands in that process\. -.P -See \fB\|\./bin/npm\-cli\.js\fP for an example of pulling config values off of the -command line arguments using nopt\. You may also want to check out \fBnpm -help config\fP to learn about all the options you can set there\. .SH More Docs .P Check out the docs \fIhttps://docs\.npmjs\.com/\fR, diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index a9c7786bc8b511..3c17975c4ea4e3 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -47,16 +47,29 @@ npm install \-\-tag .P This also applies to \fBnpm dedupe\fP\|\. .P -Publishing a package sets the "latest" tag to the published version unless the +Publishing a package sets the \fBlatest\fP tag to the published version unless the \fB\-\-tag\fP option is used\. For example, \fBnpm publish \-\-tag=beta\fP\|\. +.P +By default, \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. .SH PURPOSE .P -Tags can be used to provide an alias instead of version numbers\. For -example, \fBnpm\fP currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version\. +Tags can be used to provide an alias instead of version numbers\. +.P +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e\.g\., \fBstable\fP, \fBbeta\fP, \fBdev\fP, \fBcanary\fP\|\. +.P +By default, the \fBlatest\fP tag is used by npm to identify the current version of +a package, and \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. Typically, projects only use the \fBlatest\fP +tag for stable release versions, and use other tags for unstable versions such +as prereleases\. +.P +The \fBnext\fP tag is used by some projects to identify the upcoming version\. .P -A project might choose to have multiple streams of development, e\.g\., -"stable", "canary"\. +By default, other than \fBlatest\fP, no tag has any special significance to npm +itself\. .SH CAVEATS .P This command used to be known as \fBnpm tag\fP, which only created new tags, and so diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index b93805f9ef378a..ff754dc2d27fa9 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -33,7 +33,7 @@ c) a url that resolves to (b) .IP \(bu 2 d) a \fB@\fP that is published on the registry (see npm help 7 \fBnpm\-registry\fP) with (c) .IP \(bu 2 -e) a \fB@\fP that points to (d) +e) a \fB@\fP (see npm help \fBnpm\-dist\-tag\fP) that points to (d) .IP \(bu 2 f) a \fB\fP that has a "latest" tag satisfying (e) .IP \(bu 2 @@ -86,7 +86,7 @@ after packing it up into a tarball (b)\. .IP \(bu 2 \fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: Do a \fB@\fP install, where \fB\fP is the "tag" config\. (See - npm help 7 \fBnpm\-config\fP\|\.) + npm help 7 \fBnpm\-config\fP\|\. The config's default value is \fBlatest\fP\|\.) In most cases, this will install the latest version of the module published on npm\. Example: diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index d865fee89203ee..9d539a0eaacc3d 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@2.14.15 /path/to/npm +npm@2.14.16 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index a41165a809aba5..9da086a4a49c0a 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -11,9 +11,11 @@ npm publish [\-\-tag ] [\-\-access ] .RE .SH DESCRIPTION .P -Publishes a package to the registry so that it can be installed by name\. See -npm help 7 \fBnpm\-developers\fP for details on what's included in the published package, as -well as details on how the package is built\. +Publishes a package to the registry so that it can be installed by name\. All +files in the package directory are included if no local \fB\|\.gitignore\fP or +\fB\|\.npmignore\fP file is present\. See npm help 7 \fBnpm\-developers\fP for full details on +what's included in the published package, as well as details on how the package +is built\. .P By default npm will publish to the public registry\. This can be overridden by specifying a different default registry or using a npm help 7 \fBnpm\-scope\fP in the name @@ -30,7 +32,8 @@ with a package\.json file inside\. \fB[\-\-tag ]\fP Registers the published package with the given tag, such that \fBnpm install @\fP will install this version\. By default, \fBnpm publish\fP updates -and \fBnpm install\fP installs the \fBlatest\fP tag\. +and \fBnpm install\fP installs the \fBlatest\fP tag\. See npm help \fBnpm\-dist\-tag\fP for +details about tags\. .IP \(bu 2 \fB[\-\-access ]\fP Tells the registry whether this package should be published as public or diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 84681d6d1ce2e1..e503368bc6a62e 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -25,7 +25,7 @@ or local) will be updated\. .P As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\. Prior versions of \fBnpm\fP would also recursively inspect all dependencies\. -To get the old behavior, use \fBnpm \-\-depth 9999 update\fP, but be warned that +To get the old behavior, use \fBnpm \-\-depth Infinity update\fP, but be warned that simultaneous asynchronous update of all packages, including \fBnpm\fP itself and packages that \fBnpm\fP depends on, often causes problems up to and including the uninstallation of \fBnpm\fP itself\. diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 994fedd2fbf6a7..69c3fc4f3452db 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.14.15 +2.14.16 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index bfa750d91ce018..af3395c39f370b 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.14.15 +2.14.16 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index f337b9b6d3ff7d..a95cd885ff2403 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -25,12 +25,10 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP, and most of the time is the same -as node's \fBprocess\.installPrefix\fP\|\. -.P -On windows, this is the exact location of the node\.exe binary\. On Unix -systems, it's one level up, since node is typically installed at -\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index f337b9b6d3ff7d..a95cd885ff2403 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -25,12 +25,10 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP, and most of the time is the same -as node's \fBprocess\.installPrefix\fP\|\. -.P -On windows, this is the exact location of the node\.exe binary\. On Unix -systems, it's one level up, since node is typically installed at -\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index a08ee531bcc3ba..ba383dd95a8e78 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -21,7 +21,7 @@ The name is what your thing is called\. Some rules: .RS 0 .IP \(bu 2 -The name must be shorter than 214 characters\. This includes the scope for +The name must be less than or equal to 214 characters\. This includes the scope for scoped packages\. .IP \(bu 2 The name can't start with a dot or an underscore\. @@ -506,7 +506,7 @@ See npm help 7 semver for more details about specifying version ranges\. .IP \(bu 2 \fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP .IP \(bu 2 -\fBpath/path/path\fP See Local Paths below +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below .RE .P diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index a08ee531bcc3ba..ba383dd95a8e78 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -21,7 +21,7 @@ The name is what your thing is called\. Some rules: .RS 0 .IP \(bu 2 -The name must be shorter than 214 characters\. This includes the scope for +The name must be less than or equal to 214 characters\. This includes the scope for scoped packages\. .IP \(bu 2 The name can't start with a dot or an underscore\. @@ -506,7 +506,7 @@ See npm help 7 semver for more details about specifying version ranges\. .IP \(bu 2 \fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP .IP \(bu 2 -\fBpath/path/path\fP See Local Paths below +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below .RE .P diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index fb33aeb69b2afb..b932989969ca3f 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -323,7 +323,7 @@ A client certificate to pass when accessing the registry\. .SS color .RS 0 .IP \(bu 2 -Default: true on Posix, false on Windows +Default: true .IP \(bu 2 Type: Boolean or \fB"always"\fP diff --git a/deps/npm/package.json b/deps/npm/package.json index d6831c8490de2f..23bb9f2589d394 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.14.15", + "version": "2.14.16", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -173,10 +173,9 @@ ], "devDependencies": { "deep-equal": "~1.0.1", - "marked": "~0.3.3", + "marked": "~0.3.5", "marked-man": "~0.1.5", - "nock": "~1.9.0", - "npm-registry-couchapp": "~2.6.7", + "npm-registry-couchapp": "~2.6.12", "npm-registry-mock": "~1.0.0", "require-inject": "~1.3.0", "sprintf-js": "~1.0.2", diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index de0a9f416d79d8..3537df68761aa6 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -18,8 +18,6 @@ process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') process.env.random_env_var = 'foo' -// suppress warnings about using a prerelease version of node -process.env.npm_config_node_version = process.version.replace(/-.*$/, '') var bin = exports.bin = require.resolve('../bin/npm-cli.js') var chain = require('slide').chain diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js index 681fff05e8ec5f..84251b113c2a9c 100644 --- a/deps/npm/test/tap/404-private-registry-scoped.js +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -1,22 +1,38 @@ -var nock = require('nock') var test = require('tap').test -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server -test('scoped package names not mangled on error with non-root registry', function test404 (t) { - nock('http://localhost:1337') - .get('/registry/@scope%2ffoo') - .reply(404, { - error: 'not_found', - reason: 'document not found' - }) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed('@scope/foo', '*', null, function checkError (err) { - t.ok(err, 'should error') - t.equal(err.message, '404 Not Found: @scope/foo', 'should have package name in error') - t.equal(err.pkgid, '@scope/foo', 'err.pkgid should match package name') +test('scoped package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + '@scope/foo@*', + '--force' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, /404 Not found/, 'should notify the sort of error as a 404') + t.match(stderr, /@scope\/foo/, 'should have package name in error') t.end() - }) - }) + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() }) diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js index 698f5b86133d35..bc716b1702c371 100644 --- a/deps/npm/test/tap/404-private-registry.js +++ b/deps/npm/test/tap/404-private-registry.js @@ -1,25 +1,39 @@ -var nock = require('nock') var test = require('tap').test var path = require('path') -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server var packageName = path.basename(__filename,'.js') -test('package names not mangled on error with non-root registry', function test404 (t) { - nock('http://localhost:1337') - .get('/registry/' + packageName) - .reply(404, { - error: 'not_found', - reason: 'document not found' - }) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(packageName, '*', null, function checkError (err) { - t.ok(err, 'should error') - t.equal(err.message, '404 Not Found: ' + packageName, 'should have package name in error') - t.equal(err.pkgid, packageName, 'err.pkgid should match package name') +test('package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + packageName + '@*' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, packageName, 'should have package name in error') t.end() - }) - }) + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() }) 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 52832db0c257a1..38b500d0c0ad52 100644 --- a/deps/npm/test/tap/add-named-update-protocol-port.js +++ b/deps/npm/test/tap/add-named-update-protocol-port.js @@ -1,9 +1,10 @@ 'use strict' var path = require('path') -var nock = require('nock') var test = require('tap').test -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap') +var mr = require('npm-registry-mock') +var server1 +var server2 var packageName = path.basename(__filename, '.js') @@ -36,46 +37,77 @@ var fooiPkg = { } } -test('tarball paths should update port if updating protocol', function (t) { - nock('http://localhost:1337/registry') - .get('/' + packageName) - .reply(200, fooPkg) - - nock('http://localhost:1337/registry') - .get('/' + packageName + '/-/' + packageName + '-0.0.0.tgz') - .reply(200, '1') - - nock('http://localhost:1338/registry') - .get('/' + packageName + '/-/' + packageName + '-0.0.0.tgz') - .reply(404) - - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(packageName, '0.0.0', null, function checkPath (err, pkg) { - t.ifError(err, 'addNamed worked') +test('setup', function (t) { + mr({ + port: 1337, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server1 = s + mr({ + port: 1338, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server2 = s t.end() }) }) }) -test('tarball paths should NOT update if different hostname', function (t) { - nock('http://localhost:1337/registry') - .get('/' + iPackageName) - .reply(200, fooiPkg) +test('tarball paths should update port if updating protocol', function (t) { + server1.get('/registry/' + packageName).reply(200, fooPkg) + server1.get( + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz' + ).reply(200, '1') - nock('http://127.0.0.1:1338/registry') - .get('/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz') - .reply(200, '1') + common.npm( + [ + 'cache', + 'add', + packageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + t.end() + } + ) +}) - nock('http://127.0.0.1:1337/registry') - .get('/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz') - .reply(404) +test('tarball paths should NOT update if different hostname', function (t) { + server1.get('/registry/' + iPackageName).reply(200, fooiPkg) + server2.get( + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz' + ).reply(200, '1') - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(iPackageName, '0.0.0', null, function checkPath (err, pkg) { - t.ifError(err, 'addNamed worked') + common.npm( + [ + 'cache', + 'add', + iPackageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + server2.done() t.end() - }) - }) + } + ) +}) +test('cleanup', function (t) { + t.pass('cleaned up') + server1.close() + server2.close() + t.end() }) diff --git a/deps/npm/test/tap/add-remote-git-fake-windows.js b/deps/npm/test/tap/add-remote-git-fake-windows.js index c9c9dd446b9e1a..66d70800f54d54 100644 --- a/deps/npm/test/tap/add-remote-git-fake-windows.js +++ b/deps/npm/test/tap/add-remote-git-fake-windows.js @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1233/child.git' + child: 'git://localhost:1234/child.git' } }, null, 2) + '\n' @@ -93,7 +93,8 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', - '--port=1233' + '--reuseaddr', + '--port=1234' ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js index f2982355e14b12..e1882d8ee7d6a4 100644 --- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js +++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1235/child.git#master' + 'child': 'git://localhost:1234/child.git#master' } }, null, 2) + '\n' @@ -68,7 +68,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { var shrinkwrap = require(resolve(pkg, 'npm-shrinkwrap.json')) t.equal( shrinkwrap.dependencies.child.from, - 'git://localhost:1235/child.git#master', + 'git://localhost:1234/child.git#master', 'npm shrinkwrapped from correctly' ) @@ -82,7 +82,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.equal( shrinkwrap.dependencies.child.resolved, - 'git://localhost:1235/child.git#' + treeish, + 'git://localhost:1234/child.git#' + treeish, 'npm shrinkwrapped resolved correctly' ) @@ -121,7 +121,8 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', - '--port=1235' + '--reuseaddr', + '--port=1234' ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index e33d09c1a13473..24abf33a773fd2 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -80,6 +80,7 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', + '--reuseaddr', '--port=1234' ], { diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js index 6a451b451c3c62..db0e8b47617835 100644 --- a/deps/npm/test/tap/adduser-always-auth.js +++ b/deps/npm/test/tap/adduser-always-auth.js @@ -14,7 +14,24 @@ var responses = { "Email" : "u@p.me\n" } -function mocks(server) { +function verifyStdout (runner, successMessage, t) { + var remaining = Object.keys(responses).length + return function (chunk) { + if (remaining > 0) { + remaining-- + + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) + + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, successMessage) + } + } +} + +function mocks (server) { server.filteringRequestBody(function (r) { if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) { return "auth" @@ -46,17 +63,140 @@ test("npm login", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) +}) - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) +test('npm login --scope uses :registry as its URI', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = '@myco' + common.npm( + [ + 'config', + '--userconfig', outfile, + 'set', + scope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') - if (remaining === 0) runner.stdin.end() + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, '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') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope makes sure is prefixed by an @', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = 'myco' + var prefixedScope = '@' + scope + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + prefixedScope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(prefixedScope + ':registry=' + uri), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + prefixedScope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope --registry uses as its URI', function (t) { + var scope = '@myco' + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + scope + ':registry', + 'invalidurl' + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: common.port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--registry', common.registry, + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(scope + ':registry=' + common.registry), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) - runner.stderr.on("data", function (chunk) { e += chunk }) }) }) @@ -83,17 +223,8 @@ test("npm login --always-auth", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk - - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) - - if (remaining === 0) runner.stdin.end() - }) - runner.stderr.on("data", function (chunk) { e += chunk }) + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) }) @@ -120,17 +251,8 @@ test("npm login --no-always-auth", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk - - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) - - if (remaining === 0) runner.stdin.end() - }) - runner.stderr.on("data", function (chunk) { e += chunk }) + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) }) diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js index f9829c618ac7e8..890a3fd2749858 100644 --- a/deps/npm/test/tap/adduser-legacy-auth.js +++ b/deps/npm/test/tap/adduser-legacy-auth.js @@ -73,17 +73,20 @@ test('npm login', function (t) { }) }) - var o = '', e = '', remaining = Object.keys(responses).length + var remaining = Object.keys(responses).length runner.stdout.on('data', function (chunk) { - remaining-- - o += chunk + if (remaining > 0) { + remaining-- - var label = chunk.toString('utf8').split(':')[0] - runner.stdin.write(responses[label]) + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) - if (remaining === 0) runner.stdin.end() + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, 'Logged in as u on ' + common.registry + '/.') + } }) - runner.stderr.on('data', function (chunk) { e += chunk }) }) }) diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js new file mode 100644 index 00000000000000..4bfc6b1c977614 --- /dev/null +++ b/deps/npm/test/tap/correct-mkdir.js @@ -0,0 +1,58 @@ +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') + +test('correct-mkdir: no race conditions', function (t) { + var mock_fs = {} + var did_hook = false + mock_fs.stat = function (path, cb) { + if (path === cache_dir) { + // Return a non-matching owner + cb(null, { + uid: +process.uid + 1, + isDirectory: function () { + return true + } + }) + if (!did_hook) { + did_hook = true + doHook() + } + } else { + assert.ok(false, 'Unhandled stat path: ' + path) + } + } + var chown_in_progress = 0 + var mock_chownr = function (path, uid, gid, cb) { + ++chown_in_progress + process.nextTick(function () { + --chown_in_progress + cb(null) + }) + } + var mocks = { + 'graceful-fs': mock_fs, + 'chownr': mock_chownr + } + var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks) + + var calls_in_progress = 3 + function handleCallFinish () { + t.equal(chown_in_progress, 0, 'should not return while chown still in progress') + if (!--calls_in_progress) { + t.end() + } + } + function doHook () { + // This is fired during the first correctMkdir call, after the stat has finished + // but before the chownr has finished + // Buggy old code will fail and return a cached value before initial call is done + correctMkdir(cache_dir, handleCallFinish) + } + // Initial call + correctMkdir(cache_dir, handleCallFinish) + // Immediate call again in case of race condition there + correctMkdir(cache_dir, handleCallFinish) +}) diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index cbb256d983d0f0..4fb141578f19d4 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -135,6 +135,7 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', + '--reuseaddr', '--port=1234' ], { diff --git a/deps/npm/test/tap/install-link-scripts.js b/deps/npm/test/tap/install-link-scripts.js index bd8b9a3e37b858..5ad2feafe85b74 100644 --- a/deps/npm/test/tap/install-link-scripts.js +++ b/deps/npm/test/tap/install-link-scripts.js @@ -122,7 +122,8 @@ function setup () { path.join(dep, 'package.json'), JSON.stringify(dependency, null, 2) ) - fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo, { mode: '0755' }) + fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo) + fs.chmod(path.join(dep, 'bin', 'foo'), '0755') } function cleanup () { diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js index b6900b431740d2..28aa8f2fcf2bcb 100644 --- a/deps/npm/test/tap/noargs-install-config-save.js +++ b/deps/npm/test/tap/noargs-install-config-save.js @@ -1,18 +1,14 @@ -var common = require("../common-tap.js") -var test = require("tap").test -var npm = require.resolve("../../bin/npm-cli.js") -var path = require("path") -var fs = require("fs") -var rimraf = require("rimraf") -var mkdirp = require("mkdirp") +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 spawn = require("child_process").spawn -var node = process.execPath - -var pkg = path.resolve(process.env.npm_config_tmp || "/tmp", - "noargs-install-config-save") +var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', + 'noargs-install-config-save') function writePackageJson() { rimraf.sync(pkg) @@ -29,33 +25,32 @@ function writePackageJson() { }), "utf8") } -function createChild (args) { - var env = { - "npm_config_save": true, - "npm_config_registry": common.registry, - "npm_config_cache": pkg + "/cache", - HOME: process.env.HOME, - Path: process.env.PATH, - PATH: process.env.PATH - } - - if (process.platform === "win32") - env.npm_config_cache = "%APPDATA%\\npm-cache" - - return spawn(node, args, { - cwd: pkg, - env: env - }) +var env = { + 'npm_config_save': true, + 'npm_config_registry': common.registry, + 'npm_config_cache': pkg + '/cache', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH +} +var OPTS = { + cwd: pkg, + env: env } test("does not update the package.json with empty arguments", function (t) { writePackageJson() - t.plan(1) + t.plan(2) - mr({port : common.port}, function (er, s) { - var child = createChild([npm, "install"]) - child.on("close", function () { - var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) + mr({ port: common.port }, function (er, s) { + common.npm('install', OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) + if (code !== 0) { + console.error('#', stdout) + console.error('#', stderr) + } + var text = JSON.stringify(fs.readFileSync(pkg + '/package.json', 'utf8')) s.close() t.ok(text.indexOf("\"dependencies") === -1) }) @@ -64,11 +59,12 @@ test("does not update the package.json with empty arguments", function (t) { test("updates the package.json (adds dependencies) with an argument", function (t) { writePackageJson() - t.plan(1) + t.plan(2) - mr({port : common.port}, function (er, s) { - var child = createChild([npm, "install", "underscore"]) - child.on("close", function () { + mr({ port: common.port }, function (er, s) { + common.npm(['install', 'underscore'], OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) s.close() var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) t.ok(text.indexOf("\"dependencies") !== -1) diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js index e734ebfd783193..5d2b4e30e2506c 100644 --- a/deps/npm/test/tap/publish-access-scoped.js +++ b/deps/npm/test/tap/publish-access-scoped.js @@ -1,81 +1,70 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server var pkg = path.join(__dirname, "publish-access") -// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry -if (!global.setImmediate) { - global.setImmediate = function () { - var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) - setTimeout.apply(this, args) - } -} - -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), function () { - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : common.registry - } - - npm.load(configuration, next) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() }) +}) - function next (er) { - t.ifError(er, "npm loaded successfully") +test('scoped packages pass public access if set', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/@bigco%2fpublish-access', true).reply(201, {ok: true}) - process.chdir(pkg) + mkdirp(path.join(pkg, 'cache'), function () { fs.writeFile( path.join(pkg, "package.json"), JSON.stringify({ - name: "@bigco/publish-access", - version: "1.2.5" + name: '@bigco/publish-access', + version: '1.2.5', + public: true }), "ascii", function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) } ) - } -}) - -test("scoped packages pass public access if set", function (t) { - var put = nock(common.registry) - .put("/@bigco%2fpublish-access") - .reply(201, verify) - - npm.config.set("access", "public") - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - t.end() }) - - function verify (_, body) { - t.doesNotThrow(function () { - var parsed = JSON.parse(body) - t.equal(parsed.access, "public", "access level is correct") - }, "converted body back into object") - - return {ok: true} - } }) test("cleanup", function (t) { process.chdir(__dirname) + server.close() rimraf(pkg, function (er) { t.ifError(er) diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js index 023bfba5f2dd82..4d193cffd99a77 100644 --- a/deps/npm/test/tap/publish-access-unscoped.js +++ b/deps/npm/test/tap/publish-access-unscoped.js @@ -1,81 +1,70 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server var pkg = path.join(__dirname, "publish-access-unscoped") -// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry -if (!global.setImmediate) { - global.setImmediate = function () { - var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) - setTimeout.apply(this, args) - } -} - -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), function () { - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : common.registry - } - - npm.load(configuration, next) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() }) +}) - function next (er) { - t.ifError(er, "npm loaded successfully") +test('unscoped packages can be explicitly set as public', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/publish-access', true).reply(201, {ok: true}) - process.chdir(pkg) + mkdirp(path.join(pkg, 'cache'), function () { fs.writeFile( path.join(pkg, "package.json"), JSON.stringify({ - name: "publish-access", - version: "1.2.5" + name: 'publish-access', + version: '1.2.5', + public: true }), "ascii", function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) } ) - } -}) - -test("unscoped packages can be explicitly set as public", function (t) { - var put = nock(common.registry) - .put("/publish-access") - .reply(201, verify) - - npm.config.set("access", "public") - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - t.end() }) - - function verify (_, body) { - t.doesNotThrow(function () { - var parsed = JSON.parse(body) - t.equal(parsed.access, "public", "access level is correct") - }, "converted body back into object") - - return {ok: true} - } }) test("cleanup", function (t) { process.chdir(__dirname) + server.close() rimraf(pkg, function (er) { t.ifError(er) diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js index f74ca2e6160f60..cf0daed486d6ca 100644 --- a/deps/npm/test/tap/publish-scoped.js +++ b/deps/npm/test/tap/publish-scoped.js @@ -1,68 +1,64 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var common = require('../common-tap') +var mr = require('npm-registry-mock') var pkg = path.join(__dirname, "prepublish_package") -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), next) - - function next () { - process.chdir(pkg) - fs.writeFile( - path.join(pkg, "package.json"), - JSON.stringify({ - name: "@bigco/publish-organized", - version: "1.2.5" - }), - "ascii", - function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() - } - ) - } +var server + +function setup () { + cleanup() + mkdirp.sync(path.join(pkg, 'cache')) + + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify({ + name: '@bigco/publish-organized', + version: '1.2.5' + }, null, 2), + 'ascii') +} + +test('setup', function (t) { + setup() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) }) -test("npm publish should honor scoping", function (t) { - var put = nock(common.registry) - .put("/@bigco%2fpublish-organized") - .reply(201, verify) - - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : "http://nonexistent.lvh.me", - "//localhost:1337/:username" : "username", - "//localhost:1337/:_password" : new Buffer("password").toString("base64"), - "//localhost:1337/:email" : "ogd@aoaioxxysz.net" - } - - npm.load(configuration, onload) - - function onload (er) { - t.ifError(er, "npm bootstrapped successfully") - - npm.config.set("@bigco:registry", common.registry) - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - - t.end() - }) - } +test('npm publish should honor scoping', function (t) { + server.filteringRequestBody(verify) + .put('/@bigco%2fpublish-organized', true) + .reply(201, {ok: true}) + + var configuration = [ + 'progress=false', + 'cache=' + path.join(pkg, 'cache'), + 'registry=http://nonexistent.lvh.me', + '//localhost:1337/:username=username', + '//localhost:1337/:_password=' + new Buffer('password').toString('base64'), + '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '@bigco:registry=' + common.registry + ] + var configFile = path.join(pkg, '.npmrc') + + fs.writeFileSync(configFile, configuration.join('\n') + '\n') + + common.npm(['publish'], {'cwd': pkg}, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'published without error') + server.done() + t.end() + }) - function verify (_, body) { + function verify (body) { t.doesNotThrow(function () { var parsed = JSON.parse(body) var current = parsed.versions["1.2.5"] @@ -79,15 +75,17 @@ test("npm publish should honor scoping", function (t) { ) }, "converted body back into object") - return {ok: true} + return true } }) -test("cleanup", function (t) { - process.chdir(__dirname) - rimraf(pkg, function (er) { - t.ifError(er) - - t.end() - }) +test('cleanup', function (t) { + server.close() + t.end() + cleanup() }) + +function cleanup () { + process.chdir(__dirname) + rimraf.sync(pkg) +} diff --git a/deps/npm/test/tap/registry.js b/deps/npm/test/tap/registry.js index 060d9b67b67fcc..fef099f0af8092 100644 --- a/deps/npm/test/tap/registry.js +++ b/deps/npm/test/tap/registry.js @@ -38,11 +38,14 @@ function runTests () { cwd: ca, stdio: "inherit" } - common.npm(["install"], opts, function (err, code) { + common.npm(["install"], opts, function (err, code, stdout, stderr) { if (err) { throw err } if (code) { return test("need install to work", function (t) { - t.fail("install failed with: " + code) + t.fail( + "install failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) t.end() }) @@ -52,24 +55,32 @@ function runTests () { env: env, stdio: "inherit" } - common.npm(["test", "--", "-Rtap"], 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() + common.npm( + [ + "test", "--", "-Rtap" + ], + opts, + function (err, code, stdout, stderr) { + if (err) { throw err } + if (code) { + return test("need test to work", function (t) { + t.fail( + "test failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) + t.end() + }) + } + opts = { + cwd: ca, + env: env, + stdio: "inherit" + } + common.npm(["prune", "--production"], opts, function (err, code) { + if (err) { throw err } + process.exit(code || 0) + }) }) } - opts = { - cwd: ca, - env: env, - stdio: "inherit" - } - common.npm(["prune", "--production"], opts, function (err, code) { - if (err) { throw err } - process.exit(code || 0) - }) - }) - } }) } diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js index 6853cf3020637d..726b56f46d2e16 100644 --- a/deps/npm/test/tap/sorted-package-json.js +++ b/deps/npm/test/tap/sorted-package-json.js @@ -27,7 +27,7 @@ test("sorting dependencies", function (t) { mr({port : common.port}, function (er, s) { // underscore is already in the package.json, // but --save will trigger a rewrite with sort - var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3"], { + var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3", "--no-progress", "--loglevel=error"], { cwd: pkg, env: { "npm_config_registry": common.registry, @@ -38,7 +38,8 @@ test("sorting dependencies", function (t) { HOME: process.env.HOME, Path: process.env.PATH, PATH: process.env.PATH - } + }, + stdio: ['ignore', 'ignore', process.stderr] }) child.on("close", function (code) { From 9a9ac8e7b8582d99d91416a5f246977a17dd0cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 26 Jan 2016 13:45:04 -0800 Subject: [PATCH 260/262] test: make npm tests work on prerelease node versions PR-URL: https://github.com/nodejs/node/pull/4960 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- deps/npm/test/common-tap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index 3537df68761aa6..de0a9f416d79d8 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -18,6 +18,8 @@ process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') var bin = exports.bin = require.resolve('../bin/npm-cli.js') var chain = require('slide').chain From 3281c58bf38ffbb8a1e6b1342658d13345952539 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Thu, 26 Nov 2015 22:58:51 +0100 Subject: [PATCH 261/262] test: fix tls-no-rsa-key flakiness In some conditions it can happen that the client-side socket is destroyed before the server-side socket has gracefully closed, thus causing a 'ECONNRESET' error in this socket. To solve this, wait in the client-side socket for the 'end' event before closing it. PR-URL: https://github.com/nodejs/node/pull/4043 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- test/parallel/test-tls-no-rsa-key.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-no-rsa-key.js b/test/parallel/test-tls-no-rsa-key.js index 61e8a3b7ca3658..ff9806cdb02614 100644 --- a/test/parallel/test-tls-no-rsa-key.js +++ b/test/parallel/test-tls-no-rsa-key.js @@ -23,9 +23,16 @@ var server = tls.createServer(options, function(conn) { var c = tls.connect(common.PORT, { rejectUnauthorized: false }, function() { + c.on('end', common.mustCall(function() { + c.end(); + server.close(); + })); + + c.on('data', function(data) { + assert.equal(data, 'ok'); + }); + cert = c.getPeerCertificate(); - c.destroy(); - server.close(); }); }); From 957f0e411c2b5c18a31e306673692454630d5d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 5 Feb 2016 14:14:47 -0800 Subject: [PATCH 262/262] deps: upgrade to npm 2.14.17 --- deps/npm/AUTHORS | 4 + deps/npm/CHANGELOG.md | 52 +++++ deps/npm/doc/cli/npm-outdated.md | 11 +- deps/npm/doc/cli/npm-update.md | 47 ++--- deps/npm/doc/cli/npm-view.md | 5 + deps/npm/doc/files/package.json.md | 10 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/api/npm-bin.html | 2 +- deps/npm/html/doc/api/npm-bugs.html | 2 +- deps/npm/html/doc/api/npm-cache.html | 2 +- deps/npm/html/doc/api/npm-commands.html | 2 +- deps/npm/html/doc/api/npm-config.html | 2 +- deps/npm/html/doc/api/npm-deprecate.html | 2 +- deps/npm/html/doc/api/npm-docs.html | 2 +- deps/npm/html/doc/api/npm-edit.html | 2 +- deps/npm/html/doc/api/npm-explore.html | 2 +- deps/npm/html/doc/api/npm-help-search.html | 2 +- deps/npm/html/doc/api/npm-init.html | 2 +- deps/npm/html/doc/api/npm-install.html | 2 +- deps/npm/html/doc/api/npm-link.html | 2 +- deps/npm/html/doc/api/npm-load.html | 2 +- deps/npm/html/doc/api/npm-ls.html | 2 +- deps/npm/html/doc/api/npm-outdated.html | 2 +- deps/npm/html/doc/api/npm-owner.html | 2 +- deps/npm/html/doc/api/npm-pack.html | 2 +- deps/npm/html/doc/api/npm-ping.html | 2 +- deps/npm/html/doc/api/npm-prefix.html | 2 +- deps/npm/html/doc/api/npm-prune.html | 2 +- deps/npm/html/doc/api/npm-publish.html | 2 +- deps/npm/html/doc/api/npm-rebuild.html | 2 +- deps/npm/html/doc/api/npm-repo.html | 2 +- deps/npm/html/doc/api/npm-restart.html | 2 +- deps/npm/html/doc/api/npm-root.html | 2 +- deps/npm/html/doc/api/npm-run-script.html | 2 +- deps/npm/html/doc/api/npm-search.html | 2 +- deps/npm/html/doc/api/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/api/npm-start.html | 2 +- deps/npm/html/doc/api/npm-stop.html | 2 +- deps/npm/html/doc/api/npm-tag.html | 2 +- deps/npm/html/doc/api/npm-test.html | 2 +- deps/npm/html/doc/api/npm-uninstall.html | 2 +- deps/npm/html/doc/api/npm-unpublish.html | 2 +- deps/npm/html/doc/api/npm-update.html | 2 +- deps/npm/html/doc/api/npm-version.html | 2 +- deps/npm/html/doc/api/npm-view.html | 2 +- deps/npm/html/doc/api/npm-whoami.html | 2 +- deps/npm/html/doc/api/npm.html | 4 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- 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-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-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-init.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-outdated.html | 13 +- 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-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-rm.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-tag.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-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 49 ++--- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 5 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 10 +- 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 | 12 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 12 +- 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 | 8 +- 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/npm.js | 10 +- deps/npm/lib/outdated.js | 4 + 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-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-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-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-init.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-outdated.1 | 13 +- 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-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-rm.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-tag.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.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 | 49 ++--- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 11 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man3/npm-bin.3 | 2 +- deps/npm/man/man3/npm-bugs.3 | 2 +- deps/npm/man/man3/npm-cache.3 | 2 +- deps/npm/man/man3/npm-commands.3 | 2 +- deps/npm/man/man3/npm-config.3 | 2 +- deps/npm/man/man3/npm-deprecate.3 | 2 +- deps/npm/man/man3/npm-docs.3 | 2 +- deps/npm/man/man3/npm-edit.3 | 2 +- deps/npm/man/man3/npm-explore.3 | 2 +- deps/npm/man/man3/npm-help-search.3 | 2 +- deps/npm/man/man3/npm-init.3 | 2 +- deps/npm/man/man3/npm-install.3 | 2 +- deps/npm/man/man3/npm-link.3 | 2 +- deps/npm/man/man3/npm-load.3 | 2 +- deps/npm/man/man3/npm-ls.3 | 2 +- deps/npm/man/man3/npm-outdated.3 | 2 +- deps/npm/man/man3/npm-owner.3 | 2 +- deps/npm/man/man3/npm-pack.3 | 2 +- deps/npm/man/man3/npm-ping.3 | 2 +- deps/npm/man/man3/npm-prefix.3 | 2 +- deps/npm/man/man3/npm-prune.3 | 2 +- deps/npm/man/man3/npm-publish.3 | 2 +- deps/npm/man/man3/npm-rebuild.3 | 2 +- deps/npm/man/man3/npm-repo.3 | 2 +- deps/npm/man/man3/npm-restart.3 | 2 +- deps/npm/man/man3/npm-root.3 | 2 +- deps/npm/man/man3/npm-run-script.3 | 2 +- deps/npm/man/man3/npm-search.3 | 2 +- deps/npm/man/man3/npm-shrinkwrap.3 | 2 +- deps/npm/man/man3/npm-start.3 | 2 +- deps/npm/man/man3/npm-stop.3 | 2 +- deps/npm/man/man3/npm-tag.3 | 2 +- deps/npm/man/man3/npm-test.3 | 2 +- deps/npm/man/man3/npm-uninstall.3 | 2 +- deps/npm/man/man3/npm-unpublish.3 | 2 +- deps/npm/man/man3/npm-update.3 | 4 +- deps/npm/man/man3/npm-version.3 | 2 +- deps/npm/man/man3/npm-view.3 | 2 +- deps/npm/man/man3/npm-whoami.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 14 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package.json.5 | 14 +- 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 +- deps/npm/node_modules/request/.eslintrc | 45 ++++ .../request/node_modules/bl/.jshintrc | 59 ++++++ .../request/node_modules/extend/.eslintrc | 192 ++++++++++++++++++ .../node_modules/xtend/.jshintrc | 30 +++ .../request/node_modules/isstream/.jshintrc | 59 ++++++ .../request/node_modules/qs/.eslintrc | 17 ++ .../node_modules/tunnel-agent/.jshintrc | 5 + deps/npm/package.json | 2 +- deps/npm/test/fixtures/onload.js | 1 + deps/npm/test/tap/onload.js | 39 ++++ deps/npm/test/tap/outdated-symlink.js | 89 ++++++++ deps/npm/test/tap/update-examples.js | 7 +- 239 files changed, 983 insertions(+), 341 deletions(-) create mode 100644 deps/npm/node_modules/request/.eslintrc create mode 100644 deps/npm/node_modules/request/node_modules/bl/.jshintrc create mode 100644 deps/npm/node_modules/request/node_modules/extend/.eslintrc create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc create mode 100644 deps/npm/node_modules/request/node_modules/isstream/.jshintrc create mode 100644 deps/npm/node_modules/request/node_modules/qs/.eslintrc create mode 100644 deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc create mode 100644 deps/npm/test/fixtures/onload.js create mode 100644 deps/npm/test/tap/onload.js create mode 100644 deps/npm/test/tap/outdated-symlink.js diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 2952381a70d270..a7ffe70d693518 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -338,3 +338,7 @@ Jimb Esser Hal Henke Alexis Campailla Beau Gunderson +s100 +Jonathan Persson +Vedat Mahir YILMAZ +Jan Schär diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 9361445adcc8a2..3b4673d2af6c77 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,55 @@ +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + There is an obscure feature that lets you monkey-patch npm when it starts up. + If the module being required with this feature failed, it would previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + ### v2.14.16 (2016-01-21): Good to see you all again! It's been a while since we had an LTS release, and diff --git a/deps/npm/doc/cli/npm-outdated.md b/deps/npm/doc/cli/npm-outdated.md index 9fd97e63fce39a..076d213d09ef65 100644 --- a/deps/npm/doc/cli/npm-outdated.md +++ b/deps/npm/doc/cli/npm-outdated.md @@ -32,11 +32,12 @@ In the output: ``` $ npm outdated -Package Current Wanted Latest Location -glob 5.0.15 5.0.15 6.0.1 test-outdated-output -nothingness 0.0.3 git git test-outdated-output -npm 3.5.1 3.5.2 3.5.1 test-outdated-output -once 1.3.2 1.3.3 1.3.3 test-outdated-output +Package Current Wanted Latest Location +glob 5.0.15 5.0.15 6.0.1 test-outdated-output +nothingness 0.0.3 git git test-outdated-output +npm 3.5.1 3.5.2 3.5.1 test-outdated-output +local-dev 0.0.3 linked linked test-outdated-output +once 1.3.2 1.3.3 1.3.3 test-outdated-output ``` With these `dependencies`: diff --git a/deps/npm/doc/cli/npm-update.md b/deps/npm/doc/cli/npm-update.md index 7285226d428547..035cbff2939d05 100644 --- a/deps/npm/doc/cli/npm-update.md +++ b/deps/npm/doc/cli/npm-update.md @@ -44,16 +44,17 @@ on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are ``` { - dist-tags: { latest: "1.2.2" }, - versions: { "1.2.2", - "1.2.1", - "1.2.0", - "1.1.2", - "1.1.1", - "1.0.0", - "0.4.1", - "0.4.0", - "0.2.0" + "dist-tags": { "latest": "1.2.2" }, + "versions": { + "1.2.2", + "1.2.1", + "1.2.0", + "1.1.2", + "1.1.1", + "1.0.0", + "0.4.1", + "0.4.0", + "0.2.0" } } ``` @@ -63,8 +64,8 @@ on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are If `app`'s `package.json` contains: ``` -dependencies: { - dep1: "^1.1.1" +"dependencies": { + "dep1": "^1.1.1" } ``` @@ -76,8 +77,8 @@ Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and However, if `app`'s `package.json` contains: ``` -dependencies: { - dep1: "~1.1.1" +"dependencies": { + "dep1": "~1.1.1" } ``` @@ -91,8 +92,8 @@ which is `1.1.2`. Suppose `app` has a caret dependency on a version below `1.0.0`, for example: ``` -dependencies: { - dep1: "^0.2.0" +"dependencies": { + "dep1": "^0.2.0" } ``` @@ -102,8 +103,8 @@ versions which satisfy `^0.2.0`. If the dependence were on `^0.4.0`: ``` -dependencies: { - dep1: "^0.4.0" +"dependencies": { + "dep1": "^0.4.0" } ``` @@ -117,8 +118,8 @@ the minimum required dependency in `package.json`, you can use `npm update --save`. For example if `package.json` contains ``` -dependencies: { - dep1: "^1.1.1" +"dependencies": { + "dep1": "^1.1.1" } ``` @@ -126,8 +127,8 @@ Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`), and `package.json` will be modified: ``` -dependencies: { - dep1: "^1.2.2" +"dependencies": { + "dep1": "^1.2.2" } ``` @@ -136,7 +137,7 @@ if it installs a new package. ### Updating Globally-Installed Packages -`npm update -g` will apply the `update` action to each globally- installed +`npm update -g` will apply the `update` action to each globally installed package that is `outdated` -- that is, has a version that is different from `latest`. diff --git a/deps/npm/doc/cli/npm-view.md b/deps/npm/doc/cli/npm-view.md index 683ed09f46f651..0e3df33d66867b 100644 --- a/deps/npm/doc/cli/npm-view.md +++ b/deps/npm/doc/cli/npm-view.md @@ -66,6 +66,11 @@ was required by each matching version of yui3: npm view yui3@'>0.5.4' dependencies.jsdom +To show the `connect` package version history, you can do +this: + + npm view connect versions + ## OUTPUT If only a single string field for a single version is output, then it diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 841e7f45321687..ccbc6715acb7ed 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -113,7 +113,7 @@ expression syntax version 2.0 string](https://npmjs.com/package/spdx), like this { "license" : "(ISC OR GPL-3.0)" } If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: { "license" : "SEE LICENSE IN " } @@ -186,9 +186,10 @@ works just like a `.gitignore`. Certain files are always included, regardless of settings: * `package.json` -* `README` (and its variants) -* `CHANGELOG` (and its variants) +* `README` +* `CHANGES` / `CHANGELOG` / `HISTORY` (any casing and file extension) * `LICENSE` / `LICENCE` +* The file in the "main" field Conversely, some files are always ignored: @@ -198,10 +199,11 @@ Conversely, some files are always ignored: * `.hg` * `.lock-wscript` * `.wafpickle-N` -* `*.swp` +* `.*.swp` * `.DS_Store` * `._*` * `npm-debug.log` +* `.npmrc` ## main diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 3f9521992eedb1..1206ad32e8e752 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -127,5 +127,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 3d9299365d21fa..275871c2911ea1 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index 63271d8875ea87..852e9c4a739d48 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 6cf00176750832..7e5c5164bf0549 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index 433d7da710349f..adeed91a1abe1e 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index 9b6e7874f4fa4f..9c9eb7104113c9 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 92beadcd62f4f3..5b68ae82314262 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index b29244a76f9892..e2957d64ff7ed3 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index a28d16fa9518d1..7ac01a3eddad6b 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index f2e43f9f4fafbc..b9f74d56073b92 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index d4c8c152acd7b9..e04fb0964a3256 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 38707e957bdb39..2c4f2796239a08 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 19c83deb241231..7da1c1a3e6251a 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 2cf378d861416d..a9bb5da49bf0b2 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index f1a9f5be4b5fdc..7cb0a5bd6a5f54 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 1a47dbcb3d64be..5292fffbb1217f 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

    global

           - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index dc100aba627886..32b27c0ac531dd 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index ffcf76e4db9d7b..2e3543aa64030b 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index c28bd7032b43ca..aad905d00b8eae 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html index c73766fbe2d2ec..e924290d6e469c 100644 --- a/deps/npm/html/doc/api/npm-ping.html +++ b/deps/npm/html/doc/api/npm-ping.html @@ -29,4 +29,4 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 09abb2eeec1047..a19c3bc503640d 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 270157cb001e33..1b14bdcb7e5ae9 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index fde56865e21114..399c3e24ecc74d 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 2120b230b1c78f..fe784527f9231e 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

    CONFIGURATION

           - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index d9dd7e1e6a15d7..764be47990dffe 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 27eb9bd4676bb2..00e5d45a1e9ea7 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 011375f8e99a5b..8e7b01625c0ad6 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index e592eb968d3a7b..89bea3c8a236fc 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 32b7fc9f1adc86..88344e68d1f49c 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index b8891e749fd40e..eae3b5cf700d14 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index bcd448db2853b0..630ba60cd26393 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index af310632bc09b2..56717b752313e1 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 49756460b40c10..551a87b34d2d8d 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index bdc9c481df10a8..2f6d8e9ee6024a 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index d5c225f9bb682d..d5c99b38ba5445 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 264c005ba80a1a..f615e70c65455d 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 68280b7c1bd01a..f72c7d3418d393 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 00c68be8202574..a92fb6f544fdc1 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 2c8e33bdbb436d..db48e830c9b23b 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

    RETURN VALUE

           - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index 151b9c090e6af9..8fe4097fe4a6f3 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index c075b2df28dbf7..8ae62dc2ec7fc3 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

    SYNOPSIS

    npm.commands.install(["package"], cb) })

    VERSION

    -

    2.14.16

    +

    2.14.17

    DESCRIPTION

    This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@

    ABBREVS

           - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 960f36e56e879e..095e8056d7f23e 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 2f39869491d297..41b7c7add3a5f4 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index a88f31d379535e..76e76aa54c1e31 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 42bdbf210ff672..cf1ea0e5288010 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 b21c444163eac6..e8f15514c318a7 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

    DESCRIPTION

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 5d015febd27e5c..bdc9202b099f42 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 9b1da7a0e93bfe..8052bd311c1b49 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index c7e98ec93c4066..4edcfa49af8f50 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 5880af7c424a05..4a6464b09cfb47 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 9602b2ae9d294b..678fd56ad7123d 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index c98a34e75c3860..fdae8a3cb48820 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 3b8a8a84906c0d..0e924940314517 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -85,5 +85,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 14b4760d3f1afb..5620711f32286c 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index a7549f551b4fda..3eb387e801d508 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 0708c2733fac83..b4ac864307ad9e 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,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 f7bd1b3adaa941..016bd7c23cd5cd 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 1d297b8a295a1a..5e7c9e20e6c6c8 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 8d2fe31bdee9f3..129f94c6220e08 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

    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 a43a37cd476885..804f03b7da0a22 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,4 +42,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 4edb8b1bbc5e13..7b2d5a66b41af2 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -279,5 +279,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 7d9500725bb251..49b169c4bc87ad 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -72,5 +72,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 577dc95459959c..1acb6807cdf448 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 9b4ec16687514b..233f4ca497571c 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,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@2.14.16 /path/to/npm
    +
    npm@2.14.17 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

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

    @@ -97,5 +97,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index a4e1f6f12cd71b..d49f80c521dca9 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -35,11 +35,12 @@

    SYNOPSIS

    An example

    $ npm outdated
    -Package      Current  Wanted  Latest  Location
    -glob          5.0.15  5.0.15   6.0.1  test-outdated-output
    -nothingness    0.0.3     git     git  test-outdated-output
    -npm            3.5.1   3.5.2   3.5.1  test-outdated-output
    -once           1.3.2   1.3.3   1.3.3  test-outdated-output
    +Package      Current   Wanted   Latest  Location
    +glob          5.0.15   5.0.15    6.0.1  test-outdated-output
    +nothingness    0.0.3      git      git  test-outdated-output
    +npm            3.5.1    3.5.2    3.5.1  test-outdated-output
    +local-dev      0.0.3   linked   linked  test-outdated-output
    +once           1.3.2    1.3.3    1.3.3  test-outdated-output
     

    With these dependencies:

    {
       "glob": "^5.0.15",
    @@ -115,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 cbd00b28c4515c..114c856ae6e3cb 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index a0214d27a2d2df..745850cfda32e7 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 5283e84e2be750..a190acba55f0c2 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 9c6eb2fb528bb0..63c318c4a11c3e 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-prune.html b/deps/npm/html/doc/cli/npm-prune.html index cbbf757890bc39..63f1f8b20561b9 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 1b913f936b1849..74dcc17031a6ec 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -69,5 +69,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index e59fa0b5c821ed..5807f1512253ea 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index f5a16a71c10e40..d37729d6266356 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index d854a290bb7378..d5bb06fefa3277 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index fc08c1771bdc9f..32a38c9d4e5191 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index aef668a7f82a70..c1cf733b75da31 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,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 f272d18c116de1..963045fd89a2fd 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 02d8bf993d0661..0b094781eba4dc 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 22783a1a3a3081..e2283e5922407d 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 6117bb5ce96ebf..f750c9839c76c0 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index e3c7fb453d5b67..fcb1fa994706fc 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 0abf6026f0a99b..6ed4cfe3ea6505 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index c548457826cfdc..6f355a6f730862 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 79f75851dc9c3f..c4a28e8e8a83dc 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index cde3b3beef7e26..d048e0df4c300c 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 19803e99079720..3b6155d09fc770 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index dea1476ec915a8..719589914ffcbb 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 038ef313e42f7d..ef528dfd3e5b23 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 16f572e6f7b7eb..052b27ac8550aa 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -37,29 +37,30 @@

    SYNOPSIS

    For the examples below, assume that the current package is app and it depends on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 are:

    {
    -  dist-tags: { latest: "1.2.2" },
    -  versions: { "1.2.2",
    -              "1.2.1",
    -              "1.2.0",
    -              "1.1.2",
    -              "1.1.1",
    -              "1.0.0",
    -              "0.4.1",
    -              "0.4.0",
    -              "0.2.0"
    +  "dist-tags": { "latest": "1.2.2" },
    +  "versions": {
    +    "1.2.2",
    +    "1.2.1",
    +    "1.2.0",
    +    "1.1.2",
    +    "1.1.1",
    +    "1.0.0",
    +    "0.4.1",
    +    "0.4.0",
    +    "0.2.0"
       }
     }
     

    Caret Dependencies

    If app's package.json contains:

    -
    dependencies: {
    -  dep1: "^1.1.1"
    +
    "dependencies": {
    +  "dep1": "^1.1.1"
     }
     

    Then npm update will install dep1@1.2.2, because 1.2.2 is latest and 1.2.2 satisfies ^1.1.1.

    Tilde Dependencies

    However, if app's package.json contains:

    -
    dependencies: {
    -  dep1: "~1.1.1"
    +
    "dependencies": {
    +  "dep1": "~1.1.1"
     }
     

    In this case, running npm update will install dep1@1.1.2. Even though the latest tag points to 1.2.2, this version does not satisfy ~1.1.1, which is equivalent @@ -67,14 +68,14 @@

    Tilde Dependencies

    which is 1.1.2.

    Caret Dependencies below 1.0.0

    Suppose app has a caret dependency on a version below 1.0.0, for example:

    -
    dependencies: {
    -  dep1: "^0.2.0"
    +
    "dependencies": {
    +  "dep1": "^0.2.0"
     }
     

    npm update will install dep1@0.2.0, because there are no other versions which satisfy ^0.2.0.

    If the dependence were on ^0.4.0:

    -
    dependencies: {
    -  dep1: "^0.4.0"
    +
    "dependencies": {
    +  "dep1": "^0.4.0"
     }
     

    Then npm update will install dep1@0.4.1, because that is the highest-sorting version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0)

    @@ -82,18 +83,18 @@

    Recording Updates with --save

    When you want to update a package and save the new version as the minimum required dependency in package.json, you can use npm update --save. For example if package.json contains

    -
    dependencies: {
    -  dep1: "^1.1.1"
    +
    "dependencies": {
    +  "dep1": "^1.1.1"
     }
     

    Then npm update --save will install dep1@1.2.2 (i.e., latest), and package.json will be modified:

    -
    dependencies: {
    -  dep1: "^1.2.2"
    +
    "dependencies": {
    +  "dep1": "^1.2.2"
     }
     

    Note that npm will only write an updated version to package.json if it installs a new package.

    Updating Globally-Installed Packages

    -

    npm update -g will apply the update action to each globally- installed +

    npm update -g will apply the update action to each globally installed package that is outdated -- that is, has a version that is different from latest.

    NOTE: If a package has been upgraded to a version newer than latest, it will @@ -119,5 +120,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 5e314e7e3dee13..230f2f02b9a857 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -95,5 +95,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 6111cdb861a1c7..efbdcf8ebaf424 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -52,6 +52,9 @@

    SYNOPSIS

    matching version of the package. This will show which version of jsdom was required by each matching version of yui3:

    npm view yui3@'>0.5.4' dependencies.jsdom
    +

    To show the connect package version history, you can do +this:

    +
    npm view connect versions
     

    OUTPUT

    If only a single string field for a single version is output, then it will not be colorized or quoted, so as to enable piping the output to @@ -82,5 +85,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index f0d59db71a0342..13bea5fd3a5d8b 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 9fcca1222fa42e..77043166474cf3 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.14.16

    +

    2.14.17

    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 @@ -110,7 +110,7 @@

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@

    BUGS

  • web: https://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,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 9319a3f77bcb8a..9ea7c237909d73 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -183,5 +183,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 9319a3f77bcb8a..9ea7c237909d73 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -183,5 +183,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index d6987af5bcbd48..733feeb82950f8 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -90,7 +90,7 @@

      license

      expression syntax version 2.0 string, like this:

      { "license" : "(ISC OR GPL-3.0)" }
       

      If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

      +you are using a custom license, use a string value like this one:

      { "license" : "SEE LICENSE IN <filename>" }
       

      Then include a file named <filename> at the top level of the package.

      Some old packages used license objects or a "licenses" property containing an @@ -143,9 +143,10 @@

      files

      Certain files are always included, regardless of settings:

      • package.json
      • -
      • README (and its variants)
      • -
      • CHANGELOG (and its variants)
      • +
      • README
      • +
      • CHANGES / CHANGELOG / HISTORY (any casing and file extension)
      • LICENSE / LICENCE
      • +
      • The file in the "main" field

      Conversely, some files are always ignored:

        @@ -155,10 +156,11 @@

        files

      • .hg
      • .lock-wscript
      • .wafpickle-N
      • -
      • *.swp
      • +
      • .*.swp
      • .DS_Store
      • ._*
      • npm-debug.log
      • +
      • .npmrc

      main

      The main field is a module ID that is the primary entry point to your program. @@ -565,5 +567,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 2bfc4db1aa78fb..2ef2c3dd7b1535 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index d6987af5bcbd48..733feeb82950f8 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -90,7 +90,7 @@

      license

      expression syntax version 2.0 string, like this:

      { "license" : "(ISC OR GPL-3.0)" }
       

      If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

      +you are using a custom license, use a string value like this one:

      { "license" : "SEE LICENSE IN <filename>" }
       

      Then include a file named <filename> at the top level of the package.

      Some old packages used license objects or a "licenses" property containing an @@ -143,9 +143,10 @@

      files

      Certain files are always included, regardless of settings:

      • package.json
      • -
      • README (and its variants)
      • -
      • CHANGELOG (and its variants)
      • +
      • README
      • +
      • CHANGES / CHANGELOG / HISTORY (any casing and file extension)
      • LICENSE / LICENCE
      • +
      • The file in the "main" field

      Conversely, some files are always ignored:

        @@ -155,10 +156,11 @@

        files

      • .hg
      • .lock-wscript
      • .wafpickle-N
      • -
      • *.swp
      • +
      • .*.swp
      • .DS_Store
      • ._*
      • npm-debug.log
      • +
      • .npmrc

      main

      The main field is a module ID that is the primary entry point to your program. @@ -565,5 +567,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 3b9f85fed9baed..b9c6cee750ca4a 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -242,5 +242,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 7c830fb39cb901..58fc98043bc652 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -147,5 +147,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index f164cd5e7936a0..a9dab534636bb1 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -799,5 +799,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 05897b052ad918..b6ef4afcab76cb 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 9c7fc3df0eee41..fddf44423e332b 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

      npm-disputes

      Handling Module

      SYNOPSIS

      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.

      @@ -51,12 +51,12 @@

      DESCRIPTION

      owner (Bob).
    • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
    • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
    • @@ -112,5 +112,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index e9c9b6316dbb6a..d17e7280ecbc86 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -242,5 +242,5 @@

      semver(7)

             - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 8089d1aae341c3..9287bbb28c6f58 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

      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 405abe5a59fcfb..4210f2ca41d3c6 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 082079e0ac6560..e4eef28d971bea 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index c8d13a4a18f194..43179946f6b501 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -207,5 +207,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 61469f102cfcdf..941c678bed718c 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 782b6cbbdcfd3d..a93fbb5aa4c6f6 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@

      Ranges

             - + diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index c049d95ba6e24b..cbd6893470ba2d 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -283,8 +283,14 @@ npm.load = function (cli, cb_) { npm.config.loaded = true loaded = true loadCb(loadErr = er) - if (onload = onload && npm.config.get("onload-script")) { - require(onload) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } onload = false } } diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index ab49d109690ee6..331809c9975072 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -252,6 +252,7 @@ function outdated_ (args, dir, parentHas, depth, cb) { has = Object.create(parentHas) pvs.forEach(function (pv) { has[pv[0]] = { + link: data.dependencies[pv[0]].link, version: pv[1], from: pv[2] } @@ -311,6 +312,9 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb, type) { if (parsed.type === "git" || (parsed.hosted && parsed.hosted.type === "github")) { return doIt("git", "git") } + if (curr && curr.link) { + return doIt("linked", "linked") + } // search for the latest package mapToRegistry(dep, npm.config, function (er, uri, auth) { diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 7cf7be7dd7bd53..e0ec2d345d7b54 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2016" "" "" +.TH "NPM" "1" "February 2016" "" "" .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 cda8c58af373bc..6af4ec3e1bc210 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" "January 2016" "" "" +.TH "NPM\-ACCESS" "1" "February 2016" "" "" .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 5db95ed23785b2..5d8afd8f6e0565 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" "January 2016" "" "" +.TH "NPM\-ADDUSER" "1" "February 2016" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 2a62d7f857872b..bca8620ebd81a6 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" "January 2016" "" "" +.TH "NPM\-BIN" "1" "February 2016" "" "" .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 24a9afb3c00675..88c21dbfef0692 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" "January 2016" "" "" +.TH "NPM\-BUGS" "1" "February 2016" "" "" .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 fa47ba88efd86f..8d238b3280739d 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" "January 2016" "" "" +.TH "NPM\-BUILD" "1" "February 2016" "" "" .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 341e5485ca5884..2771791b07ccb0 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" "January 2016" "" "" +.TH "NPM\-BUNDLE" "1" "February 2016" "" "" .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 e9fa3a254f8bcb..339a9aa2260d03 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" "January 2016" "" "" +.TH "NPM\-CACHE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index b37f2a1098b012..82733ea91c604b 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" "January 2016" "" "" +.TH "NPM\-COMPLETION" "1" "February 2016" "" "" .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 0a87b1565cb4c0..5c4d28351c60b8 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" "January 2016" "" "" +.TH "NPM\-CONFIG" "1" "February 2016" "" "" .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 604f4433371da9..64e2588fd37279 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" "January 2016" "" "" +.TH "NPM\-DEDUPE" "1" "February 2016" "" "" .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 35e916d71dfa22..b4d407dfbeda3c 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" "January 2016" "" "" +.TH "NPM\-DEPRECATE" "1" "February 2016" "" "" .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 3c17975c4ea4e3..9962d8d27aba74 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" "January 2016" "" "" +.TH "NPM\-DIST\-TAG" "1" "February 2016" "" "" .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 61c754ca14a29b..d2814182faa1a2 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" "January 2016" "" "" +.TH "NPM\-DOCS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 0ac5c044d464c0..7d8d57047682b9 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" "January 2016" "" "" +.TH "NPM\-EDIT" "1" "February 2016" "" "" .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 abf91d46da542c..8306e8529d3415 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" "January 2016" "" "" +.TH "NPM\-EXPLORE" "1" "February 2016" "" "" .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 e00ecd6e7278d4..621af7ca817202 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" "January 2016" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "February 2016" "" "" .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 42829dff278cf2..6499322c9a30ef 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" "January 2016" "" "" +.TH "NPM\-HELP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 8d6ac74f59b3c8..5399b750601945 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" "January 2016" "" "" +.TH "NPM\-INIT" "1" "February 2016" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 6b4f8adec740a8..8b99c9af98ac92 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" "" "January 2016" "" "" +.TH "NPM" "" "February 2016" "" "" .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 ff754dc2d27fa9..3efda4857dd54f 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" "January 2016" "" "" +.TH "NPM\-INSTALL" "1" "February 2016" "" "" .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 881b29ca1f8790..48db786dccc969 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" "January 2016" "" "" +.TH "NPM\-LINK" "1" "February 2016" "" "" .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 27fb508d94c12e..4136e248e46b18 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" "January 2016" "" "" +.TH "NPM\-LOGOUT" "1" "February 2016" "" "" .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 9d539a0eaacc3d..b4a4c632b7ebce 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" "January 2016" "" "" +.TH "NPM\-LS" "1" "February 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@2.14.16 /path/to/npm +npm@2.14.17 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 5de491bd7103da..3f300714f2fcbc 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" "January 2016" "" "" +.TH "NPM\-OUTDATED" "1" "February 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS @@ -41,11 +41,12 @@ are always marked \fBdependencies\fP\|\. .RS 2 .nf $ npm outdated -Package Current Wanted Latest Location -glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output -nothingness 0\.0\.3 git git test\-outdated\-output -npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output -once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output +Package Current Wanted Latest Location +glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output +nothingness 0\.0\.3 git git test\-outdated\-output +npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output +local\-dev 0\.0\.3 linked linked test\-outdated\-output +once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output .fi .RE .P diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 7ef4d9badc6412..3c3e4e6861f9c6 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" "January 2016" "" "" +.TH "NPM\-OWNER" "1" "February 2016" "" "" .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 bd444bcce62449..64dc3ea7165f57 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" "January 2016" "" "" +.TH "NPM\-PACK" "1" "February 2016" "" "" .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 a51570bcf9f39c..b270a02cc8429d 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" "January 2016" "" "" +.TH "NPM\-PING" "1" "February 2016" "" "" .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 ca5cfbabc6656f..63da3d5204f00e 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" "January 2016" "" "" +.TH "NPM\-PREFIX" "1" "February 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index f0e9b1233e57ab..115744e34232f1 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" "January 2016" "" "" +.TH "NPM\-PRUNE" "1" "February 2016" "" "" .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 9da086a4a49c0a..87b2d14d210599 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" "January 2016" "" "" +.TH "NPM\-PUBLISH" "1" "February 2016" "" "" .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 de61e6c6d56887..1594bcc116c965 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" "January 2016" "" "" +.TH "NPM\-REBUILD" "1" "February 2016" "" "" .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 ce1bc645df1cbc..66b15ec43278c8 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" "January 2016" "" "" +.TH "NPM\-REPO" "1" "February 2016" "" "" .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 5cdda9eff80295..073f41c31eceae 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" "January 2016" "" "" +.TH "NPM\-RESTART" "1" "February 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1 index 766b48437fc03b..1b0a1dd03c7ab3 100644 --- a/deps/npm/man/man1/npm-rm.1 +++ b/deps/npm/man/man1/npm-rm.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RM" "1" "January 2016" "" "" +.TH "NPM\-RM" "1" "February 2016" "" "" .SH "NAME" \fBnpm-rm\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 5cbadc13cc2c5e..a686b799ada557 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" "January 2016" "" "" +.TH "NPM\-ROOT" "1" "February 2016" "" "" .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 5555008ccb1dcb..d081ed87b94978 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" "January 2016" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "February 2016" "" "" .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 0467ad2e9dc990..5bd00828129dd2 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" "January 2016" "" "" +.TH "NPM\-SEARCH" "1" "February 2016" "" "" .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 98b70b7f7cb21c..82ca5c29855769 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" "January 2016" "" "" +.TH "NPM\-SHRINKWRAP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 53856a02666f6f..379d1f32d71b4b 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" "January 2016" "" "" +.TH "NPM\-STAR" "1" "February 2016" "" "" .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 848330284e6e79..6342217f86b4d4 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" "January 2016" "" "" +.TH "NPM\-STARS" "1" "February 2016" "" "" .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 344d8a4ce5395d..a1a6ae0e486218 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" "January 2016" "" "" +.TH "NPM\-START" "1" "February 2016" "" "" .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 5c9c5376527d45..7fbb6e458a8cc8 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" "January 2016" "" "" +.TH "NPM\-STOP" "1" "February 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index a109205fb7ff4b..094cac657f286b 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "January 2016" "" "" +.TH "NPM\-TAG" "1" "February 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index d27a3e95d26d6e..1bb66a56ddeace 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" "January 2016" "" "" +.TH "NPM\-TEAM" "1" "February 2016" "" "" .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 ee076c79b969f7..1b73587db06010 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" "January 2016" "" "" +.TH "NPM\-TEST" "1" "February 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index a54be5c18e63b6..2acb6f1b91e622 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" "January 2016" "" "" +.TH "NPM\-UNINSTALL" "1" "February 2016" "" "" .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 50616795bee0a7..a7fdc9f84c0b60 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" "January 2016" "" "" +.TH "NPM\-UNPUBLISH" "1" "February 2016" "" "" .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 e503368bc6a62e..bf5f8aeff4327a 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" "January 2016" "" "" +.TH "NPM\-UPDATE" "1" "February 2016" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS @@ -49,16 +49,17 @@ on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\. The published versions o .RS 2 .nf { - dist\-tags: { latest: "1\.2\.2" }, - versions: { "1\.2\.2", - "1\.2\.1", - "1\.2\.0", - "1\.1\.2", - "1\.1\.1", - "1\.0\.0", - "0\.4\.1", - "0\.4\.0", - "0\.2\.0" + "dist\-tags": { "latest": "1\.2\.2" }, + "versions": { + "1\.2\.2", + "1\.2\.1", + "1\.2\.0", + "1\.1\.2", + "1\.1\.1", + "1\.0\.0", + "0\.4\.1", + "0\.4\.0", + "0\.2\.0" } } .fi @@ -69,8 +70,8 @@ If \fBapp\fP\|'s \fBpackage\.json\fP contains: .P .RS 2 .nf -dependencies: { - dep1: "^1\.1\.1" +"dependencies": { + "dep1": "^1\.1\.1" } .fi .RE @@ -83,8 +84,8 @@ However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: .P .RS 2 .nf -dependencies: { - dep1: "~1\.1\.1" +"dependencies": { + "dep1": "~1\.1\.1" } .fi .RE @@ -99,8 +100,8 @@ Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for e .P .RS 2 .nf -dependencies: { - dep1: "^0\.2\.0" +"dependencies": { + "dep1": "^0\.2\.0" } .fi .RE @@ -112,8 +113,8 @@ If the dependence were on \fB^0\.4\.0\fP: .P .RS 2 .nf -dependencies: { - dep1: "^0\.4\.0" +"dependencies": { + "dep1": "^0\.4\.0" } .fi .RE @@ -128,8 +129,8 @@ the minimum required dependency in \fBpackage\.json\fP, you can use .P .RS 2 .nf -dependencies: { - dep1: "^1\.1\.1" +"dependencies": { + "dep1": "^1\.1\.1" } .fi .RE @@ -139,8 +140,8 @@ and \fBpackage\.json\fP will be modified: .P .RS 2 .nf -dependencies: { - dep1: "^1\.2\.2" +"dependencies": { + "dep1": "^1\.2\.2" } .fi .RE @@ -149,7 +150,7 @@ Note that \fBnpm\fP will only write an updated version to \fBpackage\.json\fP if it installs a new package\. .SS Updating Globally\-Installed Packages .P -\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally\- installed +\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed package that is \fBoutdated\fP \-\- that is, has a version that is different from \fBlatest\fP\|\. .P diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index c17fc698d3eae6..cf5f39952b3cfb 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" "January 2016" "" "" +.TH "NPM\-VERSION" "1" "February 2016" "" "" .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 aabbeac43af4f2..2ac7381e06189b 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" "January 2016" "" "" +.TH "NPM\-VIEW" "1" "February 2016" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS @@ -104,6 +104,15 @@ was required by each matching version of yui3: npm view yui3@'>0\.5\.4' dependencies\.jsdom .fi .RE +.P +To show the \fBconnect\fP package version history, you can do +this: +.P +.RS 2 +.nf +npm view connect versions +.fi +.RE .SH OUTPUT .P If only a single string field for a single version is output, then it diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index ad78150a01e2a7..3dbd20be7d436f 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" "January 2016" "" "" +.TH "NPM\-WHOAMI" "1" "February 2016" "" "" .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 69c3fc4f3452db..713ebf76bf0444 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2016" "" "" +.TH "NPM" "1" "February 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.14.16 +2.14.17 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3 index d792c42abe0e5e..3a353ec148f406 100644 --- a/deps/npm/man/man3/npm-bin.3 +++ b/deps/npm/man/man3/npm-bin.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "3" "January 2016" "" "" +.TH "NPM\-BIN" "3" "February 2016" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3 index 8d4f19b0db7f17..b5af809d540536 100644 --- a/deps/npm/man/man3/npm-bugs.3 +++ b/deps/npm/man/man3/npm-bugs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "3" "January 2016" "" "" +.TH "NPM\-BUGS" "3" "February 2016" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3 index 1d44e4ffebc944..75d11bb53f7c21 100644 --- a/deps/npm/man/man3/npm-cache.3 +++ b/deps/npm/man/man3/npm-cache.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "3" "January 2016" "" "" +.TH "NPM\-CACHE" "3" "February 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- manage the npm cache programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3 index 37a3aacb365504..da81ec7a10f62f 100644 --- a/deps/npm/man/man3/npm-commands.3 +++ b/deps/npm/man/man3/npm-commands.3 @@ -1,4 +1,4 @@ -.TH "NPM\-COMMANDS" "3" "January 2016" "" "" +.TH "NPM\-COMMANDS" "3" "February 2016" "" "" .SH "NAME" \fBnpm-commands\fR \- npm commands .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3 index ea7ff51aec21fe..92c4a831bd1365 100644 --- a/deps/npm/man/man3/npm-config.3 +++ b/deps/npm/man/man3/npm-config.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "3" "January 2016" "" "" +.TH "NPM\-CONFIG" "3" "February 2016" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3 index cd564a8fd61b58..faaea6d522b750 100644 --- a/deps/npm/man/man3/npm-deprecate.3 +++ b/deps/npm/man/man3/npm-deprecate.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "3" "January 2016" "" "" +.TH "NPM\-DEPRECATE" "3" "February 2016" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3 index 9e9990d55797a6..d2e0d93306bcf6 100644 --- a/deps/npm/man/man3/npm-docs.3 +++ b/deps/npm/man/man3/npm-docs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "3" "January 2016" "" "" +.TH "NPM\-DOCS" "3" "February 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3 index cd9430c30cc826..430f990f9d320f 100644 --- a/deps/npm/man/man3/npm-edit.3 +++ b/deps/npm/man/man3/npm-edit.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "3" "January 2016" "" "" +.TH "NPM\-EDIT" "3" "February 2016" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3 index 952872c8ea06cb..9bca4e2098c9fd 100644 --- a/deps/npm/man/man3/npm-explore.3 +++ b/deps/npm/man/man3/npm-explore.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "3" "January 2016" "" "" +.TH "NPM\-EXPLORE" "3" "February 2016" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3 index 5aaff4add16465..caa75029118768 100644 --- a/deps/npm/man/man3/npm-help-search.3 +++ b/deps/npm/man/man3/npm-help-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "3" "January 2016" "" "" +.TH "NPM\-HELP\-SEARCH" "3" "February 2016" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search the help pages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3 index d05f873738e928..5038435b31c72f 100644 --- a/deps/npm/man/man3/npm-init.3 +++ b/deps/npm/man/man3/npm-init.3 @@ -1,4 +1,4 @@ -.TH "NPM" "" "January 2016" "" "" +.TH "NPM" "" "February 2016" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3 index d061b4c97a949d..3dfd94ad876bb6 100644 --- a/deps/npm/man/man3/npm-install.3 +++ b/deps/npm/man/man3/npm-install.3 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "3" "January 2016" "" "" +.TH "NPM\-INSTALL" "3" "February 2016" "" "" .SH "NAME" \fBnpm-install\fR \- install a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3 index 0c9b71fceb8ec8..5fc8430f64fbd3 100644 --- a/deps/npm/man/man3/npm-link.3 +++ b/deps/npm/man/man3/npm-link.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "3" "January 2016" "" "" +.TH "NPM\-LINK" "3" "February 2016" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3 index f40259b0975591..87ae27950bd08f 100644 --- a/deps/npm/man/man3/npm-load.3 +++ b/deps/npm/man/man3/npm-load.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LOAD" "3" "January 2016" "" "" +.TH "NPM\-LOAD" "3" "February 2016" "" "" .SH "NAME" \fBnpm-load\fR \- Load config settings .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3 index 22e4e7da253403..e85b6c548cc0a5 100644 --- a/deps/npm/man/man3/npm-ls.3 +++ b/deps/npm/man/man3/npm-ls.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "3" "January 2016" "" "" +.TH "NPM\-LS" "3" "February 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3 index 774a60be43dc17..e9bf5382a10f11 100644 --- a/deps/npm/man/man3/npm-outdated.3 +++ b/deps/npm/man/man3/npm-outdated.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "3" "January 2016" "" "" +.TH "NPM\-OUTDATED" "3" "February 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3 index 10eb580eed9cb9..1e3d708cc9b99f 100644 --- a/deps/npm/man/man3/npm-owner.3 +++ b/deps/npm/man/man3/npm-owner.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "3" "January 2016" "" "" +.TH "NPM\-OWNER" "3" "February 2016" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3 index 0dc34454a060a9..8e668bed6406f9 100644 --- a/deps/npm/man/man3/npm-pack.3 +++ b/deps/npm/man/man3/npm-pack.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "3" "January 2016" "" "" +.TH "NPM\-PACK" "3" "February 2016" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ping.3 b/deps/npm/man/man3/npm-ping.3 index 1cfaa140b3eac3..31e178ad7776fe 100644 --- a/deps/npm/man/man3/npm-ping.3 +++ b/deps/npm/man/man3/npm-ping.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "3" "January 2016" "" "" +.TH "NPM\-PING" "3" "February 2016" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3 index 9fcc683cd0bc20..0df80bea914149 100644 --- a/deps/npm/man/man3/npm-prefix.3 +++ b/deps/npm/man/man3/npm-prefix.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "3" "January 2016" "" "" +.TH "NPM\-PREFIX" "3" "February 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3 index 4e70ea8ea39934..d0482944e6747a 100644 --- a/deps/npm/man/man3/npm-prune.3 +++ b/deps/npm/man/man3/npm-prune.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "3" "January 2016" "" "" +.TH "NPM\-PRUNE" "3" "February 2016" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3 index d247ffe0ed4abe..e4eec9899337ca 100644 --- a/deps/npm/man/man3/npm-publish.3 +++ b/deps/npm/man/man3/npm-publish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "3" "January 2016" "" "" +.TH "NPM\-PUBLISH" "3" "February 2016" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3 index 8fb992970b168f..eb132e6ee1b9a4 100644 --- a/deps/npm/man/man3/npm-rebuild.3 +++ b/deps/npm/man/man3/npm-rebuild.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "3" "January 2016" "" "" +.TH "NPM\-REBUILD" "3" "February 2016" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3 index d05efc117c5dcb..6c0044fd97e15a 100644 --- a/deps/npm/man/man3/npm-repo.3 +++ b/deps/npm/man/man3/npm-repo.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "3" "January 2016" "" "" +.TH "NPM\-REPO" "3" "February 2016" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3 index 9a545cc2c306c5..2c809d822a50a9 100644 --- a/deps/npm/man/man3/npm-restart.3 +++ b/deps/npm/man/man3/npm-restart.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "3" "January 2016" "" "" +.TH "NPM\-RESTART" "3" "February 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3 index bb864d56f0e920..9d93e79d5f8c0b 100644 --- a/deps/npm/man/man3/npm-root.3 +++ b/deps/npm/man/man3/npm-root.3 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "3" "January 2016" "" "" +.TH "NPM\-ROOT" "3" "February 2016" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3 index debbd96b0b3104..2eb36b78faafb0 100644 --- a/deps/npm/man/man3/npm-run-script.3 +++ b/deps/npm/man/man3/npm-run-script.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "3" "January 2016" "" "" +.TH "NPM\-RUN\-SCRIPT" "3" "February 2016" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3 index 7a7663c9e11ef7..d9a166cf09d93f 100644 --- a/deps/npm/man/man3/npm-search.3 +++ b/deps/npm/man/man3/npm-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "3" "January 2016" "" "" +.TH "NPM\-SEARCH" "3" "February 2016" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3 index 9708b5a8137ba2..8b1a06f85d90f0 100644 --- a/deps/npm/man/man3/npm-shrinkwrap.3 +++ b/deps/npm/man/man3/npm-shrinkwrap.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "3" "January 2016" "" "" +.TH "NPM\-SHRINKWRAP" "3" "February 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3 index 0fbae8b2022c4b..3b1cb92c5e7227 100644 --- a/deps/npm/man/man3/npm-start.3 +++ b/deps/npm/man/man3/npm-start.3 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "3" "January 2016" "" "" +.TH "NPM\-START" "3" "February 2016" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3 index f391bdc608419c..6dc0096e84ba37 100644 --- a/deps/npm/man/man3/npm-stop.3 +++ b/deps/npm/man/man3/npm-stop.3 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "3" "January 2016" "" "" +.TH "NPM\-STOP" "3" "February 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3 index d6ba680f55883b..efc6e6a1f52bc2 100644 --- a/deps/npm/man/man3/npm-tag.3 +++ b/deps/npm/man/man3/npm-tag.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "3" "January 2016" "" "" +.TH "NPM\-TAG" "3" "February 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3 index 1d29c574b98a09..58adbc37468081 100644 --- a/deps/npm/man/man3/npm-test.3 +++ b/deps/npm/man/man3/npm-test.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "3" "January 2016" "" "" +.TH "NPM\-TEST" "3" "February 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3 index 9854997e12c95f..60b6bf9e035800 100644 --- a/deps/npm/man/man3/npm-uninstall.3 +++ b/deps/npm/man/man3/npm-uninstall.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "3" "January 2016" "" "" +.TH "NPM\-UNINSTALL" "3" "February 2016" "" "" .SH "NAME" \fBnpm-uninstall\fR \- uninstall a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3 index 9049493fc914f0..80076e8e5744f1 100644 --- a/deps/npm/man/man3/npm-unpublish.3 +++ b/deps/npm/man/man3/npm-unpublish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "3" "January 2016" "" "" +.TH "NPM\-UNPUBLISH" "3" "February 2016" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3 index f2c846606acb93..c61befd932ac51 100644 --- a/deps/npm/man/man3/npm-update.3 +++ b/deps/npm/man/man3/npm-update.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "3" "January 2016" "" "" +.TH "NPM\-UPDATE" "3" "February 2016" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS @@ -8,7 +8,7 @@ npm\.commands\.update(packages, callback) .fi .RE -.TH "DESCRIPTION" "" "January 2016" "" "" +.TH "DESCRIPTION" "" "February 2016" "" "" .SH "NAME" \fBDESCRIPTION\fR .P diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3 index fa2a525eb3fb10..eb7134a7b87f70 100644 --- a/deps/npm/man/man3/npm-version.3 +++ b/deps/npm/man/man3/npm-version.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "3" "January 2016" "" "" +.TH "NPM\-VERSION" "3" "February 2016" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3 index dad5c6e9ad5299..1505d8806effc7 100644 --- a/deps/npm/man/man3/npm-view.3 +++ b/deps/npm/man/man3/npm-view.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "3" "January 2016" "" "" +.TH "NPM\-VIEW" "3" "February 2016" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3 index fbec6279c2cbbe..9dc50c567c9aa8 100644 --- a/deps/npm/man/man3/npm-whoami.3 +++ b/deps/npm/man/man3/npm-whoami.3 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "3" "January 2016" "" "" +.TH "NPM\-WHOAMI" "3" "February 2016" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index af3395c39f370b..529f105d4e3da0 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -1,4 +1,4 @@ -.TH "NPM" "3" "January 2016" "" "" +.TH "NPM" "3" "February 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.14.16 +2.14.17 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index a95cd885ff2403..dc217dd4c603cc 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" "January 2016" "" "" +.TH "NPM\-FOLDERS" "5" "February 2016" "" "" .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 a95cd885ff2403..dc217dd4c603cc 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" "January 2016" "" "" +.TH "NPM\-FOLDERS" "5" "February 2016" "" "" .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 ba383dd95a8e78..fe6d154cccf60d 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" "January 2016" "" "" +.TH "PACKAGE\.JSON" "5" "February 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -130,7 +130,7 @@ expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, lik .RE .P If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: .P .RS 2 .nf @@ -227,11 +227,13 @@ Certain files are always included, regardless of settings: .IP \(bu 2 \fBpackage\.json\fP .IP \(bu 2 -\fBREADME\fP (and its variants) +\fBREADME\fP .IP \(bu 2 -\fBCHANGELOG\fP (and its variants) +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) .IP \(bu 2 \fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field .RE .P @@ -250,13 +252,15 @@ Conversely, some files are always ignored: .IP \(bu 2 \fB\|\.wafpickle\-N\fP .IP \(bu 2 -\fB*\.swp\fP +\fB\|\.*\.swp\fP .IP \(bu 2 \fB\|\.DS_Store\fP .IP \(bu 2 \fB\|\._*\fP .IP \(bu 2 \fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP .RE .SH main diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 396504f96835f4..4dbd70e38e8cc3 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "January 2016" "" "" +.TH "NPMRC" "5" "February 2016" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index ba383dd95a8e78..fe6d154cccf60d 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" "January 2016" "" "" +.TH "PACKAGE\.JSON" "5" "February 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -130,7 +130,7 @@ expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, lik .RE .P If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression: +you are using a custom license, use a string value like this one: .P .RS 2 .nf @@ -227,11 +227,13 @@ Certain files are always included, regardless of settings: .IP \(bu 2 \fBpackage\.json\fP .IP \(bu 2 -\fBREADME\fP (and its variants) +\fBREADME\fP .IP \(bu 2 -\fBCHANGELOG\fP (and its variants) +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) .IP \(bu 2 \fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field .RE .P @@ -250,13 +252,15 @@ Conversely, some files are always ignored: .IP \(bu 2 \fB\|\.wafpickle\-N\fP .IP \(bu 2 -\fB*\.swp\fP +\fB\|\.*\.swp\fP .IP \(bu 2 \fB\|\.DS_Store\fP .IP \(bu 2 \fB\|\._*\fP .IP \(bu 2 \fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP .RE .SH main diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index c5831967402aba..328128a5198014 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" "January 2016" "" "" +.TH "NPM\-CODING\-STYLE" "7" "February 2016" "" "" .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 b932989969ca3f..5d68dda345fdd7 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" "January 2016" "" "" +.TH "NPM\-CONFIG" "7" "February 2016" "" "" .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 77fbb0360d8669..d85b86684adf0c 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" "January 2016" "" "" +.TH "NPM\-DEVELOPERS" "7" "February 2016" "" "" .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 888159cb8a7b38..15dd5ddbd85dca 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" "January 2016" "" "" +.TH "NPM\-DISPUTES" "7" "February 2016" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index d62ade3c7beb19..66f6d2cf01f297 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" "January 2016" "" "" +.TH "NPM\-INDEX" "7" "February 2016" "" "" .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 7bf5ba171e97fa..929c2c7d603f6a 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" "January 2016" "" "" +.TH "NPM\-ORGS" "7" "February 2016" "" "" .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 b255de73f8549b..1d4e1041031213 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" "January 2016" "" "" +.TH "NPM\-REGISTRY" "7" "February 2016" "" "" .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 131c18c3e6d9e5..f8c39625927a56 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" "January 2016" "" "" +.TH "NPM\-SCOPE" "7" "February 2016" "" "" .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 ef341e6949fe4a..1d1b50f673b9eb 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" "January 2016" "" "" +.TH "NPM\-SCRIPTS" "7" "February 2016" "" "" .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 4bf93d54ba08fa..0df2bf141ac8b8 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" "January 2016" "" "" +.TH "NPM\-REMOVAL" "1" "February 2016" "" "" .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 600c968297ff7c..1f877f0b7b7fb9 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "January 2016" "" "" +.TH "SEMVER" "7" "February 2016" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/request/.eslintrc b/deps/npm/node_modules/request/.eslintrc new file mode 100644 index 00000000000000..6ebc53601d7ba5 --- /dev/null +++ b/deps/npm/node_modules/request/.eslintrc @@ -0,0 +1,45 @@ +{ + "env": { + "node": true + }, + "rules": { + // 2-space indentation + "indent": [2, 2, {"SwitchCase": 1}], + // Disallow semi-colons, unless needed to disambiguate statement + "semi": [2, "never"], + // Require strings to use single quotes + "quotes": [2, "single"], + // Require curly braces for all control statements + "curly": 2, + // Disallow using variables and functions before they've been defined + "no-use-before-define": 2, + // Allow any case for variable naming + "camelcase": 0, + // Disallow unused variables, except as function arguments + "no-unused-vars": [2, {"args":"none"}], + // Allow leading underscores for method names + // REASON: we use underscores to denote private methods + "no-underscore-dangle": 0, + // Allow multi spaces around operators since they are + // used for alignment. This is not consistent in the + // code. + "no-multi-spaces": 0, + // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses: + // + // { + // beforeColon : true, + // afterColon : true + // } + // + // eslint can't handle this, so the check is disabled. + "key-spacing": 0, + // Allow shadowing vars in outer scope (needs discussion) + "no-shadow": 0, + // Use if () { } + // ^ space + "space-after-keywords": [2, "always"], + // Use if () { } + // ^ space + "space-before-blocks": [2, "always"] + } +} diff --git a/deps/npm/node_modules/request/node_modules/bl/.jshintrc b/deps/npm/node_modules/request/node_modules/bl/.jshintrc new file mode 100644 index 00000000000000..c8ef3ca4097f82 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/.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/request/node_modules/extend/.eslintrc b/deps/npm/node_modules/request/node_modules/extend/.eslintrc new file mode 100644 index 00000000000000..d49f17353d70e2 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/extend/.eslintrc @@ -0,0 +1,192 @@ +{ + "env": { + "browser": false, + "node": true, + "amd": false, + "mocha": false, + "jasmine": false + }, + + "rules": { + "accessor-pairs": [2, { getWithoutSet: false, setWithoutGet: true }], + "array-bracket-spacing": [2, "never", { + "singleValue": false, + "objectsInArrays": false, + "arraysInArrays": false + }], + "block-scoped-var": [0], + "brace-style": [2, "1tbs", { "allowSingleLine": true }], + "camelcase": [2], + "comma-dangle": [2, "never"], + "comma-spacing": [2], + "comma-style": [2, "last"], + "complexity": [2, 15], + "computed-property-spacing": [2, "never"], + "consistent-return": [2], + "consistent-this": [0, "that"], + "constructor-super": [2], + "curly": [2, "all"], + "default-case": [2], + "dot-notation": [2, { "allowKeywords": true }], + "eol-last": [2], + "eqeqeq": [2], + "func-names": [0], + "func-style": [2, "expression"], + "generator-star-spacing": [2, { "before": false, "after": true }], + "global-strict": [0, "never"], + "guard-for-in": [0], + "handle-callback-err": [0], + "key-spacing": [2, { "beforeColon": false, "afterColon": true }], + "linebreak-style": [2, "unix"], + "lines-around-comment": [2, { + "beforeBlockComment": false, + "afterBlockComment": false, + "beforeLineComment": false, + "beforeLineComment": false, + "allowBlockStart": true, + "allowBlockEnd": true + }], + "quotes": [2, "single", "avoid-escape"], + "max-depth": [1, 4], + "max-len": [0, 80, 4], + "max-nested-callbacks": [2, 2], + "max-params": [2, 2], + "max-statements": [2, 21], + "new-parens": [2], + "new-cap": [2], + "newline-after-var": [0], + "no-alert": [2], + "no-array-constructor": [2], + "no-bitwise": [0], + "no-caller": [2], + "no-catch-shadow": [2], + "no-cond-assign": [2], + "no-console": [2], + "no-constant-condition": [2], + "no-continue": [2], + "no-control-regex": [2], + "no-debugger": [2], + "no-delete-var": [2], + "no-div-regex": [0], + "no-dupe-args": [2], + "no-dupe-keys": [2], + "no-duplicate-case": [2], + "no-else-return": [0], + "no-empty": [2], + "no-empty-character-class": [2], + "no-empty-label": [2], + "no-eq-null": [0], + "no-eval": [2], + "no-ex-assign": [2], + "no-extend-native": [2], + "no-extra-bind": [2], + "no-extra-boolean-cast": [2], + "no-extra-parens": [0], + "no-extra-semi": [2], + "no-fallthrough": [2], + "no-floating-decimal": [2], + "no-func-assign": [2], + "no-implied-eval": [2], + "no-inline-comments": [0], + "no-inner-declarations": [2, "functions"], + "no-invalid-regexp": [2], + "no-irregular-whitespace": [2], + "no-iterator": [2], + "no-label-var": [2], + "no-labels": [2], + "no-lone-blocks": [2], + "no-lonely-if": [2], + "no-loop-func": [2], + "no-mixed-requires": [0, false], + "no-mixed-spaces-and-tabs": [2, false], + "no-multi-spaces": [2], + "no-multi-str": [2], + "no-multiple-empty-lines": [2, {"max": 1}], + "no-native-reassign": [2], + "no-negated-in-lhs": [2], + "no-nested-ternary": [0], + "no-new": [2], + "no-new-func": [2], + "no-new-object": [2], + "no-new-require": [0], + "no-new-wrappers": [2], + "no-obj-calls": [2], + "no-octal": [2], + "no-octal-escape": [2], + "no-param-reassign": [2], + "no-path-concat": [0], + "no-plusplus": [0], + "no-process-env": [0], + "no-process-exit": [2], + "no-proto": [2], + "no-redeclare": [2], + "no-regex-spaces": [2], + "no-reserved-keys": [2], + "no-restricted-modules": [0], + "no-return-assign": [2, "always"], + "no-script-url": [2], + "no-self-compare": [0], + "no-sequences": [2], + "no-shadow": [2], + "no-shadow-restricted-names": [2], + "no-space-before-semi": [2], + "no-spaced-func": [2], + "no-sparse-arrays": [2], + "no-sync": [0], + "no-ternary": [0], + "no-this-before-super": [2], + "no-throw-literal": [2], + "no-trailing-spaces": [2, { "skipBlankLines": false }], + "no-undef": [2], + "no-undef-init": [2], + "no-undefined": [0], + "no-underscore-dangle": [2], + "no-unexpected-multiline": [2], + "no-unneeded-ternary": [2], + "no-unreachable": [2], + "no-unused-expressions": [2], + "no-unused-vars": [2, { "vars": "all", "args": "after-used" }], + "no-use-before-define": [2], + "no-void": [0], + "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], + "no-with": [2], + "no-wrap-func": [2], + "object-curly-spacing": [2, "always"], + "object-shorthand": [2, "never"], + "one-var": [0], + "operator-assignment": [0, "always"], + "operator-linebreak": [2, "none"], + "padded-blocks": [0], + "prefer-const": [0], + "quote-props": [0], + "radix": [0], + "semi": [2], + "semi-spacing": [2, { "before": false, "after": true }], + "sort-vars": [0], + "space-after-keywords": [2, "always"], + "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], + "space-before-blocks": [0, "always"], + "space-in-brackets": [0, "never", { + "singleValue": true, + "arraysInArrays": false, + "arraysInObjects": false, + "objectsInArrays": true, + "objectsInObjects": true, + "propertyName": false + }], + "space-in-parens": [2, "never"], + "space-infix-ops": [2], + "space-return-throw-case": [2], + "space-unary-ops": [2, { "words": true, "nonwords": false }], + "spaced-comment": [2, "always"], + "spaced-line-comment": [0, "always"], + "strict": [2, "global"], + "use-isnan": [2], + "valid-jsdoc": [0], + "valid-typeof": [2], + "vars-on-top": [0], + "wrap-iife": [2], + "wrap-regex": [2], + "yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }] + } +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc new file mode 100644 index 00000000000000..77887b5f0f2efc --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/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/node_modules/request/node_modules/isstream/.jshintrc b/deps/npm/node_modules/request/node_modules/isstream/.jshintrc new file mode 100644 index 00000000000000..c8ef3ca4097f82 --- /dev/null +++ b/deps/npm/node_modules/request/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/request/node_modules/qs/.eslintrc b/deps/npm/node_modules/request/node_modules/qs/.eslintrc new file mode 100644 index 00000000000000..d1968227c4e9c2 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/qs/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 18], + "consistent-return": [1], + "max-params": [2, 8], + "max-statements": [2, 32], + "no-extra-parens": [1], + "no-continue": [1], + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": 1 + } +} diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc new file mode 100644 index 00000000000000..4c1c8d49723519 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc @@ -0,0 +1,5 @@ +{ + "node": true, + "asi": true, + "laxcomma": true +} diff --git a/deps/npm/package.json b/deps/npm/package.json index 23bb9f2589d394..de1ccc32e7bbcd 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.14.16", + "version": "2.14.17", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ diff --git a/deps/npm/test/fixtures/onload.js b/deps/npm/test/fixtures/onload.js new file mode 100644 index 00000000000000..90c1a3aa55e77a --- /dev/null +++ b/deps/npm/test/fixtures/onload.js @@ -0,0 +1 @@ +console.error('called onload') diff --git a/deps/npm/test/tap/onload.js b/deps/npm/test/tap/onload.js new file mode 100644 index 00000000000000..8d2b6c743bab8e --- /dev/null +++ b/deps/npm/test/tap/onload.js @@ -0,0 +1,39 @@ +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 onload = path.resolve(__dirname, '../fixtures/onload.js') + +test('setup', function (t) { + rimraf.sync(path.join(__dirname, 'node_modules')) + t.end() +}) + +test('npm bin with valid onload script', function (t) { + var args = ['--onload', onload, 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.equal(stderr.trim(), 'called onload') + t.equal(code, 0, 'exit ok') + t.equal(stdout, fixture + '\n') + t.end() + }) +}) + +test('npm bin with invalid onload script', function (t) { + var onloadScript = onload + 'jsfd' + var args = ['--onload', onloadScript, '--loglevel=warn', 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.match(stderr, /npm WARN onload-script failed to require onload script/) + t.match(stderr, /MODULE_NOT_FOUND/) + t.notEqual(stderr.indexOf(onloadScript), -1) + t.equal(code, 0, 'exit ok') + var res = path.resolve(stdout) + t.equal(res, fixture + '\n') + t.end() + }) +}) diff --git a/deps/npm/test/tap/outdated-symlink.js b/deps/npm/test/tap/outdated-symlink.js new file mode 100644 index 00000000000000..39a8072984d40b --- /dev/null +++ b/deps/npm/test/tap/outdated-symlink.js @@ -0,0 +1,89 @@ +var fs = require('graceful-fs') +var path = require('path') +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'outdated-symlink') +var cache = path.resolve(pkg, 'cache') +var originalLog + +var fakeRoot = path.join(__dirname, 'fakeRoot') +var OPTS = { + env: { + 'npm_config_prefix': fakeRoot + } +} + +var json = { + name: 'my-local-package', + description: 'fixture', + version: '1.0.0' +} + +test('setup', function (t) { + cleanup() + originalLog = console.log + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + common.npm(['install', '-g', 'async@0.2.9', 'underscore@1.3.1'], OPTS, function (err, c, out) { + t.ifError(err, 'global install did not error') + common.npm(['link'], OPTS, function (err, c, out) { + t.ifError(err, 'link did not error') + common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) { + t.ifError(err) + t.equal(c, 0) + t.equal(stderr, '', 'got expected stderr') + t.has(out, /my-local-package@1.0.0/, 'creates global link ok') + t.end() + }) + }) + }) +}) + +test('when outdated is called linked packages should be displayed as such', function (t) { + var regOutLinked = /my-local-package\s*1.0.0\s*linked\s*linked/ + var regOutInstallOne = /async\s*0.2.9\s*1.5.2\s*1.5.2/ + var regOutInstallTwo = /underscore\s*1.3.1\s*1.8.3\s*1.8.3/ + + console.log = function () {} + mr({ port: common.port }, function (er, s) { + common.npm(['outdated', '-g'], OPTS, function (err, c, out, stderr) { + t.ifError(err) + t.ok(out.match(regOutLinked), 'Global Link format as expected') + t.ok(out.match(regOutInstallOne), 'Global Install format as expected') + t.ok(out.match(regOutInstallTwo), 'Global Install format as expected') + s.close() + t.end() + }) + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + common.npm(['rm', 'outdated'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the linked package without error') + t.equal(code, 0, 'cleanup outdated in local ok') + common.npm(['rm', '-g', 'outdated', 'async', 'underscore'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the global package without error') + t.equal(code, 0, 'cleanup outdated in global ok') + + console.log = originalLog + cleanup() + t.end() + }) + }) +}) + +function cleanup () { + rimraf.sync(pkg) + rimraf.sync(fakeRoot) +} diff --git a/deps/npm/test/tap/update-examples.js b/deps/npm/test/tap/update-examples.js index 633713d9d7a8cf..44b615b91519dd 100644 --- a/deps/npm/test/tap/update-examples.js +++ b/deps/npm/test/tap/update-examples.js @@ -30,7 +30,10 @@ var DEP_PKG = { var INSTALLED = { dependencies: { - 'dep1': '1.1.1' + 'dep1': { + version: '1.1.1', + link: false + } } } @@ -91,7 +94,7 @@ function resetPackage (options) { } if (options.installed) { - mockInstalled.dependencies.dep1 = options.installed + mockInstalled.dependencies.dep1.version = options.installed mockDepJson.version = options.installed } }